@koobiq/components 19.8.0 → 19.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/breadcrumbs/breadcrumbs.d.ts +22 -29
- package/breadcrumbs/breadcrumbs.scss +7 -0
- package/button/_button-base.scss +20 -0
- package/button/_button-theme.scss +3 -11
- package/button/button-slots.d.ts +11 -0
- package/button/button.component.d.ts +28 -13
- package/button/button.module.d.ts +3 -2
- package/button/button.scss +0 -11
- package/button/public-api.d.ts +1 -0
- package/code-block/code-block.d.ts +6 -2
- package/core/locales/en-US.d.ts +1 -0
- package/core/locales/es-LA.d.ts +1 -0
- package/core/locales/locale-service.d.ts +5 -0
- package/core/locales/pt-BR.d.ts +1 -0
- package/core/locales/ru-RU.d.ts +1 -0
- package/core/locales/tk-TM.d.ts +1 -0
- package/core/option/_option-theme.scss +5 -14
- package/core/pop-up/constants.d.ts +2 -2
- package/dropdown/_dropdown-theme.scss +4 -8
- package/dropdown/dropdown-trigger.directive.d.ts +11 -0
- package/dropdown/dropdown.component.d.ts +8 -0
- package/dropdown/dropdown.scss +4 -0
- package/fesm2022/koobiq-components-breadcrumbs.mjs +101 -88
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +176 -68
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +27 -2
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +14 -10
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +46 -10
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +8 -8
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +11 -7
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +155 -18
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +1 -1
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +3 -1
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +31 -10
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -2
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +7 -2
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +2 -2
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +6 -6
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/filter-bar/_filter-bar-theme.scss +0 -4
- package/icon/icon-item-tokens.scss +1 -1
- package/navbar/navbar-item.scss +9 -0
- package/notification-center/_notification-center-theme.scss +2 -1
- package/notification-center/notification-center.d.ts +29 -1
- package/notification-center/notification-center.scss +28 -3
- package/notification-center/notification-center.service.d.ts +44 -1
- package/notification-center/notification-item.scss +1 -1
- package/package.json +9 -9
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/schematics/ng-add/index.js +2 -2
- package/tabs/_tabs-common.scss +31 -1
- package/tabs/_tabs-theme.scss +2 -2
- package/tabs/tab-header.component.d.ts +2 -0
- package/tabs/tab-label.directive.d.ts +3 -1
- package/tabs/tab.component.d.ts +2 -0
- package/tree/_tree-theme.scss +4 -0
- package/tree-select/_tree-select-theme.scss +39 -0
|
@@ -17,14 +17,16 @@ import * as i1 from '@koobiq/components/icon';
|
|
|
17
17
|
import { KbqIconModule } from '@koobiq/components/icon';
|
|
18
18
|
import * as i7 from '@koobiq/components/loader-overlay';
|
|
19
19
|
import { KbqLoaderOverlayModule } from '@koobiq/components/loader-overlay';
|
|
20
|
+
import * as i8 from '@koobiq/components/progress-spinner';
|
|
21
|
+
import { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';
|
|
20
22
|
import * as i2 from '@koobiq/components/scrollbar';
|
|
21
23
|
import { KbqScrollbarModule, KbqScrollbar } from '@koobiq/components/scrollbar';
|
|
22
24
|
import * as i6 from '@koobiq/components/tooltip';
|
|
23
25
|
import { KbqTooltipTrigger, KbqToolTipModule } from '@koobiq/components/tooltip';
|
|
24
|
-
import { combineLatestWith, BehaviorSubject, merge } from 'rxjs';
|
|
26
|
+
import { combineLatestWith, BehaviorSubject, merge, Subject } from 'rxjs';
|
|
27
|
+
import { map, filter, auditTime, distinctUntilChanged, pairwise } from 'rxjs/operators';
|
|
25
28
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
26
29
|
import { KbqToastService } from '@koobiq/components/toast';
|
|
27
|
-
import { map, filter } from 'rxjs/operators';
|
|
28
30
|
import * as i3 from '@koobiq/components/title';
|
|
29
31
|
import { KbqTitleModule } from '@koobiq/components/title';
|
|
30
32
|
import { ConfigurableFocusTrapFactory, FocusTrapFactory, FOCUS_TRAP_INERT_STRATEGY } from '@angular/cdk/a11y';
|
|
@@ -82,25 +84,53 @@ class KbqNotificationCenterService {
|
|
|
82
84
|
this.loadingMode = new BehaviorSubject(false);
|
|
83
85
|
/** @docs-private */
|
|
84
86
|
this.errorMode = new BehaviorSubject(false);
|
|
87
|
+
/**
|
|
88
|
+
* Whether the bottom "load more" spinner is shown while the next page is being loaded.
|
|
89
|
+
* Note: this is the infinite-scroll indicator and is distinct from `loadingMode`,
|
|
90
|
+
* which renders the full-screen loader instead of the list.
|
|
91
|
+
*/
|
|
92
|
+
this.loadingMore = new BehaviorSubject(false);
|
|
93
|
+
/**
|
|
94
|
+
* Whether the bottom "load more" error row (with a retry button) is shown.
|
|
95
|
+
* Distinct from `errorMode`, which replaces the whole list with the full-screen error state.
|
|
96
|
+
*/
|
|
97
|
+
this.loadMoreErrorMode = new BehaviorSubject(false);
|
|
98
|
+
/**
|
|
99
|
+
* Whether there are more notifications to load. While `true`, scrolling to the bottom
|
|
100
|
+
* emits `onNextPage`; set it to `false` to stop further infinite-scroll requests.
|
|
101
|
+
*/
|
|
102
|
+
this.hasMore = new BehaviorSubject(true);
|
|
85
103
|
/** @docs-private */
|
|
86
104
|
this.onRead = new BehaviorSubject(null);
|
|
87
105
|
/** Triggers an event when the user presses the reload button. */
|
|
88
106
|
this.onReload = new EventEmitter();
|
|
107
|
+
/** Triggers an event when the list is scrolled to the bottom and the next page should be loaded. */
|
|
108
|
+
this.onNextPage = new EventEmitter();
|
|
109
|
+
/** Triggers an event when an item, a group, or all notifications are removed. */
|
|
110
|
+
this.onDelete = new EventEmitter();
|
|
89
111
|
this.originalItems = new BehaviorSubject([]);
|
|
90
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Grouped notifications, always ordered from newest to oldest: day groups are sorted by date
|
|
114
|
+
* descending, and notifications within each day are sorted by date descending.
|
|
115
|
+
* @docs-private
|
|
116
|
+
*/
|
|
91
117
|
this.groupedItems = this.originalItems.pipe(map((items) => {
|
|
92
118
|
const result = {};
|
|
93
|
-
items.
|
|
94
|
-
|
|
119
|
+
items.forEach((item) => this.makeGroup(item, result));
|
|
120
|
+
const groups = Object.values(result);
|
|
121
|
+
// Newest notifications first within each day.
|
|
122
|
+
groups.forEach((group) => group.items.sort(this.compareByDateDesc));
|
|
123
|
+
// Newest day first.
|
|
124
|
+
return groups.sort((a, b) => this.compareByDateDesc(a.items[0], b.items[0]));
|
|
95
125
|
}));
|
|
96
126
|
/** Emits an event whenever the changes. */
|
|
97
|
-
this.changes = merge(this.silentMode, this.loadingMode, this.errorMode, this.originalItems, this.onRead);
|
|
127
|
+
this.changes = merge(this.silentMode, this.loadingMode, this.errorMode, this.loadingMore, this.loadMoreErrorMode, this.hasMore, this.originalItems, this.onRead);
|
|
98
128
|
this.makeGroup = (item, groups) => {
|
|
99
129
|
const parsedDate = this.adapter.parse(item.date, '');
|
|
100
130
|
const groupId = this.adapter.format(parsedDate, 'yyyyMMdd');
|
|
101
131
|
const groupTitle = this.formatter.absoluteLongDate(parsedDate);
|
|
102
132
|
if (groups[groupId]) {
|
|
103
|
-
groups[groupId].items.
|
|
133
|
+
groups[groupId].items.push(item);
|
|
104
134
|
}
|
|
105
135
|
else {
|
|
106
136
|
groups[groupId] = {
|
|
@@ -109,6 +139,15 @@ class KbqNotificationCenterService {
|
|
|
109
139
|
};
|
|
110
140
|
}
|
|
111
141
|
};
|
|
142
|
+
/** Compares two notifications by date so the newest comes first. */
|
|
143
|
+
this.compareByDateDesc = (a, b) => {
|
|
144
|
+
const parsedA = this.adapter.parse(a.date, '');
|
|
145
|
+
const parsedB = this.adapter.parse(b.date, '');
|
|
146
|
+
if (!parsedA || !parsedB) {
|
|
147
|
+
return 0;
|
|
148
|
+
}
|
|
149
|
+
return this.adapter.compareDateTime(parsedB, parsedA);
|
|
150
|
+
};
|
|
112
151
|
this.toastService?.read.pipe(takeUntilDestroyed()).subscribe((toastData) => {
|
|
113
152
|
const item = this.items.find((item) => item.id === toastData?.id);
|
|
114
153
|
if (item && !item.read) {
|
|
@@ -129,25 +168,52 @@ class KbqNotificationCenterService {
|
|
|
129
168
|
setErrorMode(value) {
|
|
130
169
|
this.errorMode.next(value);
|
|
131
170
|
}
|
|
171
|
+
/** Set the bottom "load more" spinner visibility. */
|
|
172
|
+
setLoadingMore(value) {
|
|
173
|
+
this.loadingMore.next(value);
|
|
174
|
+
}
|
|
175
|
+
/** Set the bottom "load more" error state visibility. */
|
|
176
|
+
setLoadMoreErrorMode(value) {
|
|
177
|
+
this.loadMoreErrorMode.next(value);
|
|
178
|
+
}
|
|
179
|
+
/** Set whether there are more notifications to load via infinite scroll. */
|
|
180
|
+
setHasMore(value) {
|
|
181
|
+
this.hasMore.next(value);
|
|
182
|
+
}
|
|
132
183
|
/** Push new notification item in center */
|
|
133
184
|
push(item) {
|
|
134
185
|
this.setReadState(this.setIds([item]));
|
|
135
186
|
if (!this.silentMode.value) {
|
|
136
|
-
this.toastService.show(item);
|
|
187
|
+
item.toastId = this.toastService.show(item).id;
|
|
137
188
|
}
|
|
138
189
|
return this.originalItems.next([...this.originalItems.value, item]);
|
|
139
190
|
}
|
|
191
|
+
/** Hides the toast that corresponds to the given notification item. */
|
|
192
|
+
hideToast(item) {
|
|
193
|
+
if (item.toastId === undefined) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
this.toastService.hide(item.toastId);
|
|
197
|
+
item.toastId = undefined;
|
|
198
|
+
}
|
|
140
199
|
/** Remove notification item */
|
|
141
200
|
remove(removedItem) {
|
|
201
|
+
this.hideToast(removedItem);
|
|
142
202
|
this.originalItems.next(this.originalItems.value.filter((item) => removedItem !== item));
|
|
203
|
+
this.onDelete.emit({ type: 'item', items: [removedItem] });
|
|
143
204
|
}
|
|
144
205
|
/** Remove group of notification items */
|
|
145
206
|
removeGroup(group) {
|
|
207
|
+
group.items.forEach((item) => this.hideToast(item));
|
|
146
208
|
this.originalItems.next(this.originalItems.value.filter((item) => !group.items.includes(item)));
|
|
209
|
+
this.onDelete.emit({ type: 'group', items: [...group.items] });
|
|
147
210
|
}
|
|
148
211
|
/** Remove all notification items */
|
|
149
212
|
removeAll() {
|
|
213
|
+
const items = this.originalItems.value;
|
|
214
|
+
items.forEach((item) => this.hideToast(item));
|
|
150
215
|
this.originalItems.next([]);
|
|
216
|
+
this.onDelete.emit({ type: 'all', items });
|
|
151
217
|
}
|
|
152
218
|
setIds(items) {
|
|
153
219
|
items.forEach((item) => (item.id = item.id ?? new Date().getTime().toString()));
|
|
@@ -192,6 +258,9 @@ class KbqNotificationItemComponent {
|
|
|
192
258
|
this.readStateDirective.read
|
|
193
259
|
.pipe(filter((value) => value), takeUntilDestroyed())
|
|
194
260
|
.subscribe(() => {
|
|
261
|
+
if (this.data.read) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
195
264
|
this.data.read = true;
|
|
196
265
|
this.service.onRead.next(this.data);
|
|
197
266
|
});
|
|
@@ -200,7 +269,7 @@ class KbqNotificationItemComponent {
|
|
|
200
269
|
return value instanceof TemplateRef;
|
|
201
270
|
}
|
|
202
271
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqNotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
203
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: KbqNotificationItemComponent, isStandalone: true, selector: "kbq-notification-item", inputs: { data: "data" }, host: { properties: { "class": "style" }, classAttribute: "kbq-notification-item" }, hostDirectives: [{ directive: i1$1.KbqReadStateDirective }], ngImport: i0, template: "@if (data.icon) {\n <div class=\"kbq-notification-item__icon-container layout-row layout-align-start-start\">\n @if (data.icon === true) {\n @switch (data.style) {\n @case ('contrast') {\n <i\n kbq-icon=\"kbq-circle-info_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('success') {\n <i\n kbq-icon=\"kbq-circle-check_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('warning') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('error') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n }\n } @else if (isTemplateRef(data.icon)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.icon)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n </div>\n}\n\n<div class=\"kbq-notification-item__container\">\n @if (data.title) {\n <div\n kbq-title\n class=\"kbq-notification-item__title\"\n [class.kbq-notification-item__title_with-content]=\"data.caption || data.content\"\n >\n @if (isTemplateRef(data.title)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.title)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.title)) {\n <p>{{ data.title }}</p>\n }\n\n <div class=\"kbq-notification-item-time\" [class.kbq-notification-item-time_read]=\"data.read\">\n <div class=\"kbq-notification-item-time__value\">{{ time }}</div>\n <i class=\"kbq-notification-item-time__state\" kbq-icon=\"kbq-circle-xs_16\" [color]=\"'theme'\"></i>\n </div>\n </div>\n }\n\n @if (data.caption) {\n <div\n kbq-title\n [class.kbq-notification-item__text]=\"data.title\"\n [class.kbq-notification-item__title]=\"!data.title\"\n >\n @if (isTemplateRef(data.caption)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.caption)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.caption)) {\n {{ data.caption }}\n }\n </div>\n }\n\n @if (data.content) {\n <div class=\"kbq-notification-item__content\">\n @if (isTemplateRef(data.content)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.content)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.content)) {\n {{ data.content }}\n }\n </div>\n }\n\n @if (data.actions) {\n <div class=\"kbq-notification-item__actions\">\n @if (isTemplateRef(data.actions)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.actions)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.actions)) {\n {{ data.actions }}\n }\n </div>\n }\n</div>\n\n<button\n kbq-button\n class=\"kbq-notification-item__remove-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltipArrow]=\"false\"\n [kbqTooltip]=\"center.localeData.remove\"\n [kbqPlacement]=\"popUpPlacements.Right\"\n (click)=\"service.remove(data)\"\n>\n <i kbq-icon=\"kbq-trash_16\"></i>\n</button>\n", styles: [".kbq-notification-item{display:flex;box-sizing:border-box;position:relative;border-radius:var(--kbq-size-s);height:auto;margin-left:var(--kbq-size-m);margin-right:var(--kbq-size-m)}.kbq-notification-item:hover .kbq-notification-item-time{visibility:hidden}.kbq-notification-item:hover .kbq-notification-item__remove-button{display:block}.kbq-notification-item__icon-container{flex-shrink:0;width:var(--kbq-size-l);max-width:var(--kbq-size-l);height:var(--kbq-size-l);max-height:var(--kbq-size-l);margin-right:var(--kbq-size-s);padding-left:var(--kbq-size-m);padding-top:14px}.kbq-notification-item__container{display:flex;flex-direction:column;flex:1;padding-top:var(--kbq-size-m);padding-right:var(--kbq-size-
|
|
272
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: KbqNotificationItemComponent, isStandalone: true, selector: "kbq-notification-item", inputs: { data: "data" }, host: { attributes: { "data-testid": "kbq-notification-item" }, properties: { "class": "style" }, classAttribute: "kbq-notification-item" }, hostDirectives: [{ directive: i1$1.KbqReadStateDirective }], ngImport: i0, template: "@if (data.icon) {\n <div class=\"kbq-notification-item__icon-container layout-row layout-align-start-start\">\n @if (data.icon === true) {\n @switch (data.style) {\n @case ('contrast') {\n <i\n kbq-icon=\"kbq-circle-info_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('success') {\n <i\n kbq-icon=\"kbq-circle-check_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('warning') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('error') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n }\n } @else if (isTemplateRef(data.icon)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.icon)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n </div>\n}\n\n<div class=\"kbq-notification-item__container\">\n @if (data.title) {\n <div\n kbq-title\n class=\"kbq-notification-item__title\"\n [class.kbq-notification-item__title_with-content]=\"data.caption || data.content\"\n >\n @if (isTemplateRef(data.title)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.title)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.title)) {\n <p>{{ data.title }}</p>\n }\n\n <div class=\"kbq-notification-item-time\" [class.kbq-notification-item-time_read]=\"data.read\">\n <div class=\"kbq-notification-item-time__value\">{{ time }}</div>\n <i class=\"kbq-notification-item-time__state\" kbq-icon=\"kbq-circle-xs_16\" [color]=\"'theme'\"></i>\n </div>\n </div>\n }\n\n @if (data.caption) {\n <div\n kbq-title\n [class.kbq-notification-item__text]=\"data.title\"\n [class.kbq-notification-item__title]=\"!data.title\"\n >\n @if (isTemplateRef(data.caption)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.caption)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.caption)) {\n {{ data.caption }}\n }\n </div>\n }\n\n @if (data.content) {\n <div class=\"kbq-notification-item__content\">\n @if (isTemplateRef(data.content)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.content)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.content)) {\n {{ data.content }}\n }\n </div>\n }\n\n @if (data.actions) {\n <div class=\"kbq-notification-item__actions\">\n @if (isTemplateRef(data.actions)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.actions)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.actions)) {\n {{ data.actions }}\n }\n </div>\n }\n</div>\n\n<button\n kbq-button\n class=\"kbq-notification-item__remove-button\"\n data-testid=\"kbq-notification-item-remove-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltipArrow]=\"false\"\n [kbqTooltip]=\"center.localeData.remove\"\n [kbqPlacement]=\"popUpPlacements.Right\"\n (click)=\"service.remove(data)\"\n>\n <i kbq-icon=\"kbq-trash_16\"></i>\n</button>\n", styles: [".kbq-notification-item{display:flex;box-sizing:border-box;position:relative;border-radius:var(--kbq-size-s);height:auto;margin-left:var(--kbq-size-m);margin-right:var(--kbq-size-m)}.kbq-notification-item:hover .kbq-notification-item-time{visibility:hidden}.kbq-notification-item:hover .kbq-notification-item__remove-button{display:block}.kbq-notification-item__icon-container{flex-shrink:0;width:var(--kbq-size-l);max-width:var(--kbq-size-l);height:var(--kbq-size-l);max-height:var(--kbq-size-l);margin-right:var(--kbq-size-s);padding-left:var(--kbq-size-m);padding-top:14px}.kbq-notification-item__container{display:flex;flex-direction:column;flex:1;padding-top:var(--kbq-size-m);padding-right:var(--kbq-size-s);padding-bottom:var(--kbq-size-m);overflow:hidden}.kbq-notification-item__title{display:flex;flex-direction:row;justify-content:space-between;overflow:hidden;text-overflow:ellipsis}.kbq-notification-item__title>p{margin:0;overflow:hidden;text-overflow:ellipsis}.kbq-notification-item__title.kbq-notification-item__title_with-content{margin-bottom:var(--kbq-size-xxs)}.kbq-notification-item-time{display:flex;flex-direction:row;height:var(--kbq-size-xl);align-items:center;padding-left:22px}.kbq-notification-item-time .kbq-notification-item-time__value{margin-right:var(--kbq-size-3xs)}.kbq-notification-item-time.kbq-notification-item-time_read .kbq-notification-item-time__state{display:none}.kbq-notification-item__text{display:flex;flex:1;align-items:center}.kbq-notification-item__content{display:flex;flex-direction:column;white-space:pre-wrap}.kbq-notification-item__actions{display:flex;padding-top:var(--kbq-size-s);gap:var(--kbq-size-m)}.kbq-notification-item__remove-button{position:absolute;top:var(--kbq-size-xs);right:var(--kbq-size-s);display:none}.kbq-notification-item{background:var(--kbq-background-card)}.kbq-notification-item .kbq-notification-item__title{color:var(--kbq-foreground-contrast)}.kbq-notification-item .kbq-notification-item__text,.kbq-notification-item .kbq-notification-item-time.kbq-notification-item-time_read .kbq-notification-item-time__value{color:var(--kbq-foreground-contrast-secondary)}.kbq-notification-item:hover{background:var(--kbq-states-background-transparent-hover)}.kbq-notification-item{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-notification-item .kbq-notification-item-time{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i3.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i3$1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i3$1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["forDisabledComponent", "ignoreTooltipPointerEvents", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
204
273
|
}
|
|
205
274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqNotificationItemComponent, decorators: [{
|
|
206
275
|
type: Component,
|
|
@@ -213,13 +282,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
213
282
|
KbqTooltipTrigger
|
|
214
283
|
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
215
284
|
class: 'kbq-notification-item',
|
|
216
|
-
'[class]': 'style'
|
|
217
|
-
|
|
285
|
+
'[class]': 'style',
|
|
286
|
+
'data-testid': 'kbq-notification-item'
|
|
287
|
+
}, hostDirectives: [KbqReadStateDirective], template: "@if (data.icon) {\n <div class=\"kbq-notification-item__icon-container layout-row layout-align-start-start\">\n @if (data.icon === true) {\n @switch (data.style) {\n @case ('contrast') {\n <i\n kbq-icon=\"kbq-circle-info_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('success') {\n <i\n kbq-icon=\"kbq-circle-check_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('warning') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('error') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n }\n } @else if (isTemplateRef(data.icon)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.icon)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n </div>\n}\n\n<div class=\"kbq-notification-item__container\">\n @if (data.title) {\n <div\n kbq-title\n class=\"kbq-notification-item__title\"\n [class.kbq-notification-item__title_with-content]=\"data.caption || data.content\"\n >\n @if (isTemplateRef(data.title)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.title)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.title)) {\n <p>{{ data.title }}</p>\n }\n\n <div class=\"kbq-notification-item-time\" [class.kbq-notification-item-time_read]=\"data.read\">\n <div class=\"kbq-notification-item-time__value\">{{ time }}</div>\n <i class=\"kbq-notification-item-time__state\" kbq-icon=\"kbq-circle-xs_16\" [color]=\"'theme'\"></i>\n </div>\n </div>\n }\n\n @if (data.caption) {\n <div\n kbq-title\n [class.kbq-notification-item__text]=\"data.title\"\n [class.kbq-notification-item__title]=\"!data.title\"\n >\n @if (isTemplateRef(data.caption)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.caption)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.caption)) {\n {{ data.caption }}\n }\n </div>\n }\n\n @if (data.content) {\n <div class=\"kbq-notification-item__content\">\n @if (isTemplateRef(data.content)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.content)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.content)) {\n {{ data.content }}\n }\n </div>\n }\n\n @if (data.actions) {\n <div class=\"kbq-notification-item__actions\">\n @if (isTemplateRef(data.actions)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.actions)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.actions)) {\n {{ data.actions }}\n }\n </div>\n }\n</div>\n\n<button\n kbq-button\n class=\"kbq-notification-item__remove-button\"\n data-testid=\"kbq-notification-item-remove-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltipArrow]=\"false\"\n [kbqTooltip]=\"center.localeData.remove\"\n [kbqPlacement]=\"popUpPlacements.Right\"\n (click)=\"service.remove(data)\"\n>\n <i kbq-icon=\"kbq-trash_16\"></i>\n</button>\n", styles: [".kbq-notification-item{display:flex;box-sizing:border-box;position:relative;border-radius:var(--kbq-size-s);height:auto;margin-left:var(--kbq-size-m);margin-right:var(--kbq-size-m)}.kbq-notification-item:hover .kbq-notification-item-time{visibility:hidden}.kbq-notification-item:hover .kbq-notification-item__remove-button{display:block}.kbq-notification-item__icon-container{flex-shrink:0;width:var(--kbq-size-l);max-width:var(--kbq-size-l);height:var(--kbq-size-l);max-height:var(--kbq-size-l);margin-right:var(--kbq-size-s);padding-left:var(--kbq-size-m);padding-top:14px}.kbq-notification-item__container{display:flex;flex-direction:column;flex:1;padding-top:var(--kbq-size-m);padding-right:var(--kbq-size-s);padding-bottom:var(--kbq-size-m);overflow:hidden}.kbq-notification-item__title{display:flex;flex-direction:row;justify-content:space-between;overflow:hidden;text-overflow:ellipsis}.kbq-notification-item__title>p{margin:0;overflow:hidden;text-overflow:ellipsis}.kbq-notification-item__title.kbq-notification-item__title_with-content{margin-bottom:var(--kbq-size-xxs)}.kbq-notification-item-time{display:flex;flex-direction:row;height:var(--kbq-size-xl);align-items:center;padding-left:22px}.kbq-notification-item-time .kbq-notification-item-time__value{margin-right:var(--kbq-size-3xs)}.kbq-notification-item-time.kbq-notification-item-time_read .kbq-notification-item-time__state{display:none}.kbq-notification-item__text{display:flex;flex:1;align-items:center}.kbq-notification-item__content{display:flex;flex-direction:column;white-space:pre-wrap}.kbq-notification-item__actions{display:flex;padding-top:var(--kbq-size-s);gap:var(--kbq-size-m)}.kbq-notification-item__remove-button{position:absolute;top:var(--kbq-size-xs);right:var(--kbq-size-s);display:none}.kbq-notification-item{background:var(--kbq-background-card)}.kbq-notification-item .kbq-notification-item__title{color:var(--kbq-foreground-contrast)}.kbq-notification-item .kbq-notification-item__text,.kbq-notification-item .kbq-notification-item-time.kbq-notification-item-time_read .kbq-notification-item-time__value{color:var(--kbq-foreground-contrast-secondary)}.kbq-notification-item:hover{background:var(--kbq-states-background-transparent-hover)}.kbq-notification-item{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-notification-item .kbq-notification-item-time{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"] }]
|
|
218
288
|
}], ctorParameters: () => [], propDecorators: { data: [{
|
|
219
289
|
type: Input
|
|
220
290
|
}] } });
|
|
221
291
|
|
|
222
292
|
const defaultOffsetX = 8;
|
|
293
|
+
/** Rate-limit window (ms) for the scroll-to-bottom check that drives infinite scroll. */
|
|
294
|
+
const SCROLLED_TO_BOTTOM_AUDIT_TIME = 100;
|
|
223
295
|
/**default configuration of notification-center */
|
|
224
296
|
const KBQ_NOTIFICATION_CENTER_DEFAULT_CONFIGURATION = ruRULocaleData.notificationCenter;
|
|
225
297
|
/** Injection Token for providing configuration of notification-center */
|
|
@@ -265,6 +337,11 @@ class KbqNotificationCenterComponent extends KbqPopUp {
|
|
|
265
337
|
this.isTopOverflow = false;
|
|
266
338
|
/** @docs-private */
|
|
267
339
|
this.isBottomOverflow = false;
|
|
340
|
+
/** Distance in pixels from the bottom of the list at which the next page is requested.
|
|
341
|
+
* @docs-private */
|
|
342
|
+
this.scrolledToBottomOffset = 0;
|
|
343
|
+
/** Emits on every scroll of the list container; drives the scroll-to-bottom check. */
|
|
344
|
+
this.scroll$ = new Subject();
|
|
268
345
|
/** @docs-private */
|
|
269
346
|
this.prefix = 'kbq-notification-center';
|
|
270
347
|
/** @docs-private */
|
|
@@ -286,15 +363,68 @@ class KbqNotificationCenterComponent extends KbqPopUp {
|
|
|
286
363
|
}
|
|
287
364
|
}
|
|
288
365
|
ngAfterViewInit() {
|
|
289
|
-
this.visibleChange.subscribe((state) => {
|
|
366
|
+
this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((state) => {
|
|
290
367
|
if (this.offset !== null && state) {
|
|
291
368
|
applyPopupMargins(this.renderer, this.elementRef.nativeElement, this.prefix, `${this.offset.toString()}px`);
|
|
292
369
|
}
|
|
293
370
|
this.setStickPosition();
|
|
294
371
|
});
|
|
295
|
-
this.service.changes
|
|
372
|
+
this.service.changes
|
|
373
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
374
|
+
.subscribe(() => this.changeDetectorRef.markForCheck());
|
|
296
375
|
this.switcher.focus();
|
|
297
376
|
setTimeout(this.checkOverflow);
|
|
377
|
+
this.subscribeToScrolledToBottom();
|
|
378
|
+
}
|
|
379
|
+
/** Handles the list container scroll: updates overflow shadows and feeds the scroll-to-bottom check.
|
|
380
|
+
* @docs-private */
|
|
381
|
+
onContainerScroll() {
|
|
382
|
+
this.checkOverflow();
|
|
383
|
+
this.scroll$.next();
|
|
384
|
+
}
|
|
385
|
+
/** Retries loading the next page from the bottom error row.
|
|
386
|
+
* @docs-private */
|
|
387
|
+
retryLoadMore() {
|
|
388
|
+
// The retry button is about to unmount; keep keyboard focus inside the panel instead of
|
|
389
|
+
// letting it fall back to <body>.
|
|
390
|
+
this.focusScrollContainer();
|
|
391
|
+
// Clear the bottom error state here so the spinner and the error row can never be shown at
|
|
392
|
+
// the same time, regardless of what the consumer's `onNextPage` handler does.
|
|
393
|
+
this.service.setLoadMoreErrorMode(false);
|
|
394
|
+
this.service.onNextPage.emit();
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Requests the next page (via `service.onNextPage`) once the list is scrolled to within
|
|
398
|
+
* `scrolledToBottomOffset` pixels of the bottom. Two triggers feed it: the user scrolling, and a
|
|
399
|
+
* page finishing loading. The latter keeps paging when a freshly loaded page is too short to
|
|
400
|
+
* overflow the viewport — otherwise no further scroll event would fire and pagination would
|
|
401
|
+
* stall. Suppressed while a load is in flight, errored, or when there is nothing more to load.
|
|
402
|
+
*/
|
|
403
|
+
subscribeToScrolledToBottom() {
|
|
404
|
+
const scrolledToBottom$ = this.scroll$.pipe(auditTime(SCROLLED_TO_BOTTOM_AUDIT_TIME), map(() => this.isScrolledToBottom()), distinctUntilChanged(), filter(Boolean));
|
|
405
|
+
// Re-measure once a load completes (and the appended items have rendered): if the list still
|
|
406
|
+
// sits at the bottom, continue paging instead of waiting for a scroll event that never comes.
|
|
407
|
+
const loadCompleted$ = this.service.loadingMore.pipe(distinctUntilChanged(), pairwise(), filter(([wasLoading, isLoading]) => wasLoading && !isLoading), auditTime(SCROLLED_TO_BOTTOM_AUDIT_TIME), filter(() => this.isScrolledToBottom()));
|
|
408
|
+
merge(scrolledToBottom$, loadCompleted$)
|
|
409
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
410
|
+
.subscribe(() => this.requestNextPage());
|
|
411
|
+
}
|
|
412
|
+
/** Whether the list is scrolled to within `scrolledToBottomOffset` pixels of the bottom. */
|
|
413
|
+
isScrolledToBottom() {
|
|
414
|
+
const { scrollTop, clientHeight, scrollHeight } = this.scrollContainer.contentElement.nativeElement;
|
|
415
|
+
return scrollHeight - scrollTop - clientHeight <= this.scrolledToBottomOffset;
|
|
416
|
+
}
|
|
417
|
+
/** Emits `onNextPage` unless a load is already in flight, errored, or there is nothing more to load. */
|
|
418
|
+
requestNextPage() {
|
|
419
|
+
if (this.service.hasMore.value && !this.service.loadingMore.value && !this.service.loadMoreErrorMode.value) {
|
|
420
|
+
this.service.onNextPage.emit();
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
focusScrollContainer() {
|
|
424
|
+
const element = this.scrollContainer.contentElement.nativeElement;
|
|
425
|
+
// tabindex -1 keeps the container out of the Tab order while allowing programmatic focus.
|
|
426
|
+
element.setAttribute('tabindex', '-1');
|
|
427
|
+
element.focus({ preventScroll: true });
|
|
298
428
|
}
|
|
299
429
|
/** @docs-private */
|
|
300
430
|
updateClassMap(placement, customClass, size) {
|
|
@@ -312,7 +442,7 @@ class KbqNotificationCenterComponent extends KbqPopUp {
|
|
|
312
442
|
this.configuration = KBQ_NOTIFICATION_CENTER_DEFAULT_CONFIGURATION;
|
|
313
443
|
}
|
|
314
444
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqNotificationCenterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
315
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: KbqNotificationCenterComponent, isStandalone: true, selector: "kbq-notification-center", host: { listeners: { "keydown.escape": "escapeHandler()" }, properties: { "class.kbq-notification-center_popover": "popoverMode" }, classAttribute: "kbq-notification-center" }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: KbqScrollbar, descendants: true }, { propertyName: "switcher", first: true, predicate: ["notificationSwitcher"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"kbq-notification-center-header\">\n <div class=\"kbq-notification-center-title\">\n <div class=\"kbq-notification-center-title__text\">{{ localeData.notifications }}</div>\n <button\n #notificationSwitcher\n #dropdownTrigger=\"kbqDropdownTrigger\"\n kbq-button\n class=\"kbq-notification-center-title__button\"\n [kbqDropdownTriggerFor]=\"notificationSwitcherDropdown\"\n [kbqTooltip]=\"service.silentMode.value ? localeData.doNotDisturb : localeData.showPopUpNotifications\"\n [kbqTooltipArrow]=\"false\"\n [kbqTooltipOffset]=\"4\"\n [kbqTooltipDisabled]=\"dropdownTrigger.opened\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n >\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-bell-slash_16' : 'kbq-bell_16' }}\"></i>\n </button>\n </div>\n <div class=\"kbq-notification-center-toolbar\">\n @if (!service.isEmpty) {\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"service.removeAll()\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n\n <kbq-divider [vertical]=\"true\" />\n }\n\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"hide(0)\"\n >\n <i kbq-icon=\"kbq-xmark_16\"></i>\n </button>\n </div>\n</div>\n\n<div\n kbq-scrollbar\n class=\"kbq-notification-center-container\"\n [class.kbq-notification-center_bottom-overflow]=\"isBottomOverflow\"\n (onScroll)=\"checkOverflow()\"\n>\n @if (!service.errorMode.value) {\n @if (!service.loadingMode.value) {\n @for (group of service.groupedItems | async; track group) {\n <div\n class=\"kbq-notification-center-sub-header\"\n [class.kbq-notification-center_top-overflow]=\"isTopOverflow\"\n >\n <div class=\"kbq-notification-center-sub-header__date\">{{ group.title }}</div>\n\n <button\n kbq-button\n class=\"kbq-notification-center-sub-header__button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeData.remove\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"service.removeGroup(group)\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n </div>\n\n @for (item of group.items; track item) {\n <kbq-notification-item [data]=\"item\" />\n }\n } @empty {\n <div class=\"kbq-notification-center-empty-container\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'contrast-fade'\"></i>\n {{ localeData.noNotifications }}\n </div>\n }\n } @else {\n <kbq-loader-overlay [transparent]=\"true\" />\n }\n } @else {\n <div class=\"kbq-notification-center-error-container\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'error'\" [fade]=\"true\"></i>\n {{ localeData.failedToLoadNotifications }}\n <button kbq-button [kbqStyle]=\"'transparent'\" [color]=\"'theme'\" (click)=\"service.onReload.emit()\">\n {{ localeData.repeat }}\n </button>\n </div>\n }\n</div>\n\n<kbq-dropdown #notificationSwitcherDropdown=\"kbqDropdown\">\n <button kbq-dropdown-item (click)=\"service.setSilentMode(false)\">\n <i kbq-icon=\"{{ !service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.showPopUpNotifications }}\n </button>\n <button kbq-dropdown-item (click)=\"service.setSilentMode(true)\">\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.doNotDisturb }}\n </button>\n</kbq-dropdown>\n", styles: [".kbq-notification-center{position:relative;display:flex;flex-direction:column;width:400px;height:100vh;box-sizing:border-box;z-index:1}.kbq-notification-center:not(.kbq-notification-center_popover){border-right:1px solid;border-left:1px solid}.kbq-notification-center.kbq-notification-center_popover{margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);border-radius:var(--kbq-size-xs);height:calc(100vh - 48px);box-shadow:var(--kbq-shadow-popup)}.kbq-notification-center-header{display:flex;flex-direction:row;justify-content:space-between;padding:var(--kbq-size-xl) var(--kbq-size-xl) var(--kbq-size-xxs) var(--kbq-size-xxl)}.kbq-notification-center-title{display:flex;flex-direction:row;align-items:center;gap:var(--kbq-size-xxs)}.kbq-notification-center-toolbar{display:flex;flex-direction:row;align-items:center}.kbq-notification-center-toolbar .kbq-divider.kbq-divider_vertical{height:var(--kbq-size-m)}.kbq-notification-center-sub-header{position:sticky;top:0;z-index:100;display:flex;flex-direction:row;padding:var(--kbq-size-s) var(--kbq-size-xxl)}.kbq-notification-center-sub-header .kbq-notification-center-sub-header__button{position:absolute;top:0;right:var(--kbq-size-xl);display:none}.kbq-notification-center-sub-header:hover .kbq-notification-center-sub-header__button{display:flex}.kbq-notification-center-sub-header:first-child.kbq-notification-center_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-container{height:100%;border-radius:inherit;padding-bottom:var(--kbq-size-m)}.kbq-notification-center-container .kbq-loader-overlay_parent{border-radius:inherit}.kbq-notification-center-container.kbq-notification-center_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-empty-container,.kbq-notification-center-error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.kbq-notification-center-empty-container .kbq-icon,.kbq-notification-center-error-container .kbq-icon{margin-bottom:var(--kbq-size-xl)}.kbq-notification-center-empty-container .kbq-button,.kbq-notification-center-error-container .kbq-button{margin-top:var(--kbq-size-s)}.kbq-notification-center,.kbq-notification-center-sub-header{background:var(--kbq-background-card)}.kbq-notification-center:not(.kbq-notification-center_popover),.kbq-notification-center-sub-header:not(.kbq-notification-center_popover){border-right-color:var(--kbq-line-contrast-less);border-left-color:var(--kbq-line-contrast-less)}.kbq-notification-center-error-container{color:var(--kbq-foreground-error)}.kbq-notification-center{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}.kbq-notification-center-title__text{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "component", type: i1.KbqIconItem, selector: "[kbq-icon-item]", inputs: ["kbq-icon-item", "fade", "big"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "ngmodule", type: KbqScrollbarModule }, { kind: "component", type: i2.KbqScrollbar, selector: "kbq-scrollbar, [kbq-scrollbar]", inputs: ["initializationTarget", "options", "events", "defer"], outputs: ["onInitialize", "onUpdate", "onDestroy", "onScroll"], exportAs: ["kbqScrollbar"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i3$1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i3$1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: i3$1.KbqButtonDropdownTrigger, selector: "[kbq-button][kbqDropdownTriggerFor]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "component", type: i4.KbqDivider, selector: "kbq-divider", inputs: ["vertical", "inset", "paddings"] }, { kind: "ngmodule", type: KbqDropdownModule }, { kind: "component", type: i5.KbqDropdown, selector: "kbq-dropdown", inputs: ["navigationWithWrap", "xPosition", "yPosition", "overlapTriggerY", "overlapTriggerX", "hasBackdrop", "class", "backdropClass"], outputs: ["closed"], exportAs: ["kbqDropdown"] }, { kind: "component", type: i5.KbqDropdownItem, selector: "kbq-dropdown-item, [kbq-dropdown-item]", inputs: ["disabled"], exportAs: ["kbqDropdownItem"] }, { kind: "directive", type: i5.KbqDropdownTrigger, selector: "[kbqDropdownTriggerFor]", inputs: ["offsetX", "offsetY", "kbqDropdownTriggerData", "openByArrowDown", "demoteOverlay", "kbqDropdownTriggerRestoreFocus", "kbqDropdownTriggerFor"], outputs: ["dropdownOpened", "dropdownClosed"], exportAs: ["kbqDropdownTrigger"] }, { kind: "ngmodule", type: KbqToolTipModule }, { kind: "directive", type: i6.KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["forDisabledComponent", "ignoreTooltipPointerEvents", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: KbqNotificationItemComponent, selector: "kbq-notification-item", inputs: ["data"] }, { kind: "ngmodule", type: KbqLoaderOverlayModule }, { kind: "component", type: i7.KbqLoaderOverlay, selector: "kbq-loader-overlay", inputs: ["text", "caption", "size", "transparent", "card"] }], animations: [KbqNotificationCenterAnimations.state], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
445
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: KbqNotificationCenterComponent, isStandalone: true, selector: "kbq-notification-center", host: { listeners: { "keydown.escape": "escapeHandler()" }, properties: { "class.kbq-notification-center_popover": "popoverMode" }, classAttribute: "kbq-notification-center" }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: KbqScrollbar, descendants: true }, { propertyName: "switcher", first: true, predicate: ["notificationSwitcher"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"kbq-notification-center-header\">\n <div class=\"kbq-notification-center-title\">\n <div class=\"kbq-notification-center-title__text\">{{ localeData.notifications }}</div>\n <button\n #notificationSwitcher\n #dropdownTrigger=\"kbqDropdownTrigger\"\n kbq-button\n class=\"kbq-notification-center-title__button\"\n data-testid=\"kbq-notification-center-silent-mode-toggle\"\n [kbqDropdownTriggerFor]=\"notificationSwitcherDropdown\"\n [kbqTooltip]=\"service.silentMode.value ? localeData.doNotDisturb : localeData.showPopUpNotifications\"\n [kbqTooltipArrow]=\"false\"\n [kbqPlacement]=\"'right'\"\n [kbqTooltipOffset]=\"4\"\n [kbqTooltipDisabled]=\"dropdownTrigger.opened\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n >\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-bell-slash_16' : 'kbq-bell_16' }}\"></i>\n </button>\n </div>\n <div class=\"kbq-notification-center-toolbar\">\n @if (!service.isEmpty) {\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n data-testid=\"kbq-notification-center-remove-all-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"service.removeAll()\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n\n <kbq-divider [vertical]=\"true\" />\n }\n\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n data-testid=\"kbq-notification-center-close-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"hide(0)\"\n >\n <i kbq-icon=\"kbq-xmark_16\"></i>\n </button>\n </div>\n</div>\n\n<div\n kbq-scrollbar\n class=\"kbq-notification-center-container\"\n data-testid=\"kbq-notification-center-container\"\n [class.kbq-notification-center_bottom-overflow]=\"isBottomOverflow\"\n (onScroll)=\"onContainerScroll()\"\n>\n @if (!service.errorMode.value) {\n @if (!service.loadingMode.value) {\n @for (group of service.groupedItems | async; track group) {\n <div\n class=\"kbq-notification-center-sub-header\"\n data-testid=\"kbq-notification-center-group\"\n [class.kbq-notification-center_top-overflow]=\"isTopOverflow\"\n >\n <div class=\"kbq-notification-center-sub-header__date\">{{ group.title }}</div>\n\n <button\n kbq-button\n class=\"kbq-notification-center-sub-header__button\"\n data-testid=\"kbq-notification-center-remove-group-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeData.remove\"\n [kbqPlacement]=\"'right'\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"service.removeGroup(group)\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n </div>\n\n @for (item of group.items; track item) {\n <kbq-notification-item [data]=\"item\" />\n }\n } @empty {\n @if (!service.loadingMore.value) {\n <div class=\"kbq-notification-center-empty-container\" data-testid=\"kbq-notification-center-empty\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'contrast-fade'\"></i>\n {{ localeData.noNotifications }}\n </div>\n }\n }\n\n @if (service.loadingMore.value) {\n <div\n class=\"kbq-notification-center-load-more\"\n data-testid=\"kbq-notification-center-load-more\"\n role=\"status\"\n [attr.aria-label]=\"localeData.loadingMore\"\n >\n <kbq-progress-spinner [mode]=\"'indeterminate'\" [size]=\"'compact'\" />\n </div>\n }\n\n @if (service.loadMoreErrorMode.value) {\n <div\n class=\"kbq-notification-center-load-more-error\"\n data-testid=\"kbq-notification-center-load-more-error\"\n role=\"alert\"\n >\n {{ localeData.failedToLoadNotifications }}\n <button\n kbq-button\n data-testid=\"kbq-notification-center-load-more-retry-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'theme'\"\n (click)=\"retryLoadMore()\"\n >\n {{ localeData.repeat }}\n </button>\n </div>\n }\n } @else {\n <kbq-loader-overlay data-testid=\"kbq-notification-center-loader\" [transparent]=\"true\" />\n }\n } @else {\n <div class=\"kbq-notification-center-error-container\" data-testid=\"kbq-notification-center-error\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'error'\" [fade]=\"true\"></i>\n {{ localeData.failedToLoadNotifications }}\n <button\n kbq-button\n data-testid=\"kbq-notification-center-reload-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'theme'\"\n (click)=\"service.onReload.emit()\"\n >\n {{ localeData.repeat }}\n </button>\n </div>\n }\n</div>\n\n<kbq-dropdown #notificationSwitcherDropdown=\"kbqDropdown\">\n <button\n kbq-dropdown-item\n data-testid=\"kbq-notification-center-show-notifications-button\"\n (click)=\"service.setSilentMode(false)\"\n >\n <i kbq-icon=\"{{ !service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.showPopUpNotifications }}\n </button>\n <button\n kbq-dropdown-item\n data-testid=\"kbq-notification-center-do-not-disturb-button\"\n (click)=\"service.setSilentMode(true)\"\n >\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.doNotDisturb }}\n </button>\n</kbq-dropdown>\n", styles: [".kbq-notification-center{position:relative;display:flex;flex-direction:column;width:400px;height:100vh;box-sizing:border-box;z-index:1}.kbq-notification-center:not(.kbq-notification-center_popover){border-right:1px solid;border-left:1px solid}.kbq-notification-center.kbq-notification-center_popover{margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);border-radius:var(--kbq-size-xs);height:calc(100vh - 48px);box-shadow:var(--kbq-shadow-popup)}.kbq-notification-center-header{display:flex;flex-direction:row;justify-content:space-between;padding:var(--kbq-size-m) var(--kbq-size-xl) var(--kbq-size-xxs) var(--kbq-size-xxl)}.kbq-notification-center-title{display:flex;flex-direction:row;align-items:center;gap:var(--kbq-size-xxs)}.kbq-notification-center-toolbar{display:flex;flex-direction:row;align-items:center}.kbq-notification-center-toolbar .kbq-divider.kbq-divider_vertical{height:var(--kbq-size-m)}.kbq-notification-center-sub-header{position:sticky;top:0;z-index:100;display:flex;flex-direction:row;padding:var(--kbq-size-s) var(--kbq-size-xl)}.kbq-notification-center-sub-header .kbq-notification-center-sub-header__button{position:absolute;top:0;right:var(--kbq-size-xl);display:none}.kbq-notification-center-sub-header:hover .kbq-notification-center-sub-header__button{display:flex}.kbq-notification-center-sub-header:first-child.kbq-notification-center_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-container{height:100%;border-radius:inherit;padding-bottom:var(--kbq-size-xl)}.kbq-notification-center-container .kbq-loader-overlay_parent{border-radius:inherit}.kbq-notification-center-container.kbq-notification-center_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-load-more{display:flex;align-items:center;justify-content:center;padding:26px 0}.kbq-notification-center-load-more-error{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--kbq-size-xxs) var(--kbq-size-xxl);text-align:center}.kbq-notification-center-load-more-error .kbq-button{margin-top:var(--kbq-size-s)}.kbq-notification-center-empty-container,.kbq-notification-center-error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.kbq-notification-center-empty-container .kbq-icon,.kbq-notification-center-error-container .kbq-icon{margin-bottom:var(--kbq-size-xl)}.kbq-notification-center-empty-container .kbq-button,.kbq-notification-center-error-container .kbq-button{margin-top:var(--kbq-size-s)}.kbq-notification-center,.kbq-notification-center-sub-header{background:var(--kbq-background-card)}.kbq-notification-center:not(.kbq-notification-center_popover),.kbq-notification-center-sub-header:not(.kbq-notification-center_popover){border-right-color:var(--kbq-line-contrast-less);border-left-color:var(--kbq-line-contrast-less)}.kbq-notification-center-error-container,.kbq-notification-center-load-more-error{color:var(--kbq-foreground-error)}.kbq-notification-center{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}.kbq-notification-center-title__text{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "component", type: i1.KbqIconItem, selector: "[kbq-icon-item]", inputs: ["kbq-icon-item", "fade", "big"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "ngmodule", type: KbqScrollbarModule }, { kind: "component", type: i2.KbqScrollbar, selector: "kbq-scrollbar, [kbq-scrollbar]", inputs: ["initializationTarget", "options", "events", "defer"], outputs: ["onInitialize", "onUpdate", "onDestroy", "onScroll"], exportAs: ["kbqScrollbar"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i3$1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i3$1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: i3$1.KbqButtonDropdownTrigger, selector: "[kbq-button][kbqDropdownTriggerFor]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "component", type: i4.KbqDivider, selector: "kbq-divider", inputs: ["vertical", "inset", "paddings"] }, { kind: "ngmodule", type: KbqDropdownModule }, { kind: "component", type: i5.KbqDropdown, selector: "kbq-dropdown", inputs: ["navigationWithWrap", "xPosition", "yPosition", "overlapTriggerY", "overlapTriggerX", "hasBackdrop", "class", "backdropClass"], outputs: ["closed"], exportAs: ["kbqDropdown"] }, { kind: "component", type: i5.KbqDropdownItem, selector: "kbq-dropdown-item, [kbq-dropdown-item]", inputs: ["disabled"], exportAs: ["kbqDropdownItem"] }, { kind: "directive", type: i5.KbqDropdownTrigger, selector: "[kbqDropdownTriggerFor]", inputs: ["offsetX", "offsetY", "kbqDropdownTriggerData", "openByArrowDown", "demoteOverlay", "kbqDropdownTriggerRestoreFocus", "kbqDropdownTriggerFor"], outputs: ["dropdownOpened", "dropdownClosed"], exportAs: ["kbqDropdownTrigger"] }, { kind: "ngmodule", type: KbqToolTipModule }, { kind: "directive", type: i6.KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["forDisabledComponent", "ignoreTooltipPointerEvents", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: KbqNotificationItemComponent, selector: "kbq-notification-item", inputs: ["data"] }, { kind: "ngmodule", type: KbqLoaderOverlayModule }, { kind: "component", type: i7.KbqLoaderOverlay, selector: "kbq-loader-overlay", inputs: ["text", "caption", "size", "transparent", "card"] }, { kind: "ngmodule", type: KbqProgressSpinnerModule }, { kind: "component", type: i8.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["id", "value", "mode", "size"] }], animations: [KbqNotificationCenterAnimations.state], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
316
446
|
}
|
|
317
447
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqNotificationCenterComponent, decorators: [{
|
|
318
448
|
type: Component,
|
|
@@ -326,12 +456,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
326
456
|
KbqToolTipModule,
|
|
327
457
|
AsyncPipe,
|
|
328
458
|
KbqNotificationItemComponent,
|
|
329
|
-
KbqLoaderOverlayModule
|
|
459
|
+
KbqLoaderOverlayModule,
|
|
460
|
+
KbqProgressSpinnerModule
|
|
330
461
|
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, host: {
|
|
331
462
|
class: 'kbq-notification-center',
|
|
332
463
|
'[class.kbq-notification-center_popover]': 'popoverMode',
|
|
333
464
|
'(keydown.escape)': 'escapeHandler()'
|
|
334
|
-
}, animations: [KbqNotificationCenterAnimations.state], template: "<div class=\"kbq-notification-center-header\">\n <div class=\"kbq-notification-center-title\">\n <div class=\"kbq-notification-center-title__text\">{{ localeData.notifications }}</div>\n <button\n #notificationSwitcher\n #dropdownTrigger=\"kbqDropdownTrigger\"\n kbq-button\n class=\"kbq-notification-center-title__button\"\n [kbqDropdownTriggerFor]=\"notificationSwitcherDropdown\"\n [kbqTooltip]=\"service.silentMode.value ? localeData.doNotDisturb : localeData.showPopUpNotifications\"\n [kbqTooltipArrow]=\"false\"\n [kbqTooltipOffset]=\"4\"\n [kbqTooltipDisabled]=\"dropdownTrigger.opened\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n >\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-bell-slash_16' : 'kbq-bell_16' }}\"></i>\n </button>\n </div>\n <div class=\"kbq-notification-center-toolbar\">\n @if (!service.isEmpty) {\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"service.removeAll()\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n\n <kbq-divider [vertical]=\"true\" />\n }\n\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"hide(0)\"\n >\n <i kbq-icon=\"kbq-xmark_16\"></i>\n </button>\n </div>\n</div>\n\n<div\n kbq-scrollbar\n class=\"kbq-notification-center-container\"\n [class.kbq-notification-center_bottom-overflow]=\"isBottomOverflow\"\n (onScroll)=\"checkOverflow()\"\n>\n @if (!service.errorMode.value) {\n @if (!service.loadingMode.value) {\n @for (group of service.groupedItems | async; track group) {\n <div\n class=\"kbq-notification-center-sub-header\"\n [class.kbq-notification-center_top-overflow]=\"isTopOverflow\"\n >\n <div class=\"kbq-notification-center-sub-header__date\">{{ group.title }}</div>\n\n <button\n kbq-button\n class=\"kbq-notification-center-sub-header__button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeData.remove\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"service.removeGroup(group)\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n </div>\n\n @for (item of group.items; track item) {\n <kbq-notification-item [data]=\"item\" />\n }\n } @empty {\n <div class=\"kbq-notification-center-empty-container\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'contrast-fade'\"></i>\n {{ localeData.noNotifications }}\n </div>\n }\n } @else {\n <kbq-loader-overlay [transparent]=\"true\" />\n }\n } @else {\n <div class=\"kbq-notification-center-error-container\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'error'\" [fade]=\"true\"></i>\n {{ localeData.failedToLoadNotifications }}\n <button kbq-button [kbqStyle]=\"'transparent'\" [color]=\"'theme'\" (click)=\"service.onReload.emit()\">\n {{ localeData.repeat }}\n </button>\n </div>\n }\n</div>\n\n<kbq-dropdown #notificationSwitcherDropdown=\"kbqDropdown\">\n <button kbq-dropdown-item (click)=\"service.setSilentMode(false)\">\n <i kbq-icon=\"{{ !service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.showPopUpNotifications }}\n </button>\n <button kbq-dropdown-item (click)=\"service.setSilentMode(true)\">\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.doNotDisturb }}\n </button>\n</kbq-dropdown>\n", styles: [".kbq-notification-center{position:relative;display:flex;flex-direction:column;width:400px;height:100vh;box-sizing:border-box;z-index:1}.kbq-notification-center:not(.kbq-notification-center_popover){border-right:1px solid;border-left:1px solid}.kbq-notification-center.kbq-notification-center_popover{margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);border-radius:var(--kbq-size-xs);height:calc(100vh - 48px);box-shadow:var(--kbq-shadow-popup)}.kbq-notification-center-header{display:flex;flex-direction:row;justify-content:space-between;padding:var(--kbq-size-xl) var(--kbq-size-xl) var(--kbq-size-xxs) var(--kbq-size-xxl)}.kbq-notification-center-title{display:flex;flex-direction:row;align-items:center;gap:var(--kbq-size-xxs)}.kbq-notification-center-toolbar{display:flex;flex-direction:row;align-items:center}.kbq-notification-center-toolbar .kbq-divider.kbq-divider_vertical{height:var(--kbq-size-m)}.kbq-notification-center-sub-header{position:sticky;top:0;z-index:100;display:flex;flex-direction:row;padding:var(--kbq-size-s) var(--kbq-size-xxl)}.kbq-notification-center-sub-header .kbq-notification-center-sub-header__button{position:absolute;top:0;right:var(--kbq-size-xl);display:none}.kbq-notification-center-sub-header:hover .kbq-notification-center-sub-header__button{display:flex}.kbq-notification-center-sub-header:first-child.kbq-notification-center_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-container{height:100%;border-radius:inherit;padding-bottom:var(--kbq-size-m)}.kbq-notification-center-container .kbq-loader-overlay_parent{border-radius:inherit}.kbq-notification-center-container.kbq-notification-center_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-empty-container,.kbq-notification-center-error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.kbq-notification-center-empty-container .kbq-icon,.kbq-notification-center-error-container .kbq-icon{margin-bottom:var(--kbq-size-xl)}.kbq-notification-center-empty-container .kbq-button,.kbq-notification-center-error-container .kbq-button{margin-top:var(--kbq-size-s)}.kbq-notification-center,.kbq-notification-center-sub-header{background:var(--kbq-background-card)}.kbq-notification-center:not(.kbq-notification-center_popover),.kbq-notification-center-sub-header:not(.kbq-notification-center_popover){border-right-color:var(--kbq-line-contrast-less);border-left-color:var(--kbq-line-contrast-less)}.kbq-notification-center-error-container{color:var(--kbq-foreground-error)}.kbq-notification-center{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}.kbq-notification-center-title__text{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n"] }]
|
|
465
|
+
}, animations: [KbqNotificationCenterAnimations.state], template: "<div class=\"kbq-notification-center-header\">\n <div class=\"kbq-notification-center-title\">\n <div class=\"kbq-notification-center-title__text\">{{ localeData.notifications }}</div>\n <button\n #notificationSwitcher\n #dropdownTrigger=\"kbqDropdownTrigger\"\n kbq-button\n class=\"kbq-notification-center-title__button\"\n data-testid=\"kbq-notification-center-silent-mode-toggle\"\n [kbqDropdownTriggerFor]=\"notificationSwitcherDropdown\"\n [kbqTooltip]=\"service.silentMode.value ? localeData.doNotDisturb : localeData.showPopUpNotifications\"\n [kbqTooltipArrow]=\"false\"\n [kbqPlacement]=\"'right'\"\n [kbqTooltipOffset]=\"4\"\n [kbqTooltipDisabled]=\"dropdownTrigger.opened\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n >\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-bell-slash_16' : 'kbq-bell_16' }}\"></i>\n </button>\n </div>\n <div class=\"kbq-notification-center-toolbar\">\n @if (!service.isEmpty) {\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n data-testid=\"kbq-notification-center-remove-all-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"service.removeAll()\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n\n <kbq-divider [vertical]=\"true\" />\n }\n\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n data-testid=\"kbq-notification-center-close-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"hide(0)\"\n >\n <i kbq-icon=\"kbq-xmark_16\"></i>\n </button>\n </div>\n</div>\n\n<div\n kbq-scrollbar\n class=\"kbq-notification-center-container\"\n data-testid=\"kbq-notification-center-container\"\n [class.kbq-notification-center_bottom-overflow]=\"isBottomOverflow\"\n (onScroll)=\"onContainerScroll()\"\n>\n @if (!service.errorMode.value) {\n @if (!service.loadingMode.value) {\n @for (group of service.groupedItems | async; track group) {\n <div\n class=\"kbq-notification-center-sub-header\"\n data-testid=\"kbq-notification-center-group\"\n [class.kbq-notification-center_top-overflow]=\"isTopOverflow\"\n >\n <div class=\"kbq-notification-center-sub-header__date\">{{ group.title }}</div>\n\n <button\n kbq-button\n class=\"kbq-notification-center-sub-header__button\"\n data-testid=\"kbq-notification-center-remove-group-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeData.remove\"\n [kbqPlacement]=\"'right'\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"service.removeGroup(group)\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n </div>\n\n @for (item of group.items; track item) {\n <kbq-notification-item [data]=\"item\" />\n }\n } @empty {\n @if (!service.loadingMore.value) {\n <div class=\"kbq-notification-center-empty-container\" data-testid=\"kbq-notification-center-empty\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'contrast-fade'\"></i>\n {{ localeData.noNotifications }}\n </div>\n }\n }\n\n @if (service.loadingMore.value) {\n <div\n class=\"kbq-notification-center-load-more\"\n data-testid=\"kbq-notification-center-load-more\"\n role=\"status\"\n [attr.aria-label]=\"localeData.loadingMore\"\n >\n <kbq-progress-spinner [mode]=\"'indeterminate'\" [size]=\"'compact'\" />\n </div>\n }\n\n @if (service.loadMoreErrorMode.value) {\n <div\n class=\"kbq-notification-center-load-more-error\"\n data-testid=\"kbq-notification-center-load-more-error\"\n role=\"alert\"\n >\n {{ localeData.failedToLoadNotifications }}\n <button\n kbq-button\n data-testid=\"kbq-notification-center-load-more-retry-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'theme'\"\n (click)=\"retryLoadMore()\"\n >\n {{ localeData.repeat }}\n </button>\n </div>\n }\n } @else {\n <kbq-loader-overlay data-testid=\"kbq-notification-center-loader\" [transparent]=\"true\" />\n }\n } @else {\n <div class=\"kbq-notification-center-error-container\" data-testid=\"kbq-notification-center-error\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'error'\" [fade]=\"true\"></i>\n {{ localeData.failedToLoadNotifications }}\n <button\n kbq-button\n data-testid=\"kbq-notification-center-reload-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'theme'\"\n (click)=\"service.onReload.emit()\"\n >\n {{ localeData.repeat }}\n </button>\n </div>\n }\n</div>\n\n<kbq-dropdown #notificationSwitcherDropdown=\"kbqDropdown\">\n <button\n kbq-dropdown-item\n data-testid=\"kbq-notification-center-show-notifications-button\"\n (click)=\"service.setSilentMode(false)\"\n >\n <i kbq-icon=\"{{ !service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.showPopUpNotifications }}\n </button>\n <button\n kbq-dropdown-item\n data-testid=\"kbq-notification-center-do-not-disturb-button\"\n (click)=\"service.setSilentMode(true)\"\n >\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.doNotDisturb }}\n </button>\n</kbq-dropdown>\n", styles: [".kbq-notification-center{position:relative;display:flex;flex-direction:column;width:400px;height:100vh;box-sizing:border-box;z-index:1}.kbq-notification-center:not(.kbq-notification-center_popover){border-right:1px solid;border-left:1px solid}.kbq-notification-center.kbq-notification-center_popover{margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);border-radius:var(--kbq-size-xs);height:calc(100vh - 48px);box-shadow:var(--kbq-shadow-popup)}.kbq-notification-center-header{display:flex;flex-direction:row;justify-content:space-between;padding:var(--kbq-size-m) var(--kbq-size-xl) var(--kbq-size-xxs) var(--kbq-size-xxl)}.kbq-notification-center-title{display:flex;flex-direction:row;align-items:center;gap:var(--kbq-size-xxs)}.kbq-notification-center-toolbar{display:flex;flex-direction:row;align-items:center}.kbq-notification-center-toolbar .kbq-divider.kbq-divider_vertical{height:var(--kbq-size-m)}.kbq-notification-center-sub-header{position:sticky;top:0;z-index:100;display:flex;flex-direction:row;padding:var(--kbq-size-s) var(--kbq-size-xl)}.kbq-notification-center-sub-header .kbq-notification-center-sub-header__button{position:absolute;top:0;right:var(--kbq-size-xl);display:none}.kbq-notification-center-sub-header:hover .kbq-notification-center-sub-header__button{display:flex}.kbq-notification-center-sub-header:first-child.kbq-notification-center_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-container{height:100%;border-radius:inherit;padding-bottom:var(--kbq-size-xl)}.kbq-notification-center-container .kbq-loader-overlay_parent{border-radius:inherit}.kbq-notification-center-container.kbq-notification-center_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-load-more{display:flex;align-items:center;justify-content:center;padding:26px 0}.kbq-notification-center-load-more-error{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--kbq-size-xxs) var(--kbq-size-xxl);text-align:center}.kbq-notification-center-load-more-error .kbq-button{margin-top:var(--kbq-size-s)}.kbq-notification-center-empty-container,.kbq-notification-center-error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.kbq-notification-center-empty-container .kbq-icon,.kbq-notification-center-error-container .kbq-icon{margin-bottom:var(--kbq-size-xl)}.kbq-notification-center-empty-container .kbq-button,.kbq-notification-center-error-container .kbq-button{margin-top:var(--kbq-size-s)}.kbq-notification-center,.kbq-notification-center-sub-header{background:var(--kbq-background-card)}.kbq-notification-center:not(.kbq-notification-center_popover),.kbq-notification-center-sub-header:not(.kbq-notification-center_popover){border-right-color:var(--kbq-line-contrast-less);border-left-color:var(--kbq-line-contrast-less)}.kbq-notification-center-error-container,.kbq-notification-center-load-more-error{color:var(--kbq-foreground-error)}.kbq-notification-center{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}.kbq-notification-center-title__text{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n"] }]
|
|
335
466
|
}], ctorParameters: () => [], propDecorators: { scrollContainer: [{
|
|
336
467
|
type: ViewChild,
|
|
337
468
|
args: [KbqScrollbar]
|
|
@@ -405,6 +536,8 @@ class KbqNotificationCenterTrigger extends KbqPopUpTrigger {
|
|
|
405
536
|
this.backdropClass = 'cdk-overlay-transparent-backdrop';
|
|
406
537
|
/** Offset of popUp */
|
|
407
538
|
this.offset = defaultOffsetX;
|
|
539
|
+
/** Distance in pixels from the bottom of the list at which the next page is requested via `onNextPage`. */
|
|
540
|
+
this.scrolledToBottomOffset = 0;
|
|
408
541
|
this._popoverMode = false;
|
|
409
542
|
/** Emits a change event whenever the placement state changes. */
|
|
410
543
|
this.placementChange = new EventEmitter();
|
|
@@ -429,7 +562,7 @@ class KbqNotificationCenterTrigger extends KbqPopUpTrigger {
|
|
|
429
562
|
});
|
|
430
563
|
}
|
|
431
564
|
else {
|
|
432
|
-
this.preventClosingByInnerScrollSubscription
|
|
565
|
+
this.preventClosingByInnerScrollSubscription?.unsubscribe();
|
|
433
566
|
this.focus();
|
|
434
567
|
}
|
|
435
568
|
});
|
|
@@ -445,6 +578,7 @@ class KbqNotificationCenterTrigger extends KbqPopUpTrigger {
|
|
|
445
578
|
this.instance.footer = this.footer;
|
|
446
579
|
this.instance.popoverMode = this.popoverMode;
|
|
447
580
|
this.instance.popoverHeight = this.popoverHeight;
|
|
581
|
+
this.instance.scrolledToBottomOffset = this.scrolledToBottomOffset;
|
|
448
582
|
this.instance.updateTrapFocus(this.trigger !== PopUpTriggers.Focus);
|
|
449
583
|
if (this.isOpen) {
|
|
450
584
|
this.updatePosition(true);
|
|
@@ -478,7 +612,7 @@ class KbqNotificationCenterTrigger extends KbqPopUpTrigger {
|
|
|
478
612
|
return merge(this.overlayRef.outsidePointerEvents(), this.overlayRef.backdropClick(), this.scrollDispatcher.scrolled());
|
|
479
613
|
}
|
|
480
614
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqNotificationCenterTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
481
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.21", type: KbqNotificationCenterTrigger, isStandalone: true, selector: "[kbqNotificationCenterTrigger]", inputs: { placement: ["kbqNotificationCenterPlacement", "placement"], backdropClass: "backdropClass", panelClass: ["kbqNotificationCenterPanelClass", "panelClass"], offset: ["offset", "offset", numberAttribute], popoverMode: ["popoverMode", "popoverMode", booleanAttribute], popoverHeight: "popoverHeight", disabled: ["disabled", "disabled", booleanAttribute], stickToWindow: "stickToWindow", container: "container" }, outputs: { placementChange: "kbqPlacementChange", visibleChange: "kbqVisibleChange" }, host: { properties: { "class.kbq-notification-center_open": "isOpen", "class.kbq-active": "hasClickTrigger && isOpen" } }, exportAs: ["kbqNotificationCenterTrigger"], usesInheritance: true, ngImport: i0 }); }
|
|
615
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.21", type: KbqNotificationCenterTrigger, isStandalone: true, selector: "[kbqNotificationCenterTrigger]", inputs: { placement: ["kbqNotificationCenterPlacement", "placement"], backdropClass: "backdropClass", panelClass: ["kbqNotificationCenterPanelClass", "panelClass"], offset: ["offset", "offset", numberAttribute], scrolledToBottomOffset: ["scrolledToBottomOffset", "scrolledToBottomOffset", numberAttribute], popoverMode: ["popoverMode", "popoverMode", booleanAttribute], popoverHeight: "popoverHeight", disabled: ["disabled", "disabled", booleanAttribute], stickToWindow: "stickToWindow", container: "container" }, outputs: { placementChange: "kbqPlacementChange", visibleChange: "kbqVisibleChange" }, host: { properties: { "class.kbq-notification-center_open": "isOpen", "class.kbq-active": "hasClickTrigger && isOpen" } }, exportAs: ["kbqNotificationCenterTrigger"], usesInheritance: true, ngImport: i0 }); }
|
|
482
616
|
}
|
|
483
617
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqNotificationCenterTrigger, decorators: [{
|
|
484
618
|
type: Directive,
|
|
@@ -501,6 +635,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
501
635
|
}], offset: [{
|
|
502
636
|
type: Input,
|
|
503
637
|
args: [{ transform: numberAttribute }]
|
|
638
|
+
}], scrolledToBottomOffset: [{
|
|
639
|
+
type: Input,
|
|
640
|
+
args: [{ transform: numberAttribute }]
|
|
504
641
|
}], popoverMode: [{
|
|
505
642
|
type: Input,
|
|
506
643
|
args: [{ transform: booleanAttribute }]
|