@odx/angular 12.6.0 → 12.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/cdk/autocomplete-control/index.d.ts +1 -0
- package/cdk/autocomplete-control/lib/directives/highlight-search-result.directive.d.ts +19 -0
- package/cdk/autocomplete-control/lib/directives/index.d.ts +1 -0
- package/components/main-menu/lib/main-menu.component.d.ts +0 -1
- package/components/modal/lib/modal.component.d.ts +1 -1
- package/components/table/lib/components/header-title/header-title.component.d.ts +2 -1
- package/components/table/lib/models/column-width.d.ts +5 -0
- package/components/table/lib/models/header-cell.d.ts +2 -0
- package/components/table/lib/models/index.d.ts +1 -0
- package/components/table/lib/table.component.d.ts +12 -8
- package/esm2022/cdk/autocomplete-control/index.mjs +2 -1
- package/esm2022/cdk/autocomplete-control/lib/directives/highlight-search-result.directive.mjs +43 -0
- package/esm2022/cdk/autocomplete-control/lib/directives/index.mjs +2 -0
- package/esm2022/cdk/connected-overlay/lib/connected-overlay.component.mjs +2 -2
- package/esm2022/components/main-menu/lib/main-menu.component.mjs +4 -8
- package/esm2022/components/modal/lib/modal.component.mjs +8 -10
- package/esm2022/components/table/lib/components/header-title/header-title.component.mjs +15 -9
- package/esm2022/components/table/lib/models/column-width.mjs +2 -0
- package/esm2022/components/table/lib/models/header-cell.mjs +1 -1
- package/esm2022/components/table/lib/models/index.mjs +2 -1
- package/esm2022/components/table/lib/table.component.mjs +29 -25
- package/esm2022/components/toast/lib/components/toast-container/toast-container.component.mjs +6 -5
- package/fesm2022/odx-angular-cdk-autocomplete-control.mjs +43 -2
- package/fesm2022/odx-angular-cdk-autocomplete-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs +1 -1
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs.map +1 -1
- package/fesm2022/odx-angular-components-main-menu.mjs +3 -7
- package/fesm2022/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2022/odx-angular-components-modal.mjs +7 -6
- package/fesm2022/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2022/odx-angular-components-table.mjs +40 -31
- package/fesm2022/odx-angular-components-table.mjs.map +1 -1
- package/fesm2022/odx-angular-components-toast.mjs +5 -4
- package/fesm2022/odx-angular-components-toast.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, EventEmitter, booleanAttribute, Component, Input, Output, ChangeDetectorRef, ViewEncapsulation, ChangeDetectionStrategy, Directive, ViewChildren, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, EventEmitter, booleanAttribute, Component, Input, Output, ChangeDetectorRef, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, Directive, computed, input, ViewChildren, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormsModule, FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { CheckboxComponent } from '@odx/angular/components/checkbox';
|
|
@@ -10,7 +10,6 @@ import { __decorate, __metadata } from 'tslib';
|
|
|
10
10
|
import { CSSComponent, CSSModifier } from '@odx/angular/internal';
|
|
11
11
|
import * as i2 from '@odx/angular/components/form-field';
|
|
12
12
|
import { FormFieldModule } from '@odx/angular/components/form-field';
|
|
13
|
-
import { IconComponent } from '@odx/angular/components/icon';
|
|
14
13
|
import { CoreModule } from '@odx/angular';
|
|
15
14
|
|
|
16
15
|
const TABLE = new InjectionToken('odx-table');
|
|
@@ -132,7 +131,7 @@ class HeaderTitleComponent {
|
|
|
132
131
|
* @returns {number}
|
|
133
132
|
*/
|
|
134
133
|
get selected() {
|
|
135
|
-
return this.table.data.filter((d) => d[this.item.name]).length;
|
|
134
|
+
return this.table.data().filter((d) => d[this.item.name]).length;
|
|
136
135
|
}
|
|
137
136
|
/**
|
|
138
137
|
* Updates the component view, usually after a state change.
|
|
@@ -146,8 +145,8 @@ class HeaderTitleComponent {
|
|
|
146
145
|
* @returns {boolean}
|
|
147
146
|
*/
|
|
148
147
|
get checked() {
|
|
149
|
-
const column = this.
|
|
150
|
-
return this.table.data.every((item) => column && item[column]);
|
|
148
|
+
const column = this.item.check && this.item.name;
|
|
149
|
+
return this.table.data().every((item) => column && item[column]);
|
|
151
150
|
}
|
|
152
151
|
ngOnInit() {
|
|
153
152
|
this.checkBoxListener();
|
|
@@ -161,19 +160,25 @@ class HeaderTitleComponent {
|
|
|
161
160
|
.subscribe();
|
|
162
161
|
}
|
|
163
162
|
get indeterminate() {
|
|
164
|
-
const column = this.
|
|
165
|
-
const { length } = this.table.data;
|
|
166
|
-
const unchecked = length - this.table.data.filter((item) => column && item[column]).length;
|
|
163
|
+
const column = this.item.check && this.item.name;
|
|
164
|
+
const { length } = this.table.data();
|
|
165
|
+
const unchecked = length - this.table.data().filter((item) => column && item[column]).length;
|
|
167
166
|
return unchecked > 0 && unchecked < length;
|
|
168
167
|
}
|
|
168
|
+
get columnWidth() {
|
|
169
|
+
return this.item.width ?? 'auto';
|
|
170
|
+
}
|
|
169
171
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HeaderTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
170
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: HeaderTitleComponent, isStandalone: true, selector: "th[odxHeaderTitle]", inputs: { item: "item" }, ngImport: i0, template: "@if (item.check) {\n <div class=\"odx-table__check\">\n <div [formGroup]=\"checkForm\">\n <odx-checkbox [checked]=\"checked\" [indeterminate]=\"indeterminate\" formControlName=\"check\" />\n </div>\n </div>\n} @else {\n <div class=\"odx-table__header-cell-title\" (click)=\"sortColumn()\" [class.sortable]=\"item.sortable\">\n {{ item.title }}\n @if (item.sortable) {\n @switch (sortIcon) {\n @case ('unsorted') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <path d=\"m14,5H2v-2h12v2Zm-4,2H2v2h8v-2Zm-4,4H2v2h4v-2Z\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('desc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"11 6 8 3 5 6 7 6 7 13 9 13 9 6 11 6\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('asc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"5 10 8 13 11 10 9 10 9 3 7 3 7 10 5 10\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n }\n }\n </div>\n <ng-content select=\"odx-form-field\" />\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CheckboxComponent, selector: "odx-checkbox", inputs: ["indeterminate"], outputs: ["indeterminateChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
172
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: HeaderTitleComponent, isStandalone: true, selector: "th[odxHeaderTitle]", inputs: { item: "item" }, host: { properties: { "style.width": "this.columnWidth" } }, ngImport: i0, template: "@if (item.check) {\n <div class=\"odx-table__check\">\n <div [formGroup]=\"checkForm\">\n <odx-checkbox [checked]=\"checked\" [indeterminate]=\"indeterminate\" formControlName=\"check\" />\n </div>\n </div>\n} @else {\n <div class=\"odx-table__header-cell-title\" (click)=\"sortColumn()\" [class.sortable]=\"item.sortable\">\n {{ item.title }}\n @if (item.sortable) {\n @switch (sortIcon) {\n @case ('unsorted') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <path d=\"m14,5H2v-2h12v2Zm-4,2H2v2h8v-2Zm-4,4H2v2h4v-2Z\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('desc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"11 6 8 3 5 6 7 6 7 13 9 13 9 6 11 6\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('asc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"5 10 8 13 11 10 9 10 9 3 7 3 7 10 5 10\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n }\n }\n </div>\n <ng-content select=\"odx-form-field\" />\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CheckboxComponent, selector: "odx-checkbox", inputs: ["indeterminate"], outputs: ["indeterminateChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
171
173
|
}
|
|
172
174
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HeaderTitleComponent, decorators: [{
|
|
173
175
|
type: Component,
|
|
174
176
|
args: [{ selector: 'th[odxHeaderTitle]', standalone: true, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, CheckboxComponent, ReactiveFormsModule], template: "@if (item.check) {\n <div class=\"odx-table__check\">\n <div [formGroup]=\"checkForm\">\n <odx-checkbox [checked]=\"checked\" [indeterminate]=\"indeterminate\" formControlName=\"check\" />\n </div>\n </div>\n} @else {\n <div class=\"odx-table__header-cell-title\" (click)=\"sortColumn()\" [class.sortable]=\"item.sortable\">\n {{ item.title }}\n @if (item.sortable) {\n @switch (sortIcon) {\n @case ('unsorted') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <path d=\"m14,5H2v-2h12v2Zm-4,2H2v2h8v-2Zm-4,4H2v2h4v-2Z\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('desc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"11 6 8 3 5 6 7 6 7 13 9 13 9 6 11 6\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('asc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"5 10 8 13 11 10 9 10 9 3 7 3 7 10 5 10\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n }\n }\n </div>\n <ng-content select=\"odx-form-field\" />\n}\n" }]
|
|
175
177
|
}], propDecorators: { item: [{
|
|
176
178
|
type: Input
|
|
179
|
+
}], columnWidth: [{
|
|
180
|
+
type: HostBinding,
|
|
181
|
+
args: ['style.width']
|
|
177
182
|
}] } });
|
|
178
183
|
|
|
179
184
|
/**
|
|
@@ -245,21 +250,38 @@ const TableVariant = {
|
|
|
245
250
|
let TableComponent = class TableComponent {
|
|
246
251
|
constructor() {
|
|
247
252
|
this.takeUntilDestroyed = untilDestroyed();
|
|
253
|
+
this.headerColumns = computed(() => {
|
|
254
|
+
const [firstRow] = this.data() ?? [];
|
|
255
|
+
const headerColumns = this.headerData();
|
|
256
|
+
if (!(headerColumns && firstRow))
|
|
257
|
+
return headerColumns;
|
|
258
|
+
return Object.keys(firstRow).map((key) => headerColumns.find((item) => item.name === key) ?? {
|
|
259
|
+
name: key,
|
|
260
|
+
title: key.charAt(0).toUpperCase() + key.slice(1),
|
|
261
|
+
sortable: false,
|
|
262
|
+
filter: false,
|
|
263
|
+
check: key === 'selected',
|
|
264
|
+
});
|
|
265
|
+
});
|
|
248
266
|
this.element = injectElement();
|
|
249
267
|
/**
|
|
250
268
|
* Data array of type T that the table displays.
|
|
251
269
|
*
|
|
252
|
-
* @type {T[]}
|
|
253
|
-
|
|
270
|
+
* @type {Signal<T[]>}
|
|
271
|
+
*/
|
|
272
|
+
this.data = input.required();
|
|
273
|
+
/**
|
|
274
|
+
* Message to display when no data is available.
|
|
275
|
+
*
|
|
276
|
+
* @type {Signal<string>}
|
|
254
277
|
*/
|
|
255
|
-
this.
|
|
278
|
+
this.noDataMessage = input('No data available');
|
|
256
279
|
/**
|
|
257
280
|
* Configuration for table header data which controls sorting, filtering, and additional metadata.
|
|
258
281
|
*
|
|
259
|
-
* @type {TableHeaderCell[]}
|
|
260
|
-
* @default []
|
|
282
|
+
* @type {Signal<TableHeaderCell[]>}
|
|
261
283
|
*/
|
|
262
|
-
this.headerData = [];
|
|
284
|
+
this.headerData = input([]);
|
|
263
285
|
/**
|
|
264
286
|
* FormGroup to handle the dynamic filtering controls, each tied to a header cell that has filtering enabled.
|
|
265
287
|
*/
|
|
@@ -284,8 +306,7 @@ let TableComponent = class TableComponent {
|
|
|
284
306
|
this.checked = new EventEmitter();
|
|
285
307
|
}
|
|
286
308
|
ngOnInit() {
|
|
287
|
-
this.
|
|
288
|
-
this.headerData.forEach((item) => item.filter && this.form.addControl(item.name, new FormControl('')));
|
|
309
|
+
this.headerData().forEach((item) => item.filter && this.form.addControl(item.name, new FormControl('')));
|
|
289
310
|
this.formListener();
|
|
290
311
|
}
|
|
291
312
|
/**
|
|
@@ -304,16 +325,8 @@ let TableComponent = class TableComponent {
|
|
|
304
325
|
}))
|
|
305
326
|
.subscribe();
|
|
306
327
|
}
|
|
307
|
-
setHeaderData() {
|
|
308
|
-
this.headerData = Object.keys(this.data[0]).map((key) => this.headerData.find((item) => item.name === key) || {
|
|
309
|
-
name: key,
|
|
310
|
-
title: `${key[0].toUpperCase()}${key.slice(1)}`,
|
|
311
|
-
sortable: false,
|
|
312
|
-
filter: false,
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
328
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
316
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TableComponent, isStandalone: true, selector: "table[odxTable]", inputs: { variant: "variant", data: "data", headerData: "headerData" }, outputs: { sorted: "sorted", filtered: "filtered", checked: "checked" }, host: { properties: { "attr.role": "\"table\"" } }, providers: [{ provide: TABLE, useExisting: TableComponent }], viewQueries: [{ propertyName: "headers", predicate: HeaderTitleComponent, descendants: true }], ngImport: i0, template: "<thead class=\"odx-table__head\" role=\"rowgroup\" [formGroup]=\"form\">\n <tr class=\"odx-table__header-row\" role=\"row\">\n @for (item of
|
|
329
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TableComponent, isStandalone: true, selector: "table[odxTable]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, noDataMessage: { classPropertyName: "noDataMessage", publicName: "noDataMessage", isSignal: true, isRequired: false, transformFunction: null }, headerData: { classPropertyName: "headerData", publicName: "headerData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sorted: "sorted", filtered: "filtered", checked: "checked" }, host: { properties: { "attr.role": "\"table\"" } }, providers: [{ provide: TABLE, useExisting: TableComponent }], viewQueries: [{ propertyName: "headers", predicate: HeaderTitleComponent, descendants: true }], ngImport: i0, template: "<thead class=\"odx-table__head\" role=\"rowgroup\" [formGroup]=\"form\">\n <tr class=\"odx-table__header-row\" role=\"row\">\n @for (item of headerColumns(); track $index) {\n <th class=\"odx-table__header-cell\" role=\"columnheader\" odxHeaderTitle [item]=\"item\">\n @if (item.filter) {\n <odx-form-field>\n <input placeholder=\"Filter\" [formControlName]=\"item.name\" type=\"text\" odxFormFieldControl />\n </odx-form-field>\n }\n </th>\n }\n </tr>\n</thead>\n<tbody class=\"odx-table__body\" role=\"rowgroup\">\n @if (data() && !!data().length) {\n <ng-content select=\"tr\" />\n } @else {\n <tr odx-table-row class=\"odx-table__no-data-row\">\n <td odx-table-cell [attr.colspan]=\"headerColumns().length\">{{ noDataMessage() }}</td>\n </tr>\n }\n</tbody>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormFieldModule }, { kind: "component", type: i2.FormFieldComponent, selector: "odx-form-field", inputs: ["label", "hasWarning", "variant"] }, { kind: "directive", type: i2.FormFieldControlDirective, selector: "[odxFormFieldControl]", exportAs: ["odxFormFieldControl"] }, { kind: "component", type: HeaderTitleComponent, selector: "th[odxHeaderTitle]", inputs: ["item"] }, { kind: "directive", type: TableRowDirective, selector: "tr[odx-table-row]" }, { kind: "directive", type: TableCellDirective, selector: "td[odx-table-cell]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
317
330
|
};
|
|
318
331
|
__decorate([
|
|
319
332
|
CSSModifier(),
|
|
@@ -326,13 +339,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
326
339
|
type: Component,
|
|
327
340
|
args: [{ selector: 'table[odxTable]', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
328
341
|
'[attr.role]': '"table"',
|
|
329
|
-
}, imports: [CommonModule,
|
|
342
|
+
}, imports: [CommonModule, ReactiveFormsModule, FormFieldModule, HeaderTitleComponent, TableRowDirective, TableCellDirective], providers: [{ provide: TABLE, useExisting: TableComponent }], template: "<thead class=\"odx-table__head\" role=\"rowgroup\" [formGroup]=\"form\">\n <tr class=\"odx-table__header-row\" role=\"row\">\n @for (item of headerColumns(); track $index) {\n <th class=\"odx-table__header-cell\" role=\"columnheader\" odxHeaderTitle [item]=\"item\">\n @if (item.filter) {\n <odx-form-field>\n <input placeholder=\"Filter\" [formControlName]=\"item.name\" type=\"text\" odxFormFieldControl />\n </odx-form-field>\n }\n </th>\n }\n </tr>\n</thead>\n<tbody class=\"odx-table__body\" role=\"rowgroup\">\n @if (data() && !!data().length) {\n <ng-content select=\"tr\" />\n } @else {\n <tr odx-table-row class=\"odx-table__no-data-row\">\n <td odx-table-cell [attr.colspan]=\"headerColumns().length\">{{ noDataMessage() }}</td>\n </tr>\n }\n</tbody>\n" }]
|
|
330
343
|
}], propDecorators: { variant: [{
|
|
331
344
|
type: Input
|
|
332
|
-
}], data: [{
|
|
333
|
-
type: Input
|
|
334
|
-
}], headerData: [{
|
|
335
|
-
type: Input
|
|
336
345
|
}], sorted: [{
|
|
337
346
|
type: Output
|
|
338
347
|
}], filtered: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-table.mjs","sources":["../../../../libs/angular/components/table/src/lib/table.config.ts","../../../../libs/angular/components/table/src/lib/components/check-cell/check-cell.component.ts","../../../../libs/angular/components/table/src/lib/components/check-cell/check-cell.component.html","../../../../libs/angular/components/table/src/lib/models/sort-variant.ts","../../../../libs/angular/components/table/src/lib/components/header-title/header-title.component.ts","../../../../libs/angular/components/table/src/lib/components/header-title/header-title.component.html","../../../../libs/angular/components/table/src/lib/directives/table-cell.directive.ts","../../../../libs/angular/components/table/src/lib/directives/table-row.directive.ts","../../../../libs/angular/components/table/src/lib/models/table-variant.ts","../../../../libs/angular/components/table/src/lib/table.component.ts","../../../../libs/angular/components/table/src/lib/table.component.html","../../../../libs/angular/components/table/src/lib/table.module.ts","../../../../libs/angular/components/table/src/odx-angular-components-table.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { TableBodyCell } from './models';\nimport { TableComponent } from './table.component';\n\nexport const TABLE = new InjectionToken<TableComponent<TableBodyCell>>('odx-table');\n","import { booleanAttribute, Component, EventEmitter, inject, Input, Output } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CheckboxComponent } from '@odx/angular/components/checkbox';\nimport { injectElement } from '@odx/angular/utils';\nimport { TABLE } from '../../table.config';\n\n/**\n * CheckCellComponent provides a checkbox input within a table cell, allowing rows to be selected.\n * It is designed to be used in conjunction with a table component that manages state and header interactions,\n * particularly for functionalities like bulk actions.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'td[odx-table-cell][checked]',\n standalone: true,\n templateUrl: './check-cell.component.html',\n imports: [CheckboxComponent, FormsModule],\n})\nexport class CheckCellComponent {\n private readonly table = inject(TABLE);\n public readonly element = injectElement();\n\n /**\n * Indicates whether the checkbox within the table cell is checked.\n *\n * @type {boolean}\n * @default false\n */\n @Input({ transform: booleanAttribute })\n public checked = false;\n\n /**\n * Event emitter that triggers when the checked state changes. It emits the new state of the checkbox.\n *\n * @emits {boolean}\n */\n @Output() public checkedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /**\n * Updates the checked state of the checkbox and notifies the parent table component, typically to update\n * the state of a header checkbox or other related components.\n * @param {boolean} e - The new checked state.\n */\n public update(e: boolean): void {\n this.checkedChange.emit(e);\n this.table.headers.forEach((header) => header.check && header.check());\n }\n}\n","<odx-checkbox [(ngModel)]=\"checked\" (ngModelChange)=\"update($event)\" />\n","export type TableSortVariant = typeof TableSortVariant[keyof typeof TableSortVariant];\n\nexport const TableSortVariant = {\n UNSORTED: 'unsorted',\n ASC: 'asc',\n DESC: 'desc',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, Input, OnInit, ViewEncapsulation } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CheckboxComponent } from '@odx/angular/components/checkbox';\nimport { untilDestroyed } from '@odx/angular/utils';\nimport { tap } from 'rxjs';\nimport { SortStatus, TableBodyCell, TableHeaderCell } from '../../models';\nimport { TableSortVariant } from '../../models/sort-variant';\nimport { TABLE } from '../../table.config';\n\n/**\n * HeaderTitleComponent provides the functionality for a table header cell, including sorting and checkbox\n * operations if applicable. It handles changes in sort state and emits relevant events to the table component\n * to manage sorting and selection state across the table.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'th[odxHeaderTitle]',\n templateUrl: './header-title.component.html',\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, CheckboxComponent, ReactiveFormsModule],\n})\nexport class HeaderTitleComponent implements OnInit {\n private readonly table = inject(TABLE);\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly takeUntilDestroyed = untilDestroyed();\n private sortStatus: SortStatus = this.getSortStatus;\n\n /**\n * The header cell item containing metadata like column name, sortability, and whether it should include a checkbox.\n *\n * @type {TableHeaderCell}\n */\n @Input()\n public item!: TableHeaderCell;\n\n /**\n * FormGroup to manage the checkbox state within the header.\n *\n * @type {FormGroup}\n */\n public checkForm = new FormGroup({ check: new FormControl(false) });\n\n /**\n * Computes and returns the current sort status of the column associated with this header.\n *\n * @returns {SortStatus}\n */\n public get getSortStatus(): SortStatus {\n return { column: this.item?.name, sortVariant: TableSortVariant.UNSORTED };\n }\n\n /**\n * Returns the icon or indicator for the current sorting status (ascending, descending, unsorted).\n *\n * @returns {TableSortVariant}\n */\n public get sortIcon(): TableSortVariant {\n return this.sortStatus.sortVariant;\n }\n\n /**\n * Toggles the sorting status of the column and informs the table component of the change.\n */\n public sortColumn(): void {\n if (!this.item?.sortable) return;\n switch (this.sortStatus.sortVariant) {\n case TableSortVariant.DESC:\n case TableSortVariant.UNSORTED:\n this.table.clearSort();\n this.sortStatus = { ...this.sortStatus, sortVariant: TableSortVariant.ASC };\n break;\n case TableSortVariant.ASC:\n this.table.clearSort();\n\n this.sortStatus = { ...this.sortStatus, sortVariant: TableSortVariant.DESC };\n break;\n }\n\n this.table.sorted.emit(this.sortStatus);\n }\n\n /**\n * Resets the sort status to unsorted.\n */\n public clearSortStatus(): void {\n this.sortStatus = { column: this.item?.name, sortVariant: TableSortVariant.UNSORTED };\n this.check();\n }\n\n /**\n * Returns the number of selected items in the column, used to determine checkbox state.\n *\n * @returns {number}\n */\n public get selected(): number {\n return this.table.data.filter((d: TableBodyCell) => d[this.item.name]).length;\n }\n\n /**\n * Updates the component view, usually after a state change.\n */\n public check(): void {\n this.cdr.markForCheck();\n }\n\n /**\n * Determines whether the checkbox should be marked as checked.\n *\n * @returns {boolean}\n */\n public get checked(): boolean {\n const column = this.table.headerData.find((h: TableHeaderCell) => h.check)?.name;\n return this.table.data.every((item: TableBodyCell) => column && item[column]);\n }\n\n public ngOnInit(): void {\n this.checkBoxListener();\n }\n\n private checkBoxListener(): void {\n if (!this.item.check) return;\n this.checkForm\n .get('check')\n ?.valueChanges.pipe(\n this.takeUntilDestroyed(),\n tap((check) => this.table.checked.emit({ column: this.item.name, check: !!check })),\n )\n .subscribe();\n }\n\n public get indeterminate(): boolean {\n const column = this.table.headerData.find((h: TableHeaderCell) => h.check)?.name;\n const { length } = this.table.data;\n const unchecked = length - this.table.data.filter((item: TableBodyCell) => column && item[column]).length;\n return unchecked > 0 && unchecked < length;\n }\n}\n","@if (item.check) {\n <div class=\"odx-table__check\">\n <div [formGroup]=\"checkForm\">\n <odx-checkbox [checked]=\"checked\" [indeterminate]=\"indeterminate\" formControlName=\"check\" />\n </div>\n </div>\n} @else {\n <div class=\"odx-table__header-cell-title\" (click)=\"sortColumn()\" [class.sortable]=\"item.sortable\">\n {{ item.title }}\n @if (item.sortable) {\n @switch (sortIcon) {\n @case ('unsorted') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <path d=\"m14,5H2v-2h12v2Zm-4,2H2v2h8v-2Zm-4,4H2v2h4v-2Z\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('desc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"11 6 8 3 5 6 7 6 7 13 9 13 9 6 11 6\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('asc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"5 10 8 13 11 10 9 10 9 3 7 3 7 10 5 10\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n }\n }\n </div>\n <ng-content select=\"odx-form-field\" />\n}\n","import { Directive } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * TableCellDirective enhances an HTML td element by providing a role attribute with a value of \"cell\".\n * This directive is used to define a cell within a table.\n */\n@CSSComponent('table__cell')\n@Directive({\n selector: 'td[odx-table-cell]',\n standalone: true,\n host: {\n '[attr.role]': '\"cell\"',\n },\n})\nexport class TableCellDirective {\n public readonly element = injectElement();\n}\n","import { Directive } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * TableRowDirective enhances an HTML tr element by providing a role attribute with a value of \"row\".\n * This directive is used to define a row within a table.\n */\n@CSSComponent('table__row')\n@Directive({\n selector: 'tr[odx-table-row]',\n standalone: true,\n host: {\n '[attr.role]': '\"row\"',\n '[attr.tabindex]': '0',\n },\n})\nexport class TableRowDirective {\n public readonly element = injectElement();\n}\n","export type TableVariant = typeof TableVariant[keyof typeof TableVariant];\n\nexport const TableVariant = {\n DEFAULT: 'default',\n STRIPED: 'striped',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { FormFieldModule } from '@odx/angular/components/form-field';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { debounceTime, tap } from 'rxjs';\nimport { HeaderTitleComponent } from './components/header-title/header-title.component';\nimport { SortStatus, TableBodyCell, TableHeaderCell, TableVariant } from './models';\nimport { TABLE } from './table.config';\n\n/**\n * TableComponent is a dynamic table structure built for displaying complex data sets with sorting, filtering,\n * and checkable functionality. It provides configuration options through various inputs that allow the\n * customization of table behavior and presentation.\n *\n * This component is highly modular, integrating with other components such as `HeaderTitleComponent` for header\n * management, and using Angular forms for dynamic data filtering.\n *\n * @template T - The type of data that the table displays.\n */\n@CSSComponent('table')\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'table[odxTable]',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.role]': '\"table\"',\n },\n templateUrl: './table.component.html',\n imports: [CommonModule, IconComponent, ReactiveFormsModule, FormFieldModule, HeaderTitleComponent],\n providers: [{ provide: TABLE, useExisting: TableComponent }],\n})\nexport class TableComponent<T> implements OnInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n public readonly element = injectElement();\n\n /**\n * Specifies the table variant for CSS styling.\n *\n * @type {TableVariant | null}\n */\n @CSSModifier()\n @Input()\n public variant?: TableVariant | null;\n\n /**\n * Data array of type T that the table displays.\n *\n * @type {T[]}\n * @default []\n */\n @Input()\n public data: T[] = [];\n\n /**\n * Configuration for table header data which controls sorting, filtering, and additional metadata.\n *\n * @type {TableHeaderCell[]}\n * @default []\n */\n @Input()\n public headerData: TableHeaderCell[] = [];\n\n /**\n * FormGroup to handle the dynamic filtering controls, each tied to a header cell that has filtering enabled.\n */\n public form: FormGroup = new FormGroup({});\n\n /**\n * Event emitter for when a column's sorting status changes.\n *\n * @emits {SortStatus}\n */\n @Output()\n public readonly sorted: EventEmitter<SortStatus> = new EventEmitter();\n\n /**\n * Event emitter for when the table's filtering conditions change.\n *\n * @emits {{ [key: string]: string }}\n */\n @Output()\n public readonly filtered: EventEmitter<{ [key: string]: string }> = new EventEmitter();\n\n /**\n * Event emitter for when a checkbox column's checked state changes.\n *\n * @emits {{ column: string; check: boolean }}\n */\n @Output()\n public readonly checked: EventEmitter<{ column: string; check: boolean }> = new EventEmitter();\n\n /**\n * A QueryList of HeaderTitleComponent instances, each corresponding to a header cell in the table.\n *\n * @type {QueryList<HeaderTitleComponent>}\n */\n @ViewChildren(HeaderTitleComponent)\n public headers!: QueryList<HeaderTitleComponent>;\n\n public ngOnInit(): void {\n this.setHeaderData();\n this.headerData.forEach((item) => item.filter && this.form.addControl(item.name, new FormControl('')));\n this.formListener();\n }\n\n /**\n * Clears the sorting status of all headers.\n */\n public clearSort(): void {\n this.headers.forEach((header) => header.clearSortStatus());\n }\n\n private formListener(): void {\n if (Object.keys(this.form.controls).length === 0) return;\n this.form.valueChanges\n .pipe(\n debounceTime(600),\n this.takeUntilDestroyed(),\n tap(() => {\n this.filtered.emit(this.form.value);\n this.headers?.filter((header) => !!header.item.check).forEach((header) => header.check());\n }),\n )\n .subscribe();\n }\n\n private setHeaderData(): void {\n this.headerData = Object.keys(this.data[0] as TableBodyCell).map(\n (key) =>\n this.headerData.find((item) => item.name === key) || {\n name: key,\n title: `${key[0].toUpperCase()}${key.slice(1)}`,\n sortable: false,\n filter: false,\n },\n );\n }\n}\n","<thead class=\"odx-table__head\" role=\"rowgroup\" [formGroup]=\"form\">\n <tr class=\"odx-table__header-row\" role=\"row\">\n @for (item of headerData; track $index) {\n <th class=\"odx-table__header-cell\" role=\"columnheader\" odxHeaderTitle [item]=\"item\">\n @if (item.filter) {\n <odx-form-field>\n <input placeholder=\"Filter\" [formControlName]=\"item.name\" type=\"text\" odxFormFieldControl />\n </odx-form-field>\n }\n </th>\n }\n </tr>\n</thead>\n<tbody class=\"odx-table__body\" role=\"rowgroup\">\n <ng-content select=\"tr\" />\n</tbody>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CheckCellComponent } from './components/check-cell/check-cell.component';\nimport { TableCellDirective } from './directives/table-cell.directive';\nimport { TableRowDirective } from './directives/table-row.directive';\nimport { TableComponent } from './table.component';\n\nconst modules = [TableComponent, TableRowDirective, TableCellDirective, CheckCellComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class TableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIO,MAAM,KAAK,GAAG,IAAI,cAAc,CAAgC,WAAW,CAAC;;ACEnF;;;;AAIG;MAQU,kBAAkB,CAAA;AAP/B,IAAA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CAAC,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;MAM/E,WAAW,CAAA;+GAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YANP,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,CAI9E,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;AAM7E,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EANP,OAAA,EAAA,CAAA,cAAc,EAAyC,kBAAkB,EAI9E,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-table.mjs","sources":["../../../../libs/angular/components/table/src/lib/table.config.ts","../../../../libs/angular/components/table/src/lib/components/check-cell/check-cell.component.ts","../../../../libs/angular/components/table/src/lib/components/check-cell/check-cell.component.html","../../../../libs/angular/components/table/src/lib/models/sort-variant.ts","../../../../libs/angular/components/table/src/lib/components/header-title/header-title.component.ts","../../../../libs/angular/components/table/src/lib/components/header-title/header-title.component.html","../../../../libs/angular/components/table/src/lib/directives/table-cell.directive.ts","../../../../libs/angular/components/table/src/lib/directives/table-row.directive.ts","../../../../libs/angular/components/table/src/lib/models/table-variant.ts","../../../../libs/angular/components/table/src/lib/table.component.ts","../../../../libs/angular/components/table/src/lib/table.component.html","../../../../libs/angular/components/table/src/lib/table.module.ts","../../../../libs/angular/components/table/src/odx-angular-components-table.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { TableBodyCell } from './models';\nimport { TableComponent } from './table.component';\n\nexport const TABLE = new InjectionToken<TableComponent<TableBodyCell>>('odx-table');\n","import { booleanAttribute, Component, EventEmitter, inject, Input, Output } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CheckboxComponent } from '@odx/angular/components/checkbox';\nimport { injectElement } from '@odx/angular/utils';\nimport { TABLE } from '../../table.config';\n\n/**\n * CheckCellComponent provides a checkbox input within a table cell, allowing rows to be selected.\n * It is designed to be used in conjunction with a table component that manages state and header interactions,\n * particularly for functionalities like bulk actions.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'td[odx-table-cell][checked]',\n standalone: true,\n templateUrl: './check-cell.component.html',\n imports: [CheckboxComponent, FormsModule],\n})\nexport class CheckCellComponent {\n private readonly table = inject(TABLE);\n public readonly element = injectElement();\n\n /**\n * Indicates whether the checkbox within the table cell is checked.\n *\n * @type {boolean}\n * @default false\n */\n @Input({ transform: booleanAttribute })\n public checked = false;\n\n /**\n * Event emitter that triggers when the checked state changes. It emits the new state of the checkbox.\n *\n * @emits {boolean}\n */\n @Output() public checkedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /**\n * Updates the checked state of the checkbox and notifies the parent table component, typically to update\n * the state of a header checkbox or other related components.\n * @param {boolean} e - The new checked state.\n */\n public update(e: boolean): void {\n this.checkedChange.emit(e);\n this.table.headers.forEach((header) => header.check && header.check());\n }\n}\n","<odx-checkbox [(ngModel)]=\"checked\" (ngModelChange)=\"update($event)\" />\n","export type TableSortVariant = typeof TableSortVariant[keyof typeof TableSortVariant];\n\nexport const TableSortVariant = {\n UNSORTED: 'unsorted',\n ASC: 'asc',\n DESC: 'desc',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, inject, Input, OnInit, ViewEncapsulation } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { CheckboxComponent } from '@odx/angular/components/checkbox';\nimport { untilDestroyed } from '@odx/angular/utils';\nimport { tap } from 'rxjs';\nimport { ColumnWidth, SortStatus, TableBodyCell, TableHeaderCell } from '../../models';\nimport { TableSortVariant } from '../../models/sort-variant';\nimport { TABLE } from '../../table.config';\n\n/**\n * HeaderTitleComponent provides the functionality for a table header cell, including sorting and checkbox\n * operations if applicable. It handles changes in sort state and emits relevant events to the table component\n * to manage sorting and selection state across the table.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'th[odxHeaderTitle]',\n templateUrl: './header-title.component.html',\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, CheckboxComponent, ReactiveFormsModule],\n})\nexport class HeaderTitleComponent implements OnInit {\n private readonly table = inject(TABLE);\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly takeUntilDestroyed = untilDestroyed();\n private sortStatus: SortStatus = this.getSortStatus;\n\n /**\n * The header cell item containing metadata like column name, sortability, and whether it should include a checkbox.\n *\n * @type {TableHeaderCell}\n */\n @Input()\n public item!: TableHeaderCell;\n\n /**\n * FormGroup to manage the checkbox state within the header.\n *\n * @type {FormGroup}\n */\n public checkForm = new FormGroup({ check: new FormControl(false) });\n\n /**\n * Computes and returns the current sort status of the column associated with this header.\n *\n * @returns {SortStatus}\n */\n public get getSortStatus(): SortStatus {\n return { column: this.item?.name, sortVariant: TableSortVariant.UNSORTED };\n }\n\n /**\n * Returns the icon or indicator for the current sorting status (ascending, descending, unsorted).\n *\n * @returns {TableSortVariant}\n */\n public get sortIcon(): TableSortVariant {\n return this.sortStatus.sortVariant;\n }\n\n /**\n * Toggles the sorting status of the column and informs the table component of the change.\n */\n public sortColumn(): void {\n if (!this.item?.sortable) return;\n switch (this.sortStatus.sortVariant) {\n case TableSortVariant.DESC:\n case TableSortVariant.UNSORTED:\n this.table.clearSort();\n this.sortStatus = { ...this.sortStatus, sortVariant: TableSortVariant.ASC };\n break;\n case TableSortVariant.ASC:\n this.table.clearSort();\n\n this.sortStatus = { ...this.sortStatus, sortVariant: TableSortVariant.DESC };\n break;\n }\n\n this.table.sorted.emit(this.sortStatus);\n }\n\n /**\n * Resets the sort status to unsorted.\n */\n public clearSortStatus(): void {\n this.sortStatus = { column: this.item?.name, sortVariant: TableSortVariant.UNSORTED };\n this.check();\n }\n\n /**\n * Returns the number of selected items in the column, used to determine checkbox state.\n *\n * @returns {number}\n */\n public get selected(): number {\n return this.table.data().filter((d: TableBodyCell) => d[this.item.name]).length;\n }\n\n /**\n * Updates the component view, usually after a state change.\n */\n public check(): void {\n this.cdr.markForCheck();\n }\n\n /**\n * Determines whether the checkbox should be marked as checked.\n *\n * @returns {boolean}\n */\n public get checked(): boolean {\n const column = this.item.check && this.item.name;\n return this.table.data().every((item: TableBodyCell) => column && item[column]);\n }\n\n public ngOnInit(): void {\n this.checkBoxListener();\n }\n\n private checkBoxListener(): void {\n if (!this.item.check) return;\n this.checkForm\n .get('check')\n ?.valueChanges.pipe(\n this.takeUntilDestroyed(),\n tap((check) => this.table.checked.emit({ column: this.item.name, check: !!check })),\n )\n .subscribe();\n }\n\n public get indeterminate(): boolean {\n const column = this.item.check && this.item.name;\n const { length } = this.table.data();\n const unchecked = length - this.table.data().filter((item: TableBodyCell) => column && item[column]).length;\n return unchecked > 0 && unchecked < length;\n }\n\n @HostBinding('style.width')\n protected get columnWidth(): ColumnWidth {\n return this.item.width ?? 'auto';\n }\n}\n","@if (item.check) {\n <div class=\"odx-table__check\">\n <div [formGroup]=\"checkForm\">\n <odx-checkbox [checked]=\"checked\" [indeterminate]=\"indeterminate\" formControlName=\"check\" />\n </div>\n </div>\n} @else {\n <div class=\"odx-table__header-cell-title\" (click)=\"sortColumn()\" [class.sortable]=\"item.sortable\">\n {{ item.title }}\n @if (item.sortable) {\n @switch (sortIcon) {\n @case ('unsorted') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <path d=\"m14,5H2v-2h12v2Zm-4,2H2v2h8v-2Zm-4,4H2v2h4v-2Z\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('desc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"11 6 8 3 5 6 7 6 7 13 9 13 9 6 11 6\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n @case ('asc') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n <polygon points=\"5 10 8 13 11 10 9 10 9 3 7 3 7 10 5 10\" style=\"fill: var(--blue-700)\" />\n </svg>\n }\n }\n }\n </div>\n <ng-content select=\"odx-form-field\" />\n}\n","import { Directive } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * TableCellDirective enhances an HTML td element by providing a role attribute with a value of \"cell\".\n * This directive is used to define a cell within a table.\n */\n@CSSComponent('table__cell')\n@Directive({\n selector: 'td[odx-table-cell]',\n standalone: true,\n host: {\n '[attr.role]': '\"cell\"',\n },\n})\nexport class TableCellDirective {\n public readonly element = injectElement();\n}\n","import { Directive } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * TableRowDirective enhances an HTML tr element by providing a role attribute with a value of \"row\".\n * This directive is used to define a row within a table.\n */\n@CSSComponent('table__row')\n@Directive({\n selector: 'tr[odx-table-row]',\n standalone: true,\n host: {\n '[attr.role]': '\"row\"',\n '[attr.tabindex]': '0',\n },\n})\nexport class TableRowDirective {\n public readonly element = injectElement();\n}\n","export type TableVariant = typeof TableVariant[keyof typeof TableVariant];\n\nexport const TableVariant = {\n DEFAULT: 'default',\n STRIPED: 'striped',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n EventEmitter,\n input,\n Input,\n OnInit,\n Output,\n QueryList,\n ViewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { FormFieldModule } from '@odx/angular/components/form-field';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { debounceTime, tap } from 'rxjs';\nimport { HeaderTitleComponent } from './components/header-title/header-title.component';\nimport { TableCellDirective, TableRowDirective } from './directives';\nimport { SortStatus, TableHeaderCell, TableVariant } from './models';\nimport { TABLE } from './table.config';\n\n/**\n * TableComponent is a dynamic table structure built for displaying complex data sets with sorting, filtering,\n * and checkable functionality. It provides configuration options through various inputs that allow the\n * customization of table behavior and presentation.\n *\n * This component is highly modular, integrating with other components such as `HeaderTitleComponent` for header\n * management, and using Angular forms for dynamic data filtering.\n *\n * @template T - The type of data that the table displays.\n */\n@CSSComponent('table')\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'table[odxTable]',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.role]': '\"table\"',\n },\n templateUrl: './table.component.html',\n imports: [CommonModule, ReactiveFormsModule, FormFieldModule, HeaderTitleComponent, TableRowDirective, TableCellDirective],\n providers: [{ provide: TABLE, useExisting: TableComponent }],\n})\nexport class TableComponent<T> implements OnInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n protected headerColumns = computed(() => {\n const [firstRow] = this.data() ?? [];\n const headerColumns = this.headerData();\n\n if (!(headerColumns && firstRow)) return headerColumns;\n return Object.keys(firstRow).map(\n (key) =>\n headerColumns.find((item) => item.name === key) ?? {\n name: key,\n title: key.charAt(0).toUpperCase() + key.slice(1),\n sortable: false,\n filter: false,\n check: key === 'selected',\n },\n );\n });\n public readonly element = injectElement();\n\n /**\n * Specifies the table variant for CSS styling.\n *\n * @type {TableVariant | null}\n */\n @CSSModifier()\n @Input()\n public variant?: TableVariant | null;\n\n /**\n * Data array of type T that the table displays.\n *\n * @type {Signal<T[]>}\n */\n public data = input.required<T[]>();\n\n /**\n * Message to display when no data is available.\n *\n * @type {Signal<string>}\n */\n public noDataMessage = input<string>('No data available');\n\n /**\n * Configuration for table header data which controls sorting, filtering, and additional metadata.\n *\n * @type {Signal<TableHeaderCell[]>}\n */\n public headerData = input<TableHeaderCell[]>([]);\n\n /**\n * FormGroup to handle the dynamic filtering controls, each tied to a header cell that has filtering enabled.\n */\n public form: FormGroup = new FormGroup({});\n\n /**\n * Event emitter for when a column's sorting status changes.\n *\n * @emits {SortStatus}\n */\n @Output()\n public readonly sorted: EventEmitter<SortStatus> = new EventEmitter();\n\n /**\n * Event emitter for when the table's filtering conditions change.\n *\n * @emits {{ [key: string]: string }}\n */\n @Output()\n public readonly filtered: EventEmitter<{ [key: string]: string }> = new EventEmitter();\n\n /**\n * Event emitter for when a checkbox column's checked state changes.\n *\n * @emits {{ column: string; check: boolean }}\n */\n @Output()\n public readonly checked: EventEmitter<{ column: string; check: boolean }> = new EventEmitter();\n\n /**\n * A QueryList of HeaderTitleComponent instances, each corresponding to a header cell in the table.\n *\n * @type {QueryList<HeaderTitleComponent>}\n */\n @ViewChildren(HeaderTitleComponent)\n public headers!: QueryList<HeaderTitleComponent>;\n\n public ngOnInit(): void {\n this.headerData().forEach((item) => item.filter && this.form.addControl(item.name, new FormControl('')));\n this.formListener();\n }\n\n /**\n * Clears the sorting status of all headers.\n */\n public clearSort(): void {\n this.headers.forEach((header) => header.clearSortStatus());\n }\n\n private formListener(): void {\n if (Object.keys(this.form.controls).length === 0) return;\n this.form.valueChanges\n .pipe(\n debounceTime(600),\n this.takeUntilDestroyed(),\n tap(() => {\n this.filtered.emit(this.form.value);\n this.headers?.filter((header) => !!header.item.check).forEach((header) => header.check());\n }),\n )\n .subscribe();\n }\n}\n","<thead class=\"odx-table__head\" role=\"rowgroup\" [formGroup]=\"form\">\n <tr class=\"odx-table__header-row\" role=\"row\">\n @for (item of headerColumns(); track $index) {\n <th class=\"odx-table__header-cell\" role=\"columnheader\" odxHeaderTitle [item]=\"item\">\n @if (item.filter) {\n <odx-form-field>\n <input placeholder=\"Filter\" [formControlName]=\"item.name\" type=\"text\" odxFormFieldControl />\n </odx-form-field>\n }\n </th>\n }\n </tr>\n</thead>\n<tbody class=\"odx-table__body\" role=\"rowgroup\">\n @if (data() && !!data().length) {\n <ng-content select=\"tr\" />\n } @else {\n <tr odx-table-row class=\"odx-table__no-data-row\">\n <td odx-table-cell [attr.colspan]=\"headerColumns().length\">{{ noDataMessage() }}</td>\n </tr>\n }\n</tbody>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CheckCellComponent } from './components/check-cell/check-cell.component';\nimport { TableCellDirective } from './directives/table-cell.directive';\nimport { TableRowDirective } from './directives/table-row.directive';\nimport { TableComponent } from './table.component';\n\nconst modules = [TableComponent, TableRowDirective, TableCellDirective, CheckCellComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class TableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAIO,MAAM,KAAK,GAAG,IAAI,cAAc,CAAgC,WAAW,CAAC;;ACEnF;;;;AAIG;MAQU,kBAAkB,CAAA;AAP/B,IAAA,WAAA,GAAA;AAQmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;A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AA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YANP,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,CAI9E,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;AAM7E,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EANP,OAAA,EAAA,CAAA,cAAc,EAAyC,kBAAkB,EAI9E,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -305,10 +305,11 @@ let ToastContainerComponent = class ToastContainerComponent {
|
|
|
305
305
|
this.toastService.dismiss(itemRef);
|
|
306
306
|
}
|
|
307
307
|
updatePopverPosition() {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
const el = this.element?.nativeElement;
|
|
309
|
+
if (!el?.isConnected)
|
|
310
|
+
return;
|
|
311
|
+
el.hidePopover?.();
|
|
312
|
+
deferFn(() => el.showPopover?.());
|
|
312
313
|
}
|
|
313
314
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
314
315
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ToastContainerComponent, isStandalone: true, selector: "odx-toast-container", inputs: { maxItems: ["maxItems", "maxItems", numberAttribute] }, outputs: { dismiss: "dismiss" }, ngImport: i0, template: "@for (toastRef of items$ | async; track toastRef.id) {\n <odx-toast\n @slide\n [id]=\"toastRef.id\"\n [title]=\"toastRef.item.title\"\n [description]=\"toastRef.item.description\"\n [descriptionContext]=\"toastRef.item.descriptionContext\"\n [actions]=\"toastRef.item.actions ?? []\"\n [variant]=\"toastRef.item.variant\"\n [options]=\"toastRef.options\"\n (dismiss)=\"onDismiss(toastRef)\"\n />\n}\n@if (hiddenToasts$ | async; as more) {\n <odx-chip class=\"odx-toast-container__counter\">{{ more }} more Notifications</odx-chip>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: ChipComponent, selector: "odx-chip", inputs: ["removable", "size", "variant"], outputs: ["remove"] }, { kind: "component", type: ToastItemComponent, selector: "odx-toast", inputs: ["id", "title", "description", "descriptionContext", "variant", "actions", "options"], outputs: ["dismiss"] }], animations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-toast.mjs","sources":["../../../../libs/angular/components/toast/src/lib/toast.config.ts","../../../../libs/angular/components/toast/src/lib/toast.service.ts","../../../../libs/angular/components/toast/src/lib/models/toast-variant.ts","../../../../libs/angular/components/toast/src/lib/components/toast-item/toast-item.component.ts","../../../../libs/angular/components/toast/src/lib/components/toast-item/toast-item.component.html","../../../../libs/angular/components/toast/src/lib/components/toast-container/toast-container.component.ts","../../../../libs/angular/components/toast/src/lib/components/toast-container/toast-container.component.html","../../../../libs/angular/components/toast/src/lib/toast.module.ts","../../../../libs/angular/components/toast/src/odx-angular-components-toast.ts"],"sourcesContent":["import { createConfigTokens } from '@odx/angular/utils';\nimport { ToastOptions } from './models/toast.options';\n\nexport type ToastConfig = ToastOptions;\n\n/**\n * Utility functions generated by `createConfigTokens` to handle injection and provision of `ToastConfig`.\n * These include tokens and functions to access and provide the default configuration for toasts.\n *\n * `ToastDefaultConfig` provides the default settings for toasts.\n * `ToastConfig` is a token that can be used to inject toast configuration settings.\n * `injectToastConfig` is a function that retrieves the current toast configuration.\n * `provideToastConfig` is a function used to specify a custom configuration for toasts.\n *\n * @example\n * ```ts\n * // In module providers:\n * providers: [\n * provideToastConfig({ // ... global module configuration }),\n * ]\n *\n * // In a component or service:\n * constructor(@Inject(ToastConfig) private readonly config: ToastConfig) {}\n *\n * // Or using the `injectToastConfig` function:\n * @Component({ ... })\n * export class MyComponent {\n * private readonly config = injectToastConfig();\n * }\n * ```\n */\nexport const { ToastDefaultConfig, ToastConfig, injectToastConfig, provideToastConfig } = createConfigTokens('Toast', '@odx/angular/components/toast', {\n dismissable: true,\n duration: 0,\n} as ToastConfig);\n","import { Injectable } from '@angular/core';\nimport { deepmerge } from '@odx/angular/internal';\nimport { getUniqueId, Queue } from '@odx/angular/utils';\nimport { Toast, ToastOptions, ToastRef } from './models';\nimport { injectToastConfig } from './toast.config';\n\n/**\n * ToastService provides a centralized management system for toasts within an application.\n * It handles the creation, updates, and dismissal of toasts based on a FIFO (first-in, first-out) queue.\n * This service integrates custom toast options with default configurations and supports reactive updates through observables.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ToastService {\n private readonly queue = new Queue<ToastRef>();\n private readonly defaultOptions = injectToastConfig();\n\n /**\n * Observable stream of active toasts.\n *\n * @emits {ToastRef[]} The current list of active toasts.\n */\n public readonly toasts$ = this.queue.value$;\n\n /**\n * Observable that emits when any update occurs in the toast queue.\n *\n * @emits {ToastRef[]} The updated list of active toasts.\n */\n public readonly onUpdate$ = this.queue.onUpdate$;\n\n /**\n * Observable that emits when a toast is added.\n *\n * @emits {ToastRef} The newly added toast.\n */\n public readonly onToastAdd$ = this.queue.onAdd$;\n\n /**\n * Observable that emits when a toast is updated.\n *\n * @emits {ToastRef} The updated toast.\n */\n public readonly onToastUpdate$ = this.queue.onUpdate$;\n\n /**\n * Observable that emits when a toast is removed.\n *\n * @emits {ToastRef} The removed toast.\n */\n public readonly onToastRemove$ = this.queue.onRemove$;\n\n /**\n * @deprecated Use `toasts$` instead\n */\n public readonly queue$ = this.toasts$;\n /**\n * @deprecated Use `onToastAdd$` instead\n */\n public readonly onAdd$ = this.onToastAdd$;\n /**\n * @deprecated Use `onToastRemove$` instead\n */\n public readonly onRemove$ = this.onToastRemove$;\n\n /**\n * @deprecated Use `create` instead\n */\n public add(item: Toast, options: Partial<ToastOptions> = {}): ToastRef {\n return this.create(item, options);\n }\n\n /**\n * Creates and queues a new toast based on the provided item and options.\n * Merges given options with default configurations.\n *\n * @param {Toast} item The toast item to create.\n * @param {Partial<ToastOptions>} options Optional additional options for the toast.\n * @returns {ToastRef} The reference to the newly created toast.\n */\n public create(item: Toast, options: Partial<ToastOptions> = {}): ToastRef {\n return this.queue.add({\n id: item.id ?? getUniqueId('odx-toast'),\n item,\n options: deepmerge(this.defaultOptions, options) as ToastOptions,\n });\n }\n\n /**\n * @deprecated Use `dismiss` instead\n */\n public remove(refOrId: ToastRef | ToastRef['id']): ToastRef | null {\n return this.dismiss(refOrId);\n }\n\n /**\n * Dismisses a specific toast identified by a reference or ID.\n *\n * @param {ToastRef | ToastRef['id']} refOrId The reference or ID of the toast to dismiss.\n * @returns {ToastRef | null} The reference to the dismissed toast, or null if not found.\n */\n public dismiss(refOrId: ToastRef | ToastRef['id']): ToastRef | null {\n return this.queue.remove(refOrId);\n }\n\n /**\n * @deprecated Use `dismissAll` instead\n */\n public clear(): void {\n return this.dismissAll();\n }\n\n /**\n * Dismisses all toasts currently being displayed.\n */\n public dismissAll(): void {\n this.queue.clear();\n }\n}\n","export type ToastVariant = (typeof ToastVariant)[keyof typeof ToastVariant];\n\nexport const ToastVariant = {\n DEFAULT: 'default',\n WARNING: 'warning',\n DANGER: 'danger',\n SUCCESS: 'success',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, Type, ViewEncapsulation } from '@angular/core';\nimport { DynamicContent, DynamicTextContent, DynamicViewDirective, GetDynamicViewContext } from '@odx/angular/cdk/dynamic-view';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { tap, timer } from 'rxjs';\nimport { ToastAction, ToastOptions, ToastVariant } from '../../models';\n\n/**\n * A component that represents a single toast notification. This component is responsible for displaying\n * message content, handling toast actions, and managing the automatic dismissal of the toast based on a duration.\n * It supports dynamic content for descriptions and can show an optional set of actions.\n */\n@CSSComponent('toast-item')\n@Component({\n selector: 'odx-toast',\n templateUrl: './toast-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, IconComponent, ButtonComponent, DynamicViewDirective, ActionGroupComponent],\n host: {\n '[attr.id]': 'id',\n },\n})\nexport class ToastItemComponent implements OnInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n\n public readonly element = injectElement();\n\n /**\n * Determines the icon to display based on the toast's variant.\n * Returns a string representing the icon class.\n *\n * @returns {string} - The icon class name.\n * @default 'info'\n */\n public get icon(): string {\n switch (this.variant) {\n case ToastVariant.WARNING:\n return 'warning';\n case ToastVariant.DANGER:\n return 'error';\n case ToastVariant.SUCCESS:\n return 'check';\n default:\n return 'info';\n }\n }\n\n /**\n * Unique identifier for the toast item, typically provided for accessibility purposes.\n *\n * @required\n * @type {string}\n */\n @Input()\n public id!: string;\n\n /**\n * The main title of the toast, displayed prominently.\n *\n * @required\n * @type {DynamicTextContent}\n */\n @Input()\n public title!: DynamicTextContent;\n\n /**\n * Optional detailed description for the toast. This can be plain text or a dynamic template.\n *\n * @type {DynamicContent | null}\n */\n @Input()\n public description?: DynamicContent | null;\n\n /**\n * Context for rendering the dynamic component of the description.\n *\n * @type {GetDynamicViewContext<Type<unknown>> | undefined}\n */\n @Input()\n public descriptionContext?: GetDynamicViewContext<Type<unknown>>;\n\n /**\n * The variant of the toast which influences the icon and styling.\n *\n * @type {ToastVariant | null}\n * @default ToastVariant.DEFAULT\n */\n @CSSModifier()\n @Input()\n public variant?: ToastVariant | null = ToastVariant.DEFAULT;\n\n /**\n * Optional actions related to the toast, such as 'retry' or 'dismiss'.\n *\n * @type {ToastAction[] | undefined}\n */\n @Input()\n public actions?: ToastAction[];\n\n /**\n * Configuration options for the toast, including its duration and dismissal behavior.\n *\n * @required\n * @type {ToastOptions}\n */\n @Input()\n public options!: ToastOptions;\n\n /**\n * Emits an event when the toast is dismissed, either through action or automatically.\n *\n * @emits {void}\n */\n @Output()\n public readonly dismiss = new EventEmitter<void>();\n\n public ngOnInit(): void {\n const { duration } = this.options;\n if (duration > 0) {\n timer(duration)\n .pipe(\n this.takeUntilDestroyed(),\n tap(() => this.onDismiss()),\n )\n .subscribe();\n }\n }\n\n protected onDismiss(): void {\n this.dismiss.next();\n }\n}\n","<div class=\"odx-toast-item__content\">\n <odx-icon [name]=\"icon\" iconSet=\"core\" />\n <div class=\"odx-toast-item__text-content\">\n <p class=\"odx-toast-item__title\">\n <ng-template [odxDynamicView]=\"title\" />\n </p>\n @if (description) {\n <p class=\"odx-toast-item__description\">\n <ng-template [odxDynamicView]=\"description\" [odxDynamicViewContext]=\"descriptionContext\" />\n </p>\n }\n </div>\n @if (options.dismissable) {\n <button odxButton class=\"odx-toast-item__close\" (click)=\"onDismiss()\"><odx-icon name=\"close\" iconSet=\"core\" /></button>\n }\n</div>\n@if (!!actions?.length) {\n <odx-action-group class=\"odx-toast-item__buttons\">\n @for (action of actions; track $index) {\n <button odxButton (click)=\"action.action()\">\n @if (action.leftIcon) {\n <odx-icon [name]=\"action.leftIcon\" iconSet=\"core\" alignLeft />\n }\n <ng-template [odxDynamicView]=\"action.label\" />\n @if (action.rightIcon) {\n <odx-icon [name]=\"action.rightIcon\" iconSet=\"core\" alignRight />\n }\n </button>\n }\n </odx-action-group>\n}\n","import { group, transition, trigger, useAnimation } from '@angular/animations';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Input,\n OnDestroy,\n Output,\n Renderer2,\n ViewEncapsulation,\n inject,\n numberAttribute,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { WindowRef } from '@odx/angular';\nimport { collapse, expand, fadeIn, slideInRight } from '@odx/angular/animations';\nimport { ChipComponent } from '@odx/angular/components/chip';\nimport { HeaderComponent } from '@odx/angular/components/header';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, injectElement, px, setAttribute } from '@odx/angular/utils';\nimport { Observable, map } from 'rxjs';\nimport { ToastRef } from '../../models';\nimport { ToastService } from '../../toast.service';\nimport { ToastItemComponent } from '../toast-item/toast-item.component';\n\nconst TOAST_ANIMATION_DELAY = '125ms';\n\n/**\n * Represents a container component for displaying toast notifications. This component manages and arranges toast messages,\n * handling animations for entering and leaving toasts. It ensures that only a limited number of toasts are shown at the same time,\n * based on the `maxItems` input. The container listens for toast events from the `ToastService` to update its list of toasts dynamically.\n *\n * The component uses a group of animations to slide toasts in and out smoothly and also provides an output for when a toast is dismissed.\n * It's designed to integrate with a single instance per application, ensuring no more than one toast container is initialized.\n */\n@CSSComponent('toast-container')\n@Component({\n selector: 'odx-toast-container',\n templateUrl: './toast-container.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, ChipComponent, ToastItemComponent],\n animations: [\n trigger('slide', [\n transition(\n ':enter',\n group([\n useAnimation(expand),\n useAnimation(fadeIn(), { params: { delay: TOAST_ANIMATION_DELAY } }),\n useAnimation(slideInRight, { params: { delay: TOAST_ANIMATION_DELAY } }),\n ]),\n ),\n transition(':leave', group([useAnimation(collapse)])),\n ]),\n ],\n})\nexport class ToastContainerComponent implements AfterViewInit, OnDestroy {\n private static INITIALIZED = false;\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly windowRef = inject(WindowRef);\n private readonly renderer = inject(Renderer2);\n private readonly toastService = inject(ToastService);\n\n public readonly element = injectElement();\n public readonly items$: Observable<ToastRef[]> = this.toastService.toasts$.pipe(map((refs) => refs.slice(0, this.maxItems)));\n public readonly hiddenToasts$: Observable<number> = this.toastService.toasts$.pipe(map((refs) => Math.max(0, refs.length - this.maxItems)));\n\n /**\n * Maximum number of toasts that can be displayed at once.\n *\n * @type {number}\n * @default 3\n */\n @Input({ transform: numberAttribute })\n public maxItems = 3;\n\n /**\n * Emits an event when a toast is dismissed.\n *\n * @emits {ToastRef} - The toast reference that was dismissed.\n */\n @Output()\n public readonly dismiss = this.toastService.onToastRemove$;\n\n public ngAfterViewInit(): void {\n setAttribute(this.element.nativeElement, 'popover', 'manual');\n if (ToastContainerComponent.INITIALIZED) {\n throw new Error('Only one toast container per application allowed');\n }\n ToastContainerComponent.INITIALIZED = true;\n const headerElement = this.windowRef.queryByComponent(HeaderComponent);\n if (headerElement) {\n this.renderer.setStyle(this.element.nativeElement, 'top', px(headerElement.offsetHeight));\n }\n this.items$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.updatePopverPosition());\n }\n\n public ngOnDestroy(): void {\n ToastContainerComponent.INITIALIZED = false;\n }\n\n protected onDismiss(itemRef: ToastRef): void {\n this.toastService.dismiss(itemRef);\n }\n\n private updatePopverPosition(): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.element.nativeElement as any)?.hidePopover?.();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n deferFn(() => (this.element.nativeElement as any)?.showPopover?.());\n }\n}\n","@for (toastRef of items$ | async; track toastRef.id) {\n <odx-toast\n @slide\n [id]=\"toastRef.id\"\n [title]=\"toastRef.item.title\"\n [description]=\"toastRef.item.description\"\n [descriptionContext]=\"toastRef.item.descriptionContext\"\n [actions]=\"toastRef.item.actions ?? []\"\n [variant]=\"toastRef.item.variant\"\n [options]=\"toastRef.options\"\n (dismiss)=\"onDismiss(toastRef)\"\n />\n}\n@if (hiddenToasts$ | async; as more) {\n <odx-chip class=\"odx-toast-container__counter\">{{ more }} more Notifications</odx-chip>\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ToastContainerComponent, ToastItemComponent } from './components';\n\nconst modules = [ToastContainerComponent, ToastItemComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class ToastModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AACU,MAAA,EAAE,kBAAkB,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,OAAO,EAAE,+BAA+B,EAAE;AACrJ,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,CAAC;AACG,CAAA;;AC5BhB;;;;AAIG;MAIU,YAAY,CAAA;AAHzB,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,KAAK,EAAY,CAAC;QAC9B,IAAc,CAAA,cAAA,GAAG,iBAAiB,EAAE,CAAC;AAEtD;;;;AAIG;AACa,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;AAE5C;;;;AAIG;AACa,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;AAEjD;;;;AAIG;AACa,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;AAEhD;;;;AAIG;AACa,QAAA,IAAA,CAAA,cAAc,G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GAAG,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAAC;MAMjD,WAAW,CAAA;+GAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAAX,WAAW,EAAA,OAAA,EAAA,CANP,uBAAuB,EAAE,kBAAkB,aAIhD,UAAU,EAJL,uBAAuB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAM/C,WAAW,EAAA,OAAA,EAAA,CAHb,OAAO,EACN,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-toast.mjs","sources":["../../../../libs/angular/components/toast/src/lib/toast.config.ts","../../../../libs/angular/components/toast/src/lib/toast.service.ts","../../../../libs/angular/components/toast/src/lib/models/toast-variant.ts","../../../../libs/angular/components/toast/src/lib/components/toast-item/toast-item.component.ts","../../../../libs/angular/components/toast/src/lib/components/toast-item/toast-item.component.html","../../../../libs/angular/components/toast/src/lib/components/toast-container/toast-container.component.ts","../../../../libs/angular/components/toast/src/lib/components/toast-container/toast-container.component.html","../../../../libs/angular/components/toast/src/lib/toast.module.ts","../../../../libs/angular/components/toast/src/odx-angular-components-toast.ts"],"sourcesContent":["import { createConfigTokens } from '@odx/angular/utils';\nimport { ToastOptions } from './models/toast.options';\n\nexport type ToastConfig = ToastOptions;\n\n/**\n * Utility functions generated by `createConfigTokens` to handle injection and provision of `ToastConfig`.\n * These include tokens and functions to access and provide the default configuration for toasts.\n *\n * `ToastDefaultConfig` provides the default settings for toasts.\n * `ToastConfig` is a token that can be used to inject toast configuration settings.\n * `injectToastConfig` is a function that retrieves the current toast configuration.\n * `provideToastConfig` is a function used to specify a custom configuration for toasts.\n *\n * @example\n * ```ts\n * // In module providers:\n * providers: [\n * provideToastConfig({ // ... global module configuration }),\n * ]\n *\n * // In a component or service:\n * constructor(@Inject(ToastConfig) private readonly config: ToastConfig) {}\n *\n * // Or using the `injectToastConfig` function:\n * @Component({ ... })\n * export class MyComponent {\n * private readonly config = injectToastConfig();\n * }\n * ```\n */\nexport const { ToastDefaultConfig, ToastConfig, injectToastConfig, provideToastConfig } = createConfigTokens('Toast', '@odx/angular/components/toast', {\n dismissable: true,\n duration: 0,\n} as ToastConfig);\n","import { Injectable } from '@angular/core';\nimport { deepmerge } from '@odx/angular/internal';\nimport { getUniqueId, Queue } from '@odx/angular/utils';\nimport { Toast, ToastOptions, ToastRef } from './models';\nimport { injectToastConfig } from './toast.config';\n\n/**\n * ToastService provides a centralized management system for toasts within an application.\n * It handles the creation, updates, and dismissal of toasts based on a FIFO (first-in, first-out) queue.\n * This service integrates custom toast options with default configurations and supports reactive updates through observables.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ToastService {\n private readonly queue = new Queue<ToastRef>();\n private readonly defaultOptions = injectToastConfig();\n\n /**\n * Observable stream of active toasts.\n *\n * @emits {ToastRef[]} The current list of active toasts.\n */\n public readonly toasts$ = this.queue.value$;\n\n /**\n * Observable that emits when any update occurs in the toast queue.\n *\n * @emits {ToastRef[]} The updated list of active toasts.\n */\n public readonly onUpdate$ = this.queue.onUpdate$;\n\n /**\n * Observable that emits when a toast is added.\n *\n * @emits {ToastRef} The newly added toast.\n */\n public readonly onToastAdd$ = this.queue.onAdd$;\n\n /**\n * Observable that emits when a toast is updated.\n *\n * @emits {ToastRef} The updated toast.\n */\n public readonly onToastUpdate$ = this.queue.onUpdate$;\n\n /**\n * Observable that emits when a toast is removed.\n *\n * @emits {ToastRef} The removed toast.\n */\n public readonly onToastRemove$ = this.queue.onRemove$;\n\n /**\n * @deprecated Use `toasts$` instead\n */\n public readonly queue$ = this.toasts$;\n /**\n * @deprecated Use `onToastAdd$` instead\n */\n public readonly onAdd$ = this.onToastAdd$;\n /**\n * @deprecated Use `onToastRemove$` instead\n */\n public readonly onRemove$ = this.onToastRemove$;\n\n /**\n * @deprecated Use `create` instead\n */\n public add(item: Toast, options: Partial<ToastOptions> = {}): ToastRef {\n return this.create(item, options);\n }\n\n /**\n * Creates and queues a new toast based on the provided item and options.\n * Merges given options with default configurations.\n *\n * @param {Toast} item The toast item to create.\n * @param {Partial<ToastOptions>} options Optional additional options for the toast.\n * @returns {ToastRef} The reference to the newly created toast.\n */\n public create(item: Toast, options: Partial<ToastOptions> = {}): ToastRef {\n return this.queue.add({\n id: item.id ?? getUniqueId('odx-toast'),\n item,\n options: deepmerge(this.defaultOptions, options) as ToastOptions,\n });\n }\n\n /**\n * @deprecated Use `dismiss` instead\n */\n public remove(refOrId: ToastRef | ToastRef['id']): ToastRef | null {\n return this.dismiss(refOrId);\n }\n\n /**\n * Dismisses a specific toast identified by a reference or ID.\n *\n * @param {ToastRef | ToastRef['id']} refOrId The reference or ID of the toast to dismiss.\n * @returns {ToastRef | null} The reference to the dismissed toast, or null if not found.\n */\n public dismiss(refOrId: ToastRef | ToastRef['id']): ToastRef | null {\n return this.queue.remove(refOrId);\n }\n\n /**\n * @deprecated Use `dismissAll` instead\n */\n public clear(): void {\n return this.dismissAll();\n }\n\n /**\n * Dismisses all toasts currently being displayed.\n */\n public dismissAll(): void {\n this.queue.clear();\n }\n}\n","export type ToastVariant = (typeof ToastVariant)[keyof typeof ToastVariant];\n\nexport const ToastVariant = {\n DEFAULT: 'default',\n WARNING: 'warning',\n DANGER: 'danger',\n SUCCESS: 'success',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, Type, ViewEncapsulation } from '@angular/core';\nimport { DynamicContent, DynamicTextContent, DynamicViewDirective, GetDynamicViewContext } from '@odx/angular/cdk/dynamic-view';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { tap, timer } from 'rxjs';\nimport { ToastAction, ToastOptions, ToastVariant } from '../../models';\n\n/**\n * A component that represents a single toast notification. This component is responsible for displaying\n * message content, handling toast actions, and managing the automatic dismissal of the toast based on a duration.\n * It supports dynamic content for descriptions and can show an optional set of actions.\n */\n@CSSComponent('toast-item')\n@Component({\n selector: 'odx-toast',\n templateUrl: './toast-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, IconComponent, ButtonComponent, DynamicViewDirective, ActionGroupComponent],\n host: {\n '[attr.id]': 'id',\n },\n})\nexport class ToastItemComponent implements OnInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n\n public readonly element = injectElement();\n\n /**\n * Determines the icon to display based on the toast's variant.\n * Returns a string representing the icon class.\n *\n * @returns {string} - The icon class name.\n * @default 'info'\n */\n public get icon(): string {\n switch (this.variant) {\n case ToastVariant.WARNING:\n return 'warning';\n case ToastVariant.DANGER:\n return 'error';\n case ToastVariant.SUCCESS:\n return 'check';\n default:\n return 'info';\n }\n }\n\n /**\n * Unique identifier for the toast item, typically provided for accessibility purposes.\n *\n * @required\n * @type {string}\n */\n @Input()\n public id!: string;\n\n /**\n * The main title of the toast, displayed prominently.\n *\n * @required\n * @type {DynamicTextContent}\n */\n @Input()\n public title!: DynamicTextContent;\n\n /**\n * Optional detailed description for the toast. This can be plain text or a dynamic template.\n *\n * @type {DynamicContent | null}\n */\n @Input()\n public description?: DynamicContent | null;\n\n /**\n * Context for rendering the dynamic component of the description.\n *\n * @type {GetDynamicViewContext<Type<unknown>> | undefined}\n */\n @Input()\n public descriptionContext?: GetDynamicViewContext<Type<unknown>>;\n\n /**\n * The variant of the toast which influences the icon and styling.\n *\n * @type {ToastVariant | null}\n * @default ToastVariant.DEFAULT\n */\n @CSSModifier()\n @Input()\n public variant?: ToastVariant | null = ToastVariant.DEFAULT;\n\n /**\n * Optional actions related to the toast, such as 'retry' or 'dismiss'.\n *\n * @type {ToastAction[] | undefined}\n */\n @Input()\n public actions?: ToastAction[];\n\n /**\n * Configuration options for the toast, including its duration and dismissal behavior.\n *\n * @required\n * @type {ToastOptions}\n */\n @Input()\n public options!: ToastOptions;\n\n /**\n * Emits an event when the toast is dismissed, either through action or automatically.\n *\n * @emits {void}\n */\n @Output()\n public readonly dismiss = new EventEmitter<void>();\n\n public ngOnInit(): void {\n const { duration } = this.options;\n if (duration > 0) {\n timer(duration)\n .pipe(\n this.takeUntilDestroyed(),\n tap(() => this.onDismiss()),\n )\n .subscribe();\n }\n }\n\n protected onDismiss(): void {\n this.dismiss.next();\n }\n}\n","<div class=\"odx-toast-item__content\">\n <odx-icon [name]=\"icon\" iconSet=\"core\" />\n <div class=\"odx-toast-item__text-content\">\n <p class=\"odx-toast-item__title\">\n <ng-template [odxDynamicView]=\"title\" />\n </p>\n @if (description) {\n <p class=\"odx-toast-item__description\">\n <ng-template [odxDynamicView]=\"description\" [odxDynamicViewContext]=\"descriptionContext\" />\n </p>\n }\n </div>\n @if (options.dismissable) {\n <button odxButton class=\"odx-toast-item__close\" (click)=\"onDismiss()\"><odx-icon name=\"close\" iconSet=\"core\" /></button>\n }\n</div>\n@if (!!actions?.length) {\n <odx-action-group class=\"odx-toast-item__buttons\">\n @for (action of actions; track $index) {\n <button odxButton (click)=\"action.action()\">\n @if (action.leftIcon) {\n <odx-icon [name]=\"action.leftIcon\" iconSet=\"core\" alignLeft />\n }\n <ng-template [odxDynamicView]=\"action.label\" />\n @if (action.rightIcon) {\n <odx-icon [name]=\"action.rightIcon\" iconSet=\"core\" alignRight />\n }\n </button>\n }\n </odx-action-group>\n}\n","import { group, transition, trigger, useAnimation } from '@angular/animations';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Input,\n OnDestroy,\n Output,\n Renderer2,\n ViewEncapsulation,\n inject,\n numberAttribute,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { WindowRef } from '@odx/angular';\nimport { collapse, expand, fadeIn, slideInRight } from '@odx/angular/animations';\nimport { ChipComponent } from '@odx/angular/components/chip';\nimport { HeaderComponent } from '@odx/angular/components/header';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, injectElement, px, setAttribute } from '@odx/angular/utils';\nimport { Observable, map } from 'rxjs';\nimport { ToastRef } from '../../models';\nimport { ToastService } from '../../toast.service';\nimport { ToastItemComponent } from '../toast-item/toast-item.component';\n\nconst TOAST_ANIMATION_DELAY = '125ms';\n\n/**\n * Represents a container component for displaying toast notifications. This component manages and arranges toast messages,\n * handling animations for entering and leaving toasts. It ensures that only a limited number of toasts are shown at the same time,\n * based on the `maxItems` input. The container listens for toast events from the `ToastService` to update its list of toasts dynamically.\n *\n * The component uses a group of animations to slide toasts in and out smoothly and also provides an output for when a toast is dismissed.\n * It's designed to integrate with a single instance per application, ensuring no more than one toast container is initialized.\n */\n@CSSComponent('toast-container')\n@Component({\n selector: 'odx-toast-container',\n templateUrl: './toast-container.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, ChipComponent, ToastItemComponent],\n animations: [\n trigger('slide', [\n transition(\n ':enter',\n group([\n useAnimation(expand),\n useAnimation(fadeIn(), { params: { delay: TOAST_ANIMATION_DELAY } }),\n useAnimation(slideInRight, { params: { delay: TOAST_ANIMATION_DELAY } }),\n ]),\n ),\n transition(':leave', group([useAnimation(collapse)])),\n ]),\n ],\n})\nexport class ToastContainerComponent implements AfterViewInit, OnDestroy {\n private static INITIALIZED = false;\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly windowRef = inject(WindowRef);\n private readonly renderer = inject(Renderer2);\n private readonly toastService = inject(ToastService);\n\n public readonly element = injectElement();\n public readonly items$: Observable<ToastRef[]> = this.toastService.toasts$.pipe(map((refs) => refs.slice(0, this.maxItems)));\n public readonly hiddenToasts$: Observable<number> = this.toastService.toasts$.pipe(map((refs) => Math.max(0, refs.length - this.maxItems)));\n\n /**\n * Maximum number of toasts that can be displayed at once.\n *\n * @type {number}\n * @default 3\n */\n @Input({ transform: numberAttribute })\n public maxItems = 3;\n\n /**\n * Emits an event when a toast is dismissed.\n *\n * @emits {ToastRef} - The toast reference that was dismissed.\n */\n @Output()\n public readonly dismiss = this.toastService.onToastRemove$;\n\n public ngAfterViewInit(): void {\n setAttribute(this.element.nativeElement, 'popover', 'manual');\n if (ToastContainerComponent.INITIALIZED) {\n throw new Error('Only one toast container per application allowed');\n }\n ToastContainerComponent.INITIALIZED = true;\n const headerElement = this.windowRef.queryByComponent(HeaderComponent);\n if (headerElement) {\n this.renderer.setStyle(this.element.nativeElement, 'top', px(headerElement.offsetHeight));\n }\n this.items$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.updatePopverPosition());\n }\n\n public ngOnDestroy(): void {\n ToastContainerComponent.INITIALIZED = false;\n }\n\n protected onDismiss(itemRef: ToastRef): void {\n this.toastService.dismiss(itemRef);\n }\n\n private updatePopverPosition(): void {\n const el = this.element?.nativeElement;\n if (!el?.isConnected) return;\n\n el.hidePopover?.();\n deferFn(() => el.showPopover?.());\n }\n}\n","@for (toastRef of items$ | async; track toastRef.id) {\n <odx-toast\n @slide\n [id]=\"toastRef.id\"\n [title]=\"toastRef.item.title\"\n [description]=\"toastRef.item.description\"\n [descriptionContext]=\"toastRef.item.descriptionContext\"\n [actions]=\"toastRef.item.actions ?? []\"\n [variant]=\"toastRef.item.variant\"\n [options]=\"toastRef.options\"\n (dismiss)=\"onDismiss(toastRef)\"\n />\n}\n@if (hiddenToasts$ | async; as more) {\n <odx-chip class=\"odx-toast-container__counter\">{{ more }} more Notifications</odx-chip>\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ToastContainerComponent, ToastItemComponent } from './components';\n\nconst modules = [ToastContainerComponent, ToastItemComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class ToastModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AACU,MAAA,EAAE,kBAAkB,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,OAAO,EAAE,+BAA+B,EAAE;AACrJ,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,CAAC;AACG,CAAA;;AC5BhB;;;;AAIG;MAIU,YAAY,CAAA;AAHzB,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,KAAK,EAAY,CAAC;QAC9B,IAAc,CAAA,cAAA,GAAG,iBAAiB,EAAE,CAAC;AAEtD;;;;AAIG;AACa,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;AAE5C;;;;AAIG;AACa,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;AAEjD;;;;AAIG;AACa,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;AAEhD;;;;AAIG;AACa,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;AAEtD;;;;AAIG;AACa,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;AAEtD;;AAEG;AACa,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;AACtC;;AAEG;AACa,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CAAA,CAAA,EAAA;gHAAX,WAAW,EAAA,OAAA,EAAA,CANP,uBAAuB,EAAE,kBAAkB,aAIhD,UAAU,EAJL,uBAAuB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAM/C,WAAW,EAAA,OAAA,EAAA,CAHb,OAAO,EACN,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odx/angular",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.8.0",
|
|
4
4
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -238,18 +238,18 @@
|
|
|
238
238
|
"esm": "./esm2022/components/chip/odx-angular-components-chip.mjs",
|
|
239
239
|
"default": "./fesm2022/odx-angular-components-chip.mjs"
|
|
240
240
|
},
|
|
241
|
-
"./components/circular-progress": {
|
|
242
|
-
"types": "./components/circular-progress/index.d.ts",
|
|
243
|
-
"esm2022": "./esm2022/components/circular-progress/odx-angular-components-circular-progress.mjs",
|
|
244
|
-
"esm": "./esm2022/components/circular-progress/odx-angular-components-circular-progress.mjs",
|
|
245
|
-
"default": "./fesm2022/odx-angular-components-circular-progress.mjs"
|
|
246
|
-
},
|
|
247
241
|
"./components/content-box": {
|
|
248
242
|
"types": "./components/content-box/index.d.ts",
|
|
249
243
|
"esm2022": "./esm2022/components/content-box/odx-angular-components-content-box.mjs",
|
|
250
244
|
"esm": "./esm2022/components/content-box/odx-angular-components-content-box.mjs",
|
|
251
245
|
"default": "./fesm2022/odx-angular-components-content-box.mjs"
|
|
252
246
|
},
|
|
247
|
+
"./components/circular-progress": {
|
|
248
|
+
"types": "./components/circular-progress/index.d.ts",
|
|
249
|
+
"esm2022": "./esm2022/components/circular-progress/odx-angular-components-circular-progress.mjs",
|
|
250
|
+
"esm": "./esm2022/components/circular-progress/odx-angular-components-circular-progress.mjs",
|
|
251
|
+
"default": "./fesm2022/odx-angular-components-circular-progress.mjs"
|
|
252
|
+
},
|
|
253
253
|
"./components/datepicker": {
|
|
254
254
|
"types": "./components/datepicker/index.d.ts",
|
|
255
255
|
"esm2022": "./esm2022/components/datepicker/odx-angular-components-datepicker.mjs",
|