ets-fe-ng-sdk 17.0.310 → 17.0.312
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/Shared/components/file-upload/file-upload.component.mjs +3 -3
- package/esm2022/lib/Shared/components/webcam-media/webcam-media.component.mjs +40 -39
- package/fesm2022/ets-fe-ng-sdk.mjs +39 -39
- package/fesm2022/ets-fe-ng-sdk.mjs.map +1 -1
- package/lib/Services/utility.service.d.ts +1 -1
- package/lib/Shared/components/btn/btn.component.d.ts +1 -1
- package/lib/Shared/components/info-dialog/info-dialog.component.d.ts +1 -1
- package/lib/Shared/components/table-https/table-https.component.d.ts +1 -1
- package/lib/Shared/components/webcam-media/webcam-media.component.d.ts +8 -4
- package/package.json +1 -1
|
@@ -12124,81 +12124,81 @@ class WebcamMediaComponent {
|
|
|
12124
12124
|
// will be set by the startup() function.
|
|
12125
12125
|
this.canvas = signal(undefined);
|
|
12126
12126
|
this.mediaFile = signal(undefined);
|
|
12127
|
-
this.
|
|
12128
|
-
this.videoSrc = signal(undefined);
|
|
12127
|
+
this.mediaFileLink = computed(() => (this.mediaFile() ? URL.createObjectURL(this.mediaFile()) : undefined));
|
|
12129
12128
|
this.stream = signal(undefined);
|
|
12130
12129
|
this.isRecording = toSignal(this.recordingState.pipe(map$1((r) => r == 'recording' || r == 'paused')));
|
|
12131
12130
|
this.recordedBlobs = [];
|
|
12132
|
-
|
|
12131
|
+
/**In Milliseconds */
|
|
12132
|
+
this.recordedTimeMS = signal(0);
|
|
12133
|
+
this.recordedTime = computed(() => Math.round(this.recordedTimeMS() / 1000));
|
|
12134
|
+
this.loading = signal(false);
|
|
12133
12135
|
this.startRecording = (stream = this.stream()) => {
|
|
12134
12136
|
if (!this.isVideo())
|
|
12135
12137
|
return;
|
|
12136
12138
|
this.recorder = new MediaRecorder(stream);
|
|
12137
12139
|
this.recordedBlobs = [];
|
|
12138
|
-
this.
|
|
12139
|
-
const
|
|
12140
|
+
this.recordedTimeMS.set(0);
|
|
12141
|
+
const startTime = Date.now();
|
|
12140
12142
|
this.recorder.ondataavailable = (event) => {
|
|
12141
12143
|
this.recordedBlobs.push(event.data);
|
|
12144
|
+
this.recordedTimeMS.set(Date.now() - startTime);
|
|
12142
12145
|
this.mediaFile.set(new File(this.recordedBlobs, this.computedFileName(), { type: this.computedFileType() }));
|
|
12143
|
-
|
|
12146
|
+
this.recordingChanged.emit(this.mediaFile());
|
|
12144
12147
|
};
|
|
12145
12148
|
// this.recorder.ondataavailable = (event) => {
|
|
12146
12149
|
// this.recordedBlobs = [event.data];
|
|
12147
12150
|
// lengths.push(event.data.size);
|
|
12148
12151
|
// };
|
|
12149
12152
|
// this.recorder.ondataavailable = (event) => this.recordedBlobs.push(event.data);
|
|
12150
|
-
this.recorder.start();
|
|
12151
|
-
let notifSub;
|
|
12152
|
-
const startTimer = () => {
|
|
12153
|
-
let lastDateTime = Date.now();
|
|
12154
|
-
notifSub = timer(1000, 1000)
|
|
12155
|
-
.pipe(tap(() => this.recordedTime.update((t) => (t += 1))), tap(() => console.log(Date.now(), this.computedRecordingNotificationInterval(), this.recordingNotificationInterval())), filter(() => Date.now() - lastDateTime > this.computedRecordingNotificationInterval()), tap(() => this.recorder.requestData()))
|
|
12156
|
-
.subscribe((r) => {
|
|
12157
|
-
lastDateTime = Date.now();
|
|
12158
|
-
this.recordingChanged.emit(this.mediaFile());
|
|
12159
|
-
});
|
|
12160
|
-
};
|
|
12153
|
+
this.recorder.start(this.computedRecordingNotificationInterval());
|
|
12161
12154
|
this.recorder.onstart = (e) => {
|
|
12162
12155
|
this.recordingState.emit(this.recorder.state);
|
|
12163
12156
|
this.recorderStarted.emit(e);
|
|
12164
|
-
startTimer();
|
|
12165
12157
|
};
|
|
12166
12158
|
this.recorder.onstop = (e) => {
|
|
12167
12159
|
this.recordingState.emit(this.recorder.state);
|
|
12168
12160
|
this.recorderStopped.emit(e);
|
|
12169
|
-
console.log('new length', lengths);
|
|
12170
|
-
notifSub?.unsubscribe();
|
|
12171
12161
|
};
|
|
12172
12162
|
this.recorder.onpause = (e) => {
|
|
12173
12163
|
this.recordingState.emit(this.recorder.state);
|
|
12174
|
-
notifSub?.unsubscribe();
|
|
12175
12164
|
};
|
|
12176
12165
|
this.recorder.onresume = (e) => {
|
|
12177
12166
|
this.recordingState.emit(this.recorder.state);
|
|
12178
|
-
startTimer();
|
|
12179
12167
|
};
|
|
12180
12168
|
this.recorder.onerror = (e) => {
|
|
12181
12169
|
this.recordingState.emit(this.recorder.state);
|
|
12182
12170
|
this.recorderErrored.emit(e);
|
|
12183
|
-
notifSub?.unsubscribe();
|
|
12184
12171
|
};
|
|
12185
12172
|
};
|
|
12173
|
+
this.extractImg = new Observable((sub) => this.canvas().toBlob((blob) => {
|
|
12174
|
+
if (blob) {
|
|
12175
|
+
this.mediaFile.set(new File([blob], this.computedFileName()));
|
|
12176
|
+
sub.next(this.mediaFile());
|
|
12177
|
+
sub.complete();
|
|
12178
|
+
}
|
|
12179
|
+
else
|
|
12180
|
+
sub.error(`No ${this.subject()} file generated`);
|
|
12181
|
+
}, this.computedFileType(), 1));
|
|
12186
12182
|
}
|
|
12187
12183
|
ngAfterViewInit() {
|
|
12188
12184
|
this.startUpWebcam();
|
|
12189
12185
|
}
|
|
12190
12186
|
ngOnDestroy() {
|
|
12191
12187
|
this.sub?.unsubscribe();
|
|
12188
|
+
this.closeWebcam();
|
|
12192
12189
|
}
|
|
12193
12190
|
/**
|
|
12194
12191
|
* Start the webcam stream
|
|
12195
12192
|
*/
|
|
12196
12193
|
startUpWebcam() {
|
|
12194
|
+
this.loading.set(true);
|
|
12197
12195
|
this.clear();
|
|
12198
12196
|
navigator.mediaDevices
|
|
12199
12197
|
.getUserMedia({ video: true, audio: this.useAudio() })
|
|
12200
12198
|
.then((stream) => {
|
|
12201
12199
|
this.streaming.set(true);
|
|
12200
|
+
this.loading.set(false);
|
|
12201
|
+
// stream.onaddtrack = () => this.loading.set(false);
|
|
12202
12202
|
this.canvas.set(document.createElement('canvas'));
|
|
12203
12203
|
this.canvas()?.setAttribute('width', this.width() + 'px');
|
|
12204
12204
|
this.canvas()?.setAttribute('height', this.height() + 'px');
|
|
@@ -12216,15 +12216,7 @@ class WebcamMediaComponent {
|
|
|
12216
12216
|
*/
|
|
12217
12217
|
save() {
|
|
12218
12218
|
if (this.isPicture())
|
|
12219
|
-
|
|
12220
|
-
if (blob) {
|
|
12221
|
-
this.mediaFile.set(new File([blob], this.computedFileName()));
|
|
12222
|
-
sub.next(this.mediaFile());
|
|
12223
|
-
sub.complete();
|
|
12224
|
-
}
|
|
12225
|
-
else
|
|
12226
|
-
sub.error(`No ${this.subject()} file generated`);
|
|
12227
|
-
}, this.computedFileType(), 1)).subscribe(() => {
|
|
12219
|
+
this.extractImg.subscribe(() => {
|
|
12228
12220
|
this.closed.emit(this.mediaFile());
|
|
12229
12221
|
this.closeWebcam();
|
|
12230
12222
|
});
|
|
@@ -12251,11 +12243,18 @@ class WebcamMediaComponent {
|
|
|
12251
12243
|
context.fillStyle = '#AAA';
|
|
12252
12244
|
context.fillRect(0, 0, this.canvas().width, this.canvas().height);
|
|
12253
12245
|
const data = this.canvas().toDataURL(this.computedFileType());
|
|
12254
|
-
this.
|
|
12246
|
+
this.mediaFile.set(undefined);
|
|
12247
|
+
// this.photoSrc.set(data);
|
|
12255
12248
|
this.streaming.set(true);
|
|
12256
12249
|
this.preview.set(false);
|
|
12257
12250
|
}
|
|
12258
12251
|
}
|
|
12252
|
+
retake() {
|
|
12253
|
+
if (!this.stream())
|
|
12254
|
+
this.startUpWebcam();
|
|
12255
|
+
else
|
|
12256
|
+
this.clear();
|
|
12257
|
+
}
|
|
12259
12258
|
/**
|
|
12260
12259
|
* Shutdown the webcam stream
|
|
12261
12260
|
*/
|
|
@@ -12292,8 +12291,9 @@ class WebcamMediaComponent {
|
|
|
12292
12291
|
return canvas;
|
|
12293
12292
|
});
|
|
12294
12293
|
context.drawImage(this.recordingVideoRefEl(), 0, 0, width, height);
|
|
12295
|
-
|
|
12296
|
-
this.
|
|
12294
|
+
this.extractImg.subscribe();
|
|
12295
|
+
// const data = this.canvas()!.toDataURL('image/png');
|
|
12296
|
+
// this.photoSrc.set(data);
|
|
12297
12297
|
}
|
|
12298
12298
|
else
|
|
12299
12299
|
this.clear();
|
|
@@ -12314,11 +12314,11 @@ class WebcamMediaComponent {
|
|
|
12314
12314
|
this.recorder.pause();
|
|
12315
12315
|
}
|
|
12316
12316
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: WebcamMediaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12317
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: WebcamMediaComponent, isStandalone: true, selector: "lib-webcam-media", inputs: { isVideo: { classPropertyName: "isVideo", publicName: "isVideo", isSignal: true, isRequired: false, transformFunction: null }, useAudio: { classPropertyName: "useAudio", publicName: "useAudio", isSignal: true, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, fileNameFactory: { classPropertyName: "fileNameFactory", publicName: "fileNameFactory", isSignal: true, isRequired: false, transformFunction: null }, fileType: { classPropertyName: "fileType", publicName: "fileType", isSignal: true, isRequired: false, transformFunction: null }, extraClass: { classPropertyName: "extraClass", publicName: "extraClass", isSignal: true, isRequired: false, transformFunction: null }, recordingNotificationInterval: { classPropertyName: "recordingNotificationInterval", publicName: "recordingNotificationInterval", isSignal: true, isRequired: false, transformFunction: null }, isBackground: { classPropertyName: "isBackground", publicName: "isBackground", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", recorderStopped: "recorderStopped", recorderErrored: "recorderErrored", recorderStarted: "recorderStarted", recordingState: "recordingState", recordingChanged: "recordingChanged", width: "widthChange" }, viewQueries: [{ propertyName: "streamingVideoTemplate", first: true, predicate: ["streamVideoTemp"], descendants: true, isSignal: true }, { propertyName: "recordingVideoRef", first: true, predicate: ["recordingVideoTag"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"\" [hidden]=\"streaming() != true || isBackground()\">\n
|
|
12317
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: WebcamMediaComponent, isStandalone: true, selector: "lib-webcam-media", inputs: { isVideo: { classPropertyName: "isVideo", publicName: "isVideo", isSignal: true, isRequired: false, transformFunction: null }, useAudio: { classPropertyName: "useAudio", publicName: "useAudio", isSignal: true, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, fileNameFactory: { classPropertyName: "fileNameFactory", publicName: "fileNameFactory", isSignal: true, isRequired: false, transformFunction: null }, fileType: { classPropertyName: "fileType", publicName: "fileType", isSignal: true, isRequired: false, transformFunction: null }, extraClass: { classPropertyName: "extraClass", publicName: "extraClass", isSignal: true, isRequired: false, transformFunction: null }, recordingNotificationInterval: { classPropertyName: "recordingNotificationInterval", publicName: "recordingNotificationInterval", isSignal: true, isRequired: false, transformFunction: null }, isBackground: { classPropertyName: "isBackground", publicName: "isBackground", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", recorderStopped: "recorderStopped", recorderErrored: "recorderErrored", recorderStarted: "recorderStarted", recordingState: "recordingState", recordingChanged: "recordingChanged", width: "widthChange" }, viewQueries: [{ propertyName: "streamingVideoTemplate", first: true, predicate: ["streamVideoTemp"], descendants: true, isSignal: true }, { propertyName: "recordingVideoRef", first: true, predicate: ["recordingVideoTag"], descendants: true, isSignal: true }], ngImport: i0, template: "<loader [loading]=\"loading()\">\n <div class=\"\" [hidden]=\"streaming() != true || isBackground()\">\n <ng-container *ngTemplateOutlet=\"streamVideoTemp\" />\n\n @if (!isBackground()) {\n <div class=\"wm-buttons\">\n <div class=\"row row-cols-lg-auto g-3 justify-content-center\">\n @if (!isRecording()) {\n <div>\n <app-btn [text]=\"isPicture() ? 'Take Picture' : 'Record Video'\" (mclick)=\"isPicture() ? takePicture() : startRecording()\" />\n </div>\n } @else {\n <div>\n <app-btn\n text=\"{{ isPaused() ? 'Play' : 'Pause' }} Recording\"\n (mclick)=\"pauseRecording()\"\n type=\"outline\"\n [icon]=\"isPaused() ? 'play' : 'pause'\" />\n </div>\n <div>\n <app-btn [text]=\"'Stop Recording'\" (mclick)=\"stopRecording()\" type=\"danger\" icon=\"stop\" />\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <ng-template #streamVideoTemp>\n <div class=\"wm-recording-video-cont\">\n <video #recordingVideoTag [srcObject]=\"stream()\" autoplay class=\"wm-recording-video {{ extraClass() }}\"></video>\n @if (isRecording()) {\n <div class=\"wm-recordingDot\"></div>\n }\n </div>\n </ng-template>\n\n @if (computedPreview()) {\n <div class=\"wm-preview\">\n <div>\n @if (isPicture()) {\n <img class=\"w-100\" [style.width.px]=\"width()\" [style.height.px]=\"height()\" [src]=\"mediaFileLink()\" />\n } @else {\n <video class=\"w-100\" [style.width.px]=\"width()\" [style.height.px]=\"height()\" controls autoplay [src]=\"mediaFileLink()\"></video>\n }\n </div>\n <div class=\"mt-3 row row-cols-lg-auto justify-content-center g-3\">\n <div>\n <app-btn text=\"Retake {{ subject() }}\" type=\"outline\" (mclick)=\"retake()\" />\n </div>\n <div>\n <app-btn (mclick)=\"save()\" text=\"Done\" type=\"primary\" icon=\"save\" />\n </div>\n <div>\n <app-btn (mclick)=\"cancel()\" text=\"Cancel\" type=\"danger\" icon=\"cancel\" />\n </div>\n </div>\n </div>\n }\n</loader>\n", styles: [":host{display:block}:host .wm-recording-video{width:100%}:host .wm-preview image,:host .wm-preview video{object-fit:contain}:host .wm-recording-video-cont{position:relative}@keyframes wmAnimateDot{0%{background-color:transparent}50%{background-color:#ff000086}}:host .wm-recordingDot{animation-name:wmAnimateDot;animation-duration:1s;animation-iteration-count:infinite;border-radius:5px;--dimen: 20px;width:var(--dimen);height:var(--dimen);position:absolute;top:10px;right:10px}:host .wm-buttons{margin-top:var(--space-16)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BtnComponent, selector: "app-btn", inputs: ["formSchema", "debug", "centerBtn", "danger", "warning", "icon", "rightIcon", "leftIcon", "type", "group", "actionType", "animate", "excludeLogging", "loggingValue", "badge", "class", "customIcon", "disabled", "form", "forms", "help", "iconBtn", "loading", "mclass", "showHelpIcon", "rightCustomIcon", "leftCustomIcon", "text", "valid", "mini", "onFormInvalid"], outputs: ["mclick"] }, { kind: "component", type: LoaderComponent, selector: "loader", inputs: ["class", "text", "loading", "height"] }] }); }
|
|
12318
12318
|
}
|
|
12319
12319
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: WebcamMediaComponent, decorators: [{
|
|
12320
12320
|
type: Component,
|
|
12321
|
-
args: [{ selector: 'lib-webcam-media', standalone: true, imports: [CommonModule, BtnComponent], template: "<div class=\"\" [hidden]=\"streaming() != true || isBackground()\">\n
|
|
12321
|
+
args: [{ selector: 'lib-webcam-media', standalone: true, imports: [CommonModule, BtnComponent, LoaderComponent], template: "<loader [loading]=\"loading()\">\n <div class=\"\" [hidden]=\"streaming() != true || isBackground()\">\n <ng-container *ngTemplateOutlet=\"streamVideoTemp\" />\n\n @if (!isBackground()) {\n <div class=\"wm-buttons\">\n <div class=\"row row-cols-lg-auto g-3 justify-content-center\">\n @if (!isRecording()) {\n <div>\n <app-btn [text]=\"isPicture() ? 'Take Picture' : 'Record Video'\" (mclick)=\"isPicture() ? takePicture() : startRecording()\" />\n </div>\n } @else {\n <div>\n <app-btn\n text=\"{{ isPaused() ? 'Play' : 'Pause' }} Recording\"\n (mclick)=\"pauseRecording()\"\n type=\"outline\"\n [icon]=\"isPaused() ? 'play' : 'pause'\" />\n </div>\n <div>\n <app-btn [text]=\"'Stop Recording'\" (mclick)=\"stopRecording()\" type=\"danger\" icon=\"stop\" />\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <ng-template #streamVideoTemp>\n <div class=\"wm-recording-video-cont\">\n <video #recordingVideoTag [srcObject]=\"stream()\" autoplay class=\"wm-recording-video {{ extraClass() }}\"></video>\n @if (isRecording()) {\n <div class=\"wm-recordingDot\"></div>\n }\n </div>\n </ng-template>\n\n @if (computedPreview()) {\n <div class=\"wm-preview\">\n <div>\n @if (isPicture()) {\n <img class=\"w-100\" [style.width.px]=\"width()\" [style.height.px]=\"height()\" [src]=\"mediaFileLink()\" />\n } @else {\n <video class=\"w-100\" [style.width.px]=\"width()\" [style.height.px]=\"height()\" controls autoplay [src]=\"mediaFileLink()\"></video>\n }\n </div>\n <div class=\"mt-3 row row-cols-lg-auto justify-content-center g-3\">\n <div>\n <app-btn text=\"Retake {{ subject() }}\" type=\"outline\" (mclick)=\"retake()\" />\n </div>\n <div>\n <app-btn (mclick)=\"save()\" text=\"Done\" type=\"primary\" icon=\"save\" />\n </div>\n <div>\n <app-btn (mclick)=\"cancel()\" text=\"Cancel\" type=\"danger\" icon=\"cancel\" />\n </div>\n </div>\n </div>\n }\n</loader>\n", styles: [":host{display:block}:host .wm-recording-video{width:100%}:host .wm-preview image,:host .wm-preview video{object-fit:contain}:host .wm-recording-video-cont{position:relative}@keyframes wmAnimateDot{0%{background-color:transparent}50%{background-color:#ff000086}}:host .wm-recordingDot{animation-name:wmAnimateDot;animation-duration:1s;animation-iteration-count:infinite;border-radius:5px;--dimen: 20px;width:var(--dimen);height:var(--dimen);position:absolute;top:10px;right:10px}:host .wm-buttons{margin-top:var(--space-16)}\n"] }]
|
|
12322
12322
|
}], propDecorators: { closed: [{
|
|
12323
12323
|
type: Output
|
|
12324
12324
|
}], recorderStopped: [{
|
|
@@ -12396,11 +12396,11 @@ class FileUploadComponent {
|
|
|
12396
12396
|
inp.click();
|
|
12397
12397
|
}
|
|
12398
12398
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12399
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FileUploadComponent, isStandalone: true, selector: "app-file-upload", inputs: { help: { classPropertyName: "help", publicName: "help", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, mediaWidth: { classPropertyName: "mediaWidth", publicName: "mediaWidth", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, useWebcam: { classPropertyName: "useWebcam", publicName: "useWebcam", isSignal: true, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, mini: { classPropertyName: "mini", publicName: "mini", isSignal: true, isRequired: false, transformFunction: null }, useDocumentModal: { classPropertyName: "useDocumentModal", publicName: "useDocumentModal", isSignal: false, isRequired: false, transformFunction: null }, listFiles: { classPropertyName: "listFiles", publicName: "listFiles", isSignal: true, isRequired: false, transformFunction: null }, _accept: { classPropertyName: "_accept", publicName: "accept", isSignal: false, isRequired: false, transformFunction: null }, file: { classPropertyName: "file", publicName: "file", isSignal: false, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { mediaWidth: "mediaWidthChange", fileChange: "fileChange", filesChange: "filesChange" }, ngImport: i0, template: "@if (listFiles()) {\n <div [ngClass]=\"{ meta: mini() }\" class=\"{{ class() }} form-label mb-2 hide-scroll\">\n @for (item of files; track item) {\n <div class=\"row align-items-start mb-1\">\n <div class=\"col\">\n <div class=\"hide-scroll file-name\">\n {{ item?.name }}\n </div>\n </div>\n <div class=\"col-auto text-end\">\n <span class=\"text-danger pointer p-1 fa fa-close\" (click)=\"removeFile($index)\"></span>\n </div>\n </div>\n }\n </div>\n}\n<!-- <input type=\"file\" style=\"display: none;\" accept=\"{{accept}}\" (change)=\"onUpload($event)\" #uploadInput [multiple]=\"multiple\"> -->\n<app-btn\n icon=\"upload\"\n (mclick)=\"useWebcam() ? null : openDialog()\"\n [type]=\"file ? 'primary' : 'secondary'\"\n [disabled]=\"disabled\"\n [help]=\"help\"\n [text]=\"label\"\n [matMenuTriggerFor]=\"useWebcam() ? menu : null\" />\n\n<mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"openDialog()\">Upload</button>\n <button mat-menu-item (click)=\"webcamModal.open()\">Use Camera</button>\n</mat-menu>\n\n<modal-comp #webcamModal width=\"1080px\" header=\"Webcam\">\n <ng-template modalBody>\n <lib-webcam-media [fileName]=\"fileName()\" [width]=\"mediaWidth()\" (closed)=\"webcamModal.close(); acceptFiles($event)\" />\n </ng-template>\n</modal-comp>\n", styles: [".meta,.file-name{height:23px}.meta{overflow-y:auto}.file-name{overflow:auto}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: BtnComponent, selector: "app-btn", inputs: ["formSchema", "debug", "centerBtn", "danger", "warning", "icon", "rightIcon", "leftIcon", "type", "group", "actionType", "animate", "excludeLogging", "loggingValue", "badge", "class", "customIcon", "disabled", "form", "forms", "help", "iconBtn", "loading", "mclass", "showHelpIcon", "rightCustomIcon", "leftCustomIcon", "text", "valid", "mini", "onFormInvalid"], outputs: ["mclick"] }, { kind: "component", type: ModalComponent, selector: "modal-comp", inputs: ["header", "bodyTemplateRef", "footerTemplateRef", "showHeader", "loading", "isFullscreen", "showFooter", "width", "minWidth", "height", "maxHeight", "icon", "data", "disableClose", "hasBackdrop"], outputs: ["modalOpen", "modalClose"] }, { kind: "directive", type: ModalBodyDirective, selector: "[modalBody]" }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: WebcamMediaComponent, selector: "lib-webcam-media", inputs: ["isVideo", "useAudio", "fileName", "fileNameFactory", "fileType", "extraClass", "recordingNotificationInterval", "isBackground", "width"], outputs: ["closed", "recorderStopped", "recorderErrored", "recorderStarted", "recordingState", "recordingChanged", "widthChange"] }] }); }
|
|
12399
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: FileUploadComponent, isStandalone: true, selector: "app-file-upload", inputs: { help: { classPropertyName: "help", publicName: "help", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, mediaWidth: { classPropertyName: "mediaWidth", publicName: "mediaWidth", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, useWebcam: { classPropertyName: "useWebcam", publicName: "useWebcam", isSignal: true, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, mini: { classPropertyName: "mini", publicName: "mini", isSignal: true, isRequired: false, transformFunction: null }, useDocumentModal: { classPropertyName: "useDocumentModal", publicName: "useDocumentModal", isSignal: false, isRequired: false, transformFunction: null }, listFiles: { classPropertyName: "listFiles", publicName: "listFiles", isSignal: true, isRequired: false, transformFunction: null }, _accept: { classPropertyName: "_accept", publicName: "accept", isSignal: false, isRequired: false, transformFunction: null }, file: { classPropertyName: "file", publicName: "file", isSignal: false, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { mediaWidth: "mediaWidthChange", fileChange: "fileChange", filesChange: "filesChange" }, ngImport: i0, template: "@if (listFiles()) {\n <div [ngClass]=\"{ meta: mini() }\" class=\"{{ class() }} form-label mb-2 hide-scroll\">\n @for (item of files; track item) {\n <div class=\"row align-items-start mb-1\">\n <div class=\"col\">\n <div class=\"hide-scroll file-name\">\n {{ item?.name }}\n </div>\n </div>\n <div class=\"col-auto text-end\">\n <span class=\"text-danger pointer p-1 fa fa-close\" (click)=\"removeFile($index)\"></span>\n </div>\n </div>\n }\n </div>\n}\n<!-- <input type=\"file\" style=\"display: none;\" accept=\"{{accept}}\" (change)=\"onUpload($event)\" #uploadInput [multiple]=\"multiple\"> -->\n<app-btn\n icon=\"upload\"\n (mclick)=\"useWebcam() ? null : openDialog()\"\n [type]=\"file ? 'primary' : 'secondary'\"\n [disabled]=\"disabled\"\n [help]=\"help\"\n [text]=\"label\"\n [matMenuTriggerFor]=\"useWebcam() ? menu : null\" />\n\n<mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"openDialog()\">Upload</button>\n <button mat-menu-item (click)=\"webcamModal.open()\">Use Camera</button>\n</mat-menu>\n\n<modal-comp #webcamModal width=\"1080px\" [showFooter]=\"false\" header=\"Webcam\">\n <ng-template modalBody>\n <lib-webcam-media [fileName]=\"fileName()\" [width]=\"mediaWidth()\" (closed)=\"webcamModal.close(); $event ? acceptFiles($event) : null\" />\n </ng-template>\n</modal-comp>\n", styles: [".meta,.file-name{height:23px}.meta{overflow-y:auto}.file-name{overflow:auto}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: BtnComponent, selector: "app-btn", inputs: ["formSchema", "debug", "centerBtn", "danger", "warning", "icon", "rightIcon", "leftIcon", "type", "group", "actionType", "animate", "excludeLogging", "loggingValue", "badge", "class", "customIcon", "disabled", "form", "forms", "help", "iconBtn", "loading", "mclass", "showHelpIcon", "rightCustomIcon", "leftCustomIcon", "text", "valid", "mini", "onFormInvalid"], outputs: ["mclick"] }, { kind: "component", type: ModalComponent, selector: "modal-comp", inputs: ["header", "bodyTemplateRef", "footerTemplateRef", "showHeader", "loading", "isFullscreen", "showFooter", "width", "minWidth", "height", "maxHeight", "icon", "data", "disableClose", "hasBackdrop"], outputs: ["modalOpen", "modalClose"] }, { kind: "directive", type: ModalBodyDirective, selector: "[modalBody]" }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: WebcamMediaComponent, selector: "lib-webcam-media", inputs: ["isVideo", "useAudio", "fileName", "fileNameFactory", "fileType", "extraClass", "recordingNotificationInterval", "isBackground", "width"], outputs: ["closed", "recorderStopped", "recorderErrored", "recorderStarted", "recordingState", "recordingChanged", "widthChange"] }] }); }
|
|
12400
12400
|
}
|
|
12401
12401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
12402
12402
|
type: Component,
|
|
12403
|
-
args: [{ selector: 'app-file-upload', standalone: true, imports: [NgIf, NgClass, NgFor, BtnComponent, ModalComponents, MatMenuModule, WebcamMediaComponent], template: "@if (listFiles()) {\n <div [ngClass]=\"{ meta: mini() }\" class=\"{{ class() }} form-label mb-2 hide-scroll\">\n @for (item of files; track item) {\n <div class=\"row align-items-start mb-1\">\n <div class=\"col\">\n <div class=\"hide-scroll file-name\">\n {{ item?.name }}\n </div>\n </div>\n <div class=\"col-auto text-end\">\n <span class=\"text-danger pointer p-1 fa fa-close\" (click)=\"removeFile($index)\"></span>\n </div>\n </div>\n }\n </div>\n}\n<!-- <input type=\"file\" style=\"display: none;\" accept=\"{{accept}}\" (change)=\"onUpload($event)\" #uploadInput [multiple]=\"multiple\"> -->\n<app-btn\n icon=\"upload\"\n (mclick)=\"useWebcam() ? null : openDialog()\"\n [type]=\"file ? 'primary' : 'secondary'\"\n [disabled]=\"disabled\"\n [help]=\"help\"\n [text]=\"label\"\n [matMenuTriggerFor]=\"useWebcam() ? menu : null\" />\n\n<mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"openDialog()\">Upload</button>\n <button mat-menu-item (click)=\"webcamModal.open()\">Use Camera</button>\n</mat-menu>\n\n<modal-comp #webcamModal width=\"1080px\" header=\"Webcam\">\n <ng-template modalBody>\n <lib-webcam-media [fileName]=\"fileName()\" [width]=\"mediaWidth()\" (closed)=\"webcamModal.close(); acceptFiles($event)\" />\n </ng-template>\n</modal-comp>\n", styles: [".meta,.file-name{height:23px}.meta{overflow-y:auto}.file-name{overflow:auto}\n"] }]
|
|
12403
|
+
args: [{ selector: 'app-file-upload', standalone: true, imports: [NgIf, NgClass, NgFor, BtnComponent, ModalComponents, MatMenuModule, WebcamMediaComponent], template: "@if (listFiles()) {\n <div [ngClass]=\"{ meta: mini() }\" class=\"{{ class() }} form-label mb-2 hide-scroll\">\n @for (item of files; track item) {\n <div class=\"row align-items-start mb-1\">\n <div class=\"col\">\n <div class=\"hide-scroll file-name\">\n {{ item?.name }}\n </div>\n </div>\n <div class=\"col-auto text-end\">\n <span class=\"text-danger pointer p-1 fa fa-close\" (click)=\"removeFile($index)\"></span>\n </div>\n </div>\n }\n </div>\n}\n<!-- <input type=\"file\" style=\"display: none;\" accept=\"{{accept}}\" (change)=\"onUpload($event)\" #uploadInput [multiple]=\"multiple\"> -->\n<app-btn\n icon=\"upload\"\n (mclick)=\"useWebcam() ? null : openDialog()\"\n [type]=\"file ? 'primary' : 'secondary'\"\n [disabled]=\"disabled\"\n [help]=\"help\"\n [text]=\"label\"\n [matMenuTriggerFor]=\"useWebcam() ? menu : null\" />\n\n<mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"openDialog()\">Upload</button>\n <button mat-menu-item (click)=\"webcamModal.open()\">Use Camera</button>\n</mat-menu>\n\n<modal-comp #webcamModal width=\"1080px\" [showFooter]=\"false\" header=\"Webcam\">\n <ng-template modalBody>\n <lib-webcam-media [fileName]=\"fileName()\" [width]=\"mediaWidth()\" (closed)=\"webcamModal.close(); $event ? acceptFiles($event) : null\" />\n </ng-template>\n</modal-comp>\n", styles: [".meta,.file-name{height:23px}.meta{overflow-y:auto}.file-name{overflow:auto}\n"] }]
|
|
12404
12404
|
}], ctorParameters: () => [], propDecorators: { help: [{
|
|
12405
12405
|
type: Input
|
|
12406
12406
|
}], label: [{
|