ngx-tethys 19.0.4 → 19.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/anchor/anchor-link.component.d.ts +2 -1
- package/anchor/anchor.component.d.ts +2 -1
- package/anchor/anchor.token.d.ts +9 -0
- package/calendar/calendar-header.component.d.ts +3 -2
- package/carousel/carousel.component.d.ts +2 -1
- package/carousel/carousel.token.d.ts +7 -0
- package/carousel/engine/carousel-base.d.ts +3 -3
- package/carousel/engine/carousel-fade.d.ts +2 -2
- package/carousel/engine/carousel-noop.d.ts +2 -2
- package/carousel/engine/carousel-slide.d.ts +2 -2
- package/collapse/collapse-item.component.d.ts +2 -1
- package/collapse/collapse.component.d.ts +5 -5
- package/collapse/collapse.token.d.ts +15 -0
- package/color-picker/color-picker.component.d.ts +15 -3
- package/core/theme/enum.d.ts +5 -0
- package/core/theme/index.d.ts +1 -0
- package/core/theme/store.d.ts +1 -1
- package/core/theme/theme.d.ts +0 -5
- package/date-picker/abstract-picker.component.d.ts +6 -1
- package/date-picker/base-picker.component.d.ts +1 -1
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +2 -1
- package/date-picker/lib/calendar/calendar-table.component.d.ts +4 -3
- package/date-picker/lib/popups/date-popup.component.d.ts +2 -1
- package/date-picker/lib/popups/inner-popup.component.d.ts +2 -1
- package/date-picker/picker.component.d.ts +2 -1
- package/date-picker/picker.util.d.ts +5 -5
- package/date-picker/standard-types.d.ts +7 -2
- package/drag-drop/drag-drop.service.d.ts +2 -2
- package/drag-drop/{drop-container.class.d.ts → drag-drop.token.d.ts} +12 -7
- package/drag-drop/drag-handle.directive.d.ts +2 -1
- package/drag-drop/drag-ref.d.ts +3 -5
- package/drag-drop/drag.directive.d.ts +3 -3
- package/drag-drop/drop-container.directive.d.ts +1 -1
- package/drag-drop/index.d.ts +1 -1
- package/fesm2022/ngx-tethys-action.mjs +11 -12
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +8 -9
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-alert.mjs +11 -12
- package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +26 -13
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
- package/fesm2022/ngx-tethys-autocomplete.mjs +17 -18
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +25 -28
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +7 -7
- package/fesm2022/ngx-tethys-badge.mjs +7 -7
- package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
- package/fesm2022/ngx-tethys-button.mjs +14 -15
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +18 -20
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +15 -17
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +28 -17
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +16 -16
- package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
- package/fesm2022/ngx-tethys-collapse.mjs +97 -85
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +34 -36
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-comment.mjs +15 -17
- package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +8 -9
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs +21 -22
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +232 -248
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +10 -10
- package/fesm2022/ngx-tethys-dialog.mjs +22 -23
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +7 -7
- package/fesm2022/ngx-tethys-dot.mjs +8 -9
- package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
- package/fesm2022/ngx-tethys-drag-drop.mjs +23 -30
- package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dropdown.mjs +58 -70
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +10 -10
- package/fesm2022/ngx-tethys-flexible-text.mjs +8 -8
- package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +47 -54
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-fullscreen.mjs +15 -16
- package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +46 -51
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-guider.mjs +55 -61
- package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +51 -54
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-icon.mjs +11 -12
- package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +32 -21
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +7 -7
- package/fesm2022/ngx-tethys-input.mjs +21 -23
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs +73 -88
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +19 -22
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +7 -7
- package/fesm2022/ngx-tethys-mention.mjs +11 -12
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +30 -30
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +24 -24
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +26 -29
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +17 -17
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +15 -17
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +21 -23
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +13 -13
- package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
- package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +11 -11
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +125 -115
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-rate.mjs +10 -10
- package/fesm2022/ngx-tethys-resizable.mjs +18 -18
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-result.mjs +7 -7
- package/fesm2022/ngx-tethys-segment.mjs +10 -10
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +10 -10
- package/fesm2022/ngx-tethys-shared.mjs +81 -109
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +23 -24
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +36 -41
- package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +7 -7
- package/fesm2022/ngx-tethys-space.mjs +11 -12
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +7 -7
- package/fesm2022/ngx-tethys-stepper.mjs +22 -24
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-strength.mjs +8 -8
- package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +7 -7
- package/fesm2022/ngx-tethys-table.mjs +22 -25
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +14 -15
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +12 -13
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +58 -56
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +13 -13
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +14 -15
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-transfer.mjs +10 -10
- package/fesm2022/ngx-tethys-tree-select.mjs +10 -10
- package/fesm2022/ngx-tethys-tree.mjs +17 -21
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +15 -17
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +18 -19
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-util.mjs +418 -396
- package/fesm2022/ngx-tethys-util.mjs.map +1 -1
- package/fesm2022/ngx-tethys-vote.mjs +7 -7
- package/fesm2022/ngx-tethys-watermark.mjs +8 -9
- package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/grid/grid.type.d.ts +5 -0
- package/grid/index.d.ts +1 -0
- package/grid/thy-grid-item.component.d.ts +1 -1
- package/grid/thy-grid.component.d.ts +1 -11
- package/guider/guider-manager.d.ts +2 -1
- package/guider/guider-ref.d.ts +6 -6
- package/guider/guider-step-ref.d.ts +3 -4
- package/guider/guider.interface.d.ts +26 -0
- package/i18n/i18n.service.d.ts +1 -1
- package/i18n/index.d.ts +2 -5
- package/i18n/locale.d.ts +1 -7
- package/i18n/locales/index.d.ts +5 -0
- package/i18n/util.d.ts +3 -0
- package/icon/index.d.ts +1 -1
- package/image/image-group.component.d.ts +4 -4
- package/image/image.directive.d.ts +2 -1
- package/image/image.token.d.ts +17 -0
- package/layout/header.component.d.ts +6 -18
- package/list/selection/selection-list.d.ts +2 -1
- package/list/selection/selection.interface.d.ts +2 -3
- package/message/abstract/abstract-message-queue.service.d.ts +2 -2
- package/message/abstract/abstract-message-ref.d.ts +6 -2
- package/package.json +2 -1
- package/popover/popover.directive.d.ts +6 -2
- package/radio/group/radio-group.component.d.ts +2 -1
- package/radio/radio.component.d.ts +3 -3
- package/radio/radio.token.d.ts +12 -0
- package/resizable/interface.d.ts +5 -0
- package/resizable/resizable.directive.d.ts +9 -3
- package/resizable/resizable.service.d.ts +1 -1
- package/resizable/resize-handle.component.d.ts +1 -6
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/segment-item.component.d.ts +2 -1
- package/segment/segment.token.d.ts +10 -4
- package/shared/index.d.ts +1 -0
- package/shared/option/list-option/list-option.component.d.ts +10 -5
- package/shared/option/option.component.d.ts +1 -3
- package/shared/option/option.token.d.ts +11 -11
- package/shared/shared.type.d.ts +1 -0
- package/table/index.d.ts +1 -0
- package/table/styles/table.scss +9 -1
- package/table/table-column.component.d.ts +5 -30
- package/table/table-skeleton.component.d.ts +11 -3
- package/table/table.component.d.ts +1 -3
- package/table/table.type.d.ts +3 -0
- package/tag/tag.component.d.ts +2 -4
- package/time-picker/inner/inner-time-picker.component.d.ts +3 -1
- package/time-picker/inner/inner-time-picker.store.d.ts +5 -5
- package/time-picker/time-picker.utils.d.ts +5 -5
- package/timeline/index.d.ts +1 -0
- package/timeline/timeline-item.component.d.ts +1 -1
- package/timeline/timeline.component.d.ts +1 -1
- package/timeline/timeline.type.d.ts +1 -0
- package/tooltip/tooltip.directive.d.ts +2 -10
- package/tree/index.d.ts +0 -1
- package/tree/tree-abstract.d.ts +1 -1
- package/tree/tree-node.component.d.ts +17 -8
- package/tree/tree.class.d.ts +40 -1
- package/tree/tree.component.d.ts +1 -1
- package/tree/tree.pipe.d.ts +1 -1
- package/tree/tree.service.d.ts +3 -9
- package/util/helpers/helpers.d.ts +1 -0
- package/tree/tree-node.class.d.ts +0 -29
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injector, ElementRef, ViewEncapsulation, ChangeDetectionStrategy, Component,
|
|
2
|
+
import { InjectionToken, inject, Injector, ElementRef, ViewEncapsulation, ChangeDetectionStrategy, Component, ChangeDetectorRef, NgZone, EventEmitter, DestroyRef, ViewChild, Output, Injectable, InjectFlags, Input, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { ThyAbstractOverlayConfig } from 'ngx-tethys/core';
|
|
4
4
|
import { CdkDrag, DragDropModule } from '@angular/cdk/drag-drop';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -20,6 +20,8 @@ import { LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';
|
|
|
20
20
|
import { CommonModule } from '@angular/common';
|
|
21
21
|
import { PortalModule } from '@angular/cdk/portal';
|
|
22
22
|
|
|
23
|
+
const THY_IMAGE_GROUP_COMPONENT = new InjectionToken('THY_IMAGE_GROUP_COMPONENT');
|
|
24
|
+
|
|
23
25
|
/**
|
|
24
26
|
* 图片分组,提供 thyImageGroup 指令和 thy-image-group 标签两种使用方式
|
|
25
27
|
* @name thy-image-group,[thyImageGroup]
|
|
@@ -36,17 +38,27 @@ class ThyImageGroup {
|
|
|
36
38
|
removeImage(index) {
|
|
37
39
|
this.images.splice(index, 1);
|
|
38
40
|
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
40
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ThyImageGroup, isStandalone: true, selector: "thy-image-group, [thyImageGroup]", providers: [
|
|
43
|
+
{
|
|
44
|
+
provide: THY_IMAGE_GROUP_COMPONENT,
|
|
45
|
+
useClass: ThyImageGroup
|
|
46
|
+
}
|
|
47
|
+
], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
41
48
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageGroup, decorators: [{
|
|
43
50
|
type: Component,
|
|
44
51
|
args: [{
|
|
45
52
|
selector: 'thy-image-group, [thyImageGroup]',
|
|
46
53
|
template: '<ng-content></ng-content>',
|
|
47
54
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
48
55
|
encapsulation: ViewEncapsulation.None,
|
|
49
|
-
|
|
56
|
+
providers: [
|
|
57
|
+
{
|
|
58
|
+
provide: THY_IMAGE_GROUP_COMPONENT,
|
|
59
|
+
useClass: ThyImageGroup
|
|
60
|
+
}
|
|
61
|
+
]
|
|
50
62
|
}]
|
|
51
63
|
}] });
|
|
52
64
|
|
|
@@ -457,10 +469,10 @@ class ThyImagePreview {
|
|
|
457
469
|
updatePreviewImageWrapperTransform() {
|
|
458
470
|
this.previewImageWrapperTransform = `translate3d(${this.position.x}px, ${this.position.y}px, 0)`;
|
|
459
471
|
}
|
|
460
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
461
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
472
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImagePreview, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
473
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThyImagePreview, isStandalone: true, selector: "thy-image-preview", outputs: { downloadClicked: "downloadClicked" }, host: { properties: { "class.thy-image-preview-moving": "isDragging" }, classAttribute: "thy-image-preview-wrap" }, viewQueries: [{ propertyName: "imageRef", first: true, predicate: ["imgRef"], descendants: true }, { propertyName: "imagePreviewWrapper", first: true, predicate: ["imagePreviewWrapper"], descendants: true, static: true }], exportAs: ["thyImagePreview"], ngImport: i0, template: "<div class=\"thy-image-preview\" [class.thy-image-preview-fullscreen]=\"isFullScreen\">\n @if (!isFullScreen) {\n <div class=\"thy-image-preview-header pl-10 pr-8\">\n <div class=\"thy-image-preview-header-info\">\n <p class=\"thy-image-name text-truncate\" [thyTooltipDisabled]=\"previewImage?.name?.length < 32\" [thyTooltip]=\"previewImage?.name\">\n {{ previewImage?.name }}\n </p>\n <span class=\"thy-image-size\"> {{ previewImage?.size }}</span>\n </div>\n <a thyAction thyIcon=\"close\" thyTooltip=\"\u9000\u51FA\u9884\u89C8\" href=\"javascript:;\" (click)=\"thyDialog.close()\"></a>\n </div>\n }\n @if (isFullScreen) {\n <a\n class=\"thy-image-preview-exit-fullscreen\"\n thyAction\n thyIcon=\"close\"\n thyTooltip=\"\u9000\u51FA\u9884\u89C8\"\n href=\"javascript:;\"\n (click)=\"thyFullscreen.exit()\"\n thyTooltip=\"\u9000\u51FA\u5168\u5C4F\"></a>\n }\n <div\n class=\"thy-image-preview-img-wrapper\"\n #imagePreviewWrapper\n cdkDrag\n [class.thy-image-preview-inside]=\"isInsideScreen\"\n [style.transform]=\"previewImageWrapperTransform\"\n [cdkDragFreeDragPosition]=\"position\"\n (cdkDragReleased)=\"dragReleased()\">\n @for (image of images; track $index; let imageIndex = $index) {\n @if (previewIndex === imageIndex && isLoadingDone) {\n <img #imgRef class=\"thy-image-preview-img\" [src]=\"image.objectURL || image.src\" [style.transform]=\"previewImageTransform\" />\n }\n }\n <thy-loading [thyDone]=\"isLoadingDone\"></thy-loading>\n </div>\n\n @if (images.length > 1 && !isFullScreen) {\n <div\n class=\"thy-image-preview-switch-left\"\n [thyTooltipDisabled]=\"previewIndex <= 0\"\n thyTooltip=\"\u4E0A\u4E00\u5F20\"\n [class.thy-image-preview-switch-left-disabled]=\"previewIndex <= 0\"\n (click)=\"prev()\">\n <thy-icon thyIconName=\"angle-left-bold\"></thy-icon>\n </div>\n <div\n class=\"thy-image-preview-switch-right\"\n thyTooltip=\"\u4E0B\u4E00\u5F20\"\n [thyTooltipDisabled]=\"previewIndex >= images.length - 1\"\n [class.thy-image-preview-switch-right-disabled]=\"previewIndex >= images.length - 1\"\n (click)=\"next()\">\n <thy-icon thyIconName=\"angle-right-bold\"> </thy-icon>\n </div>\n }\n @if (!isFullScreen) {\n <thy-actions thySize=\"xs\" class=\"thy-image-preview-operations py-3 px-4\">\n @for (option of previewOperations; track $index; let i = $index) {\n @if (!['original-scale', 'fit-screen', 'copyLink'].includes(option.type) || currentImageMode === option.type) {\n <a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"option.icon\"\n [thyTooltip]=\"option.name\"\n [thyTooltipOffset]=\"13\"\n (click)=\"option.action(previewImage)\"></a>\n }\n @if (option?.type === 'zoom-out') {\n <span class=\"mr-2\"> {{ (zoom * 100).toFixed(0) + '%' }} </span>\n }\n @if (option?.type === 'rotate-right') {\n <thy-divider class=\"ml-2\" [thyVertical]=\"true\"></thy-divider>\n }\n @if (option.type === 'copyLink') {\n <a\n href=\"javascript:;\"\n thyAction\n [thyCopyTips]=\"option.name\"\n [thyActionIcon]=\"option.icon\"\n [thyCopyTipsOffset]=\"13\"\n (thyCopy)=\"copyLink($event)\"\n [thyCopyContent]=\"previewImageOriginSrc\"\n [thyShowNotify]=\"false\"></a>\n }\n }\n <thy-divider [thyVertical]=\"true\"></thy-divider>\n <span class=\"thy-image-preview-operations-text\"> {{ previewIndex + 1 }} / {{ images.length }} </span>\n </thy-actions>\n }\n</div>\n", dependencies: [{ kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: ThyLoading, selector: "thy-loading", inputs: ["thyDone", "thyTip", "thyIsMask"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThyCopyDirective, selector: "[thyCopy]", inputs: ["thyCopySuccessText", "thyCopyTips", "thyCopyTipsOffset", "thyCopyContent", "thyShowNotify"], outputs: ["thyCopy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
462
474
|
}
|
|
463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImagePreview, decorators: [{
|
|
464
476
|
type: Component,
|
|
465
477
|
args: [{ selector: 'thy-image-preview', exportAs: 'thyImagePreview', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
466
478
|
class: 'thy-image-preview-wrap',
|
|
@@ -550,10 +562,10 @@ class ThyImageService {
|
|
|
550
562
|
this.ngUnsubscribe$.next();
|
|
551
563
|
this.ngUnsubscribe$.complete();
|
|
552
564
|
}
|
|
553
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
554
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
565
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
566
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageService }); }
|
|
555
567
|
}
|
|
556
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
568
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageService, decorators: [{
|
|
557
569
|
type: Injectable
|
|
558
570
|
}], ctorParameters: () => [] });
|
|
559
571
|
|
|
@@ -587,7 +599,7 @@ class ThyImageDirective {
|
|
|
587
599
|
while (true) {
|
|
588
600
|
// 多层 thy-image-group 嵌套时,获取最外层 thy-image-group 下的所有图片
|
|
589
601
|
const injector = this.parentGroup?.injector || this.injector;
|
|
590
|
-
const parentGroup = injector.get(
|
|
602
|
+
const parentGroup = injector.get(THY_IMAGE_GROUP_COMPONENT, null, InjectFlags.SkipSelf);
|
|
591
603
|
if (!parentGroup) {
|
|
592
604
|
break;
|
|
593
605
|
}
|
|
@@ -651,10 +663,10 @@ class ThyImageDirective {
|
|
|
651
663
|
this.parentGroup.removeImage(index);
|
|
652
664
|
}
|
|
653
665
|
}
|
|
654
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
655
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.
|
|
666
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
667
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.6", type: ThyImageDirective, isStandalone: true, selector: "img[thyImage]", inputs: { thySrc: "thySrc", thyPreviewSrc: "thyPreviewSrc", thyOriginSrc: "thyOriginSrc", thyImageMeta: "thyImageMeta", thyDisablePreview: ["thyDisablePreview", "thyDisablePreview", coerceBooleanProperty], thyResolveSize: ["thyResolveSize", "thyResolveSize", coerceBooleanProperty] }, host: { listeners: { "click": "onPreview($event)" }, properties: { "class.thy-image-disabled": "thyDisablePreview" }, classAttribute: "thy-image" }, exportAs: ["thyImage"], usesOnChanges: true, ngImport: i0 }); }
|
|
656
668
|
}
|
|
657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageDirective, decorators: [{
|
|
658
670
|
type: Directive,
|
|
659
671
|
args: [{
|
|
660
672
|
selector: 'img[thyImage]',
|
|
@@ -663,8 +675,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
663
675
|
'(click)': 'onPreview($event)',
|
|
664
676
|
class: 'thy-image',
|
|
665
677
|
'[class.thy-image-disabled]': 'thyDisablePreview'
|
|
666
|
-
}
|
|
667
|
-
standalone: true
|
|
678
|
+
}
|
|
668
679
|
}]
|
|
669
680
|
}], propDecorators: { thySrc: [{
|
|
670
681
|
type: Input
|
|
@@ -683,8 +694,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
683
694
|
}] } });
|
|
684
695
|
|
|
685
696
|
class ThyImageModule {
|
|
686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
687
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
697
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
698
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ThyImageModule, imports: [CommonModule,
|
|
688
699
|
PortalModule,
|
|
689
700
|
DragDropModule,
|
|
690
701
|
ThyIconModule,
|
|
@@ -697,7 +708,7 @@ class ThyImageModule {
|
|
|
697
708
|
ThyImageDirective,
|
|
698
709
|
ThyImageGroup,
|
|
699
710
|
ThyImagePreview], exports: [ThyImageDirective, ThyImageGroup, ThyImagePreview] }); }
|
|
700
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
711
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageModule, providers: [ThyImageService, THY_IMAGE_DEFAULT_PREVIEW_OPTIONS_PROVIDER], imports: [CommonModule,
|
|
701
712
|
PortalModule,
|
|
702
713
|
DragDropModule,
|
|
703
714
|
ThyIconModule,
|
|
@@ -709,7 +720,7 @@ class ThyImageModule {
|
|
|
709
720
|
ThyActionModule,
|
|
710
721
|
ThyImagePreview] }); }
|
|
711
722
|
}
|
|
712
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyImageModule, decorators: [{
|
|
713
724
|
type: NgModule,
|
|
714
725
|
args: [{
|
|
715
726
|
exports: [ThyImageDirective, ThyImageGroup, ThyImagePreview],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-image.mjs","sources":["../../../src/image/image-group.component.ts","../../../src/image/image.config.ts","../../../src/image/utils.ts","../../../src/image/preview/image-preview.component.ts","../../../src/image/preview/image-preview.component.html","../../../src/image/preview/image-preview-ref.ts","../../../src/image/image.service.ts","../../../src/image/image.directive.ts","../../../src/image/module.ts","../../../src/image/ngx-tethys-image.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation, Injector, ElementRef, inject } from '@angular/core';\nimport { ThyImageDirective } from './image.directive';\n\n/**\n * 图片分组,提供 thyImageGroup 指令和 thy-image-group 标签两种使用方式\n * @name thy-image-group,[thyImageGroup]\n */\n@Component({\n selector: 'thy-image-group, [thyImageGroup]',\n template: '<ng-content></ng-content>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true\n})\nexport class ThyImageGroup {\n injector = inject(Injector);\n element = inject(ElementRef);\n\n images: ThyImageDirective[] = [];\n\n addImage(image: ThyImageDirective, index: number): void {\n this.images.splice(index, 0, image);\n }\n\n removeImage(index: number) {\n this.images.splice(index, 1);\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { ThyAbstractOverlayConfig, ThyAbstractOverlayOptions } from 'ngx-tethys/core';\n\nexport class ThyImagePreviewConfig<TData = unknown> extends ThyAbstractOverlayConfig<TData> {\n closeOnNavigation?: boolean;\n disableClose?: boolean;\n disableKeyboardSelectable?: boolean;\n zoom?: number;\n rotate?: number;\n}\n\nexport const THY_IMAGE_DEFAULT_PREVIEW_OPTIONS = new InjectionToken<ThyImagePreviewConfig>('thy-image-default-options');\n\nexport const THY_IMAGE_DEFAULT_PREVIEW_OPTIONS_PROVIDER = {\n provide: THY_IMAGE_DEFAULT_PREVIEW_OPTIONS,\n useValue: {\n hasBackdrop: true,\n closeOnNavigation: true,\n disableClose: false,\n disableKeyboardSelectable: false,\n restoreFocus: false\n }\n};\n\nexport const imageAbstractOverlayOptions: ThyAbstractOverlayOptions = {\n name: 'image',\n animationEnabled: true,\n disposeWhenClose: true\n};\n","import { fromEvent } from 'rxjs';\nimport { map, take } from 'rxjs/operators';\n\nexport const fetchImageBlob = (url: string) => {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.responseType = 'blob';\n const loadedXhr$ = fromEvent(xhr, 'load').pipe(\n take(1),\n map(data => {\n return xhr.response;\n })\n );\n xhr.send();\n return loadedXhr$;\n};\n","import { CdkDrag } from '@angular/cdk/drag-drop';\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n NgZone,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { ThyAction, ThyActions } from 'ngx-tethys/action';\nimport { ThyCopyDirective, ThyCopyEvent } from 'ngx-tethys/copy';\nimport { ThyDialog } from 'ngx-tethys/dialog';\nimport { ThyDivider } from 'ngx-tethys/divider';\nimport { ThyFullscreen } from 'ngx-tethys/fullscreen';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyLoading } from 'ngx-tethys/loading';\nimport { ThyNotifyService } from 'ngx-tethys/notify';\nimport { ThyTooltipDirective } from 'ngx-tethys/tooltip';\nimport { getClientSize, getFitContentPosition, getOffset, helpers, humanizeBytes, isNumber, isUndefinedOrNull } from 'ngx-tethys/util';\nimport { Observable, fromEvent } from 'rxjs';\nimport { InternalImageInfo, ThyImageInfo, ThyImagePreviewMode, ThyImagePreviewOperation, ThyImagePreviewOptions } from '../image.class';\nimport { fetchImageBlob } from '../utils';\n\nconst initialPosition = {\n x: 0,\n y: 0\n};\nconst IMAGE_MAX_ZOOM = 3;\nconst IMAGE_MIN_ZOOM = 0.1;\nconst HORIZONTAL_SPACE = 100 * 2; // left: 100px; right: 100px\nconst VERTICAL_SPACE = 96 + 106; // top: 96px; bottom: 106px\n\n/**\n * 图片预览组件\n * @name thy-image-preview\n * @order 20\n */\n@Component({\n selector: 'thy-image-preview',\n exportAs: 'thyImagePreview',\n templateUrl: './image-preview.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'thy-image-preview-wrap',\n '[class.thy-image-preview-moving]': 'isDragging'\n },\n imports: [ThyTooltipDirective, ThyAction, CdkDrag, ThyLoading, ThyIcon, ThyActions, ThyDivider, ThyCopyDirective]\n})\nexport class ThyImagePreview implements OnInit {\n thyDialog = inject(ThyDialog);\n thyFullscreen = inject(ThyFullscreen);\n private cdr = inject(ChangeDetectorRef);\n private ngZone = inject(NgZone);\n private notifyService = inject(ThyNotifyService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n private sanitizer = inject(DomSanitizer);\n\n @Output() downloadClicked: EventEmitter<ThyImageInfo> = new EventEmitter();\n\n private readonly destroyRef = inject(DestroyRef);\n\n images: InternalImageInfo[] = [];\n previewIndex: number = 0;\n previewConfig: ThyImagePreviewOptions;\n previewImageTransform = '';\n previewImageWrapperTransform = '';\n zoomDisabled = false;\n zoom: number = 1;\n position = { ...initialPosition };\n isDragging = false;\n isLoadingDone = false;\n isFullScreen = false;\n isInsideScreen = true;\n currentImageMode: ThyImagePreviewMode = 'original-scale';\n previewOperations: ThyImagePreviewOperation[];\n defaultPreviewOperations: ThyImagePreviewOperation[] = [\n {\n icon: 'zoom-out',\n name: '缩小',\n action: (image: ThyImageInfo) => {\n this.zoomOut();\n },\n type: 'zoom-out'\n },\n {\n icon: 'zoom-in',\n name: '放大',\n action: (image: ThyImageInfo) => {\n this.zoomIn();\n },\n type: 'zoom-in'\n },\n {\n icon: 'one-to-one',\n name: '原始比例',\n action: (image: ThyImageInfo) => {\n this.setOriginalSize();\n },\n type: 'original-scale'\n },\n {\n icon: 'max-view',\n name: '适应屏幕',\n action: () => {\n this.setFitScreen();\n },\n type: 'fit-screen'\n },\n {\n icon: 'expand-arrows',\n name: '全屏显示',\n action: () => {\n this.fullScreen();\n },\n type: 'full-screen'\n },\n {\n icon: 'rotate-right',\n name: '旋转',\n action: (image: ThyImageInfo) => {\n this.rotateRight();\n },\n type: 'rotate-right'\n },\n {\n icon: 'download',\n name: '下载',\n action: (image: ThyImageInfo) => {\n this.download(image);\n },\n type: 'download'\n },\n {\n icon: 'preview',\n name: '查看原图',\n action: () => {\n this.viewOriginal();\n },\n type: 'view-original'\n },\n {\n icon: 'link-insert',\n name: '复制链接',\n type: 'copyLink'\n }\n ];\n\n private rotate: number;\n\n get previewImage(): InternalImageInfo {\n const image = this.images[this.previewIndex];\n if (image.size) {\n image.size = isNumber(image.size) ? humanizeBytes(image.size) : image.size;\n }\n return image;\n }\n\n get previewImageOriginSrc() {\n let imageSrc = this.previewImage.origin?.src || this.previewImage.src;\n if (imageSrc.startsWith('./')) {\n return window.location.host + '/' + imageSrc.split('./')[1];\n }\n return imageSrc;\n }\n\n get defaultZoom(): number {\n if (this.previewConfig?.zoom && this.previewConfig?.zoom > 0) {\n return this.previewConfig.zoom >= IMAGE_MAX_ZOOM\n ? IMAGE_MAX_ZOOM\n : this.previewConfig.zoom <= IMAGE_MIN_ZOOM\n ? IMAGE_MIN_ZOOM\n : this.previewConfig.zoom;\n }\n }\n\n @ViewChild('imgRef', { static: false }) imageRef!: ElementRef<HTMLImageElement>;\n @ViewChild('imagePreviewWrapper', { static: true }) imagePreviewWrapper!: ElementRef<HTMLElement>;\n\n ngOnInit(): void {\n this.initPreview();\n this.ngZone.runOutsideAngular(() => {\n fromEvent(this.host.nativeElement, 'click')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (\n (event.target === event.currentTarget ||\n (this.isInsideScreen && this.imagePreviewWrapper.nativeElement.contains(event.target as HTMLElement))) &&\n !this.previewConfig?.disableClose\n ) {\n this.ngZone.run(() => !this.isFullScreen && this.thyDialog.close());\n }\n });\n\n fromEvent(this.imagePreviewWrapper.nativeElement, 'mousedown')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.isDragging = !this.isInsideScreen && true;\n });\n });\n }\n\n setOriginalSize() {\n this.reset();\n this.currentImageMode = 'fit-screen';\n this.zoom = 1;\n this.updatePreviewImageTransform();\n this.calculateInsideScreen();\n this.isLoadingDone = true;\n this.cdr.detectChanges();\n }\n\n setFitScreen() {\n this.reset();\n this.isInsideScreen = true;\n this.updatePreviewImage();\n }\n\n useDefaultZoomUpdate(isUpdateImageWrapper: boolean) {\n this.zoom = this.defaultZoom;\n this.isLoadingDone = true;\n this.updatePreviewImageTransform();\n if (isUpdateImageWrapper) {\n this.updatePreviewImageWrapperTransform();\n }\n this.cdr.detectChanges();\n }\n\n useCalculateZoomUpdate(isUpdateImageWrapper?: boolean) {\n let img = new Image();\n img.src = this.previewImage.src;\n img.onload = () => {\n const { width: offsetWidth, height: offsetHeight } = getClientSize();\n const innerWidth = offsetWidth - HORIZONTAL_SPACE;\n const innerHeight = offsetHeight - VERTICAL_SPACE;\n const { naturalWidth, naturalHeight } = img;\n const xRatio = innerWidth / naturalWidth;\n const yRatio = innerHeight / naturalHeight;\n const zoom = Math.min(xRatio, yRatio);\n if (zoom > 1) {\n this.zoom = 1;\n } else {\n this.zoom = zoom;\n }\n this.isLoadingDone = true;\n this.updatePreviewImageTransform();\n if (isUpdateImageWrapper) {\n this.updatePreviewImageWrapperTransform();\n }\n this.cdr.detectChanges();\n };\n }\n\n updatePreviewImage() {\n this.resolvePreviewImage().subscribe(result => {\n if (!result) {\n // error\n this.isLoadingDone = true;\n return;\n }\n // image size\n if (!this.previewImage.size && this.previewImage.blob) {\n this.previewImage.size = humanizeBytes(this.previewImage.blob.size);\n }\n if (this.defaultZoom) {\n this.useDefaultZoomUpdate(true);\n } else {\n this.useCalculateZoomUpdate();\n }\n });\n }\n\n resolvePreviewImage() {\n return new Observable<Boolean>(subscriber => {\n if (this.previewImage.src.startsWith('blob:')) {\n this.previewImage.objectURL = this.sanitizer.bypassSecurityTrustUrl(this.previewImage.src);\n subscriber.next(true);\n subscriber.complete();\n return;\n }\n if (this.previewImage.objectURL || !this.previewConfig.resolveSize) {\n subscriber.next(true);\n subscriber.complete();\n } else {\n fetchImageBlob(this.previewImage.src).subscribe(\n blob => {\n const urlCreator = window.URL || window.webkitURL;\n const objectURL = urlCreator.createObjectURL(blob);\n this.previewImage.objectURL = this.sanitizer.bypassSecurityTrustUrl(objectURL);\n this.previewImage.blob = blob;\n subscriber.next(true);\n subscriber.complete();\n },\n error => {\n subscriber.next(false);\n subscriber.complete();\n }\n );\n }\n });\n }\n\n initPreview() {\n if (Array.isArray(this.previewConfig?.operations) && this.previewConfig?.operations.length) {\n const defaultOperationsMap = helpers.keyBy(this.defaultPreviewOperations, 'type');\n this.previewOperations = this.previewConfig?.operations.map(operation => {\n if (helpers.isString(operation) && defaultOperationsMap[operation]) {\n return defaultOperationsMap[operation];\n } else {\n return operation as ThyImagePreviewOperation;\n }\n });\n } else {\n this.previewOperations = this.defaultPreviewOperations;\n }\n this.rotate = this.previewConfig?.rotate ?? 0;\n this.updatePreviewImage();\n }\n\n download(image: ThyImageInfo) {\n this.downloadClicked.emit(image);\n const src = image.origin?.src || image.src;\n fetchImageBlob(src)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(blob => {\n const urlCreator = window.URL || window.webkitURL;\n const objectURL = urlCreator.createObjectURL(blob);\n let a = document.createElement('a');\n a.download = image.name || 'default.png';\n a.href = objectURL;\n a.click();\n });\n }\n\n zoomIn(): void {\n if (this.zoom < IMAGE_MAX_ZOOM) {\n this.zoom = Math.min(this.zoom + 0.1, IMAGE_MAX_ZOOM);\n this.calculateInsideScreen();\n this.updatePreviewImageTransform();\n this.position = { ...initialPosition };\n }\n }\n\n zoomOut(): void {\n if (this.zoom > IMAGE_MIN_ZOOM) {\n this.zoom = Math.max(this.zoom - 0.1, IMAGE_MIN_ZOOM);\n this.calculateInsideScreen();\n this.updatePreviewImageTransform();\n this.position = { ...initialPosition };\n }\n }\n\n calculateInsideScreen() {\n const width = this.imageRef.nativeElement.offsetWidth * this.zoom;\n const height = this.imageRef.nativeElement.offsetHeight * this.zoom;\n const { width: clientWidth, height: clientHeight } = getClientSize();\n if (width >= clientWidth || height >= clientHeight) {\n this.isInsideScreen = false;\n } else {\n this.isInsideScreen = true;\n }\n }\n\n viewOriginal() {\n window.open(this.previewImage?.origin?.src || this.previewImage.src, '_blank');\n }\n\n rotateRight(): void {\n this.rotate += 90;\n this.updatePreviewImageTransform();\n }\n\n fullScreen(): void {\n const targetElement = this.host.nativeElement.querySelector('.thy-image-preview');\n this.isFullScreen = true;\n const fullscreenRef = this.thyFullscreen.launch({\n target: targetElement\n });\n fullscreenRef.afterExited().subscribe(() => {\n this.isFullScreen = false;\n this.cdr.markForCheck();\n });\n }\n\n copyLink(event: ThyCopyEvent) {\n if (event.isSuccess) {\n this.notifyService.success('复制图片地址成功');\n } else {\n this.notifyService.error('复制图片地址失败');\n }\n }\n\n prev() {\n if (this.previewIndex > 0) {\n this.previewIndex--;\n this.isLoadingDone = false;\n this.reset();\n this.updatePreviewImage();\n }\n }\n\n next() {\n if (this.previewIndex < this.images.length - 1) {\n this.previewIndex++;\n this.isLoadingDone = false;\n this.reset();\n this.updatePreviewImage();\n }\n }\n\n dragReleased() {\n this.isDragging = false;\n const width = this.imageRef.nativeElement.offsetWidth * this.zoom;\n const height = this.imageRef.nativeElement.offsetHeight * this.zoom;\n const { left, top } = getOffset(this.imageRef.nativeElement, window);\n const { width: clientWidth, height: clientHeight } = getClientSize();\n const isRotate = this.rotate % 180 !== 0;\n const fitContentParams = {\n width: isRotate ? height : width,\n height: isRotate ? width : height,\n left,\n top,\n clientWidth,\n clientHeight\n };\n const fitContentPos = getFitContentPosition(fitContentParams);\n if (!isUndefinedOrNull(fitContentPos.x) || !isUndefinedOrNull(fitContentPos.y)) {\n this.position = { ...this.position, ...fitContentPos };\n }\n }\n\n private reset(): void {\n this.currentImageMode = 'original-scale';\n this.rotate = this.previewConfig?.rotate ?? 0;\n this.position = { ...initialPosition };\n this.cdr.detectChanges();\n }\n\n private updatePreviewImageTransform(): void {\n this.previewImageTransform = `scale3d(${this.zoom}, ${this.zoom}, 1) rotate(${this.rotate}deg)`;\n }\n\n private updatePreviewImageWrapperTransform(): void {\n this.previewImageWrapperTransform = `translate3d(${this.position.x}px, ${this.position.y}px, 0)`;\n }\n}\n","<div class=\"thy-image-preview\" [class.thy-image-preview-fullscreen]=\"isFullScreen\">\n @if (!isFullScreen) {\n <div class=\"thy-image-preview-header pl-10 pr-8\">\n <div class=\"thy-image-preview-header-info\">\n <p class=\"thy-image-name text-truncate\" [thyTooltipDisabled]=\"previewImage?.name?.length < 32\" [thyTooltip]=\"previewImage?.name\">\n {{ previewImage?.name }}\n </p>\n <span class=\"thy-image-size\"> {{ previewImage?.size }}</span>\n </div>\n <a thyAction thyIcon=\"close\" thyTooltip=\"退出预览\" href=\"javascript:;\" (click)=\"thyDialog.close()\"></a>\n </div>\n }\n @if (isFullScreen) {\n <a\n class=\"thy-image-preview-exit-fullscreen\"\n thyAction\n thyIcon=\"close\"\n thyTooltip=\"退出预览\"\n href=\"javascript:;\"\n (click)=\"thyFullscreen.exit()\"\n thyTooltip=\"退出全屏\"></a>\n }\n <div\n class=\"thy-image-preview-img-wrapper\"\n #imagePreviewWrapper\n cdkDrag\n [class.thy-image-preview-inside]=\"isInsideScreen\"\n [style.transform]=\"previewImageWrapperTransform\"\n [cdkDragFreeDragPosition]=\"position\"\n (cdkDragReleased)=\"dragReleased()\">\n @for (image of images; track $index; let imageIndex = $index) {\n @if (previewIndex === imageIndex && isLoadingDone) {\n <img #imgRef class=\"thy-image-preview-img\" [src]=\"image.objectURL || image.src\" [style.transform]=\"previewImageTransform\" />\n }\n }\n <thy-loading [thyDone]=\"isLoadingDone\"></thy-loading>\n </div>\n\n @if (images.length > 1 && !isFullScreen) {\n <div\n class=\"thy-image-preview-switch-left\"\n [thyTooltipDisabled]=\"previewIndex <= 0\"\n thyTooltip=\"上一张\"\n [class.thy-image-preview-switch-left-disabled]=\"previewIndex <= 0\"\n (click)=\"prev()\">\n <thy-icon thyIconName=\"angle-left-bold\"></thy-icon>\n </div>\n <div\n class=\"thy-image-preview-switch-right\"\n thyTooltip=\"下一张\"\n [thyTooltipDisabled]=\"previewIndex >= images.length - 1\"\n [class.thy-image-preview-switch-right-disabled]=\"previewIndex >= images.length - 1\"\n (click)=\"next()\">\n <thy-icon thyIconName=\"angle-right-bold\"> </thy-icon>\n </div>\n }\n @if (!isFullScreen) {\n <thy-actions thySize=\"xs\" class=\"thy-image-preview-operations py-3 px-4\">\n @for (option of previewOperations; track $index; let i = $index) {\n @if (!['original-scale', 'fit-screen', 'copyLink'].includes(option.type) || currentImageMode === option.type) {\n <a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"option.icon\"\n [thyTooltip]=\"option.name\"\n [thyTooltipOffset]=\"13\"\n (click)=\"option.action(previewImage)\"></a>\n }\n @if (option?.type === 'zoom-out') {\n <span class=\"mr-2\"> {{ (zoom * 100).toFixed(0) + '%' }} </span>\n }\n @if (option?.type === 'rotate-right') {\n <thy-divider class=\"ml-2\" [thyVertical]=\"true\"></thy-divider>\n }\n @if (option.type === 'copyLink') {\n <a\n href=\"javascript:;\"\n thyAction\n [thyCopyTips]=\"option.name\"\n [thyActionIcon]=\"option.icon\"\n [thyCopyTipsOffset]=\"13\"\n (thyCopy)=\"copyLink($event)\"\n [thyCopyContent]=\"previewImageOriginSrc\"\n [thyShowNotify]=\"false\"></a>\n }\n }\n <thy-divider [thyVertical]=\"true\"></thy-divider>\n <span class=\"thy-image-preview-operations-text\"> {{ previewIndex + 1 }} / {{ images.length }} </span>\n </thy-actions>\n }\n</div>\n","import { ThyImagePreview } from './image-preview.component';\nimport { ThyDialogRef } from 'ngx-tethys/dialog';\nimport { LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';\nimport { ThyImageInfo, ThyImagePreviewOptions } from '../image.class';\nimport { Observable } from 'rxjs';\n\nexport class ThyImagePreviewRef {\n get componentInstance() {\n return this.dialogRef.componentInstance;\n }\n\n constructor(\n public previewInstance: ThyImagePreview,\n private config: ThyImagePreviewOptions,\n private dialogRef: ThyDialogRef<ThyImagePreview>\n ) {\n dialogRef\n .keydownEvents()\n .pipe()\n .subscribe(event => {\n if (!config.disableKeyboardSelectable && event.keyCode === LEFT_ARROW) {\n this.prev();\n }\n if (!config.disableKeyboardSelectable && event.keyCode === RIGHT_ARROW) {\n this.next();\n }\n });\n }\n\n next(): void {\n this.previewInstance.next();\n }\n\n prev(): void {\n this.previewInstance.prev();\n }\n\n downloadClicked(): Observable<ThyImageInfo> {\n return this.previewInstance.downloadClicked.asObservable();\n }\n}\n","import { Injectable, OnDestroy, inject } from '@angular/core';\nimport { ThyImagePreviewConfig, THY_IMAGE_DEFAULT_PREVIEW_OPTIONS } from './image.config';\nimport { ThyImageInfo, ThyImagePreviewOptions } from './image.class';\nimport { ThyImagePreview } from './preview/image-preview.component';\nimport { ThyDialog, ThyDialogSizes } from 'ngx-tethys/dialog';\nimport { ThyImagePreviewRef } from './preview/image-preview-ref';\nimport { Observable, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * 图片预览服务\n */\n@Injectable()\nexport class ThyImageService implements OnDestroy {\n thyDialog = inject(ThyDialog);\n\n /**\n * 图片预览默认配置,外部可通过注入 THY_IMAGE_DEFAULT_PREVIEW_OPTIONS 进行配置\n */\n defaultConfig: ThyImagePreviewConfig;\n\n private downloadClicked$ = new Subject<ThyImageInfo>();\n\n private ngUnsubscribe$ = new Subject<void>();\n\n constructor() {\n const defaultConfig = inject(THY_IMAGE_DEFAULT_PREVIEW_OPTIONS, { optional: true })!;\n\n this.defaultConfig = defaultConfig;\n }\n\n /**\n * 图片预览方法\n */\n preview(images: ThyImageInfo[], options?: ThyImagePreviewOptions & { startIndex?: number }): ThyImagePreviewRef {\n const config = { ...this.defaultConfig, ...options };\n const dialogRef = this.thyDialog.open(ThyImagePreview, {\n initialState: {\n images,\n previewIndex: options?.startIndex >= 0 && options?.startIndex < images.length ? options.startIndex : 0,\n previewConfig: config\n },\n backdropClass: 'thy-image-preview-backdrop',\n panelClass: 'thy-image-preview-container',\n size: ThyDialogSizes.full,\n ...config\n });\n const imagePreviewRef = new ThyImagePreviewRef(dialogRef.componentInstance, { ...this.defaultConfig, ...options }, dialogRef);\n imagePreviewRef\n .downloadClicked()\n .pipe(takeUntil(this.ngUnsubscribe$))\n .subscribe(image => {\n this.downloadClicked$.next(image);\n });\n return imagePreviewRef;\n }\n\n downloadClicked(): Observable<ThyImageInfo> {\n return this.downloadClicked$.asObservable();\n }\n\n ngOnDestroy() {\n this.ngUnsubscribe$.next();\n this.ngUnsubscribe$.complete();\n }\n}\n","import {\n Directive,\n ElementRef,\n InjectFlags,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n Injector,\n OnDestroy,\n AfterViewInit,\n inject\n} from '@angular/core';\nimport { ThyImageGroup } from './image-group.component';\nimport { ThyImageMeta } from './image.class';\nimport { ThyImageService } from './image.service';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * thyImage: 预览图片指令,只可绑定到 img 标签上\n * @name img[thyImage]\n * @order 10\n */\n@Directive({\n selector: 'img[thyImage]',\n exportAs: 'thyImage',\n host: {\n '(click)': 'onPreview($event)',\n class: 'thy-image',\n '[class.thy-image-disabled]': 'thyDisablePreview'\n },\n standalone: true\n})\nexport class ThyImageDirective implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n private thyImageService = inject(ThyImageService);\n private injector = inject(Injector);\n private elementRef = inject(ElementRef);\n\n /**\n * 图片地址\n */\n @Input() thySrc: string;\n\n /**\n * 预览图片地址\n */\n @Input() thyPreviewSrc: string;\n\n /**\n * 图片原图地址\n */\n @Input() thyOriginSrc: string;\n\n /**\n * 图片附加信息,包含 { name: string, size?: string | number; }\n */\n @Input() thyImageMeta: ThyImageMeta;\n\n /**\n * 是否禁止预览\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisablePreview: boolean;\n\n /**\n * 是否自动计算图片资源大小\n */\n @Input({ transform: coerceBooleanProperty }) thyResolveSize = false;\n\n get previewable(): boolean {\n return !this.thyDisablePreview;\n }\n\n private parentGroup: ThyImageGroup;\n\n ngOnInit(): void {\n this.getParentGroup();\n }\n\n ngAfterViewInit(): void {\n if (this.parentGroup) {\n this.addParentImage();\n }\n }\n\n getParentGroup() {\n while (true) {\n // 多层 thy-image-group 嵌套时,获取最外层 thy-image-group 下的所有图片\n const injector = this.parentGroup?.injector || this.injector;\n const parentGroup = injector.get(ThyImageGroup, null, InjectFlags.SkipSelf);\n if (!parentGroup) {\n break;\n }\n this.parentGroup = parentGroup;\n }\n }\n\n addParentImage() {\n setTimeout(() => {\n const parentElement: HTMLElement = this.parentGroup.element.nativeElement;\n const images = parentElement.querySelectorAll('img[thyImage]');\n const index = Array.prototype.indexOf.call(images, this.elementRef.nativeElement);\n if (index >= 0) {\n this.parentGroup.addImage(this, index);\n } else {\n this.parentGroup.addImage(this, this.parentGroup.images.length);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thySrc } = changes;\n if (thySrc) {\n this.elementRef.nativeElement.src = thySrc.currentValue;\n }\n }\n\n onPreview(event: MouseEvent) {\n if (!this.previewable || event.button !== 0) {\n return;\n }\n if (this.parentGroup) {\n const previewAbleImages = this.parentGroup.images.filter(e => e.previewable);\n const previewImages = previewAbleImages.map(e => ({\n src: e.thyPreviewSrc || e.thySrc,\n ...e.thyImageMeta,\n origin: {\n src: e.thyOriginSrc\n }\n }));\n const startIndex = previewAbleImages.findIndex(el => this === el);\n this.thyImageService.preview(previewImages, {\n startIndex,\n resolveSize: this.thyResolveSize\n });\n } else {\n const previewImages = [\n {\n src: this.thyPreviewSrc || this.thySrc,\n ...this.thyImageMeta,\n origin: {\n src: this.thyOriginSrc\n }\n }\n ];\n this.thyImageService.preview(previewImages, { resolveSize: this.thyResolveSize });\n }\n }\n\n ngOnDestroy(): void {\n if (this.parentGroup) {\n const index = this.parentGroup.images.findIndex(item => item === this);\n this.parentGroup.removeImage(index);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyImageDirective } from './image.directive';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { ThyImageGroup } from './image-group.component';\nimport { ThyImagePreview } from './preview/image-preview.component';\nimport { ThyImageService } from './image.service';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { THY_IMAGE_DEFAULT_PREVIEW_OPTIONS_PROVIDER } from './image.config';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyDividerModule } from 'ngx-tethys/divider';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { ThyCopyModule } from 'ngx-tethys/copy';\nimport { ThyLoadingModule } from 'ngx-tethys/loading';\nimport { ThyDialogModule } from 'ngx-tethys/dialog';\nimport { ThyActionModule } from 'ngx-tethys/action';\n\n@NgModule({\n exports: [ThyImageDirective, ThyImageGroup, ThyImagePreview],\n imports: [\n CommonModule,\n PortalModule,\n DragDropModule,\n ThyIconModule,\n ThyDialogModule,\n ThyDividerModule,\n ThyTooltipModule,\n ThyCopyModule,\n ThyLoadingModule,\n ThyActionModule,\n ThyImageDirective,\n ThyImageGroup,\n ThyImagePreview\n ],\n providers: [ThyImageService, THY_IMAGE_DEFAULT_PREVIEW_OPTIONS_PROVIDER]\n})\nexport class ThyImageModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAGA;;;AAGG;MAQU,aAAa,CAAA;AAP1B,IAAA,WAAA,GAAA;AAQI,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;QAE5B,IAAM,CAAA,MAAA,GAAwB,EAAE;AASnC;IAPG,QAAQ,CAAC,KAAwB,EAAE,KAAa,EAAA;QAC5C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC;;AAGvC,IAAA,WAAW,CAAC,KAAa,EAAA;QACrB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;;8GAXvB,aAAa,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B;YAChB,aAAa;YACb,gBAAgB;YAChB,eAAe;YACf,iBAAiB;YACjB,aAAa;AACb,YAAA,eAAe,CAdT,EAAA,OAAA,EAAA,CAAA,iBAAiB,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;AAkBlD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,aAFZ,CAAC,eAAe,EAAE,0CAA0C,CAAC,YAdpE,YAAY;YACZ,YAAY;YACZ,cAAc;YACd,aAAa;YACb,eAAe;YACf,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,gBAAgB;YAChB,eAAe;YAGf,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAIV,cAAc,EAAA,UAAA,EAAA,CAAA;kBAnB1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,aAAa,EAAE,eAAe,CAAC;AAC5D,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,YAAY;wBACZ,cAAc;wBACd,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,gBAAgB;wBAChB,aAAa;wBACb,gBAAgB;wBAChB,eAAe;wBACf,iBAAiB;wBACjB,aAAa;wBACb;AACH,qBAAA;AACD,oBAAA,SAAS,EAAE,CAAC,eAAe,EAAE,0CAA0C;AAC1E,iBAAA;;;ACnCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-image.mjs","sources":["../../../src/image/image.token.ts","../../../src/image/image-group.component.ts","../../../src/image/image.config.ts","../../../src/image/utils.ts","../../../src/image/preview/image-preview.component.ts","../../../src/image/preview/image-preview.component.html","../../../src/image/preview/image-preview-ref.ts","../../../src/image/image.service.ts","../../../src/image/image.directive.ts","../../../src/image/module.ts","../../../src/image/ngx-tethys-image.ts"],"sourcesContent":["import { ElementRef, InjectionToken, Injector } from '@angular/core';\nimport { ThyImageMeta } from './image.class';\n\nexport interface IThyImageDirective {\n previewable: boolean;\n thySrc: string;\n thyPreviewSrc: string;\n thyOriginSrc: string;\n thyImageMeta: ThyImageMeta;\n}\n\nexport interface IThyImageGroupComponent {\n injector: Injector;\n element: ElementRef;\n images: IThyImageDirective[];\n addImage: (image: IThyImageDirective, index: number) => void;\n removeImage: (index: number) => void;\n}\n\nexport const THY_IMAGE_GROUP_COMPONENT = new InjectionToken<IThyImageGroupComponent>('THY_IMAGE_GROUP_COMPONENT');\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, Injector, ElementRef, inject } from '@angular/core';\nimport { IThyImageDirective, IThyImageGroupComponent, THY_IMAGE_GROUP_COMPONENT } from './image.token';\n\n/**\n * 图片分组,提供 thyImageGroup 指令和 thy-image-group 标签两种使用方式\n * @name thy-image-group,[thyImageGroup]\n */\n@Component({\n selector: 'thy-image-group, [thyImageGroup]',\n template: '<ng-content></ng-content>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: THY_IMAGE_GROUP_COMPONENT,\n useClass: ThyImageGroup\n }\n ]\n})\nexport class ThyImageGroup implements IThyImageGroupComponent {\n injector = inject(Injector);\n\n element = inject(ElementRef);\n\n images: IThyImageDirective[] = [];\n\n addImage(image: IThyImageDirective, index: number): void {\n this.images.splice(index, 0, image);\n }\n\n removeImage(index: number) {\n this.images.splice(index, 1);\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { ThyAbstractOverlayConfig, ThyAbstractOverlayOptions } from 'ngx-tethys/core';\n\nexport class ThyImagePreviewConfig<TData = unknown> extends ThyAbstractOverlayConfig<TData> {\n closeOnNavigation?: boolean;\n disableClose?: boolean;\n disableKeyboardSelectable?: boolean;\n zoom?: number;\n rotate?: number;\n}\n\nexport const THY_IMAGE_DEFAULT_PREVIEW_OPTIONS = new InjectionToken<ThyImagePreviewConfig>('thy-image-default-options');\n\nexport const THY_IMAGE_DEFAULT_PREVIEW_OPTIONS_PROVIDER = {\n provide: THY_IMAGE_DEFAULT_PREVIEW_OPTIONS,\n useValue: {\n hasBackdrop: true,\n closeOnNavigation: true,\n disableClose: false,\n disableKeyboardSelectable: false,\n restoreFocus: false\n }\n};\n\nexport const imageAbstractOverlayOptions: ThyAbstractOverlayOptions = {\n name: 'image',\n animationEnabled: true,\n disposeWhenClose: true\n};\n","import { fromEvent } from 'rxjs';\nimport { map, take } from 'rxjs/operators';\n\nexport const fetchImageBlob = (url: string) => {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.responseType = 'blob';\n const loadedXhr$ = fromEvent(xhr, 'load').pipe(\n take(1),\n map(data => {\n return xhr.response;\n })\n );\n xhr.send();\n return loadedXhr$;\n};\n","import { CdkDrag } from '@angular/cdk/drag-drop';\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n NgZone,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { ThyAction, ThyActions } from 'ngx-tethys/action';\nimport { ThyCopyDirective, ThyCopyEvent } from 'ngx-tethys/copy';\nimport { ThyDialog } from 'ngx-tethys/dialog';\nimport { ThyDivider } from 'ngx-tethys/divider';\nimport { ThyFullscreen } from 'ngx-tethys/fullscreen';\nimport { ThyIcon } from 'ngx-tethys/icon';\nimport { ThyLoading } from 'ngx-tethys/loading';\nimport { ThyNotifyService } from 'ngx-tethys/notify';\nimport { ThyTooltipDirective } from 'ngx-tethys/tooltip';\nimport { getClientSize, getFitContentPosition, getOffset, helpers, humanizeBytes, isNumber, isUndefinedOrNull } from 'ngx-tethys/util';\nimport { Observable, fromEvent } from 'rxjs';\nimport { InternalImageInfo, ThyImageInfo, ThyImagePreviewMode, ThyImagePreviewOperation, ThyImagePreviewOptions } from '../image.class';\nimport { fetchImageBlob } from '../utils';\n\nconst initialPosition = {\n x: 0,\n y: 0\n};\nconst IMAGE_MAX_ZOOM = 3;\nconst IMAGE_MIN_ZOOM = 0.1;\nconst HORIZONTAL_SPACE = 100 * 2; // left: 100px; right: 100px\nconst VERTICAL_SPACE = 96 + 106; // top: 96px; bottom: 106px\n\n/**\n * 图片预览组件\n * @name thy-image-preview\n * @order 20\n */\n@Component({\n selector: 'thy-image-preview',\n exportAs: 'thyImagePreview',\n templateUrl: './image-preview.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'thy-image-preview-wrap',\n '[class.thy-image-preview-moving]': 'isDragging'\n },\n imports: [ThyTooltipDirective, ThyAction, CdkDrag, ThyLoading, ThyIcon, ThyActions, ThyDivider, ThyCopyDirective]\n})\nexport class ThyImagePreview implements OnInit {\n thyDialog = inject(ThyDialog);\n thyFullscreen = inject(ThyFullscreen);\n private cdr = inject(ChangeDetectorRef);\n private ngZone = inject(NgZone);\n private notifyService = inject(ThyNotifyService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n private sanitizer = inject(DomSanitizer);\n\n @Output() downloadClicked: EventEmitter<ThyImageInfo> = new EventEmitter();\n\n private readonly destroyRef = inject(DestroyRef);\n\n images: InternalImageInfo[] = [];\n previewIndex: number = 0;\n previewConfig: ThyImagePreviewOptions;\n previewImageTransform = '';\n previewImageWrapperTransform = '';\n zoomDisabled = false;\n zoom: number = 1;\n position = { ...initialPosition };\n isDragging = false;\n isLoadingDone = false;\n isFullScreen = false;\n isInsideScreen = true;\n currentImageMode: ThyImagePreviewMode = 'original-scale';\n previewOperations: ThyImagePreviewOperation[];\n defaultPreviewOperations: ThyImagePreviewOperation[] = [\n {\n icon: 'zoom-out',\n name: '缩小',\n action: (image: ThyImageInfo) => {\n this.zoomOut();\n },\n type: 'zoom-out'\n },\n {\n icon: 'zoom-in',\n name: '放大',\n action: (image: ThyImageInfo) => {\n this.zoomIn();\n },\n type: 'zoom-in'\n },\n {\n icon: 'one-to-one',\n name: '原始比例',\n action: (image: ThyImageInfo) => {\n this.setOriginalSize();\n },\n type: 'original-scale'\n },\n {\n icon: 'max-view',\n name: '适应屏幕',\n action: () => {\n this.setFitScreen();\n },\n type: 'fit-screen'\n },\n {\n icon: 'expand-arrows',\n name: '全屏显示',\n action: () => {\n this.fullScreen();\n },\n type: 'full-screen'\n },\n {\n icon: 'rotate-right',\n name: '旋转',\n action: (image: ThyImageInfo) => {\n this.rotateRight();\n },\n type: 'rotate-right'\n },\n {\n icon: 'download',\n name: '下载',\n action: (image: ThyImageInfo) => {\n this.download(image);\n },\n type: 'download'\n },\n {\n icon: 'preview',\n name: '查看原图',\n action: () => {\n this.viewOriginal();\n },\n type: 'view-original'\n },\n {\n icon: 'link-insert',\n name: '复制链接',\n type: 'copyLink'\n }\n ];\n\n private rotate: number;\n\n get previewImage(): InternalImageInfo {\n const image = this.images[this.previewIndex];\n if (image.size) {\n image.size = isNumber(image.size) ? humanizeBytes(image.size) : image.size;\n }\n return image;\n }\n\n get previewImageOriginSrc() {\n let imageSrc = this.previewImage.origin?.src || this.previewImage.src;\n if (imageSrc.startsWith('./')) {\n return window.location.host + '/' + imageSrc.split('./')[1];\n }\n return imageSrc;\n }\n\n get defaultZoom(): number {\n if (this.previewConfig?.zoom && this.previewConfig?.zoom > 0) {\n return this.previewConfig.zoom >= IMAGE_MAX_ZOOM\n ? IMAGE_MAX_ZOOM\n : this.previewConfig.zoom <= IMAGE_MIN_ZOOM\n ? IMAGE_MIN_ZOOM\n : this.previewConfig.zoom;\n }\n }\n\n @ViewChild('imgRef', { static: false }) imageRef!: ElementRef<HTMLImageElement>;\n @ViewChild('imagePreviewWrapper', { static: true }) imagePreviewWrapper!: ElementRef<HTMLElement>;\n\n ngOnInit(): void {\n this.initPreview();\n this.ngZone.runOutsideAngular(() => {\n fromEvent(this.host.nativeElement, 'click')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (\n (event.target === event.currentTarget ||\n (this.isInsideScreen && this.imagePreviewWrapper.nativeElement.contains(event.target as HTMLElement))) &&\n !this.previewConfig?.disableClose\n ) {\n this.ngZone.run(() => !this.isFullScreen && this.thyDialog.close());\n }\n });\n\n fromEvent(this.imagePreviewWrapper.nativeElement, 'mousedown')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.isDragging = !this.isInsideScreen && true;\n });\n });\n }\n\n setOriginalSize() {\n this.reset();\n this.currentImageMode = 'fit-screen';\n this.zoom = 1;\n this.updatePreviewImageTransform();\n this.calculateInsideScreen();\n this.isLoadingDone = true;\n this.cdr.detectChanges();\n }\n\n setFitScreen() {\n this.reset();\n this.isInsideScreen = true;\n this.updatePreviewImage();\n }\n\n useDefaultZoomUpdate(isUpdateImageWrapper: boolean) {\n this.zoom = this.defaultZoom;\n this.isLoadingDone = true;\n this.updatePreviewImageTransform();\n if (isUpdateImageWrapper) {\n this.updatePreviewImageWrapperTransform();\n }\n this.cdr.detectChanges();\n }\n\n useCalculateZoomUpdate(isUpdateImageWrapper?: boolean) {\n let img = new Image();\n img.src = this.previewImage.src;\n img.onload = () => {\n const { width: offsetWidth, height: offsetHeight } = getClientSize();\n const innerWidth = offsetWidth - HORIZONTAL_SPACE;\n const innerHeight = offsetHeight - VERTICAL_SPACE;\n const { naturalWidth, naturalHeight } = img;\n const xRatio = innerWidth / naturalWidth;\n const yRatio = innerHeight / naturalHeight;\n const zoom = Math.min(xRatio, yRatio);\n if (zoom > 1) {\n this.zoom = 1;\n } else {\n this.zoom = zoom;\n }\n this.isLoadingDone = true;\n this.updatePreviewImageTransform();\n if (isUpdateImageWrapper) {\n this.updatePreviewImageWrapperTransform();\n }\n this.cdr.detectChanges();\n };\n }\n\n updatePreviewImage() {\n this.resolvePreviewImage().subscribe(result => {\n if (!result) {\n // error\n this.isLoadingDone = true;\n return;\n }\n // image size\n if (!this.previewImage.size && this.previewImage.blob) {\n this.previewImage.size = humanizeBytes(this.previewImage.blob.size);\n }\n if (this.defaultZoom) {\n this.useDefaultZoomUpdate(true);\n } else {\n this.useCalculateZoomUpdate();\n }\n });\n }\n\n resolvePreviewImage() {\n return new Observable<Boolean>(subscriber => {\n if (this.previewImage.src.startsWith('blob:')) {\n this.previewImage.objectURL = this.sanitizer.bypassSecurityTrustUrl(this.previewImage.src);\n subscriber.next(true);\n subscriber.complete();\n return;\n }\n if (this.previewImage.objectURL || !this.previewConfig.resolveSize) {\n subscriber.next(true);\n subscriber.complete();\n } else {\n fetchImageBlob(this.previewImage.src).subscribe(\n blob => {\n const urlCreator = window.URL || window.webkitURL;\n const objectURL = urlCreator.createObjectURL(blob);\n this.previewImage.objectURL = this.sanitizer.bypassSecurityTrustUrl(objectURL);\n this.previewImage.blob = blob;\n subscriber.next(true);\n subscriber.complete();\n },\n error => {\n subscriber.next(false);\n subscriber.complete();\n }\n );\n }\n });\n }\n\n initPreview() {\n if (Array.isArray(this.previewConfig?.operations) && this.previewConfig?.operations.length) {\n const defaultOperationsMap = helpers.keyBy(this.defaultPreviewOperations, 'type');\n this.previewOperations = this.previewConfig?.operations.map(operation => {\n if (helpers.isString(operation) && defaultOperationsMap[operation]) {\n return defaultOperationsMap[operation];\n } else {\n return operation as ThyImagePreviewOperation;\n }\n });\n } else {\n this.previewOperations = this.defaultPreviewOperations;\n }\n this.rotate = this.previewConfig?.rotate ?? 0;\n this.updatePreviewImage();\n }\n\n download(image: ThyImageInfo) {\n this.downloadClicked.emit(image);\n const src = image.origin?.src || image.src;\n fetchImageBlob(src)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(blob => {\n const urlCreator = window.URL || window.webkitURL;\n const objectURL = urlCreator.createObjectURL(blob);\n let a = document.createElement('a');\n a.download = image.name || 'default.png';\n a.href = objectURL;\n a.click();\n });\n }\n\n zoomIn(): void {\n if (this.zoom < IMAGE_MAX_ZOOM) {\n this.zoom = Math.min(this.zoom + 0.1, IMAGE_MAX_ZOOM);\n this.calculateInsideScreen();\n this.updatePreviewImageTransform();\n this.position = { ...initialPosition };\n }\n }\n\n zoomOut(): void {\n if (this.zoom > IMAGE_MIN_ZOOM) {\n this.zoom = Math.max(this.zoom - 0.1, IMAGE_MIN_ZOOM);\n this.calculateInsideScreen();\n this.updatePreviewImageTransform();\n this.position = { ...initialPosition };\n }\n }\n\n calculateInsideScreen() {\n const width = this.imageRef.nativeElement.offsetWidth * this.zoom;\n const height = this.imageRef.nativeElement.offsetHeight * this.zoom;\n const { width: clientWidth, height: clientHeight } = getClientSize();\n if (width >= clientWidth || height >= clientHeight) {\n this.isInsideScreen = false;\n } else {\n this.isInsideScreen = true;\n }\n }\n\n viewOriginal() {\n window.open(this.previewImage?.origin?.src || this.previewImage.src, '_blank');\n }\n\n rotateRight(): void {\n this.rotate += 90;\n this.updatePreviewImageTransform();\n }\n\n fullScreen(): void {\n const targetElement = this.host.nativeElement.querySelector('.thy-image-preview');\n this.isFullScreen = true;\n const fullscreenRef = this.thyFullscreen.launch({\n target: targetElement\n });\n fullscreenRef.afterExited().subscribe(() => {\n this.isFullScreen = false;\n this.cdr.markForCheck();\n });\n }\n\n copyLink(event: ThyCopyEvent) {\n if (event.isSuccess) {\n this.notifyService.success('复制图片地址成功');\n } else {\n this.notifyService.error('复制图片地址失败');\n }\n }\n\n prev() {\n if (this.previewIndex > 0) {\n this.previewIndex--;\n this.isLoadingDone = false;\n this.reset();\n this.updatePreviewImage();\n }\n }\n\n next() {\n if (this.previewIndex < this.images.length - 1) {\n this.previewIndex++;\n this.isLoadingDone = false;\n this.reset();\n this.updatePreviewImage();\n }\n }\n\n dragReleased() {\n this.isDragging = false;\n const width = this.imageRef.nativeElement.offsetWidth * this.zoom;\n const height = this.imageRef.nativeElement.offsetHeight * this.zoom;\n const { left, top } = getOffset(this.imageRef.nativeElement, window);\n const { width: clientWidth, height: clientHeight } = getClientSize();\n const isRotate = this.rotate % 180 !== 0;\n const fitContentParams = {\n width: isRotate ? height : width,\n height: isRotate ? width : height,\n left,\n top,\n clientWidth,\n clientHeight\n };\n const fitContentPos = getFitContentPosition(fitContentParams);\n if (!isUndefinedOrNull(fitContentPos.x) || !isUndefinedOrNull(fitContentPos.y)) {\n this.position = { ...this.position, ...fitContentPos };\n }\n }\n\n private reset(): void {\n this.currentImageMode = 'original-scale';\n this.rotate = this.previewConfig?.rotate ?? 0;\n this.position = { ...initialPosition };\n this.cdr.detectChanges();\n }\n\n private updatePreviewImageTransform(): void {\n this.previewImageTransform = `scale3d(${this.zoom}, ${this.zoom}, 1) rotate(${this.rotate}deg)`;\n }\n\n private updatePreviewImageWrapperTransform(): void {\n this.previewImageWrapperTransform = `translate3d(${this.position.x}px, ${this.position.y}px, 0)`;\n }\n}\n","<div class=\"thy-image-preview\" [class.thy-image-preview-fullscreen]=\"isFullScreen\">\n @if (!isFullScreen) {\n <div class=\"thy-image-preview-header pl-10 pr-8\">\n <div class=\"thy-image-preview-header-info\">\n <p class=\"thy-image-name text-truncate\" [thyTooltipDisabled]=\"previewImage?.name?.length < 32\" [thyTooltip]=\"previewImage?.name\">\n {{ previewImage?.name }}\n </p>\n <span class=\"thy-image-size\"> {{ previewImage?.size }}</span>\n </div>\n <a thyAction thyIcon=\"close\" thyTooltip=\"退出预览\" href=\"javascript:;\" (click)=\"thyDialog.close()\"></a>\n </div>\n }\n @if (isFullScreen) {\n <a\n class=\"thy-image-preview-exit-fullscreen\"\n thyAction\n thyIcon=\"close\"\n thyTooltip=\"退出预览\"\n href=\"javascript:;\"\n (click)=\"thyFullscreen.exit()\"\n thyTooltip=\"退出全屏\"></a>\n }\n <div\n class=\"thy-image-preview-img-wrapper\"\n #imagePreviewWrapper\n cdkDrag\n [class.thy-image-preview-inside]=\"isInsideScreen\"\n [style.transform]=\"previewImageWrapperTransform\"\n [cdkDragFreeDragPosition]=\"position\"\n (cdkDragReleased)=\"dragReleased()\">\n @for (image of images; track $index; let imageIndex = $index) {\n @if (previewIndex === imageIndex && isLoadingDone) {\n <img #imgRef class=\"thy-image-preview-img\" [src]=\"image.objectURL || image.src\" [style.transform]=\"previewImageTransform\" />\n }\n }\n <thy-loading [thyDone]=\"isLoadingDone\"></thy-loading>\n </div>\n\n @if (images.length > 1 && !isFullScreen) {\n <div\n class=\"thy-image-preview-switch-left\"\n [thyTooltipDisabled]=\"previewIndex <= 0\"\n thyTooltip=\"上一张\"\n [class.thy-image-preview-switch-left-disabled]=\"previewIndex <= 0\"\n (click)=\"prev()\">\n <thy-icon thyIconName=\"angle-left-bold\"></thy-icon>\n </div>\n <div\n class=\"thy-image-preview-switch-right\"\n thyTooltip=\"下一张\"\n [thyTooltipDisabled]=\"previewIndex >= images.length - 1\"\n [class.thy-image-preview-switch-right-disabled]=\"previewIndex >= images.length - 1\"\n (click)=\"next()\">\n <thy-icon thyIconName=\"angle-right-bold\"> </thy-icon>\n </div>\n }\n @if (!isFullScreen) {\n <thy-actions thySize=\"xs\" class=\"thy-image-preview-operations py-3 px-4\">\n @for (option of previewOperations; track $index; let i = $index) {\n @if (!['original-scale', 'fit-screen', 'copyLink'].includes(option.type) || currentImageMode === option.type) {\n <a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"option.icon\"\n [thyTooltip]=\"option.name\"\n [thyTooltipOffset]=\"13\"\n (click)=\"option.action(previewImage)\"></a>\n }\n @if (option?.type === 'zoom-out') {\n <span class=\"mr-2\"> {{ (zoom * 100).toFixed(0) + '%' }} </span>\n }\n @if (option?.type === 'rotate-right') {\n <thy-divider class=\"ml-2\" [thyVertical]=\"true\"></thy-divider>\n }\n @if (option.type === 'copyLink') {\n <a\n href=\"javascript:;\"\n thyAction\n [thyCopyTips]=\"option.name\"\n [thyActionIcon]=\"option.icon\"\n [thyCopyTipsOffset]=\"13\"\n (thyCopy)=\"copyLink($event)\"\n [thyCopyContent]=\"previewImageOriginSrc\"\n [thyShowNotify]=\"false\"></a>\n }\n }\n <thy-divider [thyVertical]=\"true\"></thy-divider>\n <span class=\"thy-image-preview-operations-text\"> {{ previewIndex + 1 }} / {{ images.length }} </span>\n </thy-actions>\n }\n</div>\n","import { ThyImagePreview } from './image-preview.component';\nimport { ThyDialogRef } from 'ngx-tethys/dialog';\nimport { LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';\nimport { ThyImageInfo, ThyImagePreviewOptions } from '../image.class';\nimport { Observable } from 'rxjs';\n\nexport class ThyImagePreviewRef {\n get componentInstance() {\n return this.dialogRef.componentInstance;\n }\n\n constructor(\n public previewInstance: ThyImagePreview,\n private config: ThyImagePreviewOptions,\n private dialogRef: ThyDialogRef<ThyImagePreview>\n ) {\n dialogRef\n .keydownEvents()\n .pipe()\n .subscribe(event => {\n if (!config.disableKeyboardSelectable && event.keyCode === LEFT_ARROW) {\n this.prev();\n }\n if (!config.disableKeyboardSelectable && event.keyCode === RIGHT_ARROW) {\n this.next();\n }\n });\n }\n\n next(): void {\n this.previewInstance.next();\n }\n\n prev(): void {\n this.previewInstance.prev();\n }\n\n downloadClicked(): Observable<ThyImageInfo> {\n return this.previewInstance.downloadClicked.asObservable();\n }\n}\n","import { Injectable, OnDestroy, inject } from '@angular/core';\nimport { ThyImagePreviewConfig, THY_IMAGE_DEFAULT_PREVIEW_OPTIONS } from './image.config';\nimport { ThyImageInfo, ThyImagePreviewOptions } from './image.class';\nimport { ThyImagePreview } from './preview/image-preview.component';\nimport { ThyDialog, ThyDialogSizes } from 'ngx-tethys/dialog';\nimport { ThyImagePreviewRef } from './preview/image-preview-ref';\nimport { Observable, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * 图片预览服务\n */\n@Injectable()\nexport class ThyImageService implements OnDestroy {\n thyDialog = inject(ThyDialog);\n\n /**\n * 图片预览默认配置,外部可通过注入 THY_IMAGE_DEFAULT_PREVIEW_OPTIONS 进行配置\n */\n defaultConfig: ThyImagePreviewConfig;\n\n private downloadClicked$ = new Subject<ThyImageInfo>();\n\n private ngUnsubscribe$ = new Subject<void>();\n\n constructor() {\n const defaultConfig = inject(THY_IMAGE_DEFAULT_PREVIEW_OPTIONS, { optional: true })!;\n\n this.defaultConfig = defaultConfig;\n }\n\n /**\n * 图片预览方法\n */\n preview(images: ThyImageInfo[], options?: ThyImagePreviewOptions & { startIndex?: number }): ThyImagePreviewRef {\n const config = { ...this.defaultConfig, ...options };\n const dialogRef = this.thyDialog.open(ThyImagePreview, {\n initialState: {\n images,\n previewIndex: options?.startIndex >= 0 && options?.startIndex < images.length ? options.startIndex : 0,\n previewConfig: config\n },\n backdropClass: 'thy-image-preview-backdrop',\n panelClass: 'thy-image-preview-container',\n size: ThyDialogSizes.full,\n ...config\n });\n const imagePreviewRef = new ThyImagePreviewRef(dialogRef.componentInstance, { ...this.defaultConfig, ...options }, dialogRef);\n imagePreviewRef\n .downloadClicked()\n .pipe(takeUntil(this.ngUnsubscribe$))\n .subscribe(image => {\n this.downloadClicked$.next(image);\n });\n return imagePreviewRef;\n }\n\n downloadClicked(): Observable<ThyImageInfo> {\n return this.downloadClicked$.asObservable();\n }\n\n ngOnDestroy() {\n this.ngUnsubscribe$.next();\n this.ngUnsubscribe$.complete();\n }\n}\n","import {\n Directive,\n ElementRef,\n InjectFlags,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n Injector,\n OnDestroy,\n AfterViewInit,\n inject\n} from '@angular/core';\nimport { IThyImageDirective, IThyImageGroupComponent, THY_IMAGE_GROUP_COMPONENT } from './image.token';\nimport { ThyImageMeta } from './image.class';\nimport { ThyImageService } from './image.service';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * thyImage: 预览图片指令,只可绑定到 img 标签上\n * @name img[thyImage]\n * @order 10\n */\n@Directive({\n selector: 'img[thyImage]',\n exportAs: 'thyImage',\n host: {\n '(click)': 'onPreview($event)',\n class: 'thy-image',\n '[class.thy-image-disabled]': 'thyDisablePreview'\n }\n})\nexport class ThyImageDirective implements IThyImageDirective, OnInit, OnChanges, AfterViewInit, OnDestroy {\n private thyImageService = inject(ThyImageService);\n private injector = inject(Injector);\n private elementRef = inject(ElementRef);\n\n /**\n * 图片地址\n */\n @Input() thySrc: string;\n\n /**\n * 预览图片地址\n */\n @Input() thyPreviewSrc: string;\n\n /**\n * 图片原图地址\n */\n @Input() thyOriginSrc: string;\n\n /**\n * 图片附加信息,包含 { name: string, size?: string | number; }\n */\n @Input() thyImageMeta: ThyImageMeta;\n\n /**\n * 是否禁止预览\n * @default false\n */\n @Input({ transform: coerceBooleanProperty }) thyDisablePreview: boolean;\n\n /**\n * 是否自动计算图片资源大小\n */\n @Input({ transform: coerceBooleanProperty }) thyResolveSize = false;\n\n get previewable(): boolean {\n return !this.thyDisablePreview;\n }\n\n private parentGroup: IThyImageGroupComponent;\n\n ngOnInit(): void {\n this.getParentGroup();\n }\n\n ngAfterViewInit(): void {\n if (this.parentGroup) {\n this.addParentImage();\n }\n }\n\n getParentGroup() {\n while (true) {\n // 多层 thy-image-group 嵌套时,获取最外层 thy-image-group 下的所有图片\n const injector = this.parentGroup?.injector || this.injector;\n const parentGroup = injector.get(THY_IMAGE_GROUP_COMPONENT, null, InjectFlags.SkipSelf);\n if (!parentGroup) {\n break;\n }\n this.parentGroup = parentGroup;\n }\n }\n\n addParentImage() {\n setTimeout(() => {\n const parentElement: HTMLElement = this.parentGroup.element.nativeElement;\n const images = parentElement.querySelectorAll('img[thyImage]');\n const index = Array.prototype.indexOf.call(images, this.elementRef.nativeElement);\n if (index >= 0) {\n this.parentGroup.addImage(this, index);\n } else {\n this.parentGroup.addImage(this, this.parentGroup.images.length);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thySrc } = changes;\n if (thySrc) {\n this.elementRef.nativeElement.src = thySrc.currentValue;\n }\n }\n\n onPreview(event: MouseEvent) {\n if (!this.previewable || event.button !== 0) {\n return;\n }\n if (this.parentGroup) {\n const previewAbleImages = this.parentGroup.images.filter(e => e.previewable);\n const previewImages = previewAbleImages.map(e => ({\n src: e.thyPreviewSrc || e.thySrc,\n ...e.thyImageMeta,\n origin: {\n src: e.thyOriginSrc\n }\n }));\n const startIndex = previewAbleImages.findIndex(el => this === el);\n this.thyImageService.preview(previewImages, {\n startIndex,\n resolveSize: this.thyResolveSize\n });\n } else {\n const previewImages = [\n {\n src: this.thyPreviewSrc || this.thySrc,\n ...this.thyImageMeta,\n origin: {\n src: this.thyOriginSrc\n }\n }\n ];\n this.thyImageService.preview(previewImages, { resolveSize: this.thyResolveSize });\n }\n }\n\n ngOnDestroy(): void {\n if (this.parentGroup) {\n const index = this.parentGroup.images.findIndex(item => item === this);\n this.parentGroup.removeImage(index);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyImageDirective } from './image.directive';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { ThyImageGroup } from './image-group.component';\nimport { ThyImagePreview } from './preview/image-preview.component';\nimport { ThyImageService } from './image.service';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { THY_IMAGE_DEFAULT_PREVIEW_OPTIONS_PROVIDER } from './image.config';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyDividerModule } from 'ngx-tethys/divider';\nimport { ThyTooltipModule } from 'ngx-tethys/tooltip';\nimport { ThyCopyModule } from 'ngx-tethys/copy';\nimport { ThyLoadingModule } from 'ngx-tethys/loading';\nimport { ThyDialogModule } from 'ngx-tethys/dialog';\nimport { ThyActionModule } from 'ngx-tethys/action';\n\n@NgModule({\n exports: [ThyImageDirective, ThyImageGroup, ThyImagePreview],\n imports: [\n CommonModule,\n PortalModule,\n DragDropModule,\n ThyIconModule,\n ThyDialogModule,\n ThyDividerModule,\n ThyTooltipModule,\n ThyCopyModule,\n ThyLoadingModule,\n ThyActionModule,\n ThyImageDirective,\n ThyImageGroup,\n ThyImagePreview\n ],\n providers: [ThyImageService, THY_IMAGE_DEFAULT_PREVIEW_OPTIONS_PROVIDER]\n})\nexport class ThyImageModule {}\n","/**\n * Generated bundle index. Do not edit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,YAAY;YACZ,cAAc;YACd,aAAa;YACb,eAAe;YACf,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,gBAAgB;YAChB,eAAe;YAGf,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAIV,cAAc,EAAA,UAAA,EAAA,CAAA;kBAnB1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,aAAa,EAAE,eAAe,CAAC;AAC5D,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,YAAY;wBACZ,cAAc;wBACd,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,gBAAgB;wBAChB,aAAa;wBACb,gBAAgB;wBAChB,eAAe;wBACf,iBAAiB;wBACjB,aAAa;wBACb;AACH,qBAAA;AACD,oBAAA,SAAS,EAAE,CAAC,eAAe,EAAE,0CAA0C;AAC1E,iBAAA;;;ACnCD;;AAEG;;;;"}
|
|
@@ -306,8 +306,8 @@ class ThyInputNumber extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
306
306
|
ngOnDestroy() {
|
|
307
307
|
this.hostFocusControl.destroy();
|
|
308
308
|
}
|
|
309
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
310
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.
|
|
309
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyInputNumber, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
310
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.6", type: ThyInputNumber, isStandalone: true, selector: "thy-input-number", inputs: { thyAutoFocus: ["thyAutoFocus", "thyAutoFocus", coerceBooleanProperty], thyPlaceholder: "thyPlaceholder", thyDisabled: ["thyDisabled", "thyDisabled", coerceBooleanProperty], thyMax: "thyMax", thyMin: "thyMin", thyStep: ["thyStep", "thyStep", numberAttribute], thyStepDelay: ["thyStepDelay", "thyStepDelay", numberAttribute], thySize: "thySize", thyPrecision: "thyPrecision", thySuffix: "thySuffix" }, outputs: { thyBlur: "thyBlur", thyFocus: "thyFocus", thyStepChange: "thyStepChange" }, host: { properties: { "attr.tabindex": "tabIndex" }, classAttribute: "thy-input-number" }, providers: [
|
|
311
311
|
{
|
|
312
312
|
provide: NG_VALUE_ACCESSOR,
|
|
313
313
|
useExisting: forwardRef(() => ThyInputNumber),
|
|
@@ -315,7 +315,7 @@ class ThyInputNumber extends TabIndexDisabledControlValueAccessorMixin {
|
|
|
315
315
|
}
|
|
316
316
|
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"input-number-handler-wrap\" [class.input-number-disabled]=\"thyDisabled\">\n <span\n unselectable=\"unselectable\"\n class=\"input-number-handler input-number-handler-up\"\n (mousedown)=\"up($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.disabled]=\"disabledUp\">\n <thy-icon thyIconName=\"angle-up\"></thy-icon>\n </span>\n <span\n unselectable=\"unselectable\"\n class=\"input-number-handler input-number-handler-down\"\n (mousedown)=\"down($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.disabled]=\"disabledDown\">\n <thy-icon thyIconName=\"angle-down\"></thy-icon>\n </span>\n</div>\n<input\n thyInput\n #input\n autocomplete=\"off\"\n class=\"input-number-input form-control\"\n [thySize]=\"thySize\"\n [thyAutofocus]=\"thyAutoFocus\"\n [disabled]=\"thyDisabled\"\n [attr.min]=\"thyMin\"\n [attr.max]=\"thyMax\"\n [placeholder]=\"thyPlaceholder\"\n [attr.step]=\"thyStep\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"stop()\"\n [(ngModel)]=\"displayValue\"\n (ngModelChange)=\"onModelChange($event)\"\n (focus)=\"onInputFocus($event)\"\n tabindex=\"-1\" />\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "directive", type: ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
317
317
|
}
|
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyInputNumber, decorators: [{
|
|
319
319
|
type: Component,
|
|
320
320
|
args: [{ selector: 'thy-input-number', providers: [
|
|
321
321
|
{
|
|
@@ -363,11 +363,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
363
363
|
}] } });
|
|
364
364
|
|
|
365
365
|
class ThyInputNumberModule {
|
|
366
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
367
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
368
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
366
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyInputNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
367
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: ThyInputNumberModule, imports: [CommonModule, FormsModule, ThySharedModule, ThyIconModule, ThyInputModule, ThyFormModule, ThyInputNumber], exports: [ThyInputNumber] }); }
|
|
368
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyInputNumberModule, imports: [CommonModule, FormsModule, ThySharedModule, ThyIconModule, ThyInputModule, ThyFormModule, ThyInputNumber] }); }
|
|
369
369
|
}
|
|
370
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyInputNumberModule, decorators: [{
|
|
371
371
|
type: NgModule,
|
|
372
372
|
args: [{
|
|
373
373
|
imports: [CommonModule, FormsModule, ThySharedModule, ThyIconModule, ThyInputModule, ThyFormModule, ThyInputNumber],
|