@sam-senior/photo 1.2.8 → 2.0.0
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/esm2022/lib/photo.component.mjs +233 -0
- package/esm2022/lib/photo.model.mjs +2 -0
- package/esm2022/lib/photo.module.mjs +57 -0
- package/esm2022/public_api.mjs +7 -0
- package/esm2022/sam-senior-photo.mjs +5 -0
- package/fesm2022/sam-senior-photo.mjs +296 -0
- package/fesm2022/sam-senior-photo.mjs.map +1 -0
- package/{sam-senior-photo.d.ts → index.d.ts} +5 -4
- package/lib/photo.component.d.ts +62 -59
- package/lib/photo.model.d.ts +4 -4
- package/lib/photo.module.d.ts +17 -2
- package/package.json +26 -30
- package/public_api.d.ts +3 -3
- package/bundles/sam-senior-photo.umd.js +0 -435
- package/bundles/sam-senior-photo.umd.js.map +0 -1
- package/bundles/sam-senior-photo.umd.min.js +0 -2
- package/bundles/sam-senior-photo.umd.min.js.map +0 -1
- package/esm2015/lib/photo.component.js +0 -374
- package/esm2015/lib/photo.model.js +0 -15
- package/esm2015/lib/photo.module.js +0 -33
- package/esm2015/public_api.js +0 -11
- package/esm2015/sam-senior-photo.js +0 -9
- package/esm5/lib/photo.component.js +0 -441
- package/esm5/lib/photo.model.js +0 -15
- package/esm5/lib/photo.module.js +0 -37
- package/esm5/public_api.js +0 -11
- package/esm5/sam-senior-photo.js +0 -9
- package/fesm2015/sam-senior-photo.js +0 -338
- package/fesm2015/sam-senior-photo.js.map +0 -1
- package/fesm5/sam-senior-photo.js +0 -407
- package/fesm5/sam-senior-photo.js.map +0 -1
- package/sam-senior-photo.metadata.json +0 -1
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ViewEncapsulation, ViewChild, Input, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import * as i1 from '@seniorsistemas/angular-components/image-cropper';
|
|
5
|
+
import { ImageCropperModule, ImageCropperService } from '@seniorsistemas/angular-components/image-cropper';
|
|
6
|
+
import * as i2 from '@sam-senior/photo-capture';
|
|
7
|
+
import { PhotoCaptureModule } from '@sam-senior/photo-capture';
|
|
8
|
+
import * as i3 from 'primeng/api';
|
|
9
|
+
import * as i4 from 'primeng/dialog';
|
|
10
|
+
import { DialogModule } from 'primeng/dialog';
|
|
11
|
+
import * as i5 from '@seniorsistemas/angular-components/thumbnail';
|
|
12
|
+
import * as i6 from '@seniorsistemas/angular-components/button';
|
|
13
|
+
import { ButtonModule } from '@seniorsistemas/angular-components/button';
|
|
14
|
+
import * as i7 from '@seniorsistemas/angular-components/tile';
|
|
15
|
+
import { TileModule } from '@seniorsistemas/angular-components/tile';
|
|
16
|
+
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
17
|
+
import { PanelModule } from 'primeng/panel';
|
|
18
|
+
import { StepsModule } from '@seniorsistemas/angular-components/steps';
|
|
19
|
+
import { ObjectCardModule } from '@seniorsistemas/angular-components/object-card';
|
|
20
|
+
import { LoadingStateModule } from '@seniorsistemas/angular-components/loading-state';
|
|
21
|
+
|
|
22
|
+
class PhotoComponent {
|
|
23
|
+
imageCropperService;
|
|
24
|
+
photoCaptureService;
|
|
25
|
+
imageInput;
|
|
26
|
+
key = 'key';
|
|
27
|
+
photo;
|
|
28
|
+
actionIconClass = 'fa fa-camera';
|
|
29
|
+
photoSize = 'medium';
|
|
30
|
+
maxPhotoSize = 1;
|
|
31
|
+
photoWidth = 670;
|
|
32
|
+
photoHeight = 400;
|
|
33
|
+
canPhotoUpload = true;
|
|
34
|
+
canPhotoCapture = true;
|
|
35
|
+
cropperTitle = `Recortar`;
|
|
36
|
+
cropperActionCancel = `Cancelar`;
|
|
37
|
+
cropperActionCrop = `Recortar`;
|
|
38
|
+
cameraDialogLabel = `Captura`;
|
|
39
|
+
cameraDialogCaptureLabel = `Capturar`;
|
|
40
|
+
selectPhotoTypeLabel = `Selecionar imagem`;
|
|
41
|
+
selectUploadTypeLabel = `Upload`;
|
|
42
|
+
selectUploadTypeDescription = `Selecione uma imagem do seu computador`;
|
|
43
|
+
selectCaptureTypeLabel = `Capturar`;
|
|
44
|
+
selectCaptureTypeLabelDescription = `Capture uma imagem do seu dispositivo`;
|
|
45
|
+
dialogCancelLabel = `Cancelar`;
|
|
46
|
+
photoCrop = new EventEmitter();
|
|
47
|
+
openCamera = new EventEmitter();
|
|
48
|
+
closeCamera = new EventEmitter();
|
|
49
|
+
cameraError = new EventEmitter();
|
|
50
|
+
invalidPhotoSize = new EventEmitter();
|
|
51
|
+
isLoading = new EventEmitter();
|
|
52
|
+
photoContent;
|
|
53
|
+
cameraDialog = false;
|
|
54
|
+
selectPhotoType = false;
|
|
55
|
+
onChange = (_) => { };
|
|
56
|
+
onTouched = () => { };
|
|
57
|
+
constructor(imageCropperService, photoCaptureService) {
|
|
58
|
+
this.imageCropperService = imageCropperService;
|
|
59
|
+
this.photoCaptureService = photoCaptureService;
|
|
60
|
+
}
|
|
61
|
+
changePhoto() {
|
|
62
|
+
if (this.canPhotoCapture && this.canPhotoUpload) {
|
|
63
|
+
this.selectPhotoType = true;
|
|
64
|
+
}
|
|
65
|
+
else if (this.canPhotoCapture) {
|
|
66
|
+
this.onOpenCamera();
|
|
67
|
+
}
|
|
68
|
+
else if (this.canPhotoUpload) {
|
|
69
|
+
this.onOpenUpload();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
registerOnChange(fn) {
|
|
73
|
+
this.onChange = fn;
|
|
74
|
+
}
|
|
75
|
+
registerOnTouched(fn) {
|
|
76
|
+
this.onTouched = fn;
|
|
77
|
+
}
|
|
78
|
+
writeValue(value) {
|
|
79
|
+
this.photo = value;
|
|
80
|
+
}
|
|
81
|
+
onOpenCamera() {
|
|
82
|
+
this.closeSelectPhotoType();
|
|
83
|
+
this.cameraDialog = true;
|
|
84
|
+
this.photoCaptureService.setKey(this.key);
|
|
85
|
+
this.photoCaptureService.start();
|
|
86
|
+
this.openCamera.emit();
|
|
87
|
+
}
|
|
88
|
+
closeSelectPhotoType() {
|
|
89
|
+
this.selectPhotoType = false;
|
|
90
|
+
}
|
|
91
|
+
onOpenUpload() {
|
|
92
|
+
this.closeSelectPhotoType();
|
|
93
|
+
this.imageInput.nativeElement.value = null;
|
|
94
|
+
this.imageInput.nativeElement.click();
|
|
95
|
+
}
|
|
96
|
+
photoSelected(event) {
|
|
97
|
+
const [file] = event.srcElement.files;
|
|
98
|
+
this.photoRender(file);
|
|
99
|
+
}
|
|
100
|
+
onCloseCamera() {
|
|
101
|
+
this.cameraDialog = false;
|
|
102
|
+
this.photoCaptureService.stop();
|
|
103
|
+
this.closeCamera.emit();
|
|
104
|
+
}
|
|
105
|
+
onPhotoCapture() {
|
|
106
|
+
this.isLoading.emit(true);
|
|
107
|
+
this.photoCaptureService.setKey(this.key);
|
|
108
|
+
this.photoCaptureService.takePhoto();
|
|
109
|
+
}
|
|
110
|
+
onPhotoTake(photo) {
|
|
111
|
+
if (this.photoCaptureService.getKey() === this.key) {
|
|
112
|
+
this.photoRender(photo.blob);
|
|
113
|
+
this.onCloseCamera();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
onCameraError(error) {
|
|
117
|
+
if (this.photoCaptureService.getKey() === this.key) {
|
|
118
|
+
this.onCloseCamera();
|
|
119
|
+
this.cameraError.emit(error);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
photoRender(file) {
|
|
123
|
+
if (file) {
|
|
124
|
+
const fileReader = new FileReader();
|
|
125
|
+
fileReader.onloadend =
|
|
126
|
+
photoRender => this.photoChopper(photoRender);
|
|
127
|
+
fileReader.readAsDataURL(file);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
photoChopper(photoRender) {
|
|
131
|
+
this.imageCropperService.show({
|
|
132
|
+
imageSource: photoRender.target.result,
|
|
133
|
+
croppedCanvas: imageCanvas => {
|
|
134
|
+
imageCanvas.toBlob(blob => {
|
|
135
|
+
this.setPhotoContent(imageCanvas.toDataURL(), blob);
|
|
136
|
+
this.onCreateBlob();
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
header: this.cropperTitle,
|
|
140
|
+
emptyStateActionLabel: this.cropperActionCancel,
|
|
141
|
+
allowSelectAnother: false,
|
|
142
|
+
allowRemove: false,
|
|
143
|
+
cropLabel: this.cropperActionCrop,
|
|
144
|
+
rounded: true,
|
|
145
|
+
aspectRatio: 3 / 4
|
|
146
|
+
});
|
|
147
|
+
this.isLoading.emit(false);
|
|
148
|
+
}
|
|
149
|
+
onCreateBlob() {
|
|
150
|
+
if (this.getMaxSizeInBites() > this.photoContent.blob.size) {
|
|
151
|
+
this.photoCrop.emit(this.photoContent);
|
|
152
|
+
this.photo = this.photoContent.image;
|
|
153
|
+
this.onChange(this.photo);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
this.invalidPhotoSize.emit();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
getMaxSizeInBites() {
|
|
160
|
+
return (this.maxPhotoSize * 1000) * 1000;
|
|
161
|
+
}
|
|
162
|
+
setPhotoContent(imageUri, imageBlob) {
|
|
163
|
+
this.photoContent = {
|
|
164
|
+
image: imageUri,
|
|
165
|
+
blob: imageBlob
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PhotoComponent, deps: [{ token: i1.ImageCropperService }, { token: i2.PhotoCaptureService }], target: i0.ɵɵFactoryTarget.Component });
|
|
169
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: PhotoComponent, selector: "sam-photo", inputs: { key: "key", photo: "photo", actionIconClass: "actionIconClass", photoSize: "photoSize", maxPhotoSize: "maxPhotoSize", photoWidth: "photoWidth", photoHeight: "photoHeight", canPhotoUpload: "canPhotoUpload", canPhotoCapture: "canPhotoCapture", cropperTitle: "cropperTitle", cropperActionCancel: "cropperActionCancel", cropperActionCrop: "cropperActionCrop", cameraDialogLabel: "cameraDialogLabel", cameraDialogCaptureLabel: "cameraDialogCaptureLabel", selectPhotoTypeLabel: "selectPhotoTypeLabel", selectUploadTypeLabel: "selectUploadTypeLabel", selectUploadTypeDescription: "selectUploadTypeDescription", selectCaptureTypeLabel: "selectCaptureTypeLabel", selectCaptureTypeLabelDescription: "selectCaptureTypeLabelDescription", dialogCancelLabel: "dialogCancelLabel" }, outputs: { photoCrop: "photoCrop", openCamera: "openCamera", closeCamera: "closeCamera", cameraError: "cameraError", invalidPhotoSize: "invalidPhotoSize", isLoading: "isLoading" }, providers: [
|
|
170
|
+
{
|
|
171
|
+
provide: NG_VALUE_ACCESSOR,
|
|
172
|
+
useExisting: PhotoComponent,
|
|
173
|
+
multi: true
|
|
174
|
+
}
|
|
175
|
+
], viewQueries: [{ propertyName: "imageInput", first: true, predicate: ["imageInput"], descendants: true }], ngImport: i0, template: "<input #imageInput type=\"file\" class=\"photo__input-file--hidden\" (change)=\"photoSelected($event)\" accept=\"image/*\">\r\n<s-thumbnail [size]=\"photoSize\" iconClass=\"fa fa-user\" (click)=\"changePhoto()\"\r\n [hasAction]=\"canPhotoUpload || canPhotoCapture\" [imageSource]=\"photo\" [actionIconClass]=\"actionIconClass\">\r\n</s-thumbnail>\r\n\r\n<p-dialog styleClass=\"photo-capture-custom\" [(visible)]=\"cameraDialog\" [header]=\"cameraDialogLabel\"\r\n [style]=\"{width: '700px'}\" appendTo='body' [modal]=\"true\">\r\n <sam-photo-capture [width]=\"photoWidth\" [height]=\"photoHeight\" (photoTake)=\"onPhotoTake($event)\"\r\n (error)=\"onCameraError($event)\"></sam-photo-capture>\r\n <p-footer>\r\n <s-button id=\"takePhotoBtn\" priority=\"primary\" [label]=\"cameraDialogCaptureLabel\" (click)=\"onPhotoCapture()\">\r\n </s-button>\r\n <s-button id=\"cancelBtn\" priority=\"link\" [label]=\"dialogCancelLabel\" (click)=\"onCloseCamera()\"></s-button>\r\n </p-footer>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"selectPhotoType\" [header]=\"selectPhotoTypeLabel\" [style]=\"{width: '400px'}\" appendTo='body' [modal]=\"true\"\r\n [closable]=\"false\">\r\n <s-tile [label]=\"selectUploadTypeLabel\" [description]=\"selectUploadTypeDescription\" iconClass=\"fa fa-upload\"\r\n (click)=\"onOpenUpload()\"></s-tile>\r\n <br>\r\n <s-tile [label]=\"selectCaptureTypeLabel\" [description]=\"selectCaptureTypeLabelDescription\" iconClass=\"fa fa-camera\"\r\n (click)=\"onOpenCamera()\"></s-tile>\r\n <p-footer>\r\n <s-button id=\"cancelBtn\" priority=\"link\" [label]=\"dialogCancelLabel\" (click)=\"closeSelectPhotoType()\"></s-button>\r\n </p-footer>\r\n</p-dialog>\r\n", styles: [".photo__input-file--hidden{position:fixed;top:-100em}.select-photo-type-container{display:flex;flex-direction:row;align-items:center;justify-content:center}.select-photo-type-item{color:gray;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center}.select-photo-type-item:nth-child(1){border-right:solid 1px #cccccc}.select-photo-type-item i{font-size:80px;margin-left:40px;margin-right:40px}.select-photo-type-item span{margin-top:10px}\n"], dependencies: [{ kind: "component", type: i3.Footer, selector: "p-footer" }, { kind: "component", type: i4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i5.ThumbnailComponent, selector: "s-thumbnail", inputs: ["id", "size", "imageSource", "imageFallback", "imageAlt", "iconClass", "hasAction", "actionIconClass", "isTile", "isBrand"] }, { kind: "component", type: i2.PhotoCaptureComponent, selector: "sam-photo-capture", inputs: ["width", "height"], outputs: ["error", "open", "photoTake"] }, { kind: "component", type: i6.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: i7.TileComponent, selector: "s-tile", inputs: ["id", "label", "description", "iconClass", "imageSource", "imageAlt", "disabled", "tabIndex", "thumbnail"], outputs: ["clicked"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
176
|
+
}
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PhotoComponent, decorators: [{
|
|
178
|
+
type: Component,
|
|
179
|
+
args: [{ selector: 'sam-photo', providers: [
|
|
180
|
+
{
|
|
181
|
+
provide: NG_VALUE_ACCESSOR,
|
|
182
|
+
useExisting: PhotoComponent,
|
|
183
|
+
multi: true
|
|
184
|
+
}
|
|
185
|
+
], encapsulation: ViewEncapsulation.None, template: "<input #imageInput type=\"file\" class=\"photo__input-file--hidden\" (change)=\"photoSelected($event)\" accept=\"image/*\">\r\n<s-thumbnail [size]=\"photoSize\" iconClass=\"fa fa-user\" (click)=\"changePhoto()\"\r\n [hasAction]=\"canPhotoUpload || canPhotoCapture\" [imageSource]=\"photo\" [actionIconClass]=\"actionIconClass\">\r\n</s-thumbnail>\r\n\r\n<p-dialog styleClass=\"photo-capture-custom\" [(visible)]=\"cameraDialog\" [header]=\"cameraDialogLabel\"\r\n [style]=\"{width: '700px'}\" appendTo='body' [modal]=\"true\">\r\n <sam-photo-capture [width]=\"photoWidth\" [height]=\"photoHeight\" (photoTake)=\"onPhotoTake($event)\"\r\n (error)=\"onCameraError($event)\"></sam-photo-capture>\r\n <p-footer>\r\n <s-button id=\"takePhotoBtn\" priority=\"primary\" [label]=\"cameraDialogCaptureLabel\" (click)=\"onPhotoCapture()\">\r\n </s-button>\r\n <s-button id=\"cancelBtn\" priority=\"link\" [label]=\"dialogCancelLabel\" (click)=\"onCloseCamera()\"></s-button>\r\n </p-footer>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"selectPhotoType\" [header]=\"selectPhotoTypeLabel\" [style]=\"{width: '400px'}\" appendTo='body' [modal]=\"true\"\r\n [closable]=\"false\">\r\n <s-tile [label]=\"selectUploadTypeLabel\" [description]=\"selectUploadTypeDescription\" iconClass=\"fa fa-upload\"\r\n (click)=\"onOpenUpload()\"></s-tile>\r\n <br>\r\n <s-tile [label]=\"selectCaptureTypeLabel\" [description]=\"selectCaptureTypeLabelDescription\" iconClass=\"fa fa-camera\"\r\n (click)=\"onOpenCamera()\"></s-tile>\r\n <p-footer>\r\n <s-button id=\"cancelBtn\" priority=\"link\" [label]=\"dialogCancelLabel\" (click)=\"closeSelectPhotoType()\"></s-button>\r\n </p-footer>\r\n</p-dialog>\r\n", styles: [".photo__input-file--hidden{position:fixed;top:-100em}.select-photo-type-container{display:flex;flex-direction:row;align-items:center;justify-content:center}.select-photo-type-item{color:gray;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center}.select-photo-type-item:nth-child(1){border-right:solid 1px #cccccc}.select-photo-type-item i{font-size:80px;margin-left:40px;margin-right:40px}.select-photo-type-item span{margin-top:10px}\n"] }]
|
|
186
|
+
}], ctorParameters: () => [{ type: i1.ImageCropperService }, { type: i2.PhotoCaptureService }], propDecorators: { imageInput: [{
|
|
187
|
+
type: ViewChild,
|
|
188
|
+
args: [`imageInput`]
|
|
189
|
+
}], key: [{
|
|
190
|
+
type: Input
|
|
191
|
+
}], photo: [{
|
|
192
|
+
type: Input
|
|
193
|
+
}], actionIconClass: [{
|
|
194
|
+
type: Input
|
|
195
|
+
}], photoSize: [{
|
|
196
|
+
type: Input
|
|
197
|
+
}], maxPhotoSize: [{
|
|
198
|
+
type: Input
|
|
199
|
+
}], photoWidth: [{
|
|
200
|
+
type: Input
|
|
201
|
+
}], photoHeight: [{
|
|
202
|
+
type: Input
|
|
203
|
+
}], canPhotoUpload: [{
|
|
204
|
+
type: Input
|
|
205
|
+
}], canPhotoCapture: [{
|
|
206
|
+
type: Input
|
|
207
|
+
}], cropperTitle: [{
|
|
208
|
+
type: Input
|
|
209
|
+
}], cropperActionCancel: [{
|
|
210
|
+
type: Input
|
|
211
|
+
}], cropperActionCrop: [{
|
|
212
|
+
type: Input
|
|
213
|
+
}], cameraDialogLabel: [{
|
|
214
|
+
type: Input
|
|
215
|
+
}], cameraDialogCaptureLabel: [{
|
|
216
|
+
type: Input
|
|
217
|
+
}], selectPhotoTypeLabel: [{
|
|
218
|
+
type: Input
|
|
219
|
+
}], selectUploadTypeLabel: [{
|
|
220
|
+
type: Input
|
|
221
|
+
}], selectUploadTypeDescription: [{
|
|
222
|
+
type: Input
|
|
223
|
+
}], selectCaptureTypeLabel: [{
|
|
224
|
+
type: Input
|
|
225
|
+
}], selectCaptureTypeLabelDescription: [{
|
|
226
|
+
type: Input
|
|
227
|
+
}], dialogCancelLabel: [{
|
|
228
|
+
type: Input
|
|
229
|
+
}], photoCrop: [{
|
|
230
|
+
type: Output
|
|
231
|
+
}], openCamera: [{
|
|
232
|
+
type: Output
|
|
233
|
+
}], closeCamera: [{
|
|
234
|
+
type: Output
|
|
235
|
+
}], cameraError: [{
|
|
236
|
+
type: Output
|
|
237
|
+
}], invalidPhotoSize: [{
|
|
238
|
+
type: Output
|
|
239
|
+
}], isLoading: [{
|
|
240
|
+
type: Output
|
|
241
|
+
}] } });
|
|
242
|
+
|
|
243
|
+
class PhotoModule {
|
|
244
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PhotoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
245
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: PhotoModule, declarations: [PhotoComponent], imports: [PanelModule,
|
|
246
|
+
DialogModule,
|
|
247
|
+
StepsModule,
|
|
248
|
+
ObjectCardModule,
|
|
249
|
+
ImageCropperModule,
|
|
250
|
+
ConfirmDialogModule,
|
|
251
|
+
PhotoCaptureModule,
|
|
252
|
+
ButtonModule,
|
|
253
|
+
TileModule,
|
|
254
|
+
LoadingStateModule], exports: [PhotoComponent] });
|
|
255
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PhotoModule, providers: [ImageCropperService], imports: [PanelModule,
|
|
256
|
+
DialogModule,
|
|
257
|
+
StepsModule,
|
|
258
|
+
ObjectCardModule,
|
|
259
|
+
ImageCropperModule,
|
|
260
|
+
ConfirmDialogModule,
|
|
261
|
+
PhotoCaptureModule,
|
|
262
|
+
ButtonModule,
|
|
263
|
+
TileModule,
|
|
264
|
+
LoadingStateModule] });
|
|
265
|
+
}
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PhotoModule, decorators: [{
|
|
267
|
+
type: NgModule,
|
|
268
|
+
args: [{
|
|
269
|
+
declarations: [PhotoComponent],
|
|
270
|
+
imports: [
|
|
271
|
+
PanelModule,
|
|
272
|
+
DialogModule,
|
|
273
|
+
StepsModule,
|
|
274
|
+
ObjectCardModule,
|
|
275
|
+
ImageCropperModule,
|
|
276
|
+
ConfirmDialogModule,
|
|
277
|
+
PhotoCaptureModule,
|
|
278
|
+
ButtonModule,
|
|
279
|
+
TileModule,
|
|
280
|
+
LoadingStateModule
|
|
281
|
+
],
|
|
282
|
+
providers: [ImageCropperService],
|
|
283
|
+
exports: [PhotoComponent]
|
|
284
|
+
}]
|
|
285
|
+
}] });
|
|
286
|
+
|
|
287
|
+
/*
|
|
288
|
+
* Public API Surface of photo
|
|
289
|
+
*/
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Generated bundle index. Do not edit.
|
|
293
|
+
*/
|
|
294
|
+
|
|
295
|
+
export { PhotoComponent, PhotoModule };
|
|
296
|
+
//# sourceMappingURL=sam-senior-photo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sam-senior-photo.mjs","sources":["../../../projects/sam-photo/src/lib/photo.component.ts","../../../projects/sam-photo/src/lib/photo.component.html","../../../projects/sam-photo/src/lib/photo.module.ts","../../../projects/sam-photo/src/public_api.ts","../../../projects/sam-photo/src/sam-senior-photo.ts"],"sourcesContent":["import { Component, ViewChild, EventEmitter, ElementRef, ViewEncapsulation, OnInit } from '@angular/core';\r\nimport { Input } from '@angular/core';\r\nimport { Output } from '@angular/core';\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { ImageCropperService } from '@seniorsistemas/angular-components/image-cropper';\r\nimport { PhotoCaptureService } from '@sam-senior/photo-capture';\r\n\r\nimport { PhotoModel } from './photo.model';\r\n\r\n@Component({\r\n selector: 'sam-photo',\r\n templateUrl: './photo.component.html',\r\n styleUrls: ['./photo.component.css'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: PhotoComponent,\r\n multi: true\r\n }\r\n ],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class PhotoComponent implements ControlValueAccessor {\r\n @ViewChild(`imageInput`) imageInput: ElementRef;\r\n\r\n @Input() key = 'key';\r\n @Input() photo: string;\r\n @Input() actionIconClass = 'fa fa-camera';\r\n @Input() photoSize: 'small' | 'medium' | 'large' = 'medium';\r\n @Input() maxPhotoSize = 1;\r\n @Input() photoWidth = 670;\r\n @Input() photoHeight = 400;\r\n @Input() canPhotoUpload = true;\r\n @Input() canPhotoCapture = true;\r\n\r\n @Input() cropperTitle = `Recortar`;\r\n @Input() cropperActionCancel = `Cancelar`;\r\n @Input() cropperActionCrop = `Recortar`;\r\n\r\n @Input() cameraDialogLabel = `Captura`;\r\n @Input() cameraDialogCaptureLabel = `Capturar`;\r\n @Input() selectPhotoTypeLabel = `Selecionar imagem`;\r\n @Input() selectUploadTypeLabel = `Upload`;\r\n @Input() selectUploadTypeDescription = `Selecione uma imagem do seu computador`;\r\n @Input() selectCaptureTypeLabel = `Capturar`;\r\n @Input() selectCaptureTypeLabelDescription = `Capture uma imagem do seu dispositivo`;\r\n @Input() dialogCancelLabel = `Cancelar`;\r\n\r\n @Output() photoCrop = new EventEmitter();\r\n @Output() openCamera = new EventEmitter();\r\n @Output() closeCamera = new EventEmitter();\r\n @Output() cameraError = new EventEmitter();\r\n @Output() invalidPhotoSize = new EventEmitter();\r\n @Output() isLoading = new EventEmitter();\r\n\r\n public photoContent: PhotoModel;\r\n public cameraDialog = false;\r\n public selectPhotoType = false;\r\n\r\n private onChange = (_: any) => { };\r\n private onTouched = () => { };\r\n\r\n constructor(\r\n private imageCropperService: ImageCropperService,\r\n private photoCaptureService: PhotoCaptureService\r\n ) { }\r\n\r\n public changePhoto() {\r\n if (this.canPhotoCapture && this.canPhotoUpload) {\r\n this.selectPhotoType = true;\r\n } else if (this.canPhotoCapture) {\r\n this.onOpenCamera();\r\n } else if (this.canPhotoUpload) {\r\n this.onOpenUpload();\r\n }\r\n }\r\n\r\n public registerOnChange(fn: (_: any) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n public registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n public writeValue(value: any) {\r\n this.photo = value;\r\n }\r\n\r\n public onOpenCamera() {\r\n this.closeSelectPhotoType();\r\n this.cameraDialog = true;\r\n this.photoCaptureService.setKey(this.key);\r\n this.photoCaptureService.start();\r\n this.openCamera.emit();\r\n }\r\n\r\n public closeSelectPhotoType() {\r\n this.selectPhotoType = false;\r\n }\r\n\r\n public onOpenUpload() {\r\n this.closeSelectPhotoType();\r\n (this.imageInput.nativeElement as HTMLInputElement).value = null;\r\n (this.imageInput.nativeElement as HTMLInputElement).click();\r\n }\r\n\r\n public photoSelected(event: any) {\r\n const [file] = event.srcElement.files;\r\n this.photoRender(file);\r\n }\r\n\r\n public onCloseCamera() {\r\n this.cameraDialog = false;\r\n this.photoCaptureService.stop();\r\n this.closeCamera.emit();\r\n }\r\n\r\n public onPhotoCapture() {\r\n this.isLoading.emit(true);\r\n this.photoCaptureService.setKey(this.key);\r\n this.photoCaptureService.takePhoto();\r\n }\r\n\r\n public onPhotoTake(photo) {\r\n if (this.photoCaptureService.getKey() === this.key) {\r\n this.photoRender(photo.blob);\r\n this.onCloseCamera();\r\n }\r\n }\r\n\r\n public onCameraError(error) {\r\n if (this.photoCaptureService.getKey() === this.key) {\r\n this.onCloseCamera();\r\n this.cameraError.emit(error);\r\n }\r\n }\r\n\r\n private photoRender(file) {\r\n if (file) {\r\n const fileReader = new FileReader();\r\n fileReader.onloadend =\r\n photoRender => this.photoChopper(photoRender);\r\n fileReader.readAsDataURL(file);\r\n }\r\n }\r\n\r\n private photoChopper(photoRender) {\r\n this.imageCropperService.show({\r\n imageSource: photoRender.target.result,\r\n croppedCanvas: imageCanvas => {\r\n imageCanvas.toBlob(blob => {\r\n this.setPhotoContent(imageCanvas.toDataURL(), blob);\r\n this.onCreateBlob();\r\n });\r\n },\r\n header: this.cropperTitle,\r\n emptyStateActionLabel: this.cropperActionCancel,\r\n allowSelectAnother: false,\r\n allowRemove: false,\r\n cropLabel: this.cropperActionCrop,\r\n rounded: true,\r\n aspectRatio: 3 / 4\r\n });\r\n this.isLoading.emit(false);\r\n }\r\n\r\n private onCreateBlob() {\r\n if (this.getMaxSizeInBites() > this.photoContent.blob.size) {\r\n this.photoCrop.emit(this.photoContent);\r\n this.photo = this.photoContent.image;\r\n this.onChange(this.photo);\r\n } else {\r\n this.invalidPhotoSize.emit();\r\n }\r\n }\r\n\r\n private getMaxSizeInBites() {\r\n return (this.maxPhotoSize * 1000) * 1000;\r\n }\r\n\r\n private setPhotoContent(imageUri, imageBlob) {\r\n this.photoContent = {\r\n image: imageUri,\r\n blob: imageBlob\r\n };\r\n }\r\n\r\n}\r\n","<input #imageInput type=\"file\" class=\"photo__input-file--hidden\" (change)=\"photoSelected($event)\" accept=\"image/*\">\r\n<s-thumbnail [size]=\"photoSize\" iconClass=\"fa fa-user\" (click)=\"changePhoto()\"\r\n [hasAction]=\"canPhotoUpload || canPhotoCapture\" [imageSource]=\"photo\" [actionIconClass]=\"actionIconClass\">\r\n</s-thumbnail>\r\n\r\n<p-dialog styleClass=\"photo-capture-custom\" [(visible)]=\"cameraDialog\" [header]=\"cameraDialogLabel\"\r\n [style]=\"{width: '700px'}\" appendTo='body' [modal]=\"true\">\r\n <sam-photo-capture [width]=\"photoWidth\" [height]=\"photoHeight\" (photoTake)=\"onPhotoTake($event)\"\r\n (error)=\"onCameraError($event)\"></sam-photo-capture>\r\n <p-footer>\r\n <s-button id=\"takePhotoBtn\" priority=\"primary\" [label]=\"cameraDialogCaptureLabel\" (click)=\"onPhotoCapture()\">\r\n </s-button>\r\n <s-button id=\"cancelBtn\" priority=\"link\" [label]=\"dialogCancelLabel\" (click)=\"onCloseCamera()\"></s-button>\r\n </p-footer>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"selectPhotoType\" [header]=\"selectPhotoTypeLabel\" [style]=\"{width: '400px'}\" appendTo='body' [modal]=\"true\"\r\n [closable]=\"false\">\r\n <s-tile [label]=\"selectUploadTypeLabel\" [description]=\"selectUploadTypeDescription\" iconClass=\"fa fa-upload\"\r\n (click)=\"onOpenUpload()\"></s-tile>\r\n <br>\r\n <s-tile [label]=\"selectCaptureTypeLabel\" [description]=\"selectCaptureTypeLabelDescription\" iconClass=\"fa fa-camera\"\r\n (click)=\"onOpenCamera()\"></s-tile>\r\n <p-footer>\r\n <s-button id=\"cancelBtn\" priority=\"link\" [label]=\"dialogCancelLabel\" (click)=\"closeSelectPhotoType()\"></s-button>\r\n </p-footer>\r\n</p-dialog>\r\n","import { NgModule } from '@angular/core';\r\nimport { ConfirmDialogModule } from 'primeng/confirmdialog';\r\nimport { PanelModule } from 'primeng/panel';\r\nimport { ImageCropperModule, ImageCropperService } from '@seniorsistemas/angular-components/image-cropper';\r\nimport { StepsModule } from '@seniorsistemas/angular-components/steps';\r\nimport { ObjectCardModule } from '@seniorsistemas/angular-components/object-card';\r\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\r\nimport { TileModule } from '@seniorsistemas/angular-components/tile';\r\nimport { LoadingStateModule } from '@seniorsistemas/angular-components/loading-state';\r\nimport { DialogModule } from 'primeng/dialog';\r\nimport { PhotoCaptureModule } from '@sam-senior/photo-capture';\r\n\r\nimport { PhotoComponent } from './photo.component';\r\n\r\n@NgModule({\r\n declarations: [PhotoComponent],\r\n imports: [\r\n PanelModule,\r\n DialogModule,\r\n StepsModule,\r\n ObjectCardModule,\r\n ImageCropperModule,\r\n ConfirmDialogModule,\r\n PhotoCaptureModule,\r\n ButtonModule,\r\n TileModule,\r\n LoadingStateModule\r\n ],\r\n providers: [ImageCropperService],\r\n exports: [PhotoComponent]\r\n})\r\nexport class PhotoModule { }\r\n","/*\r\n * Public API Surface of photo\r\n */\r\nexport * from './lib/photo.model';\r\nexport * from './lib/photo.component';\r\nexport * from './lib/photo.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;MAsBa,cAAc,CAAA;AAyCf,IAAA,mBAAA,CAAA;AACA,IAAA,mBAAA,CAAA;AAzCe,IAAA,UAAU,CAAa;IAEvC,GAAG,GAAG,KAAK,CAAC;AACZ,IAAA,KAAK,CAAS;IACd,eAAe,GAAG,cAAc,CAAC;IACjC,SAAS,GAAiC,QAAQ,CAAC;IACnD,YAAY,GAAG,CAAC,CAAC;IACjB,UAAU,GAAG,GAAG,CAAC;IACjB,WAAW,GAAG,GAAG,CAAC;IAClB,cAAc,GAAG,IAAI,CAAC;IACtB,eAAe,GAAG,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
export * from './public_api';
|
package/lib/photo.component.d.ts
CHANGED
|
@@ -1,59 +1,62 @@
|
|
|
1
|
-
import { EventEmitter, ElementRef } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import { ImageCropperService } from '@seniorsistemas/angular-components';
|
|
4
|
-
import { PhotoCaptureService } from '@sam-senior/photo-capture';
|
|
5
|
-
import { PhotoModel } from './photo.model';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
private
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
private
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
private
|
|
56
|
-
private
|
|
57
|
-
private
|
|
58
|
-
private
|
|
59
|
-
|
|
1
|
+
import { EventEmitter, ElementRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { ImageCropperService } from '@seniorsistemas/angular-components/image-cropper';
|
|
4
|
+
import { PhotoCaptureService } from '@sam-senior/photo-capture';
|
|
5
|
+
import { PhotoModel } from './photo.model';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class PhotoComponent implements ControlValueAccessor {
|
|
8
|
+
private imageCropperService;
|
|
9
|
+
private photoCaptureService;
|
|
10
|
+
imageInput: ElementRef;
|
|
11
|
+
key: string;
|
|
12
|
+
photo: string;
|
|
13
|
+
actionIconClass: string;
|
|
14
|
+
photoSize: 'small' | 'medium' | 'large';
|
|
15
|
+
maxPhotoSize: number;
|
|
16
|
+
photoWidth: number;
|
|
17
|
+
photoHeight: number;
|
|
18
|
+
canPhotoUpload: boolean;
|
|
19
|
+
canPhotoCapture: boolean;
|
|
20
|
+
cropperTitle: string;
|
|
21
|
+
cropperActionCancel: string;
|
|
22
|
+
cropperActionCrop: string;
|
|
23
|
+
cameraDialogLabel: string;
|
|
24
|
+
cameraDialogCaptureLabel: string;
|
|
25
|
+
selectPhotoTypeLabel: string;
|
|
26
|
+
selectUploadTypeLabel: string;
|
|
27
|
+
selectUploadTypeDescription: string;
|
|
28
|
+
selectCaptureTypeLabel: string;
|
|
29
|
+
selectCaptureTypeLabelDescription: string;
|
|
30
|
+
dialogCancelLabel: string;
|
|
31
|
+
photoCrop: EventEmitter<any>;
|
|
32
|
+
openCamera: EventEmitter<any>;
|
|
33
|
+
closeCamera: EventEmitter<any>;
|
|
34
|
+
cameraError: EventEmitter<any>;
|
|
35
|
+
invalidPhotoSize: EventEmitter<any>;
|
|
36
|
+
isLoading: EventEmitter<any>;
|
|
37
|
+
photoContent: PhotoModel;
|
|
38
|
+
cameraDialog: boolean;
|
|
39
|
+
selectPhotoType: boolean;
|
|
40
|
+
private onChange;
|
|
41
|
+
private onTouched;
|
|
42
|
+
constructor(imageCropperService: ImageCropperService, photoCaptureService: PhotoCaptureService);
|
|
43
|
+
changePhoto(): void;
|
|
44
|
+
registerOnChange(fn: (_: any) => void): void;
|
|
45
|
+
registerOnTouched(fn: () => void): void;
|
|
46
|
+
writeValue(value: any): void;
|
|
47
|
+
onOpenCamera(): void;
|
|
48
|
+
closeSelectPhotoType(): void;
|
|
49
|
+
onOpenUpload(): void;
|
|
50
|
+
photoSelected(event: any): void;
|
|
51
|
+
onCloseCamera(): void;
|
|
52
|
+
onPhotoCapture(): void;
|
|
53
|
+
onPhotoTake(photo: any): void;
|
|
54
|
+
onCameraError(error: any): void;
|
|
55
|
+
private photoRender;
|
|
56
|
+
private photoChopper;
|
|
57
|
+
private onCreateBlob;
|
|
58
|
+
private getMaxSizeInBites;
|
|
59
|
+
private setPhotoContent;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhotoComponent, never>;
|
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PhotoComponent, "sam-photo", never, { "key": { "alias": "key"; "required": false; }; "photo": { "alias": "photo"; "required": false; }; "actionIconClass": { "alias": "actionIconClass"; "required": false; }; "photoSize": { "alias": "photoSize"; "required": false; }; "maxPhotoSize": { "alias": "maxPhotoSize"; "required": false; }; "photoWidth": { "alias": "photoWidth"; "required": false; }; "photoHeight": { "alias": "photoHeight"; "required": false; }; "canPhotoUpload": { "alias": "canPhotoUpload"; "required": false; }; "canPhotoCapture": { "alias": "canPhotoCapture"; "required": false; }; "cropperTitle": { "alias": "cropperTitle"; "required": false; }; "cropperActionCancel": { "alias": "cropperActionCancel"; "required": false; }; "cropperActionCrop": { "alias": "cropperActionCrop"; "required": false; }; "cameraDialogLabel": { "alias": "cameraDialogLabel"; "required": false; }; "cameraDialogCaptureLabel": { "alias": "cameraDialogCaptureLabel"; "required": false; }; "selectPhotoTypeLabel": { "alias": "selectPhotoTypeLabel"; "required": false; }; "selectUploadTypeLabel": { "alias": "selectUploadTypeLabel"; "required": false; }; "selectUploadTypeDescription": { "alias": "selectUploadTypeDescription"; "required": false; }; "selectCaptureTypeLabel": { "alias": "selectCaptureTypeLabel"; "required": false; }; "selectCaptureTypeLabelDescription": { "alias": "selectCaptureTypeLabelDescription"; "required": false; }; "dialogCancelLabel": { "alias": "dialogCancelLabel"; "required": false; }; }, { "photoCrop": "photoCrop"; "openCamera": "openCamera"; "closeCamera": "closeCamera"; "cameraError": "cameraError"; "invalidPhotoSize": "invalidPhotoSize"; "isLoading": "isLoading"; }, never, never, false, never>;
|
|
62
|
+
}
|
package/lib/photo.model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface PhotoModel {
|
|
2
|
-
image: string;
|
|
3
|
-
blob: Blob;
|
|
4
|
-
}
|
|
1
|
+
export interface PhotoModel {
|
|
2
|
+
image: string;
|
|
3
|
+
blob: Blob;
|
|
4
|
+
}
|
package/lib/photo.module.d.ts
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./photo.component";
|
|
3
|
+
import * as i2 from "primeng/panel";
|
|
4
|
+
import * as i3 from "primeng/dialog";
|
|
5
|
+
import * as i4 from "@seniorsistemas/angular-components/steps";
|
|
6
|
+
import * as i5 from "@seniorsistemas/angular-components/object-card";
|
|
7
|
+
import * as i6 from "@seniorsistemas/angular-components/image-cropper";
|
|
8
|
+
import * as i7 from "primeng/confirmdialog";
|
|
9
|
+
import * as i8 from "@sam-senior/photo-capture";
|
|
10
|
+
import * as i9 from "@seniorsistemas/angular-components/button";
|
|
11
|
+
import * as i10 from "@seniorsistemas/angular-components/tile";
|
|
12
|
+
import * as i11 from "@seniorsistemas/angular-components/loading-state";
|
|
13
|
+
export declare class PhotoModule {
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhotoModule, never>;
|
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PhotoModule, [typeof i1.PhotoComponent], [typeof i2.PanelModule, typeof i3.DialogModule, typeof i4.StepsModule, typeof i5.ObjectCardModule, typeof i6.ImageCropperModule, typeof i7.ConfirmDialogModule, typeof i8.PhotoCaptureModule, typeof i9.ButtonModule, typeof i10.TileModule, typeof i11.LoadingStateModule], [typeof i1.PhotoComponent]>;
|
|
16
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PhotoModule>;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sam-senior/photo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/animations": "
|
|
6
|
-
"@angular/cdk": "
|
|
7
|
-
"@angular/
|
|
8
|
-
"@
|
|
9
|
-
"@seniorsistemas/
|
|
10
|
-
"@seniorsistemas/
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"moment": "2.24.0",
|
|
15
|
-
"ng2-currency-mask": "5.3.1",
|
|
16
|
-
"primeicons": "1.0.0",
|
|
17
|
-
"primeng": "7.0.5",
|
|
18
|
-
"rxjs": "~6.3.3",
|
|
19
|
-
"rxjs-compat": "~6.2.2",
|
|
20
|
-
"tslib": "1.9.0",
|
|
21
|
-
"zone.js": "0.8.29"
|
|
5
|
+
"@angular/animations": "^18.0.0",
|
|
6
|
+
"@angular/cdk": "^18.0.0",
|
|
7
|
+
"@angular/common": "^18.0.0",
|
|
8
|
+
"@angular/core": "^18.0.0",
|
|
9
|
+
"@seniorsistemas/angular-components": "18.0.0",
|
|
10
|
+
"@seniorsistemas/primeng-theme": "^10.0.7",
|
|
11
|
+
"primeicons": "^7.0.0",
|
|
12
|
+
"primeng": "^17.0.0",
|
|
13
|
+
"rxjs": "^7.8.0"
|
|
22
14
|
},
|
|
23
15
|
"dependencies": {
|
|
24
|
-
"@sam-senior/photo-capture": "1.2.
|
|
25
|
-
"tslib": "^
|
|
16
|
+
"@sam-senior/photo-capture": "1.2.4",
|
|
17
|
+
"tslib": "^2.6.0"
|
|
18
|
+
},
|
|
19
|
+
"module": "fesm2022/sam-senior-photo.mjs",
|
|
20
|
+
"typings": "index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
"./package.json": {
|
|
23
|
+
"default": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./index.d.ts",
|
|
27
|
+
"esm2022": "./esm2022/sam-senior-photo.mjs",
|
|
28
|
+
"esm": "./esm2022/sam-senior-photo.mjs",
|
|
29
|
+
"default": "./fesm2022/sam-senior-photo.mjs"
|
|
30
|
+
}
|
|
26
31
|
},
|
|
27
|
-
"main": "bundles/sam-senior-photo.umd.js",
|
|
28
|
-
"module": "fesm5/sam-senior-photo.js",
|
|
29
|
-
"es2015": "fesm2015/sam-senior-photo.js",
|
|
30
|
-
"esm5": "esm5/sam-senior-photo.js",
|
|
31
|
-
"esm2015": "esm2015/sam-senior-photo.js",
|
|
32
|
-
"fesm5": "fesm5/sam-senior-photo.js",
|
|
33
|
-
"fesm2015": "fesm2015/sam-senior-photo.js",
|
|
34
|
-
"typings": "sam-senior-photo.d.ts",
|
|
35
|
-
"metadata": "sam-senior-photo.metadata.json",
|
|
36
32
|
"sideEffects": false
|
|
37
|
-
}
|
|
33
|
+
}
|
package/public_api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './lib/photo.model';
|
|
2
|
-
export * from './lib/photo.component';
|
|
3
|
-
export * from './lib/photo.module';
|
|
1
|
+
export * from './lib/photo.model';
|
|
2
|
+
export * from './lib/photo.component';
|
|
3
|
+
export * from './lib/photo.module';
|