@acorex/components 21.0.0-next.4 → 21.0.0-next.40
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/accordion/index.d.ts +0 -1
- package/autocomplete/index.d.ts +23 -9
- package/button/index.d.ts +38 -17
- package/button-group/index.d.ts +6 -4
- package/calendar/index.d.ts +4 -0
- package/chips/index.d.ts +3 -8
- package/code-editor/README.md +291 -1
- package/code-editor/index.d.ts +260 -12
- package/command/index.d.ts +1 -0
- package/conversation2/README.md +426 -0
- package/conversation2/index.d.ts +6139 -0
- package/data-table/index.d.ts +79 -7
- package/dialog/index.d.ts +1 -1
- package/drawer/README.md +2 -2
- package/drawer/index.d.ts +33 -57
- package/drawer-legacy/README.md +3 -0
- package/drawer-legacy/index.d.ts +86 -0
- package/editor/README.md +3 -0
- package/editor/index.d.ts +79 -0
- package/fesm2022/acorex-components-accordion.mjs +19 -24
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +12 -12
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +14 -14
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-aspect-ratio.mjs +4 -4
- package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +12 -11
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-autocomplete.mjs +30 -13
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +13 -13
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +10 -10
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +12 -12
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +12 -12
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +25 -21
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +68 -28
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +33 -18
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +11 -11
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +12 -14
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +13 -11
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-code-editor.mjs +494 -162
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +13 -28
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +11 -11
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +32 -32
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-command.mjs +18 -11
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +34 -34
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +56 -65
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation2.mjs +17641 -0
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -0
- package/fesm2022/acorex-components-cron-job.mjs +53 -53
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs +5 -5
- package/fesm2022/acorex-components-data-list.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +56 -41
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +462 -105
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +10 -10
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +10 -10
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +11 -11
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +96 -54
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +26 -16
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer-legacy.mjs +218 -0
- package/fesm2022/acorex-components-drawer-legacy.mjs.map +1 -0
- package/fesm2022/acorex-components-drawer.mjs +66 -150
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +9 -9
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +20 -18
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +195 -0
- package/fesm2022/acorex-components-editor.mjs.map +1 -0
- package/fesm2022/acorex-components-file-explorer.mjs +34 -34
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-flow-chart.mjs +18 -18
- package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +62 -37
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +14 -15
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +206 -156
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +10 -10
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +9 -9
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kanban.mjs +9 -7
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +29 -11
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +9 -9
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +10 -10
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +23 -14
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +23 -23
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +290 -31
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +83 -82
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +24 -24
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/{acorex-components-modal-acorex-components-modal-h5Y-qcbh.mjs → acorex-components-modal-acorex-components-modal-CjHPRiZD.mjs} +24 -24
- package/fesm2022/acorex-components-modal-acorex-components-modal-CjHPRiZD.mjs.map +1 -0
- package/fesm2022/acorex-components-modal-modal-content.component-j-bS0WGj.mjs +214 -0
- package/fesm2022/acorex-components-modal-modal-content.component-j-bS0WGj.mjs.map +1 -0
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +9 -9
- package/fesm2022/acorex-components-navbar.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +16 -23
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box-legacy.mjs +412 -0
- package/fesm2022/acorex-components-number-box-legacy.mjs.map +1 -0
- package/fesm2022/acorex-components-number-box.mjs +112 -331
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +10 -10
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +10 -10
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +35 -40
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +13 -13
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-pdf-reader.mjs +9 -9
- package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +47 -10
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +17 -17
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +12 -12
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +13 -13
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +11 -9
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +8 -8
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-components-query-builder.mjs +9 -9
- package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +7 -7
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-rail-navigation.mjs +40 -38
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +11 -11
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +20 -35
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs +23 -23
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +8 -8
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +8 -8
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs +111 -16
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +2339 -0
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -0
- package/fesm2022/acorex-components-scheduler.mjs +52 -52
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-scss.mjs +4 -4
- package/fesm2022/acorex-components-scss.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +23 -12
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +36 -17
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +12 -12
- package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +10 -10
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +31 -38
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +8 -8
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +11 -11
- package/fesm2022/acorex-components-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-sliding-item.mjs +17 -17
- package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +16 -16
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +14 -14
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +28 -20
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +51 -21
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +47 -11
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +9 -9
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +13 -13
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs +54 -14
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +14 -29
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +14 -14
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-toolbar.mjs +9 -9
- package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +12 -12
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view-legacy.mjs +511 -0
- package/fesm2022/acorex-components-tree-view-legacy.mjs.map +1 -0
- package/fesm2022/acorex-components-tree-view.mjs +1668 -424
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +28 -641
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-video-player.mjs +8 -8
- package/fesm2022/acorex-components-video-player.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +213 -462
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/file-explorer/index.d.ts +6 -6
- package/form/index.d.ts +3 -3
- package/grid-layout-builder/index.d.ts +1 -2
- package/image-editor/index.d.ts +11 -13
- package/kbd/index.d.ts +13 -7
- package/loading/index.d.ts +1 -1
- package/map/index.d.ts +28 -1
- package/media-viewer/index.d.ts +2 -1
- package/notification/index.d.ts +0 -2
- package/number-box/README.md +2 -2
- package/number-box/index.d.ts +32 -171
- package/number-box-legacy/README.md +3 -0
- package/number-box-legacy/index.d.ts +191 -0
- package/package.json +41 -14
- package/paint/index.d.ts +1 -6
- package/phone-box/index.d.ts +5 -4
- package/rate-picker/index.d.ts +5 -15
- package/rrule/index.d.ts +96 -1
- package/scheduler-picker/README.md +15 -0
- package/scheduler-picker/index.d.ts +1360 -0
- package/search-box/index.d.ts +6 -1
- package/select-box/index.d.ts +15 -10
- package/side-menu/index.d.ts +3 -2
- package/tag/index.d.ts +8 -2
- package/tag-box/index.d.ts +12 -3
- package/time-duration/index.d.ts +19 -3
- package/tree-view/index.d.ts +658 -168
- package/tree-view-legacy/README.md +3 -0
- package/tree-view-legacy/index.d.ts +184 -0
- package/uploader/index.d.ts +4 -331
- package/wysiwyg/index.d.ts +57 -159
- package/drawer-2/README.md +0 -3
- package/drawer-2/index.d.ts +0 -62
- package/fesm2022/acorex-components-drawer-2.mjs +0 -134
- package/fesm2022/acorex-components-drawer-2.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-acorex-components-modal-h5Y-qcbh.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-modal-content.component-B6tyMLdU.mjs +0 -235
- package/fesm2022/acorex-components-modal-modal-content.component-B6tyMLdU.mjs.map +0 -1
- package/fesm2022/acorex-components-number-box-2.mjs +0 -183
- package/fesm2022/acorex-components-number-box-2.mjs.map +0 -1
- package/number-box-2/README.md +0 -3
- package/number-box-2/index.d.ts +0 -41
|
@@ -6,13 +6,12 @@ import { AXLoadingSpinnerComponent, AXLoadingModule } from '@acorex/components/l
|
|
|
6
6
|
import * as i2$1 from '@acorex/components/toolbar';
|
|
7
7
|
import { AXToolBarModule } from '@acorex/components/toolbar';
|
|
8
8
|
import * as i0 from '@angular/core';
|
|
9
|
-
import { signal, Injectable, inject, output, ViewEncapsulation, Component, ChangeDetectionStrategy,
|
|
9
|
+
import { signal, Injectable, inject, output, input, ViewEncapsulation, Component, ChangeDetectionStrategy, NgZone, ElementRef, viewChild, Renderer2, PLATFORM_ID, effect, afterNextRender, linkedSignal, contentChild, forwardRef, HostBinding, NgModule } from '@angular/core';
|
|
10
10
|
import * as i1 from '@angular/forms';
|
|
11
11
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
12
12
|
import { classes } from 'polytype';
|
|
13
13
|
import { AXTranslatorPipe } from '@acorex/core/translation';
|
|
14
|
-
import
|
|
15
|
-
import { AsyncPipe, isPlatformBrowser, CommonModule } from '@angular/common';
|
|
14
|
+
import { AsyncPipe, isPlatformBrowser } from '@angular/common';
|
|
16
15
|
import { AXColorBoxComponent, AXColorBoxModule } from '@acorex/components/color-box';
|
|
17
16
|
import { AXRangeSliderComponent, AXRangeSliderModule } from '@acorex/components/range-slider';
|
|
18
17
|
import * as i2 from '@acorex/components/tooltip';
|
|
@@ -38,10 +37,10 @@ class AXImageEditorService {
|
|
|
38
37
|
this.redoPressed = signal(false, ...(ngDevMode ? [{ debugName: "redoPressed" }] : []));
|
|
39
38
|
this.cropperRatio = signal(null, ...(ngDevMode ? [{ debugName: "cropperRatio" }] : []));
|
|
40
39
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
42
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
41
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorService }); }
|
|
43
42
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorService, decorators: [{
|
|
45
44
|
type: Injectable
|
|
46
45
|
}] });
|
|
47
46
|
|
|
@@ -53,25 +52,26 @@ class AXImageEditorCropComponent {
|
|
|
53
52
|
constructor() {
|
|
54
53
|
this.service = inject(AXImageEditorService);
|
|
55
54
|
this.cropPressed = output();
|
|
55
|
+
this.aspectRatio = input([], ...(ngDevMode ? [{ debugName: "aspectRatio" }] : []));
|
|
56
56
|
}
|
|
57
57
|
cropButtonHandler() {
|
|
58
58
|
this.cropPressed.emit();
|
|
59
59
|
}
|
|
60
60
|
ratioHandler(r) {
|
|
61
|
-
if (this.service.cropperRatio()) {
|
|
61
|
+
if (this.service.cropperRatio() === r) {
|
|
62
62
|
this.service.cropperRatio.set(null);
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
65
|
this.service.cropperRatio.set(r);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
69
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorCropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
69
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: AXImageEditorCropComponent, isStandalone: true, selector: "ax-image-editor-crop", inputs: { aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cropPressed: "cropPressed" }, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropComponent }], ngImport: i0, template: "<ax-button\n (click)=\"cropButtonHandler()\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"'@acorex:image-editor.crop' | translate | async\"\n color=\"primary\"\n></ax-button>\n\n<div class=\"flex gap-2\">\n <ax-button\n [selected]=\"this.service.cropperRatio() === '1:1' ? true : false\"\n [color]=\"this.service.cropperRatio() === '1:1' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('1:1')\"\n class=\"ax-crop-save ax-sm\"\n text=\"1:1\"\n ></ax-button>\n <ax-button\n [selected]=\"this.service.cropperRatio() === '16:9' ? true : false\"\n [color]=\"this.service.cropperRatio() === '16:9' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('16:9')\"\n class=\"ax-crop-save ax-sm\"\n text=\"16:9\"\n ></ax-button>\n\n @if (aspectRatio().length) {\n @for (item of aspectRatio(); track $index) {\n <ax-button\n [selected]=\"this.service.cropperRatio() === item ? true : false\"\n [color]=\"this.service.cropperRatio() === item ? 'primary' : 'default'\"\n (click)=\"ratioHandler(item)\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"item\"\n ></ax-button>\n }\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-crop{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));width:100%;padding:calc(var(--spacing,.25rem)*2);justify-content:space-around;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
70
70
|
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorCropComponent, decorators: [{
|
|
72
72
|
type: Component,
|
|
73
|
-
args: [{ selector: 'ax-image-editor-crop', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AsyncPipe, AXTranslatorPipe], providers: [{ provide: AXComponent, useExisting: AXImageEditorCropComponent }], template: "<ax-button\n (click)=\"cropButtonHandler()\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"'@acorex:image-editor.crop' | translate | async\"\n></ax-button>\n\n<ax-button\n
|
|
74
|
-
}] });
|
|
73
|
+
args: [{ selector: 'ax-image-editor-crop', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AsyncPipe, AXTranslatorPipe], providers: [{ provide: AXComponent, useExisting: AXImageEditorCropComponent }], template: "<ax-button\n (click)=\"cropButtonHandler()\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"'@acorex:image-editor.crop' | translate | async\"\n color=\"primary\"\n></ax-button>\n\n<div class=\"flex gap-2\">\n <ax-button\n [selected]=\"this.service.cropperRatio() === '1:1' ? true : false\"\n [color]=\"this.service.cropperRatio() === '1:1' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('1:1')\"\n class=\"ax-crop-save ax-sm\"\n text=\"1:1\"\n ></ax-button>\n <ax-button\n [selected]=\"this.service.cropperRatio() === '16:9' ? true : false\"\n [color]=\"this.service.cropperRatio() === '16:9' ? 'primary' : 'default'\"\n (click)=\"ratioHandler('16:9')\"\n class=\"ax-crop-save ax-sm\"\n text=\"16:9\"\n ></ax-button>\n\n @if (aspectRatio().length) {\n @for (item of aspectRatio(); track $index) {\n <ax-button\n [selected]=\"this.service.cropperRatio() === item ? true : false\"\n [color]=\"this.service.cropperRatio() === item ? 'primary' : 'default'\"\n (click)=\"ratioHandler(item)\"\n class=\"ax-crop-save ax-sm\"\n [text]=\"item\"\n ></ax-button>\n }\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-crop{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));width:100%;padding:calc(var(--spacing,.25rem)*2);justify-content:space-around;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"] }]
|
|
74
|
+
}], propDecorators: { cropPressed: [{ type: i0.Output, args: ["cropPressed"] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }] } });
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* paint mode.
|
|
@@ -93,12 +93,12 @@ class AXImageEditorHighlightComponent {
|
|
|
93
93
|
valueHandler(e) {
|
|
94
94
|
this.service.highlightWidth.set(e);
|
|
95
95
|
}
|
|
96
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
97
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorHighlightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
97
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: AXImageEditorHighlightComponent, isStandalone: true, selector: "ax-image-editor-highlight", providers: [{ provide: AXComponent, useExisting: AXImageEditorHighlightComponent }], ngImport: i0, template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-highlight{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));justify-content:center;display:flex}ax-image-editor-highlight ax-color-box{flex:0}ax-image-editor-highlight ax-range-slider{width:calc(var(--spacing,.25rem)*40);padding-inline:calc(var(--spacing,.25rem)*3);padding-block:calc(var(--spacing,.25rem)*2)}ax-image-editor-highlight ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem)*4)!important;width:calc(var(--spacing,.25rem)*4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { 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"] }, { kind: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i2.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
98
98
|
}
|
|
99
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorHighlightComponent, decorators: [{
|
|
100
100
|
type: Component,
|
|
101
|
-
args: [{ selector: 'ax-image-editor-highlight', encapsulation: ViewEncapsulation.None, imports: [AXColorBoxComponent, FormsModule, AXRangeSliderComponent, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorHighlightComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["ax-image-editor-highlight{display:flex}ax-image-editor-highlight ax-range-slider{padding
|
|
101
|
+
args: [{ selector: 'ax-image-editor-highlight', encapsulation: ViewEncapsulation.None, imports: [AXColorBoxComponent, FormsModule, AXRangeSliderComponent, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorHighlightComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-highlight{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));justify-content:center;display:flex}ax-image-editor-highlight ax-color-box{flex:0}ax-image-editor-highlight ax-range-slider{width:calc(var(--spacing,.25rem)*40);padding-inline:calc(var(--spacing,.25rem)*3);padding-block:calc(var(--spacing,.25rem)*2)}ax-image-editor-highlight ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem)*4)!important;width:calc(var(--spacing,.25rem)*4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"] }]
|
|
102
102
|
}] });
|
|
103
103
|
|
|
104
104
|
/**
|
|
@@ -121,12 +121,12 @@ class AXImageEditorPenComponent {
|
|
|
121
121
|
valueHandler(e) {
|
|
122
122
|
this.service.penWidth.set(e);
|
|
123
123
|
}
|
|
124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
125
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorPenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
125
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: AXImageEditorPenComponent, isStandalone: true, selector: "ax-image-editor-pen", providers: [{ provide: AXComponent, useExisting: AXImageEditorPenComponent }], ngImport: i0, template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-pen{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));justify-content:center;display:flex}ax-image-editor-pen ax-color-box{flex:0}ax-image-editor-pen ax-range-slider{width:calc(var(--spacing,.25rem)*40);padding-inline:calc(var(--spacing,.25rem)*3);padding-block:calc(var(--spacing,.25rem)*2)}ax-image-editor-pen ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem)*4)!important;width:calc(var(--spacing,.25rem)*4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { 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"] }, { kind: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i2.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
126
126
|
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorPenComponent, decorators: [{
|
|
128
128
|
type: Component,
|
|
129
|
-
args: [{ selector: 'ax-image-editor-pen', encapsulation: ViewEncapsulation.None, imports: [AXColorBoxComponent, FormsModule, AXRangeSliderComponent, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorPenComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["ax-image-editor-pen{display:flex}ax-image-editor-pen ax-range-slider{padding
|
|
129
|
+
args: [{ selector: 'ax-image-editor-pen', encapsulation: ViewEncapsulation.None, imports: [AXColorBoxComponent, FormsModule, AXRangeSliderComponent, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorPenComponent }], template: "<ax-color-box\n [showValue]=\"false\"\n [showIcon]=\"false\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n look=\"none\"\n [ngModel]=\"selectedColor()\"\n (ngModelChange)=\"changeColorHandler($event)\"\n>\n</ax-color-box>\n\n<ax-range-slider [min]=\"2\" [max]=\"20\" [(ngModel)]=\"value\" (ngModelChange)=\"valueHandler($event)\"></ax-range-slider>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-pen{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));justify-content:center;display:flex}ax-image-editor-pen ax-color-box{flex:0}ax-image-editor-pen ax-range-slider{width:calc(var(--spacing,.25rem)*40);padding-inline:calc(var(--spacing,.25rem)*3);padding-block:calc(var(--spacing,.25rem)*2)}ax-image-editor-pen ax-range-slider .ax-range-slider .ax-range-slider-handler{height:calc(var(--spacing,.25rem)*4)!important;width:calc(var(--spacing,.25rem)*4)!important}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"] }]
|
|
130
130
|
}] });
|
|
131
131
|
|
|
132
132
|
/**
|
|
@@ -146,10 +146,10 @@ class AXImageEditorRotateComponent {
|
|
|
146
146
|
rotateLeftHandler() {
|
|
147
147
|
this.service.rotate.set({ state: -90, userInteract: true });
|
|
148
148
|
}
|
|
149
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
150
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
149
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorRotateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
150
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: AXImageEditorRotateComponent, isStandalone: true, selector: "ax-image-editor-rotate", providers: [{ provide: AXComponent, useExisting: AXImageEditorRotateComponent }], ngImport: i0, template: "<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate-left' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateLeftHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-left\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate-right' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateRightHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-right\"></ax-icon>\n</ax-button>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-rotate{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));justify-content:center;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
151
151
|
}
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorRotateComponent, decorators: [{
|
|
153
153
|
type: Component,
|
|
154
154
|
args: [{ selector: 'ax-image-editor-rotate', encapsulation: ViewEncapsulation.None, imports: [
|
|
155
155
|
AXButtonComponent,
|
|
@@ -158,7 +158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
158
158
|
AsyncPipe,
|
|
159
159
|
AXTranslatorPipe,
|
|
160
160
|
AXTooltipModule,
|
|
161
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorRotateComponent }], template: "<ax-button\n [axTooltip]=\"'@acorex:image-editor.rotate-left' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateLeftHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-left\"></ax-icon>\n</ax-button>\n\n<ax-button\n [axTooltip]=\"'@acorex:image-editor.rotate-right' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateRightHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-right\"></ax-icon>\n</ax-button>\n" }]
|
|
161
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorRotateComponent }], template: "<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate-left' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateLeftHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-left\"></ax-icon>\n</ax-button>\n\n<ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate-right' | translate | async\"\n axTooltipPlacement=\"top\"\n (click)=\"rotateRightHandler()\"\n look=\"blank\"\n>\n <ax-icon class=\"ax-icon ax-icon-arrow-turn-right\"></ax-icon>\n</ax-button>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}@layer components{ax-image-editor-rotate{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-border-surface,rgba(var(--ax-sys-color-border-surface)));justify-content:center;display:flex}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"] }]
|
|
162
162
|
}] });
|
|
163
163
|
|
|
164
164
|
/**
|
|
@@ -179,12 +179,12 @@ class AXImageEditorToolSelectorComponent {
|
|
|
179
179
|
this.service.penType.set(tool);
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
183
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
182
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorToolSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
183
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: AXImageEditorToolSelectorComponent, isStandalone: true, selector: "ax-image-editor-tool-selector", providers: [{ provide: AXComponent, useExisting: AXImageEditorToolSelectorComponent }], ngImport: i0, template: "<div class=\"flex\">\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'pen' ? true : false\"\n [color]=\"this.service.activeToolState() === 'pen' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'highlight' ? true : false\"\n [color]=\"this.service.activeToolState() === 'highlight' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.crop' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('crop')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'crop' ? true : false\"\n [color]=\"this.service.activeToolState() === 'crop' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-crop\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('rotate')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'rotate' ? true : false\"\n [color]=\"this.service.activeToolState() === 'rotate' ? 'primary' : 'default'\"\n >\n <i class=\"fa-solid fa-rotate\"></i>\n </ax-button>\n</div>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
184
184
|
}
|
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorToolSelectorComponent, decorators: [{
|
|
186
186
|
type: Component,
|
|
187
|
-
args: [{ selector: 'ax-image-editor-tool-selector', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AXTooltipDirective, AsyncPipe, AXTranslatorPipe, AXTooltipModule], providers: [{ provide: AXComponent, useExisting: AXImageEditorToolSelectorComponent }], template: "<ax-button\n
|
|
187
|
+
args: [{ selector: 'ax-image-editor-tool-selector', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AXTooltipDirective, AsyncPipe, AXTranslatorPipe, AXTooltipModule], providers: [{ provide: AXComponent, useExisting: AXImageEditorToolSelectorComponent }], template: "<div class=\"flex\">\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.pen' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('pen')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'pen' ? true : false\"\n [color]=\"this.service.activeToolState() === 'pen' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-pen\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:paint.tools.highlight' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('highlight')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'highlight' ? true : false\"\n [color]=\"this.service.activeToolState() === 'highlight' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.crop' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('crop')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'crop' ? true : false\"\n [color]=\"this.service.activeToolState() === 'crop' ? 'primary' : 'default'\"\n >\n <ax-icon class=\"ax-icon ax-icon-crop\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.rotate' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"changeToolHandler('rotate')\"\n look=\"blank\"\n [selected]=\"this.service.activeToolState() === 'rotate' ? true : false\"\n [color]=\"this.service.activeToolState() === 'rotate' ? 'primary' : 'default'\"\n >\n <i class=\"fa-solid fa-rotate\"></i>\n </ax-button>\n</div>\n" }]
|
|
188
188
|
}] });
|
|
189
189
|
|
|
190
190
|
/**
|
|
@@ -204,22 +204,48 @@ class AXImageEditorCropperWindowComponent {
|
|
|
204
204
|
this.currentY = signal(-45, ...(ngDevMode ? [{ debugName: "currentY" }] : []));
|
|
205
205
|
this.prevX = signal(0, ...(ngDevMode ? [{ debugName: "prevX" }] : []));
|
|
206
206
|
this.prevY = signal(0, ...(ngDevMode ? [{ debugName: "prevY" }] : []));
|
|
207
|
+
this.aspectWidth = signal(0, ...(ngDevMode ? [{ debugName: "aspectWidth" }] : []));
|
|
208
|
+
this.aspectHeight = signal(0, ...(ngDevMode ? [{ debugName: "aspectHeight" }] : []));
|
|
209
|
+
this.isMousePressed = signal(false, ...(ngDevMode ? [{ debugName: "isMousePressed" }] : []));
|
|
207
210
|
this.renderer = inject(Renderer2);
|
|
208
211
|
this.platformID = inject(PLATFORM_ID);
|
|
209
212
|
this.#eff = effect(() => {
|
|
210
213
|
const host = this.elementRef.nativeElement;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
let width;
|
|
215
|
+
let height;
|
|
216
|
+
const scale = 150;
|
|
217
|
+
switch (this.service.cropperRatio()) {
|
|
218
|
+
case '1:1':
|
|
219
|
+
width = 1;
|
|
220
|
+
height = 1;
|
|
221
|
+
break;
|
|
222
|
+
case '16:9':
|
|
223
|
+
width = 1.777777777777778;
|
|
224
|
+
height = 1;
|
|
225
|
+
break;
|
|
226
|
+
case null:
|
|
227
|
+
width = 1;
|
|
228
|
+
height = 1;
|
|
229
|
+
break;
|
|
230
|
+
default:
|
|
231
|
+
[width, height] = this.service.cropperRatio().split(':').map(Number);
|
|
214
232
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
233
|
+
if (width >= height) {
|
|
234
|
+
const aspect = width / height;
|
|
235
|
+
width = aspect;
|
|
236
|
+
height = 1;
|
|
237
|
+
this.aspectWidth.set(aspect);
|
|
238
|
+
this.aspectHeight.set(1);
|
|
218
239
|
}
|
|
219
240
|
else {
|
|
220
|
-
|
|
221
|
-
|
|
241
|
+
const aspect = height / width;
|
|
242
|
+
width = 1;
|
|
243
|
+
height = aspect;
|
|
244
|
+
this.aspectWidth.set(1);
|
|
245
|
+
this.aspectHeight.set(aspect);
|
|
222
246
|
}
|
|
247
|
+
host.style.width = `${width * scale}px`;
|
|
248
|
+
host.style.height = `${height * scale}px`;
|
|
223
249
|
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
224
250
|
this.#init = afterNextRender(() => {
|
|
225
251
|
const host = this.elementRef.nativeElement;
|
|
@@ -229,13 +255,11 @@ class AXImageEditorCropperWindowComponent {
|
|
|
229
255
|
this.mouseDownEvent = this.renderer.listen(host, 'pointerdown', this.panDown.bind(this));
|
|
230
256
|
this.mouseMoveEvent2 = this.renderer.listen(host, 'pointermove', this.panMove.bind(this));
|
|
231
257
|
this.mouseUpEvent2 = this.renderer.listen(host, 'pointerup', this.panUp.bind(this));
|
|
232
|
-
this.mouseLeaveEvent = this.renderer.listen(host, 'pointerleave', this.panUp.bind(this));
|
|
233
258
|
});
|
|
234
259
|
});
|
|
235
260
|
this.#positionChange = effect(() => {
|
|
236
261
|
this.setPosition(this.currentX(), this.currentY());
|
|
237
262
|
}, ...(ngDevMode ? [{ debugName: "#positionChange" }] : []));
|
|
238
|
-
this.edgeCase = false;
|
|
239
263
|
}
|
|
240
264
|
#eff;
|
|
241
265
|
#init;
|
|
@@ -261,6 +285,8 @@ class AXImageEditorCropperWindowComponent {
|
|
|
261
285
|
}
|
|
262
286
|
#positionChange;
|
|
263
287
|
panMove(e) {
|
|
288
|
+
if (!this.isMousePressed())
|
|
289
|
+
return;
|
|
264
290
|
if (this.selectedHandle())
|
|
265
291
|
return;
|
|
266
292
|
if (!this.panState())
|
|
@@ -275,6 +301,7 @@ class AXImageEditorCropperWindowComponent {
|
|
|
275
301
|
this.prevY.set(currentY);
|
|
276
302
|
}
|
|
277
303
|
panDown(e) {
|
|
304
|
+
this.isMousePressed.set(true);
|
|
278
305
|
if (this.selectedHandle())
|
|
279
306
|
return;
|
|
280
307
|
this.panState.set(true);
|
|
@@ -282,6 +309,7 @@ class AXImageEditorCropperWindowComponent {
|
|
|
282
309
|
this.prevY.set(e.clientY);
|
|
283
310
|
}
|
|
284
311
|
panUp() {
|
|
312
|
+
this.isMousePressed.set(false);
|
|
285
313
|
if (this.selectedHandle())
|
|
286
314
|
return;
|
|
287
315
|
this.panState.set(false);
|
|
@@ -306,120 +334,131 @@ class AXImageEditorCropperWindowComponent {
|
|
|
306
334
|
this.selectedHandle.set(value);
|
|
307
335
|
}
|
|
308
336
|
changeSizeHandler(e) {
|
|
337
|
+
if (!this.isMousePressed())
|
|
338
|
+
return;
|
|
309
339
|
if (this.panState())
|
|
310
340
|
return;
|
|
311
341
|
if (!this.selectedHandle())
|
|
312
342
|
return;
|
|
313
343
|
const host = this.elementRef.nativeElement;
|
|
314
|
-
const rect = host.getBoundingClientRect();
|
|
315
344
|
const dy = e.clientY - this.startY;
|
|
316
345
|
const dx = e.clientX - this.startX;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}
|
|
346
|
+
let newWidth;
|
|
347
|
+
let newHeight;
|
|
348
|
+
const minSize = 20;
|
|
321
349
|
switch (this.selectedHandle()) {
|
|
322
350
|
case 'right':
|
|
323
|
-
|
|
351
|
+
newWidth = Math.max(minSize, this.startWidth + dx);
|
|
352
|
+
host.style.width = `${newWidth}px`;
|
|
324
353
|
break;
|
|
325
354
|
case 'top':
|
|
326
|
-
|
|
327
|
-
host.style.
|
|
355
|
+
newHeight = Math.max(minSize, this.startHeight - dy);
|
|
356
|
+
host.style.height = `${newHeight}px`;
|
|
357
|
+
host.style.top = `${this.startTop + (this.startHeight - newHeight)}px`;
|
|
328
358
|
break;
|
|
329
359
|
case 'left':
|
|
330
|
-
|
|
331
|
-
host.style.
|
|
360
|
+
newWidth = Math.max(minSize, this.startWidth - dx);
|
|
361
|
+
host.style.width = `${newWidth}px`;
|
|
362
|
+
host.style.left = `${this.startLeft + (this.startWidth - newWidth)}px`;
|
|
332
363
|
break;
|
|
333
364
|
case 'bottom':
|
|
334
|
-
|
|
365
|
+
newHeight = Math.max(minSize, this.startHeight + dy);
|
|
366
|
+
host.style.height = `${newHeight}px`;
|
|
335
367
|
break;
|
|
336
368
|
case 'right-top':
|
|
337
|
-
if (this.service.cropperRatio()
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
host.style.
|
|
345
|
-
host.style.
|
|
369
|
+
if (this.service.cropperRatio()) {
|
|
370
|
+
newWidth = Math.max(minSize, this.startWidth + dx);
|
|
371
|
+
newHeight = (newWidth * this.aspectHeight()) / this.aspectWidth();
|
|
372
|
+
if (newHeight < minSize) {
|
|
373
|
+
newHeight = minSize;
|
|
374
|
+
newWidth = (newHeight * this.aspectWidth()) / this.aspectHeight();
|
|
375
|
+
}
|
|
376
|
+
host.style.width = `${newWidth}px`;
|
|
377
|
+
host.style.height = `${newHeight}px`;
|
|
378
|
+
host.style.top = `${this.startTop + (this.startHeight - newHeight)}px`;
|
|
346
379
|
}
|
|
347
380
|
else {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
host.style.width = `${
|
|
381
|
+
newWidth = Math.max(minSize, this.startWidth + dx);
|
|
382
|
+
newHeight = Math.max(minSize, this.startHeight - dy);
|
|
383
|
+
host.style.width = `${newWidth}px`;
|
|
384
|
+
host.style.height = `${newHeight}px`;
|
|
385
|
+
host.style.top = `${this.startTop + (this.startHeight - newHeight)}px`;
|
|
351
386
|
}
|
|
352
387
|
break;
|
|
353
388
|
case 'bottom-right':
|
|
354
|
-
if (this.service.cropperRatio()
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
389
|
+
if (this.service.cropperRatio()) {
|
|
390
|
+
newWidth = Math.max(minSize, this.startWidth + dx);
|
|
391
|
+
newHeight = (newWidth * this.aspectHeight()) / this.aspectWidth();
|
|
392
|
+
if (newHeight < minSize) {
|
|
393
|
+
newHeight = minSize;
|
|
394
|
+
newWidth = (newHeight * this.aspectWidth()) / this.aspectHeight();
|
|
395
|
+
}
|
|
396
|
+
host.style.width = `${newWidth}px`;
|
|
397
|
+
host.style.height = `${newHeight}px`;
|
|
361
398
|
}
|
|
362
399
|
else {
|
|
363
|
-
|
|
364
|
-
|
|
400
|
+
newWidth = Math.max(minSize, this.startWidth + dx);
|
|
401
|
+
newHeight = Math.max(minSize, this.startHeight + dy);
|
|
402
|
+
host.style.width = `${newWidth}px`;
|
|
403
|
+
host.style.height = `${newHeight}px`;
|
|
365
404
|
}
|
|
366
405
|
break;
|
|
367
406
|
case 'bottom-left':
|
|
368
|
-
if (this.service.cropperRatio()
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
host.style.width = `${
|
|
376
|
-
host.style.
|
|
407
|
+
if (this.service.cropperRatio()) {
|
|
408
|
+
newWidth = Math.max(minSize, this.startWidth - dx);
|
|
409
|
+
newHeight = (newWidth * this.aspectHeight()) / this.aspectWidth();
|
|
410
|
+
if (newHeight < minSize) {
|
|
411
|
+
newHeight = minSize;
|
|
412
|
+
newWidth = (newHeight * this.aspectWidth()) / this.aspectHeight();
|
|
413
|
+
}
|
|
414
|
+
host.style.width = `${newWidth}px`;
|
|
415
|
+
host.style.height = `${newHeight}px`;
|
|
416
|
+
host.style.left = `${this.startLeft + (this.startWidth - newWidth)}px`;
|
|
377
417
|
}
|
|
378
418
|
else {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
host.style.
|
|
419
|
+
newWidth = Math.max(minSize, this.startWidth - dx);
|
|
420
|
+
newHeight = Math.max(minSize, this.startHeight + dy);
|
|
421
|
+
host.style.width = `${newWidth}px`;
|
|
422
|
+
host.style.height = `${newHeight}px`;
|
|
423
|
+
host.style.left = `${this.startLeft + (this.startWidth - newWidth)}px`;
|
|
382
424
|
}
|
|
383
425
|
break;
|
|
384
426
|
case 'left-top':
|
|
385
|
-
if (this.service.cropperRatio()
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
host.style.width = `${
|
|
393
|
-
host.style.
|
|
394
|
-
host.style.
|
|
395
|
-
host.style.top = `${this.
|
|
427
|
+
if (this.service.cropperRatio()) {
|
|
428
|
+
newWidth = Math.max(minSize, this.startWidth - dx);
|
|
429
|
+
newHeight = (newWidth * this.aspectHeight()) / this.aspectWidth();
|
|
430
|
+
if (newHeight < minSize) {
|
|
431
|
+
newHeight = minSize;
|
|
432
|
+
newWidth = (newHeight * this.aspectWidth()) / this.aspectHeight();
|
|
433
|
+
}
|
|
434
|
+
host.style.width = `${newWidth}px`;
|
|
435
|
+
host.style.height = `${newHeight}px`;
|
|
436
|
+
host.style.left = `${this.startLeft + (this.startWidth - newWidth)}px`;
|
|
437
|
+
host.style.top = `${this.startTop + (this.startHeight - newHeight)}px`;
|
|
396
438
|
}
|
|
397
439
|
else {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
host.style.
|
|
401
|
-
host.style.
|
|
440
|
+
newWidth = Math.max(minSize, this.startWidth - dx);
|
|
441
|
+
newHeight = Math.max(minSize, this.startHeight - dy);
|
|
442
|
+
host.style.width = `${newWidth}px`;
|
|
443
|
+
host.style.height = `${newHeight}px`;
|
|
444
|
+
host.style.left = `${this.startLeft + (this.startWidth - newWidth)}px`;
|
|
445
|
+
host.style.top = `${this.startTop + (this.startHeight - newHeight)}px`;
|
|
402
446
|
}
|
|
447
|
+
break;
|
|
403
448
|
}
|
|
404
449
|
}
|
|
405
450
|
clearSelector() {
|
|
406
451
|
if (this.panState())
|
|
407
452
|
return;
|
|
408
|
-
const host = this.elementRef.nativeElement;
|
|
409
|
-
if (this.edgeCase) {
|
|
410
|
-
host.style.height = `20px`;
|
|
411
|
-
host.style.width = `20px`;
|
|
412
|
-
this.edgeCase = false;
|
|
413
|
-
}
|
|
414
453
|
this.selectedHandle.set(null);
|
|
415
454
|
}
|
|
416
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
417
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorCropperWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
456
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: AXImageEditorCropperWindowComponent, isStandalone: true, selector: "ax-image-editor-cropper-window", inputs: { showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropperWindowComponent }], viewQueries: [{ propertyName: "cropperWindow", first: true, predicate: ["r"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [style.border]=\"!showGrid() ? '1px dashed white' : null\" #r class=\"ax-image-cropper-window-container\">\n @if (!service.cropperRatio()) {\n <div (pointerdown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (pointerdown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div\n (pointerdown)=\"handleSelector($event, 'bottom-right')\"\n class=\"ax-image-bottom-right-handle ax-handle-shape\"\n ></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-outline-style:solid;--tw-border-style:solid}}}@layer components{ax-image-editor-cropper-window{touch-action:none;-webkit-user-select:none;user-select:none;position:absolute;top:45%;left:45%}ax-image-editor-cropper-window .ax-image-cropper-window-container{cursor:move;outline-style:var(--tw-outline-style);outline-width:100vmax;outline-color:#000000b3;grid-template-columns:repeat(3,minmax(0,1fr));height:100%;display:grid;position:relative}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container{outline-color:color-mix(in oklab,var(--color-black,#000)70%,transparent)}}ax-image-editor-cropper-window .ax-image-cropper-window-container{--tw-outline-style:solid;outline-style:solid}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-style:var(--tw-border-style);--tw-border-style:dashed;border:1px dashed #ffffff80}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-color:color-mix(in oklab,var(--color-white,#fff)50%,transparent)}}ax-image-editor-cropper-window .ax-handle-shape{height:calc(var(--spacing,.25rem)*4);width:calc(var(--spacing,.25rem)*4);border-style:var(--tw-border-style);--tw-border-style:dashed;border-style:dashed;border-width:1px;border-color:var(--color-white,#fff);background-color:var(--color-gray-500,oklch(55.1% .027 264.364));-webkit-user-select:none;user-select:none;position:absolute}ax-image-editor-cropper-window .ax-image-right-top-handle{top:calc(var(--spacing,.25rem)*-2);right:calc(var(--spacing,.25rem)*-2);cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{right:calc(var(--spacing,.25rem)*-2);bottom:calc(var(--spacing,.25rem)*-2);cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{top:calc(50% - .5rem);right:calc(var(--spacing,.25rem)*-2);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:calc(var(--spacing,.25rem)*-2);left:calc(var(--spacing,.25rem)*-2);cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:calc(var(--spacing,.25rem)*-2);left:calc(var(--spacing,.25rem)*-2);cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{right:calc(50% - .5rem);bottom:calc(var(--spacing,.25rem)*-2);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{top:calc(50% - .5rem);left:calc(var(--spacing,.25rem)*-2);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:calc(var(--spacing,.25rem)*-2);cursor:n-resize;right:calc(50% - .5rem)}}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
418
457
|
}
|
|
419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorCropperWindowComponent, decorators: [{
|
|
420
459
|
type: Component,
|
|
421
|
-
args: [{ selector: 'ax-image-editor-cropper-window', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
422
|
-
}] });
|
|
460
|
+
args: [{ selector: 'ax-image-editor-cropper-window', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorCropperWindowComponent }], template: "<div [style.border]=\"!showGrid() ? '1px dashed white' : null\" #r class=\"ax-image-cropper-window-container\">\n @if (!service.cropperRatio()) {\n <div (pointerdown)=\"handleSelector($event, 'right')\" class=\"ax-image-right-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'top')\" class=\"ax-image-top-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left')\" class=\"ax-image-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom')\" class=\"ax-image-bottom-handle ax-handle-shape\"></div>\n }\n\n <div (pointerdown)=\"handleSelector($event, 'right-top')\" class=\"ax-image-right-top-handle ax-handle-shape\"></div>\n <div\n (pointerdown)=\"handleSelector($event, 'bottom-right')\"\n class=\"ax-image-bottom-right-handle ax-handle-shape\"\n ></div>\n <div (pointerdown)=\"handleSelector($event, 'bottom-left')\" class=\"ax-image-bottom-left-handle ax-handle-shape\"></div>\n <div (pointerdown)=\"handleSelector($event, 'left-top')\" class=\"ax-image-left-top-handle ax-handle-shape\"></div>\n\n @if (showGrid()) {\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n <div class=\"ax-grid-item\"></div>\n }\n</div>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-outline-style:solid;--tw-border-style:solid}}}@layer components{ax-image-editor-cropper-window{touch-action:none;-webkit-user-select:none;user-select:none;position:absolute;top:45%;left:45%}ax-image-editor-cropper-window .ax-image-cropper-window-container{cursor:move;outline-style:var(--tw-outline-style);outline-width:100vmax;outline-color:#000000b3;grid-template-columns:repeat(3,minmax(0,1fr));height:100%;display:grid;position:relative}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container{outline-color:color-mix(in oklab,var(--color-black,#000)70%,transparent)}}ax-image-editor-cropper-window .ax-image-cropper-window-container{--tw-outline-style:solid;outline-style:solid}ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-style:var(--tw-border-style);--tw-border-style:dashed;border:1px dashed #ffffff80}@supports (color:color-mix(in lab,red,red)){ax-image-editor-cropper-window .ax-image-cropper-window-container .ax-grid-item{border-color:color-mix(in oklab,var(--color-white,#fff)50%,transparent)}}ax-image-editor-cropper-window .ax-handle-shape{height:calc(var(--spacing,.25rem)*4);width:calc(var(--spacing,.25rem)*4);border-style:var(--tw-border-style);--tw-border-style:dashed;border-style:dashed;border-width:1px;border-color:var(--color-white,#fff);background-color:var(--color-gray-500,oklch(55.1% .027 264.364));-webkit-user-select:none;user-select:none;position:absolute}ax-image-editor-cropper-window .ax-image-right-top-handle{top:calc(var(--spacing,.25rem)*-2);right:calc(var(--spacing,.25rem)*-2);cursor:ne-resize}ax-image-editor-cropper-window .ax-image-bottom-right-handle{right:calc(var(--spacing,.25rem)*-2);bottom:calc(var(--spacing,.25rem)*-2);cursor:se-resize}ax-image-editor-cropper-window .ax-image-right-handle{top:calc(50% - .5rem);right:calc(var(--spacing,.25rem)*-2);cursor:e-resize}ax-image-editor-cropper-window .ax-image-bottom-left-handle{bottom:calc(var(--spacing,.25rem)*-2);left:calc(var(--spacing,.25rem)*-2);cursor:sw-resize}ax-image-editor-cropper-window .ax-image-left-top-handle{top:calc(var(--spacing,.25rem)*-2);left:calc(var(--spacing,.25rem)*-2);cursor:nw-resize}ax-image-editor-cropper-window .ax-image-bottom-handle{right:calc(50% - .5rem);bottom:calc(var(--spacing,.25rem)*-2);cursor:s-resize}ax-image-editor-cropper-window .ax-image-left-handle{top:calc(50% - .5rem);left:calc(var(--spacing,.25rem)*-2);cursor:w-resize}ax-image-editor-cropper-window .ax-image-top-handle{top:calc(var(--spacing,.25rem)*-2);cursor:n-resize;right:calc(50% - .5rem)}}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"] }]
|
|
461
|
+
}], propDecorators: { showGrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGrid", required: false }] }], cropperWindow: [{ type: i0.ViewChild, args: ['r', { isSignal: true }] }] } });
|
|
423
462
|
|
|
424
463
|
class AXImageEditorViewComponent extends MXBaseComponent {
|
|
425
464
|
/** @ignore */
|
|
@@ -440,7 +479,6 @@ class AXImageEditorViewComponent extends MXBaseComponent {
|
|
|
440
479
|
this.canvasElem().nativeElement.width = imageHeight;
|
|
441
480
|
this.canvasElem().nativeElement.height = imageHeight;
|
|
442
481
|
}
|
|
443
|
-
this.canvasElem().nativeElement.style.width = '100%';
|
|
444
482
|
requestAnimationFrame(() => {
|
|
445
483
|
//recalculate width after canvas size change
|
|
446
484
|
const recalculateWidth = this.canvasElem().nativeElement.getClientRects()[0]?.width;
|
|
@@ -620,6 +658,7 @@ class AXImageEditorViewComponent extends MXBaseComponent {
|
|
|
620
658
|
const cropImage = this.canvasElem().nativeElement.toDataURL('image/jpeg', 1);
|
|
621
659
|
this.setInitialImage(cropImage, false);
|
|
622
660
|
this.service.activeToolState.set(null);
|
|
661
|
+
this.saveImageChange();
|
|
623
662
|
}
|
|
624
663
|
/** @ignore */
|
|
625
664
|
rotateImage() {
|
|
@@ -646,31 +685,39 @@ class AXImageEditorViewComponent extends MXBaseComponent {
|
|
|
646
685
|
});
|
|
647
686
|
}
|
|
648
687
|
/** @ignore */
|
|
649
|
-
saveImageChange() {
|
|
688
|
+
async saveImageChange() {
|
|
689
|
+
const canvas = this.canvasElem().nativeElement;
|
|
650
690
|
const newImage = new Image();
|
|
651
691
|
newImage.crossOrigin = 'anonymous';
|
|
652
|
-
newImage.src =
|
|
692
|
+
newImage.src = canvas.toDataURL('image/jpeg', 1);
|
|
653
693
|
this.service.newImage = newImage;
|
|
654
694
|
this.imageEditorHistory.update((prev) => [...prev, newImage]);
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
695
|
+
const canvasToBlob = (type, quality) => {
|
|
696
|
+
return new Promise((resolve, reject) => {
|
|
697
|
+
canvas.toBlob((blob) => {
|
|
698
|
+
if (blob) {
|
|
699
|
+
resolve(blob);
|
|
700
|
+
}
|
|
701
|
+
else {
|
|
702
|
+
reject(new Error(`toBlob returned null for type ${type}`));
|
|
703
|
+
}
|
|
704
|
+
}, type, quality);
|
|
705
|
+
});
|
|
706
|
+
};
|
|
707
|
+
const blobs = await Promise.all([
|
|
708
|
+
canvasToBlob('image/jpeg', 1),
|
|
709
|
+
canvasToBlob('image/png', 1),
|
|
710
|
+
canvasToBlob('image/webp', 1),
|
|
711
|
+
]);
|
|
712
|
+
this.service.imageBlob.set(blobs);
|
|
713
|
+
}
|
|
714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
715
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: AXImageEditorViewComponent, isStandalone: true, selector: "ax-image-editor-view", inputs: { showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXImageEditorViewComponent }], viewQueries: [{ propertyName: "canvasElem", first: true, predicate: ["canvasElem"], descendants: true, isSignal: true }, { propertyName: "cropperWindow", first: true, predicate: ["f"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<canvas\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n #canvasElem\n></canvas>\n\n@if (this.service.activeToolState() === 'crop') {\n <ax-image-editor-cropper-window [showGrid]=\"showGrid()\" #f></ax-image-editor-cropper-window>\n}\n", styles: ["@layer components{ax-image-editor-view{touch-action:none;background-color:var(--color-white,#fff);justify-content:center;align-items:center;width:100%;display:flex;position:relative;overflow:hidden}ax-image-editor-view .ax-canvas-element{cursor:crosshair;background-color:var(--color-black,#000)}ax-image-editor-view .ax-crop-save{top:calc(var(--spacing,.25rem)*0);right:calc(var(--spacing,.25rem)*0);margin:calc(var(--spacing,.25rem)*4);position:absolute}}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXImageEditorCropperWindowComponent, selector: "ax-image-editor-cropper-window", inputs: ["showGrid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
669
716
|
}
|
|
670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorViewComponent, decorators: [{
|
|
671
718
|
type: Component,
|
|
672
|
-
args: [{ selector: 'ax-image-editor-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXImageEditorCropperWindowComponent], providers: [{ provide: AXComponent, useExisting: AXImageEditorViewComponent }], template: "<canvas\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n #canvasElem\n></canvas>\n\n@if (this.service.activeToolState() === 'crop') {\n <ax-image-editor-cropper-window [showGrid]=\"showGrid()\" #f></ax-image-editor-cropper-window>\n}\n", styles: ["ax-image-editor-view{
|
|
673
|
-
}], ctorParameters: () => [] });
|
|
719
|
+
args: [{ selector: 'ax-image-editor-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXImageEditorCropperWindowComponent], providers: [{ provide: AXComponent, useExisting: AXImageEditorViewComponent }], template: "<canvas\n tabindex=\"1\"\n (pointerdown)=\"mouseDownHandler($event)\"\n (pointerup)=\"mouseUpHandler()\"\n (pointermove)=\"mouseMoveHandler($event)\"\n class=\"ax-canvas-element\"\n #canvasElem\n></canvas>\n\n@if (this.service.activeToolState() === 'crop') {\n <ax-image-editor-cropper-window [showGrid]=\"showGrid()\" #f></ax-image-editor-cropper-window>\n}\n", styles: ["@layer components{ax-image-editor-view{touch-action:none;background-color:var(--color-white,#fff);justify-content:center;align-items:center;width:100%;display:flex;position:relative;overflow:hidden}ax-image-editor-view .ax-canvas-element{cursor:crosshair;background-color:var(--color-black,#000)}ax-image-editor-view .ax-crop-save{top:calc(var(--spacing,.25rem)*0);right:calc(var(--spacing,.25rem)*0);margin:calc(var(--spacing,.25rem)*4);position:absolute}}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"] }]
|
|
720
|
+
}], ctorParameters: () => [], propDecorators: { showGrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGrid", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], canvasElem: [{ type: i0.ViewChild, args: ['canvasElem', { isSignal: true }] }], cropperWindow: [{ type: i0.ViewChild, args: ['f', { isSignal: true }] }] } });
|
|
674
721
|
|
|
675
722
|
/**
|
|
676
723
|
* paint container.
|
|
@@ -683,21 +730,18 @@ class AXImageEditorContainerComponent extends classes((MXInputBaseValueComponent
|
|
|
683
730
|
this.service = inject(AXImageEditorService);
|
|
684
731
|
this.imageEditorContainer = viewChild('f', ...(ngDevMode ? [{ debugName: "imageEditorContainer" }] : []));
|
|
685
732
|
this.view = contentChild(AXImageEditorViewComponent, ...(ngDevMode ? [{ debugName: "view" }] : []));
|
|
733
|
+
this.aspectRatio = input([], ...(ngDevMode ? [{ debugName: "aspectRatio" }] : []));
|
|
734
|
+
this.#eff = effect(() => {
|
|
735
|
+
void this.service.imageBlob();
|
|
736
|
+
if (this.service.imageBlob().length) {
|
|
737
|
+
this.commitValue(this.service.imageBlob(), true);
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
this.commitValue(null);
|
|
741
|
+
}
|
|
742
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
686
743
|
}
|
|
687
|
-
|
|
688
|
-
* Saves the current edited image and commits the value to the component.
|
|
689
|
-
* If the image has been modified, it commits the image blob array. If no changes were made, it commits null.
|
|
690
|
-
*
|
|
691
|
-
* @returns void - No return value. The edited image is saved and the onValueChanged event is emitted.
|
|
692
|
-
*/
|
|
693
|
-
save() {
|
|
694
|
-
if (this.service.initialImage !== this.service.newImage) {
|
|
695
|
-
this.commitValue(this.service.imageBlob(), true);
|
|
696
|
-
}
|
|
697
|
-
else {
|
|
698
|
-
this.commitValue(null);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
744
|
+
#eff;
|
|
701
745
|
cropButtonHandler() {
|
|
702
746
|
this.view().cropButtonHandler();
|
|
703
747
|
}
|
|
@@ -709,8 +753,8 @@ class AXImageEditorContainerComponent extends classes((MXInputBaseValueComponent
|
|
|
709
753
|
get __hostName() {
|
|
710
754
|
return this.name;
|
|
711
755
|
}
|
|
712
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
713
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
756
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
757
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: AXImageEditorContainerComponent, isStandalone: true, selector: "ax-image-editor-container", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onValueChanged: "onValueChanged" }, host: { properties: { "class": "this.__hostClass", "attr.name": "this.__hostName" } }, providers: [
|
|
714
758
|
AXImageEditorService,
|
|
715
759
|
{ provide: AXComponent, useExisting: AXImageEditorContainerComponent },
|
|
716
760
|
{ provide: AXFocusableComponent, useExisting: AXImageEditorContainerComponent },
|
|
@@ -720,9 +764,9 @@ class AXImageEditorContainerComponent extends classes((MXInputBaseValueComponent
|
|
|
720
764
|
useExisting: forwardRef(() => AXImageEditorContainerComponent),
|
|
721
765
|
multi: true,
|
|
722
766
|
},
|
|
723
|
-
], queries: [{ propertyName: "view", first: true, predicate: AXImageEditorViewComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "imageEditorContainer", first: true, predicate: ["f"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (service.isImageLoad()) {\n <div #f class=\"ax-editor-container
|
|
767
|
+
], queries: [{ propertyName: "view", first: true, predicate: AXImageEditorViewComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "imageEditorContainer", first: true, predicate: ["f"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (service.isImageLoad()) {\n <div #f class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content select=\"ax-header\"></ng-content>\n\n <ng-content select=\"ax-image-editor-view\"> </ng-content>\n\n @if (service.activeToolState()) {\n @switch (service.activeToolState()) {\n @case ('pen') {\n <ax-image-editor-pen></ax-image-editor-pen>\n }\n @case ('crop') {\n <ax-image-editor-crop\n [aspectRatio]=\"aspectRatio()\"\n (cropPressed)=\"cropButtonHandler()\"\n ></ax-image-editor-crop>\n }\n @case ('highlight') {\n <ax-image-editor-highlight></ax-image-editor-highlight>\n }\n @case ('rotate') {\n <ax-image-editor-rotate></ax-image-editor-rotate>\n }\n }\n }\n\n <ax-toolbar class=\"ax-main-toolbar\">\n <ax-content>\n <ax-image-editor-tool-selector></ax-image-editor-tool-selector>\n </ax-content>\n </ax-toolbar>\n </div>\n <div class=\"ax-error-container\"></div>\n} @else {\n <div class=\"ax-loading-spinner-container\">\n <ax-loading-spinner [size]=\"16\" color=\"primary\" text=\"Loading Image ...\"></ax-loading-spinner>\n </div>\n}\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer components{ax-image-editor-container{width:fit-content;display:block;position:relative}ax-image-editor-container.ax-state-disabled{opacity:.5}ax-image-editor-container .ax-disable-overlay{top:calc(var(--spacing,.25rem)*0);left:calc(var(--spacing,.25rem)*0);cursor:not-allowed;width:100%;height:100%;position:absolute}ax-image-editor-container>.ax-editor-container{padding:calc(var(--spacing,.25rem)*0);display:block;height:auto!important}ax-image-editor-container .ax-loading-spinner-container{justify-content:center;align-items:center;display:flex}ax-image-editor-container .ax-main-toolbar{padding:calc(var(--spacing,.25rem)*1);justify-content:center}ax-image-editor-container ax-header{width:100%}ax-image-editor-container ax-header ax-toolbar{justify-content:space-between}ax-image-editor-container ax-header .ax-start-toolbar-divider{display:none}}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXLoadingSpinnerComponent, selector: "ax-loading-spinner", inputs: ["text", "color", "size", "stroke"] }, { kind: "ngmodule", type: AXToolBarModule }, { kind: "component", type: i2$1.AXToolBarComponent, selector: "ax-toolbar" }, { kind: "component", type: AXImageEditorCropComponent, selector: "ax-image-editor-crop", inputs: ["aspectRatio"], outputs: ["cropPressed"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: AXImageEditorToolSelectorComponent, selector: "ax-image-editor-tool-selector" }, { kind: "component", type: AXImageEditorPenComponent, selector: "ax-image-editor-pen" }, { kind: "component", type: AXImageEditorHighlightComponent, selector: "ax-image-editor-highlight" }, { kind: "component", type: AXImageEditorRotateComponent, selector: "ax-image-editor-rotate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
724
768
|
}
|
|
725
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorContainerComponent, decorators: [{
|
|
726
770
|
type: Component,
|
|
727
771
|
args: [{ selector: 'ax-image-editor-container', encapsulation: ViewEncapsulation.None, outputs: ['onValueChanged'], inputs: ['look', 'disabled'], providers: [
|
|
728
772
|
AXImageEditorService,
|
|
@@ -744,8 +788,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
744
788
|
AXImageEditorPenComponent,
|
|
745
789
|
AXImageEditorHighlightComponent,
|
|
746
790
|
AXImageEditorRotateComponent,
|
|
747
|
-
], template: "@if (service.isImageLoad()) {\n <div #f class=\"ax-editor-container
|
|
748
|
-
}], propDecorators: { __hostClass: [{
|
|
791
|
+
], template: "@if (service.isImageLoad()) {\n <div #f class=\"ax-editor-container ax-default {{ look }}\">\n <ng-content select=\"ax-header\"></ng-content>\n\n <ng-content select=\"ax-image-editor-view\"> </ng-content>\n\n @if (service.activeToolState()) {\n @switch (service.activeToolState()) {\n @case ('pen') {\n <ax-image-editor-pen></ax-image-editor-pen>\n }\n @case ('crop') {\n <ax-image-editor-crop\n [aspectRatio]=\"aspectRatio()\"\n (cropPressed)=\"cropButtonHandler()\"\n ></ax-image-editor-crop>\n }\n @case ('highlight') {\n <ax-image-editor-highlight></ax-image-editor-highlight>\n }\n @case ('rotate') {\n <ax-image-editor-rotate></ax-image-editor-rotate>\n }\n }\n }\n\n <ax-toolbar class=\"ax-main-toolbar\">\n <ax-content>\n <ax-image-editor-tool-selector></ax-image-editor-tool-selector>\n </ax-content>\n </ax-toolbar>\n </div>\n <div class=\"ax-error-container\"></div>\n} @else {\n <div class=\"ax-loading-spinner-container\">\n <ax-loading-spinner [size]=\"16\" color=\"primary\" text=\"Loading Image ...\"></ax-loading-spinner>\n </div>\n}\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n\n@if (disabled) {\n <div class=\"ax-disable-overlay\"></div>\n}\n", styles: ["@layer components{ax-image-editor-container{width:fit-content;display:block;position:relative}ax-image-editor-container.ax-state-disabled{opacity:.5}ax-image-editor-container .ax-disable-overlay{top:calc(var(--spacing,.25rem)*0);left:calc(var(--spacing,.25rem)*0);cursor:not-allowed;width:100%;height:100%;position:absolute}ax-image-editor-container>.ax-editor-container{padding:calc(var(--spacing,.25rem)*0);display:block;height:auto!important}ax-image-editor-container .ax-loading-spinner-container{justify-content:center;align-items:center;display:flex}ax-image-editor-container .ax-main-toolbar{padding:calc(var(--spacing,.25rem)*1);justify-content:center}ax-image-editor-container ax-header{width:100%}ax-image-editor-container ax-header ax-toolbar{justify-content:space-between}ax-image-editor-container ax-header .ax-start-toolbar-divider{display:none}}\n/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n"] }]
|
|
792
|
+
}], propDecorators: { imageEditorContainer: [{ type: i0.ViewChild, args: ['f', { isSignal: true }] }], view: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXImageEditorViewComponent), { isSignal: true }] }], aspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "aspectRatio", required: false }] }], __hostClass: [{
|
|
749
793
|
type: HostBinding,
|
|
750
794
|
args: ['class']
|
|
751
795
|
}], __hostName: [{
|
|
@@ -767,12 +811,12 @@ class AXImageEditorHistoryComponent {
|
|
|
767
811
|
RedoHandler() {
|
|
768
812
|
this.service.redoPressed.set(true);
|
|
769
813
|
}
|
|
770
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
771
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
814
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
815
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: AXImageEditorHistoryComponent, isStandalone: true, selector: "ax-image-editor-history", providers: [{ provide: AXComponent, useExisting: AXImageEditorHistoryComponent }], ngImport: i0, template: "<div class=\"flex\">\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.undo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"UndoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.redo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"RedoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-redo\"></ax-icon>\n </ax-button>\n</div>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
772
816
|
}
|
|
773
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorHistoryComponent, decorators: [{
|
|
774
818
|
type: Component,
|
|
775
|
-
args: [{ selector: 'ax-image-editor-history', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AXTooltipDirective, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorHistoryComponent }], template: "<ax-button\n
|
|
819
|
+
args: [{ selector: 'ax-image-editor-history', encapsulation: ViewEncapsulation.None, imports: [AXButtonComponent, AXDecoratorModule, AXTooltipDirective, AsyncPipe, AXTranslatorPipe, AXTooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXComponent, useExisting: AXImageEditorHistoryComponent }], template: "<div class=\"flex\">\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.undo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"UndoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [axTooltip]=\"'@acorex:image-editor.redo' | translate | async\"\n axTooltipPlacement=\"top\"\n (onClick)=\"RedoHandler()\"\n look=\"blank\"\n >\n <ax-icon class=\"ax-icon ax-icon-redo\"></ax-icon>\n </ax-button>\n</div>\n" }]
|
|
776
820
|
}] });
|
|
777
821
|
|
|
778
822
|
const COMPONENT = [
|
|
@@ -798,8 +842,8 @@ const MODULES = [
|
|
|
798
842
|
AXDialogModule,
|
|
799
843
|
];
|
|
800
844
|
class AXImageEditorModule {
|
|
801
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
802
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
845
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
846
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorModule, imports: [AXButtonModule,
|
|
803
847
|
FormsModule,
|
|
804
848
|
AXRangeSliderModule,
|
|
805
849
|
AXSelectBoxModule,
|
|
@@ -824,9 +868,15 @@ class AXImageEditorModule {
|
|
|
824
868
|
AXImageEditorHighlightComponent,
|
|
825
869
|
AXImageEditorRotateComponent,
|
|
826
870
|
AXImageEditorCropperWindowComponent] }); }
|
|
827
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
871
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorModule, imports: [MODULES, AXImageEditorContainerComponent,
|
|
872
|
+
AXImageEditorCropComponent,
|
|
873
|
+
AXImageEditorHistoryComponent,
|
|
874
|
+
AXImageEditorToolSelectorComponent,
|
|
875
|
+
AXImageEditorPenComponent,
|
|
876
|
+
AXImageEditorHighlightComponent,
|
|
877
|
+
AXImageEditorRotateComponent] }); }
|
|
828
878
|
}
|
|
829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AXImageEditorModule, decorators: [{
|
|
830
880
|
type: NgModule,
|
|
831
881
|
args: [{
|
|
832
882
|
imports: [...MODULES, ...COMPONENT],
|