@rdlabo/ionic-angular-photo-editor 20.0.3 → 21.0.1
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/eslint.config.js +7 -0
- package/ng-package.json +7 -0
- package/package.json +6 -17
- package/src/lib/dictionaries.ts +31 -0
- package/src/lib/filter-preset.ts +44 -0
- package/src/lib/ion-components.ts +3 -0
- package/src/lib/pages/core.scss +63 -0
- package/src/lib/pages/photo-editor/photo-editor.page.html +95 -0
- package/src/lib/pages/photo-editor/photo-editor.page.scss +95 -0
- package/src/lib/pages/photo-editor/photo-editor.page.spec.ts +21 -0
- package/src/lib/pages/photo-editor/photo-editor.page.ts +221 -0
- package/src/lib/pages/photo-viewer/photo-viewer.page.html +31 -0
- package/src/lib/pages/photo-viewer/photo-viewer.page.scss +29 -0
- package/src/lib/pages/photo-viewer/photo-viewer.page.spec.ts +25 -0
- package/src/lib/pages/photo-viewer/photo-viewer.page.ts +134 -0
- package/src/lib/pages/util.ts +48 -0
- package/src/lib/photoEditorErrors.ts +5 -0
- package/src/lib/services/photo-file.service.spec.ts +19 -0
- package/src/lib/services/photo-file.service.ts +161 -0
- package/src/lib/types.ts +55 -0
- package/src/public-api.ts +8 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/fesm2022/rdlabo-ionic-angular-photo-editor.mjs +0 -533
- package/fesm2022/rdlabo-ionic-angular-photo-editor.mjs.map +0 -1
- package/index.d.ts +0 -132
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rdlabo-ionic-angular-photo-editor.mjs","sources":["../../../projects/photo-editor/src/lib/filter-preset.ts","../../../projects/photo-editor/src/lib/ion-components.ts","../../../projects/photo-editor/src/lib/dictionaries.ts","../../../projects/photo-editor/src/lib/pages/util.ts","../../../projects/photo-editor/src/lib/pages/photo-editor/photo-editor.page.ts","../../../projects/photo-editor/src/lib/pages/photo-editor/photo-editor.page.html","../../../projects/photo-editor/src/lib/pages/photo-viewer/photo-viewer.page.ts","../../../projects/photo-editor/src/lib/pages/photo-viewer/photo-viewer.page.html","../../../projects/photo-editor/src/lib/photoEditorErrors.ts","../../../projects/photo-editor/src/lib/services/photo-file.service.ts","../../../projects/photo-editor/src/public-api.ts","../../../projects/photo-editor/src/rdlabo-ionic-angular-photo-editor.ts"],"sourcesContent":["import { IDictionaryForEditor, IFilterPreset } from './types';\n\nexport const filterPreset = (dictionary: IDictionaryForEditor): IFilterPreset[] => [\n {\n name: dictionary.original,\n type: 'Default',\n option: null,\n },\n // {\n // name: dictionary.invert,\n // type: 'Invert',\n // option: null,\n // },\n {\n name: dictionary.sepia,\n type: 'Sepia',\n option: null,\n },\n {\n name: dictionary.vintage,\n type: 'vintage',\n option: null,\n },\n {\n name: 'ぼかし',\n type: 'Blur',\n option: { blur: 0.1 },\n },\n {\n name: dictionary.grayscale,\n type: 'Grayscale',\n option: null,\n },\n // {\n // name: dictionary.sharpen,\n // type: 'Sharpen',\n // option: null,\n // },\n // {\n // name: dictionary.emboss,\n // type: 'Emboss',\n // option: null,\n // },\n];\n","import { IonButton, IonButtons, IonContent, IonFooter, IonHeader, IonIcon, IonRange, IonText, IonToolbar } from '@ionic/angular/standalone';\n\nexport const ionComponents = [IonHeader, IonToolbar, IonButtons, IonButton, IonIcon, IonContent, IonFooter, IonText, IonRange];\n","import { IDictionaryForEditor, IDictionaryForService, IDictionaryForViewer } from './types';\n\nexport const dictionaryForEditor = (): IDictionaryForEditor => ({\n // UI labels\n save: '保存',\n crop: '切り抜き・回転',\n filter: 'フィルター',\n brightness: '明るさ',\n\n // Filter labels\n original: 'オリジナル',\n invert: '反転',\n sepia: 'セピア',\n vintage: 'ヴィンテージ',\n blur: 'ぼかし',\n grayscale: 'グレースケール',\n sharpen: '輪郭',\n emboss: 'エンボス',\n});\n\nexport const dictionaryForViewer = (): IDictionaryForViewer => ({\n // UI labels\n delete: '削除',\n});\n\nexport const dictionaryForService = (): IDictionaryForService => ({\n // UI labels\n camera: 'カメラ撮影',\n album: 'アルバムから選択',\n cancel: 'キャンセル',\n});\n","import { addIcons } from 'ionicons';\nimport {\n checkmarkOutline,\n closeOutline,\n colorFilterOutline,\n cropOutline,\n expandOutline,\n refreshOutline,\n removeOutline,\n send,\n squareOutline,\n sunnyOutline,\n tabletLandscapeOutline,\n} from 'ionicons/icons';\n\nexport const initializeViewerIcons = (): void => {\n addIcons({\n closeOutline,\n removeOutline,\n });\n};\n\nexport const initializeEditorIcons = (): void => {\n addIcons({\n closeOutline,\n send,\n cropOutline,\n colorFilterOutline,\n sunnyOutline,\n expandOutline,\n tabletLandscapeOutline,\n squareOutline,\n refreshOutline,\n checkmarkOutline,\n });\n};\n\nexport const waitToFindDom = (nativeElement: HTMLElement, selector: string): Promise<void> => {\n return new Promise<void>((resolve) => {\n const interval = setInterval(() => {\n const find = nativeElement.querySelector(selector);\n if (find) {\n clearInterval(interval);\n resolve();\n }\n });\n });\n};\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n OnDestroy,\n OnInit,\n signal,\n viewChild,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { IonContent, ModalController, RangeCustomEvent, ViewDidEnter, ViewDidLeave } from '@ionic/angular/standalone';\nimport ImageEditor from 'tui-image-editor';\nimport { filterPreset } from '../../filter-preset';\nimport { Subscription } from 'rxjs';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { IDictionaryForEditor, IFilter, IPhotoEditorDismiss, ISize } from '../../types';\nimport { ionComponents } from '../../ion-components';\nimport { dictionaryForEditor } from '../../dictionaries';\nimport { initializeEditorIcons, waitToFindDom } from '../util';\n\n@Component({\n selector: 'app-editor-image',\n templateUrl: './photo-editor.page.html',\n styleUrls: ['../core.scss', './photo-editor.page.scss'],\n imports: [CommonModule, FormsModule, ...ionComponents],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PhotoEditorPage implements OnInit, OnDestroy, ViewDidEnter, ViewDidLeave {\n readonly modalCtrl = inject(ModalController);\n\n protected readonly dictionary = signal<IDictionaryForEditor>(dictionaryForEditor());\n\n readonly requireSquare = input<boolean, BooleanInput>(false, {\n transform: coerceBooleanProperty,\n });\n readonly labels = input<Partial<IDictionaryForEditor> | undefined>(undefined);\n readonly setLabels = effect(() => {\n if (this.labels()) {\n this.dictionary.update((value) => ({ ...value, ...this.labels() }));\n }\n });\n readonly value = input.required<string>();\n\n readonly editorRef = viewChild.required<ElementRef>('imageEditor');\n readonly ionContent = viewChild.required(IonContent, { read: ElementRef });\n\n readonly filters = signal<IFilter[]>([]);\n readonly footerMenu = signal<'filter' | 'menu' | 'crop' | 'brightness'>('menu');\n readonly currentCrop = signal<'cover' | '16/9' | '1' | 'auto'>('cover');\n readonly currentRotate = signal<number>(0);\n readonly photoCrop = signal<ISize>({\n width: 0,\n height: 0,\n });\n readonly isCropped = signal<boolean>(false);\n private readonly adoptFilter = signal<IFilter | undefined>(undefined);\n protected readonly filterPreset = computed(() => filterPreset(this.dictionary()));\n\n private readonly footerMenu$ = toObservable(this.footerMenu);\n\n private readonly initSubscription$: Subscription[] = [];\n private readonly filterImageSize = 240;\n private editorInstance!: ImageEditor;\n\n private canvasContainerObserver: MutationObserver = new MutationObserver((mutationsList: MutationRecord[]) => {\n if (mutationsList.find((mutation) => mutation.type === 'attributes' && mutation.attributeName === 'style')) {\n // Cover the image editor with the parent element\n const editorRef = this.editorRef();\n editorRef.nativeElement.style.minWidth = mutationsList[0].target.parentElement!.style.maxWidth;\n editorRef.nativeElement.style.minHeight = mutationsList[0].target.parentElement!.style.maxHeight;\n\n this.photoCrop.set({\n width: mutationsList[0].target.parentElement!.querySelector('canvas')!.width,\n height: mutationsList[0].target.parentElement!.querySelector('canvas')!.height,\n });\n }\n });\n\n constructor() {\n initializeEditorIcons();\n }\n\n ngOnInit() {\n this.initSubscription$.push(\n this.footerMenu$.subscribe((value) => {\n if (value === 'filter') {\n this.initializeFilterMenu().then();\n }\n if (value === 'crop') {\n this.editorInstance.startDrawingMode('CROPPER');\n this.changeCrop(this.requireSquare() ? '1' : 'cover');\n }\n }),\n );\n }\n\n ngOnDestroy() {\n this.initSubscription$.forEach((subscription) => subscription.unsubscribe());\n }\n\n async ionViewDidEnter() {\n this.editorInstance = new ImageEditor(this.editorRef().nativeElement, {\n cssMaxWidth: this.ionContent().nativeElement.clientWidth - 32,\n cssMaxHeight: this.ionContent().nativeElement.clientHeight - 32,\n });\n waitToFindDom(this.editorRef().nativeElement, '.tui-image-editor-canvas-container').then(() => {\n this.canvasContainerObserver.observe(this.editorRef().nativeElement.querySelector('.tui-image-editor-canvas-container'), {\n attributes: true,\n childList: false,\n subtree: true,\n });\n });\n const blob = await fetch(this.value()).then((res) => res.blob());\n await this.editorInstance.loadImageFromFile(new File([blob], 'data.png', { type: blob.type }));\n this.footerMenu.set(this.requireSquare() ? 'crop' : 'menu');\n }\n\n ionViewDidLeave() {\n this.editorInstance.destroy();\n this.canvasContainerObserver.disconnect();\n }\n\n changeCrop(crop: 'cover' | '16/9' | '1' | 'auto') {\n const rect = crop === 'cover' ? this.photoCrop().width / this.photoCrop().height : crop === '16/9' ? 16 / 9 : 1;\n this.editorInstance.setCropzoneRect(crop !== 'auto' ? rect : undefined);\n this.currentCrop.set(crop);\n }\n\n async rotate() {\n this.editorInstance.stopDrawingMode();\n await this.editorInstance.rotate(90);\n this.currentRotate.update((value) => value + 90);\n this.editorInstance.startDrawingMode('CROPPER');\n requestAnimationFrame(() => this.changeCrop(this.currentCrop()));\n }\n\n async closeCrop(type: 'cancel' | 'apply') {\n if (this.footerMenu() === 'crop') {\n if (type === 'cancel') {\n await this.editorInstance.rotate(this.currentRotate() * -1);\n } else {\n await this.editorInstance.crop(this.editorInstance.getCropzoneRect());\n this.isCropped.set(true);\n }\n this.currentRotate.set(0);\n this.currentCrop.set('cover');\n this.editorInstance.stopDrawingMode();\n } else if (this.footerMenu() === 'brightness') {\n if (type === 'cancel' && this.editorInstance.hasFilter('brightness')) {\n await this.editorInstance.removeFilter('brightness');\n }\n }\n this.footerMenu.set('menu');\n }\n\n async changeRange(event: RangeCustomEvent) {\n if (this.editorInstance.hasFilter('brightness')) {\n await this.editorInstance.removeFilter('brightness');\n }\n await this.editorInstance.applyFilter('brightness', {\n brightness: Number(event.detail.value) / 255,\n });\n }\n\n imageSave() {\n const value = this.editorInstance.toDataURL();\n this.modalCtrl.dismiss({ value } as IPhotoEditorDismiss);\n }\n\n private async initializeFilterMenu() {\n const filters: IFilter[] = [];\n\n const defaultInstance = new ImageEditor(document.createElement('div'), {\n cssMaxWidth: this.filterImageSize,\n cssMaxHeight: (this.photoCrop().height * this.filterImageSize) / this.photoCrop().width,\n });\n const blob = await fetch(\n this.editorInstance.toDataURL({\n multiplier: this.filterImageSize / this.photoCrop().width,\n }),\n ).then((res) => res.blob());\n await defaultInstance.loadImageFromFile(new File([blob], 'defaultInstance.png', { type: blob.type }));\n\n for (const filter of this.filterPreset()) {\n if (filter.type !== 'Default') {\n await defaultInstance.applyFilter(filter.type, filter.option);\n }\n filters.push({\n name: filter.name,\n type: filter.type,\n option: filter.option,\n data: defaultInstance.toDataURL(),\n width: this.filterImageSize,\n height: (this.photoCrop().height * this.filterImageSize) / this.photoCrop().width,\n });\n if (filter.type !== 'Default') {\n await defaultInstance.removeFilter(filter.type);\n }\n }\n this.filters.set(filters);\n defaultInstance.destroy();\n }\n\n async filterImage(filter: IFilter) {\n if (this.adoptFilter()) {\n await this.editorInstance.removeFilter(this.adoptFilter()!.type);\n }\n if (filter.type === 'Default') {\n this.adoptFilter.set(undefined);\n return;\n }\n await this.editorInstance.applyFilter(filter.type, filter.option);\n this.adoptFilter.set(filter);\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-buttons slot=\"start\"\n ><ion-button (click)=\"modalCtrl.dismiss()\"><ion-icon name=\"close-outline\" slot=\"icon-only\"></ion-icon></ion-button\n ></ion-buttons>\n <ion-buttons slot=\"end\">\n <ion-button color=\"photo-editor-primary\" fill=\"outline\" [disabled]=\"!['menu', 'filter'].includes(footerMenu())\" (click)=\"imageSave()\">\n {{ dictionary().save }}\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\" [scrollY]=\"false\">\n <div #imageEditor></div>\n</ion-content>\n<ion-footer>\n <ion-toolbar>\n @if (this.footerMenu() === 'menu') {\n <aside class=\"ion-justify-content-center\">\n <button (click)=\"footerMenu.set('crop')\">\n <ion-text>{{ dictionary().crop }}</ion-text>\n <ion-icon name=\"crop-outline\" size=\"large\"></ion-icon>\n </button>\n <button (click)=\"footerMenu.set('filter')\">\n <ion-text>{{ dictionary().filter }}</ion-text>\n <ion-icon name=\"color-filter-outline\" size=\"large\"></ion-icon>\n </button>\n <button (click)=\"footerMenu.set('brightness')\">\n <ion-text>{{ dictionary().brightness }}</ion-text>\n <ion-icon name=\"sunny-outline\" size=\"large\"></ion-icon>\n </button>\n </aside>\n }\n\n @if (this.footerMenu() === 'filter') {\n <aside>\n @for (item of filters(); track item) {\n <button (click)=\"filterImage(item)\">\n <ion-text>{{ item.name }}</ion-text>\n <span class=\"image-filter-box\" [style.background-image]=\"'url(' + item.data + ')'\"></span>\n </button>\n }\n </aside>\n }\n\n @if (this.footerMenu() === 'crop' && !requireSquare()) {\n <ion-buttons class=\"ion-justify-content-center submenu-icon-buttons\">\n <ion-button (click)=\"changeCrop('cover')\" [color]=\"currentCrop() === 'cover' ? 'success' : undefined\">\n <ion-icon name=\"expand-outline\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n <ion-button (click)=\"changeCrop('16/9')\" [color]=\"currentCrop() === '16/9' ? 'success' : undefined\">\n <ion-icon name=\"tablet-landscape-outline\" slot=\"icon-only\" style=\"transform: scale(1, 0.8)\"></ion-icon>\n </ion-button>\n <ion-button (click)=\"changeCrop('1')\" [color]=\"currentCrop() === '1' ? 'success' : undefined\">\n <ion-icon name=\"square-outline\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n <ion-button (click)=\"changeCrop('auto')\" [color]=\"currentCrop() === 'auto' ? 'success' : undefined\">\n <ion-icon name=\"crop-outline\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n <ion-button (click)=\"rotate()\"><ion-icon name=\"refresh-outline\" slot=\"icon-only\"></ion-icon></ion-button>\n </ion-buttons>\n }\n\n @if (['brightness'].includes(this.footerMenu())) {\n <div class=\"ion-padding ion-margin\">\n <ion-range [pin]=\"true\" [min]=\"-100\" [max]=\"100\" (ionChange)=\"changeRange($any($event))\"></ion-range>\n </div>\n }\n </ion-toolbar>\n @if (this.footerMenu() !== 'menu') {\n <ion-toolbar mode=\"md\">\n @if (this.footerMenu() === 'filter') {\n <ion-buttons class=\"ion-justify-content-center\" style=\"margin: 0 8px\">\n <ion-button fill=\"outline\" shape=\"round\" (click)=\"this.footerMenu.set('menu')\">戻る</ion-button>\n </ion-buttons>\n } @else {\n <ion-buttons slot=\"start\" style=\"min-width: 60px\">\n @if (!requireSquare() || isCropped()) {\n <ion-button (click)=\"closeCrop('cancel')\"><ion-icon name=\"close-outline\" slot=\"icon-only\"></ion-icon></ion-button>\n }</ion-buttons\n ><ion-text class=\"footer-title\">\n @if (footerMenu() === 'crop') {\n {{ dictionary().crop }}\n } @else if (footerMenu() === 'brightness') {\n {{ dictionary().brightness }}\n }</ion-text\n ><ion-buttons slot=\"end\"\n ><ion-button (click)=\"closeCrop('apply')\"\n ><ion-icon name=\"checkmark-outline\" color=\"photo-editor-success\" slot=\"icon-only\"></ion-icon></ion-button\n ></ion-buttons>\n }\n </ion-toolbar>\n }\n</ion-footer>\n","import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n inject,\n input,\n OnDestroy,\n OnInit,\n signal,\n viewChild,\n} from '@angular/core';\nimport { IonicSlides, ModalController } from '@ionic/angular/standalone';\nimport { Navigation, Zoom } from 'swiper/modules';\nimport { fromEvent, Subscription, throttleTime, withLatestFrom, zipWith } from 'rxjs';\nimport { SwiperContainer } from 'swiper/element';\nimport { ionComponents } from '../../ion-components';\nimport { IDictionaryForViewer, IPhotoViewerDismiss } from '../../types';\nimport { register } from 'swiper/element/bundle';\nimport { dictionaryForViewer } from '../../dictionaries';\nimport { BooleanInput, coerceBooleanProperty, coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport { initializeViewerIcons, waitToFindDom } from '../util';\n\n@Component({\n selector: 'app-photo-image',\n templateUrl: './photo-viewer.page.html',\n styleUrls: ['../core.scss', './photo-viewer.page.scss'],\n imports: [...ionComponents],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PhotoViewerPage implements OnInit, OnDestroy {\n readonly imageUrls = input.required<string[]>();\n readonly index = input<number, NumberInput>(0, {\n transform: coerceNumberProperty,\n });\n readonly isCircle = input<boolean, BooleanInput>(false, {\n transform: coerceBooleanProperty,\n });\n readonly enableDelete = input<boolean, BooleanInput>(false, {\n transform: coerceBooleanProperty,\n });\n readonly enableFooterSafeArea = input<boolean, BooleanInput>(false, {\n transform: coerceBooleanProperty,\n });\n readonly labels = input<Partial<IDictionaryForViewer>>();\n readonly setLabels = effect(() => {\n if (this.labels()) {\n this.dictionary.update((value) => ({ ...value, ...this.labels() }));\n }\n });\n\n readonly swiper = viewChild.required<ElementRef<SwiperContainer>>('swiper');\n protected readonly dictionary = signal<IDictionaryForViewer>(dictionaryForViewer());\n\n readonly watchSwipe$ = new Subscription();\n readonly modalCtrl = inject(ModalController);\n private readonly el = inject(ElementRef);\n\n constructor() {\n register();\n initializeViewerIcons();\n }\n\n async ngOnInit() {\n waitToFindDom(this.el.nativeElement, 'swiper-container').then(() => {\n const index = this.index();\n const swiper = this.swiper();\n Object.assign(swiper.nativeElement, {\n modules: [Navigation, Zoom, IonicSlides],\n initialSlide: index,\n slidesPerView: 1,\n pagination: {\n enabled: true,\n clickable: true,\n },\n zoom: true,\n });\n swiper.nativeElement.initialize();\n swiper.nativeElement.swiper.zoom.enable();\n\n swiper.nativeElement.swiper.activeIndex = index;\n swiper.nativeElement.swiper.update();\n });\n\n this.watchSwipe$.add(\n fromEvent<TouchEvent>(this.el.nativeElement, 'touchstart')\n .pipe(\n zipWith(\n fromEvent<TouchEvent>(this.el.nativeElement, 'touchend').pipe(\n withLatestFrom(fromEvent<TouchEvent>(this.el.nativeElement, 'touchmove')),\n ),\n ),\n throttleTime(1),\n )\n .subscribe(([touchstart, [_, touchmove]]) => {\n const touchstartClientX = touchstart.touches ? touchstart.touches[0].clientX : (touchstart as any).detail[1].clientX;\n const touchmoveClientX = touchmove.touches ? touchmove.touches[0].clientX : (touchmove as any).detail[1].clientX;\n\n const touchstartClientY = touchstart.touches ? touchstart.touches[0].clientY : (touchstart as any).detail[1].clientY;\n const touchmoveClientY = touchmove.touches ? touchmove.touches[0].clientY : (touchmove as any).detail[1].clientY;\n\n const xDiff = touchstartClientX - touchmoveClientX;\n const yDiff = touchstartClientY - touchmoveClientY;\n\n const slides = (this.swiper() as any).nativeElement.querySelectorAll('swiper-slide') as HTMLElement[];\n const isZoomed = Array.from(slides).find((slide: HTMLElement) => {\n return ['swiper-slide-zoomed', 'swiper-slide-active'].every((c) => slide.classList.contains(c));\n });\n\n const threshold = touchmove.touches ? -50 : -5;\n\n if (!isZoomed && Math.abs(xDiff) < Math.abs(threshold) && yDiff < threshold && touchstart.timeStamp <= touchmove.timeStamp) {\n this.watchSwipe$.unsubscribe();\n this.modalCtrl.dismiss();\n }\n }),\n );\n }\n\n ngOnDestroy() {\n this.watchSwipe$.unsubscribe();\n }\n\n remove() {\n this.modalCtrl.dismiss({\n delete: {\n index: this.swiper().nativeElement.swiper.activeIndex,\n value: this.imageUrls()[this.swiper().nativeElement.swiper.activeIndex],\n },\n } as IPhotoViewerDismiss);\n }\n}\n","<ion-header [translucent]=\"true\">\n <ion-toolbar>\n <ion-buttons slot=\"start\">\n <ion-button (click)=\"modalCtrl.dismiss()\" class=\"viewer-close-button\">\n <ion-icon name=\"close-outline\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-buttons>\n @if (enableDelete()) {\n <ion-buttons slot=\"end\">\n <ion-button color=\"photo-editor-danger\" fill=\"outline\" (click)=\"remove()\">{{ dictionary().delete }}</ion-button>\n </ion-buttons>\n }\n </ion-toolbar>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\">\n <swiper-container #swiper>\n @for (url of imageUrls(); track url) {\n <swiper-slide>\n <div class=\"swiper-zoom-container\"><img [src]=\"url\" alt=\"\" [class.circle]=\"isCircle()\" /></div>\n </swiper-slide>\n }\n </swiper-container>\n</ion-content>\n\n@if (enableFooterSafeArea()) {\n <!-- use for safe area-->\n <ion-footer>\n <ion-toolbar style=\"--border-width: 0; --min-height: 0\"></ion-toolbar>\n </ion-footer>\n}\n","export enum PhotoEditorErrors {\n initialize = 'input dom is not found',\n cancel = 'user canceled',\n type = 'upload file is not image.',\n}\n","import { inject, Injectable, signal } from '@angular/core';\nimport { ActionSheetController, Platform } from '@ionic/angular/standalone';\nimport { Camera, CameraResultType, CameraSource, ImageOptions } from '@capacitor/camera';\nimport ImageEditor from 'tui-image-editor';\nimport { PhotoEditorErrors } from '../photoEditorErrors';\nimport { dictionaryForService } from '../dictionaries';\nimport { IDictionaryForService } from '../types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PhotoFileService {\n private readonly $photoMaxSize = signal<number>(1000);\n private readonly actionSheetCtrl = inject(ActionSheetController);\n private readonly platform = inject(Platform);\n private readonly dictionary = signal<IDictionaryForService>(dictionaryForService());\n\n set photoMaxSize(value: number) {\n this.$photoMaxSize.set(value);\n }\n\n set labels(d: IDictionaryForService) {\n this.dictionary.update((value) => ({ ...value, ...d }));\n }\n\n async loadPhoto(limit: number): Promise<string[]> {\n /**\n * Using Input for browser\n */\n if (!this.platform.is('capacitor')) {\n return this.getPictureFromBrowser();\n }\n\n const actionSheet = await this.actionSheetCtrl.create({\n buttons: [\n {\n text: this.dictionary().camera,\n handler: () => {\n actionSheet.dismiss('camera');\n },\n },\n {\n text: this.dictionary().album,\n handler: () => {\n actionSheet.dismiss('album');\n },\n },\n {\n text: this.dictionary().cancel,\n role: 'cancel',\n },\n ],\n });\n await actionSheet.present();\n const { data } = await actionSheet.onDidDismiss<'camera' | 'album'>();\n if (!data) {\n return Promise.reject(PhotoEditorErrors.cancel);\n }\n\n if (data === 'camera') {\n const defaultCamera: ImageOptions = {\n quality: 100,\n width: this.$photoMaxSize(),\n allowEditing: false,\n resultType: CameraResultType.DataUrl,\n source: CameraSource.Camera,\n presentationStyle: 'popover',\n };\n const image = await Camera.getPhoto(defaultCamera).catch(() => undefined);\n if (!image?.dataUrl) {\n return Promise.reject(PhotoEditorErrors.cancel);\n }\n\n if (!image.dataUrl.includes('capacitor://localhost')) {\n return [image.dataUrl];\n }\n return Promise.all([image.dataUrl].map(async (image) => await this.loadPhotoFromFilePath(image)));\n }\n\n if (data === 'album') {\n const images = await Camera.pickImages({\n quality: 100,\n width: this.$photoMaxSize(),\n limit,\n presentationStyle: 'popover',\n }).catch(() => undefined);\n\n if (!images) {\n return Promise.reject(PhotoEditorErrors.cancel);\n }\n\n return Promise.all(images.photos.map(async (image) => await this.loadPhotoFromFilePath(image.webPath)));\n }\n\n // Not run on this line. This is for lint\n return [];\n }\n\n private getPictureFromBrowser(): Promise<string[]> {\n const inputFile: HTMLInputElement | null = document.querySelector('input#browserPhotoUploader');\n\n if (!inputFile) {\n return Promise.reject(PhotoEditorErrors.initialize);\n }\n\n return new Promise((resolve, reject) => {\n const cancelMethod = () => {\n inputFile!.removeEventListener('cancel', cancelMethod, false);\n inputFile!.removeEventListener('change', changeMethod, false);\n\n reject(PhotoEditorErrors.cancel);\n };\n const changeMethod = (e: Event) => {\n inputFile!.removeEventListener('cancel', cancelMethod, false);\n inputFile!.removeEventListener('change', changeMethod, false);\n\n if (!(e.target as HTMLInputElement).files || !(e.target as HTMLInputElement).files![0]) {\n reject(PhotoEditorErrors.cancel);\n }\n const file = (e.target as HTMLInputElement).files![0];\n const reader = new FileReader();\n\n reader.onload = (() => {\n if (file.type.indexOf('image') < 0) {\n reject(PhotoEditorErrors.type);\n }\n\n return async (event) => {\n inputFile.value = '';\n const result = event.target!.result as string;\n const data = await this.loadPhotoFromFilePath(result);\n resolve([data]);\n };\n })();\n\n reader.readAsDataURL(file);\n };\n\n inputFile!.addEventListener('cancel', cancelMethod, false);\n inputFile!.addEventListener('change', changeMethod, false);\n inputFile.click();\n });\n }\n\n private async loadPhotoFromFilePath(filePath: string): Promise<string> {\n const defaultInstance = new ImageEditor(document.createElement('div'), {\n cssMaxWidth: this.$photoMaxSize(),\n cssMaxHeight: this.$photoMaxSize(),\n });\n const blob = await fetch(filePath).then((res) => res.blob());\n const loaded = await defaultInstance.loadImageFromFile(new File([blob], 'data.png', { type: blob.type }));\n\n const maxSize = Math.max(loaded.newWidth, loaded.newHeight);\n const dataUrl = defaultInstance.toDataURL({\n multiplier: this.$photoMaxSize() / maxSize,\n });\n defaultInstance.destroy();\n\n return dataUrl;\n }\n}\n","/*\n * Public API Surface of photo-editor\n */\n\nexport * from './lib/pages/photo-editor/photo-editor.page';\nexport * from './lib/pages/photo-viewer/photo-viewer.page';\nexport * from './lib/services/photo-file.service';\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEO,MAAM,YAAY,GAAG,CAAC,UAAgC,KAAsB;AACjF,IAAA;QACE,IAAI,EAAE,UAAU,CAAC,QAAQ;AACzB,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,MAAM,EAAE,IAAI;AACb,KAAA;;;;;;AAMD,IAAA;QACE,IAAI,EAAE,UAAU,CAAC,KAAK;AACtB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,MAAM,EAAE,IAAI;AACb,KAAA;AACD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AA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACVD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import * as _rdlabo_ionic_angular_photo_editor from '@rdlabo/ionic-angular-photo-editor';
|
|
2
|
-
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { OnInit, OnDestroy, ElementRef } from '@angular/core';
|
|
4
|
-
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
5
|
-
import { ViewDidEnter, ViewDidLeave, ModalController, RangeCustomEvent } from '@ionic/angular/standalone';
|
|
6
|
-
import { Subscription } from 'rxjs';
|
|
7
|
-
import { SwiperContainer } from 'swiper/element';
|
|
8
|
-
|
|
9
|
-
interface IFilter {
|
|
10
|
-
name: string;
|
|
11
|
-
type: string;
|
|
12
|
-
option: any;
|
|
13
|
-
data: string;
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
}
|
|
17
|
-
interface ISize {
|
|
18
|
-
width: number;
|
|
19
|
-
height: number;
|
|
20
|
-
}
|
|
21
|
-
interface IDictionaryForEditor {
|
|
22
|
-
save: string;
|
|
23
|
-
crop: string;
|
|
24
|
-
filter: string;
|
|
25
|
-
brightness: string;
|
|
26
|
-
original: string;
|
|
27
|
-
invert: string;
|
|
28
|
-
sepia: string;
|
|
29
|
-
vintage: string;
|
|
30
|
-
blur: string;
|
|
31
|
-
grayscale: string;
|
|
32
|
-
sharpen: string;
|
|
33
|
-
emboss: string;
|
|
34
|
-
}
|
|
35
|
-
interface IFilterPreset {
|
|
36
|
-
name: string;
|
|
37
|
-
type: string;
|
|
38
|
-
option: any;
|
|
39
|
-
}
|
|
40
|
-
interface IPhotoEditorDismiss {
|
|
41
|
-
value: string;
|
|
42
|
-
}
|
|
43
|
-
interface IPhotoViewerDismiss {
|
|
44
|
-
delete: {
|
|
45
|
-
index: number;
|
|
46
|
-
value: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
interface IDictionaryForViewer {
|
|
50
|
-
delete: string;
|
|
51
|
-
}
|
|
52
|
-
interface IDictionaryForService {
|
|
53
|
-
camera: string;
|
|
54
|
-
album: string;
|
|
55
|
-
cancel: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
declare class PhotoEditorPage implements OnInit, OnDestroy, ViewDidEnter, ViewDidLeave {
|
|
59
|
-
readonly modalCtrl: ModalController;
|
|
60
|
-
protected readonly dictionary: _angular_core.WritableSignal<IDictionaryForEditor>;
|
|
61
|
-
readonly requireSquare: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
62
|
-
readonly labels: _angular_core.InputSignal<Partial<IDictionaryForEditor> | undefined>;
|
|
63
|
-
readonly setLabels: _angular_core.EffectRef;
|
|
64
|
-
readonly value: _angular_core.InputSignal<string>;
|
|
65
|
-
readonly editorRef: _angular_core.Signal<ElementRef<any>>;
|
|
66
|
-
readonly ionContent: _angular_core.Signal<ElementRef<any>>;
|
|
67
|
-
readonly filters: _angular_core.WritableSignal<IFilter[]>;
|
|
68
|
-
readonly footerMenu: _angular_core.WritableSignal<"menu" | "filter" | "crop" | "brightness">;
|
|
69
|
-
readonly currentCrop: _angular_core.WritableSignal<"1" | "cover" | "16/9" | "auto">;
|
|
70
|
-
readonly currentRotate: _angular_core.WritableSignal<number>;
|
|
71
|
-
readonly photoCrop: _angular_core.WritableSignal<ISize>;
|
|
72
|
-
readonly isCropped: _angular_core.WritableSignal<boolean>;
|
|
73
|
-
private readonly adoptFilter;
|
|
74
|
-
protected readonly filterPreset: _angular_core.Signal<_rdlabo_ionic_angular_photo_editor.IFilterPreset[]>;
|
|
75
|
-
private readonly footerMenu$;
|
|
76
|
-
private readonly initSubscription$;
|
|
77
|
-
private readonly filterImageSize;
|
|
78
|
-
private editorInstance;
|
|
79
|
-
private canvasContainerObserver;
|
|
80
|
-
constructor();
|
|
81
|
-
ngOnInit(): void;
|
|
82
|
-
ngOnDestroy(): void;
|
|
83
|
-
ionViewDidEnter(): Promise<void>;
|
|
84
|
-
ionViewDidLeave(): void;
|
|
85
|
-
changeCrop(crop: 'cover' | '16/9' | '1' | 'auto'): void;
|
|
86
|
-
rotate(): Promise<void>;
|
|
87
|
-
closeCrop(type: 'cancel' | 'apply'): Promise<void>;
|
|
88
|
-
changeRange(event: RangeCustomEvent): Promise<void>;
|
|
89
|
-
imageSave(): void;
|
|
90
|
-
private initializeFilterMenu;
|
|
91
|
-
filterImage(filter: IFilter): Promise<void>;
|
|
92
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PhotoEditorPage, never>;
|
|
93
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PhotoEditorPage, "app-editor-image", never, { "requireSquare": { "alias": "requireSquare"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
declare class PhotoViewerPage implements OnInit, OnDestroy {
|
|
97
|
-
readonly imageUrls: _angular_core.InputSignal<string[]>;
|
|
98
|
-
readonly index: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
99
|
-
readonly isCircle: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
100
|
-
readonly enableDelete: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
101
|
-
readonly enableFooterSafeArea: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
102
|
-
readonly labels: _angular_core.InputSignal<Partial<IDictionaryForViewer> | undefined>;
|
|
103
|
-
readonly setLabels: _angular_core.EffectRef;
|
|
104
|
-
readonly swiper: _angular_core.Signal<ElementRef<SwiperContainer>>;
|
|
105
|
-
protected readonly dictionary: _angular_core.WritableSignal<IDictionaryForViewer>;
|
|
106
|
-
readonly watchSwipe$: Subscription;
|
|
107
|
-
readonly modalCtrl: ModalController;
|
|
108
|
-
private readonly el;
|
|
109
|
-
constructor();
|
|
110
|
-
ngOnInit(): Promise<void>;
|
|
111
|
-
ngOnDestroy(): void;
|
|
112
|
-
remove(): void;
|
|
113
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PhotoViewerPage, never>;
|
|
114
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PhotoViewerPage, "app-photo-image", never, { "imageUrls": { "alias": "imageUrls"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "isCircle": { "alias": "isCircle"; "required": false; "isSignal": true; }; "enableDelete": { "alias": "enableDelete"; "required": false; "isSignal": true; }; "enableFooterSafeArea": { "alias": "enableFooterSafeArea"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
declare class PhotoFileService {
|
|
118
|
-
private readonly $photoMaxSize;
|
|
119
|
-
private readonly actionSheetCtrl;
|
|
120
|
-
private readonly platform;
|
|
121
|
-
private readonly dictionary;
|
|
122
|
-
set photoMaxSize(value: number);
|
|
123
|
-
set labels(d: IDictionaryForService);
|
|
124
|
-
loadPhoto(limit: number): Promise<string[]>;
|
|
125
|
-
private getPictureFromBrowser;
|
|
126
|
-
private loadPhotoFromFilePath;
|
|
127
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PhotoFileService, never>;
|
|
128
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PhotoFileService>;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export { PhotoEditorPage, PhotoFileService, PhotoViewerPage };
|
|
132
|
-
export type { IDictionaryForEditor, IDictionaryForService, IDictionaryForViewer, IFilter, IFilterPreset, IPhotoEditorDismiss, IPhotoViewerDismiss, ISize };
|