@ptsecurity/mosaic 17.5.1 → 17.5.2
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/core/version.mjs +2 -2
- package/esm2022/file-upload/multiple-file-upload.component.mjs +3 -4
- package/esm2022/file-upload/single-file-upload.component.mjs +9 -10
- package/esm2022/list/list-selection.component.mjs +4 -2
- package/esm2022/tree/tree-option.component.mjs +4 -3
- package/esm2022/tree/tree-selection.component.mjs +4 -2
- package/esm2022/tree-select/tree-select.component.mjs +7 -5
- package/fesm2022/ptsecurity-mosaic-core.mjs +1 -1
- package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs +10 -12
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-list.mjs +3 -1
- package/fesm2022/ptsecurity-mosaic-list.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs +6 -4
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tree.mjs +6 -3
- package/fesm2022/ptsecurity-mosaic-tree.mjs.map +1 -1
- package/file-upload/single-file-upload.component.scss +1 -1
- package/list/list-selection.component.d.ts +1 -1
- package/package.json +22 -22
@@ -254,9 +254,6 @@ class McMultipleFileUploadComponent extends McFileUploadBase {
|
|
254
254
|
return;
|
255
255
|
}
|
256
256
|
const filesToAdd = this.mapToFileItem(target.files);
|
257
|
-
/* even if the user selects the same file,
|
258
|
-
the onchange event will be triggered every time user clicks on the control.*/
|
259
|
-
this.renderer.setProperty(this.input.nativeElement, 'value', null);
|
260
257
|
this.files = [
|
261
258
|
...this.files,
|
262
259
|
...filesToAdd
|
@@ -264,6 +261,8 @@ class McMultipleFileUploadComponent extends McFileUploadBase {
|
|
264
261
|
this.filesAdded.emit(filesToAdd);
|
265
262
|
this.fileQueueChanged.emit(this.files);
|
266
263
|
this.onTouched();
|
264
|
+
// allows the same file selection every time user clicks on the control.
|
265
|
+
this.renderer.setProperty(target, 'value', null);
|
267
266
|
}
|
268
267
|
onFileDropped(files) {
|
269
268
|
if (this.disabled) {
|
@@ -485,15 +484,14 @@ class McSingleFileUploadComponent extends McFileUploadBase {
|
|
485
484
|
if (this.disabled) {
|
486
485
|
return;
|
487
486
|
}
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
if (files?.length) {
|
493
|
-
this.file = this.mapToFileItem(files[0]);
|
494
|
-
this.fileQueueChanged.emit(this._file);
|
487
|
+
const fileToAdd = target.files?.item(0);
|
488
|
+
if (fileToAdd) {
|
489
|
+
this.file = this.mapToFileItem(fileToAdd);
|
490
|
+
this.fileQueueChanged.emit(this.file);
|
495
491
|
}
|
496
492
|
this.onTouched();
|
493
|
+
// allows the same file selection every time user clicks on the control.
|
494
|
+
this.renderer.setProperty(target, 'value', null);
|
497
495
|
}
|
498
496
|
deleteItem(event) {
|
499
497
|
if (this.disabled) {
|
@@ -546,13 +544,13 @@ class McSingleFileUploadComponent extends McFileUploadBase {
|
|
546
544
|
this.separatedCaptionText = this.config.captionText.split('{{ browseLink }}');
|
547
545
|
}
|
548
546
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McSingleFileUploadComponent, deps: [{ token: MC_FILE_UPLOAD_CONFIGURATION, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
549
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: McSingleFileUploadComponent, selector: "mc-single-file-upload", inputs: { file: "file", accept: "accept", disabled: "disabled", errors: "errors", inputId: "inputId", customValidation: "customValidation", errorStateMatcher: "errorStateMatcher" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "mc-single-file-upload" }, queries: [{ propertyName: "hint", predicate: McHint }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"invalid\"\n (filesDropped)=\"onFileDropped($event)\">\n <div class=\"dropzone\" *ngIf=\"!file; else fileOutput\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<ng-container *ngIf=\"hasHint\">\n <div class=\"mc-file-upload__hint\">\n <ng-content select=\"mc-hint,[hint]\" />\n </div>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"file\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[mc-icon]\"></ng-content>\n </ng-container>\n\n <mc-progress-spinner\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></mc-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [mcEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <button mc-button\n class=\"mc-button_transparent\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n <i mc-icon=\"mc-close-circle_16\"></i>\n </button>\n </div>\n</ng-template>\n", styles: [".mc-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.mc-file-upload .dropzone,.mc-file-upload .file-item{display:flex;align-items:center}.mc-file-upload .mc-ellipsis-center{position:relative;display:flex}.mc-file-upload .mc-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.mc-file-upload .mc-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}.mc-file-upload__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}\n", "@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-file-upload{height:var(--mc-file-upload-size-single-height, 48px);padding-top:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-bottom:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-left:var(--mc-size-m, 12px);border-radius:var(--mc-file-upload-size-single-border-radius, 4px);border-width:var(--mc-file-upload-size-single-border-width, 1px);border-style:var(--mc-file-upload-size-single-border-style, dashed)}.mc-file-upload .dropzone .dropzone__text{margin-left:var(--mc-size-xs, 6px)}.mc-file-upload .file-item{width:100%}.mc-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%}.mc-file-upload .file-item .file-item__text-wrapper .file-item__text{margin-left:var(--mc-size-s, 8px);width:120px;flex-grow:1}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.McProgressSpinner, selector: "mc-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i3.McIcon, selector: "[mc-icon]", inputs: ["color"] }, { kind: "directive", type: i3.McIconCSSStyler, selector: "[mc-icon]" }, { kind: "component", type: i4$1.McButton, selector: "[mc-button]", inputs: ["color", "tabIndex", "disabled"] }, { kind: "directive", type: i4$1.McButtonCssStyler, selector: "[mc-button]" }, { kind: "directive", type: i5.McEllipsisCenterDirective, selector: "[mcEllipsisCenter]", inputs: ["mcEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: i6.McLink, selector: "[mc-link]", inputs: ["tabIndex", "disabled", "pseudo", "noUnderline", "caption", "useVisited", "print"], exportAs: ["mcLink"] }, { kind: "directive", type: McFileDropDirective, selector: "[mcFileDrop]", outputs: ["filesDropped"], exportAs: ["mcFileDrop"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
547
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: McSingleFileUploadComponent, selector: "mc-single-file-upload", inputs: { file: "file", accept: "accept", disabled: "disabled", errors: "errors", inputId: "inputId", customValidation: "customValidation", errorStateMatcher: "errorStateMatcher" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "mc-single-file-upload" }, queries: [{ propertyName: "hint", predicate: McHint }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"invalid\"\n (filesDropped)=\"onFileDropped($event)\">\n <div class=\"dropzone\" *ngIf=\"!file; else fileOutput\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<ng-container *ngIf=\"hasHint\">\n <div class=\"mc-file-upload__hint\">\n <ng-content select=\"mc-hint,[hint]\" />\n </div>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"file\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[mc-icon]\"></ng-content>\n </ng-container>\n\n <mc-progress-spinner\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></mc-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [mcEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <button mc-button\n class=\"mc-button_transparent\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n <i mc-icon=\"mc-close-circle_16\"></i>\n </button>\n </div>\n</ng-template>\n", styles: [".mc-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.mc-file-upload .dropzone,.mc-file-upload .file-item{display:flex;align-items:center}.mc-file-upload .mc-ellipsis-center{position:relative;display:flex}.mc-file-upload .mc-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.mc-file-upload .mc-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}.mc-file-upload__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}\n", "@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-single-file-upload .mc-file-upload{height:var(--mc-file-upload-size-single-height, 48px);padding-top:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-bottom:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-left:var(--mc-size-m, 12px);border-radius:var(--mc-file-upload-size-single-border-radius, 4px);border-width:var(--mc-file-upload-size-single-border-width, 1px);border-style:var(--mc-file-upload-size-single-border-style, dashed)}.mc-single-file-upload .mc-file-upload .dropzone .dropzone__text{margin-left:var(--mc-size-xs, 6px)}.mc-single-file-upload .mc-file-upload .file-item{width:100%}.mc-single-file-upload .mc-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%}.mc-single-file-upload .mc-file-upload .file-item .file-item__text-wrapper .file-item__text{margin-left:var(--mc-size-s, 8px);width:120px;flex-grow:1}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.McProgressSpinner, selector: "mc-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i3.McIcon, selector: "[mc-icon]", inputs: ["color"] }, { kind: "directive", type: i3.McIconCSSStyler, selector: "[mc-icon]" }, { kind: "component", type: i4$1.McButton, selector: "[mc-button]", inputs: ["color", "tabIndex", "disabled"] }, { kind: "directive", type: i4$1.McButtonCssStyler, selector: "[mc-button]" }, { kind: "directive", type: i5.McEllipsisCenterDirective, selector: "[mcEllipsisCenter]", inputs: ["mcEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: i6.McLink, selector: "[mc-link]", inputs: ["tabIndex", "disabled", "pseudo", "noUnderline", "caption", "useVisited", "print"], exportAs: ["mcLink"] }, { kind: "directive", type: McFileDropDirective, selector: "[mcFileDrop]", outputs: ["filesDropped"], exportAs: ["mcFileDrop"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
550
548
|
}
|
551
549
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McSingleFileUploadComponent, decorators: [{
|
552
550
|
type: Component,
|
553
551
|
args: [{ selector: 'mc-single-file-upload', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
554
552
|
class: 'mc-single-file-upload'
|
555
|
-
}, template: "<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"invalid\"\n (filesDropped)=\"onFileDropped($event)\">\n <div class=\"dropzone\" *ngIf=\"!file; else fileOutput\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<ng-container *ngIf=\"hasHint\">\n <div class=\"mc-file-upload__hint\">\n <ng-content select=\"mc-hint,[hint]\" />\n </div>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"file\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[mc-icon]\"></ng-content>\n </ng-container>\n\n <mc-progress-spinner\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></mc-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [mcEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <button mc-button\n class=\"mc-button_transparent\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n <i mc-icon=\"mc-close-circle_16\"></i>\n </button>\n </div>\n</ng-template>\n", styles: [".mc-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.mc-file-upload .dropzone,.mc-file-upload .file-item{display:flex;align-items:center}.mc-file-upload .mc-ellipsis-center{position:relative;display:flex}.mc-file-upload .mc-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.mc-file-upload .mc-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}.mc-file-upload__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}\n", "@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-file-upload{height:var(--mc-file-upload-size-single-height, 48px);padding-top:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-bottom:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-left:var(--mc-size-m, 12px);border-radius:var(--mc-file-upload-size-single-border-radius, 4px);border-width:var(--mc-file-upload-size-single-border-width, 1px);border-style:var(--mc-file-upload-size-single-border-style, dashed)}.mc-file-upload .dropzone .dropzone__text{margin-left:var(--mc-size-xs, 6px)}.mc-file-upload .file-item{width:100%}.mc-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%}.mc-file-upload .file-item .file-item__text-wrapper .file-item__text{margin-left:var(--mc-size-s, 8px);width:120px;flex-grow:1}\n"] }]
|
553
|
+
}, template: "<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"invalid\"\n (filesDropped)=\"onFileDropped($event)\">\n <div class=\"dropzone\" *ngIf=\"!file; else fileOutput\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<ng-container *ngIf=\"hasHint\">\n <div class=\"mc-file-upload__hint\">\n <ng-content select=\"mc-hint,[hint]\" />\n </div>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"file\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[mc-icon]\"></ng-content>\n </ng-container>\n\n <mc-progress-spinner\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></mc-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [mcEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <button mc-button\n class=\"mc-button_transparent\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n <i mc-icon=\"mc-close-circle_16\"></i>\n </button>\n </div>\n</ng-template>\n", styles: [".mc-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.mc-file-upload .dropzone,.mc-file-upload .file-item{display:flex;align-items:center}.mc-file-upload .mc-ellipsis-center{position:relative;display:flex}.mc-file-upload .mc-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.mc-file-upload .mc-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}.mc-file-upload__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}\n", "@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-single-file-upload .mc-file-upload{height:var(--mc-file-upload-size-single-height, 48px);padding-top:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-bottom:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-left:var(--mc-size-m, 12px);border-radius:var(--mc-file-upload-size-single-border-radius, 4px);border-width:var(--mc-file-upload-size-single-border-width, 1px);border-style:var(--mc-file-upload-size-single-border-style, dashed)}.mc-single-file-upload .mc-file-upload .dropzone .dropzone__text{margin-left:var(--mc-size-xs, 6px)}.mc-single-file-upload .mc-file-upload .file-item{width:100%}.mc-single-file-upload .mc-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%}.mc-single-file-upload .mc-file-upload .file-item .file-item__text-wrapper .file-item__text{margin-left:var(--mc-size-s, 8px);width:120px;flex-grow:1}\n"] }]
|
556
554
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
557
555
|
type: Optional
|
558
556
|
}, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ptsecurity-mosaic-file-upload.mjs","sources":["../../../packages/mosaic/file-upload/file-upload.ts","../../../packages/mosaic/file-upload/file-drop.ts","../../../packages/mosaic/file-upload/multiple-file-upload.component.ts","../../../packages/mosaic/file-upload/multiple-file-upload.component.html","../../../packages/mosaic/file-upload/single-file-upload.component.ts","../../../packages/mosaic/file-upload/single-file-upload.component.html","../../../packages/mosaic/file-upload/file-upload.module.ts","../../../packages/mosaic/file-upload/ptsecurity-mosaic-file-upload.ts"],"sourcesContent":["import { ChangeDetectorRef, DestroyRef, ElementRef, inject, InjectionToken, Renderer2 } from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm, UntypedFormControl } from '@angular/forms';\nimport { CanUpdateErrorState, ErrorStateMatcher, MC_LOCALE_SERVICE } from '@ptsecurity/mosaic/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\n\n\nexport interface McFile extends File {\n /* used when directory dropped */\n fullPath: string;\n}\n\nexport interface McFileItem {\n file: File;\n hasError?: boolean;\n loading?: BehaviorSubject<boolean>;\n progress?: BehaviorSubject<number>;\n}\n\nexport interface McInputFile {\n disabled: boolean;\n accept?: string[];\n onFileSelectedViaClick(event: Event): void;\n onFileDropped(files: FileList | McFile[]): void;\n}\n\nexport interface McInputFileLabel {\n /* Text for description, used with `browseLink` */\n captionText: string;\n /* Text for link with which the file(s) can be selected to download */\n browseLink: string;\n /* Header for multiple file-upload in default size */\n title?: string | undefined;\n}\n\n/**\n * @deprecated use FormControl for validation\n */\nexport type McFileValidatorFn = (file: File) => string | null;\n\n/* Object for labels customization inside file upload component */\nexport const MC_FILE_UPLOAD_CONFIGURATION = new InjectionToken<McInputFileLabel>('McFileUploadConfiguration');\n\n\n/** @docs-private */\nexport abstract class McFileUploadBase implements CanUpdateErrorState {\n /** Whether the component is in an error state. */\n errorState: boolean = false;\n\n /** An object used to control the error state of the component. */\n abstract errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Emits whenever the component state changes and should cause the parent\n * form-field to update. Implemented as part of `McFormFieldControl`.\n * @docs-private\n */\n readonly stateChanges = new Subject<void>();\n\n protected readonly renderer = inject(Renderer2);\n protected readonly cdr = inject(ChangeDetectorRef);\n protected readonly localeService = inject(MC_LOCALE_SERVICE, { optional: true });\n protected readonly destroyRef = inject(DestroyRef);\n protected readonly ngControl = inject(NgControl, { optional: true, self: true });\n protected readonly parentForm = inject(NgForm, { optional: true });\n protected readonly parentFormGroup = inject(FormGroupDirective, { optional: true });\n protected readonly defaultErrorStateMatcher = inject(ErrorStateMatcher);\n protected readonly elementRef = inject(ElementRef);\n\n /** implemented as part of base class. Decided not use mixinErrorState, not to over */\n updateErrorState() {\n const oldState = this.errorState;\n const parent = this.parentFormGroup || this.parentForm;\n const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;\n const control = this.ngControl ? (this.ngControl.control as UntypedFormControl) : null;\n const newState = matcher.isErrorState(control, parent);\n\n if (newState !== oldState) {\n this.errorState = newState;\n this.stateChanges.next();\n }\n }\n}\n","import { Directive, Output, EventEmitter } from '@angular/core';\n\nimport { McFile } from './file-upload';\n\n\nconst isFolderCanBeDragged = (): boolean => 'webkitGetAsEntry' in DataTransferItem.prototype;\nconst entryIsDirectory = (entry?: FileSystemEntry): entry is FileSystemDirectoryEntry => !!entry && entry.isDirectory;\nconst entryIsFile = (entry?: FileSystemEntry): entry is FileSystemFileEntry => !!entry && entry.isFile;\n\n\n@Directive({\n selector: '[mcFileDrop]',\n exportAs: 'mcFileDrop',\n host: {\n '[class.dragover]': 'dragover',\n '(dragover)': 'onDragOver($event)',\n '(dragleave)': 'onDragLeave($event)',\n '(drop)': 'onDrop($event)'\n }\n})\nexport class McFileDropDirective {\n dragover: boolean;\n\n @Output() filesDropped: EventEmitter<FileList | McFile[]> = new EventEmitter<FileList | McFile[]>();\n\n onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.dragover = true;\n }\n\n onDragLeave(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.dragover = false;\n }\n\n onDrop(event: DragEvent) {\n if (!isFolderCanBeDragged()) {\n console.warn('Drag-and-drop functionality for folders is not supported by this browser.');\n }\n\n event.preventDefault();\n event.stopPropagation();\n this.dragover = false;\n\n if (event.dataTransfer && event.dataTransfer.items.length > 0) {\n // event.dataTransfer.items requires dom.iterable lib\n // @ts-ignore\n const fileEntries: FileSystemEntry[] = [...event.dataTransfer.items]\n .filter((item: DataTransferItem) => item.kind === 'file')\n .map((item) => item.webkitGetAsEntry() as FileSystemEntry);\n\n Promise.all(fileEntries.map(unwrapDirectory))\n .then((fileList) => fileList.reduce((res, next) => res.concat(next), []))\n .then((entries: McFile[]) => this.filesDropped.emit(entries));\n }\n }\n}\n\nconst unwrapDirectory = async (item: FileSystemEntry): Promise<McFile[]> => {\n const queue: (FileSystemEntry | Promise<FileSystemEntry[]>)[] = [item];\n const result: Promise<McFile>[] = [];\n\n while (queue.length > 0) {\n const next = queue.pop();\n if (next instanceof Promise) {\n queue.push(...(await next));\n } else if (entryIsDirectory(next)) {\n const directoryReader = next.createReader();\n\n queue.push(\n new Promise<FileSystemEntry[]>((resolve, reject) => directoryReader.readEntries(resolve, reject))\n );\n } else if (entryIsFile(next)) {\n const fileEntry = next;\n result.push(\n new Promise((resolve, reject) => {\n fileEntry.file(\n (file) => {\n (file as McFile).fullPath = fileEntry.fullPath;\n resolve(file as McFile);\n },\n reject);\n })\n );\n }\n }\n\n return Promise.all(result);\n};\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren, DoCheck,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n CanDisable, CanUpdateErrorState,\n ErrorStateMatcher,\n ruRULocaleData\n} from '@ptsecurity/mosaic/core';\nimport { McHint } from '@ptsecurity/mosaic/form-field';\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n MC_FILE_UPLOAD_CONFIGURATION,\n McFile,\n McFileItem, McFileUploadBase,\n McFileValidatorFn,\n McInputFile,\n McInputFileLabel\n} from './file-upload';\n\n\nlet nextMultipleFileUploadUniqueId = 0;\nexport interface McInputFileMultipleLabel extends McInputFileLabel {\n captionTextWhenSelected: string;\n captionTextForCompactSize: string;\n gridHeaders: {\n file: string;\n size: string;\n };\n [k: string | number | symbol]: unknown;\n}\n\n\nexport const MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION: McInputFileMultipleLabel =\n ruRULocaleData['ru-RU'].fileUpload.multiple;\n\n@Component({\n selector: 'mc-multiple-file-upload',\n templateUrl: './multiple-file-upload.component.html',\n styleUrls: ['./file-upload.scss', './multiple-file-upload.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'mc-multiple-file-upload'\n }\n})\nexport class McMultipleFileUploadComponent\n extends McFileUploadBase\n implements AfterViewInit, DoCheck, McInputFile, CanDisable, CanUpdateErrorState {\n @Input() accept?: string[];\n @Input() disabled: boolean;\n @Input() errors: string[] = [];\n @Input() size: 'compact' | 'default' = 'default';\n /**\n * custom ID for the file input element.\n */\n @Input() inputId: string = `mc-multiple-file-upload-${nextMultipleFileUploadUniqueId++}`;\n /**\n * @deprecated use `FormControl.errors`\n */\n @Input() customValidation?: McFileValidatorFn[];\n\n /** An object used to control the error state of the component. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n get files(): McFileItem[] {\n return this._files;\n }\n\n @Input()\n set files(currentFileList: McFileItem[]) {\n this._files = currentFileList;\n this.cvaOnChange(this._files);\n this.cdr.markForCheck();\n }\n\n private _files: McFileItem[] = [];\n\n @Output() fileQueueChanged: EventEmitter<McFileItem[]> = new EventEmitter<McFileItem[]>();\n\n /**\n * Emits an event containing a chunk of files added to the file list.\n */\n @Output() filesAdded: EventEmitter<McFileItem[]> = new EventEmitter<McFileItem[]>();\n /**\n * Emits an event containing a file and file's index when removed from the file list.\n */\n @Output() fileRemoved: EventEmitter<[McFileItem, number]> = new EventEmitter<[McFileItem, number]>();\n\n @ContentChild('mcFileIcon', { static: false, read: TemplateRef }) customFileIcon: TemplateRef<HTMLElement>;\n\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n @ContentChildren(McHint) readonly hint: QueryList<TemplateRef<any>>;\n\n columnDefs: { header: string; cssClass: string }[];\n\n config: McInputFileMultipleLabel;\n\n separatedCaptionText: string[];\n separatedCaptionTextWhenSelected: string[];\n separatedCaptionTextForCompactSize: string[];\n\n get acceptedFiles(): string {\n return this.accept && this.accept.length > 0 ? this.accept.map((ext: string) => `.${ext}`).join(',') : '*/*';\n }\n\n /**\n * @deprecated use `FormControl.errors`\n */\n get hasErrors(): boolean {\n return this.errors && !!this.errors.length;\n }\n\n get hasHint(): boolean {\n return this.hint.length > 0;\n }\n\n /**\n * Indicates an invalid state based on file errors or `errorState`,\n * applying a CSS class in HTML for visual feedback.\n */\n get invalid(): boolean {\n return this.errorState;\n }\n\n constructor(\n @Optional() @Inject(MC_FILE_UPLOAD_CONFIGURATION) readonly configuration: McInputFileMultipleLabel\n ) {\n super();\n this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams);\n\n if (!this.localeService) {\n this.initDefaultParams();\n }\n\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngAfterViewInit() {\n // FormControl specific errors update\n this.ngControl?.statusChanges\n ?.pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.errors = Object.values(this.ngControl?.errors || {});\n this.cdr.markForCheck();\n });\n\n this.stateChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.cdr.markForCheck());\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n }\n\n /** cvaOnChange function registered via registerOnChange (ControlValueAccessor). @docs-private */\n // tslint:disable-next-line:no-empty\n cvaOnChange = (_: McFileItem[]) => {};\n\n /** onTouch function registered via registerOnTouch (ControlValueAccessor). @docs-private */\n // tslint:disable-next-line:no-empty\n onTouched = () => {};\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n writeValue(files: FileList | McFileItem[] | null): void {\n this.files = files instanceof FileList || !files ? this.mapToFileItem(files) : files;\n this.fileQueueChanged.emit(this.files);\n }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n registerOnChange(fn: any): void { this.cvaOnChange = fn; }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n registerOnTouched(fn: any): void { this.onTouched = fn; }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n * @docs-private\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onFileSelectedViaClick({ target }: Event) {\n if (this.disabled) { return; }\n\n const filesToAdd = this.mapToFileItem((target as HTMLInputElement).files);\n\n /* even if the user selects the same file,\n the onchange event will be triggered every time user clicks on the control.*/\n this.renderer.setProperty(this.input.nativeElement, 'value', null);\n\n this.files = [\n ...this.files,\n ...filesToAdd\n ];\n this.filesAdded.emit(filesToAdd);\n this.fileQueueChanged.emit(this.files);\n this.onTouched();\n }\n\n onFileDropped(files: FileList | McFile[]) {\n if (this.disabled) { return; }\n\n const filesToAdd = this.mapToFileItem(files);\n\n this.files = [\n ...this.files,\n ...filesToAdd\n ];\n this.filesAdded.emit(filesToAdd);\n this.fileQueueChanged.emit(this.files);\n this.onTouched();\n }\n\n deleteFile(index: number, event?: MouseEvent) {\n if (this.disabled) { return; }\n event?.stopPropagation();\n const removedFile = this.files.splice(index, 1)[0];\n\n this.files = [...this.files];\n this.fileRemoved.emit([removedFile, index]);\n this.fileQueueChanged.emit(this.files);\n this.onTouched();\n }\n\n onFileListChange(): void {\n this.fileQueueChanged.emit(this.files);\n }\n\n private updateLocaleParams = () => {\n this.config = this.configuration || this.localeService?.getParams('fileUpload').multiple;\n\n this.columnDefs = [\n { header: this.config.gridHeaders.file, cssClass: 'file' },\n { header: this.config.gridHeaders.size, cssClass: 'size' },\n { header: '', cssClass: 'action' }\n ];\n\n this.makeCaptionText();\n\n this.cdr.markForCheck();\n }\n\n private mapToFileItem(files: FileList | McFile[] | null): McFileItem[] {\n if (!files) { return []; }\n\n return Array.from(files)\n .filter((file) => this.isCorrectExtension(file))\n .map((file: File) => ({\n file,\n hasError: this.validateFile(file),\n loading: new BehaviorSubject<boolean>(false),\n progress: new BehaviorSubject<number>(0)\n }));\n }\n\n private validateFile(file: File): boolean | undefined {\n if (this.customValidation && this.customValidation.length) {\n const errorsPerFile = this.customValidation.reduce(\n (errors: (string | null)[], validatorFn: McFileValidatorFn) => {\n errors.push(validatorFn(file));\n\n return errors;\n },\n []).filter(Boolean) as string[];\n\n this.errors = [\n ...this.errors,\n ...errorsPerFile\n ];\n\n return !!errorsPerFile.length;\n }\n }\n\n private isCorrectExtension(file: File): boolean {\n const fileExt: string = file.name.split('.').pop() || '';\n\n return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;\n }\n\n private initDefaultParams() {\n this.config = MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;\n\n this.columnDefs = [\n { header: this.config.gridHeaders.file, cssClass: 'file' },\n { header: this.config.gridHeaders.size, cssClass: 'size' },\n { header: '', cssClass: 'action' }\n ];\n\n this.makeCaptionText();\n }\n\n private makeCaptionText() {\n this.separatedCaptionText = this.config.captionText.split('{{ browseLink }}');\n this.separatedCaptionTextWhenSelected = this.config.captionTextWhenSelected.split('{{ browseLink }}');\n this.separatedCaptionTextForCompactSize = this.config.captionTextForCompactSize.split('{{ browseLink }}');\n }\n}\n","<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"errorState\"\n [class.selected]=\"files && files.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\"\n>\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default' else compactCaption\">\n <i mc-icon=\"mc-upload-to-cloud_64\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"hasHint\">\n <div class=\"mc-file-upload__hint\">\n <ng-content select=\"mc-hint,[hint]\" />\n </div>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"mc-file-upload__grid\">\n <div class=\"mc-file-multiple-uploaded__header\">\n <div class=\"mc-file-multiple-uploaded__header-inner\">\n <div [class]=\"'mc-file-upload__' + column.cssClass\" *ngFor=\"let column of columnDefs\">\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <mc-list-selection [autoSelect]=\"false\" [disabled]=\"disabled\">\n <mc-list-option\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.delete)=\"deleteFile(index)\"\n (keydown.backspace)=\"deleteFile(index)\"\n *ngFor=\"let file of files; let index = index;\">\n <div class=\"mc-file-upload__row\" [class.error]=\"file.hasError\">\n <div class=\"mc-file-upload__file\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\"\n >\n </ng-container>\n\n <mc-progress-spinner\n class=\"pt-nat-file-upload-name-cell__icon\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></mc-progress-spinner>\n </ng-container>\n\n <span class=\"file-item__text\" [mcEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></span>\n </div>\n <div class=\"mc-file-upload__size\">\n {{ file.file.size | mcDataSize }}\n </div>\n <div class=\"mc-file-upload__action\">\n <i mc-icon=\"mc-close-circle_16\" (click)=\"deleteFile(index, $event)\"></i>\n </div>\n </div>\n </mc-list-option>\n </mc-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n\n<ng-template #inputTemplate>\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n multiple\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component, ContentChildren, DoCheck,\n ElementRef,\n EventEmitter, Inject,\n Input, Optional,\n Output, QueryList,\n ViewChild, ViewEncapsulation\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ControlValueAccessor, FormControlStatus } from '@angular/forms';\nimport {\n CanDisable,\n ErrorStateMatcher,\n ruRULocaleData\n} from '@ptsecurity/mosaic/core';\nimport { McHint } from '@ptsecurity/mosaic/form-field';\nimport { BehaviorSubject } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\nimport {\n MC_FILE_UPLOAD_CONFIGURATION,\n McFile,\n McFileItem, McFileUploadBase,\n McFileValidatorFn,\n McInputFile,\n McInputFileLabel\n} from './file-upload';\n\n\nlet nextSingleFileUploadUniqueId = 0;\n\nexport const MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION: McInputFileLabel = ruRULocaleData['ru-RU'].fileUpload.single;\n\n@Component({\n selector: 'mc-single-file-upload',\n templateUrl: './single-file-upload.component.html',\n styleUrls: ['./file-upload.scss', './single-file-upload.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'mc-single-file-upload'\n }\n})\nexport class McSingleFileUploadComponent\n extends McFileUploadBase\n implements McInputFile, CanDisable, DoCheck, ControlValueAccessor {\n get file(): McFileItem | null {\n return this._file;\n }\n\n @Input()\n set file(currentFile: McFileItem | null) {\n this._file = currentFile;\n this.cvaOnChange(this._file);\n this.cdr.markForCheck();\n }\n private _file: McFileItem | null = null;\n\n get acceptedFiles(): string {\n return this.accept && this.accept.length > 0 ? this.accept.map((ext: string) => `.${ext}`).join(',') : '*/*';\n }\n get hasHint(): boolean {\n return this.hint.length > 0;\n }\n\n /**\n * Indicates an invalid state based on `errorState`,\n * applying a CSS class in HTML for visual feedback.\n */\n get invalid(): boolean {\n return !!this.file?.hasError || this.errorState;\n }\n\n @Input() accept: string[];\n @Input() disabled: boolean = false;\n /**\n * @deprecated use `FormControl.errors`\n */\n @Input() errors: string[] = [];\n @Input() inputId: string = `mc-single-file-upload-${nextSingleFileUploadUniqueId++}`;\n /**\n * @deprecated use FormControl for validation\n */\n @Input() customValidation?: McFileValidatorFn[];\n\n /** An object used to control the error state of the component. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n @Output() fileQueueChanged: EventEmitter<McFileItem | null> = new EventEmitter<McFileItem | null>();\n\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n config: McInputFileLabel;\n\n separatedCaptionText: string[];\n\n @ContentChildren(McHint) private readonly hint: QueryList<McHint>;\n\n constructor(\n @Optional() @Inject(MC_FILE_UPLOAD_CONFIGURATION) readonly configuration: McInputFileLabel\n ) {\n super();\n this.localeService?.changes.pipe(takeUntilDestroyed())\n .subscribe(this.updateLocaleParams);\n\n if (!this.localeService) {\n this.initDefaultParams();\n }\n\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n }\n\n /** cvaOnChange function registered via registerOnChange (ControlValueAccessor).\n * @docs-private\n */\n // tslint:disable-next-line:no-empty\n cvaOnChange = (_: McFileItem | null) => {};\n\n /** onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n // tslint:disable-next-line:no-empty\n onTouched = () => {};\n\n ngAfterViewInit() {\n // FormControl specific errors update\n this.ngControl?.statusChanges?.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe((status: FormControlStatus) => {\n if (this._file) { this._file.hasError = status === 'INVALID'; }\n this.errors = Object.values(this.ngControl?.errors || {});\n this.cdr.markForCheck();\n });\n\n this.stateChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.cdr.markForCheck());\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n writeValue(file: File | McFileItem | null): void {\n this.file = file instanceof File ? this.mapToFileItem(file) : file;\n this.fileQueueChanged.emit(this._file);\n }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n registerOnChange(fn: any): void { this.cvaOnChange = fn; }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n registerOnTouched(fn: any): void { this.onTouched = fn; }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n * @docs-private\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onFileSelectedViaClick({ target }: Event): void {\n if (this.disabled) { return; }\n\n /* even if the user selects the same file,\n the onchange event will be triggered every time user clicks on the control.*/\n this.renderer.setProperty(this.input.nativeElement, 'value', null);\n\n const files: FileList | null = (target as HTMLInputElement).files;\n if (files?.length) {\n this.file = this.mapToFileItem(files[0]);\n this.fileQueueChanged.emit(this._file);\n }\n this.onTouched();\n }\n\n deleteItem(event?: MouseEvent): void {\n if (this.disabled) { return; }\n\n event?.stopPropagation();\n this.file = null;\n this.fileQueueChanged.emit(this.file);\n this.errors = [];\n // mark as touched after file drop even if file wasn't correct\n this.onTouched();\n }\n\n onFileDropped(files: FileList | McFile[]): void {\n if (this.disabled) { return; }\n\n if (files?.length && this.isCorrectExtension(files[0])) {\n this.file = this.mapToFileItem(files[0]);\n this.fileQueueChanged.emit(this.file);\n }\n // mark as touched after file drop even if file wasn't correct\n this.onTouched();\n }\n\n private mapToFileItem(file: File): McFileItem {\n this.validateFile(file);\n\n return {\n file,\n progress: new BehaviorSubject<number>(0),\n loading: new BehaviorSubject<boolean>(false)\n };\n }\n\n private validateFile(file: File): void {\n if (!this.customValidation?.length) { return; }\n this.errors = this.customValidation.reduce(\n (errors: (string | null)[], validatorFn: McFileValidatorFn) => {\n errors.push(validatorFn(file));\n\n return errors;\n },\n []).filter(Boolean) as string[];\n }\n\n private isCorrectExtension(file: File): boolean {\n const fileExt: string = file.name.split('.').pop() || '';\n\n return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;\n }\n\n private updateLocaleParams = () => {\n this.config = this.configuration || this.localeService?.getParams('fileUpload').multiple;\n\n this.makeCaptionText();\n\n this.cdr.markForCheck();\n }\n\n private initDefaultParams() {\n this.config = MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;\n\n this.makeCaptionText();\n }\n\n private makeCaptionText() {\n this.separatedCaptionText = this.config.captionText.split('{{ browseLink }}');\n }\n}\n","<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"invalid\"\n (filesDropped)=\"onFileDropped($event)\">\n <div class=\"dropzone\" *ngIf=\"!file; else fileOutput\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<ng-container *ngIf=\"hasHint\">\n <div class=\"mc-file-upload__hint\">\n <ng-content select=\"mc-hint,[hint]\" />\n </div>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"file\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[mc-icon]\"></ng-content>\n </ng-container>\n\n <mc-progress-spinner\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></mc-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [mcEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <button mc-button\n class=\"mc-button_transparent\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n <i mc-icon=\"mc-close-circle_16\"></i>\n </button>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { McButtonModule } from '@ptsecurity/mosaic/button';\nimport { McDataSizeModule } from '@ptsecurity/mosaic/core';\nimport { McEllipsisCenterModule } from '@ptsecurity/mosaic/ellipsis-center';\nimport { McFormFieldModule } from '@ptsecurity/mosaic/form-field';\nimport { McIconModule } from '@ptsecurity/mosaic/icon';\nimport { McLinkModule } from '@ptsecurity/mosaic/link';\nimport { McListModule } from '@ptsecurity/mosaic/list';\nimport { McProgressSpinnerModule } from '@ptsecurity/mosaic/progress-spinner';\nimport { McToolTipModule } from '@ptsecurity/mosaic/tooltip';\n\nimport { McFileDropDirective } from './file-drop';\nimport { McMultipleFileUploadComponent } from './multiple-file-upload.component';\nimport { McSingleFileUploadComponent } from './single-file-upload.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n McToolTipModule,\n McProgressSpinnerModule,\n McIconModule,\n McButtonModule,\n McListModule,\n McFormFieldModule,\n McEllipsisCenterModule,\n McDataSizeModule,\n McLinkModule\n ],\n declarations: [\n McFileDropDirective,\n McSingleFileUploadComponent,\n McMultipleFileUploadComponent\n ],\n exports: [\n McSingleFileUploadComponent,\n McMultipleFileUploadComponent,\n McFileDropDirective\n ]\n})\nexport class McFileUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i7.McFileDropDirective","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuCA;MACa,4BAA4B,GAAG,IAAI,cAAc,CAAmB,2BAA2B,EAAE;AAG9G;MACsB,gBAAgB,CAAA;AAAtC,IAAA,WAAA,GAAA;;QAEI,IAAU,CAAA,UAAA,GAAY,KAAK,CAAC;AAK5B;;;;AAIG;AACM,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ,CAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAC7B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAChC,IAAa,CAAA,aAAA,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAChC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9D,IAAU,CAAA,UAAA,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAChD,IAAe,CAAA,eAAA,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACjE,QAAA,IAAA,CAAA,wBAAwB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACrD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;KAetD;;IAZG,gBAAgB,GAAA;AACZ,QAAA,M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B,2BAA2B;wBAC3B,6BAA6B;AAChC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,2BAA2B;wBAC3B,6BAA6B;wBAC7B,mBAAmB;AACtB,qBAAA;AACJ,iBAAA,CAAA;;;AC3CD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"ptsecurity-mosaic-file-upload.mjs","sources":["../../../packages/mosaic/file-upload/file-upload.ts","../../../packages/mosaic/file-upload/file-drop.ts","../../../packages/mosaic/file-upload/multiple-file-upload.component.ts","../../../packages/mosaic/file-upload/multiple-file-upload.component.html","../../../packages/mosaic/file-upload/single-file-upload.component.ts","../../../packages/mosaic/file-upload/single-file-upload.component.html","../../../packages/mosaic/file-upload/file-upload.module.ts","../../../packages/mosaic/file-upload/ptsecurity-mosaic-file-upload.ts"],"sourcesContent":["import { ChangeDetectorRef, DestroyRef, ElementRef, inject, InjectionToken, Renderer2 } from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm, UntypedFormControl } from '@angular/forms';\nimport { CanUpdateErrorState, ErrorStateMatcher, MC_LOCALE_SERVICE } from '@ptsecurity/mosaic/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\n\n\nexport interface McFile extends File {\n /* used when directory dropped */\n fullPath: string;\n}\n\nexport interface McFileItem {\n file: File;\n hasError?: boolean;\n loading?: BehaviorSubject<boolean>;\n progress?: BehaviorSubject<number>;\n}\n\nexport interface McInputFile {\n disabled: boolean;\n accept?: string[];\n onFileSelectedViaClick(event: Event): void;\n onFileDropped(files: FileList | McFile[]): void;\n}\n\nexport interface McInputFileLabel {\n /* Text for description, used with `browseLink` */\n captionText: string;\n /* Text for link with which the file(s) can be selected to download */\n browseLink: string;\n /* Header for multiple file-upload in default size */\n title?: string | undefined;\n}\n\n/**\n * @deprecated use FormControl for validation\n */\nexport type McFileValidatorFn = (file: File) => string | null;\n\n/* Object for labels customization inside file upload component */\nexport const MC_FILE_UPLOAD_CONFIGURATION = new InjectionToken<McInputFileLabel>('McFileUploadConfiguration');\n\n\n/** @docs-private */\nexport abstract class McFileUploadBase implements CanUpdateErrorState {\n /** Whether the component is in an error state. */\n errorState: boolean = false;\n\n /** An object used to control the error state of the component. */\n abstract errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Emits whenever the component state changes and should cause the parent\n * form-field to update. Implemented as part of `McFormFieldControl`.\n * @docs-private\n */\n readonly stateChanges = new Subject<void>();\n\n protected readonly renderer = inject(Renderer2);\n protected readonly cdr = inject(ChangeDetectorRef);\n protected readonly localeService = inject(MC_LOCALE_SERVICE, { optional: true });\n protected readonly destroyRef = inject(DestroyRef);\n protected readonly ngControl = inject(NgControl, { optional: true, self: true });\n protected readonly parentForm = inject(NgForm, { optional: true });\n protected readonly parentFormGroup = inject(FormGroupDirective, { optional: true });\n protected readonly defaultErrorStateMatcher = inject(ErrorStateMatcher);\n protected readonly elementRef = inject(ElementRef);\n\n /** implemented as part of base class. Decided not use mixinErrorState, not to over */\n updateErrorState() {\n const oldState = this.errorState;\n const parent = this.parentFormGroup || this.parentForm;\n const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;\n const control = this.ngControl ? (this.ngControl.control as UntypedFormControl) : null;\n const newState = matcher.isErrorState(control, parent);\n\n if (newState !== oldState) {\n this.errorState = newState;\n this.stateChanges.next();\n }\n }\n}\n","import { Directive, Output, EventEmitter } from '@angular/core';\n\nimport { McFile } from './file-upload';\n\n\nconst isFolderCanBeDragged = (): boolean => 'webkitGetAsEntry' in DataTransferItem.prototype;\nconst entryIsDirectory = (entry?: FileSystemEntry): entry is FileSystemDirectoryEntry => !!entry && entry.isDirectory;\nconst entryIsFile = (entry?: FileSystemEntry): entry is FileSystemFileEntry => !!entry && entry.isFile;\n\n\n@Directive({\n selector: '[mcFileDrop]',\n exportAs: 'mcFileDrop',\n host: {\n '[class.dragover]': 'dragover',\n '(dragover)': 'onDragOver($event)',\n '(dragleave)': 'onDragLeave($event)',\n '(drop)': 'onDrop($event)'\n }\n})\nexport class McFileDropDirective {\n dragover: boolean;\n\n @Output() filesDropped: EventEmitter<FileList | McFile[]> = new EventEmitter<FileList | McFile[]>();\n\n onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.dragover = true;\n }\n\n onDragLeave(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.dragover = false;\n }\n\n onDrop(event: DragEvent) {\n if (!isFolderCanBeDragged()) {\n console.warn('Drag-and-drop functionality for folders is not supported by this browser.');\n }\n\n event.preventDefault();\n event.stopPropagation();\n this.dragover = false;\n\n if (event.dataTransfer && event.dataTransfer.items.length > 0) {\n // event.dataTransfer.items requires dom.iterable lib\n // @ts-ignore\n const fileEntries: FileSystemEntry[] = [...event.dataTransfer.items]\n .filter((item: DataTransferItem) => item.kind === 'file')\n .map((item) => item.webkitGetAsEntry() as FileSystemEntry);\n\n Promise.all(fileEntries.map(unwrapDirectory))\n .then((fileList) => fileList.reduce((res, next) => res.concat(next), []))\n .then((entries: McFile[]) => this.filesDropped.emit(entries));\n }\n }\n}\n\nconst unwrapDirectory = async (item: FileSystemEntry): Promise<McFile[]> => {\n const queue: (FileSystemEntry | Promise<FileSystemEntry[]>)[] = [item];\n const result: Promise<McFile>[] = [];\n\n while (queue.length > 0) {\n const next = queue.pop();\n if (next instanceof Promise) {\n queue.push(...(await next));\n } else if (entryIsDirectory(next)) {\n const directoryReader = next.createReader();\n\n queue.push(\n new Promise<FileSystemEntry[]>((resolve, reject) => directoryReader.readEntries(resolve, reject))\n );\n } else if (entryIsFile(next)) {\n const fileEntry = next;\n result.push(\n new Promise((resolve, reject) => {\n fileEntry.file(\n (file) => {\n (file as McFile).fullPath = fileEntry.fullPath;\n resolve(file as McFile);\n },\n reject);\n })\n );\n }\n }\n\n return Promise.all(result);\n};\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren, DoCheck,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n CanDisable, CanUpdateErrorState,\n ErrorStateMatcher,\n ruRULocaleData\n} from '@ptsecurity/mosaic/core';\nimport { McHint } from '@ptsecurity/mosaic/form-field';\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n MC_FILE_UPLOAD_CONFIGURATION,\n McFile,\n McFileItem, McFileUploadBase,\n McFileValidatorFn,\n McInputFile,\n McInputFileLabel\n} from './file-upload';\n\n\nlet nextMultipleFileUploadUniqueId = 0;\nexport interface McInputFileMultipleLabel extends McInputFileLabel {\n captionTextWhenSelected: string;\n captionTextForCompactSize: string;\n gridHeaders: {\n file: string;\n size: string;\n };\n [k: string | number | symbol]: unknown;\n}\n\n\nexport const MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION: McInputFileMultipleLabel =\n ruRULocaleData['ru-RU'].fileUpload.multiple;\n\n@Component({\n selector: 'mc-multiple-file-upload',\n templateUrl: './multiple-file-upload.component.html',\n styleUrls: ['./file-upload.scss', './multiple-file-upload.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'mc-multiple-file-upload'\n }\n})\nexport class McMultipleFileUploadComponent\n extends McFileUploadBase\n implements AfterViewInit, DoCheck, McInputFile, CanDisable, CanUpdateErrorState {\n @Input() accept?: string[];\n @Input() disabled: boolean;\n @Input() errors: string[] = [];\n @Input() size: 'compact' | 'default' = 'default';\n /**\n * custom ID for the file input element.\n */\n @Input() inputId: string = `mc-multiple-file-upload-${nextMultipleFileUploadUniqueId++}`;\n /**\n * @deprecated use `FormControl.errors`\n */\n @Input() customValidation?: McFileValidatorFn[];\n\n /** An object used to control the error state of the component. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n get files(): McFileItem[] {\n return this._files;\n }\n\n @Input()\n set files(currentFileList: McFileItem[]) {\n this._files = currentFileList;\n this.cvaOnChange(this._files);\n this.cdr.markForCheck();\n }\n\n private _files: McFileItem[] = [];\n\n @Output() fileQueueChanged: EventEmitter<McFileItem[]> = new EventEmitter<McFileItem[]>();\n\n /**\n * Emits an event containing a chunk of files added to the file list.\n */\n @Output() filesAdded: EventEmitter<McFileItem[]> = new EventEmitter<McFileItem[]>();\n /**\n * Emits an event containing a file and file's index when removed from the file list.\n */\n @Output() fileRemoved: EventEmitter<[McFileItem, number]> = new EventEmitter<[McFileItem, number]>();\n\n @ContentChild('mcFileIcon', { static: false, read: TemplateRef }) customFileIcon: TemplateRef<HTMLElement>;\n\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n @ContentChildren(McHint) readonly hint: QueryList<TemplateRef<any>>;\n\n columnDefs: { header: string; cssClass: string }[];\n\n config: McInputFileMultipleLabel;\n\n separatedCaptionText: string[];\n separatedCaptionTextWhenSelected: string[];\n separatedCaptionTextForCompactSize: string[];\n\n get acceptedFiles(): string {\n return this.accept && this.accept.length > 0 ? this.accept.map((ext: string) => `.${ext}`).join(',') : '*/*';\n }\n\n /**\n * @deprecated use `FormControl.errors`\n */\n get hasErrors(): boolean {\n return this.errors && !!this.errors.length;\n }\n\n get hasHint(): boolean {\n return this.hint.length > 0;\n }\n\n /**\n * Indicates an invalid state based on file errors or `errorState`,\n * applying a CSS class in HTML for visual feedback.\n */\n get invalid(): boolean {\n return this.errorState;\n }\n\n constructor(\n @Optional() @Inject(MC_FILE_UPLOAD_CONFIGURATION) readonly configuration: McInputFileMultipleLabel\n ) {\n super();\n this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams);\n\n if (!this.localeService) {\n this.initDefaultParams();\n }\n\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngAfterViewInit() {\n // FormControl specific errors update\n this.ngControl?.statusChanges\n ?.pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.errors = Object.values(this.ngControl?.errors || {});\n this.cdr.markForCheck();\n });\n\n this.stateChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.cdr.markForCheck());\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n }\n\n /** cvaOnChange function registered via registerOnChange (ControlValueAccessor). @docs-private */\n // tslint:disable-next-line:no-empty\n cvaOnChange = (_: McFileItem[]) => {};\n\n /** onTouch function registered via registerOnTouch (ControlValueAccessor). @docs-private */\n // tslint:disable-next-line:no-empty\n onTouched = () => {};\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n writeValue(files: FileList | McFileItem[] | null): void {\n this.files = files instanceof FileList || !files ? this.mapToFileItem(files) : files;\n this.fileQueueChanged.emit(this.files);\n }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n registerOnChange(fn: any): void { this.cvaOnChange = fn; }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n registerOnTouched(fn: any): void { this.onTouched = fn; }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n * @docs-private\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onFileSelectedViaClick({ target }: Event) {\n if (this.disabled) { return; }\n\n const filesToAdd = this.mapToFileItem((target as HTMLInputElement).files);\n\n this.files = [\n ...this.files,\n ...filesToAdd\n ];\n this.filesAdded.emit(filesToAdd);\n this.fileQueueChanged.emit(this.files);\n this.onTouched();\n // allows the same file selection every time user clicks on the control.\n this.renderer.setProperty(target, 'value', null);\n }\n\n onFileDropped(files: FileList | McFile[]) {\n if (this.disabled) { return; }\n\n const filesToAdd = this.mapToFileItem(files);\n\n this.files = [\n ...this.files,\n ...filesToAdd\n ];\n this.filesAdded.emit(filesToAdd);\n this.fileQueueChanged.emit(this.files);\n this.onTouched();\n }\n\n deleteFile(index: number, event?: MouseEvent) {\n if (this.disabled) { return; }\n event?.stopPropagation();\n const removedFile = this.files.splice(index, 1)[0];\n\n this.files = [...this.files];\n this.fileRemoved.emit([removedFile, index]);\n this.fileQueueChanged.emit(this.files);\n this.onTouched();\n }\n\n onFileListChange(): void {\n this.fileQueueChanged.emit(this.files);\n }\n\n private updateLocaleParams = () => {\n this.config = this.configuration || this.localeService?.getParams('fileUpload').multiple;\n\n this.columnDefs = [\n { header: this.config.gridHeaders.file, cssClass: 'file' },\n { header: this.config.gridHeaders.size, cssClass: 'size' },\n { header: '', cssClass: 'action' }\n ];\n\n this.makeCaptionText();\n\n this.cdr.markForCheck();\n }\n\n private mapToFileItem(files: FileList | McFile[] | null): McFileItem[] {\n if (!files) { return []; }\n\n return Array.from(files)\n .filter((file) => this.isCorrectExtension(file))\n .map((file: File) => ({\n file,\n hasError: this.validateFile(file),\n loading: new BehaviorSubject<boolean>(false),\n progress: new BehaviorSubject<number>(0)\n }));\n }\n\n private validateFile(file: File): boolean | undefined {\n if (this.customValidation && this.customValidation.length) {\n const errorsPerFile = this.customValidation.reduce(\n (errors: (string | null)[], validatorFn: McFileValidatorFn) => {\n errors.push(validatorFn(file));\n\n return errors;\n },\n []).filter(Boolean) as string[];\n\n this.errors = [\n ...this.errors,\n ...errorsPerFile\n ];\n\n return !!errorsPerFile.length;\n }\n }\n\n private isCorrectExtension(file: File): boolean {\n const fileExt: string = file.name.split('.').pop() || '';\n\n return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;\n }\n\n private initDefaultParams() {\n this.config = MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;\n\n this.columnDefs = [\n { header: this.config.gridHeaders.file, cssClass: 'file' },\n { header: this.config.gridHeaders.size, cssClass: 'size' },\n { header: '', cssClass: 'action' }\n ];\n\n this.makeCaptionText();\n }\n\n private makeCaptionText() {\n this.separatedCaptionText = this.config.captionText.split('{{ browseLink }}');\n this.separatedCaptionTextWhenSelected = this.config.captionTextWhenSelected.split('{{ browseLink }}');\n this.separatedCaptionTextForCompactSize = this.config.captionTextForCompactSize.split('{{ browseLink }}');\n }\n}\n","<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"errorState\"\n [class.selected]=\"files && files.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\"\n>\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default' else compactCaption\">\n <i mc-icon=\"mc-upload-to-cloud_64\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"hasHint\">\n <div class=\"mc-file-upload__hint\">\n <ng-content select=\"mc-hint,[hint]\" />\n </div>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"mc-file-upload__grid\">\n <div class=\"mc-file-multiple-uploaded__header\">\n <div class=\"mc-file-multiple-uploaded__header-inner\">\n <div [class]=\"'mc-file-upload__' + column.cssClass\" *ngFor=\"let column of columnDefs\">\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <mc-list-selection [autoSelect]=\"false\" [disabled]=\"disabled\">\n <mc-list-option\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.delete)=\"deleteFile(index)\"\n (keydown.backspace)=\"deleteFile(index)\"\n *ngFor=\"let file of files; let index = index;\">\n <div class=\"mc-file-upload__row\" [class.error]=\"file.hasError\">\n <div class=\"mc-file-upload__file\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\"\n >\n </ng-container>\n\n <mc-progress-spinner\n class=\"pt-nat-file-upload-name-cell__icon\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></mc-progress-spinner>\n </ng-container>\n\n <span class=\"file-item__text\" [mcEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></span>\n </div>\n <div class=\"mc-file-upload__size\">\n {{ file.file.size | mcDataSize }}\n </div>\n <div class=\"mc-file-upload__action\">\n <i mc-icon=\"mc-close-circle_16\" (click)=\"deleteFile(index, $event)\"></i>\n </div>\n </div>\n </mc-list-option>\n </mc-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n\n<ng-template #inputTemplate>\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n multiple\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component, ContentChildren, DoCheck,\n ElementRef,\n EventEmitter, Inject,\n Input, Optional,\n Output, QueryList,\n ViewChild, ViewEncapsulation\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ControlValueAccessor, FormControlStatus } from '@angular/forms';\nimport {\n CanDisable,\n ErrorStateMatcher,\n ruRULocaleData\n} from '@ptsecurity/mosaic/core';\nimport { McHint } from '@ptsecurity/mosaic/form-field';\nimport { BehaviorSubject } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\nimport {\n MC_FILE_UPLOAD_CONFIGURATION,\n McFile,\n McFileItem, McFileUploadBase,\n McFileValidatorFn,\n McInputFile,\n McInputFileLabel\n} from './file-upload';\n\n\nlet nextSingleFileUploadUniqueId = 0;\n\nexport const MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION: McInputFileLabel = ruRULocaleData['ru-RU'].fileUpload.single;\n\n@Component({\n selector: 'mc-single-file-upload',\n templateUrl: './single-file-upload.component.html',\n styleUrls: ['./file-upload.scss', './single-file-upload.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'mc-single-file-upload'\n }\n})\nexport class McSingleFileUploadComponent\n extends McFileUploadBase\n implements McInputFile, CanDisable, DoCheck, ControlValueAccessor {\n get file(): McFileItem | null {\n return this._file;\n }\n\n @Input()\n set file(currentFile: McFileItem | null) {\n this._file = currentFile;\n this.cvaOnChange(this._file);\n this.cdr.markForCheck();\n }\n private _file: McFileItem | null = null;\n\n get acceptedFiles(): string {\n return this.accept && this.accept.length > 0 ? this.accept.map((ext: string) => `.${ext}`).join(',') : '*/*';\n }\n get hasHint(): boolean {\n return this.hint.length > 0;\n }\n\n /**\n * Indicates an invalid state based on `errorState`,\n * applying a CSS class in HTML for visual feedback.\n */\n get invalid(): boolean {\n return !!this.file?.hasError || this.errorState;\n }\n\n @Input() accept: string[];\n @Input() disabled: boolean = false;\n /**\n * @deprecated use `FormControl.errors`\n */\n @Input() errors: string[] = [];\n @Input() inputId: string = `mc-single-file-upload-${nextSingleFileUploadUniqueId++}`;\n /**\n * @deprecated use FormControl for validation\n */\n @Input() customValidation?: McFileValidatorFn[];\n\n /** An object used to control the error state of the component. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n @Output() fileQueueChanged: EventEmitter<McFileItem | null> = new EventEmitter<McFileItem | null>();\n\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n config: McInputFileLabel;\n\n separatedCaptionText: string[];\n\n @ContentChildren(McHint) private readonly hint: QueryList<McHint>;\n\n constructor(\n @Optional() @Inject(MC_FILE_UPLOAD_CONFIGURATION) readonly configuration: McInputFileLabel\n ) {\n super();\n this.localeService?.changes.pipe(takeUntilDestroyed())\n .subscribe(this.updateLocaleParams);\n\n if (!this.localeService) {\n this.initDefaultParams();\n }\n\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n }\n\n /** cvaOnChange function registered via registerOnChange (ControlValueAccessor).\n * @docs-private\n */\n // tslint:disable-next-line:no-empty\n cvaOnChange = (_: McFileItem | null) => {};\n\n /** onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n // tslint:disable-next-line:no-empty\n onTouched = () => {};\n\n ngAfterViewInit() {\n // FormControl specific errors update\n this.ngControl?.statusChanges?.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe((status: FormControlStatus) => {\n if (this._file) { this._file.hasError = status === 'INVALID'; }\n this.errors = Object.values(this.ngControl?.errors || {});\n this.cdr.markForCheck();\n });\n\n this.stateChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.cdr.markForCheck());\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n writeValue(file: File | McFileItem | null): void {\n this.file = file instanceof File ? this.mapToFileItem(file) : file;\n this.fileQueueChanged.emit(this._file);\n }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n registerOnChange(fn: any): void { this.cvaOnChange = fn; }\n\n /** Implemented as part of ControlValueAccessor. @docs-private */\n registerOnTouched(fn: any): void { this.onTouched = fn; }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n * @docs-private\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onFileSelectedViaClick({ target }: Event): void {\n if (this.disabled) { return; }\n\n const fileToAdd = (target as HTMLInputElement).files?.item(0);\n\n if (fileToAdd) {\n this.file = this.mapToFileItem(fileToAdd);\n this.fileQueueChanged.emit(this.file);\n }\n\n this.onTouched();\n // allows the same file selection every time user clicks on the control.\n this.renderer.setProperty(target, 'value', null);\n }\n\n deleteItem(event?: MouseEvent): void {\n if (this.disabled) { return; }\n\n event?.stopPropagation();\n this.file = null;\n this.fileQueueChanged.emit(this.file);\n this.errors = [];\n // mark as touched after file drop even if file wasn't correct\n this.onTouched();\n }\n\n onFileDropped(files: FileList | McFile[]): void {\n if (this.disabled) { return; }\n\n if (files?.length && this.isCorrectExtension(files[0])) {\n this.file = this.mapToFileItem(files[0]);\n this.fileQueueChanged.emit(this.file);\n }\n // mark as touched after file drop even if file wasn't correct\n this.onTouched();\n }\n\n private mapToFileItem(file: File): McFileItem {\n this.validateFile(file);\n\n return {\n file,\n progress: new BehaviorSubject<number>(0),\n loading: new BehaviorSubject<boolean>(false)\n };\n }\n\n private validateFile(file: File): void {\n if (!this.customValidation?.length) { return; }\n this.errors = this.customValidation.reduce(\n (errors: (string | null)[], validatorFn: McFileValidatorFn) => {\n errors.push(validatorFn(file));\n\n return errors;\n },\n []).filter(Boolean) as string[];\n }\n\n private isCorrectExtension(file: File): boolean {\n const fileExt: string = file.name.split('.').pop() || '';\n\n return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;\n }\n\n private updateLocaleParams = () => {\n this.config = this.configuration || this.localeService?.getParams('fileUpload').multiple;\n\n this.makeCaptionText();\n\n this.cdr.markForCheck();\n }\n\n private initDefaultParams() {\n this.config = MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;\n\n this.makeCaptionText();\n }\n\n private makeCaptionText() {\n this.separatedCaptionText = this.config.captionText.split('{{ browseLink }}');\n }\n}\n","<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"invalid\"\n (filesDropped)=\"onFileDropped($event)\">\n <div class=\"dropzone\" *ngIf=\"!file; else fileOutput\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label mc-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<ng-container *ngIf=\"hasHint\">\n <div class=\"mc-file-upload__hint\">\n <ng-content select=\"mc-hint,[hint]\" />\n </div>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"file\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[mc-icon]\"></ng-content>\n </ng-container>\n\n <mc-progress-spinner\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></mc-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [mcEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <button mc-button\n class=\"mc-button_transparent\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n <i mc-icon=\"mc-close-circle_16\"></i>\n </button>\n </div>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { McButtonModule } from '@ptsecurity/mosaic/button';\nimport { McDataSizeModule } from '@ptsecurity/mosaic/core';\nimport { McEllipsisCenterModule } from '@ptsecurity/mosaic/ellipsis-center';\nimport { McFormFieldModule } from '@ptsecurity/mosaic/form-field';\nimport { McIconModule } from '@ptsecurity/mosaic/icon';\nimport { McLinkModule } from '@ptsecurity/mosaic/link';\nimport { McListModule } from '@ptsecurity/mosaic/list';\nimport { McProgressSpinnerModule } from '@ptsecurity/mosaic/progress-spinner';\nimport { McToolTipModule } from '@ptsecurity/mosaic/tooltip';\n\nimport { McFileDropDirective } from './file-drop';\nimport { McMultipleFileUploadComponent } from './multiple-file-upload.component';\nimport { McSingleFileUploadComponent } from './single-file-upload.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n McToolTipModule,\n McProgressSpinnerModule,\n McIconModule,\n McButtonModule,\n McListModule,\n McFormFieldModule,\n McEllipsisCenterModule,\n McDataSizeModule,\n McLinkModule\n ],\n declarations: [\n McFileDropDirective,\n McSingleFileUploadComponent,\n McMultipleFileUploadComponent\n ],\n exports: [\n McSingleFileUploadComponent,\n McMultipleFileUploadComponent,\n McFileDropDirective\n ]\n})\nexport class McFileUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i7.McFileDropDirective","i4"],"mappings":";;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setSelectedOptionsByClick(this, hasModifierKey($event, 'shiftKey'),
|
606
|
+
this.listSelection.setSelectedOptionsByClick(this, hasModifierKey($event, 'shiftKey'),
|
607
|
+
// on Windows/Linux - `ctrlKey` (Ctrl), on MacOS - `metaKey` (⌘ Command)
|
608
|
+
hasModifierKey($event, 'ctrlKey', 'metaKey'));
|
607
609
|
}
|
608
610
|
onKeydown($event) {
|
609
611
|
if (!this.actionButton) {
|