@eui/components 21.0.0-alpha.18 → 21.0.0-alpha.19
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/docs/changelog.html +60 -0
- package/docs/components/EuiAppComponent.html +7 -3
- package/docs/components/EuiAppHeaderComponent.html +1 -1
- package/docs/components/EuiAppToolbarComponent.html +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/miscellaneous/variables.html +48 -506
- package/docs/properties.html +1 -1
- package/fesm2022/eui-components-layout.mjs +2358 -15
- package/fesm2022/eui-components-layout.mjs.map +1 -1
- package/fesm2022/eui-components.mjs +1 -146
- package/fesm2022/eui-components.mjs.map +1 -1
- package/index.d.ts +1 -69
- package/index.d.ts.map +1 -1
- package/layout/index.d.ts +743 -9
- package/layout/index.d.ts.map +1 -1
- package/package.json +28 -56
- package/fesm2022/eui-components-layout-eui-app.mjs +0 -841
- package/fesm2022/eui-components-layout-eui-app.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-footer.mjs +0 -37
- package/fesm2022/eui-components-layout-eui-footer.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-header.mjs +0 -420
- package/fesm2022/eui-components-layout-eui-header.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-notifications-v2.mjs +0 -264
- package/fesm2022/eui-components-layout-eui-notifications-v2.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-notifications.mjs +0 -277
- package/fesm2022/eui-components-layout-eui-notifications.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-sidebar-toggle.mjs +0 -57
- package/fesm2022/eui-components-layout-eui-sidebar-toggle.mjs.map +0 -1
- package/fesm2022/eui-components-layout-eui-toolbar.mjs +0 -621
- package/fesm2022/eui-components-layout-eui-toolbar.mjs.map +0 -1
- package/layout/eui-app/index.d.ts +0 -259
- package/layout/eui-app/index.d.ts.map +0 -1
- package/layout/eui-app/package.json +0 -3
- package/layout/eui-footer/index.d.ts +0 -14
- package/layout/eui-footer/index.d.ts.map +0 -1
- package/layout/eui-footer/package.json +0 -3
- package/layout/eui-header/index.d.ts +0 -136
- package/layout/eui-header/index.d.ts.map +0 -1
- package/layout/eui-header/package.json +0 -3
- package/layout/eui-notifications/index.d.ts +0 -99
- package/layout/eui-notifications/index.d.ts.map +0 -1
- package/layout/eui-notifications/package.json +0 -3
- package/layout/eui-notifications-v2/index.d.ts +0 -88
- package/layout/eui-notifications-v2/index.d.ts.map +0 -1
- package/layout/eui-notifications-v2/package.json +0 -3
- package/layout/eui-sidebar-toggle/index.d.ts +0 -17
- package/layout/eui-sidebar-toggle/index.d.ts.map +0 -1
- package/layout/eui-sidebar-toggle/package.json +0 -3
- package/layout/eui-toolbar/index.d.ts +0 -193
- package/layout/eui-toolbar/index.d.ts.map +0 -1
- package/layout/eui-toolbar/package.json +0 -3
@@ -1,277 +0,0 @@
|
|
1
|
-
import { NgClass, DatePipe } from '@angular/common';
|
2
|
-
import * as i0 from '@angular/core';
|
3
|
-
import { EventEmitter, booleanAttribute, Input, Output, HostBinding, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
4
|
-
import * as i1 from '@eui/components/eui-icon';
|
5
|
-
import { EUI_ICON } from '@eui/components/eui-icon';
|
6
|
-
import { EuiTruncatePipe } from '@eui/components/pipes';
|
7
|
-
import { consumeEvent } from '@eui/core';
|
8
|
-
import * as i2 from '@ngx-translate/core';
|
9
|
-
import { TranslateModule } from '@ngx-translate/core';
|
10
|
-
import * as i2$1 from '@eui/components/eui-icon-button';
|
11
|
-
import { EUI_ICON_BUTTON } from '@eui/components/eui-icon-button';
|
12
|
-
import * as i3 from '@eui/components/eui-badge';
|
13
|
-
import { EUI_BADGE } from '@eui/components/eui-badge';
|
14
|
-
import * as i4 from '@eui/components/eui-overlay';
|
15
|
-
import { EUI_OVERLAY } from '@eui/components/eui-overlay';
|
16
|
-
import * as i5 from '@eui/components/eui-button';
|
17
|
-
import { EUI_BUTTON } from '@eui/components/eui-button';
|
18
|
-
|
19
|
-
class EuiNotificationItemComponent {
|
20
|
-
constructor() {
|
21
|
-
this.string = 'eui-notification-item';
|
22
|
-
this.itemClick = new EventEmitter();
|
23
|
-
this.itemMarkAsRead = new EventEmitter();
|
24
|
-
this.markAsReadLabel = null;
|
25
|
-
this.dateFormat = 'dd/MM/YYYY';
|
26
|
-
this.tooltipSize = 'auto';
|
27
|
-
this.isShowMarkAsRead = true;
|
28
|
-
}
|
29
|
-
onItemClick() {
|
30
|
-
this.itemClick.emit(this.item);
|
31
|
-
}
|
32
|
-
onItemMarkAsRead(event) {
|
33
|
-
if (this.item.metadata) {
|
34
|
-
this.item.metadata.read = true;
|
35
|
-
}
|
36
|
-
this.itemMarkAsRead.emit(this.item);
|
37
|
-
consumeEvent(event);
|
38
|
-
}
|
39
|
-
get iconColor() {
|
40
|
-
return this.item.metadata?.read ? 'secondary-light' : 'secondary';
|
41
|
-
}
|
42
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiNotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
43
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0-next.3", type: EuiNotificationItemComponent, isStandalone: true, selector: "eui-notification-item", inputs: { markAsReadLabel: "markAsReadLabel", item: "item", dateFormat: "dateFormat", isShowMarkAsRead: ["isShowMarkAsRead", "isShowMarkAsRead", booleanAttribute] }, outputs: { itemClick: "itemClick", itemMarkAsRead: "itemMarkAsRead" }, host: { properties: { "class": "this.string" } }, ngImport: i0, template: "<div\n class=\"eui-notification-item-content\"\n (click)=\"onItemClick()\"\n [ngClass]=\"{ 'eui-u-c-bg-white': item.metadata?.read || !item.metadata }\">\n <div class=\"eui-notification-item-content-top eui-u-f-s\">\n @if (item.metadata?.date) {\n <div class=\"eui-notification-item-content-top__date\">\n <span class=\"eui-notification-item-content-top__date-icon eui-u-mr-s\">\n <eui-icon-svg icon=\"notifications:sharp\" size=\"m\" [fillColor]=\"iconColor\"></eui-icon-svg>\n @if (item.metadata?.new) {\n <span class=\"eui-notification-item-content-top__date-dot eui-u-c-danger-light eui-u-f-s eui-icon eui-icon-circle\"></span>\n }\n </span>\n <span>{{ item.metadata?.date | date: dateFormat }}</span>\n </div>\n }\n @if (item.metadata?.important) {\n <div class=\"eui-u-f-m-bold\">\n <eui-icon-svg icon=\"alert:sharp\" fillColor=\"danger\" class=\"eui-u-ml-xs\"></eui-icon-svg>\n </div>\n }\n </div>\n <span class=\"eui-notification-item-content-middle eui-u-cursor-pointer\">\n @if (item.metadata?.url) {\n <a class=\"eui-u-text-link\" href=\"{{ item.metadata.url }}\">\n <div\n class=\"eui-notification-item-content-middle__label\"\n [ngClass]=\"{ 'eui-u-f-m-semi-bold': !item.metadata || (item.metadata && !item.metadata.read) }\">\n {{ item.label | translate | euiTruncate: 200 }}\n </div>\n @if (item.subLabel) {\n <div\n class=\"eui-notification-item-content-middle__sub-label\"\n [innerHTML]=\"item.subLabel | translate | euiTruncate: 200\">\n </div>\n }\n </a>\n }\n\n @if (item.metadata?.urlExternal) {\n <a class=\"eui-u-text-link-external\"\n href=\"{{ item.metadata.urlExternal }}\"\n [target]=\"!item.metadata.urlExternalTarget ? '_blank' : item.metadata.urlExternalTarget\">\n <div\n class=\"eui-notification-item-content-middle__label\"\n [ngClass]=\"{ 'eui-u-f-m-semi-bold': !item.metadata || (item.metadata && !item.metadata.read) }\">\n {{ item.label | translate | euiTruncate: 200 }}\n </div>\n @if (item.subLabel) {\n <div\n class=\"eui-notification-item-content-middle__sub-label\"\n [innerHTML]=\"item.subLabel | translate | euiTruncate: 200\">\n </div>\n }\n </a>\n }\n\n @if (!item.metadata?.url && !item.metadata?.urlExternal) {\n <div\n class=\"eui-notification-item-content-middle__label\"\n [ngClass]=\"{ 'eui-u-f-m-bold': !item.metadata || (item.metadata && !item.metadata.read) }\">\n {{ item.label | translate | euiTruncate: 200 }}\n </div>\n @if (item.subLabel) {\n <div\n class=\"eui-notification-item-content-middle__sub-label\"\n [innerHTML]=\"item.subLabel | translate | euiTruncate: 200\">\n </div>\n }\n }\n </span>\n <div class=\"eui-notification-item-content-bottom\">\n @if (isShowMarkAsRead && item.metadata && !item.metadata.read) {\n <a\n href=\"javascript:void(0)\"\n class=\"eui-u-text-link\"\n (click)=\"onItemMarkAsRead($event)\">\n {{ markAsReadLabel ? markAsReadLabel : ('eui.NOTIFICATIONMARKASREAD' | translate) }}\n </a>\n }\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: i1.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "fillColor", "set", "size", "style", "iconUrl", "transform", "euiVariant", "aria-label", "ariaHidden", "focusable", "isLoading", "isInputIcon", "euiStart", "euiEnd"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: EuiTruncatePipe, name: "euiTruncate" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
44
|
-
}
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiNotificationItemComponent, decorators: [{
|
46
|
-
type: Component,
|
47
|
-
args: [{ selector: 'eui-notification-item', imports: [
|
48
|
-
NgClass,
|
49
|
-
DatePipe,
|
50
|
-
EuiTruncatePipe,
|
51
|
-
TranslateModule,
|
52
|
-
...EUI_ICON,
|
53
|
-
], template: "<div\n class=\"eui-notification-item-content\"\n (click)=\"onItemClick()\"\n [ngClass]=\"{ 'eui-u-c-bg-white': item.metadata?.read || !item.metadata }\">\n <div class=\"eui-notification-item-content-top eui-u-f-s\">\n @if (item.metadata?.date) {\n <div class=\"eui-notification-item-content-top__date\">\n <span class=\"eui-notification-item-content-top__date-icon eui-u-mr-s\">\n <eui-icon-svg icon=\"notifications:sharp\" size=\"m\" [fillColor]=\"iconColor\"></eui-icon-svg>\n @if (item.metadata?.new) {\n <span class=\"eui-notification-item-content-top__date-dot eui-u-c-danger-light eui-u-f-s eui-icon eui-icon-circle\"></span>\n }\n </span>\n <span>{{ item.metadata?.date | date: dateFormat }}</span>\n </div>\n }\n @if (item.metadata?.important) {\n <div class=\"eui-u-f-m-bold\">\n <eui-icon-svg icon=\"alert:sharp\" fillColor=\"danger\" class=\"eui-u-ml-xs\"></eui-icon-svg>\n </div>\n }\n </div>\n <span class=\"eui-notification-item-content-middle eui-u-cursor-pointer\">\n @if (item.metadata?.url) {\n <a class=\"eui-u-text-link\" href=\"{{ item.metadata.url }}\">\n <div\n class=\"eui-notification-item-content-middle__label\"\n [ngClass]=\"{ 'eui-u-f-m-semi-bold': !item.metadata || (item.metadata && !item.metadata.read) }\">\n {{ item.label | translate | euiTruncate: 200 }}\n </div>\n @if (item.subLabel) {\n <div\n class=\"eui-notification-item-content-middle__sub-label\"\n [innerHTML]=\"item.subLabel | translate | euiTruncate: 200\">\n </div>\n }\n </a>\n }\n\n @if (item.metadata?.urlExternal) {\n <a class=\"eui-u-text-link-external\"\n href=\"{{ item.metadata.urlExternal }}\"\n [target]=\"!item.metadata.urlExternalTarget ? '_blank' : item.metadata.urlExternalTarget\">\n <div\n class=\"eui-notification-item-content-middle__label\"\n [ngClass]=\"{ 'eui-u-f-m-semi-bold': !item.metadata || (item.metadata && !item.metadata.read) }\">\n {{ item.label | translate | euiTruncate: 200 }}\n </div>\n @if (item.subLabel) {\n <div\n class=\"eui-notification-item-content-middle__sub-label\"\n [innerHTML]=\"item.subLabel | translate | euiTruncate: 200\">\n </div>\n }\n </a>\n }\n\n @if (!item.metadata?.url && !item.metadata?.urlExternal) {\n <div\n class=\"eui-notification-item-content-middle__label\"\n [ngClass]=\"{ 'eui-u-f-m-bold': !item.metadata || (item.metadata && !item.metadata.read) }\">\n {{ item.label | translate | euiTruncate: 200 }}\n </div>\n @if (item.subLabel) {\n <div\n class=\"eui-notification-item-content-middle__sub-label\"\n [innerHTML]=\"item.subLabel | translate | euiTruncate: 200\">\n </div>\n }\n }\n </span>\n <div class=\"eui-notification-item-content-bottom\">\n @if (isShowMarkAsRead && item.metadata && !item.metadata.read) {\n <a\n href=\"javascript:void(0)\"\n class=\"eui-u-text-link\"\n (click)=\"onItemMarkAsRead($event)\">\n {{ markAsReadLabel ? markAsReadLabel : ('eui.NOTIFICATIONMARKASREAD' | translate) }}\n </a>\n }\n </div>\n</div>\n" }]
|
54
|
-
}], propDecorators: { string: [{
|
55
|
-
type: HostBinding,
|
56
|
-
args: ['class']
|
57
|
-
}], itemClick: [{
|
58
|
-
type: Output
|
59
|
-
}], itemMarkAsRead: [{
|
60
|
-
type: Output
|
61
|
-
}], markAsReadLabel: [{
|
62
|
-
type: Input
|
63
|
-
}], item: [{
|
64
|
-
type: Input
|
65
|
-
}], dateFormat: [{
|
66
|
-
type: Input
|
67
|
-
}], isShowMarkAsRead: [{
|
68
|
-
type: Input,
|
69
|
-
args: [{ transform: booleanAttribute }]
|
70
|
-
}] } });
|
71
|
-
|
72
|
-
class EuiNotificationsComponent {
|
73
|
-
constructor() {
|
74
|
-
this.refreshClick = new EventEmitter();
|
75
|
-
this.notificationsClick = new EventEmitter();
|
76
|
-
this.viewAllClick = new EventEmitter();
|
77
|
-
this.settingsClick = new EventEmitter();
|
78
|
-
this.markAllAsReadClick = new EventEmitter();
|
79
|
-
this.noNotificationFoundClick = new EventEmitter();
|
80
|
-
this.itemClick = new EventEmitter();
|
81
|
-
this.itemMarkAsReadClick = new EventEmitter();
|
82
|
-
this.isOverlayActive = false;
|
83
|
-
this.currentDayNotifications = [];
|
84
|
-
this.oldestNotifications = [];
|
85
|
-
this.unreadNotifications = [];
|
86
|
-
this.today = new Date();
|
87
|
-
this.string = 'eui-notifications';
|
88
|
-
this.count = null;
|
89
|
-
this.items = [];
|
90
|
-
this.unreadLabel = null;
|
91
|
-
this.totalLabel = null;
|
92
|
-
this.markAsReadLabel = null;
|
93
|
-
this.markAsUnReadLabel = null;
|
94
|
-
this.markAllAsReadLabel = null;
|
95
|
-
this.settingsLabel = null;
|
96
|
-
this.refreshLabel = null;
|
97
|
-
this.viewAllNotificationsLabel = null;
|
98
|
-
this.headerTitleLabel = null;
|
99
|
-
this.noNotificationFoundLabel = null;
|
100
|
-
this.nbUnreadCount = null;
|
101
|
-
this.dateFormat = 'dd/MM/YYYY';
|
102
|
-
this.noNotificationFoundLink = false;
|
103
|
-
this.isShowMarkAsRead = true;
|
104
|
-
this.isShowViewAllAction = true;
|
105
|
-
this.isHidePanelOnViewAllAction = true;
|
106
|
-
this.customUnreadCount = false;
|
107
|
-
this.isShowMarkAllAsReadButton = true;
|
108
|
-
this.isShowSettingsButton = true;
|
109
|
-
this.isShowRefreshButton = true;
|
110
|
-
}
|
111
|
-
onClicked(event) {
|
112
|
-
this.notificationsClick.emit();
|
113
|
-
consumeEvent(event);
|
114
|
-
this.isOverlayActive = !this.isOverlayActive;
|
115
|
-
}
|
116
|
-
ngOnChanges(changes) {
|
117
|
-
if (changes.customUnreadCount) {
|
118
|
-
const customUnreadCount = changes.customUnreadCount.currentValue;
|
119
|
-
if (!customUnreadCount) {
|
120
|
-
this.nbUnreadCount = this._getUnreadCount();
|
121
|
-
}
|
122
|
-
}
|
123
|
-
}
|
124
|
-
ngOnInit() {
|
125
|
-
if (!this.customUnreadCount) {
|
126
|
-
this.nbUnreadCount = this._getUnreadCount();
|
127
|
-
}
|
128
|
-
}
|
129
|
-
onRefresh(event) {
|
130
|
-
this.refreshClick.emit();
|
131
|
-
consumeEvent(event);
|
132
|
-
}
|
133
|
-
onItemClick(link) {
|
134
|
-
this.itemClick.emit(link);
|
135
|
-
consumeEvent(event);
|
136
|
-
}
|
137
|
-
onViewAllClick(event) {
|
138
|
-
this.viewAllClick.emit();
|
139
|
-
if (!this.isHidePanelOnViewAllAction) {
|
140
|
-
consumeEvent(event);
|
141
|
-
}
|
142
|
-
}
|
143
|
-
onNoNotificationFoundClick() {
|
144
|
-
this.noNotificationFoundClick.emit();
|
145
|
-
}
|
146
|
-
onItemMarkAsRead(link) {
|
147
|
-
this.itemMarkAsReadClick.emit(link);
|
148
|
-
}
|
149
|
-
onMarkAllAsRead(e) {
|
150
|
-
this.markAllAsReadClick.emit(e);
|
151
|
-
consumeEvent(e);
|
152
|
-
}
|
153
|
-
onSettings(e) {
|
154
|
-
this.settingsClick.emit(e);
|
155
|
-
consumeEvent(e);
|
156
|
-
}
|
157
|
-
trackByFn(index, item) {
|
158
|
-
return item.id;
|
159
|
-
}
|
160
|
-
updateActiveState(isActive) {
|
161
|
-
this.isOverlayActive = isActive;
|
162
|
-
}
|
163
|
-
getAriaLabel() {
|
164
|
-
if (this.count) {
|
165
|
-
return this.count > 1
|
166
|
-
? ` You have ${this.count} notifications`
|
167
|
-
: `You have ${this.count} notification`;
|
168
|
-
}
|
169
|
-
return 'Open notifications panel';
|
170
|
-
}
|
171
|
-
_getUnreadCount() {
|
172
|
-
const unreadNotifications = this.items.filter((link) => {
|
173
|
-
if (link.metadata) {
|
174
|
-
return link.metadata.read === false;
|
175
|
-
}
|
176
|
-
return false;
|
177
|
-
});
|
178
|
-
return unreadNotifications.length;
|
179
|
-
}
|
180
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
181
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0-next.3", type: EuiNotificationsComponent, isStandalone: true, selector: "eui-notifications", inputs: { count: "count", items: "items", unreadLabel: "unreadLabel", totalLabel: "totalLabel", markAsReadLabel: "markAsReadLabel", markAsUnReadLabel: "markAsUnReadLabel", markAllAsReadLabel: "markAllAsReadLabel", settingsLabel: "settingsLabel", refreshLabel: "refreshLabel", viewAllNotificationsLabel: "viewAllNotificationsLabel", headerTitleLabel: "headerTitleLabel", noNotificationFoundLabel: "noNotificationFoundLabel", nbUnreadCount: "nbUnreadCount", dateFormat: "dateFormat", noNotificationFoundLink: ["noNotificationFoundLink", "noNotificationFoundLink", booleanAttribute], isShowMarkAsRead: ["isShowMarkAsRead", "isShowMarkAsRead", booleanAttribute], isShowViewAllAction: ["isShowViewAllAction", "isShowViewAllAction", booleanAttribute], isHidePanelOnViewAllAction: ["isHidePanelOnViewAllAction", "isHidePanelOnViewAllAction", booleanAttribute], customUnreadCount: ["customUnreadCount", "customUnreadCount", booleanAttribute], isShowMarkAllAsReadButton: ["isShowMarkAllAsReadButton", "isShowMarkAllAsReadButton", booleanAttribute], isShowSettingsButton: ["isShowSettingsButton", "isShowSettingsButton", booleanAttribute], isShowRefreshButton: ["isShowRefreshButton", "isShowRefreshButton", booleanAttribute] }, outputs: { refreshClick: "refreshClick", notificationsClick: "notificationsClick", viewAllClick: "viewAllClick", settingsClick: "settingsClick", markAllAsReadClick: "markAllAsReadClick", noNotificationFoundClick: "noNotificationFoundClick", itemClick: "itemClick", itemMarkAsReadClick: "itemMarkAsReadClick" }, host: { properties: { "class": "this.string" } }, usesOnChanges: true, ngImport: i0, template: "<eui-icon-button\n class=\"eui-notifications__trigger\"\n icon=\"eui-notifications-o\"\n (click)=\"onClicked($event)\"\n [ariaLabel]=\"getAriaLabel()\">\n @if (count) {\n <eui-badge euiDanger [maxCharCount]=\"2\">{{ count }}</eui-badge>\n }\n</eui-icon-button>\n\n@if (isOverlayActive) {\n <eui-overlay hasClosedOnClickOutside isActive class=\"eui-overlay-offset--width-30\" (activeState)=\"updateActiveState($event)\">\n <eui-overlay-header>\n <div class=\"eui-notifications__header-title\">\n <div class=\"eui-notifications__header-title-label\">\n {{ headerTitleLabel ? headerTitleLabel : ('eui.MYNOTIFICATIONS' | translate) }}\n @if (items) {\n <span\n class=\"eui-u-cursor-help eui-u-ml-s\"\n attr.aria-label=\"{{ unreadLabel ? unreadLabel : ('eui.NOTIFICATIONSUNREAD' | translate) }}\"\n title=\"{{ unreadLabel ? unreadLabel : ('eui.NOTIFICATIONSUNREAD' | translate) }}\">\n </span>\n }\n <eui-badge>{{ items.length }}</eui-badge>\n </div>\n </div>\n \n @if (items) {\n <div class=\"eui-notifications__header-actions\">\n @if (isShowMarkAllAsReadButton) {\n <button\n euiButton\n euiPrimary\n euiRounded\n euiIconButton\n euiBasicButton\n euiSizeS\n type=\"button\"\n [attr.aria-label]=\"markAllAsReadLabel ? markAllAsReadLabel : ('eui.NOTIFICATIONMARKALLASREAD' | translate)\"\n title=\"{{ markAllAsReadLabel ? markAllAsReadLabel : ('eui.NOTIFICATIONMARKALLASREAD' | translate) }}\"\n (click)=\"onMarkAllAsRead($event)\">\n <eui-icon-svg icon=\"eui-checkmark-done\" fillColor=\"secondary\"></eui-icon-svg>\n </button>\n }\n @if (isShowSettingsButton) {\n <button\n euiButton\n euiPrimary\n euiRounded\n euiIconButton\n euiBasicButton\n euiSizeS\n type=\"button\"\n [attr.aria-label]=\"settingsLabel ? settingsLabel : ('eui.SETTINGS' | translate)\"\n title=\"{{ settingsLabel ? settingsLabel : ('eui.SETTINGS' | translate) }}\"\n (click)=\"onSettings($event)\">\n <eui-icon-svg icon=\"eui-settings-o\" fillColor=\"secondary\"></eui-icon-svg>\n </button>\n }\n @if (isShowRefreshButton) {\n <button\n euiButton\n euiPrimary\n euiRounded\n euiIconButton\n euiBasicButton\n euiSizeS\n type=\"button\"\n [attr.aria-label]=\"refreshLabel ? refreshLabel : ('eui.REFRESH' | translate)\"\n title=\"{{ refreshLabel ? refreshLabel : ('eui.REFRESH' | translate) }}\"\n (click)=\"onRefresh($event)\">\n <eui-icon-svg icon=\"eui-refresh\" fillColor=\"secondary\"></eui-icon-svg>\n </button>\n }\n </div>\n }\n </eui-overlay-header>\n \n <eui-overlay-body>\n @if (items) {\n <ul class=\"eui-notifications-items\">\n @for (item of items; let i = $index; track $index) {\n <eui-notification-item\n [item]=\"item\"\n [dateFormat]=\"dateFormat\"\n [markAsReadLabel]=\"markAsReadLabel\"\n [isShowMarkAsRead]=\"isShowMarkAsRead\"\n (itemClick)=\"onItemClick($event)\"\n (itemMarkAsRead)=\"onItemMarkAsRead($event)\">\n </eui-notification-item>\n }\n </ul>\n }\n </eui-overlay-body>\n \n @if ((items?.length > 0 && isShowViewAllAction) || items?.length === 0) {\n <eui-overlay-footer>\n @if (items?.length > 0 && isShowViewAllAction) {\n <a (click)=\"onViewAllClick($event)\" class=\"eui-u-text-link\">\n <strong>{{ viewAllNotificationsLabel ? viewAllNotificationsLabel : ('eui.VIEWALLNOTIFICATIONS' | translate) }}</strong>\n </a>\n }\n @if (items?.length === 0) {\n @if (!noNotificationFoundLink) {\n <div class=\"ux-notification__item-content\">\n {{ noNotificationFoundLabel ? noNotificationFoundLabel : ('eui.NONOTIFICATIONFOUND' | translate) }}\n </div>\n }\n @if (noNotificationFoundLink) {\n <div class=\"ux-notification__item-content\">\n <a (click)=\"onNoNotificationFoundClick()\" class=\"eui-u-text-link\">\n {{ noNotificationFoundLabel ? noNotificationFoundLabel : ('eui.NONOTIFICATIONFOUND' | translate) }}\n </a>\n </div>\n }\n }\n </eui-overlay-footer>\n }\n </eui-overlay>\n}\n\n", styles: [".eui-19 .eui-overlay-header{background-color:var(--eui-c-surface-shell);border-bottom:1px solid var(--eui-c-divider)}.eui-19 .eui-notifications-items{margin:0;padding:0}.eui-19 .eui-notifications__trigger .eui-icon-svg svg{transform:scale(1.1)}.eui-19 .eui-notifications__header{align-items:center;border-bottom:1px solid var(--eui-c-divider-light);color:var(--eui-c-text);cursor:default;display:flex;padding:var(--eui-s-xs) var(--eui-s-m)}.eui-19 .eui-notifications__header-title{display:flex}.eui-19 .eui-notifications__header-title-label{font:var(--eui-f-l-bold)}.eui-19 .eui-notifications__header-title-subLabel{margin-top:var(--eui-s-xs);font:var(--eui-f-m)}.eui-19 .eui-notifications__header-actions{align-items:center;display:flex;margin-left:auto}.eui-19 .eui-notification-item{display:flex;flex-direction:column;overflow-y:auto;margin:0}.eui-19 .eui-notification-item-content{background-color:var(--eui-c-info-surface-light);border-bottom:1px solid var(--eui-c-divider);display:flex;flex-direction:column;min-height:var(--eui-s-6xl);padding:var(--eui-s-s) var(--eui-s-m);cursor:pointer}.eui-19 .eui-notification-item-content:hover{background-color:var(--eui-c-secondary-surface-light)!important}.eui-19 .eui-notification-item-content-top{align-items:center;display:flex;justify-content:space-between}.eui-19 .eui-notification-item-content-top__date{display:flex;align-items:center}.eui-19 .eui-notification-item-content-top__date-icon{align-items:center;display:flex;position:relative}.eui-19 .eui-notification-item-content-top__date-icon--rotated{transform:rotate(20deg)}.eui-19 .eui-notification-item-content-top__date-icon-dot{position:absolute;top:0;right:0}.eui-19 .eui-notification-item-content-middle{margin:var(--eui-s-3xs) 0}.eui-19 .eui-notification-item-content-middle__sub-label{margin-top:var(--eui-s-3xs)}.eui-19 .eui-notification-item-content-bottom{display:flex;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "component", type: EuiNotificationItemComponent, selector: "eui-notification-item", inputs: ["markAsReadLabel", "item", "dateFormat", "isShowMarkAsRead"], outputs: ["itemClick", "itemMarkAsRead"] }, { kind: "component", type: i1.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "fillColor", "set", "size", "style", "iconUrl", "transform", "euiVariant", "aria-label", "ariaHidden", "focusable", "isLoading", "isInputIcon", "euiStart", "euiEnd"] }, { kind: "component", type: i2$1.EuiIconButtonComponent, selector: "eui-icon-button", inputs: ["icon", "iconUrl", "fillColor", "size", "ariaLabel", "tabindex", "hasNoPadding", "hasOverflowHover", "hasFocusHoverColor", "hasFocusHoverBg", "euiRounded", "euiDisabled"], outputs: ["buttonClick"] }, { kind: "component", type: i3.EuiBadgeComponent, selector: "div[euiBadge], span[euiBadge], eui-badge", inputs: ["e2eAttr", "aria-label", "maxCharCount", "charReplacement", "euiIconBadge", "euiDottedBadge"] }, { kind: "component", type: i4.EuiOverlayHeaderComponent, selector: "eui-overlay-header" }, { kind: "component", type: i4.EuiOverlayBodyComponent, selector: "eui-overlay-body" }, { kind: "component", type: i4.EuiOverlayFooterComponent, selector: "eui-overlay-footer" }, { kind: "component", type: i4.EuiOverlayComponent, selector: "eui-overlay", inputs: ["isActive", "euiHighlighted", "hasClosedOnClickOutside", "position", "width", "fixedWidth"], outputs: ["activeState"] }, { kind: "component", type: i5.EuiButtonComponent, selector: "button[euiButton], a[euiButton]", inputs: ["e2eAttr", "id", "euiBasicButton", "euiButtonCall", "euiCTAButton", "euiBlockButton", "euiIconButton", "euiAvatarButton", "euiLineWrap", "isCompact", "hasNoFocusRing", "isChecked", "euiDisabled"], outputs: ["buttonClick"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
182
|
-
}
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiNotificationsComponent, decorators: [{
|
184
|
-
type: Component,
|
185
|
-
args: [{ selector: 'eui-notifications', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, imports: [
|
186
|
-
TranslateModule,
|
187
|
-
EuiNotificationItemComponent,
|
188
|
-
...EUI_ICON,
|
189
|
-
...EUI_ICON_BUTTON,
|
190
|
-
...EUI_BADGE,
|
191
|
-
...EUI_OVERLAY,
|
192
|
-
...EUI_BUTTON,
|
193
|
-
], template: "<eui-icon-button\n class=\"eui-notifications__trigger\"\n icon=\"eui-notifications-o\"\n (click)=\"onClicked($event)\"\n [ariaLabel]=\"getAriaLabel()\">\n @if (count) {\n <eui-badge euiDanger [maxCharCount]=\"2\">{{ count }}</eui-badge>\n }\n</eui-icon-button>\n\n@if (isOverlayActive) {\n <eui-overlay hasClosedOnClickOutside isActive class=\"eui-overlay-offset--width-30\" (activeState)=\"updateActiveState($event)\">\n <eui-overlay-header>\n <div class=\"eui-notifications__header-title\">\n <div class=\"eui-notifications__header-title-label\">\n {{ headerTitleLabel ? headerTitleLabel : ('eui.MYNOTIFICATIONS' | translate) }}\n @if (items) {\n <span\n class=\"eui-u-cursor-help eui-u-ml-s\"\n attr.aria-label=\"{{ unreadLabel ? unreadLabel : ('eui.NOTIFICATIONSUNREAD' | translate) }}\"\n title=\"{{ unreadLabel ? unreadLabel : ('eui.NOTIFICATIONSUNREAD' | translate) }}\">\n </span>\n }\n <eui-badge>{{ items.length }}</eui-badge>\n </div>\n </div>\n \n @if (items) {\n <div class=\"eui-notifications__header-actions\">\n @if (isShowMarkAllAsReadButton) {\n <button\n euiButton\n euiPrimary\n euiRounded\n euiIconButton\n euiBasicButton\n euiSizeS\n type=\"button\"\n [attr.aria-label]=\"markAllAsReadLabel ? markAllAsReadLabel : ('eui.NOTIFICATIONMARKALLASREAD' | translate)\"\n title=\"{{ markAllAsReadLabel ? markAllAsReadLabel : ('eui.NOTIFICATIONMARKALLASREAD' | translate) }}\"\n (click)=\"onMarkAllAsRead($event)\">\n <eui-icon-svg icon=\"eui-checkmark-done\" fillColor=\"secondary\"></eui-icon-svg>\n </button>\n }\n @if (isShowSettingsButton) {\n <button\n euiButton\n euiPrimary\n euiRounded\n euiIconButton\n euiBasicButton\n euiSizeS\n type=\"button\"\n [attr.aria-label]=\"settingsLabel ? settingsLabel : ('eui.SETTINGS' | translate)\"\n title=\"{{ settingsLabel ? settingsLabel : ('eui.SETTINGS' | translate) }}\"\n (click)=\"onSettings($event)\">\n <eui-icon-svg icon=\"eui-settings-o\" fillColor=\"secondary\"></eui-icon-svg>\n </button>\n }\n @if (isShowRefreshButton) {\n <button\n euiButton\n euiPrimary\n euiRounded\n euiIconButton\n euiBasicButton\n euiSizeS\n type=\"button\"\n [attr.aria-label]=\"refreshLabel ? refreshLabel : ('eui.REFRESH' | translate)\"\n title=\"{{ refreshLabel ? refreshLabel : ('eui.REFRESH' | translate) }}\"\n (click)=\"onRefresh($event)\">\n <eui-icon-svg icon=\"eui-refresh\" fillColor=\"secondary\"></eui-icon-svg>\n </button>\n }\n </div>\n }\n </eui-overlay-header>\n \n <eui-overlay-body>\n @if (items) {\n <ul class=\"eui-notifications-items\">\n @for (item of items; let i = $index; track $index) {\n <eui-notification-item\n [item]=\"item\"\n [dateFormat]=\"dateFormat\"\n [markAsReadLabel]=\"markAsReadLabel\"\n [isShowMarkAsRead]=\"isShowMarkAsRead\"\n (itemClick)=\"onItemClick($event)\"\n (itemMarkAsRead)=\"onItemMarkAsRead($event)\">\n </eui-notification-item>\n }\n </ul>\n }\n </eui-overlay-body>\n \n @if ((items?.length > 0 && isShowViewAllAction) || items?.length === 0) {\n <eui-overlay-footer>\n @if (items?.length > 0 && isShowViewAllAction) {\n <a (click)=\"onViewAllClick($event)\" class=\"eui-u-text-link\">\n <strong>{{ viewAllNotificationsLabel ? viewAllNotificationsLabel : ('eui.VIEWALLNOTIFICATIONS' | translate) }}</strong>\n </a>\n }\n @if (items?.length === 0) {\n @if (!noNotificationFoundLink) {\n <div class=\"ux-notification__item-content\">\n {{ noNotificationFoundLabel ? noNotificationFoundLabel : ('eui.NONOTIFICATIONFOUND' | translate) }}\n </div>\n }\n @if (noNotificationFoundLink) {\n <div class=\"ux-notification__item-content\">\n <a (click)=\"onNoNotificationFoundClick()\" class=\"eui-u-text-link\">\n {{ noNotificationFoundLabel ? noNotificationFoundLabel : ('eui.NONOTIFICATIONFOUND' | translate) }}\n </a>\n </div>\n }\n }\n </eui-overlay-footer>\n }\n </eui-overlay>\n}\n\n", styles: [".eui-19 .eui-overlay-header{background-color:var(--eui-c-surface-shell);border-bottom:1px solid var(--eui-c-divider)}.eui-19 .eui-notifications-items{margin:0;padding:0}.eui-19 .eui-notifications__trigger .eui-icon-svg svg{transform:scale(1.1)}.eui-19 .eui-notifications__header{align-items:center;border-bottom:1px solid var(--eui-c-divider-light);color:var(--eui-c-text);cursor:default;display:flex;padding:var(--eui-s-xs) var(--eui-s-m)}.eui-19 .eui-notifications__header-title{display:flex}.eui-19 .eui-notifications__header-title-label{font:var(--eui-f-l-bold)}.eui-19 .eui-notifications__header-title-subLabel{margin-top:var(--eui-s-xs);font:var(--eui-f-m)}.eui-19 .eui-notifications__header-actions{align-items:center;display:flex;margin-left:auto}.eui-19 .eui-notification-item{display:flex;flex-direction:column;overflow-y:auto;margin:0}.eui-19 .eui-notification-item-content{background-color:var(--eui-c-info-surface-light);border-bottom:1px solid var(--eui-c-divider);display:flex;flex-direction:column;min-height:var(--eui-s-6xl);padding:var(--eui-s-s) var(--eui-s-m);cursor:pointer}.eui-19 .eui-notification-item-content:hover{background-color:var(--eui-c-secondary-surface-light)!important}.eui-19 .eui-notification-item-content-top{align-items:center;display:flex;justify-content:space-between}.eui-19 .eui-notification-item-content-top__date{display:flex;align-items:center}.eui-19 .eui-notification-item-content-top__date-icon{align-items:center;display:flex;position:relative}.eui-19 .eui-notification-item-content-top__date-icon--rotated{transform:rotate(20deg)}.eui-19 .eui-notification-item-content-top__date-icon-dot{position:absolute;top:0;right:0}.eui-19 .eui-notification-item-content-middle{margin:var(--eui-s-3xs) 0}.eui-19 .eui-notification-item-content-middle__sub-label{margin-top:var(--eui-s-3xs)}.eui-19 .eui-notification-item-content-bottom{display:flex;justify-content:flex-end}\n"] }]
|
194
|
-
}], propDecorators: { refreshClick: [{
|
195
|
-
type: Output
|
196
|
-
}], notificationsClick: [{
|
197
|
-
type: Output
|
198
|
-
}], viewAllClick: [{
|
199
|
-
type: Output
|
200
|
-
}], settingsClick: [{
|
201
|
-
type: Output
|
202
|
-
}], markAllAsReadClick: [{
|
203
|
-
type: Output
|
204
|
-
}], noNotificationFoundClick: [{
|
205
|
-
type: Output
|
206
|
-
}], itemClick: [{
|
207
|
-
type: Output
|
208
|
-
}], itemMarkAsReadClick: [{
|
209
|
-
type: Output
|
210
|
-
}], string: [{
|
211
|
-
type: HostBinding,
|
212
|
-
args: ['class']
|
213
|
-
}], count: [{
|
214
|
-
type: Input
|
215
|
-
}], items: [{
|
216
|
-
type: Input
|
217
|
-
}], unreadLabel: [{
|
218
|
-
type: Input
|
219
|
-
}], totalLabel: [{
|
220
|
-
type: Input
|
221
|
-
}], markAsReadLabel: [{
|
222
|
-
type: Input
|
223
|
-
}], markAsUnReadLabel: [{
|
224
|
-
type: Input
|
225
|
-
}], markAllAsReadLabel: [{
|
226
|
-
type: Input
|
227
|
-
}], settingsLabel: [{
|
228
|
-
type: Input
|
229
|
-
}], refreshLabel: [{
|
230
|
-
type: Input
|
231
|
-
}], viewAllNotificationsLabel: [{
|
232
|
-
type: Input
|
233
|
-
}], headerTitleLabel: [{
|
234
|
-
type: Input
|
235
|
-
}], noNotificationFoundLabel: [{
|
236
|
-
type: Input
|
237
|
-
}], nbUnreadCount: [{
|
238
|
-
type: Input
|
239
|
-
}], dateFormat: [{
|
240
|
-
type: Input
|
241
|
-
}], noNotificationFoundLink: [{
|
242
|
-
type: Input,
|
243
|
-
args: [{ transform: booleanAttribute }]
|
244
|
-
}], isShowMarkAsRead: [{
|
245
|
-
type: Input,
|
246
|
-
args: [{ transform: booleanAttribute }]
|
247
|
-
}], isShowViewAllAction: [{
|
248
|
-
type: Input,
|
249
|
-
args: [{ transform: booleanAttribute }]
|
250
|
-
}], isHidePanelOnViewAllAction: [{
|
251
|
-
type: Input,
|
252
|
-
args: [{ transform: booleanAttribute }]
|
253
|
-
}], customUnreadCount: [{
|
254
|
-
type: Input,
|
255
|
-
args: [{ transform: booleanAttribute }]
|
256
|
-
}], isShowMarkAllAsReadButton: [{
|
257
|
-
type: Input,
|
258
|
-
args: [{ transform: booleanAttribute }]
|
259
|
-
}], isShowSettingsButton: [{
|
260
|
-
type: Input,
|
261
|
-
args: [{ transform: booleanAttribute }]
|
262
|
-
}], isShowRefreshButton: [{
|
263
|
-
type: Input,
|
264
|
-
args: [{ transform: booleanAttribute }]
|
265
|
-
}] } });
|
266
|
-
|
267
|
-
const EUI_NOTIFICATIONS = [
|
268
|
-
EuiNotificationsComponent,
|
269
|
-
EuiNotificationItemComponent,
|
270
|
-
];
|
271
|
-
|
272
|
-
/**
|
273
|
-
* Generated bundle index. Do not edit.
|
274
|
-
*/
|
275
|
-
|
276
|
-
export { EUI_NOTIFICATIONS, EuiNotificationItemComponent, EuiNotificationsComponent };
|
277
|
-
//# sourceMappingURL=eui-components-layout-eui-notifications.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"eui-components-layout-eui-notifications.mjs","sources":["../../layout/eui-notifications/eui-notification-item.component.ts","../../layout/eui-notifications/eui-notification-item.component.html","../../layout/eui-notifications/eui-notifications.component.ts","../../layout/eui-notifications/eui-notifications.component.html","../../layout/eui-notifications/index.ts","../../layout/eui-notifications/eui-components-layout-eui-notifications.ts"],"sourcesContent":["import { DatePipe, NgClass } from '@angular/common';\nimport { booleanAttribute, Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';\nimport { EUI_ICON } from '@eui/components/eui-icon';\nimport { EuiTruncatePipe } from '@eui/components/pipes';\nimport { UxLinkLegacy } from '@eui/core';\nimport { consumeEvent } from '@eui/core';\nimport { TranslateModule } from '@ngx-translate/core';\n\nexport interface NotificationMetadata {\n read?: boolean;\n urlExternal?: string;\n urlExternalTarget?: string;\n important?: boolean;\n new?: boolean;\n url?: string;\n date?: Date | string | number;\n}\n\n@Component({\n selector: 'eui-notification-item',\n templateUrl: './eui-notification-item.component.html',\n imports: [\n NgClass,\n DatePipe,\n EuiTruncatePipe,\n TranslateModule,\n ...EUI_ICON,\n ],\n})\nexport class EuiNotificationItemComponent {\n @HostBinding('class') string = 'eui-notification-item';\n @Output() itemClick: EventEmitter<UxLinkLegacy<NotificationMetadata>> = new EventEmitter<UxLinkLegacy<NotificationMetadata>>();\n @Output() itemMarkAsRead: EventEmitter<UxLinkLegacy<NotificationMetadata>> = new EventEmitter<UxLinkLegacy<NotificationMetadata>>();\n @Input() markAsReadLabel: string = null;\n @Input() item: UxLinkLegacy<NotificationMetadata>;\n @Input() dateFormat = 'dd/MM/YYYY';\n tooltipSize = 'auto';\n @Input({ transform: booleanAttribute })isShowMarkAsRead = true;\n\n onItemClick(): void {\n this.itemClick.emit(this.item);\n }\n\n onItemMarkAsRead(event: Event): void {\n if (this.item.metadata) {\n this.item.metadata.read = true;\n }\n this.itemMarkAsRead.emit(this.item);\n consumeEvent(event);\n }\n\n get iconColor(): string {\n return this.item.metadata?.read ? 'secondary-light' : 'secondary';\n }\n\n}\n","<div\n class=\"eui-notification-item-content\"\n (click)=\"onItemClick()\"\n [ngClass]=\"{ 'eui-u-c-bg-white': item.metadata?.read || !item.metadata }\">\n <div class=\"eui-notification-item-content-top eui-u-f-s\">\n @if (item.metadata?.date) {\n <div class=\"eui-notification-item-content-top__date\">\n <span class=\"eui-notification-item-content-top__date-icon eui-u-mr-s\">\n <eui-icon-svg icon=\"notifications:sharp\" size=\"m\" [fillColor]=\"iconColor\"></eui-icon-svg>\n @if (item.metadata?.new) {\n <span class=\"eui-notification-item-content-top__date-dot eui-u-c-danger-light eui-u-f-s eui-icon eui-icon-circle\"></span>\n }\n </span>\n <span>{{ item.metadata?.date | date: dateFormat }}</span>\n </div>\n }\n @if (item.metadata?.important) {\n <div class=\"eui-u-f-m-bold\">\n <eui-icon-svg icon=\"alert:sharp\" fillColor=\"danger\" class=\"eui-u-ml-xs\"></eui-icon-svg>\n </div>\n }\n </div>\n <span class=\"eui-notification-item-content-middle eui-u-cursor-pointer\">\n @if (item.metadata?.url) {\n <a class=\"eui-u-text-link\" href=\"{{ item.metadata.url }}\">\n <div\n class=\"eui-notification-item-content-middle__label\"\n [ngClass]=\"{ 'eui-u-f-m-semi-bold': !item.metadata || (item.metadata && !item.metadata.read) }\">\n {{ item.label | translate | euiTruncate: 200 }}\n </div>\n @if (item.subLabel) {\n <div\n class=\"eui-notification-item-content-middle__sub-label\"\n [innerHTML]=\"item.subLabel | translate | euiTruncate: 200\">\n </div>\n }\n </a>\n }\n\n @if (item.metadata?.urlExternal) {\n <a class=\"eui-u-text-link-external\"\n href=\"{{ item.metadata.urlExternal }}\"\n [target]=\"!item.metadata.urlExternalTarget ? '_blank' : item.metadata.urlExternalTarget\">\n <div\n class=\"eui-notification-item-content-middle__label\"\n [ngClass]=\"{ 'eui-u-f-m-semi-bold': !item.metadata || (item.metadata && !item.metadata.read) }\">\n {{ item.label | translate | euiTruncate: 200 }}\n </div>\n @if (item.subLabel) {\n <div\n class=\"eui-notification-item-content-middle__sub-label\"\n [innerHTML]=\"item.subLabel | translate | euiTruncate: 200\">\n </div>\n }\n </a>\n }\n\n @if (!item.metadata?.url && !item.metadata?.urlExternal) {\n <div\n class=\"eui-notification-item-content-middle__label\"\n [ngClass]=\"{ 'eui-u-f-m-bold': !item.metadata || (item.metadata && !item.metadata.read) }\">\n {{ item.label | translate | euiTruncate: 200 }}\n </div>\n @if (item.subLabel) {\n <div\n class=\"eui-notification-item-content-middle__sub-label\"\n [innerHTML]=\"item.subLabel | translate | euiTruncate: 200\">\n </div>\n }\n }\n </span>\n <div class=\"eui-notification-item-content-bottom\">\n @if (isShowMarkAsRead && item.metadata && !item.metadata.read) {\n <a\n href=\"javascript:void(0)\"\n class=\"eui-u-text-link\"\n (click)=\"onItemMarkAsRead($event)\">\n {{ markAsReadLabel ? markAsReadLabel : ('eui.NOTIFICATIONMARKASREAD' | translate) }}\n </a>\n }\n </div>\n</div>\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport { consumeEvent } from '@eui/core';\nimport { UxLinkLegacy } from '@eui/base';\nimport { EuiNotificationItemComponent, NotificationMetadata } from './eui-notification-item.component';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { EUI_ICON } from '@eui/components/eui-icon';\nimport { EUI_ICON_BUTTON } from '@eui/components/eui-icon-button';\nimport { EUI_BADGE } from '@eui/components/eui-badge';\nimport { EUI_OVERLAY } from '@eui/components/eui-overlay';\nimport { EUI_BUTTON } from '@eui/components/eui-button';\n\n@Component({\n selector: 'eui-notifications',\n templateUrl: './eui-notifications.component.html',\n styleUrls: ['./styles/_index.scss'],\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n imports: [\n TranslateModule,\n EuiNotificationItemComponent,\n ...EUI_ICON,\n ...EUI_ICON_BUTTON,\n ...EUI_BADGE,\n ...EUI_OVERLAY,\n ...EUI_BUTTON,\n ],\n})\nexport class EuiNotificationsComponent implements OnInit, OnChanges {\n @Output() refreshClick: EventEmitter<void> = new EventEmitter<void>();\n @Output() notificationsClick: EventEmitter<void> = new EventEmitter<void>();\n @Output() viewAllClick: EventEmitter<void> = new EventEmitter<void>();\n @Output() settingsClick: EventEmitter<MouseEvent> = new EventEmitter<MouseEvent>();\n @Output() markAllAsReadClick: EventEmitter<MouseEvent> = new EventEmitter<MouseEvent>();\n @Output() noNotificationFoundClick: EventEmitter<void> = new EventEmitter<void>();\n @Output() itemClick: EventEmitter<UxLinkLegacy<NotificationMetadata>> = new EventEmitter<UxLinkLegacy<NotificationMetadata>>();\n @Output() itemMarkAsReadClick: EventEmitter<UxLinkLegacy<NotificationMetadata>> = new EventEmitter<UxLinkLegacy<NotificationMetadata>>();\n\n isOverlayActive = false;\n currentDayNotifications = [];\n oldestNotifications = [];\n unreadNotifications = [];\n today: Date = new Date();\n\n @HostBinding('class') string = 'eui-notifications';\n\n @Input() count: number = null;\n @Input() items = [];\n @Input() unreadLabel: string = null;\n @Input() totalLabel: string = null;\n @Input() markAsReadLabel: string = null;\n @Input() markAsUnReadLabel: string = null;\n @Input() markAllAsReadLabel: string = null;\n @Input() settingsLabel: string = null;\n @Input() refreshLabel: string = null;\n @Input() viewAllNotificationsLabel: string = null;\n @Input() headerTitleLabel: string = null;\n @Input() noNotificationFoundLabel: string = null;\n @Input() nbUnreadCount: number = null;\n @Input() dateFormat = 'dd/MM/YYYY';\n @Input({ transform: booleanAttribute }) noNotificationFoundLink = false;\n @Input({ transform: booleanAttribute }) isShowMarkAsRead = true;\n @Input({ transform: booleanAttribute }) isShowViewAllAction = true;\n @Input({ transform: booleanAttribute })isHidePanelOnViewAllAction = true;\n @Input({ transform: booleanAttribute }) customUnreadCount = false;\n @Input({ transform: booleanAttribute }) isShowMarkAllAsReadButton = true;\n @Input({ transform: booleanAttribute }) isShowSettingsButton = true;\n @Input({ transform: booleanAttribute }) isShowRefreshButton = true;\n\n onClicked(event: MouseEvent | Event): void {\n this.notificationsClick.emit();\n consumeEvent(event);\n this.isOverlayActive = !this.isOverlayActive;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.customUnreadCount) {\n const customUnreadCount = changes.customUnreadCount.currentValue;\n if (!customUnreadCount) {\n this.nbUnreadCount = this._getUnreadCount();\n }\n }\n }\n\n ngOnInit(): void {\n if (!this.customUnreadCount) {\n this.nbUnreadCount = this._getUnreadCount();\n }\n }\n\n onRefresh(event: Event): void {\n this.refreshClick.emit();\n consumeEvent(event);\n }\n\n onItemClick(link: UxLinkLegacy<NotificationMetadata>): void {\n this.itemClick.emit(link);\n consumeEvent(event);\n }\n\n onViewAllClick(event: Event): void {\n this.viewAllClick.emit();\n if (!this.isHidePanelOnViewAllAction) {\n consumeEvent(event);\n }\n }\n\n onNoNotificationFoundClick(): void {\n this.noNotificationFoundClick.emit();\n }\n\n onItemMarkAsRead(link: UxLinkLegacy<NotificationMetadata>): void {\n this.itemMarkAsReadClick.emit(link);\n }\n\n onMarkAllAsRead(e: MouseEvent): void {\n this.markAllAsReadClick.emit(e);\n consumeEvent(e);\n }\n\n onSettings(e: MouseEvent): void {\n this.settingsClick.emit(e);\n consumeEvent(e);\n }\n\n protected trackByFn(index: number, item: UxLinkLegacy<NotificationMetadata>): string {\n return item.id;\n }\n\n protected updateActiveState(isActive: boolean): void {\n this.isOverlayActive = isActive;\n }\n\n protected getAriaLabel(): string {\n if (this.count) {\n return this.count > 1\n ? ` You have ${this.count} notifications`\n : `You have ${this.count} notification`;\n }\n return 'Open notifications panel';\n }\n\n private _getUnreadCount(): number {\n const unreadNotifications = this.items.filter((link) => {\n if (link.metadata) {\n return link.metadata.read === false;\n }\n return false;\n });\n return unreadNotifications.length;\n }\n}\n","<eui-icon-button\n class=\"eui-notifications__trigger\"\n icon=\"eui-notifications-o\"\n (click)=\"onClicked($event)\"\n [ariaLabel]=\"getAriaLabel()\">\n @if (count) {\n <eui-badge euiDanger [maxCharCount]=\"2\">{{ count }}</eui-badge>\n }\n</eui-icon-button>\n\n@if (isOverlayActive) {\n <eui-overlay hasClosedOnClickOutside isActive class=\"eui-overlay-offset--width-30\" (activeState)=\"updateActiveState($event)\">\n <eui-overlay-header>\n <div class=\"eui-notifications__header-title\">\n <div class=\"eui-notifications__header-title-label\">\n {{ headerTitleLabel ? headerTitleLabel : ('eui.MYNOTIFICATIONS' | translate) }}\n @if (items) {\n <span\n class=\"eui-u-cursor-help eui-u-ml-s\"\n attr.aria-label=\"{{ unreadLabel ? unreadLabel : ('eui.NOTIFICATIONSUNREAD' | translate) }}\"\n title=\"{{ unreadLabel ? unreadLabel : ('eui.NOTIFICATIONSUNREAD' | translate) }}\">\n </span>\n }\n <eui-badge>{{ items.length }}</eui-badge>\n </div>\n </div>\n \n @if (items) {\n <div class=\"eui-notifications__header-actions\">\n @if (isShowMarkAllAsReadButton) {\n <button\n euiButton\n euiPrimary\n euiRounded\n euiIconButton\n euiBasicButton\n euiSizeS\n type=\"button\"\n [attr.aria-label]=\"markAllAsReadLabel ? markAllAsReadLabel : ('eui.NOTIFICATIONMARKALLASREAD' | translate)\"\n title=\"{{ markAllAsReadLabel ? markAllAsReadLabel : ('eui.NOTIFICATIONMARKALLASREAD' | translate) }}\"\n (click)=\"onMarkAllAsRead($event)\">\n <eui-icon-svg icon=\"eui-checkmark-done\" fillColor=\"secondary\"></eui-icon-svg>\n </button>\n }\n @if (isShowSettingsButton) {\n <button\n euiButton\n euiPrimary\n euiRounded\n euiIconButton\n euiBasicButton\n euiSizeS\n type=\"button\"\n [attr.aria-label]=\"settingsLabel ? settingsLabel : ('eui.SETTINGS' | translate)\"\n title=\"{{ settingsLabel ? settingsLabel : ('eui.SETTINGS' | translate) }}\"\n (click)=\"onSettings($event)\">\n <eui-icon-svg icon=\"eui-settings-o\" fillColor=\"secondary\"></eui-icon-svg>\n </button>\n }\n @if (isShowRefreshButton) {\n <button\n euiButton\n euiPrimary\n euiRounded\n euiIconButton\n euiBasicButton\n euiSizeS\n type=\"button\"\n [attr.aria-label]=\"refreshLabel ? refreshLabel : ('eui.REFRESH' | translate)\"\n title=\"{{ refreshLabel ? refreshLabel : ('eui.REFRESH' | translate) }}\"\n (click)=\"onRefresh($event)\">\n <eui-icon-svg icon=\"eui-refresh\" fillColor=\"secondary\"></eui-icon-svg>\n </button>\n }\n </div>\n }\n </eui-overlay-header>\n \n <eui-overlay-body>\n @if (items) {\n <ul class=\"eui-notifications-items\">\n @for (item of items; let i = $index; track $index) {\n <eui-notification-item\n [item]=\"item\"\n [dateFormat]=\"dateFormat\"\n [markAsReadLabel]=\"markAsReadLabel\"\n [isShowMarkAsRead]=\"isShowMarkAsRead\"\n (itemClick)=\"onItemClick($event)\"\n (itemMarkAsRead)=\"onItemMarkAsRead($event)\">\n </eui-notification-item>\n }\n </ul>\n }\n </eui-overlay-body>\n \n @if ((items?.length > 0 && isShowViewAllAction) || items?.length === 0) {\n <eui-overlay-footer>\n @if (items?.length > 0 && isShowViewAllAction) {\n <a (click)=\"onViewAllClick($event)\" class=\"eui-u-text-link\">\n <strong>{{ viewAllNotificationsLabel ? viewAllNotificationsLabel : ('eui.VIEWALLNOTIFICATIONS' | translate) }}</strong>\n </a>\n }\n @if (items?.length === 0) {\n @if (!noNotificationFoundLink) {\n <div class=\"ux-notification__item-content\">\n {{ noNotificationFoundLabel ? noNotificationFoundLabel : ('eui.NONOTIFICATIONFOUND' | translate) }}\n </div>\n }\n @if (noNotificationFoundLink) {\n <div class=\"ux-notification__item-content\">\n <a (click)=\"onNoNotificationFoundClick()\" class=\"eui-u-text-link\">\n {{ noNotificationFoundLabel ? noNotificationFoundLabel : ('eui.NONOTIFICATIONFOUND' | translate) }}\n </a>\n </div>\n }\n }\n </eui-overlay-footer>\n }\n </eui-overlay>\n}\n\n","import { EuiNotificationItemComponent } from './eui-notification-item.component';\nimport { EuiNotificationsComponent } from './eui-notifications.component';\n\nexport * from './eui-notification-item.component';\nexport * from './eui-notifications.component';\n\nexport const EUI_NOTIFICATIONS = [\n EuiNotificationsComponent,\n EuiNotificationItemComponent,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i6"],"mappings":";;;;;;;;;;;;;;;;;;MA6Ba,4BAA4B,CAAA;AAXzC,IAAA,WAAA,GAAA;QAY0B,IAAA,CAAA,MAAM,GAAG,uBAAuB;AAC5C,QAAA,IAAA,CAAA,SAAS,GAAqD,IAAI,YAAY,EAAsC;AACpH,QAAA,IAAA,CAAA,cAAc,GAAqD,IAAI,YAAY,EAAsC;QAC1H,IAAA,CAAA,eAAe,GAAW,IAAI;QAE9B,IAAA,CAAA,UAAU,GAAG,YAAY;QAClC,IAAA,CAAA,WAAW,GAAG,MAAM;QACmB,IAAA,CAAA,gBAAgB,GAAG,IAAI;AAkBjE,IAAA;IAhBG,WAAW,GAAA;QACP,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IAClC;AAEA,IAAA,gBAAgB,CAAC,KAAY,EAAA;AACzB,QAAA,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACpB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI;QAClC;QACA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QACnC,YAAY,CAAC,KAAK,CAAC;IACvB;AAEA,IAAA,IAAI,SAAS,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,iBAAiB,GAAG,WAAW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gBACQ,aAAa,EAAA,CAAA;sBAArB;gBACQ,YAAY,EAAA,CAAA;sBAApB;gBACQ,yBAAyB,EAAA,CAAA;sBAAjC;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,wBAAwB,EAAA,CAAA;sBAAhC;gBACQ,aAAa,EAAA,CAAA;sBAArB;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBACuC,uBAAuB,EAAA,CAAA;sBAA9D,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACE,gBAAgB,EAAA,CAAA;sBAAvD,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACE,mBAAmB,EAAA,CAAA;sBAA1D,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACC,0BAA0B,EAAA,CAAA;sBAAhE,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACE,iBAAiB,EAAA,CAAA;sBAAxD,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACE,yBAAyB,EAAA,CAAA;sBAAhE,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACE,oBAAoB,EAAA,CAAA;sBAA3D,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACE,mBAAmB,EAAA,CAAA;sBAA1D,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;;AExEnC,MAAM,iBAAiB,GAAG;IAC7B,yBAAyB;IACzB,4BAA4B;;;ACRhC;;AAEG;;;;"}
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import { AsyncPipe } from '@angular/common';
|
2
|
-
import * as i0 from '@angular/core';
|
3
|
-
import { inject, Input, HostBinding, ViewEncapsulation, Component } from '@angular/core';
|
4
|
-
import * as i1 from '@eui/components/eui-icon-button';
|
5
|
-
import { EUI_ICON_BUTTON } from '@eui/components/eui-icon-button';
|
6
|
-
import { EuiAppShellService, consumeEvent } from '@eui/core';
|
7
|
-
|
8
|
-
class EuiSidebarToggleComponent {
|
9
|
-
constructor() {
|
10
|
-
this.e2eAttr = 'eui-sidebar-toggle';
|
11
|
-
this.name = 'eui-sidebar-toggle';
|
12
|
-
this.asService = inject(EuiAppShellService);
|
13
|
-
}
|
14
|
-
onToggleSidebar(event) {
|
15
|
-
// focus the first focusable element in the sidebar when opened in mobile/tablet
|
16
|
-
if (this.asService.state.breakpoints.isMobile || this.asService.state.breakpoints.isTablet) {
|
17
|
-
if (!this.asService.isSidebarOpen) {
|
18
|
-
this.asService.state.isSidebarFocused = true;
|
19
|
-
}
|
20
|
-
else {
|
21
|
-
this.asService.state.isSidebarFocused = false;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
this.asService.sidebarToggle();
|
25
|
-
consumeEvent(event);
|
26
|
-
}
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiSidebarToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0-next.3", type: EuiSidebarToggleComponent, isStandalone: true, selector: "eui-sidebar-toggle", inputs: { e2eAttr: "e2eAttr", iconSvgFillColor: "iconSvgFillColor" }, host: { properties: { "attr.data-e2e": "this.e2eAttr", "class": "this.name" } }, ngImport: i0, template: "<eui-icon-button\n icon=\"eui-menu\"\n fillColor=\"{{iconSvgFillColor}}\"\n size=\"l\"\n [ariaLabel]=\"(asService.state$ | async).isSidebarOpen ? 'Close Sidebar' : 'Open Sidebar'\"\n (buttonClick)=\"onToggleSidebar($event)\" />\n", dependencies: [{ kind: "component", type: i1.EuiIconButtonComponent, selector: "eui-icon-button", inputs: ["icon", "iconUrl", "fillColor", "size", "ariaLabel", "tabindex", "hasNoPadding", "hasOverflowHover", "hasFocusHoverColor", "hasFocusHoverBg", "euiRounded", "euiDisabled"], outputs: ["buttonClick"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
29
|
-
}
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: EuiSidebarToggleComponent, decorators: [{
|
31
|
-
type: Component,
|
32
|
-
args: [{ selector: 'eui-sidebar-toggle', encapsulation: ViewEncapsulation.None, imports: [
|
33
|
-
AsyncPipe,
|
34
|
-
...EUI_ICON_BUTTON,
|
35
|
-
], template: "<eui-icon-button\n icon=\"eui-menu\"\n fillColor=\"{{iconSvgFillColor}}\"\n size=\"l\"\n [ariaLabel]=\"(asService.state$ | async).isSidebarOpen ? 'Close Sidebar' : 'Open Sidebar'\"\n (buttonClick)=\"onToggleSidebar($event)\" />\n" }]
|
36
|
-
}], propDecorators: { e2eAttr: [{
|
37
|
-
type: HostBinding,
|
38
|
-
args: ['attr.data-e2e']
|
39
|
-
}, {
|
40
|
-
type: Input
|
41
|
-
}], name: [{
|
42
|
-
type: HostBinding,
|
43
|
-
args: ['class']
|
44
|
-
}], iconSvgFillColor: [{
|
45
|
-
type: Input
|
46
|
-
}] } });
|
47
|
-
|
48
|
-
const EUI_SIDEBAR_TOGGLE = [
|
49
|
-
EuiSidebarToggleComponent,
|
50
|
-
];
|
51
|
-
|
52
|
-
/**
|
53
|
-
* Generated bundle index. Do not edit.
|
54
|
-
*/
|
55
|
-
|
56
|
-
export { EUI_SIDEBAR_TOGGLE, EuiSidebarToggleComponent };
|
57
|
-
//# sourceMappingURL=eui-components-layout-eui-sidebar-toggle.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"eui-components-layout-eui-sidebar-toggle.mjs","sources":["../../layout/eui-sidebar-toggle/sidebar-toggle.component.ts","../../layout/eui-sidebar-toggle/sidebar-toggle.component.html","../../layout/eui-sidebar-toggle/index.ts","../../layout/eui-sidebar-toggle/eui-components-layout-eui-sidebar-toggle.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { Component, HostBinding, Input, ViewEncapsulation, inject } from '@angular/core';\nimport { EUI_ICON_BUTTON } from '@eui/components/eui-icon-button';\nimport { EuiAppShellService, consumeEvent } from '@eui/core';\n\n@Component({\n selector: 'eui-sidebar-toggle',\n templateUrl: './sidebar-toggle.component.html',\n encapsulation: ViewEncapsulation.None,\n imports: [\n AsyncPipe,\n ...EUI_ICON_BUTTON,\n ],\n})\nexport class EuiSidebarToggleComponent {\n @HostBinding('attr.data-e2e') @Input() e2eAttr = 'eui-sidebar-toggle';\n @HostBinding('class') name = 'eui-sidebar-toggle';\n\n @Input() iconSvgFillColor;\n asService = inject(EuiAppShellService);\n\n onToggleSidebar(event: Event): void {\n // focus the first focusable element in the sidebar when opened in mobile/tablet\n if (this.asService.state.breakpoints.isMobile || this.asService.state.breakpoints.isTablet) {\n if (!this.asService.isSidebarOpen) {\n this.asService.state.isSidebarFocused = true;\n } else {\n this.asService.state.isSidebarFocused = false;\n }\n }\n this.asService.sidebarToggle();\n consumeEvent(event);\n }\n}\n","<eui-icon-button\n icon=\"eui-menu\"\n fillColor=\"{{iconSvgFillColor}}\"\n size=\"l\"\n [ariaLabel]=\"(asService.state$ | async).isSidebarOpen ? 'Close Sidebar' : 'Open Sidebar'\"\n (buttonClick)=\"onToggleSidebar($event)\" />\n","import { EuiSidebarToggleComponent } from './sidebar-toggle.component';\n\nexport * from './sidebar-toggle.component';\n\nexport const EUI_SIDEBAR_TOGGLE = [\n EuiSidebarToggleComponent,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,yBAAyB,CAAA;AATtC,IAAA,WAAA,GAAA;QAU2C,IAAA,CAAA,OAAO,GAAG,oBAAoB;QAC/C,IAAA,CAAA,IAAI,GAAG,oBAAoB;AAGjD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAczC,IAAA;AAZG,IAAA,eAAe,CAAC,KAAY,EA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