@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,349 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, InjectionToken, inject, ElementRef, DOCUMENT, DestroyRef, Renderer2, computed, Component, Injector, Directive, TemplateRef, contentChild, input } from '@angular/core';
|
|
3
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
4
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { MatIcon } from '@angular/material/icon';
|
|
7
|
+
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
|
8
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
9
|
+
import { fromEvent } from 'rxjs';
|
|
10
|
+
|
|
11
|
+
class PictureRef {
|
|
12
|
+
closed = new EventEmitter();
|
|
13
|
+
close() {
|
|
14
|
+
this.closed.emit();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const IMAGE_VIEWER = new InjectionToken('IMAGE_VIEWER');
|
|
19
|
+
const IMAGE_VIEWER_PICTURE_REF = new InjectionToken('IMAGE_VIEWER_PICTURE_REF');
|
|
20
|
+
const IMAGE_VIEWER_PICTURE_DATA = new InjectionToken('IMAGE_VIEWER_PICTURE_DATA');
|
|
21
|
+
|
|
22
|
+
class ImageViewerComponent {
|
|
23
|
+
elementRef = inject(ElementRef);
|
|
24
|
+
_document = inject(DOCUMENT);
|
|
25
|
+
_destroyRef = inject(DestroyRef);
|
|
26
|
+
_renderer = inject(Renderer2);
|
|
27
|
+
_startClientY = 0;
|
|
28
|
+
_startClientX = 0;
|
|
29
|
+
_offsetY = 0;
|
|
30
|
+
_offsetX = 0;
|
|
31
|
+
_tmpOffsetY = 0;
|
|
32
|
+
_tmpOffsetX = 0;
|
|
33
|
+
_dragging = false;
|
|
34
|
+
pictureRef = inject(IMAGE_VIEWER_PICTURE_REF);
|
|
35
|
+
data = inject(IMAGE_VIEWER_PICTURE_DATA);
|
|
36
|
+
loading = true;
|
|
37
|
+
scale = 1;
|
|
38
|
+
image;
|
|
39
|
+
alreadyDragged = false;
|
|
40
|
+
scaleMin = 1;
|
|
41
|
+
scaleMax = 1;
|
|
42
|
+
padding = 30;
|
|
43
|
+
scaled = computed(() => {
|
|
44
|
+
return this.scale !== 1;
|
|
45
|
+
}, ...(ngDevMode ? [{ debugName: "scaled" }] : []));
|
|
46
|
+
hasTitle = computed(() => {
|
|
47
|
+
return !!(this.data.title || this.data.titleTplRef);
|
|
48
|
+
}, ...(ngDevMode ? [{ debugName: "hasTitle" }] : []));
|
|
49
|
+
hasAside = computed(() => {
|
|
50
|
+
return !!(this.data.caption || this.data.description || this.data.captionTplRef || this.data.descriptionTplRef);
|
|
51
|
+
}, ...(ngDevMode ? [{ debugName: "hasAside" }] : []));
|
|
52
|
+
onLoad(event) {
|
|
53
|
+
this.loading = false;
|
|
54
|
+
this.image = event.target;
|
|
55
|
+
if (this.image.width > this.image.height) {
|
|
56
|
+
this.scaleMax = this.image.naturalWidth / this.image.width;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.scaleMax = this.image.naturalHeight / this.image.height;
|
|
60
|
+
}
|
|
61
|
+
const image = this.image;
|
|
62
|
+
fromEvent(image, 'mousedown')
|
|
63
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
64
|
+
.subscribe((event) => {
|
|
65
|
+
if (this.scale === this.scaleMin || event.button === 2) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this._dragging = true;
|
|
69
|
+
this._startClientY = event.clientY;
|
|
70
|
+
this._startClientX = event.clientX;
|
|
71
|
+
});
|
|
72
|
+
fromEvent(this._document, 'mousemove')
|
|
73
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
74
|
+
.subscribe((event) => {
|
|
75
|
+
if (this._dragging) {
|
|
76
|
+
const scaleFactor = (1 / this.scale);
|
|
77
|
+
let offsetY = (event.clientY - this._startClientY) * scaleFactor;
|
|
78
|
+
let offsetX = (event.clientX - this._startClientX) * scaleFactor;
|
|
79
|
+
this._transform(offsetY, offsetX);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
fromEvent(this._document, 'mouseup')
|
|
83
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
84
|
+
.subscribe((event) => {
|
|
85
|
+
if (this._dragging) {
|
|
86
|
+
const element = this.elementRef.nativeElement;
|
|
87
|
+
const elementRect = element.getBoundingClientRect();
|
|
88
|
+
this._renderer.removeClass(element, 'dragging');
|
|
89
|
+
this._dragging = false;
|
|
90
|
+
let imageWidth = Math.floor(image.getBoundingClientRect().width);
|
|
91
|
+
let imageHeight = Math.floor(image.getBoundingClientRect().height);
|
|
92
|
+
let imageViewportWidth = this.hasAside() ? elementRect.width - 420 : elementRect.width;
|
|
93
|
+
let imageViewportHeight = elementRect.height;
|
|
94
|
+
if (imageWidth <= imageViewportWidth && imageHeight <= imageViewportHeight) {
|
|
95
|
+
this._tmpOffsetY = 0;
|
|
96
|
+
this._tmpOffsetX = 0;
|
|
97
|
+
this._offsetY = 0;
|
|
98
|
+
this._offsetX = 0;
|
|
99
|
+
this._renderer.setStyle(image, 'transform', `translate(0px,0px)`);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
const imageRect = image.getBoundingClientRect();
|
|
103
|
+
const widthDiff = imageViewportWidth - imageWidth;
|
|
104
|
+
const heightDiff = imageViewportHeight - imageHeight;
|
|
105
|
+
const xPositionDiff = widthDiff / this.scale / 2;
|
|
106
|
+
const yPositionDiff = heightDiff / this.scale / 2;
|
|
107
|
+
if (imageRect.x > 0 && imageRect.y > 0) {
|
|
108
|
+
this._tmpOffsetY = yPositionDiff * -1 + this.padding;
|
|
109
|
+
this._tmpOffsetX = xPositionDiff * -1 + this.padding;
|
|
110
|
+
}
|
|
111
|
+
else if (imageRect.x < widthDiff && imageRect.y > 0) {
|
|
112
|
+
this._tmpOffsetY = yPositionDiff * -1 + this.padding;
|
|
113
|
+
this._tmpOffsetX = xPositionDiff - this.padding;
|
|
114
|
+
}
|
|
115
|
+
else if (imageRect.x < widthDiff && imageRect.y < heightDiff) {
|
|
116
|
+
this._tmpOffsetY = yPositionDiff - this.padding;
|
|
117
|
+
this._tmpOffsetX = xPositionDiff - this.padding;
|
|
118
|
+
}
|
|
119
|
+
else if (imageRect.x > 0 && imageRect.y < heightDiff) {
|
|
120
|
+
this._tmpOffsetY = yPositionDiff - this.padding;
|
|
121
|
+
this._tmpOffsetX = xPositionDiff * -1 + this.padding;
|
|
122
|
+
}
|
|
123
|
+
if (imageWidth < imageViewportWidth) {
|
|
124
|
+
this._tmpOffsetX = 0;
|
|
125
|
+
}
|
|
126
|
+
if (imageHeight < imageViewportHeight) {
|
|
127
|
+
this._tmpOffsetY = 0;
|
|
128
|
+
}
|
|
129
|
+
this._offsetY = this._tmpOffsetY;
|
|
130
|
+
this._offsetX = this._tmpOffsetX;
|
|
131
|
+
this._renderer.setStyle(image, 'transform', `translate(${this._tmpOffsetX}px,${this._tmpOffsetY}px)`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
onBackdropClick() {
|
|
137
|
+
this.pictureRef.close();
|
|
138
|
+
}
|
|
139
|
+
onPreventClick(event) {
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
event.stopPropagation();
|
|
142
|
+
}
|
|
143
|
+
toggleZoom() {
|
|
144
|
+
if (this.scale === this.scaleMin) {
|
|
145
|
+
this.scale = this.scaleMax;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
this.scale = this.scaleMin;
|
|
149
|
+
this._renderer.setStyle(this.image, 'transform', `translate(0px,0px)`);
|
|
150
|
+
this._offsetX = 0;
|
|
151
|
+
this._offsetY = 0;
|
|
152
|
+
this._tmpOffsetY = 0;
|
|
153
|
+
this._tmpOffsetX = 0;
|
|
154
|
+
}
|
|
155
|
+
const element = this.elementRef.nativeElement;
|
|
156
|
+
element.style.setProperty('--emr-image-viewer-picture-scale', this.scale.toString());
|
|
157
|
+
}
|
|
158
|
+
onDragStart(event) {
|
|
159
|
+
event.stopPropagation();
|
|
160
|
+
event.preventDefault();
|
|
161
|
+
this.alreadyDragged = true;
|
|
162
|
+
}
|
|
163
|
+
_transform(offsetY, offsetX) {
|
|
164
|
+
const image = this.image;
|
|
165
|
+
const scaleFactor = (1 / this.scale);
|
|
166
|
+
let translateX = this._offsetX + offsetX;
|
|
167
|
+
// let offsetStartX = ((image.width / 2) - translateX) / scaleFactor;
|
|
168
|
+
// let offsetEndX = ((image.width / 2) + translateX) / scaleFactor;
|
|
169
|
+
let translateY = this._offsetY + offsetY;
|
|
170
|
+
// let offsetStartY = ((image.height / 2) - translateY) / scaleFactor;
|
|
171
|
+
// let offsetEndY = ((image.height / 2) + translateY) / scaleFactor;
|
|
172
|
+
// let thumbHalfWidth = 150;
|
|
173
|
+
//
|
|
174
|
+
// if (offsetStartX <= thumbHalfWidth && translateX > 0) {
|
|
175
|
+
// translateX = (image.width / 2) - (thumbHalfWidth * scaleFactor);
|
|
176
|
+
// } else if (offsetEndX <= thumbHalfWidth && translateX < 0) {
|
|
177
|
+
// translateX = -((image.width / 2) - (thumbHalfWidth * scaleFactor));
|
|
178
|
+
// }
|
|
179
|
+
//
|
|
180
|
+
// if (offsetStartY <= thumbHalfWidth && translateY > 0) {
|
|
181
|
+
// translateY = (image.height / 2) - (thumbHalfWidth * scaleFactor);
|
|
182
|
+
// } else if (offsetEndY <= thumbHalfWidth && translateY < 0) {
|
|
183
|
+
// translateY = -((image.height / 2) - (thumbHalfWidth * scaleFactor));
|
|
184
|
+
// }
|
|
185
|
+
this._tmpOffsetY = translateY;
|
|
186
|
+
this._tmpOffsetX = translateX;
|
|
187
|
+
this._renderer.setStyle(image, 'transform', `translate(${translateX}px,${translateY}px)`);
|
|
188
|
+
}
|
|
189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: ImageViewerComponent, isStandalone: true, selector: "emr-image-viewer", host: { properties: { "class.loading": "loading", "class.dragging": "_dragging", "class.scaled": "scale !== 1" }, classAttribute: "emr-image-viewer" }, exportAs: ["emrImageViewer"], ngImport: i0, template: "<div class=\"title-container\">\r\n @if (hasTitle()) {\r\n <div class=\"title\">\r\n @if (data.titleTplRef) {\r\n <ng-container [ngTemplateOutlet]=\"data.titleTplRef\"></ng-container>\r\n } @else if (data.caption) {\r\n {{ data.title }}\r\n }\r\n </div>\r\n }\r\n</div>\r\n<div class=\"controls\" (click)=\"onPreventClick($event)\">\r\n <div class=\"w-max\">\r\n <button (click)=\"pictureRef.close()\" class=\"close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"w-max\">\r\n <button class=\"zoom\" (click)=\"toggleZoom()\" [disabled]=\"scaleMax === 1 || null\">\r\n @if (scale === this.scaleMin) {\r\n <mat-icon>zoom_in</mat-icon>\r\n } @else {\r\n <mat-icon>zoom_out</mat-icon>\r\n }\r\n </button>\r\n </div>\r\n</div>\r\n<div class=\"content\" (click)=\"onBackdropClick()\">\r\n <div class=\"image\" (dragstart)=\"onDragStart($event)\">\r\n @if (loading) {\r\n <div class=\"spinner\">\r\n <mat-spinner/>\r\n </div>\r\n }\r\n <img [src]=\"data.sourceUrl\" alt=\"\" (load)=\"onLoad($event)\" (click)=\"onPreventClick($event)\" class=\"img\">\r\n </div>\r\n @if (hasAside()) {\r\n <aside class=\"aside\" (click)=\"onPreventClick($event)\">\r\n <div class=\"aside-header\">\r\n @if (data.captionTplRef) {\r\n <ng-container [ngTemplateOutlet]=\"data.captionTplRef\"></ng-container>\r\n } @else if (data.caption) {\r\n {{ data.caption }}\r\n }\r\n </div>\r\n <div class=\"aside-body\">\r\n <div class=\"aside-body-scroll\">\r\n @if (data.descriptionTplRef) {\r\n <ng-container [ngTemplateOutlet]=\"data.descriptionTplRef\"></ng-container>\r\n } @else if (data.description) {\r\n {{ data.description }}\r\n }\r\n </div>\r\n </div>\r\n </aside>\r\n }\r\n</div>\r\n", styles: [":host{width:100vw;height:100vh;display:flex;flex-direction:column}:host .title-container{position:absolute;inset-inline-start:calc(var(--spacing, .25rem) * 4);top:calc(var(--spacing, .25rem) * 4);z-index:3}:host .controls{position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * 4);top:calc(var(--spacing, .25rem) * 4);z-index:3;display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}:host .header{position:absolute;top:0;inset-inline-start:0;inset-inline-end:0;height:calc(var(--spacing, .25rem) * 20);flex:none;padding-left:calc(var(--spacing, .25rem) * 4);padding-right:calc(var(--spacing, .25rem) * 4);z-index:3;display:flex;align-items:center;justify-content:space-between}:host .content{box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;z-index:2;display:flex;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 8);width:100vw;height:100vh}:host.scaled img{cursor:grab}:host.dragging img{cursor:grabbing}:host:has(.aside) .content{padding-inline-end:420px}:host .img{-webkit-user-select:none;user-select:none;scale:var(--emr-image-viewer-picture-scale, 1);transition:scale .15s linear}:host:not(.dragging) img{transition:transform .15s linear,scale .15s linear}:host .title{background-color:var(--color-neutral-700);font-weight:500;height:calc(var(--spacing, .25rem) * 10);border-radius:calc(infinity * 1px);padding-left:calc(var(--spacing, .25rem) * 4);padding-right:calc(var(--spacing, .25rem) * 4);font-size:var(--text-tiny);display:flex;align-items:center;background:var(--color-neutral-700);color:var(--color-neutral-300)}:host .close,:host .zoom{width:calc(var(--spacing, .25rem) * 10);height:calc(var(--spacing, .25rem) * 10);border-radius:calc(infinity * 1px);cursor:pointer;display:flex;flex:none;align-items:center;justify-content:center;background:var(--color-neutral-700);color:var(--color-neutral-300)}:host .close:hover,:host .zoom:hover{background:var(--color-neutral-800);color:var(--color-neutral-200)}:host .close:active,:host .zoom:active{background:var(--color-neutral-950);color:var(--color-neutral-100)}:host .aside{width:420px;position:absolute;inset-inline-end:0;top:0;bottom:0;flex:none;background:var(--color-neutral-50);display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 5);height:100%;padding-inline-end:calc(var(--spacing, .25rem) * 10)}:host .aside-header{font-weight:700;padding-left:calc(var(--spacing, .25rem) * 8);padding-right:calc(var(--spacing, .25rem) * 8);padding-top:calc(var(--spacing, .25rem) * 8)}:host .aside-body{position:relative;flex-grow:1;font-size:.875rem;color:var(--color-neutral-600);line-height:var(--leading-relaxed)}:host .aside-body-scroll{position:absolute;inset:0;overflow-y:auto;padding-left:calc(var(--spacing, .25rem) * 8);padding-right:calc(var(--spacing, .25rem) * 8);padding-bottom:calc(var(--spacing, .25rem) * 8)}:host .image{position:relative;display:flex;align-items:center;justify-content:flex-end;height:100%;max-width:90%;max-height:90%}:host .image img{max-height:100%;max-width:100%}:host .spinner{visibility:hidden;width:max-content;position:absolute;top:50%;left:50%;z-index:-1;--tw-translate-y: -50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host.loading .spinner{visibility:visible;z-index:1}:host.loading img{visibility:hidden;position:relative;z-index:-50}:host-context(html.dark) .title{background:var(--color-neutral-100);color:var(--color-neutral-600)}:host-context(html.dark) .close{background:var(--color-neutral-100);color:var(--color-neutral-600)}:host-context(html.dark) .close:hover{background:var(--color-neutral-200);color:var(--color-neutral-700)}:host-context(html.dark) .close:active{background:var(--color-neutral-300);color:var(--color-neutral-900)}:host-context(html.dark) .aside{background:var(--color-neutral-900)}:host-context(html.dark) .aside-body{color:var(--color-neutral-400)}\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: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
191
|
+
}
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerComponent, decorators: [{
|
|
193
|
+
type: Component,
|
|
194
|
+
args: [{ selector: 'emr-image-viewer', exportAs: 'emrImageViewer', imports: [
|
|
195
|
+
MatIcon,
|
|
196
|
+
MatProgressSpinner,
|
|
197
|
+
NgTemplateOutlet
|
|
198
|
+
], host: {
|
|
199
|
+
'class': 'emr-image-viewer',
|
|
200
|
+
'[class.loading]': 'loading',
|
|
201
|
+
'[class.dragging]': '_dragging',
|
|
202
|
+
'[class.scaled]': 'scale !== 1'
|
|
203
|
+
}, template: "<div class=\"title-container\">\r\n @if (hasTitle()) {\r\n <div class=\"title\">\r\n @if (data.titleTplRef) {\r\n <ng-container [ngTemplateOutlet]=\"data.titleTplRef\"></ng-container>\r\n } @else if (data.caption) {\r\n {{ data.title }}\r\n }\r\n </div>\r\n }\r\n</div>\r\n<div class=\"controls\" (click)=\"onPreventClick($event)\">\r\n <div class=\"w-max\">\r\n <button (click)=\"pictureRef.close()\" class=\"close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"w-max\">\r\n <button class=\"zoom\" (click)=\"toggleZoom()\" [disabled]=\"scaleMax === 1 || null\">\r\n @if (scale === this.scaleMin) {\r\n <mat-icon>zoom_in</mat-icon>\r\n } @else {\r\n <mat-icon>zoom_out</mat-icon>\r\n }\r\n </button>\r\n </div>\r\n</div>\r\n<div class=\"content\" (click)=\"onBackdropClick()\">\r\n <div class=\"image\" (dragstart)=\"onDragStart($event)\">\r\n @if (loading) {\r\n <div class=\"spinner\">\r\n <mat-spinner/>\r\n </div>\r\n }\r\n <img [src]=\"data.sourceUrl\" alt=\"\" (load)=\"onLoad($event)\" (click)=\"onPreventClick($event)\" class=\"img\">\r\n </div>\r\n @if (hasAside()) {\r\n <aside class=\"aside\" (click)=\"onPreventClick($event)\">\r\n <div class=\"aside-header\">\r\n @if (data.captionTplRef) {\r\n <ng-container [ngTemplateOutlet]=\"data.captionTplRef\"></ng-container>\r\n } @else if (data.caption) {\r\n {{ data.caption }}\r\n }\r\n </div>\r\n <div class=\"aside-body\">\r\n <div class=\"aside-body-scroll\">\r\n @if (data.descriptionTplRef) {\r\n <ng-container [ngTemplateOutlet]=\"data.descriptionTplRef\"></ng-container>\r\n } @else if (data.description) {\r\n {{ data.description }}\r\n }\r\n </div>\r\n </div>\r\n </aside>\r\n }\r\n</div>\r\n", styles: [":host{width:100vw;height:100vh;display:flex;flex-direction:column}:host .title-container{position:absolute;inset-inline-start:calc(var(--spacing, .25rem) * 4);top:calc(var(--spacing, .25rem) * 4);z-index:3}:host .controls{position:absolute;inset-inline-end:calc(var(--spacing, .25rem) * 4);top:calc(var(--spacing, .25rem) * 4);z-index:3;display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}:host .header{position:absolute;top:0;inset-inline-start:0;inset-inline-end:0;height:calc(var(--spacing, .25rem) * 20);flex:none;padding-left:calc(var(--spacing, .25rem) * 4);padding-right:calc(var(--spacing, .25rem) * 4);z-index:3;display:flex;align-items:center;justify-content:space-between}:host .content{box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;z-index:2;display:flex;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 8);width:100vw;height:100vh}:host.scaled img{cursor:grab}:host.dragging img{cursor:grabbing}:host:has(.aside) .content{padding-inline-end:420px}:host .img{-webkit-user-select:none;user-select:none;scale:var(--emr-image-viewer-picture-scale, 1);transition:scale .15s linear}:host:not(.dragging) img{transition:transform .15s linear,scale .15s linear}:host .title{background-color:var(--color-neutral-700);font-weight:500;height:calc(var(--spacing, .25rem) * 10);border-radius:calc(infinity * 1px);padding-left:calc(var(--spacing, .25rem) * 4);padding-right:calc(var(--spacing, .25rem) * 4);font-size:var(--text-tiny);display:flex;align-items:center;background:var(--color-neutral-700);color:var(--color-neutral-300)}:host .close,:host .zoom{width:calc(var(--spacing, .25rem) * 10);height:calc(var(--spacing, .25rem) * 10);border-radius:calc(infinity * 1px);cursor:pointer;display:flex;flex:none;align-items:center;justify-content:center;background:var(--color-neutral-700);color:var(--color-neutral-300)}:host .close:hover,:host .zoom:hover{background:var(--color-neutral-800);color:var(--color-neutral-200)}:host .close:active,:host .zoom:active{background:var(--color-neutral-950);color:var(--color-neutral-100)}:host .aside{width:420px;position:absolute;inset-inline-end:0;top:0;bottom:0;flex:none;background:var(--color-neutral-50);display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 5);height:100%;padding-inline-end:calc(var(--spacing, .25rem) * 10)}:host .aside-header{font-weight:700;padding-left:calc(var(--spacing, .25rem) * 8);padding-right:calc(var(--spacing, .25rem) * 8);padding-top:calc(var(--spacing, .25rem) * 8)}:host .aside-body{position:relative;flex-grow:1;font-size:.875rem;color:var(--color-neutral-600);line-height:var(--leading-relaxed)}:host .aside-body-scroll{position:absolute;inset:0;overflow-y:auto;padding-left:calc(var(--spacing, .25rem) * 8);padding-right:calc(var(--spacing, .25rem) * 8);padding-bottom:calc(var(--spacing, .25rem) * 8)}:host .image{position:relative;display:flex;align-items:center;justify-content:flex-end;height:100%;max-width:90%;max-height:90%}:host .image img{max-height:100%;max-width:100%}:host .spinner{visibility:hidden;width:max-content;position:absolute;top:50%;left:50%;z-index:-1;--tw-translate-y: -50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host.loading .spinner{visibility:visible;z-index:1}:host.loading img{visibility:hidden;position:relative;z-index:-50}:host-context(html.dark) .title{background:var(--color-neutral-100);color:var(--color-neutral-600)}:host-context(html.dark) .close{background:var(--color-neutral-100);color:var(--color-neutral-600)}:host-context(html.dark) .close:hover{background:var(--color-neutral-200);color:var(--color-neutral-700)}:host-context(html.dark) .close:active{background:var(--color-neutral-300);color:var(--color-neutral-900)}:host-context(html.dark) .aside{background:var(--color-neutral-900)}:host-context(html.dark) .aside-body{color:var(--color-neutral-400)}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
|
|
204
|
+
}] });
|
|
205
|
+
|
|
206
|
+
class ImageViewerDirective {
|
|
207
|
+
_overlay = inject(Overlay);
|
|
208
|
+
_injector = inject(Injector);
|
|
209
|
+
_destroyRef = inject(DestroyRef);
|
|
210
|
+
get api() {
|
|
211
|
+
return {
|
|
212
|
+
open: (options) => this._open(options)
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
_open(options) {
|
|
216
|
+
const pictureRef = new PictureRef();
|
|
217
|
+
const overlayRef = this._overlay.create({
|
|
218
|
+
positionStrategy: this._overlay.position().global(),
|
|
219
|
+
hasBackdrop: true
|
|
220
|
+
});
|
|
221
|
+
const injector = Injector.create({
|
|
222
|
+
providers: [
|
|
223
|
+
{
|
|
224
|
+
provide: IMAGE_VIEWER_PICTURE_REF,
|
|
225
|
+
useValue: pictureRef
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
provide: IMAGE_VIEWER_PICTURE_DATA,
|
|
229
|
+
useValue: options
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
parent: this._injector
|
|
233
|
+
});
|
|
234
|
+
const portal = new ComponentPortal(ImageViewerComponent, null, injector);
|
|
235
|
+
overlayRef.attach(portal);
|
|
236
|
+
pictureRef.closed.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
237
|
+
overlayRef.detach();
|
|
238
|
+
});
|
|
239
|
+
return pictureRef;
|
|
240
|
+
}
|
|
241
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
242
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: ImageViewerDirective, isStandalone: true, selector: "[emrImageViewer]", host: { classAttribute: "emr-image-viewer" }, exportAs: ["emrImageViewer"], ngImport: i0 });
|
|
243
|
+
}
|
|
244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerDirective, decorators: [{
|
|
245
|
+
type: Directive,
|
|
246
|
+
args: [{
|
|
247
|
+
selector: '[emrImageViewer]',
|
|
248
|
+
exportAs: 'emrImageViewer',
|
|
249
|
+
standalone: true,
|
|
250
|
+
host: {
|
|
251
|
+
'class': 'emr-image-viewer',
|
|
252
|
+
}
|
|
253
|
+
}]
|
|
254
|
+
}] });
|
|
255
|
+
|
|
256
|
+
class ImageViewerPictureCaptionDirective {
|
|
257
|
+
templateRef = inject(TemplateRef);
|
|
258
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerPictureCaptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
259
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: ImageViewerPictureCaptionDirective, isStandalone: true, selector: "[emrImageViewerPictureCaption]", ngImport: i0 });
|
|
260
|
+
}
|
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerPictureCaptionDirective, decorators: [{
|
|
262
|
+
type: Directive,
|
|
263
|
+
args: [{
|
|
264
|
+
selector: '[emrImageViewerPictureCaption]',
|
|
265
|
+
standalone: true
|
|
266
|
+
}]
|
|
267
|
+
}] });
|
|
268
|
+
|
|
269
|
+
class ImageViewerPictureDescriptionDirective {
|
|
270
|
+
templateRef = inject(TemplateRef);
|
|
271
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerPictureDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
272
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: ImageViewerPictureDescriptionDirective, isStandalone: true, selector: "[emrImageViewerPictureDescription]", ngImport: i0 });
|
|
273
|
+
}
|
|
274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerPictureDescriptionDirective, decorators: [{
|
|
275
|
+
type: Directive,
|
|
276
|
+
args: [{
|
|
277
|
+
selector: '[emrImageViewerPictureDescription]',
|
|
278
|
+
standalone: true
|
|
279
|
+
}]
|
|
280
|
+
}] });
|
|
281
|
+
|
|
282
|
+
class ImageViewerPictureTitleDirective {
|
|
283
|
+
templateRef = inject(TemplateRef);
|
|
284
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerPictureTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
285
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.10", type: ImageViewerPictureTitleDirective, isStandalone: true, selector: "[emrImageViewerPictureTitle]", ngImport: i0 });
|
|
286
|
+
}
|
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerPictureTitleDirective, decorators: [{
|
|
288
|
+
type: Directive,
|
|
289
|
+
args: [{
|
|
290
|
+
selector: '[emrImageViewerPictureTitle]',
|
|
291
|
+
standalone: true
|
|
292
|
+
}]
|
|
293
|
+
}] });
|
|
294
|
+
|
|
295
|
+
class ImageViewerPictureDirective {
|
|
296
|
+
_imageViewer = inject(ImageViewerDirective);
|
|
297
|
+
_titleTplRef = contentChild(ImageViewerPictureTitleDirective, ...(ngDevMode ? [{ debugName: "_titleTplRef" }] : []));
|
|
298
|
+
_captionTplRef = contentChild(ImageViewerPictureCaptionDirective, ...(ngDevMode ? [{ debugName: "_captionTplRef" }] : []));
|
|
299
|
+
_descriptionTplRef = contentChild(ImageViewerPictureDescriptionDirective, ...(ngDevMode ? [{ debugName: "_descriptionTplRef" }] : []));
|
|
300
|
+
sourceUrl = input.required(...(ngDevMode ? [{ debugName: "sourceUrl" }] : []));
|
|
301
|
+
caption = input(...(ngDevMode ? [undefined, { debugName: "caption" }] : []));
|
|
302
|
+
title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
|
|
303
|
+
description = input(...(ngDevMode ? [undefined, { debugName: "description" }] : []));
|
|
304
|
+
onClick(event) {
|
|
305
|
+
event.preventDefault();
|
|
306
|
+
event.stopPropagation();
|
|
307
|
+
this._imageViewer.api.open({
|
|
308
|
+
sourceUrl: this.sourceUrl(),
|
|
309
|
+
title: this.title(),
|
|
310
|
+
caption: this.caption(),
|
|
311
|
+
description: this.description(),
|
|
312
|
+
titleTplRef: this._titleTplRef()?.templateRef,
|
|
313
|
+
captionTplRef: this._captionTplRef()?.templateRef,
|
|
314
|
+
descriptionTplRef: this._descriptionTplRef()?.templateRef
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerPictureDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
318
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.10", type: ImageViewerPictureDirective, isStandalone: true, selector: "[emrImageViewerPicture]", inputs: { sourceUrl: { classPropertyName: "sourceUrl", publicName: "sourceUrl", isSignal: true, isRequired: true, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)" }, classAttribute: "emr-image-viewer-picture" }, providers: [
|
|
319
|
+
{
|
|
320
|
+
provide: IMAGE_VIEWER,
|
|
321
|
+
useExisting: ImageViewerPictureDirective
|
|
322
|
+
}
|
|
323
|
+
], queries: [{ propertyName: "_titleTplRef", first: true, predicate: ImageViewerPictureTitleDirective, descendants: true, isSignal: true }, { propertyName: "_captionTplRef", first: true, predicate: ImageViewerPictureCaptionDirective, descendants: true, isSignal: true }, { propertyName: "_descriptionTplRef", first: true, predicate: ImageViewerPictureDescriptionDirective, descendants: true, isSignal: true }], exportAs: ["emrImageViewerPicture"], ngImport: i0 });
|
|
324
|
+
}
|
|
325
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageViewerPictureDirective, decorators: [{
|
|
326
|
+
type: Directive,
|
|
327
|
+
args: [{
|
|
328
|
+
selector: '[emrImageViewerPicture]',
|
|
329
|
+
exportAs: 'emrImageViewerPicture',
|
|
330
|
+
standalone: true,
|
|
331
|
+
providers: [
|
|
332
|
+
{
|
|
333
|
+
provide: IMAGE_VIEWER,
|
|
334
|
+
useExisting: ImageViewerPictureDirective
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
host: {
|
|
338
|
+
'class': 'emr-image-viewer-picture',
|
|
339
|
+
'(click)': 'onClick($event)'
|
|
340
|
+
}
|
|
341
|
+
}]
|
|
342
|
+
}], propDecorators: { _titleTplRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ImageViewerPictureTitleDirective), { isSignal: true }] }], _captionTplRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ImageViewerPictureCaptionDirective), { isSignal: true }] }], _descriptionTplRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ImageViewerPictureDescriptionDirective), { isSignal: true }] }], sourceUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "sourceUrl", required: true }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }] } });
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Generated bundle index. Do not edit.
|
|
346
|
+
*/
|
|
347
|
+
|
|
348
|
+
export { ImageViewerDirective, ImageViewerPictureCaptionDirective, ImageViewerPictureDescriptionDirective, ImageViewerPictureDirective, ImageViewerPictureTitleDirective };
|
|
349
|
+
//# sourceMappingURL=elementar-rt-components-image-viewer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elementar-rt-components-image-viewer.mjs","sources":["../../../projects/components/image-viewer/src/picture-ref.ts","../../../projects/components/image-viewer/src/types.ts","../../../projects/components/image-viewer/src/image-viewer/image-viewer.component.ts","../../../projects/components/image-viewer/src/image-viewer/image-viewer.component.html","../../../projects/components/image-viewer/src/image-viewer.directive.ts","../../../projects/components/image-viewer/src/image-viewer-picture-caption.directive.ts","../../../projects/components/image-viewer/src/image-viewer-picture-description.directive.ts","../../../projects/components/image-viewer/src/image-viewer-picture-title.directive.ts","../../../projects/components/image-viewer/src/image-viewer-picture.directive.ts","../../../projects/components/image-viewer/elementar-rt-components-image-viewer.ts"],"sourcesContent":["import { EventEmitter } from '@angular/core';\r\n\r\nexport class PictureRef {\r\n readonly closed = new EventEmitter();\r\n\r\n close(): void {\r\n this.closed.emit();\r\n }\r\n}\r\n","import { InjectionToken, TemplateRef } from '@angular/core';\r\nimport { PictureRef } from './picture-ref';\r\n\r\nexport interface PictureOptions {\r\n sourceUrl: string;\r\n title?: string | undefined;\r\n caption?: string | undefined;\r\n description?: string | undefined;\r\n titleTplRef?: TemplateRef<any> | undefined;\r\n captionTplRef?: TemplateRef<any> | undefined;\r\n descriptionTplRef?: TemplateRef<any> | undefined;\r\n}\r\n\r\nexport const IMAGE_VIEWER = new InjectionToken('IMAGE_VIEWER');\r\nexport const IMAGE_VIEWER_PICTURE_REF = new InjectionToken<PictureRef>('IMAGE_VIEWER_PICTURE_REF');\r\nexport const IMAGE_VIEWER_PICTURE_DATA = new InjectionToken<PictureOptions>('IMAGE_VIEWER_PICTURE_DATA');\r\n","import { Component, computed, DestroyRef, ElementRef, inject, Renderer2, DOCUMENT } from '@angular/core';\r\nimport { IMAGE_VIEWER_PICTURE_DATA, IMAGE_VIEWER_PICTURE_REF } from '../types';\r\nimport { MatIcon } from '@angular/material/icon';\r\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport { fromEvent } from 'rxjs';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: 'emr-image-viewer',\r\n exportAs: 'emrImageViewer',\r\n imports: [\r\n MatIcon,\r\n MatProgressSpinner,\r\n NgTemplateOutlet\r\n ],\r\n templateUrl: './image-viewer.component.html',\r\n styleUrl: './image-viewer.component.scss',\r\n host: {\r\n 'class': 'emr-image-viewer',\r\n '[class.loading]': 'loading',\r\n '[class.dragging]': '_dragging',\r\n '[class.scaled]': 'scale !== 1'\r\n }\r\n})\r\nexport class ImageViewerComponent {\r\n readonly elementRef = inject(ElementRef);\r\n private _document = inject(DOCUMENT);\r\n private _destroyRef = inject(DestroyRef);\r\n private _renderer = inject(Renderer2);\r\n private _startClientY = 0;\r\n private _startClientX = 0;\r\n private _offsetY = 0;\r\n private _offsetX = 0;\r\n private _tmpOffsetY = 0;\r\n private _tmpOffsetX = 0;\r\n protected _dragging = false;\r\n readonly pictureRef = inject(IMAGE_VIEWER_PICTURE_REF);\r\n readonly data = inject(IMAGE_VIEWER_PICTURE_DATA);\r\n loading = true;\r\n scale = 1;\r\n image: HTMLImageElement;\r\n alreadyDragged = false;\r\n scaleMin = 1;\r\n scaleMax = 1;\r\n padding = 30;\r\n\r\n scaled = computed<boolean>(() => {\r\n return this.scale !== 1;\r\n });\r\n hasTitle = computed(() => {\r\n return !!(this.data.title || this.data.titleTplRef);\r\n });\r\n hasAside = computed(() => {\r\n return !!(this.data.caption || this.data.description || this.data.captionTplRef || this.data.descriptionTplRef);\r\n });\r\n\r\n onLoad(event: Event): void {\r\n this.loading = false;\r\n this.image = (event.target as HTMLImageElement);\r\n\r\n if (this.image.width > this.image.height) {\r\n this.scaleMax = this.image.naturalWidth / this.image.width;\r\n } else {\r\n this.scaleMax = this.image.naturalHeight / this.image.height;\r\n }\r\n\r\n const image = this.image;\r\n fromEvent(image, 'mousedown')\r\n .pipe(\r\n takeUntilDestroyed(this._destroyRef)\r\n )\r\n .subscribe((event: MouseEvent | any) => {\r\n if (this.scale === this.scaleMin || event.button === 2) {\r\n return;\r\n }\r\n\r\n this._dragging = true;\r\n this._startClientY = event.clientY;\r\n this._startClientX = event.clientX;\r\n })\r\n ;\r\n fromEvent(this._document, 'mousemove')\r\n .pipe(\r\n takeUntilDestroyed(this._destroyRef)\r\n )\r\n .subscribe((event: any) => {\r\n if (this._dragging) {\r\n const scaleFactor = (1 / this.scale);\r\n let offsetY = (event.clientY - this._startClientY) * scaleFactor;\r\n let offsetX = (event.clientX - this._startClientX) * scaleFactor;\r\n this._transform(offsetY, offsetX);\r\n }\r\n })\r\n ;\r\n fromEvent(this._document, 'mouseup')\r\n .pipe(\r\n takeUntilDestroyed(this._destroyRef)\r\n )\r\n .subscribe((event: any) => {\r\n if (this._dragging) {\r\n const element = this.elementRef.nativeElement as HTMLElement;\r\n const elementRect = element.getBoundingClientRect();\r\n this._renderer.removeClass(element, 'dragging');\r\n this._dragging = false;\r\n let imageWidth = Math.floor(image.getBoundingClientRect().width);\r\n let imageHeight = Math.floor(image.getBoundingClientRect().height);\r\n let imageViewportWidth = this.hasAside() ? elementRect.width - 420 : elementRect.width;\r\n let imageViewportHeight = elementRect.height;\r\n\r\n if (imageWidth <= imageViewportWidth && imageHeight <= imageViewportHeight) {\r\n this._tmpOffsetY = 0;\r\n this._tmpOffsetX = 0;\r\n this._offsetY = 0;\r\n this._offsetX = 0;\r\n this._renderer.setStyle(image, 'transform', `translate(0px,0px)`);\r\n } else {\r\n const imageRect = image.getBoundingClientRect();\r\n const widthDiff = imageViewportWidth - imageWidth;\r\n const heightDiff = imageViewportHeight - imageHeight;\r\n const xPositionDiff = widthDiff / this.scale / 2;\r\n const yPositionDiff = heightDiff / this.scale / 2;\r\n\r\n if (imageRect.x > 0 && imageRect.y > 0) {\r\n this._tmpOffsetY = yPositionDiff * -1 + this.padding;\r\n this._tmpOffsetX = xPositionDiff * -1 + this.padding;\r\n } else if (imageRect.x < widthDiff && imageRect.y > 0) {\r\n this._tmpOffsetY = yPositionDiff * -1 + this.padding;\r\n this._tmpOffsetX = xPositionDiff - this.padding;\r\n } else if (imageRect.x < widthDiff && imageRect.y < heightDiff) {\r\n this._tmpOffsetY = yPositionDiff - this.padding;\r\n this._tmpOffsetX = xPositionDiff - this.padding;\r\n } else if (imageRect.x > 0 && imageRect.y < heightDiff) {\r\n this._tmpOffsetY = yPositionDiff - this.padding;\r\n this._tmpOffsetX = xPositionDiff * -1 + this.padding;\r\n }\r\n\r\n if (imageWidth < imageViewportWidth) {\r\n this._tmpOffsetX = 0;\r\n }\r\n\r\n if (imageHeight < imageViewportHeight) {\r\n this._tmpOffsetY = 0;\r\n }\r\n\r\n this._offsetY = this._tmpOffsetY;\r\n this._offsetX = this._tmpOffsetX;\r\n this._renderer.setStyle(\r\n image,\r\n 'transform', `translate(${this._tmpOffsetX}px,${this._tmpOffsetY}px)`\r\n );\r\n }\r\n }\r\n })\r\n ;\r\n }\r\n\r\n onBackdropClick(): void {\r\n this.pictureRef.close();\r\n }\r\n\r\n onPreventClick(event: MouseEvent) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n toggleZoom(): void {\r\n if (this.scale === this.scaleMin) {\r\n this.scale = this.scaleMax;\r\n } else {\r\n this.scale = this.scaleMin;\r\n this._renderer.setStyle(this.image, 'transform', `translate(0px,0px)`);\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n this._tmpOffsetY = 0;\r\n this._tmpOffsetX = 0;\r\n }\r\n\r\n const element = this.elementRef.nativeElement as HTMLElement;\r\n element.style.setProperty('--emr-image-viewer-picture-scale', this.scale.toString());\r\n }\r\n\r\n protected onDragStart(event: Event): void {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n this.alreadyDragged = true;\r\n }\r\n\r\n private _transform(offsetY: number, offsetX: number): void {\r\n const image = this.image as HTMLImageElement;\r\n const scaleFactor = (1 / this.scale);\r\n let translateX = this._offsetX + offsetX;\r\n // let offsetStartX = ((image.width / 2) - translateX) / scaleFactor;\r\n // let offsetEndX = ((image.width / 2) + translateX) / scaleFactor;\r\n let translateY = this._offsetY + offsetY;\r\n // let offsetStartY = ((image.height / 2) - translateY) / scaleFactor;\r\n // let offsetEndY = ((image.height / 2) + translateY) / scaleFactor;\r\n\r\n // let thumbHalfWidth = 150;\r\n //\r\n // if (offsetStartX <= thumbHalfWidth && translateX > 0) {\r\n // translateX = (image.width / 2) - (thumbHalfWidth * scaleFactor);\r\n // } else if (offsetEndX <= thumbHalfWidth && translateX < 0) {\r\n // translateX = -((image.width / 2) - (thumbHalfWidth * scaleFactor));\r\n // }\r\n //\r\n // if (offsetStartY <= thumbHalfWidth && translateY > 0) {\r\n // translateY = (image.height / 2) - (thumbHalfWidth * scaleFactor);\r\n // } else if (offsetEndY <= thumbHalfWidth && translateY < 0) {\r\n // translateY = -((image.height / 2) - (thumbHalfWidth * scaleFactor));\r\n // }\r\n\r\n this._tmpOffsetY = translateY;\r\n this._tmpOffsetX = translateX;\r\n this._renderer.setStyle(\r\n image,\r\n 'transform', `translate(${translateX}px,${translateY}px)`\r\n );\r\n }\r\n}\r\n","<div class=\"title-container\">\r\n @if (hasTitle()) {\r\n <div class=\"title\">\r\n @if (data.titleTplRef) {\r\n <ng-container [ngTemplateOutlet]=\"data.titleTplRef\"></ng-container>\r\n } @else if (data.caption) {\r\n {{ data.title }}\r\n }\r\n </div>\r\n }\r\n</div>\r\n<div class=\"controls\" (click)=\"onPreventClick($event)\">\r\n <div class=\"w-max\">\r\n <button (click)=\"pictureRef.close()\" class=\"close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"w-max\">\r\n <button class=\"zoom\" (click)=\"toggleZoom()\" [disabled]=\"scaleMax === 1 || null\">\r\n @if (scale === this.scaleMin) {\r\n <mat-icon>zoom_in</mat-icon>\r\n } @else {\r\n <mat-icon>zoom_out</mat-icon>\r\n }\r\n </button>\r\n </div>\r\n</div>\r\n<div class=\"content\" (click)=\"onBackdropClick()\">\r\n <div class=\"image\" (dragstart)=\"onDragStart($event)\">\r\n @if (loading) {\r\n <div class=\"spinner\">\r\n <mat-spinner/>\r\n </div>\r\n }\r\n <img [src]=\"data.sourceUrl\" alt=\"\" (load)=\"onLoad($event)\" (click)=\"onPreventClick($event)\" class=\"img\">\r\n </div>\r\n @if (hasAside()) {\r\n <aside class=\"aside\" (click)=\"onPreventClick($event)\">\r\n <div class=\"aside-header\">\r\n @if (data.captionTplRef) {\r\n <ng-container [ngTemplateOutlet]=\"data.captionTplRef\"></ng-container>\r\n } @else if (data.caption) {\r\n {{ data.caption }}\r\n }\r\n </div>\r\n <div class=\"aside-body\">\r\n <div class=\"aside-body-scroll\">\r\n @if (data.descriptionTplRef) {\r\n <ng-container [ngTemplateOutlet]=\"data.descriptionTplRef\"></ng-container>\r\n } @else if (data.description) {\r\n {{ data.description }}\r\n }\r\n </div>\r\n </div>\r\n </aside>\r\n }\r\n</div>\r\n","import { DestroyRef, Directive, inject, Injector } from '@angular/core';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { PictureRef } from './picture-ref';\r\nimport { ImageViewerComponent } from './image-viewer/image-viewer.component';\r\nimport { IMAGE_VIEWER_PICTURE_DATA, IMAGE_VIEWER_PICTURE_REF, PictureOptions } from './types';\r\n\r\n@Directive({\r\n selector: '[emrImageViewer]',\r\n exportAs: 'emrImageViewer',\r\n standalone: true,\r\n host: {\r\n 'class': 'emr-image-viewer',\r\n }\r\n})\r\nexport class ImageViewerDirective {\r\n private _overlay = inject(Overlay);\r\n private _injector = inject(Injector);\r\n private _destroyRef = inject(DestroyRef);\r\n\r\n get api() {\r\n return {\r\n open: (options: PictureOptions): PictureRef => this._open(options)\r\n }\r\n }\r\n\r\n private _open(options: PictureOptions): PictureRef {\r\n const pictureRef = new PictureRef();\r\n const overlayRef = this._overlay.create({\r\n positionStrategy: this._overlay.position().global(),\r\n hasBackdrop: true\r\n });\r\n const injector = Injector.create({\r\n providers: [\r\n {\r\n provide: IMAGE_VIEWER_PICTURE_REF,\r\n useValue: pictureRef\r\n },\r\n {\r\n provide: IMAGE_VIEWER_PICTURE_DATA,\r\n useValue: options\r\n }\r\n ],\r\n parent: this._injector\r\n });\r\n const portal = new ComponentPortal(ImageViewerComponent, null, injector);\r\n overlayRef.attach(portal);\r\n pictureRef.closed.pipe(\r\n takeUntilDestroyed(this._destroyRef)\r\n ).subscribe(() => {\r\n overlayRef.detach();\r\n });\r\n return pictureRef;\r\n }\r\n}\r\n","import { Directive, inject, TemplateRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[emrImageViewerPictureCaption]',\r\n standalone: true\r\n})\r\nexport class ImageViewerPictureCaptionDirective {\r\n readonly templateRef = inject(TemplateRef);\r\n}\r\n","import { Directive, inject, TemplateRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[emrImageViewerPictureDescription]',\r\n standalone: true\r\n})\r\nexport class ImageViewerPictureDescriptionDirective {\r\n readonly templateRef = inject(TemplateRef);\r\n}\r\n","import { Directive, inject, TemplateRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[emrImageViewerPictureTitle]',\r\n standalone: true\r\n})\r\nexport class ImageViewerPictureTitleDirective {\r\n readonly templateRef = inject(TemplateRef);\r\n}\r\n","import { contentChild, Directive, inject, input } from '@angular/core';\r\nimport { IMAGE_VIEWER } from './types';\r\nimport { ImageViewerDirective } from './image-viewer.directive';\r\nimport { ImageViewerPictureCaptionDirective } from './image-viewer-picture-caption.directive';\r\nimport { ImageViewerPictureDescriptionDirective } from './image-viewer-picture-description.directive';\r\nimport { ImageViewerPictureTitleDirective } from './image-viewer-picture-title.directive';\r\n\r\n@Directive({\r\n selector: '[emrImageViewerPicture]',\r\n exportAs: 'emrImageViewerPicture',\r\n standalone: true,\r\n providers: [\r\n {\r\n provide: IMAGE_VIEWER,\r\n useExisting: ImageViewerPictureDirective\r\n }\r\n ],\r\n host: {\r\n 'class': 'emr-image-viewer-picture',\r\n '(click)': 'onClick($event)'\r\n }\r\n})\r\nexport class ImageViewerPictureDirective {\r\n private _imageViewer = inject(ImageViewerDirective);\r\n private _titleTplRef = contentChild(ImageViewerPictureTitleDirective);\r\n private _captionTplRef = contentChild(ImageViewerPictureCaptionDirective);\r\n private _descriptionTplRef = contentChild(ImageViewerPictureDescriptionDirective);\r\n\r\n sourceUrl = input.required<string>();\r\n caption = input<string>();\r\n title = input<string>();\r\n description = input<string>();\r\n\r\n protected onClick(event: MouseEvent) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this._imageViewer.api.open({\r\n sourceUrl: this.sourceUrl(),\r\n title: this.title(),\r\n caption: this.caption(),\r\n description: this.description(),\r\n titleTplRef: this._titleTplRef()?.templateRef,\r\n captionTplRef: this._captionTplRef()?.templateRef,\r\n descriptionTplRef: this._descriptionTplRef()?.templateRef\r\n });\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAEa,UAAU,CAAA;AACZ,IAAA,MAAM,GAAG,IAAI,YAAY,EAAE;IAEpC,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;IACpB;AACD;;ACKM,MAAM,YAAY,GAAG,IAAI,cAAc,CAAC,cAAc,CAAC;AACvD,MAAM,wBAAwB,GAAG,IAAI,cAAc,CAAa,0BAA0B,CAAC;AAC3F,MAAM,yBAAyB,GAAG,IAAI,cAAc,CAAiB,2BAA2B,CAAC;;MCU3F,oBAAoB,CAAA;AACtB,IAAA,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