carriera-intern 1.1.117 → 1.1.119
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.
|
@@ -40,8 +40,6 @@ const THUMBNAIL_QUALITY = 0.9;
|
|
|
40
40
|
const IMAGE_PREVIEW_CSS_WIDTH = 320;
|
|
41
41
|
const IMAGE_RESIZE_THRESHOLD_BYTES = 512 * 1024;
|
|
42
42
|
const VIDEO_THUMBNAIL_TIMEOUT_MS = 10_000;
|
|
43
|
-
const DOCUMENT_THUMBNAIL_FALLBACK = '/assets/exampledoc.png';
|
|
44
|
-
const VIDEO_THUMBNAIL_FALLBACK = '/assets/truck.png';
|
|
45
43
|
|
|
46
44
|
const INPUT_CHARACTER_SETS = {
|
|
47
45
|
DIGITS: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
|
|
@@ -4656,9 +4654,6 @@ class DocumentService {
|
|
|
4656
4654
|
* Generates a thumbnail for a given file, plus the page count for PDFs.
|
|
4657
4655
|
* Handles PDFs, videos, and images.
|
|
4658
4656
|
*
|
|
4659
|
-
* Never rejects: any failure falls back to a placeholder image, so a file
|
|
4660
|
-
* always has something to render.
|
|
4661
|
-
*
|
|
4662
4657
|
* @param file The file to generate a thumbnail for.
|
|
4663
4658
|
* @returns A promise that resolves to the thumbnail URL and, for PDFs, the
|
|
4664
4659
|
* page count.
|
|
@@ -4675,7 +4670,7 @@ class DocumentService {
|
|
|
4675
4670
|
}
|
|
4676
4671
|
catch (error) {
|
|
4677
4672
|
console.error('Error generating PDF thumbnail:', error);
|
|
4678
|
-
return { thumbnailUrl:
|
|
4673
|
+
return { thumbnailUrl: '' };
|
|
4679
4674
|
}
|
|
4680
4675
|
case 'mp4':
|
|
4681
4676
|
case 'mov':
|
|
@@ -4685,7 +4680,7 @@ class DocumentService {
|
|
|
4685
4680
|
}
|
|
4686
4681
|
catch (error) {
|
|
4687
4682
|
console.error('Error generating video thumbnail:', error);
|
|
4688
|
-
return { thumbnailUrl:
|
|
4683
|
+
return { thumbnailUrl: '' };
|
|
4689
4684
|
}
|
|
4690
4685
|
case 'jpg':
|
|
4691
4686
|
case 'jpeg':
|
|
@@ -4693,7 +4688,7 @@ class DocumentService {
|
|
|
4693
4688
|
case 'gif':
|
|
4694
4689
|
return { thumbnailUrl: await this.generateImageThumbnail(file) };
|
|
4695
4690
|
default:
|
|
4696
|
-
return { thumbnailUrl:
|
|
4691
|
+
return { thumbnailUrl: '' };
|
|
4697
4692
|
}
|
|
4698
4693
|
}
|
|
4699
4694
|
/**
|
|
@@ -4964,13 +4959,6 @@ class DropZoneDocumentsHelper {
|
|
|
4964
4959
|
reader.readAsDataURL(file);
|
|
4965
4960
|
});
|
|
4966
4961
|
}
|
|
4967
|
-
static splitExistingAndNewFiles(currentFiles, existingDocsSource) {
|
|
4968
|
-
const existingFileIds = existingDocsSource
|
|
4969
|
-
.filter((doc) => doc.fileId != null)
|
|
4970
|
-
.map((doc) => doc.fileId);
|
|
4971
|
-
const newFiles = currentFiles.filter((file) => !existingFileIds.includes(file.fileId));
|
|
4972
|
-
return newFiles;
|
|
4973
|
-
}
|
|
4974
4962
|
static async resolveFile(fileResponse) {
|
|
4975
4963
|
return (fileResponse.file ??
|
|
4976
4964
|
(await DropZoneDocumentsHelper.fetchFileAsFile(fileResponse)));
|
|
@@ -4985,7 +4973,7 @@ class DropZoneDocumentsHelper {
|
|
|
4985
4973
|
type: blob.type,
|
|
4986
4974
|
});
|
|
4987
4975
|
}
|
|
4988
|
-
catch
|
|
4976
|
+
catch {
|
|
4989
4977
|
return null;
|
|
4990
4978
|
}
|
|
4991
4979
|
}
|
|
@@ -4995,9 +4983,9 @@ class DropZoneDocumentsHelper {
|
|
|
4995
4983
|
}
|
|
4996
4984
|
}
|
|
4997
4985
|
static downloadFile(doc) {
|
|
4998
|
-
const source = doc.file
|
|
4986
|
+
const source = doc.file;
|
|
4999
4987
|
if (!source) {
|
|
5000
|
-
const remoteUrl = doc.
|
|
4988
|
+
const remoteUrl = doc.url;
|
|
5001
4989
|
if (!remoteUrl || remoteUrl.startsWith('blob:'))
|
|
5002
4990
|
return;
|
|
5003
4991
|
DropZoneDocumentsHelper.triggerDownload(remoteUrl, doc.fileName);
|
|
@@ -5497,8 +5485,6 @@ class DropZoneComponent {
|
|
|
5497
5485
|
previewUrl = DropZonePreviewUrlsHelper.track(this.previewUrlsState, thumbnailUrl);
|
|
5498
5486
|
pageCount = pages;
|
|
5499
5487
|
}
|
|
5500
|
-
if (!previewUrl)
|
|
5501
|
-
previewUrl = DOCUMENT_THUMBNAIL_FALLBACK;
|
|
5502
5488
|
const serverFileId = fileResp.fileId || 0;
|
|
5503
5489
|
return {
|
|
5504
5490
|
fileName: fileResp.fileName || '',
|
|
@@ -5507,6 +5493,7 @@ class DropZoneComponent {
|
|
|
5507
5493
|
uid: serverFileId ? String(serverFileId) : crypto.randomUUID(),
|
|
5508
5494
|
type: fileExtension,
|
|
5509
5495
|
size: fileResp.fileSize || 0,
|
|
5496
|
+
url: fileResp.url || '',
|
|
5510
5497
|
imagePreviewUrl: previewUrl,
|
|
5511
5498
|
file: file,
|
|
5512
5499
|
pageCount: pageCount,
|
|
@@ -8114,6 +8101,7 @@ class CaiInputDatetimePickerComponent {
|
|
|
8114
8101
|
this.isFocusedThroughPopoverToggle.set(false);
|
|
8115
8102
|
this.closePopover();
|
|
8116
8103
|
this.highlightedPart.set(null);
|
|
8104
|
+
this.markAsTouched();
|
|
8117
8105
|
this.blurInputEvent.emit();
|
|
8118
8106
|
}
|
|
8119
8107
|
togglePopover() {
|
|
@@ -11896,5 +11884,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
|
|
|
11896
11884
|
* Generated bundle index. Do not edit.
|
|
11897
11885
|
*/
|
|
11898
11886
|
|
|
11899
|
-
export { AvatarComponent, CaScrollableComponent, CaiInputDatetimePickerComponent, CopyComponent, CounterComponent, DEFAULT_CROP_ZOOM, DEFAULT_DUAL_DROP_ZONES, DOCS_OR_MEDIA_VARIANTS,
|
|
11887
|
+
export { AvatarComponent, CaScrollableComponent, CaiInputDatetimePickerComponent, CopyComponent, CounterComponent, DEFAULT_CROP_ZOOM, DEFAULT_DUAL_DROP_ZONES, DOCS_OR_MEDIA_VARIANTS, DROP_ZONE_CARD_SLIDER, DROP_ZONE_CARD_SLIDER_ITEM_WITH_GAP_PX, DUAL_DROP_TARGETS, DispatchDropdownComponent, DispatchLocationComponent, DocumentThumbnailHelper, DropZoneComponent, DropdownTypes, FILE_PROCESSING_CONCURRENCY, IMAGE_PREVIEW_CSS_WIDTH, IMAGE_PREVIEW_VARIANTS, IMAGE_RESIZE_THRESHOLD_BYTES, INPUT_CHARACTER_SETS, InputAddressComponent, InputComponent, IntervalDropdownComponent, ListContactDropdownComponent, PDFJS_ASSET_BASE, PmComponent, RatingReviewComponent, ReviewModalComponent, SelectedBusinessFieldComponent, StickyScrollbarComponent, THUMBNAIL_MIME, THUMBNAIL_QUALITY, THUMBNAIL_WIDTH, TabOptionDropdownComponent, TextAreaComponent, VIDEO_THUMBNAIL_TIMEOUT_MS, eScrollState, ignoreWhenAutofilled, sizes };
|
|
11900
11888
|
//# sourceMappingURL=carriera-intern.mjs.map
|