@ptsecurity/mosaic 17.4.0 → 17.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/pop-up/pop-up-trigger.d.ts +4 -2
- package/esm2022/core/pop-up/pop-up-trigger.mjs +6 -4
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/file-upload/multiple-file-upload.component.mjs +11 -13
- package/esm2022/file-upload/single-file-upload.component.mjs +9 -11
- package/esm2022/popover/popover.component.mjs +29 -4
- package/esm2022/tabs/tab.component.mjs +3 -4
- package/esm2022/textarea/textarea.component.mjs +8 -4
- package/esm2022/tree-select/tree-select.component.mjs +2 -2
- package/fesm2022/ptsecurity-mosaic-core.mjs +6 -4
- package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs +18 -22
- package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-popover.mjs +28 -4
- package/fesm2022/ptsecurity-mosaic-popover.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tabs.mjs +2 -3
- package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-textarea.mjs +7 -3
- package/fesm2022/ptsecurity-mosaic-textarea.mjs.map +1 -1
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs +1 -1
- package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/package.json +20 -23
- package/popover/popover.component.d.ts +6 -2
- package/textarea/textarea.component.d.ts +1 -0
@@ -147,7 +147,6 @@ class McMultipleFileUploadComponent extends McFileUploadBase {
|
|
147
147
|
set files(currentFileList) {
|
148
148
|
this._files = currentFileList;
|
149
149
|
this.cvaOnChange(this._files);
|
150
|
-
this.fileQueueChanged.emit(this._files);
|
151
150
|
this.cdr.markForCheck();
|
152
151
|
}
|
153
152
|
get acceptedFiles() {
|
@@ -234,12 +233,8 @@ class McMultipleFileUploadComponent extends McFileUploadBase {
|
|
234
233
|
}
|
235
234
|
/** Implemented as part of ControlValueAccessor. @docs-private */
|
236
235
|
writeValue(files) {
|
237
|
-
|
238
|
-
|
239
|
-
}
|
240
|
-
else {
|
241
|
-
this.files = files;
|
242
|
-
}
|
236
|
+
this.files = files instanceof FileList || !files ? this.mapToFileItem(files) : files;
|
237
|
+
this.fileQueueChanged.emit(this.files);
|
243
238
|
}
|
244
239
|
/** Implemented as part of ControlValueAccessor. @docs-private */
|
245
240
|
registerOnChange(fn) { this.cvaOnChange = fn; }
|
@@ -259,15 +254,16 @@ class McMultipleFileUploadComponent extends McFileUploadBase {
|
|
259
254
|
return;
|
260
255
|
}
|
261
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);
|
262
260
|
this.files = [
|
263
261
|
...this.files,
|
264
262
|
...filesToAdd
|
265
263
|
];
|
266
264
|
this.filesAdded.emit(filesToAdd);
|
265
|
+
this.fileQueueChanged.emit(this.files);
|
267
266
|
this.onTouched();
|
268
|
-
/* even if the user selects the same file,
|
269
|
-
the onchange event will be triggered every time user clicks on the control.*/
|
270
|
-
this.renderer.setProperty(this.input.nativeElement, 'value', null);
|
271
267
|
}
|
272
268
|
onFileDropped(files) {
|
273
269
|
if (this.disabled) {
|
@@ -279,6 +275,7 @@ class McMultipleFileUploadComponent extends McFileUploadBase {
|
|
279
275
|
...filesToAdd
|
280
276
|
];
|
281
277
|
this.filesAdded.emit(filesToAdd);
|
278
|
+
this.fileQueueChanged.emit(this.files);
|
282
279
|
this.onTouched();
|
283
280
|
}
|
284
281
|
deleteFile(index, event) {
|
@@ -286,9 +283,10 @@ class McMultipleFileUploadComponent extends McFileUploadBase {
|
|
286
283
|
return;
|
287
284
|
}
|
288
285
|
event?.stopPropagation();
|
289
|
-
this.
|
290
|
-
this.files.splice(index, 1);
|
286
|
+
const removedFile = this.files.splice(index, 1)[0];
|
291
287
|
this.files = [...this.files];
|
288
|
+
this.fileRemoved.emit([removedFile, index]);
|
289
|
+
this.fileQueueChanged.emit(this.files);
|
292
290
|
this.onTouched();
|
293
291
|
}
|
294
292
|
onFileListChange() {
|
@@ -393,7 +391,6 @@ class McSingleFileUploadComponent extends McFileUploadBase {
|
|
393
391
|
set file(currentFile) {
|
394
392
|
this._file = currentFile;
|
395
393
|
this.cvaOnChange(this._file);
|
396
|
-
this.fileQueueChanged.emit(this._file);
|
397
394
|
this.cdr.markForCheck();
|
398
395
|
}
|
399
396
|
get acceptedFiles() {
|
@@ -468,12 +465,8 @@ class McSingleFileUploadComponent extends McFileUploadBase {
|
|
468
465
|
}
|
469
466
|
/** Implemented as part of ControlValueAccessor. @docs-private */
|
470
467
|
writeValue(file) {
|
471
|
-
|
472
|
-
|
473
|
-
}
|
474
|
-
else {
|
475
|
-
this.file = file;
|
476
|
-
}
|
468
|
+
this.file = file instanceof File ? this.mapToFileItem(file) : file;
|
469
|
+
this.fileQueueChanged.emit(this._file);
|
477
470
|
}
|
478
471
|
/** Implemented as part of ControlValueAccessor. @docs-private */
|
479
472
|
registerOnChange(fn) { this.cvaOnChange = fn; }
|
@@ -492,14 +485,15 @@ class McSingleFileUploadComponent extends McFileUploadBase {
|
|
492
485
|
if (this.disabled) {
|
493
486
|
return;
|
494
487
|
}
|
488
|
+
/* even if the user selects the same file,
|
489
|
+
the onchange event will be triggered every time user clicks on the control.*/
|
490
|
+
this.renderer.setProperty(this.input.nativeElement, 'value', null);
|
495
491
|
const files = target.files;
|
496
492
|
if (files?.length) {
|
497
493
|
this.file = this.mapToFileItem(files[0]);
|
494
|
+
this.fileQueueChanged.emit(this._file);
|
498
495
|
}
|
499
496
|
this.onTouched();
|
500
|
-
/* even if the user selects the same file,
|
501
|
-
the onchange event will be triggered every time user clicks on the control.*/
|
502
|
-
this.renderer.setProperty(this.input.nativeElement, 'value', null);
|
503
497
|
}
|
504
498
|
deleteItem(event) {
|
505
499
|
if (this.disabled) {
|
@@ -507,6 +501,7 @@ class McSingleFileUploadComponent extends McFileUploadBase {
|
|
507
501
|
}
|
508
502
|
event?.stopPropagation();
|
509
503
|
this.file = null;
|
504
|
+
this.fileQueueChanged.emit(this.file);
|
510
505
|
this.errors = [];
|
511
506
|
// mark as touched after file drop even if file wasn't correct
|
512
507
|
this.onTouched();
|
@@ -517,6 +512,7 @@ class McSingleFileUploadComponent extends McFileUploadBase {
|
|
517
512
|
}
|
518
513
|
if (files?.length && this.isCorrectExtension(files[0])) {
|
519
514
|
this.file = this.mapToFileItem(files[0]);
|
515
|
+
this.fileQueueChanged.emit(this.file);
|
520
516
|
}
|
521
517
|
// mark as touched after file drop even if file wasn't correct
|
522
518
|
this.onTouched();
|
@@ -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.fileQueueChanged.emit(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 if (files instanceof FileList || !files) {\n this.files = this.mapToFileItem(files);\n } else {\n this.files = files;\n }\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.onTouched();\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\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.onTouched();\n }\n\n deleteFile(index: number, event?: MouseEvent) {\n if (this.disabled) { return; }\n event?.stopPropagation();\n this.fileRemoved.emit([this.files[index], index]);\n this.files.splice(index, 1);\n this.files = [...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.fileQueueChanged.emit(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 if (file instanceof File) {\n this.file = this.mapToFileItem(file);\n } else {\n this.file = file;\n }\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 files: FileList | null = (target as HTMLInputElement).files;\n if (files?.length) {\n this.file = this.mapToFileItem(files[0]);\n }\n this.onTouched();\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\n deleteItem(event?: MouseEvent): void {\n if (this.disabled) { return; }\n\n event?.stopPropagation();\n this.file = null;\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 }\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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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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aAhB7B,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,eAAe;YACf,uBAAuB;YACvB,YAAY;YACZ,cAAc;YACd,YAAY;YACZ,iBAAiB;YACjB,sBAAsB;YACtB,gBAAgB;AAChB,YAAA,YAAY,aAQZ,2BAA2B;YAC3B,6BAA6B;YAC7B,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGd,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAxBvB,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,eAAe;YACf,uBAAuB;YACvB,YAAY;YACZ,cAAc;YACd,YAAY;YACZ,iBAAiB;YACjB,sBAAsB;YACtB,gBAAgB;YAChB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAaP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBA1B9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,eAAe;wBACf,uBAAuB;wBACvB,YAAY;wBACZ,cAAc;wBACd,YAAY;wBACZ,iBAAiB;wBACjB,sBAAsB;wBACtB,gBAAgB;wBAChB,YAAY;AACf,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,mBAAmB;wBACnB,2BAA2B;wBAC3B,6BAA6B;AAChC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,2BAA2B;wBAC3B,6BAA6B;wBAC7B,mBAAmB;AACtB,qBAAA;AACJ,iBAAA,CAAA;;;AC3CD;;AAEG;;;;"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import * as i2 from '@angular/cdk/a11y';
|
2
|
-
import { A11yModule, FocusTrapFactory, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
2
|
+
import { CdkTrapFocus, A11yModule, FocusTrapFactory, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
3
3
|
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
4
4
|
import * as i1 from '@angular/common';
|
5
5
|
import { CommonModule } from '@angular/common';
|
6
6
|
import * as i0 from '@angular/core';
|
7
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, EventEmitter, inject, Directive, Input, Output, Optional, Inject, NgModule } from '@angular/core';
|
7
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, InjectionToken, EventEmitter, inject, Directive, Input, Output, Optional, Inject, NgModule } from '@angular/core';
|
8
8
|
import * as i2$1 from '@ptsecurity/mosaic/button';
|
9
9
|
import { McButtonModule } from '@ptsecurity/mosaic/button';
|
10
10
|
import { McPopUp, McPopUpTrigger, PopUpTriggers, PopUpSizes, POSITION_TO_CSS_MAP, ThemePalette } from '@ptsecurity/mosaic/core';
|
@@ -12,6 +12,7 @@ import { NEVER, merge, Subject } from 'rxjs';
|
|
12
12
|
import { takeUntil } from 'rxjs/operators';
|
13
13
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
14
14
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
15
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
15
16
|
|
16
17
|
const mcPopoverAnimations = {
|
17
18
|
/** Animation that transitions a tooltip in and out. */
|
@@ -41,14 +42,17 @@ class McPopoverComponent extends McPopUp {
|
|
41
42
|
this.isTrapFocus = isTrapFocus;
|
42
43
|
}
|
43
44
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McPopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
44
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: McPopoverComponent, selector: "mc-popover-component", host: { listeners: { "keydown.esc": "hide(0)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"mc-popover\"\n [cdkTrapFocus]=\"isTrapFocus\"\n [cdkTrapFocusAutoCapture]=\"isTrapFocus\"\n [ngClass]=\"classMap\"\n [@state]=\"visibility\"\n (@state.start)=\"animationStart()\"\n (@state.done)=\"animationDone($event)\">\n\n <div class=\"mc-popover__container\">\n <div class=\"mc-popover__header\" *ngIf=\"header\">\n <ng-container *ngIf=\"isTemplateRef(header)\" [ngTemplateOutlet]=\"$any(header)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(header)\">\n <div>{{ header }}</div>\n </ng-container>\n </div>\n\n <div class=\"mc-popover__content\"\n [ngClass]=\"{ 'mc-popover__content_padding_bottom': footer }\"\n *ngIf=\"content\">\n <ng-container *ngIf=\"isTemplateRef(content)\" [ngTemplateOutlet]=\"$any(content)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(content)\">\n <div>{{ content }}</div>\n </ng-container>\n </div>\n\n <div class=\"mc-popover__footer\" *ngIf=\"footer\">\n <ng-container *ngIf=\"isTemplateRef(footer)\" [ngTemplateOutlet]=\"$any(footer)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(footer)\">\n <div>{{ footer }}</div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"mc-popover__arrow\" [class.mc-popover__arrow_with-footer]=\"footer\"></div>\n</div>\n", styles: [".mc-popover{position:relative;border-radius:var(--mc-popover-size-border-radius, 4px);border-width:var(--mc-popover-size-border-width, 1px);border-style:solid;box-sizing:border-box;z-index:1030;list-style:none;white-space:pre-line}.mc-popover.mc-popover_small{max-width:var(--mc-popover-size-small-width, 200px)}.mc-popover.mc-popover_medium{max-width:var(--mc-popover-size-medium-width, 400px)}.mc-popover.mc-popover_large{max-width:var(--mc-popover-size-large-width, 640px)}.mc-popover.mc-popover_placement-top,.mc-popover.mc-popover_placement-top-left,.mc-popover.mc-popover_placement-top-right{margin-bottom:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-right,.mc-popover.mc-popover_placement-right-top,.mc-popover.mc-popover_placement-right-bottom{margin-left:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-bottom,.mc-popover.mc-popover_placement-bottom-left,.mc-popover.mc-popover_placement-bottom-right{margin-top:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-left,.mc-popover.mc-popover_placement-left-top,.mc-popover.mc-popover_placement-left-bottom{margin-right:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover__container{display:flex;flex-direction:column;max-height:var(--mc-popover-size-max-height, 480px);border-radius:var(--mc-popover-size-border-radius, 4px);overflow:hidden}.mc-popover__header{display:flex;align-items:center;height:var(--mc-popover-header-size-height, 40px);padding:var(--mc-popover-header-size-padding, 0 16px);border-bottom-width:1px;border-bottom-style:solid}.mc-popover__content{overflow:hidden;padding:var(--mc-popover-size-padding, 16px)}.mc-popover__content.mc-popover__content_padding_bottom{padding-bottom:calc(var(--mc-popover-size-padding, 16px) + var(--mc-popover-footer-size-margin-top, 8px))}.mc-popover__footer{box-sizing:border-box;height:var(--mc-popover-footer-size-height, 56px);padding:var(--mc-popover-footer-size-padding, 12px 16px);border-top-width:1px;border-top-style:solid}.mc-popover__arrow{position:absolute;z-index:-1;width:var(--mc-popover-size-arrow-size, 12px);height:var(--mc-popover-size-arrow-size, 12px);border:solid 1px;transform:rotate(45deg)}.mc-popover_placement-top .mc-popover__arrow{bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-top-left .mc-popover__arrow{bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-top-right .mc-popover__arrow{bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right .mc-popover__arrow{left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-right-top .mc-popover__arrow{left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right-bottom .mc-popover__arrow{left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left .mc-popover__arrow{right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-left-top .mc-popover__arrow{right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left-bottom .mc-popover__arrow{right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom .mc-popover__arrow{top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-bottom-left .mc-popover__arrow{top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom-right .mc-popover__arrow{top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover-confirm .mc-popover__content{padding:24px 16px 16px}.mc-popover-confirm .mc-popover__content button{margin-top:16px;display:block;margin-left:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [mcPopoverAnimations.popoverState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
45
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: McPopoverComponent, selector: "mc-popover-component", host: { listeners: { "keydown.esc": "hide(0)" } }, viewQueries: [{ propertyName: "cdkTrapFocus", first: true, predicate: CdkTrapFocus, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-popover\"\n [cdkTrapFocus]=\"isTrapFocus\"\n [cdkTrapFocusAutoCapture]=\"isTrapFocus\"\n [ngClass]=\"classMap\"\n [@state]=\"visibility\"\n (@state.start)=\"animationStart()\"\n (@state.done)=\"animationDone($event)\">\n\n <div class=\"mc-popover__container\">\n <div class=\"mc-popover__header\" *ngIf=\"header\">\n <ng-container *ngIf=\"isTemplateRef(header)\" [ngTemplateOutlet]=\"$any(header)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(header)\">\n <div>{{ header }}</div>\n </ng-container>\n </div>\n\n <div class=\"mc-popover__content\"\n [ngClass]=\"{ 'mc-popover__content_padding_bottom': footer }\"\n *ngIf=\"content\">\n <ng-container *ngIf=\"isTemplateRef(content)\" [ngTemplateOutlet]=\"$any(content)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(content)\">\n <div>{{ content }}</div>\n </ng-container>\n </div>\n\n <div class=\"mc-popover__footer\" *ngIf=\"footer\">\n <ng-container *ngIf=\"isTemplateRef(footer)\" [ngTemplateOutlet]=\"$any(footer)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(footer)\">\n <div>{{ footer }}</div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"mc-popover__arrow\" [class.mc-popover__arrow_with-footer]=\"footer\"></div>\n</div>\n", styles: [".mc-popover{position:relative;border-radius:var(--mc-popover-size-border-radius, 4px);border-width:var(--mc-popover-size-border-width, 1px);border-style:solid;box-sizing:border-box;z-index:1030;list-style:none;white-space:pre-line}.mc-popover.mc-popover_small{max-width:var(--mc-popover-size-small-width, 200px)}.mc-popover.mc-popover_medium{max-width:var(--mc-popover-size-medium-width, 400px)}.mc-popover.mc-popover_large{max-width:var(--mc-popover-size-large-width, 640px)}.mc-popover.mc-popover_placement-top,.mc-popover.mc-popover_placement-top-left,.mc-popover.mc-popover_placement-top-right{margin-bottom:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-right,.mc-popover.mc-popover_placement-right-top,.mc-popover.mc-popover_placement-right-bottom{margin-left:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-bottom,.mc-popover.mc-popover_placement-bottom-left,.mc-popover.mc-popover_placement-bottom-right{margin-top:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-left,.mc-popover.mc-popover_placement-left-top,.mc-popover.mc-popover_placement-left-bottom{margin-right:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover__container{display:flex;flex-direction:column;max-height:var(--mc-popover-size-max-height, 480px);border-radius:var(--mc-popover-size-border-radius, 4px);overflow:hidden}.mc-popover__header{display:flex;align-items:center;height:var(--mc-popover-header-size-height, 40px);padding:var(--mc-popover-header-size-padding, 0 16px);border-bottom-width:1px;border-bottom-style:solid}.mc-popover__content{overflow:hidden;padding:var(--mc-popover-size-padding, 16px)}.mc-popover__content.mc-popover__content_padding_bottom{padding-bottom:calc(var(--mc-popover-size-padding, 16px) + var(--mc-popover-footer-size-margin-top, 8px))}.mc-popover__footer{box-sizing:border-box;height:var(--mc-popover-footer-size-height, 56px);padding:var(--mc-popover-footer-size-padding, 12px 16px);border-top-width:1px;border-top-style:solid}.mc-popover__arrow{position:absolute;z-index:-1;width:var(--mc-popover-size-arrow-size, 12px);height:var(--mc-popover-size-arrow-size, 12px);border:solid 1px;transform:rotate(45deg)}.mc-popover_placement-top .mc-popover__arrow{bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-top-left .mc-popover__arrow{bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-top-right .mc-popover__arrow{bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right .mc-popover__arrow{left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-right-top .mc-popover__arrow{left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right-bottom .mc-popover__arrow{left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left .mc-popover__arrow{right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-left-top .mc-popover__arrow{right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left-bottom .mc-popover__arrow{right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom .mc-popover__arrow{top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-bottom-left .mc-popover__arrow{top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom-right .mc-popover__arrow{top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover-confirm .mc-popover__content{padding:24px 16px 16px}.mc-popover-confirm .mc-popover__content button{margin-top:16px;display:block;margin-left:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [mcPopoverAnimations.popoverState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
45
46
|
}
|
46
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: McPopoverComponent, decorators: [{
|
47
48
|
type: Component,
|
48
49
|
args: [{ selector: 'mc-popover-component', preserveWhitespaces: false, host: {
|
49
50
|
'(keydown.esc)': 'hide(0)'
|
50
51
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [mcPopoverAnimations.popoverState], template: "<div class=\"mc-popover\"\n [cdkTrapFocus]=\"isTrapFocus\"\n [cdkTrapFocusAutoCapture]=\"isTrapFocus\"\n [ngClass]=\"classMap\"\n [@state]=\"visibility\"\n (@state.start)=\"animationStart()\"\n (@state.done)=\"animationDone($event)\">\n\n <div class=\"mc-popover__container\">\n <div class=\"mc-popover__header\" *ngIf=\"header\">\n <ng-container *ngIf=\"isTemplateRef(header)\" [ngTemplateOutlet]=\"$any(header)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(header)\">\n <div>{{ header }}</div>\n </ng-container>\n </div>\n\n <div class=\"mc-popover__content\"\n [ngClass]=\"{ 'mc-popover__content_padding_bottom': footer }\"\n *ngIf=\"content\">\n <ng-container *ngIf=\"isTemplateRef(content)\" [ngTemplateOutlet]=\"$any(content)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(content)\">\n <div>{{ content }}</div>\n </ng-container>\n </div>\n\n <div class=\"mc-popover__footer\" *ngIf=\"footer\">\n <ng-container *ngIf=\"isTemplateRef(footer)\" [ngTemplateOutlet]=\"$any(footer)\"></ng-container>\n <ng-container *ngIf=\"!isTemplateRef(footer)\">\n <div>{{ footer }}</div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"mc-popover__arrow\" [class.mc-popover__arrow_with-footer]=\"footer\"></div>\n</div>\n", styles: [".mc-popover{position:relative;border-radius:var(--mc-popover-size-border-radius, 4px);border-width:var(--mc-popover-size-border-width, 1px);border-style:solid;box-sizing:border-box;z-index:1030;list-style:none;white-space:pre-line}.mc-popover.mc-popover_small{max-width:var(--mc-popover-size-small-width, 200px)}.mc-popover.mc-popover_medium{max-width:var(--mc-popover-size-medium-width, 400px)}.mc-popover.mc-popover_large{max-width:var(--mc-popover-size-large-width, 640px)}.mc-popover.mc-popover_placement-top,.mc-popover.mc-popover_placement-top-left,.mc-popover.mc-popover_placement-top-right{margin-bottom:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-right,.mc-popover.mc-popover_placement-right-top,.mc-popover.mc-popover_placement-right-bottom{margin-left:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-bottom,.mc-popover.mc-popover_placement-bottom-left,.mc-popover.mc-popover_placement-bottom-right{margin-top:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover.mc-popover_placement-left,.mc-popover.mc-popover_placement-left-top,.mc-popover.mc-popover_placement-left-bottom{margin-right:calc(var(--mc-popover-size-trigger-margin, 9px))}.mc-popover__container{display:flex;flex-direction:column;max-height:var(--mc-popover-size-max-height, 480px);border-radius:var(--mc-popover-size-border-radius, 4px);overflow:hidden}.mc-popover__header{display:flex;align-items:center;height:var(--mc-popover-header-size-height, 40px);padding:var(--mc-popover-header-size-padding, 0 16px);border-bottom-width:1px;border-bottom-style:solid}.mc-popover__content{overflow:hidden;padding:var(--mc-popover-size-padding, 16px)}.mc-popover__content.mc-popover__content_padding_bottom{padding-bottom:calc(var(--mc-popover-size-padding, 16px) + var(--mc-popover-footer-size-margin-top, 8px))}.mc-popover__footer{box-sizing:border-box;height:var(--mc-popover-footer-size-height, 56px);padding:var(--mc-popover-footer-size-padding, 12px 16px);border-top-width:1px;border-top-style:solid}.mc-popover__arrow{position:absolute;z-index:-1;width:var(--mc-popover-size-arrow-size, 12px);height:var(--mc-popover-size-arrow-size, 12px);border:solid 1px;transform:rotate(45deg)}.mc-popover_placement-top .mc-popover__arrow{bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-top-left .mc-popover__arrow{bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-top-right .mc-popover__arrow{bottom:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right .mc-popover__arrow{left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-right-top .mc-popover__arrow{left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-right-bottom .mc-popover__arrow{left:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left .mc-popover__arrow{right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:50%;margin-top:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-left-top .mc-popover__arrow{right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);top:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-left-bottom .mc-popover__arrow{right:calc(var(--mc-popover-size-arrow-size, 11px) / -2);bottom:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom .mc-popover__arrow{top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:50%;margin-left:calc(var(--mc-popover-size-arrow-size, 11px) / -2)}.mc-popover_placement-bottom-left .mc-popover__arrow{top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);left:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover_placement-bottom-right .mc-popover__arrow{top:calc(var(--mc-popover-size-arrow-size, 11px) / -2);right:calc(18px - var(--mc-popover-size-trigger-margin, 9px))}.mc-popover-confirm .mc-popover__content{padding:24px 16px 16px}.mc-popover-confirm .mc-popover__content button{margin-top:16px;display:block;margin-left:auto}\n"] }]
|
51
|
-
}]
|
52
|
+
}], propDecorators: { cdkTrapFocus: [{
|
53
|
+
type: ViewChild,
|
54
|
+
args: [CdkTrapFocus]
|
55
|
+
}] } });
|
52
56
|
const MC_POPOVER_SCROLL_STRATEGY = new InjectionToken('mc-popover-scroll-strategy');
|
53
57
|
/** @docs-private */
|
54
58
|
function mcPopoverScrollStrategyFactory(overlay) {
|
@@ -81,6 +85,22 @@ class McPopoverTrigger extends McPopUpTrigger {
|
|
81
85
|
* @docs-private
|
82
86
|
*/
|
83
87
|
this.arrowOffset = 17;
|
88
|
+
this.hideIfNotInViewPort = () => {
|
89
|
+
if (!this.scrollable) {
|
90
|
+
return;
|
91
|
+
}
|
92
|
+
const rect = this.elementRef.nativeElement.getBoundingClientRect();
|
93
|
+
const containerRect = this.scrollable.getElementRef().nativeElement.getBoundingClientRect();
|
94
|
+
if (!(rect.bottom >= containerRect.top && rect.right >= containerRect.left &&
|
95
|
+
rect.top <= containerRect.bottom && rect.left <= containerRect.right)) {
|
96
|
+
if (this.instance) {
|
97
|
+
// prevent focus trigger after hiding
|
98
|
+
// tslint:disable-next-line:no-string-literal
|
99
|
+
this.instance.cdkTrapFocus['_previouslyFocusedElement'] = null;
|
100
|
+
}
|
101
|
+
this.hide();
|
102
|
+
}
|
103
|
+
};
|
84
104
|
}
|
85
105
|
get popoverVisible() {
|
86
106
|
return this.visible;
|
@@ -185,6 +205,10 @@ class McPopoverTrigger extends McPopUpTrigger {
|
|
185
205
|
backdropClass: this.backdropClass
|
186
206
|
};
|
187
207
|
}
|
208
|
+
ngOnInit() {
|
209
|
+
super.ngOnInit();
|
210
|
+
this.scrollable?.elementScrolled().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.hideIfNotInViewPort);
|
211
|
+
}
|
188
212
|
updateData() {
|
189
213
|
if (!this.instance) {
|
190
214
|
return;
|