@elementar-rt/components 0.6.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/action-required/index.d.ts +13 -0
- package/alert/index.d.ts +51 -0
- package/announcement/index.d.ts +45 -0
- package/avatar/index.d.ts +67 -0
- package/block-loader/index.d.ts +21 -0
- package/block-state/index.d.ts +33 -0
- package/brand-colors/index.d.ts +27 -0
- package/breadcrumbs/index.d.ts +104 -0
- package/card-overlay/index.d.ts +20 -0
- package/carousel/index.d.ts +75 -0
- package/code-highlighter/index.d.ts +18 -0
- package/color-picker/index.d.ts +92 -0
- package/color-scheme/index.d.ts +44 -0
- package/command-bar/index.d.ts +28 -0
- package/comment-editor/index.d.ts +194 -0
- package/comparison-slider/index.d.ts +51 -0
- package/confirm/index.d.ts +35 -0
- package/content-fade/index.d.ts +17 -0
- package/cookie-popup/index.d.ts +41 -0
- package/core/index.d.ts +252 -0
- package/country-select/index.d.ts +76 -0
- package/crop/index.d.ts +59 -0
- package/currency-select/index.d.ts +78 -0
- package/dashboard/index.d.ts +48 -0
- package/data-view/index.d.ts +127 -0
- package/date-format-select/index.d.ts +56 -0
- package/divider/index.d.ts +13 -0
- package/drawer/index.d.ts +35 -0
- package/emoji-picker/index.d.ts +49 -0
- package/expand/index.d.ts +26 -0
- package/fesm2022/elementar-rt-components-action-required.mjs +30 -0
- package/fesm2022/elementar-rt-components-action-required.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-alert.mjs +139 -0
- package/fesm2022/elementar-rt-components-alert.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-announcement.mjs +73 -0
- package/fesm2022/elementar-rt-components-announcement.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-avatar.mjs +234 -0
- package/fesm2022/elementar-rt-components-avatar.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-block-loader.mjs +54 -0
- package/fesm2022/elementar-rt-components-block-loader.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-block-state.mjs +75 -0
- package/fesm2022/elementar-rt-components-block-state.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-brand-colors.mjs +78 -0
- package/fesm2022/elementar-rt-components-brand-colors.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-breadcrumbs.mjs +213 -0
- package/fesm2022/elementar-rt-components-breadcrumbs.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-card-overlay.mjs +55 -0
- package/fesm2022/elementar-rt-components-card-overlay.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-carousel.mjs +605 -0
- package/fesm2022/elementar-rt-components-carousel.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-code-highlighter.mjs +57 -0
- package/fesm2022/elementar-rt-components-code-highlighter.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-color-picker.mjs +708 -0
- package/fesm2022/elementar-rt-components-color-picker.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-color-scheme.mjs +106 -0
- package/fesm2022/elementar-rt-components-color-scheme.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-command-bar.mjs +59 -0
- package/fesm2022/elementar-rt-components-command-bar.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-comment-editor.mjs +1039 -0
- package/fesm2022/elementar-rt-components-comment-editor.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-comparison-slider.mjs +193 -0
- package/fesm2022/elementar-rt-components-comparison-slider.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-confirm.mjs +86 -0
- package/fesm2022/elementar-rt-components-confirm.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-content-fade.mjs +35 -0
- package/fesm2022/elementar-rt-components-content-fade.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-cookie-popup.mjs +109 -0
- package/fesm2022/elementar-rt-components-cookie-popup.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-core.mjs +837 -0
- package/fesm2022/elementar-rt-components-core.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-country-select.mjs +477 -0
- package/fesm2022/elementar-rt-components-country-select.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-crop.mjs +183 -0
- package/fesm2022/elementar-rt-components-crop.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-currency-select.mjs +384 -0
- package/fesm2022/elementar-rt-components-currency-select.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-dashboard.mjs +96 -0
- package/fesm2022/elementar-rt-components-dashboard.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-data-view.mjs +302 -0
- package/fesm2022/elementar-rt-components-data-view.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-date-format-select.mjs +136 -0
- package/fesm2022/elementar-rt-components-date-format-select.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-divider.mjs +31 -0
- package/fesm2022/elementar-rt-components-divider.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-drawer.mjs +131 -0
- package/fesm2022/elementar-rt-components-drawer.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-emoji-picker.mjs +249 -0
- package/fesm2022/elementar-rt-components-emoji-picker.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-expand.mjs +60 -0
- package/fesm2022/elementar-rt-components-expand.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-filter-builder.mjs +333 -0
- package/fesm2022/elementar-rt-components-filter-builder.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-autocomplete-many-field.component-AqEghjO_.mjs +123 -0
- package/fesm2022/elementar-rt-components-form-renderer-autocomplete-many-field.component-AqEghjO_.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-checkbox-field.component-CUKmZGFq.mjs +22 -0
- package/fesm2022/elementar-rt-components-form-renderer-checkbox-field.component-CUKmZGFq.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-datepicker-field.component-DihIRWMt.mjs +40 -0
- package/fesm2022/elementar-rt-components-form-renderer-datepicker-field.component-DihIRWMt.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-divider-content.component-CjlGcU3B.mjs +17 -0
- package/fesm2022/elementar-rt-components-form-renderer-divider-content.component-CjlGcU3B.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-image-content.component-0pL2Fk0H.mjs +17 -0
- package/fesm2022/elementar-rt-components-form-renderer-image-content.component-0pL2Fk0H.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-input-field.component-X2sKvj6J.mjs +33 -0
- package/fesm2022/elementar-rt-components-form-renderer-input-field.component-X2sKvj6J.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-radio-group-field.component-DWXZAA3F.mjs +38 -0
- package/fesm2022/elementar-rt-components-form-renderer-radio-group-field.component-DWXZAA3F.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-select-field.component-Cx9DZoD6.mjs +39 -0
- package/fesm2022/elementar-rt-components-form-renderer-select-field.component-Cx9DZoD6.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-text-content.component-BmFyUG06.mjs +24 -0
- package/fesm2022/elementar-rt-components-form-renderer-text-content.component-BmFyUG06.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-textarea-field.component-D9KmE049.mjs +37 -0
- package/fesm2022/elementar-rt-components-form-renderer-textarea-field.component-D9KmE049.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-timezone-field.component-BroP_Q4P.mjs +35 -0
- package/fesm2022/elementar-rt-components-form-renderer-timezone-field.component-BroP_Q4P.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer-toggle-field.component-nGbtVi1_.mjs +22 -0
- package/fesm2022/elementar-rt-components-form-renderer-toggle-field.component-nGbtVi1_.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-form-renderer.mjs +321 -0
- package/fesm2022/elementar-rt-components-form-renderer.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-gauge.mjs +50 -0
- package/fesm2022/elementar-rt-components-gauge.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-icon.mjs +62 -0
- package/fesm2022/elementar-rt-components-icon.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-image-resizer.mjs +159 -0
- package/fesm2022/elementar-rt-components-image-resizer.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-image-viewer.mjs +349 -0
- package/fesm2022/elementar-rt-components-image-viewer.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-incidents.mjs +259 -0
- package/fesm2022/elementar-rt-components-incidents.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-inline-text-edit.mjs +181 -0
- package/fesm2022/elementar-rt-components-inline-text-edit.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-input-mask.mjs +180 -0
- package/fesm2022/elementar-rt-components-input-mask.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-input-validator.mjs +24 -0
- package/fesm2022/elementar-rt-components-input-validator.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-kanban-board.mjs +156 -0
- package/fesm2022/elementar-rt-components-kanban-board.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-layout.mjs +188 -0
- package/fesm2022/elementar-rt-components-layout.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-logo.mjs +43 -0
- package/fesm2022/elementar-rt-components-logo.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-marquee.mjs +79 -0
- package/fesm2022/elementar-rt-components-marquee.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-micro-chart.mjs +950 -0
- package/fesm2022/elementar-rt-components-micro-chart.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-navigation.mjs +379 -0
- package/fesm2022/elementar-rt-components-navigation.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-notifications.mjs +190 -0
- package/fesm2022/elementar-rt-components-notifications.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-number-input.mjs +288 -0
- package/fesm2022/elementar-rt-components-number-input.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-overlay-scrollbar.mjs +455 -0
- package/fesm2022/elementar-rt-components-overlay-scrollbar.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-overlay.mjs +112 -0
- package/fesm2022/elementar-rt-components-overlay.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-page-loading-bar.mjs +79 -0
- package/fesm2022/elementar-rt-components-page-loading-bar.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-panel.mjs +105 -0
- package/fesm2022/elementar-rt-components-panel.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-password-strength.mjs +474 -0
- package/fesm2022/elementar-rt-components-password-strength.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-phone-input.mjs +637 -0
- package/fesm2022/elementar-rt-components-phone-input.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-pin-input.mjs +197 -0
- package/fesm2022/elementar-rt-components-pin-input.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-popover.mjs +262 -0
- package/fesm2022/elementar-rt-components-popover.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-radio-card.mjs +102 -0
- package/fesm2022/elementar-rt-components-radio-card.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-rail-nav.mjs +84 -0
- package/fesm2022/elementar-rt-components-rail-nav.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-resizable-container.mjs +69 -0
- package/fesm2022/elementar-rt-components-resizable-container.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-screen-loader.mjs +27 -0
- package/fesm2022/elementar-rt-components-screen-loader.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-scroll-spy.mjs +165 -0
- package/fesm2022/elementar-rt-components-scroll-spy.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-segmented.mjs +153 -0
- package/fesm2022/elementar-rt-components-segmented.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-side-panel.mjs +110 -0
- package/fesm2022/elementar-rt-components-side-panel.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-sidebar.mjs +423 -0
- package/fesm2022/elementar-rt-components-sidebar.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-signature-pad.mjs +452 -0
- package/fesm2022/elementar-rt-components-signature-pad.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-skeleton.mjs +56 -0
- package/fesm2022/elementar-rt-components-skeleton.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-splash-screen.mjs +91 -0
- package/fesm2022/elementar-rt-components-splash-screen.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-stepper.mjs +194 -0
- package/fesm2022/elementar-rt-components-stepper.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-suggestions.mjs +76 -0
- package/fesm2022/elementar-rt-components-suggestions.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-tab-panel.mjs +270 -0
- package/fesm2022/elementar-rt-components-tab-panel.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-text-editor.mjs +1025 -0
- package/fesm2022/elementar-rt-components-text-editor.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-thumbnail-maker.mjs +214 -0
- package/fesm2022/elementar-rt-components-thumbnail-maker.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-timeline.mjs +122 -0
- package/fesm2022/elementar-rt-components-timeline.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-timezone-select.mjs +351 -0
- package/fesm2022/elementar-rt-components-timezone-select.mjs.map +1 -0
- package/fesm2022/elementar-rt-components-upload.mjs +340 -0
- package/fesm2022/elementar-rt-components-upload.mjs.map +1 -0
- package/fesm2022/elementar-rt-components.mjs +6 -0
- package/fesm2022/elementar-rt-components.mjs.map +1 -0
- package/filter-builder/index.d.ts +107 -0
- package/form-renderer/index.d.ts +121 -0
- package/gauge/index.d.ts +21 -0
- package/icon/index.d.ts +17 -0
- package/image-resizer/index.d.ts +35 -0
- package/image-viewer/index.d.ts +63 -0
- package/incidents/index.d.ts +119 -0
- package/index.d.ts +2 -0
- package/inline-text-edit/index.d.ts +39 -0
- package/input-mask/index.d.ts +36 -0
- package/input-validator/index.d.ts +5 -0
- package/kanban-board/index.d.ts +68 -0
- package/layout/index.d.ts +75 -0
- package/logo/index.d.ts +21 -0
- package/marquee/index.d.ts +26 -0
- package/micro-chart/index.d.ts +193 -0
- package/navigation/index.d.ts +119 -0
- package/notifications/index.d.ts +84 -0
- package/number-input/index.d.ts +93 -0
- package/overlay/index.d.ts +12 -0
- package/overlay-scrollbar/index.d.ts +66 -0
- package/package.json +356 -0
- package/page-loading-bar/index.d.ts +20 -0
- package/panel/index.d.ts +43 -0
- package/password-strength/index.d.ts +109 -0
- package/phone-input/index.d.ts +94 -0
- package/pin-input/index.d.ts +48 -0
- package/popover/index.d.ts +75 -0
- package/radio-card/index.d.ts +37 -0
- package/rail-nav/index.d.ts +36 -0
- package/resizable-container/index.d.ts +21 -0
- package/screen-loader/index.d.ts +9 -0
- package/scroll-spy/index.d.ts +48 -0
- package/segmented/index.d.ts +54 -0
- package/side-panel/index.d.ts +42 -0
- package/sidebar/index.d.ts +143 -0
- package/signature-pad/index.d.ts +49 -0
- package/skeleton/index.d.ts +24 -0
- package/splash-screen/index.d.ts +31 -0
- package/stepper/index.d.ts +65 -0
- package/styles/_common.scss +776 -0
- package/styles/themes/cyan-orange.scss +41 -0
- package/styles/themes/default.scss +5 -0
- package/styles/themes/magenta-violet.scss +41 -0
- package/styles/themes/rose-red.scss +41 -0
- package/suggestions/index.d.ts +32 -0
- package/tab-panel/index.d.ts +96 -0
- package/text-editor/index.d.ts +191 -0
- package/thumbnail-maker/index.d.ts +35 -0
- package/timeline/index.d.ts +57 -0
- package/timezone-select/index.d.ts +72 -0
- package/upload/index.d.ts +134 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, TemplateRef, Directive, Renderer2, ElementRef, contentChild, input, numberAttribute, booleanAttribute, output, effect, Component } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/material/core';
|
|
5
|
+
import { MatRipple } from '@angular/material/core';
|
|
6
|
+
|
|
7
|
+
const ALERT = new InjectionToken('Alert');
|
|
8
|
+
|
|
9
|
+
class AlertIconDirective {
|
|
10
|
+
templateRef = inject(TemplateRef, { optional: true });
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
12
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: AlertIconDirective, isStandalone: true, selector: "[emrAlertIcon]", host: { classAttribute: "emr-alert-icon" }, exportAs: ["emrAlertIcon"], ngImport: i0 });
|
|
13
|
+
}
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertIconDirective, decorators: [{
|
|
15
|
+
type: Directive,
|
|
16
|
+
args: [{
|
|
17
|
+
selector: '[emrAlertIcon]',
|
|
18
|
+
exportAs: 'emrAlertIcon',
|
|
19
|
+
host: {
|
|
20
|
+
'class': 'emr-alert-icon'
|
|
21
|
+
}
|
|
22
|
+
}]
|
|
23
|
+
}] });
|
|
24
|
+
|
|
25
|
+
class AlertComponent {
|
|
26
|
+
_renderer = inject(Renderer2);
|
|
27
|
+
_elementRef = inject(ElementRef);
|
|
28
|
+
iconRef = contentChild(AlertIconDirective, ...(ngDevMode ? [{ debugName: "iconRef" }] : []));
|
|
29
|
+
autoClose = input(null, ...(ngDevMode ? [{ debugName: "autoClose", transform: numberAttribute }] : [{
|
|
30
|
+
transform: numberAttribute
|
|
31
|
+
}]));
|
|
32
|
+
bordered = input(false, ...(ngDevMode ? [{ debugName: "bordered", transform: booleanAttribute }] : [{
|
|
33
|
+
transform: booleanAttribute
|
|
34
|
+
}]));
|
|
35
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
36
|
+
closed = output();
|
|
37
|
+
_autoCloseTimeout = undefined;
|
|
38
|
+
constructor() {
|
|
39
|
+
effect(() => {
|
|
40
|
+
this._renderer.setAttribute(this._elementRef.nativeElement, 'emr-alert-variant', this.variant());
|
|
41
|
+
clearTimeout(this._autoCloseTimeout);
|
|
42
|
+
if (!this.autoClose()) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this._autoCloseTimeout = setTimeout(() => {
|
|
46
|
+
this._close();
|
|
47
|
+
}, this.autoClose());
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
get api() {
|
|
51
|
+
return {
|
|
52
|
+
close: () => this._close()
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
get iconRefTemplate() {
|
|
56
|
+
return this.iconRef()?.templateRef;
|
|
57
|
+
}
|
|
58
|
+
_close() {
|
|
59
|
+
clearTimeout(this._autoCloseTimeout);
|
|
60
|
+
this._elementRef.nativeElement.remove();
|
|
61
|
+
}
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: AlertComponent, isStandalone: true, selector: "emr-alert", inputs: { autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "class.is-bordered": "bordered()" }, classAttribute: "emr-alert" }, providers: [
|
|
64
|
+
{
|
|
65
|
+
provide: ALERT,
|
|
66
|
+
useExisting: AlertComponent
|
|
67
|
+
}
|
|
68
|
+
], queries: [{ propertyName: "iconRef", first: true, predicate: AlertIconDirective, descendants: true, isSignal: true }], exportAs: ["emrAlert"], ngImport: i0, template: "<div class=\"thumbnail\">\r\n <ng-content select=\"[emrAlertIcon]\"/>\r\n @if (iconRef()) {\r\n <ng-container [ngTemplateOutlet]=\"iconRefTemplate\"/>\r\n }\r\n</div>\r\n<div class=\"content\">\r\n <div class=\"title\">\r\n <ng-content select=\"emr-alert-title,[emrAlertTitle]\"/>\r\n </div>\r\n <ng-content/>\r\n</div>\r\n<div class=\"actions\">\r\n <ng-content select=\"[emrAlertAction]\"/>\r\n</div>\r\n", styles: [":host{--emr-alert-bg-color: transparent;--emr-alert-color: inherit;--emr-alert-icon-color: white;--emr-alert-border-color: transparent;--emr-alert-border-radius: 1rem;--emr-alert-padding: calc(var(--spacing, .25rem) * 2.5) calc(var(--spacing, .25rem) * 3);--emr-alert-has-thumbnail-padding: calc(var(--spacing, .25rem) * 1.5);--emr-alert-gap: calc(var(--spacing, .25rem) * 3.5);--emr-alert-border-width: 1px;--emr-alert-font-size: .875rem;--emr-alert-thumbnail-bg: white;--emr-alert-thumbnail-border-radius: .75rem;--emr-alert-thumbnail-size: calc(var(--spacing, .25rem) * 10);--emr-alert-title-font-weight: 600;--emr-alert-title-font-size: var(--text-xs);--emr-alert-actions-gap: calc(var(--spacing, .25rem) * 1);--emr-alert-action-height: calc(var(--spacing, .25rem) * 10);--emr-alert-action-padding: 0 calc(var(--spacing, .25rem) * 3.5);--emr-alert-action-with-icon-padding: 0 calc(var(--spacing, .25rem) * 2);--emr-alert-action-hover-bg: white;--emr-alert-action-border-radius: calc(infinity * 1px);--emr-alert-action-font-weight: 500;--emr-alert-action-hover-color: inherit;position:relative;display:flex;width:100%;align-items:center;border-radius:var(--emr-alert-border-radius);gap:var(--emr-alert-gap);background:var(--emr-alert-bg-color);padding:var(--emr-alert-padding);color:var(--emr-alert-color);font-size:var(--emr-alert-font-size);border:var(--emr-alert-border-width) solid transparent}:host:has(.thumbnail:not(:empty)){padding:var(--emr-alert-has-thumbnail-padding)}:host:has(.emr-alert-title){align-items:stretch}:host .thumbnail{display:flex;align-items:center;justify-content:center;flex:none;background-color:var(--emr-alert-thumbnail-bg);color:var(--emr-alert-icon-color);width:var(--emr-alert-thumbnail-size);height:var(--emr-alert-thumbnail-size);border-radius:var(--emr-alert-thumbnail-border-radius)}:host .thumbnail:empty{display:none}:host .title{font-size:var(--emr-alert-title-font-size);font-weight:var(--emr-alert-title-font-weight);margin-bottom:calc(var(--spacing, .25rem) * 1);text-transform:uppercase;display:block}:host .title:empty{display:none}:host .actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--emr-alert-actions-gap);line-height:0;flex:none}:host .actions:empty{display:none}:host[emr-alert-variant=default],:host[emr-alert-variant=neutral]{--emr-alert-bg-color: var(--color-surface-container);--emr-alert-thumbnail-bg: var(--color-surface-dim)}:host[emr-alert-variant=info],:host[emr-alert-variant=informative]{--emr-alert-bg-color: var(--color-blue-container);--emr-alert-thumbnail-bg: var(--color-blue-container-highest)}:host[emr-alert-variant=success],:host[emr-alert-variant=positive]{--emr-alert-bg-color: var(--color-green-container);--emr-alert-thumbnail-bg: var(--color-green-container-highest)}:host[emr-alert-variant=danger],:host[emr-alert-variant=negative]{--emr-alert-bg-color: var(--color-red-container);--emr-alert-thumbnail-bg: var(--color-red-container-highest)}:host[emr-alert-variant=warning],:host[emr-alert-variant=notice]{--emr-alert-bg-color: var(--color-orange-container);--emr-alert-thumbnail-bg: var(--color-orange-container-highest)}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
69
|
+
}
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertComponent, decorators: [{
|
|
71
|
+
type: Component,
|
|
72
|
+
args: [{ selector: 'emr-alert', exportAs: 'emrAlert', imports: [NgTemplateOutlet], providers: [
|
|
73
|
+
{
|
|
74
|
+
provide: ALERT,
|
|
75
|
+
useExisting: AlertComponent
|
|
76
|
+
}
|
|
77
|
+
], host: {
|
|
78
|
+
'class': 'emr-alert',
|
|
79
|
+
'[class.is-bordered]': 'bordered()',
|
|
80
|
+
}, template: "<div class=\"thumbnail\">\r\n <ng-content select=\"[emrAlertIcon]\"/>\r\n @if (iconRef()) {\r\n <ng-container [ngTemplateOutlet]=\"iconRefTemplate\"/>\r\n }\r\n</div>\r\n<div class=\"content\">\r\n <div class=\"title\">\r\n <ng-content select=\"emr-alert-title,[emrAlertTitle]\"/>\r\n </div>\r\n <ng-content/>\r\n</div>\r\n<div class=\"actions\">\r\n <ng-content select=\"[emrAlertAction]\"/>\r\n</div>\r\n", styles: [":host{--emr-alert-bg-color: transparent;--emr-alert-color: inherit;--emr-alert-icon-color: white;--emr-alert-border-color: transparent;--emr-alert-border-radius: 1rem;--emr-alert-padding: calc(var(--spacing, .25rem) * 2.5) calc(var(--spacing, .25rem) * 3);--emr-alert-has-thumbnail-padding: calc(var(--spacing, .25rem) * 1.5);--emr-alert-gap: calc(var(--spacing, .25rem) * 3.5);--emr-alert-border-width: 1px;--emr-alert-font-size: .875rem;--emr-alert-thumbnail-bg: white;--emr-alert-thumbnail-border-radius: .75rem;--emr-alert-thumbnail-size: calc(var(--spacing, .25rem) * 10);--emr-alert-title-font-weight: 600;--emr-alert-title-font-size: var(--text-xs);--emr-alert-actions-gap: calc(var(--spacing, .25rem) * 1);--emr-alert-action-height: calc(var(--spacing, .25rem) * 10);--emr-alert-action-padding: 0 calc(var(--spacing, .25rem) * 3.5);--emr-alert-action-with-icon-padding: 0 calc(var(--spacing, .25rem) * 2);--emr-alert-action-hover-bg: white;--emr-alert-action-border-radius: calc(infinity * 1px);--emr-alert-action-font-weight: 500;--emr-alert-action-hover-color: inherit;position:relative;display:flex;width:100%;align-items:center;border-radius:var(--emr-alert-border-radius);gap:var(--emr-alert-gap);background:var(--emr-alert-bg-color);padding:var(--emr-alert-padding);color:var(--emr-alert-color);font-size:var(--emr-alert-font-size);border:var(--emr-alert-border-width) solid transparent}:host:has(.thumbnail:not(:empty)){padding:var(--emr-alert-has-thumbnail-padding)}:host:has(.emr-alert-title){align-items:stretch}:host .thumbnail{display:flex;align-items:center;justify-content:center;flex:none;background-color:var(--emr-alert-thumbnail-bg);color:var(--emr-alert-icon-color);width:var(--emr-alert-thumbnail-size);height:var(--emr-alert-thumbnail-size);border-radius:var(--emr-alert-thumbnail-border-radius)}:host .thumbnail:empty{display:none}:host .title{font-size:var(--emr-alert-title-font-size);font-weight:var(--emr-alert-title-font-weight);margin-bottom:calc(var(--spacing, .25rem) * 1);text-transform:uppercase;display:block}:host .title:empty{display:none}:host .actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--emr-alert-actions-gap);line-height:0;flex:none}:host .actions:empty{display:none}:host[emr-alert-variant=default],:host[emr-alert-variant=neutral]{--emr-alert-bg-color: var(--color-surface-container);--emr-alert-thumbnail-bg: var(--color-surface-dim)}:host[emr-alert-variant=info],:host[emr-alert-variant=informative]{--emr-alert-bg-color: var(--color-blue-container);--emr-alert-thumbnail-bg: var(--color-blue-container-highest)}:host[emr-alert-variant=success],:host[emr-alert-variant=positive]{--emr-alert-bg-color: var(--color-green-container);--emr-alert-thumbnail-bg: var(--color-green-container-highest)}:host[emr-alert-variant=danger],:host[emr-alert-variant=negative]{--emr-alert-bg-color: var(--color-red-container);--emr-alert-thumbnail-bg: var(--color-red-container-highest)}:host[emr-alert-variant=warning],:host[emr-alert-variant=notice]{--emr-alert-bg-color: var(--color-orange-container);--emr-alert-thumbnail-bg: var(--color-orange-container-highest)}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
|
|
81
|
+
}], ctorParameters: () => [], propDecorators: { iconRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AlertIconDirective), { isSignal: true }] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClose", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
82
|
+
|
|
83
|
+
class AlertTitleDirective {
|
|
84
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
85
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: AlertTitleDirective, isStandalone: true, selector: "emr-alert-title,[emrAlertTitle]", host: { classAttribute: "emr-alert-title" }, exportAs: ["emrAlertTitle"], ngImport: i0 });
|
|
86
|
+
}
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertTitleDirective, decorators: [{
|
|
88
|
+
type: Directive,
|
|
89
|
+
args: [{
|
|
90
|
+
selector: 'emr-alert-title,[emrAlertTitle]',
|
|
91
|
+
exportAs: 'emrAlertTitle',
|
|
92
|
+
host: {
|
|
93
|
+
'class': 'emr-alert-title'
|
|
94
|
+
}
|
|
95
|
+
}]
|
|
96
|
+
}] });
|
|
97
|
+
|
|
98
|
+
class AlertCloseDirective {
|
|
99
|
+
_alert = inject(ALERT);
|
|
100
|
+
_handleClick() {
|
|
101
|
+
this._alert.api.close();
|
|
102
|
+
}
|
|
103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
104
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: AlertCloseDirective, isStandalone: true, selector: "[emrAlertClose]", host: { listeners: { "click": "_handleClick()" }, classAttribute: "emr-alert-close" }, exportAs: ["emrAlertClose"], ngImport: i0 });
|
|
105
|
+
}
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertCloseDirective, decorators: [{
|
|
107
|
+
type: Directive,
|
|
108
|
+
args: [{
|
|
109
|
+
selector: '[emrAlertClose]',
|
|
110
|
+
exportAs: 'emrAlertClose',
|
|
111
|
+
host: {
|
|
112
|
+
'class': 'emr-alert-close',
|
|
113
|
+
'(click)': '_handleClick()'
|
|
114
|
+
}
|
|
115
|
+
}]
|
|
116
|
+
}] });
|
|
117
|
+
|
|
118
|
+
class AlertActionDirective {
|
|
119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
120
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: AlertActionDirective, isStandalone: true, selector: "[emrAlertAction]", host: { classAttribute: "emr-alert-action" }, exportAs: ["emrAlertAction"], hostDirectives: [{ directive: i1.MatRipple }], ngImport: i0 });
|
|
121
|
+
}
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AlertActionDirective, decorators: [{
|
|
123
|
+
type: Directive,
|
|
124
|
+
args: [{
|
|
125
|
+
selector: '[emrAlertAction]',
|
|
126
|
+
exportAs: 'emrAlertAction',
|
|
127
|
+
host: {
|
|
128
|
+
'class': 'emr-alert-action'
|
|
129
|
+
},
|
|
130
|
+
hostDirectives: [MatRipple]
|
|
131
|
+
}]
|
|
132
|
+
}] });
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Generated bundle index. Do not edit.
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
export { ALERT, AlertActionDirective, AlertCloseDirective, AlertComponent, AlertIconDirective, AlertTitleDirective };
|
|
139
|
+
//# sourceMappingURL=elementar-rt-components-alert.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elementar-rt-components-alert.mjs","sources":["../../../projects/components/alert/src/alert.properties.ts","../../../projects/components/alert/src/alert-icon.directive.ts","../../../projects/components/alert/src/alert/alert.component.ts","../../../projects/components/alert/src/alert/alert.component.html","../../../projects/components/alert/src/alert-title.directive.ts","../../../projects/components/alert/src/alert-close.directive.ts","../../../projects/components/alert/src/alert-action.directive.ts","../../../projects/components/alert/elementar-rt-components-alert.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport const ALERT = new InjectionToken('Alert');\r\nexport type AlertVariant = 'default' | 'secondary' | 'positive' | 'informative' | 'negative' | 'notice' | string;\r\n","import { Directive, inject, TemplateRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[emrAlertIcon]',\r\n exportAs: 'emrAlertIcon',\r\n host: {\r\n 'class': 'emr-alert-icon'\r\n }\r\n})\r\nexport class AlertIconDirective {\r\n public readonly templateRef = inject(TemplateRef, { optional: true });\r\n}\r\n","import {\r\n booleanAttribute,\r\n Component,\r\n ElementRef,\r\n inject,\r\n Input,\r\n OnInit,\r\n Renderer2,\r\n contentChild, TemplateRef, input, numberAttribute, effect, output, OnChanges, SimpleChanges\r\n} from '@angular/core';\r\nimport { ALERT, AlertVariant } from '../alert.properties';\r\nimport { AlertIconDirective } from '../alert-icon.directive';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'emr-alert',\r\n exportAs: 'emrAlert',\r\n imports: [NgTemplateOutlet],\r\n templateUrl: './alert.component.html',\r\n styleUrl: './alert.component.scss',\r\n providers: [\r\n {\r\n provide: ALERT,\r\n useExisting: AlertComponent\r\n }\r\n ],\r\n host: {\r\n 'class': 'emr-alert',\r\n '[class.is-bordered]': 'bordered()',\r\n }\r\n})\r\nexport class AlertComponent {\r\n private _renderer = inject(Renderer2);\r\n private _elementRef = inject(ElementRef);\r\n readonly iconRef = contentChild(AlertIconDirective);\r\n\r\n autoClose = input(null, {\r\n transform: numberAttribute\r\n });\r\n bordered = input(false, {\r\n transform: booleanAttribute\r\n });\r\n variant = input<AlertVariant>('default');\r\n\r\n readonly closed = output<void>();\r\n private _autoCloseTimeout: any = undefined;\r\n\r\n constructor() {\r\n effect(() => {\r\n this._renderer.setAttribute(this._elementRef.nativeElement, 'emr-alert-variant', this.variant());\r\n\r\n clearTimeout(this._autoCloseTimeout);\r\n\r\n if (!this.autoClose()) {\r\n return;\r\n }\r\n\r\n this._autoCloseTimeout = setTimeout(() => {\r\n this._close();\r\n }, this.autoClose() as number);\r\n });\r\n }\r\n\r\n get api() {\r\n return {\r\n close: () => this._close()\r\n };\r\n }\r\n\r\n protected get iconRefTemplate(): TemplateRef<any> {\r\n return this.iconRef()?.templateRef as TemplateRef<any>;\r\n }\r\n\r\n private _close() {\r\n clearTimeout(this._autoCloseTimeout);\r\n this._elementRef.nativeElement.remove();\r\n }\r\n}\r\n","<div class=\"thumbnail\">\r\n <ng-content select=\"[emrAlertIcon]\"/>\r\n @if (iconRef()) {\r\n <ng-container [ngTemplateOutlet]=\"iconRefTemplate\"/>\r\n }\r\n</div>\r\n<div class=\"content\">\r\n <div class=\"title\">\r\n <ng-content select=\"emr-alert-title,[emrAlertTitle]\"/>\r\n </div>\r\n <ng-content/>\r\n</div>\r\n<div class=\"actions\">\r\n <ng-content select=\"[emrAlertAction]\"/>\r\n</div>\r\n","import { Directive } from '@angular/core';\r\n\r\n@Directive({\r\n selector: 'emr-alert-title,[emrAlertTitle]',\r\n exportAs: 'emrAlertTitle',\r\n host: {\r\n 'class': 'emr-alert-title'\r\n }\r\n})\r\nexport class AlertTitleDirective {\r\n}\r\n","import { Directive, inject } from '@angular/core';\r\nimport { ALERT } from './alert.properties';\r\nimport { AlertComponent } from './alert/alert.component';\r\n\r\n@Directive({\r\n selector: '[emrAlertClose]',\r\n exportAs: 'emrAlertClose',\r\n host: {\r\n 'class': 'emr-alert-close',\r\n '(click)': '_handleClick()'\r\n }\r\n})\r\nexport class AlertCloseDirective {\r\n private _alert = inject<AlertComponent>(ALERT);\r\n\r\n protected _handleClick() {\r\n this._alert.api.close();\r\n }\r\n}\r\n","import { Directive } from '@angular/core';\r\nimport { MatRipple } from \"@angular/material/core\";\r\n\r\n@Directive({\r\n selector: '[emrAlertAction]',\r\n exportAs: 'emrAlertAction',\r\n host: {\r\n 'class': 'emr-alert-action'\r\n },\r\n hostDirectives: [MatRipple]\r\n})\r\nexport class AlertActionDirective {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAEa,KAAK,GAAG,IAAI,cAAc,CAAC,OAAO;;MCOlC,kBAAkB,CAAA;IACb,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;wGAD1D,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAP9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACF,wBAAA,OAAO,EAAE;AACZ;AACJ,iBAAA;;;MCuBY,cAAc,CAAA;AACjB,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,OAAO,GAAG,YAAY,CAAC,kBAAkB,mDAAC;IAEnD,SAAS,GAAG,KAAK,CAAC,IAAI,6CACpB,SAAS,EAAE,eAAe,EAAA,CAAA,GAAA,CADJ;AACtB,YAAA,SAAS,EAAE;AACZ,SAAA,CAAA,CAAA,CAA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E;AACZ;AACJ,iBAAA;;;MCAY,oBAAoB,CAAA;wGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACF,wBAAA,OAAO,EAAE;AACZ,qBAAA;oBACD,cAAc,EAAE,CAAC,SAAS;AAC7B,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Renderer2, input, booleanAttribute, output, effect, Component, computed } from '@angular/core';
|
|
3
|
+
import { MatIcon } from '@angular/material/icon';
|
|
4
|
+
import { MatIconButton } from '@angular/material/button';
|
|
5
|
+
import { signalStore, withState, withMethods, patchState } from '@ngrx/signals';
|
|
6
|
+
|
|
7
|
+
class AnnouncementComponent {
|
|
8
|
+
_elementRef = inject(ElementRef);
|
|
9
|
+
_renderer = inject(Renderer2);
|
|
10
|
+
variant = input('neutral', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
11
|
+
iconName = input('', ...(ngDevMode ? [{ debugName: "iconName" }] : []));
|
|
12
|
+
closable = input(false, ...(ngDevMode ? [{ debugName: "closable", transform: booleanAttribute }] : [{
|
|
13
|
+
transform: booleanAttribute
|
|
14
|
+
}]));
|
|
15
|
+
closed = output();
|
|
16
|
+
constructor() {
|
|
17
|
+
effect(() => {
|
|
18
|
+
this._renderer.setAttribute(this._elementRef.nativeElement, 'data-variant', this.variant() || 'neutral');
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
close() {
|
|
22
|
+
this.closed.emit();
|
|
23
|
+
}
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AnnouncementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: AnnouncementComponent, isStandalone: true, selector: "emr-announcement", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { classAttribute: "emr-announcement" }, exportAs: ["emrAnnouncement"], ngImport: i0, template: "<div class=\"content\">\r\n @if (iconName()) {\r\n <div class=\"icon\">\r\n <mat-icon>{{ iconName() }}</mat-icon>\r\n </div>\r\n }\r\n <ng-content/>\r\n</div>\r\n@if (closable()) {\r\n <div class=\"close\">\r\n <button mat-icon-button (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n}\r\n", styles: [":host{--emr-announcement-close-icon-color: var(--color-neutral-800);padding-inline-start:calc(var(--spacing, .25rem) * 5);padding-inline-end:calc(var(--spacing, .25rem) * 3);height:calc(var(--spacing, .25rem) * 11);display:flex;align-items:center;justify-content:space-between;font-size:.875rem}:host:has(.icon){padding-inline-start:calc(var(--spacing, .25rem) * 3.5)}:host .content{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2.5)}:host .icon{display:inline-flex;align-items:center;justify-content:center}:host .close{display:inline-flex;align-items:center;justify-content:center}:host .close:hover{opacity:100%}:host:has(.close){padding-inline-end:calc(var(--spacing, .25rem) * 1.5)}:host[data-variant=default],:host[data-variant=neutral]{background:var(--color-surface-container)}:host[data-variant=default] .icon,:host[data-variant=neutral] .icon{color:var(--color-on-surface)}:host[data-variant=info],:host[data-variant=informative]{background:var(--color-blue-container)}:host[data-variant=info] .icon,:host[data-variant=informative] .icon{color:var(--color-on-blue-container)}:host[data-variant=danger],:host[data-variant=negative]{background:var(--color-red-container)}:host[data-variant=danger] .icon,:host[data-variant=negative] .icon{color:var(--color-on-red-container)}:host[data-variant=success],:host[data-variant=positive]{background:var(--color-green-container)}:host[data-variant=success] .icon,:host[data-variant=positive] .icon{color:var(--color-on-green-container)}:host[data-variant=warning],:host[data-variant=notice]{background:var(--color-orange-container)}:host[data-variant=warning] .icon,:host[data-variant=notice] .icon{color:var(--color-on-orange-container)}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }] });
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AnnouncementComponent, decorators: [{
|
|
28
|
+
type: Component,
|
|
29
|
+
args: [{ selector: 'emr-announcement', exportAs: 'emrAnnouncement', imports: [
|
|
30
|
+
MatIcon,
|
|
31
|
+
MatIconButton
|
|
32
|
+
], host: {
|
|
33
|
+
'class': 'emr-announcement'
|
|
34
|
+
}, template: "<div class=\"content\">\r\n @if (iconName()) {\r\n <div class=\"icon\">\r\n <mat-icon>{{ iconName() }}</mat-icon>\r\n </div>\r\n }\r\n <ng-content/>\r\n</div>\r\n@if (closable()) {\r\n <div class=\"close\">\r\n <button mat-icon-button (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n}\r\n", styles: [":host{--emr-announcement-close-icon-color: var(--color-neutral-800);padding-inline-start:calc(var(--spacing, .25rem) * 5);padding-inline-end:calc(var(--spacing, .25rem) * 3);height:calc(var(--spacing, .25rem) * 11);display:flex;align-items:center;justify-content:space-between;font-size:.875rem}:host:has(.icon){padding-inline-start:calc(var(--spacing, .25rem) * 3.5)}:host .content{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2.5)}:host .icon{display:inline-flex;align-items:center;justify-content:center}:host .close{display:inline-flex;align-items:center;justify-content:center}:host .close:hover{opacity:100%}:host:has(.close){padding-inline-end:calc(var(--spacing, .25rem) * 1.5)}:host[data-variant=default],:host[data-variant=neutral]{background:var(--color-surface-container)}:host[data-variant=default] .icon,:host[data-variant=neutral] .icon{color:var(--color-on-surface)}:host[data-variant=info],:host[data-variant=informative]{background:var(--color-blue-container)}:host[data-variant=info] .icon,:host[data-variant=informative] .icon{color:var(--color-on-blue-container)}:host[data-variant=danger],:host[data-variant=negative]{background:var(--color-red-container)}:host[data-variant=danger] .icon,:host[data-variant=negative] .icon{color:var(--color-on-red-container)}:host[data-variant=success],:host[data-variant=positive]{background:var(--color-green-container)}:host[data-variant=success] .icon,:host[data-variant=positive] .icon{color:var(--color-on-green-container)}:host[data-variant=warning],:host[data-variant=notice]{background:var(--color-orange-container)}:host[data-variant=warning] .icon,:host[data-variant=notice] .icon{color:var(--color-on-orange-container)}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
|
|
35
|
+
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
36
|
+
|
|
37
|
+
const initialState = {
|
|
38
|
+
announcement: null,
|
|
39
|
+
};
|
|
40
|
+
const AnnouncementStore = signalStore({ providedIn: 'root' }, withState(initialState), withMethods((store) => ({
|
|
41
|
+
show(announcement) {
|
|
42
|
+
patchState(store, { announcement });
|
|
43
|
+
},
|
|
44
|
+
hide() {
|
|
45
|
+
patchState(store, { announcement: null });
|
|
46
|
+
}
|
|
47
|
+
})));
|
|
48
|
+
|
|
49
|
+
class AnnouncementGlobalComponent {
|
|
50
|
+
_announcementStore = inject(AnnouncementStore);
|
|
51
|
+
announcement = computed(() => {
|
|
52
|
+
return this._announcementStore.announcement();
|
|
53
|
+
}, ...(ngDevMode ? [{ debugName: "announcement" }] : []));
|
|
54
|
+
announcementClose = output();
|
|
55
|
+
onClose() {
|
|
56
|
+
this._announcementStore.hide();
|
|
57
|
+
}
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AnnouncementGlobalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: AnnouncementGlobalComponent, isStandalone: true, selector: "emr-announcement-global", outputs: { announcementClose: "announcementClose" }, exportAs: ["emrAnnouncementGlobal"], ngImport: i0, template: "@if (announcement()) {\r\n <emr-announcement closable\r\n [iconName]=\"announcement()?.iconName || ''\"\r\n [variant]=\"announcement()?.variant || ''\"\r\n (closed)=\"onClose()\">\r\n {{ announcement()?.message }}\r\n </emr-announcement>\r\n}\r\n", styles: [":host{display:contents}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AnnouncementComponent, selector: "emr-announcement", inputs: ["variant", "iconName", "closable"], outputs: ["closed"], exportAs: ["emrAnnouncement"] }] });
|
|
60
|
+
}
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AnnouncementGlobalComponent, decorators: [{
|
|
62
|
+
type: Component,
|
|
63
|
+
args: [{ selector: 'emr-announcement-global', exportAs: 'emrAnnouncementGlobal', imports: [
|
|
64
|
+
AnnouncementComponent
|
|
65
|
+
], template: "@if (announcement()) {\r\n <emr-announcement closable\r\n [iconName]=\"announcement()?.iconName || ''\"\r\n [variant]=\"announcement()?.variant || ''\"\r\n (closed)=\"onClose()\">\r\n {{ announcement()?.message }}\r\n </emr-announcement>\r\n}\r\n", styles: [":host{display:contents}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
|
|
66
|
+
}], propDecorators: { announcementClose: [{ type: i0.Output, args: ["announcementClose"] }] } });
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Generated bundle index. Do not edit.
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
export { AnnouncementComponent, AnnouncementGlobalComponent, AnnouncementStore };
|
|
73
|
+
//# sourceMappingURL=elementar-rt-components-announcement.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elementar-rt-components-announcement.mjs","sources":["../../../projects/components/announcement/src/announcement/announcement.component.ts","../../../projects/components/announcement/src/announcement/announcement.component.html","../../../projects/components/announcement/src/announcement.store.ts","../../../projects/components/announcement/src/announcement-global/announcement-global.component.ts","../../../projects/components/announcement/src/announcement-global/announcement-global.component.html","../../../projects/components/announcement/elementar-rt-components-announcement.ts"],"sourcesContent":["import {\r\n booleanAttribute,\r\n Component, effect,\r\n ElementRef,\r\n inject,\r\n input,\r\n output,\r\n Renderer2\r\n} from '@angular/core';\r\nimport { MatIcon } from '@angular/material/icon';\r\nimport { MatIconButton } from '@angular/material/button';\r\nimport { AnnouncementVariant } from '../types';\r\n\r\n@Component({\r\n selector: 'emr-announcement',\r\n exportAs: 'emrAnnouncement',\r\n imports: [\r\n MatIcon,\r\n MatIconButton\r\n ],\r\n templateUrl: './announcement.component.html',\r\n styleUrl: './announcement.component.scss',\r\n host: {\r\n 'class': 'emr-announcement'\r\n }\r\n})\r\nexport class AnnouncementComponent {\r\n private _elementRef = inject(ElementRef);\r\n private _renderer = inject(Renderer2);\r\n\r\n variant = input<AnnouncementVariant>('neutral');\r\n iconName = input('');\r\n closable = input(false, {\r\n transform: booleanAttribute\r\n });\r\n\r\n readonly closed = output<void>();\r\n\r\n constructor() {\r\n effect(() => {\r\n this._renderer.setAttribute(this._elementRef.nativeElement, 'data-variant', this.variant() || 'neutral');\r\n });\r\n }\r\n\r\n protected close() {\r\n this.closed.emit();\r\n }\r\n}\r\n","<div class=\"content\">\r\n @if (iconName()) {\r\n <div class=\"icon\">\r\n <mat-icon>{{ iconName() }}</mat-icon>\r\n </div>\r\n }\r\n <ng-content/>\r\n</div>\r\n@if (closable()) {\r\n <div class=\"close\">\r\n <button mat-icon-button (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n}\r\n","import { patchState, signalStore, withMethods, withState } from '@ngrx/signals';\r\nimport { Announcement } from './types';\r\n\r\nexport interface AnnouncementState {\r\n announcement: Announcement | null;\r\n}\r\n\r\nconst initialState: AnnouncementState = {\r\n announcement: null,\r\n};\r\n\r\nexport const AnnouncementStore = signalStore(\r\n { providedIn: 'root' },\r\n withState(initialState),\r\n withMethods((store) => ({\r\n show(announcement: Announcement): void {\r\n patchState(store, { announcement });\r\n },\r\n hide() {\r\n patchState(store, { announcement: null });\r\n }\r\n }))\r\n);\r\n","import { Component, computed, inject, output } from '@angular/core';\r\nimport { AnnouncementStore } from '../announcement.store';\r\nimport { Announcement } from '../types';\r\nimport { AnnouncementComponent } from '../announcement/announcement.component';\r\n\r\n@Component({\r\n selector: 'emr-announcement-global',\r\n exportAs: 'emrAnnouncementGlobal',\r\n imports: [\r\n AnnouncementComponent\r\n ],\r\n templateUrl: './announcement-global.component.html',\r\n styleUrl: './announcement-global.component.scss'\r\n})\r\nexport class AnnouncementGlobalComponent {\r\n private _announcementStore = inject(AnnouncementStore);\r\n\r\n announcement = computed<Announcement | null>(() => {\r\n return this._announcementStore.announcement();\r\n });\r\n\r\n readonly announcementClose = output<void>();\r\n\r\n onClose() {\r\n this._announcementStore.hide();\r\n }\r\n}\r\n","@if (announcement()) {\r\n <emr-announcement closable\r\n [iconName]=\"announcement()?.iconName || ''\"\r\n [variant]=\"announcement()?.variant || ''\"\r\n (closed)=\"onClose()\">\r\n {{ announcement()?.message }}\r\n </emr-announcement>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA0Ba,qBAAqB,CAAA;AACxB,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAErC,IAAA,OAAO,GAAG,KAAK,CAAsB,SAAS,mDAAC;AAC/C,IAAA,QAAQ,GAAG,KAAK,CAAC,EAAE,oDAAC;IACpB,QAAQ,GAAG,KAAK,CAAC,KAAK,4CACpB,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CADL;AACtB,YAAA,SAAS,EAAE;AACZ,SAAA,CAAA,CAAA,CAAC;IAEO,MAAM,GAAG,MAAM,EAAQ;AAEhC,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,cAAc,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,SAAS,CAAC;AAC1G,QAAA,CAAC,CAAC;IACJ;IAEU,KAAK,GAAA;AACb,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;IACpB;wGApBW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,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AAA,CAAA,EAAA,QAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKZ,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBATvC,SAAS;+BACE,yBAAyB,EAAA,QAAA,EACzB,uBAAuB,EAAA,OAAA,EACxB;wBACP;AACD,qBAAA,EAAA,QAAA,EAAA,sTAAA,EAAA,MAAA,EAAA,CAAA,+FAAA,CAAA,EAAA;;;AEVH;;AAEG;;;;"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ElementRef, input, booleanAttribute, forwardRef, Component } from '@angular/core';
|
|
3
|
+
import { createAvatar } from '@dicebear/core';
|
|
4
|
+
import { initials, identicon } from '@dicebear/collection';
|
|
5
|
+
import { v7 } from 'uuid';
|
|
6
|
+
import { SafeHtmlPipe } from '@elementar-rt/components/core';
|
|
7
|
+
|
|
8
|
+
const AVATAR_ACCESSOR = new InjectionToken('AVATAR_ACCESSOR');
|
|
9
|
+
|
|
10
|
+
const alreadyLoadedImages$1 = [];
|
|
11
|
+
class AvatarComponent {
|
|
12
|
+
_elementRef = inject(ElementRef);
|
|
13
|
+
image = input('', ...(ngDevMode ? [{ debugName: "image" }] : []));
|
|
14
|
+
clickable = input(false, ...(ngDevMode ? [{ debugName: "clickable", transform: booleanAttribute }] : [{
|
|
15
|
+
transform: booleanAttribute
|
|
16
|
+
}]));
|
|
17
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
18
|
+
alt = input('', ...(ngDevMode ? [{ debugName: "alt" }] : []));
|
|
19
|
+
automaticColor = input(...(ngDevMode ? [undefined, { debugName: "automaticColor" }] : []));
|
|
20
|
+
presenceIndicator = input(null, ...(ngDevMode ? [{ debugName: "presenceIndicator" }] : []));
|
|
21
|
+
imageLoaded;
|
|
22
|
+
showLabel = false;
|
|
23
|
+
ngOnInit() {
|
|
24
|
+
if (!this.image()) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.imageLoaded = alreadyLoadedImages$1.includes(this.image());
|
|
28
|
+
}
|
|
29
|
+
ngAfterViewInit() {
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
this.showLabel = true;
|
|
32
|
+
}, 0);
|
|
33
|
+
}
|
|
34
|
+
ngOnChanges(changes) {
|
|
35
|
+
if (changes['automaticColor'] && changes['automaticColor'].currentValue) {
|
|
36
|
+
this._setAutomaticColor(changes['automaticColor'].currentValue);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
onImageLoaded() {
|
|
40
|
+
if (this.imageLoaded) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
alreadyLoadedImages$1.push(this.image());
|
|
44
|
+
this.imageLoaded = true;
|
|
45
|
+
}
|
|
46
|
+
_setAutomaticColor(color) {
|
|
47
|
+
if (!this.isValidHex(color)) {
|
|
48
|
+
throw new Error(`Invalid ${color} color, automatic color supports only a valid hex color`);
|
|
49
|
+
}
|
|
50
|
+
const element = this._elementRef.nativeElement;
|
|
51
|
+
element.style.setProperty('--emr-avatar-bg', color);
|
|
52
|
+
element.style.setProperty('--emr-avatar-border-color', this._newShade(color, -25));
|
|
53
|
+
element.style.setProperty('--emr-avatar-color', this._newShade(color, -150));
|
|
54
|
+
}
|
|
55
|
+
_newShade(hexColor, magnitude) {
|
|
56
|
+
hexColor = hexColor.replace(`#`, ``);
|
|
57
|
+
if (hexColor.length === 6) {
|
|
58
|
+
const decimalColor = parseInt(hexColor, 16);
|
|
59
|
+
let r = (decimalColor >> 16) + magnitude;
|
|
60
|
+
r > 255 && (r = 255);
|
|
61
|
+
r < 0 && (r = 0);
|
|
62
|
+
let g = (decimalColor & 0x0000ff) + magnitude;
|
|
63
|
+
g > 255 && (g = 255);
|
|
64
|
+
g < 0 && (g = 0);
|
|
65
|
+
let b = ((decimalColor >> 8) & 0x00ff) + magnitude;
|
|
66
|
+
b > 255 && (b = 255);
|
|
67
|
+
b < 0 && (b = 0);
|
|
68
|
+
return `#${(g | (b << 8) | (r << 16)).toString(16)}`;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
return hexColor;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
;
|
|
75
|
+
isValidHex(color) {
|
|
76
|
+
if (!color || typeof color !== 'string') {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
// Validate hex values
|
|
80
|
+
if (color.substring(0, 1) === '#') {
|
|
81
|
+
color = color.substring(1);
|
|
82
|
+
}
|
|
83
|
+
switch (color.length) {
|
|
84
|
+
case 3: {
|
|
85
|
+
return /^[0-9A-F]{3}$/i.test(color);
|
|
86
|
+
}
|
|
87
|
+
case 6: {
|
|
88
|
+
return /^[0-9A-F]{6}$/i.test(color);
|
|
89
|
+
}
|
|
90
|
+
case 8: {
|
|
91
|
+
return /^[0-9A-F]{8}$/i.test(color);
|
|
92
|
+
}
|
|
93
|
+
default: {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
99
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: AvatarComponent, isStandalone: true, selector: "emr-avatar,[emr-avatar]", inputs: { image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, automaticColor: { classPropertyName: "automaticColor", publicName: "automaticColor", isSignal: true, isRequired: false, transformFunction: null }, presenceIndicator: { classPropertyName: "presenceIndicator", publicName: "presenceIndicator", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.is-clickable": "clickable()", "class.has-automatic-color": "!!automaticColor()", "class.has-loaded-image": "image() && imageLoaded" }, classAttribute: "emr-avatar" }, providers: [
|
|
100
|
+
{
|
|
101
|
+
provide: AVATAR_ACCESSOR,
|
|
102
|
+
useExisting: forwardRef(() => AvatarComponent),
|
|
103
|
+
multi: true
|
|
104
|
+
}
|
|
105
|
+
], exportAs: ["emrAvatar"], usesOnChanges: true, ngImport: i0, template: "@if (image()) {\r\n <img class=\"image\" loading=\"lazy\" [src]=\"image()\" [alt]=\"alt()\" (load)=\"onImageLoaded()\">\r\n}\r\n\r\n@if (presenceIndicator()) {\r\n <div class=\"presence-indicator\"\r\n [class.is-online]=\"presenceIndicator() === 'online'\"\r\n [class.is-offline]=\"presenceIndicator() === 'offline'\"\r\n [class.is-away]=\"presenceIndicator() === 'away'\"></div>\r\n}\r\n\r\n@if (label() && showLabel) {\r\n <svg viewBox=\"0 0 50 50\" class=\"text\">\r\n <text\r\n x=\"50%\"\r\n y=\"50%\"\r\n alignment-baseline=\"central\"\r\n text-anchor=\"middle\"\r\n font-weight=\"inherit\"\r\n font-size=\"20\"\r\n fill=\"currentColor\">{{ label() }}</text>\r\n </svg>\r\n}\r\n\r\n<ng-content select=\"mat-icon,emr-icon\"/>\r\n", styles: [":host{--emr-avatar-font-weight: 500;--emr-avatar-size: calc(var(--spacing, .25rem) * 10);--emr-avatar-border-radius: calc(infinity * 1px);--emr-avatar-bg: #778da9;--emr-avatar-color: #fff;--emr-avatar-presence-indicator-size: 20%;--emr-avatar-presence-indicator-position-top: 5%;--emr-avatar-presence-indicator-position-end: 5%;--emr-avatar-presence-indicator-online-bg: #57cc99;--emr-avatar-presence-indicator-offline-bg: var(--color-surface-variant);--emr-avatar-presence-indicator-away-bg: #ffd60a;--emr-avatar-presence-indicator-outline: white solid 2px;--emr-avatar-inner-border: inset 0 0 2px var(--color-border);display:inline-flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;flex:none;text-transform:uppercase;position:relative;font-weight:var(--emr-avatar-font-weight)}:host:not([class*=shadow-]){box-shadow:var(--emr-avatar-inner-border)}:host:not([class*=text-]){color:var(--emr-avatar-color)}:host:not([class*=rounded]){border-radius:var(--emr-avatar-border-radius)}:host:not([class*=w-]):not([class*=size-]){width:var(--emr-avatar-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--emr-avatar-size)}:host:not([class*=bg-]):not(.has-loaded-image){background:var(--emr-avatar-bg)}:host .text{z-index:0;width:100%;height:100%}:host.has-loaded-image .text{display:none}:host.is-clickable{cursor:pointer}:host.is-hidden{display:none}:host.is-clickable:active{scale:.97}:host .image{display:inline;object-fit:cover;position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1}:host .presence-indicator{position:absolute;z-index:1;outline:var(--emr-avatar-presence-indicator-outline);border-radius:6.1875rem;width:var(--emr-avatar-presence-indicator-size);height:var(--emr-avatar-presence-indicator-size);top:var(--emr-avatar-presence-indicator-position-top);inset-inline-end:var(--emr-avatar-presence-indicator-position-end)}:host .presence-indicator.is-online{background:var(--emr-avatar-presence-indicator-online-bg)}:host .presence-indicator.is-offline{background:var(--emr-avatar-presence-indicator-offline-bg)}:host .presence-indicator.is-away{background:var(--emr-avatar-presence-indicator-away-bg)}:host ::ng-deep .mat-icon{display:flex;align-items:center;justify-content:center}:host.has-automatic-color{border:1px solid var(--emr-avatar-border-color)}:host-context(html.dark){--emr-avatar-group-item-border: .125rem solid var(--color-neutral-950);--emr-avatar-presence-indicator-outline: var(--color-neutral-950) solid 2px}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] });
|
|
106
|
+
}
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
108
|
+
type: Component,
|
|
109
|
+
args: [{ selector: 'emr-avatar,[emr-avatar]', exportAs: 'emrAvatar', standalone: true, providers: [
|
|
110
|
+
{
|
|
111
|
+
provide: AVATAR_ACCESSOR,
|
|
112
|
+
useExisting: forwardRef(() => AvatarComponent),
|
|
113
|
+
multi: true
|
|
114
|
+
}
|
|
115
|
+
], host: {
|
|
116
|
+
'class': 'emr-avatar',
|
|
117
|
+
'[class.is-clickable]': 'clickable()',
|
|
118
|
+
'[class.has-automatic-color]': '!!automaticColor()',
|
|
119
|
+
'[class.has-loaded-image]': 'image() && imageLoaded',
|
|
120
|
+
}, template: "@if (image()) {\r\n <img class=\"image\" loading=\"lazy\" [src]=\"image()\" [alt]=\"alt()\" (load)=\"onImageLoaded()\">\r\n}\r\n\r\n@if (presenceIndicator()) {\r\n <div class=\"presence-indicator\"\r\n [class.is-online]=\"presenceIndicator() === 'online'\"\r\n [class.is-offline]=\"presenceIndicator() === 'offline'\"\r\n [class.is-away]=\"presenceIndicator() === 'away'\"></div>\r\n}\r\n\r\n@if (label() && showLabel) {\r\n <svg viewBox=\"0 0 50 50\" class=\"text\">\r\n <text\r\n x=\"50%\"\r\n y=\"50%\"\r\n alignment-baseline=\"central\"\r\n text-anchor=\"middle\"\r\n font-weight=\"inherit\"\r\n font-size=\"20\"\r\n fill=\"currentColor\">{{ label() }}</text>\r\n </svg>\r\n}\r\n\r\n<ng-content select=\"mat-icon,emr-icon\"/>\r\n", styles: [":host{--emr-avatar-font-weight: 500;--emr-avatar-size: calc(var(--spacing, .25rem) * 10);--emr-avatar-border-radius: calc(infinity * 1px);--emr-avatar-bg: #778da9;--emr-avatar-color: #fff;--emr-avatar-presence-indicator-size: 20%;--emr-avatar-presence-indicator-position-top: 5%;--emr-avatar-presence-indicator-position-end: 5%;--emr-avatar-presence-indicator-online-bg: #57cc99;--emr-avatar-presence-indicator-offline-bg: var(--color-surface-variant);--emr-avatar-presence-indicator-away-bg: #ffd60a;--emr-avatar-presence-indicator-outline: white solid 2px;--emr-avatar-inner-border: inset 0 0 2px var(--color-border);display:inline-flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;flex:none;text-transform:uppercase;position:relative;font-weight:var(--emr-avatar-font-weight)}:host:not([class*=shadow-]){box-shadow:var(--emr-avatar-inner-border)}:host:not([class*=text-]){color:var(--emr-avatar-color)}:host:not([class*=rounded]){border-radius:var(--emr-avatar-border-radius)}:host:not([class*=w-]):not([class*=size-]){width:var(--emr-avatar-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--emr-avatar-size)}:host:not([class*=bg-]):not(.has-loaded-image){background:var(--emr-avatar-bg)}:host .text{z-index:0;width:100%;height:100%}:host.has-loaded-image .text{display:none}:host.is-clickable{cursor:pointer}:host.is-hidden{display:none}:host.is-clickable:active{scale:.97}:host .image{display:inline;object-fit:cover;position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1}:host .presence-indicator{position:absolute;z-index:1;outline:var(--emr-avatar-presence-indicator-outline);border-radius:6.1875rem;width:var(--emr-avatar-presence-indicator-size);height:var(--emr-avatar-presence-indicator-size);top:var(--emr-avatar-presence-indicator-position-top);inset-inline-end:var(--emr-avatar-presence-indicator-position-end)}:host .presence-indicator.is-online{background:var(--emr-avatar-presence-indicator-online-bg)}:host .presence-indicator.is-offline{background:var(--emr-avatar-presence-indicator-offline-bg)}:host .presence-indicator.is-away{background:var(--emr-avatar-presence-indicator-away-bg)}:host ::ng-deep .mat-icon{display:flex;align-items:center;justify-content:center}:host.has-automatic-color{border:1px solid var(--emr-avatar-border-color)}:host-context(html.dark){--emr-avatar-group-item-border: .125rem solid var(--color-neutral-950);--emr-avatar-presence-indicator-outline: var(--color-neutral-950) solid 2px}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
|
|
121
|
+
}], propDecorators: { image: [{ type: i0.Input, args: [{ isSignal: true, alias: "image", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], automaticColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "automaticColor", required: false }] }], presenceIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "presenceIndicator", required: false }] }] } });
|
|
122
|
+
|
|
123
|
+
class AvatarGroupComponent {
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: AvatarGroupComponent, isStandalone: true, selector: "emr-avatar-group", host: { classAttribute: "emr-avatar-group" }, exportAs: ["emrAvatarGroup"], ngImport: i0, template: "<ng-content/>\r\n", styles: [":host{--emr-avatar-group-item-offset: calc(var(--spacing) * 2.5);--emr-avatar-group-item-border: 2px solid white;display:flex;flex:none;position:relative;align-items:center}:host ::ng-deep *+*{margin-left:calc(var(--emr-avatar-group-item-offset) * -1)}:host ::ng-deep .emr-avatar,:host ::ng-deep .emr-avatar-total,:host ::ng-deep .emr-avatar-more{border:var(--emr-avatar-group-item-border);z-index:0}:host ::ng-deep .emr-avatar:hover,:host ::ng-deep .emr-avatar-total:hover,:host ::ng-deep .emr-avatar-more:hover{z-index:1}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] });
|
|
126
|
+
}
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarGroupComponent, decorators: [{
|
|
128
|
+
type: Component,
|
|
129
|
+
args: [{ selector: 'emr-avatar-group', exportAs: 'emrAvatarGroup', standalone: true, host: {
|
|
130
|
+
'class': 'emr-avatar-group'
|
|
131
|
+
}, template: "<ng-content/>\r\n", styles: [":host{--emr-avatar-group-item-offset: calc(var(--spacing) * 2.5);--emr-avatar-group-item-border: 2px solid white;display:flex;flex:none;position:relative;align-items:center}:host ::ng-deep *+*{margin-left:calc(var(--emr-avatar-group-item-offset) * -1)}:host ::ng-deep .emr-avatar,:host ::ng-deep .emr-avatar-total,:host ::ng-deep .emr-avatar-more{border:var(--emr-avatar-group-item-border);z-index:0}:host ::ng-deep .emr-avatar:hover,:host ::ng-deep .emr-avatar-total:hover,:host ::ng-deep .emr-avatar-more:hover{z-index:1}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
|
|
132
|
+
}] });
|
|
133
|
+
|
|
134
|
+
// DEPRECATED
|
|
135
|
+
class AvatarTotalComponent {
|
|
136
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarTotalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: AvatarTotalComponent, isStandalone: true, selector: "emr-avatar-total,[emr-avatar-total]", host: { classAttribute: "emr-avatar-total" }, exportAs: ["emrAvatarTotal"], ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [":host{--emr-avatar-font-weight: 500;--emr-avatar-size: calc(var(--spacing) * 10);--emr-avatar-border-radius: calc(infinity * 1px);--emr-avatar-bg: oklch(69.6% .17 162.48);--emr-avatar-color: white;--emr-avatar-inner-border: inset 0 0 2px var(--color-border);--emr-avatar-total-font-size: var(--text-xs);--emr-avatar-total-font-weight: 500;--emr-avatar-total-color: white;--emr-avatar-total-bg: var(--color-neutral-700);--emr-avatar-total-hover-bg: var(--color-neutral-600);background:var(--emr-avatar-total-bg);font-size:var(--emr-avatar-total-font-size);font-weight:var(--emr-avatar-total-font-weight);color:var(--emr-avatar-total-color);border-radius:var(--emr-avatar-border-radius);flex:none;display:flex;align-items:center;justify-content:center}:host:hover{background:var(--emr-avatar-total-hover-bg)}:host:not([class*=w-]):not([class*=size-]){width:var(--emr-avatar-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--emr-avatar-size)}:host-context(html.dark){--emr-avatar-group-item-border: .125rem solid var(--color-neutral-950);--emr-avatar-presence-indicator-outline: var(--color-neutral-950) solid 2px}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] });
|
|
138
|
+
}
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarTotalComponent, decorators: [{
|
|
140
|
+
type: Component,
|
|
141
|
+
args: [{ selector: 'emr-avatar-total,[emr-avatar-total]', exportAs: 'emrAvatarTotal', standalone: true, host: {
|
|
142
|
+
'class': 'emr-avatar-total'
|
|
143
|
+
}, template: "<ng-content></ng-content>\r\n", styles: [":host{--emr-avatar-font-weight: 500;--emr-avatar-size: calc(var(--spacing) * 10);--emr-avatar-border-radius: calc(infinity * 1px);--emr-avatar-bg: oklch(69.6% .17 162.48);--emr-avatar-color: white;--emr-avatar-inner-border: inset 0 0 2px var(--color-border);--emr-avatar-total-font-size: var(--text-xs);--emr-avatar-total-font-weight: 500;--emr-avatar-total-color: white;--emr-avatar-total-bg: var(--color-neutral-700);--emr-avatar-total-hover-bg: var(--color-neutral-600);background:var(--emr-avatar-total-bg);font-size:var(--emr-avatar-total-font-size);font-weight:var(--emr-avatar-total-font-weight);color:var(--emr-avatar-total-color);border-radius:var(--emr-avatar-border-radius);flex:none;display:flex;align-items:center;justify-content:center}:host:hover{background:var(--emr-avatar-total-hover-bg)}:host:not([class*=w-]):not([class*=size-]){width:var(--emr-avatar-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--emr-avatar-size)}:host-context(html.dark){--emr-avatar-group-item-border: .125rem solid var(--color-neutral-950);--emr-avatar-presence-indicator-outline: var(--color-neutral-950) solid 2px}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
|
|
144
|
+
}] });
|
|
145
|
+
|
|
146
|
+
const alreadyLoadedImages = [];
|
|
147
|
+
const presets = {
|
|
148
|
+
'identicon': {
|
|
149
|
+
style: identicon,
|
|
150
|
+
options: {
|
|
151
|
+
scale: 55,
|
|
152
|
+
backgroundColor: ['cbebf7', 'ebe1fc', 'd1f9db', 'f7e4e7', 'fce8d4', 'dcfcf9']
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
'initials': {
|
|
156
|
+
style: initials,
|
|
157
|
+
options: {
|
|
158
|
+
scale: 75,
|
|
159
|
+
fontWeight: 500
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
class DicebearComponent {
|
|
164
|
+
image = input('', ...(ngDevMode ? [{ debugName: "image" }] : []));
|
|
165
|
+
clickable = input(false, ...(ngDevMode ? [{ debugName: "clickable", transform: booleanAttribute }] : [{
|
|
166
|
+
transform: booleanAttribute
|
|
167
|
+
}]));
|
|
168
|
+
key = input(...(ngDevMode ? [undefined, { debugName: "key" }] : []));
|
|
169
|
+
preset = input('identicon', ...(ngDevMode ? [{ debugName: "preset" }] : []));
|
|
170
|
+
alt = input(...(ngDevMode ? [undefined, { debugName: "alt" }] : []));
|
|
171
|
+
presenceIndicator = input(null, ...(ngDevMode ? [{ debugName: "presenceIndicator" }] : []));
|
|
172
|
+
imageLoaded;
|
|
173
|
+
svg = '';
|
|
174
|
+
ngOnInit() {
|
|
175
|
+
if (this.image()) {
|
|
176
|
+
this.imageLoaded = alreadyLoadedImages.includes(this.image());
|
|
177
|
+
}
|
|
178
|
+
const preset = presets[this.preset()];
|
|
179
|
+
const avatar = createAvatar(preset.style, {
|
|
180
|
+
seed: this.key() || '',
|
|
181
|
+
...preset.options
|
|
182
|
+
});
|
|
183
|
+
this.svg = avatar.toString().replace('viewboxMask', v7());
|
|
184
|
+
}
|
|
185
|
+
onImageLoaded() {
|
|
186
|
+
if (this.imageLoaded) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
alreadyLoadedImages.push(this.image());
|
|
190
|
+
this.imageLoaded = true;
|
|
191
|
+
}
|
|
192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DicebearComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: DicebearComponent, isStandalone: true, selector: "emr-dicebear,[emr-dicebear]", inputs: { image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, preset: { classPropertyName: "preset", publicName: "preset", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, presenceIndicator: { classPropertyName: "presenceIndicator", publicName: "presenceIndicator", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.is-clickable": "clickable()", "class.has-loaded-image": "image() && imageLoaded" }, classAttribute: "emr-avatar emr-dicebear" }, providers: [
|
|
194
|
+
{
|
|
195
|
+
provide: AVATAR_ACCESSOR,
|
|
196
|
+
useExisting: forwardRef(() => DicebearComponent),
|
|
197
|
+
multi: true
|
|
198
|
+
}
|
|
199
|
+
], exportAs: ["emrDicebear"], ngImport: i0, template: "@if (image()) {\r\n <img class=\"image\" loading=\"lazy\" [src]=\"image()\"\r\n [alt]=\"alt() || ''\" (load)=\"onImageLoaded()\">\r\n}\r\n\r\n@if (presenceIndicator()) {\r\n <div class=\"presence-indicator\"\r\n [class.is-online]=\"presenceIndicator() === 'online'\"\r\n [class.is-offline]=\"presenceIndicator() === 'offline'\"\r\n [class.is-away]=\"presenceIndicator() === 'away'\"></div>\r\n}\r\n\r\n@if (!image() && svg) {\r\n <div class=\"svg\" [innerHTML]=\"svg | safeHtml\"></div>\r\n}\r\n", styles: [":host{--emr-avatar-font-weight: 500;--emr-avatar-size: calc(var(--spacing, .25rem) * 10);--emr-avatar-border-radius: calc(infinity * 1px);--emr-avatar-bg: #778da9;--emr-avatar-color: white;--emr-avatar-presence-indicator-size: 20%;--emr-avatar-presence-indicator-position-top: 5%;--emr-avatar-presence-indicator-position-end: 5%;--emr-avatar-presence-indicator-online-bg: #57cc99;--emr-avatar-presence-indicator-offline-bg: var(--color-surface-variant);--emr-avatar-presence-indicator-away-bg: #ffd60a;--emr-avatar-presence-indicator-outline: white solid 2px;--emr-avatar-inner-border: inset 0 0 2px var(--color-border);display:inline-flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;flex:none;text-transform:uppercase;position:relative;font-weight:var(--emr-avatar-font-weight)}:host:not([class*=shadow-]){box-shadow:var(--emr-avatar-inner-border)}:host .svg{overflow:hidden;border-radius:inherit;position:absolute;inset:0;z-index:0}:host:not([class*=rounded]),:host:not([class*=rounded]) .svg{border-radius:var(--emr-avatar-border-radius)}:host:not([class*=w-]):not([class*=size-]){width:var(--emr-avatar-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--emr-avatar-size)}:host.is-clickable{cursor:pointer}:host.is-hidden{display:none}:host.is-clickable:active{scale:.97}:host .image{display:inline;object-fit:cover;position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1}:host .presence-indicator{position:absolute;z-index:1;outline:var(--emr-avatar-presence-indicator-outline);border-radius:6.1875rem;width:var(--emr-avatar-presence-indicator-size);height:var(--emr-avatar-presence-indicator-size);top:var(--emr-avatar-presence-indicator-position-top);inset-inline-end:var(--emr-avatar-presence-indicator-position-end)}:host .presence-indicator.is-online{background:var(--emr-avatar-presence-indicator-online-bg)}:host .presence-indicator.is-offline{background:var(--emr-avatar-presence-indicator-offline-bg)}:host .presence-indicator.is-away{background:var(--emr-avatar-presence-indicator-away-bg)}:host-context(html.dark){--emr-avatar-group-item-border: .125rem solid var(--color-neutral-950);--emr-avatar-presence-indicator-outline: var(--color-neutral-950) solid 2px}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
200
|
+
}
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DicebearComponent, decorators: [{
|
|
202
|
+
type: Component,
|
|
203
|
+
args: [{ selector: 'emr-dicebear,[emr-dicebear]', exportAs: 'emrDicebear', providers: [
|
|
204
|
+
{
|
|
205
|
+
provide: AVATAR_ACCESSOR,
|
|
206
|
+
useExisting: forwardRef(() => DicebearComponent),
|
|
207
|
+
multi: true
|
|
208
|
+
}
|
|
209
|
+
], imports: [
|
|
210
|
+
SafeHtmlPipe,
|
|
211
|
+
], host: {
|
|
212
|
+
'class': 'emr-avatar emr-dicebear',
|
|
213
|
+
'[class.is-clickable]': 'clickable()',
|
|
214
|
+
'[class.has-loaded-image]': 'image() && imageLoaded',
|
|
215
|
+
}, template: "@if (image()) {\r\n <img class=\"image\" loading=\"lazy\" [src]=\"image()\"\r\n [alt]=\"alt() || ''\" (load)=\"onImageLoaded()\">\r\n}\r\n\r\n@if (presenceIndicator()) {\r\n <div class=\"presence-indicator\"\r\n [class.is-online]=\"presenceIndicator() === 'online'\"\r\n [class.is-offline]=\"presenceIndicator() === 'offline'\"\r\n [class.is-away]=\"presenceIndicator() === 'away'\"></div>\r\n}\r\n\r\n@if (!image() && svg) {\r\n <div class=\"svg\" [innerHTML]=\"svg | safeHtml\"></div>\r\n}\r\n", styles: [":host{--emr-avatar-font-weight: 500;--emr-avatar-size: calc(var(--spacing, .25rem) * 10);--emr-avatar-border-radius: calc(infinity * 1px);--emr-avatar-bg: #778da9;--emr-avatar-color: white;--emr-avatar-presence-indicator-size: 20%;--emr-avatar-presence-indicator-position-top: 5%;--emr-avatar-presence-indicator-position-end: 5%;--emr-avatar-presence-indicator-online-bg: #57cc99;--emr-avatar-presence-indicator-offline-bg: var(--color-surface-variant);--emr-avatar-presence-indicator-away-bg: #ffd60a;--emr-avatar-presence-indicator-outline: white solid 2px;--emr-avatar-inner-border: inset 0 0 2px var(--color-border);display:inline-flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;flex:none;text-transform:uppercase;position:relative;font-weight:var(--emr-avatar-font-weight)}:host:not([class*=shadow-]){box-shadow:var(--emr-avatar-inner-border)}:host .svg{overflow:hidden;border-radius:inherit;position:absolute;inset:0;z-index:0}:host:not([class*=rounded]),:host:not([class*=rounded]) .svg{border-radius:var(--emr-avatar-border-radius)}:host:not([class*=w-]):not([class*=size-]){width:var(--emr-avatar-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--emr-avatar-size)}:host.is-clickable{cursor:pointer}:host.is-hidden{display:none}:host.is-clickable:active{scale:.97}:host .image{display:inline;object-fit:cover;position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1}:host .presence-indicator{position:absolute;z-index:1;outline:var(--emr-avatar-presence-indicator-outline);border-radius:6.1875rem;width:var(--emr-avatar-presence-indicator-size);height:var(--emr-avatar-presence-indicator-size);top:var(--emr-avatar-presence-indicator-position-top);inset-inline-end:var(--emr-avatar-presence-indicator-position-end)}:host .presence-indicator.is-online{background:var(--emr-avatar-presence-indicator-online-bg)}:host .presence-indicator.is-offline{background:var(--emr-avatar-presence-indicator-offline-bg)}:host .presence-indicator.is-away{background:var(--emr-avatar-presence-indicator-away-bg)}:host-context(html.dark){--emr-avatar-group-item-border: .125rem solid var(--color-neutral-950);--emr-avatar-presence-indicator-outline: var(--color-neutral-950) solid 2px}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
|
|
216
|
+
}], propDecorators: { image: [{ type: i0.Input, args: [{ isSignal: true, alias: "image", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], preset: [{ type: i0.Input, args: [{ isSignal: true, alias: "preset", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], presenceIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "presenceIndicator", required: false }] }] } });
|
|
217
|
+
|
|
218
|
+
class AvatarMoreComponent {
|
|
219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarMoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: AvatarMoreComponent, isStandalone: true, selector: "emr-avatar-more,[emr-avatar-more]", host: { classAttribute: "emr-avatar-more" }, exportAs: ["emrAvatarMore"], ngImport: i0, template: "<ng-content/>\r\n", styles: [":host{--emr-avatar-font-weight: 500;--emr-avatar-size: calc(var(--spacing, .25rem) * 10);--emr-avatar-border-radius: calc(infinity * 1px);--emr-avatar-bg: oklch(69.6% .17 162.48);--emr-avatar-color: white;--emr-avatar-inner-border: inset 0 0 2px var(--color-border);--emr-avatar-total-font-size: var(--text-xs);--emr-avatar-total-font-weight: 500;--emr-avatar-total-color: white;--emr-avatar-total-bg: var(--color-neutral-700);--emr-avatar-total-hover-bg: var(--color-neutral-600);background:var(--emr-avatar-total-bg);font-size:var(--emr-avatar-total-font-size);font-weight:var(--emr-avatar-total-font-weight);color:var(--emr-avatar-total-color);border-radius:var(--emr-avatar-border-radius);flex:none;display:flex;align-items:center;justify-content:center}:host:hover{background:var(--emr-avatar-total-hover-bg)}:host:not([class*=w-]):not([class*=size-]){width:var(--emr-avatar-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--emr-avatar-size)}:host-context(html.dark){--emr-avatar-group-item-border: .125rem solid var(--color-neutral-950);--emr-avatar-presence-indicator-outline: var(--color-neutral-950) solid 2px}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] });
|
|
221
|
+
}
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AvatarMoreComponent, decorators: [{
|
|
223
|
+
type: Component,
|
|
224
|
+
args: [{ selector: 'emr-avatar-more,[emr-avatar-more]', exportAs: 'emrAvatarMore', imports: [], host: {
|
|
225
|
+
'class': 'emr-avatar-more'
|
|
226
|
+
}, template: "<ng-content/>\r\n", styles: [":host{--emr-avatar-font-weight: 500;--emr-avatar-size: calc(var(--spacing, .25rem) * 10);--emr-avatar-border-radius: calc(infinity * 1px);--emr-avatar-bg: oklch(69.6% .17 162.48);--emr-avatar-color: white;--emr-avatar-inner-border: inset 0 0 2px var(--color-border);--emr-avatar-total-font-size: var(--text-xs);--emr-avatar-total-font-weight: 500;--emr-avatar-total-color: white;--emr-avatar-total-bg: var(--color-neutral-700);--emr-avatar-total-hover-bg: var(--color-neutral-600);background:var(--emr-avatar-total-bg);font-size:var(--emr-avatar-total-font-size);font-weight:var(--emr-avatar-total-font-weight);color:var(--emr-avatar-total-color);border-radius:var(--emr-avatar-border-radius);flex:none;display:flex;align-items:center;justify-content:center}:host:hover{background:var(--emr-avatar-total-hover-bg)}:host:not([class*=w-]):not([class*=size-]){width:var(--emr-avatar-size)}:host:not([class*=h-]):not([class*=size-]){height:var(--emr-avatar-size)}:host-context(html.dark){--emr-avatar-group-item-border: .125rem solid var(--color-neutral-950);--emr-avatar-presence-indicator-outline: var(--color-neutral-950) solid 2px}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
|
|
227
|
+
}] });
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Generated bundle index. Do not edit.
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
export { AVATAR_ACCESSOR, AvatarComponent, AvatarGroupComponent, AvatarMoreComponent, AvatarTotalComponent, DicebearComponent };
|
|
234
|
+
//# sourceMappingURL=elementar-rt-components-avatar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elementar-rt-components-avatar.mjs","sources":["../../../projects/components/avatar/src/types.ts","../../../projects/components/avatar/src/avatar/avatar.component.ts","../../../projects/components/avatar/src/avatar/avatar.component.html","../../../projects/components/avatar/src/avatar-group/avatar-group.component.ts","../../../projects/components/avatar/src/avatar-group/avatar-group.component.html","../../../projects/components/avatar/src/avatar-total/avatar-total.component.ts","../../../projects/components/avatar/src/avatar-total/avatar-total.component.html","../../../projects/components/avatar/src/dicebear/dicebear.component.ts","../../../projects/components/avatar/src/dicebear/dicebear.component.html","../../../projects/components/avatar/src/avatar-more/avatar-more.component.ts","../../../projects/components/avatar/src/avatar-more/avatar-more.component.html","../../../projects/components/avatar/elementar-rt-components-avatar.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport const AVATAR_ACCESSOR = new InjectionToken('AVATAR_ACCESSOR');\r\nexport type AvatarPresenceIndicator = 'online' | 'offline' | 'away' | null | string;\r\n","import {\r\n AfterViewInit,\r\n booleanAttribute,\r\n Component,\r\n ElementRef,\r\n forwardRef,\r\n inject,\r\n input,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport { AVATAR_ACCESSOR, AvatarPresenceIndicator } from '../types';\r\n\r\nconst alreadyLoadedImages: string[] = [];\r\n\r\n@Component({\r\n selector: 'emr-avatar,[emr-avatar]',\r\n exportAs: 'emrAvatar',\r\n standalone: true,\r\n templateUrl: './avatar.component.html',\r\n styleUrls: ['./avatar.component.scss'],\r\n providers: [\r\n {\r\n provide: AVATAR_ACCESSOR,\r\n useExisting: forwardRef(() => AvatarComponent),\r\n multi: true\r\n }\r\n ],\r\n host: {\r\n 'class': 'emr-avatar',\r\n '[class.is-clickable]': 'clickable()',\r\n '[class.has-automatic-color]': '!!automaticColor()',\r\n '[class.has-loaded-image]': 'image() && imageLoaded',\r\n }\r\n})\r\nexport class AvatarComponent implements OnInit, OnChanges, AfterViewInit {\r\n private _elementRef = inject(ElementRef);\r\n\r\n image = input<string>('');\r\n clickable = input(false, {\r\n transform: booleanAttribute\r\n });\r\n label = input('');\r\n alt = input('');\r\n automaticColor = input();\r\n presenceIndicator = input<AvatarPresenceIndicator>(null);\r\n\r\n protected imageLoaded: boolean;\r\n protected showLabel = false;\r\n\r\n ngOnInit() {\r\n if (!this.image()) {\r\n return;\r\n }\r\n\r\n this.imageLoaded = alreadyLoadedImages.includes(<string>this.image());\r\n }\r\n\r\n ngAfterViewInit() {\r\n setTimeout(() => {\r\n this.showLabel = true;\r\n }, 0);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['automaticColor'] && changes['automaticColor'].currentValue) {\r\n this._setAutomaticColor(changes['automaticColor'].currentValue);\r\n }\r\n }\r\n\r\n onImageLoaded(): void {\r\n if (this.imageLoaded) {\r\n return;\r\n }\r\n\r\n alreadyLoadedImages.push(<string>this.image());\r\n this.imageLoaded = true;\r\n }\r\n\r\n private _setAutomaticColor(color: any): void {\r\n if (!this.isValidHex(color)) {\r\n throw new Error(`Invalid ${color} color, automatic color supports only a valid hex color`);\r\n }\r\n\r\n const element = this._elementRef.nativeElement as HTMLElement;\r\n element.style.setProperty('--emr-avatar-bg', color);\r\n element.style.setProperty('--emr-avatar-border-color', this._newShade(color, -25));\r\n element.style.setProperty('--emr-avatar-color', this._newShade(color, -150));\r\n }\r\n\r\n private _newShade(hexColor: string, magnitude: number): string {\r\n hexColor = hexColor.replace(`#`, ``);\r\n if (hexColor.length === 6) {\r\n const decimalColor = parseInt(hexColor, 16);\r\n let r = (decimalColor >> 16) + magnitude;\r\n r > 255 && (r = 255);\r\n r < 0 && (r = 0);\r\n let g = (decimalColor & 0x0000ff) + magnitude;\r\n g > 255 && (g = 255);\r\n g < 0 && (g = 0);\r\n let b = ((decimalColor >> 8) & 0x00ff) + magnitude;\r\n b > 255 && (b = 255);\r\n b < 0 && (b = 0);\r\n return `#${(g | (b << 8) | (r << 16)).toString(16)}`;\r\n } else {\r\n return hexColor;\r\n }\r\n };\r\n\r\n isValidHex(color: any): boolean {\r\n if(!color || typeof color !== 'string') {\r\n return false;\r\n }\r\n\r\n // Validate hex values\r\n if(color.substring(0, 1) === '#') {\r\n color = color.substring(1);\r\n }\r\n\r\n switch(color.length) {\r\n case 3: {\r\n return /^[0-9A-F]{3}$/i.test(color);\r\n }\r\n case 6: {\r\n return /^[0-9A-F]{6}$/i.test(color);\r\n }\r\n case 8: {\r\n return /^[0-9A-F]{8}$/i.test(color);\r\n }\r\n default: {\r\n return false;\r\n }\r\n }\r\n }\r\n}\r\n","@if (image()) {\r\n <img class=\"image\" loading=\"lazy\" [src]=\"image()\" [alt]=\"alt()\" (load)=\"onImageLoaded()\">\r\n}\r\n\r\n@if (presenceIndicator()) {\r\n <div class=\"presence-indicator\"\r\n [class.is-online]=\"presenceIndicator() === 'online'\"\r\n [class.is-offline]=\"presenceIndicator() === 'offline'\"\r\n [class.is-away]=\"presenceIndicator() === 'away'\"></div>\r\n}\r\n\r\n@if (label() && showLabel) {\r\n <svg viewBox=\"0 0 50 50\" class=\"text\">\r\n <text\r\n x=\"50%\"\r\n y=\"50%\"\r\n alignment-baseline=\"central\"\r\n text-anchor=\"middle\"\r\n font-weight=\"inherit\"\r\n font-size=\"20\"\r\n fill=\"currentColor\">{{ label() }}</text>\r\n </svg>\r\n}\r\n\r\n<ng-content select=\"mat-icon,emr-icon\"/>\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'emr-avatar-group',\r\n exportAs: 'emrAvatarGroup',\r\n standalone: true,\r\n templateUrl: './avatar-group.component.html',\r\n styleUrl: './avatar-group.component.scss',\r\n host: {\r\n 'class': 'emr-avatar-group'\r\n }\r\n})\r\nexport class AvatarGroupComponent {\r\n}\r\n","<ng-content/>\r\n","import { Component } from '@angular/core';\r\n\r\n// DEPRECATED\r\n@Component({\r\n selector: 'emr-avatar-total,[emr-avatar-total]',\r\n exportAs: 'emrAvatarTotal',\r\n standalone: true,\r\n templateUrl: './avatar-total.component.html',\r\n styleUrl: './avatar-total.component.scss',\r\n host: {\r\n 'class': 'emr-avatar-total'\r\n }\r\n})\r\nexport class AvatarTotalComponent {\r\n}\r\n","<ng-content></ng-content>\r\n","import {\r\n booleanAttribute,\r\n Component,\r\n forwardRef,\r\n input, OnInit\r\n} from '@angular/core';\r\nimport { AVATAR_ACCESSOR, AvatarPresenceIndicator } from '../types';\r\nimport { createAvatar } from '@dicebear/core';\r\nimport { identicon, initials } from '@dicebear/collection';\r\nimport { v7 as uuid } from 'uuid';\r\nimport { SafeHtmlPipe } from '@elementar-rt/components/core';\r\n\r\nexport interface Preset {\r\n style: any,\r\n options?: {\r\n scale?: number;\r\n backgroundColor?: string[];\r\n fontWeight?: number;\r\n }\r\n}\r\n\r\nconst alreadyLoadedImages: string[] = [];\r\nconst presets: {[prop: string]: Preset} = {\r\n 'identicon': {\r\n style: identicon,\r\n options: {\r\n scale: 55,\r\n backgroundColor: ['cbebf7', 'ebe1fc', 'd1f9db', 'f7e4e7', 'fce8d4', 'dcfcf9']\r\n }\r\n },\r\n 'initials': {\r\n style: initials,\r\n options: {\r\n scale: 75,\r\n fontWeight: 500\r\n }\r\n }\r\n};\r\n\r\n@Component({\r\n selector: 'emr-dicebear,[emr-dicebear]',\r\n exportAs: 'emrDicebear',\r\n templateUrl: './dicebear.component.html',\r\n styleUrl: './dicebear.component.scss',\r\n providers: [\r\n {\r\n provide: AVATAR_ACCESSOR,\r\n useExisting: forwardRef(() => DicebearComponent),\r\n multi: true\r\n }\r\n ],\r\n imports: [\r\n SafeHtmlPipe,\r\n ],\r\n host: {\r\n 'class': 'emr-avatar emr-dicebear',\r\n '[class.is-clickable]': 'clickable()',\r\n '[class.has-loaded-image]': 'image() && imageLoaded',\r\n }\r\n})\r\nexport class DicebearComponent implements OnInit {\r\n image = input<string>('');\r\n clickable = input(false, {\r\n transform: booleanAttribute\r\n });\r\n key = input<any>();\r\n preset = input<string>('identicon');\r\n alt = input<string>();\r\n presenceIndicator = input<AvatarPresenceIndicator>(null);\r\n\r\n protected imageLoaded: boolean;\r\n protected svg = '';\r\n\r\n ngOnInit() {\r\n if (this.image()) {\r\n this.imageLoaded = alreadyLoadedImages.includes(<string>this.image());\r\n }\r\n\r\n const preset = presets[this.preset()];\r\n const avatar = createAvatar(preset.style, {\r\n seed: this.key() || '',\r\n ...preset.options\r\n });\r\n this.svg = avatar.toString().replace('viewboxMask', uuid());\r\n }\r\n\r\n onImageLoaded(): void {\r\n if (this.imageLoaded) {\r\n return;\r\n }\r\n\r\n alreadyLoadedImages.push(<string>this.image());\r\n this.imageLoaded = true;\r\n }\r\n}\r\n","@if (image()) {\r\n <img class=\"image\" loading=\"lazy\" [src]=\"image()\"\r\n [alt]=\"alt() || ''\" (load)=\"onImageLoaded()\">\r\n}\r\n\r\n@if (presenceIndicator()) {\r\n <div class=\"presence-indicator\"\r\n [class.is-online]=\"presenceIndicator() === 'online'\"\r\n [class.is-offline]=\"presenceIndicator() === 'offline'\"\r\n [class.is-away]=\"presenceIndicator() === 'away'\"></div>\r\n}\r\n\r\n@if (!image() && svg) {\r\n <div class=\"svg\" [innerHTML]=\"svg | safeHtml\"></div>\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'emr-avatar-more,[emr-avatar-more]',\r\n exportAs: 'emrAvatarMore',\r\n imports: [],\r\n templateUrl: './avatar-more.component.html',\r\n styleUrl: './avatar-more.component.scss',\r\n host: {\r\n 'class': 'emr-avatar-more'\r\n }\r\n})\r\nexport class AvatarMoreComponent {\r\n\r\n}\r\n","<ng-content/>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["alreadyLoadedImages","uuid"],"mappings":";;;;;;;MAEa,eAAe,GAAG,IAAI,cAAc,CAAC,iBAAiB;;ACYnE,MAAMA,qBAAmB,GAAa,EAAE;MAsB3B,eAAe,CAAA;AAClB,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAExC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;IACzB,SAAS,GAAG,KAAK,CAAC,KAAK,6CACrB,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CADJ;AACvB,YAAA,SAAS,EAAE;AACZ,SAAA,CAAA,CAAA,CAAC;AACF,IAAA,KAAK,GAAG,KAAK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