@ptsecurity/mosaic 16.1.2 → 16.2.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.
Files changed (87) hide show
  1. package/_theming.scss +226 -0
  2. package/core/forms/_forms-theme.scss +4 -0
  3. package/core/forms/_forms.scss +95 -88
  4. package/core/pop-up/pop-up.d.ts +3 -0
  5. package/core/styles/_core.scss +0 -1
  6. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +6 -6
  7. package/esm2022/button/button.component.mjs +6 -3
  8. package/esm2022/code-block/actionbar.component.mjs +1 -1
  9. package/esm2022/core/pop-up/pop-up.mjs +1 -1
  10. package/esm2022/core/version.mjs +2 -2
  11. package/esm2022/dropdown/dropdown-trigger.directive.mjs +3 -2
  12. package/esm2022/file-upload/file-drop.mjs +40 -3
  13. package/esm2022/file-upload/file-upload.mjs +1 -1
  14. package/esm2022/file-upload/multiple-file-upload.component.mjs +3 -3
  15. package/esm2022/file-upload/single-file-upload.component.mjs +1 -1
  16. package/esm2022/form-field/form-field.mjs +2 -2
  17. package/esm2022/form-field/validate.directive.mjs +9 -3
  18. package/esm2022/modal/modal.component.mjs +4 -9
  19. package/esm2022/select/select-option.directive.mjs +15 -3
  20. package/esm2022/select/select.component.mjs +20 -10
  21. package/esm2022/tabs/tab-group.component.mjs +1 -1
  22. package/esm2022/tags/tag-list.component.mjs +5 -4
  23. package/esm2022/toast/toast-animations.mjs +2 -1
  24. package/esm2022/toast/toast-container.component.mjs +21 -7
  25. package/esm2022/toast/toast.component.mjs +7 -2
  26. package/esm2022/toast/toast.service.mjs +2 -1
  27. package/esm2022/toggle/toggle.component.mjs +3 -3
  28. package/esm2022/tooltip/tooltip.component.mjs +16 -4
  29. package/esm2022/tree/control/base-tree-control.mjs +1 -1
  30. package/esm2022/tree/control/flat-tree-control.mjs +4 -4
  31. package/esm2022/tree/control/tree-control.mjs +1 -1
  32. package/esm2022/tree/padding.directive.mjs +2 -2
  33. package/esm2022/tree/toggle.mjs +2 -4
  34. package/esm2022/tree-select/tree-select.component.mjs +13 -8
  35. package/fesm2022/ptsecurity-mosaic-autocomplete.mjs +5 -5
  36. package/fesm2022/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  37. package/fesm2022/ptsecurity-mosaic-button.mjs +5 -2
  38. package/fesm2022/ptsecurity-mosaic-button.mjs.map +1 -1
  39. package/fesm2022/ptsecurity-mosaic-code-block.mjs +1 -1
  40. package/fesm2022/ptsecurity-mosaic-code-block.mjs.map +1 -1
  41. package/fesm2022/ptsecurity-mosaic-core.mjs +1 -1
  42. package/fesm2022/ptsecurity-mosaic-core.mjs.map +1 -1
  43. package/fesm2022/ptsecurity-mosaic-dropdown.mjs +2 -1
  44. package/fesm2022/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  45. package/fesm2022/ptsecurity-mosaic-file-upload.mjs +41 -4
  46. package/fesm2022/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  47. package/fesm2022/ptsecurity-mosaic-form-field.mjs +10 -4
  48. package/fesm2022/ptsecurity-mosaic-form-field.mjs.map +1 -1
  49. package/fesm2022/ptsecurity-mosaic-modal.mjs +3 -8
  50. package/fesm2022/ptsecurity-mosaic-modal.mjs.map +1 -1
  51. package/fesm2022/ptsecurity-mosaic-select.mjs +33 -11
  52. package/fesm2022/ptsecurity-mosaic-select.mjs.map +1 -1
  53. package/fesm2022/ptsecurity-mosaic-tabs.mjs +1 -1
  54. package/fesm2022/ptsecurity-mosaic-tabs.mjs.map +1 -1
  55. package/fesm2022/ptsecurity-mosaic-tags.mjs +4 -3
  56. package/fesm2022/ptsecurity-mosaic-tags.mjs.map +1 -1
  57. package/fesm2022/ptsecurity-mosaic-toast.mjs +25 -8
  58. package/fesm2022/ptsecurity-mosaic-toast.mjs.map +1 -1
  59. package/fesm2022/ptsecurity-mosaic-toggle.mjs +2 -2
  60. package/fesm2022/ptsecurity-mosaic-toggle.mjs.map +1 -1
  61. package/fesm2022/ptsecurity-mosaic-tooltip.mjs +15 -3
  62. package/fesm2022/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  63. package/fesm2022/ptsecurity-mosaic-tree-select.mjs +12 -7
  64. package/fesm2022/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  65. package/fesm2022/ptsecurity-mosaic-tree.mjs +6 -7
  66. package/fesm2022/ptsecurity-mosaic-tree.mjs.map +1 -1
  67. package/file-upload/file-drop.d.ts +2 -1
  68. package/file-upload/file-upload.d.ts +4 -1
  69. package/file-upload/multiple-file-upload.component.d.ts +2 -2
  70. package/file-upload/single-file-upload.component.d.ts +2 -2
  71. package/form-field/form-field.scss +0 -2
  72. package/package.json +4 -4
  73. package/prebuilt-themes/dark-theme.css +1 -1
  74. package/prebuilt-themes/default-theme.css +1 -1
  75. package/select/select-option.directive.d.ts +2 -0
  76. package/select/select.component.d.ts +3 -2
  77. package/tags/tag-list.scss +4 -0
  78. package/toast/toast-animations.d.ts +1 -0
  79. package/toast/toast-container.component.d.ts +7 -3
  80. package/toast/toast.component.d.ts +2 -0
  81. package/toast/toast.service.d.ts +2 -0
  82. package/toggle/_toggle-theme.scss +8 -0
  83. package/toggle/toggle.scss +6 -2
  84. package/tooltip/tooltip.component.d.ts +4 -1
  85. package/tree/control/base-tree-control.d.ts +1 -1
  86. package/tree/control/tree-control.d.ts +1 -1
  87. package/tree-select/tree-select.component.d.ts +3 -2
@@ -23,6 +23,9 @@ import { Subscription, BehaviorSubject } from 'rxjs';
23
23
  /* Object for labels customization inside file upload component */
24
24
  const MC_FILE_UPLOAD_CONFIGURATION = new InjectionToken('McFileUploadConfiguration');
25
25
 
26
+ const isFolderCanBeDragged = () => 'webkitGetAsEntry' in DataTransferItem.prototype;
27
+ const entryIsDirectory = (entry) => !!entry && entry.isDirectory;
28
+ const entryIsFile = (entry) => !!entry && entry.isFile;
26
29
  class McFileDropDirective {
27
30
  constructor() {
28
31
  this.filesDropped = new EventEmitter();
@@ -38,11 +41,21 @@ class McFileDropDirective {
38
41
  this.dragover = false;
39
42
  }
40
43
  onDrop(event) {
44
+ if (!isFolderCanBeDragged()) {
45
+ console.warn('Drag-and-drop functionality for folders is not supported by this browser.');
46
+ }
41
47
  event.preventDefault();
42
48
  event.stopPropagation();
43
49
  this.dragover = false;
44
- if (event.dataTransfer && event.dataTransfer.files.length > 0) {
45
- this.filesDropped.emit(event.dataTransfer.files);
50
+ if (event.dataTransfer && event.dataTransfer.items.length > 0) {
51
+ // event.dataTransfer.items requires dom.iterable lib
52
+ // @ts-ignore
53
+ const fileEntries = [...event.dataTransfer.items]
54
+ .filter((item) => item.kind === 'file')
55
+ .map((item) => item.webkitGetAsEntry());
56
+ Promise.all(fileEntries.map(unwrapDirectory))
57
+ .then((fileList) => fileList.reduce((res, next) => res.concat(next), []))
58
+ .then((entries) => this.filesDropped.emit(entries));
46
59
  }
47
60
  }
48
61
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: McFileDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
@@ -63,6 +76,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
63
76
  }], propDecorators: { filesDropped: [{
64
77
  type: Output
65
78
  }] } });
79
+ const unwrapDirectory = async (item) => {
80
+ const queue = [item];
81
+ const result = [];
82
+ while (queue.length > 0) {
83
+ const next = queue.pop();
84
+ if (next instanceof Promise) {
85
+ queue.push(...(await next));
86
+ }
87
+ else if (entryIsDirectory(next)) {
88
+ const directoryReader = next.createReader();
89
+ queue.push(new Promise((resolve, reject) => directoryReader.readEntries(resolve, reject)));
90
+ }
91
+ else if (entryIsFile(next)) {
92
+ const fileEntry = next;
93
+ result.push(new Promise((resolve, reject) => {
94
+ fileEntry.file((file) => {
95
+ file.fullPath = fileEntry.fullPath;
96
+ resolve(file);
97
+ }, reject);
98
+ }));
99
+ }
100
+ }
101
+ return Promise.all(result);
102
+ };
66
103
 
67
104
  let nextMultipleFileUploadUniqueId = 0;
68
105
  const MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION = {
@@ -179,13 +216,13 @@ class McMultipleFileUploadComponent {
179
216
  return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;
180
217
  }
181
218
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: McMultipleFileUploadComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: MC_FILE_UPLOAD_CONFIGURATION, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
182
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: McMultipleFileUploadComponent, selector: "mc-multiple-file-upload", inputs: { accept: "accept", disabled: "disabled", errors: "errors", files: "files", size: "size", inputId: "inputId", customValidation: "customValidation" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "mc-multiple-file-upload" }, queries: [{ propertyName: "customFileIcon", first: true, predicate: ["mcFileIcon"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n\n\n </ng-container>\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 >\n</div>\n\n<div class=\"mc-file-upload__info-section\">\n <mc-hint class=\"mc-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </mc-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <mc-hint class=\"mc-file-upload__hint mc-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </mc-hint>\n </ng-container>\n</div>\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]=\"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 {{ config.captionTextWhenSelected }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n</ng-template>\n", styles: ["@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative;cursor:pointer}.mc-file-upload .dropzone,.mc-file-upload .file-item{display:flex;align-items:center}.mc-file-upload .dropzone .dropzone__text{margin-left:6px}.mc-file-upload .mc-ellipsis-center{position:relative;display:flex}.mc-file-upload .mc-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.mc-file-upload .mc-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-file-upload{border-radius:var(--mc-file-upload-size-multiple-border-radius, 4px);border-width:var(--mc-file-upload-size-multiple-border-width, 1px);border-style:var(--mc-file-upload-size-multiple-border-style, dashed)}.mc-file-upload.default{min-height:176px;justify-content:center}.mc-file-upload.compact:not(.selected){height:var(--mc-file-upload-size-single-height, 48px);padding-top:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-bottom:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-left:12px}.mc-file-upload .mc-list-option{padding:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px) var(--mc-file-upload-size-multiple-uploaded-item-vertical-padding, 8px)}.mc-file-upload .mc-list-option .mc-icon{margin-right:0}.mc-file-upload .mc-file-upload__grid{min-height:144px}.mc-file-upload .mc-file-multiple-uploaded__header-inner,.mc-file-upload .mc-file-upload__row{display:flex;align-items:center}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__file,.mc-file-upload .mc-file-upload__row .mc-file-upload__file{width:65%;max-width:65%}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__size,.mc-file-upload .mc-file-upload__row .mc-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__file,.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__size,.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__action,.mc-file-upload .mc-file-upload__row .mc-file-upload__file,.mc-file-upload .mc-file-upload__row .mc-file-upload__size,.mc-file-upload .mc-file-upload__row .mc-file-upload__action{padding-left:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px);padding-right:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px)}.mc-file-upload .mc-file-upload__row .mc-file-upload__file{display:flex;align-items:center}.mc-file-upload .mc-file-upload__row .mc-file-upload__file .file-item__text{margin-left:0;width:90%}.mc-file-upload .mc-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.mc-file-upload .mc-file-multiple-uploaded__header-inner{padding:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px) var(--mc-file-upload-size-multiple-uploaded-item-vertical-padding, 8px);border:2px solid transparent;border-bottom:unset;box-sizing:border-box;height:var(--mc-list-size-item-height, 32px)}.mc-file-upload .btn-upload .dropzone{margin:0;border-top-width:var(--mc-file-upload-size-multiple-border-width, 1px);border-top-style:var(--mc-file-upload-size-multiple-border-style, dashed);padding:4px 12px}.mc-file-upload .file-upload__dropzone{width:100%;height:100%}.mc-hint{display:block}.mc-file-upload__hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.McProgressSpinner, selector: "mc-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i4.McIcon, selector: "[mc-icon]", inputs: ["color"] }, { kind: "directive", type: i4.McIconCSSStyler, selector: "[mc-icon]" }, { kind: "component", type: i5.McListSelection, selector: "mc-list-selection", inputs: ["disabled", "autoSelect", "noUnselectLast", "horizontal", "tabIndex", "compareWith"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["mcListSelection"] }, { kind: "component", type: i5.McListOption, selector: "mc-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["mcListOption"] }, { kind: "directive", type: i6.McHint, selector: "mc-hint", inputs: ["color", "id"] }, { kind: "directive", type: i7.McEllipsisCenterDirective, selector: "[mcEllipsisCenter]", inputs: ["mcEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: McFileDropDirective, selector: "[mcFileDrop]", outputs: ["filesDropped"], exportAs: ["mcFileDrop"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i9.McDataSizePipe, name: "mcDataSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
219
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: McMultipleFileUploadComponent, selector: "mc-multiple-file-upload", inputs: { accept: "accept", disabled: "disabled", errors: "errors", files: "files", size: "size", inputId: "inputId", customValidation: "customValidation" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "mc-multiple-file-upload" }, queries: [{ propertyName: "customFileIcon", first: true, predicate: ["mcFileIcon"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n\n\n </ng-container>\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 >\n</div>\n\n<div class=\"mc-file-upload__info-section\">\n <mc-hint class=\"mc-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </mc-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <mc-hint class=\"mc-file-upload__hint mc-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </mc-hint>\n </ng-container>\n</div>\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 {{ config.captionTextWhenSelected }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n</ng-template>\n", styles: ["@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative;cursor:pointer}.mc-file-upload .dropzone,.mc-file-upload .file-item{display:flex;align-items:center}.mc-file-upload .dropzone .dropzone__text{margin-left:6px}.mc-file-upload .mc-ellipsis-center{position:relative;display:flex}.mc-file-upload .mc-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.mc-file-upload .mc-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-file-upload{border-radius:var(--mc-file-upload-size-multiple-border-radius, 4px);border-width:var(--mc-file-upload-size-multiple-border-width, 1px);border-style:var(--mc-file-upload-size-multiple-border-style, dashed)}.mc-file-upload.default{min-height:176px;justify-content:center}.mc-file-upload.compact:not(.selected){height:var(--mc-file-upload-size-single-height, 48px);padding-top:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-bottom:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-left:12px}.mc-file-upload .mc-list-option{padding:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px) var(--mc-file-upload-size-multiple-uploaded-item-vertical-padding, 8px)}.mc-file-upload .mc-list-option .mc-icon{margin-right:0}.mc-file-upload .mc-file-upload__grid{min-height:144px}.mc-file-upload .mc-file-multiple-uploaded__header-inner,.mc-file-upload .mc-file-upload__row{display:flex;align-items:center}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__file,.mc-file-upload .mc-file-upload__row .mc-file-upload__file{width:65%;max-width:65%}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__size,.mc-file-upload .mc-file-upload__row .mc-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__file,.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__size,.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__action,.mc-file-upload .mc-file-upload__row .mc-file-upload__file,.mc-file-upload .mc-file-upload__row .mc-file-upload__size,.mc-file-upload .mc-file-upload__row .mc-file-upload__action{padding-left:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px);padding-right:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px)}.mc-file-upload .mc-file-upload__row .mc-file-upload__file{display:flex;align-items:center}.mc-file-upload .mc-file-upload__row .mc-file-upload__file .file-item__text{margin-left:0;width:90%}.mc-file-upload .mc-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.mc-file-upload .mc-file-multiple-uploaded__header-inner{padding:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px) var(--mc-file-upload-size-multiple-uploaded-item-vertical-padding, 8px);border:2px solid transparent;border-bottom:unset;box-sizing:border-box;height:var(--mc-list-size-item-height, 32px)}.mc-file-upload .btn-upload .dropzone{margin:0;border-top-width:var(--mc-file-upload-size-multiple-border-width, 1px);border-top-style:var(--mc-file-upload-size-multiple-border-style, dashed);padding:4px 12px}.mc-file-upload .file-upload__dropzone{width:100%;height:100%}.mc-hint{display:block}.mc-file-upload__hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.McProgressSpinner, selector: "mc-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i4.McIcon, selector: "[mc-icon]", inputs: ["color"] }, { kind: "directive", type: i4.McIconCSSStyler, selector: "[mc-icon]" }, { kind: "component", type: i5.McListSelection, selector: "mc-list-selection", inputs: ["disabled", "autoSelect", "noUnselectLast", "horizontal", "tabIndex", "compareWith"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["mcListSelection"] }, { kind: "component", type: i5.McListOption, selector: "mc-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["mcListOption"] }, { kind: "directive", type: i6.McHint, selector: "mc-hint", inputs: ["color", "id"] }, { kind: "directive", type: i7.McEllipsisCenterDirective, selector: "[mcEllipsisCenter]", inputs: ["mcEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: McFileDropDirective, selector: "[mcFileDrop]", outputs: ["filesDropped"], exportAs: ["mcFileDrop"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i9.McDataSizePipe, name: "mcDataSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
183
220
  }
184
221
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: McMultipleFileUploadComponent, decorators: [{
185
222
  type: Component,
186
223
  args: [{ selector: 'mc-multiple-file-upload', changeDetection: ChangeDetectionStrategy.OnPush, host: {
187
224
  class: 'mc-multiple-file-upload'
188
- }, template: "<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n\n\n </ng-container>\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 >\n</div>\n\n<div class=\"mc-file-upload__info-section\">\n <mc-hint class=\"mc-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </mc-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <mc-hint class=\"mc-file-upload__hint mc-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </mc-hint>\n </ng-container>\n</div>\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]=\"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 {{ config.captionTextWhenSelected }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n</ng-template>\n", styles: ["@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative;cursor:pointer}.mc-file-upload .dropzone,.mc-file-upload .file-item{display:flex;align-items:center}.mc-file-upload .dropzone .dropzone__text{margin-left:6px}.mc-file-upload .mc-ellipsis-center{position:relative;display:flex}.mc-file-upload .mc-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.mc-file-upload .mc-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-file-upload{border-radius:var(--mc-file-upload-size-multiple-border-radius, 4px);border-width:var(--mc-file-upload-size-multiple-border-width, 1px);border-style:var(--mc-file-upload-size-multiple-border-style, dashed)}.mc-file-upload.default{min-height:176px;justify-content:center}.mc-file-upload.compact:not(.selected){height:var(--mc-file-upload-size-single-height, 48px);padding-top:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-bottom:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-left:12px}.mc-file-upload .mc-list-option{padding:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px) var(--mc-file-upload-size-multiple-uploaded-item-vertical-padding, 8px)}.mc-file-upload .mc-list-option .mc-icon{margin-right:0}.mc-file-upload .mc-file-upload__grid{min-height:144px}.mc-file-upload .mc-file-multiple-uploaded__header-inner,.mc-file-upload .mc-file-upload__row{display:flex;align-items:center}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__file,.mc-file-upload .mc-file-upload__row .mc-file-upload__file{width:65%;max-width:65%}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__size,.mc-file-upload .mc-file-upload__row .mc-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__file,.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__size,.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__action,.mc-file-upload .mc-file-upload__row .mc-file-upload__file,.mc-file-upload .mc-file-upload__row .mc-file-upload__size,.mc-file-upload .mc-file-upload__row .mc-file-upload__action{padding-left:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px);padding-right:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px)}.mc-file-upload .mc-file-upload__row .mc-file-upload__file{display:flex;align-items:center}.mc-file-upload .mc-file-upload__row .mc-file-upload__file .file-item__text{margin-left:0;width:90%}.mc-file-upload .mc-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.mc-file-upload .mc-file-multiple-uploaded__header-inner{padding:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px) var(--mc-file-upload-size-multiple-uploaded-item-vertical-padding, 8px);border:2px solid transparent;border-bottom:unset;box-sizing:border-box;height:var(--mc-list-size-item-height, 32px)}.mc-file-upload .btn-upload .dropzone{margin:0;border-top-width:var(--mc-file-upload-size-multiple-border-width, 1px);border-top-style:var(--mc-file-upload-size-multiple-border-style, dashed);padding:4px 12px}.mc-file-upload .file-upload__dropzone{width:100%;height:100%}.mc-hint{display:block}.mc-file-upload__hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}\n"] }]
225
+ }, template: "<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n\n\n </ng-container>\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 >\n</div>\n\n<div class=\"mc-file-upload__info-section\">\n <mc-hint class=\"mc-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </mc-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <mc-hint class=\"mc-file-upload__hint mc-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </mc-hint>\n </ng-container>\n</div>\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 {{ config.captionTextWhenSelected }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n</ng-template>\n", styles: ["@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative;cursor:pointer}.mc-file-upload .dropzone,.mc-file-upload .file-item{display:flex;align-items:center}.mc-file-upload .dropzone .dropzone__text{margin-left:6px}.mc-file-upload .mc-ellipsis-center{position:relative;display:flex}.mc-file-upload .mc-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.mc-file-upload .mc-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes mc-progress{0%{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.mc-group{display:flex;flex-direction:row}.mc-group .mc-group_justified>.mc-group-item{width:100%}.mc-group .mc-group-item+.mc-group-item{margin-left:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group{display:flex;flex-direction:column}.mc-vertical-group>.mc-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:first-child:not(:last-child)>.mc-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.mc-vertical-group>.mc-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--mc-button-size-border-radius, 4px)}.mc-vertical-group>.mc-group-item:last-child:not(:first-child)>.mc-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child){border-radius:0}.mc-vertical-group>.mc-group-item:not(:first-child):not(:last-child)>.mc-form-field__container{border-radius:0}.mc-vertical-group .mc-group-item+.mc-group-item{margin-top:calc(-1 * var(--mc-button-size-border-width, 1px))}.mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-file-upload{border-radius:var(--mc-file-upload-size-multiple-border-radius, 4px);border-width:var(--mc-file-upload-size-multiple-border-width, 1px);border-style:var(--mc-file-upload-size-multiple-border-style, dashed)}.mc-file-upload.default{min-height:176px;justify-content:center}.mc-file-upload.compact:not(.selected){height:var(--mc-file-upload-size-single-height, 48px);padding-top:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-bottom:var(--mc-file-upload-size-single-vertical-padding, 12px);padding-left:12px}.mc-file-upload .mc-list-option{padding:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px) var(--mc-file-upload-size-multiple-uploaded-item-vertical-padding, 8px)}.mc-file-upload .mc-list-option .mc-icon{margin-right:0}.mc-file-upload .mc-file-upload__grid{min-height:144px}.mc-file-upload .mc-file-multiple-uploaded__header-inner,.mc-file-upload .mc-file-upload__row{display:flex;align-items:center}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__file,.mc-file-upload .mc-file-upload__row .mc-file-upload__file{width:65%;max-width:65%}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__size,.mc-file-upload .mc-file-upload__row .mc-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__file,.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__size,.mc-file-upload .mc-file-multiple-uploaded__header-inner .mc-file-upload__action,.mc-file-upload .mc-file-upload__row .mc-file-upload__file,.mc-file-upload .mc-file-upload__row .mc-file-upload__size,.mc-file-upload .mc-file-upload__row .mc-file-upload__action{padding-left:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px);padding-right:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px)}.mc-file-upload .mc-file-upload__row .mc-file-upload__file{display:flex;align-items:center}.mc-file-upload .mc-file-upload__row .mc-file-upload__file .file-item__text{margin-left:0;width:90%}.mc-file-upload .mc-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.mc-file-upload .mc-file-multiple-uploaded__header-inner{padding:var(--mc-file-upload-size-multiple-uploaded-item-horizontal-padding, 8px) var(--mc-file-upload-size-multiple-uploaded-item-vertical-padding, 8px);border:2px solid transparent;border-bottom:unset;box-sizing:border-box;height:var(--mc-list-size-item-height, 32px)}.mc-file-upload .btn-upload .dropzone{margin:0;border-top-width:var(--mc-file-upload-size-multiple-border-width, 1px);border-top-style:var(--mc-file-upload-size-multiple-border-style, dashed);padding:4px 12px}.mc-file-upload .file-upload__dropzone{width:100%;height:100%}.mc-hint{display:block}.mc-file-upload__hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}\n"] }]
189
226
  }], ctorParameters: function () { return [{ type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
190
227
  type: Optional
191
228
  }, {
@@ -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 { InjectionToken } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\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 files: McFileItem[] | McFileItem | null;\n accept?: string[];\n onFileSelectedViaClick(event: Event): void;\n onFileDropped(files: FileList): 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\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","import { Directive, Output, EventEmitter } from '@angular/core';\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> = new EventEmitter<FileList>();\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 event.preventDefault();\n event.stopPropagation();\n this.dragover = false;\n\n if (event.dataTransfer && event.dataTransfer.files.length > 0) {\n this.filesDropped.emit(event.dataTransfer.files);\n }\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter, Inject,\n Input, OnDestroy, Optional,\n Output, Renderer2,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { CanDisable } from '@ptsecurity/mosaic/core';\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport {\n MC_FILE_UPLOAD_CONFIGURATION,\n McFileItem,\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 captionText: 'Перетащите сюда или',\n captionTextWhenSelected: 'Перетащите еще или',\n captionTextForCompactSize: 'Перетащите файлы или',\n browseLink: 'выберите',\n title: 'Загрузите файлы',\n gridHeaders: {\n file: 'Файл',\n size: 'Размер'\n }\n};\n\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 host: {\n class: 'mc-multiple-file-upload'\n }\n})\nexport class McMultipleFileUploadComponent implements AfterViewInit, OnDestroy, McInputFile, CanDisable {\n @Input() accept?: string[];\n @Input() disabled: boolean;\n @Input() errors: string[] = [];\n @Input() files: McFileItem[] = [];\n @Input() size: 'compact' | 'default' = 'default';\n @Input() inputId: string = `mc-multiple-file-upload-${nextMultipleFileUploadUniqueId++}`;\n @Input() customValidation?: McFileValidatorFn[];\n @Output() fileQueueChanged: EventEmitter<McFileItem[]> = new EventEmitter<McFileItem[]>();\n\n @ContentChild('mcFileIcon', { static: false, read: TemplateRef }) customFileIcon: TemplateRef<HTMLElement>;\n\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n hasFocus = false;\n columnDefs: { header: string; cssClass: string }[];\n\n private focusMonitorSubscription = Subscription.EMPTY;\n\n get acceptedFiles(): string {\n return this.accept && this.accept.length > 0 ? this.accept.map((ext: string) => `.${ext}`).join(',') : '*/*';\n }\n\n get hasErrors(): boolean {\n return this.errors && !!this.errors.length;\n }\n\n constructor(\n private focusMonitor: FocusMonitor,\n private cdr: ChangeDetectorRef,\n private renderer: Renderer2,\n @Optional() @Inject(MC_FILE_UPLOAD_CONFIGURATION) public config: McInputFileMultipleLabel\n ) {\n this.config = config || MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;\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\n ngAfterViewInit(): void {\n this.focusMonitorSubscription = this.focusMonitor.monitor(this.input)\n .subscribe((origin) => this.onFocus(origin === 'keyboard'));\n }\n\n ngOnDestroy(): void {\n this.focusMonitorSubscription.unsubscribe();\n }\n\n onFileSelectedViaClick({ target }: Event) {\n if (this.disabled) { return; }\n this.files = [\n ...this.files,\n ...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 this.onFileListChange();\n }\n\n onFileDropped(files: FileList) {\n if (this.disabled) { return; }\n this.files = [...this.files, ...this.mapToFileItem(files)];\n\n this.onFileListChange();\n }\n\n deleteFile(index: number, event?: MouseEvent) {\n if (this.disabled) { return; }\n event?.stopPropagation();\n this.files.splice(index, 1);\n this.files = [...this.files];\n\n this.onFileListChange();\n }\n\n onFileListChange(): void {\n this.fileQueueChanged.emit(this.files);\n }\n\n onFocus(focusState: boolean) {\n if (this.disabled) { return; }\n this.hasFocus = focusState;\n this.cdr.markForCheck();\n }\n\n private mapToFileItem(files: FileList | 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","<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n\n\n </ng-container>\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 >\n</div>\n\n<div class=\"mc-file-upload__info-section\">\n <mc-hint class=\"mc-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </mc-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <mc-hint class=\"mc-file-upload__hint mc-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </mc-hint>\n </ng-container>\n</div>\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]=\"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 {{ config.captionTextWhenSelected }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n</ng-template>\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter, Inject,\n Input, OnDestroy, Optional,\n Output, Renderer2,\n ViewChild\n} from '@angular/core';\nimport { CanDisable } from '@ptsecurity/mosaic/core';\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport {\n MC_FILE_UPLOAD_CONFIGURATION,\n McFileItem,\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 = {\n captionText: 'Перетащите файл или',\n browseLink: 'выберите'\n};\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 host: {\n class: 'mc-single-file-upload'\n }\n})\nexport class McSingleFileUploadComponent implements AfterViewInit, OnDestroy, McInputFile, CanDisable {\n @Input() accept: string[];\n @Input() disabled: boolean = false;\n @Input() errors: string[] = [];\n @Input() files: McFileItem[] = [];\n @Input() inputId: string = `mc-single-file-upload-${nextSingleFileUploadUniqueId++}`;\n @Input() customValidation?: McFileValidatorFn[];\n @Output() fileQueueChanged: EventEmitter<McFileItem | null> = new EventEmitter<McFileItem | null>();\n\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n hasFocus = false;\n\n private focusMonitorSubscription = Subscription.EMPTY;\n\n get acceptedFiles(): string {\n return this.accept && this.accept.length > 0 ? this.accept.map((ext: string) => `.${ext}`).join(',') : '*/*';\n }\n\n constructor(\n private focusMonitor: FocusMonitor,\n private cdr: ChangeDetectorRef,\n private renderer: Renderer2,\n @Optional() @Inject(MC_FILE_UPLOAD_CONFIGURATION) public config: McInputFileLabel\n ) {\n this.config = config || MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;\n }\n\n ngAfterViewInit(): void {\n this.focusMonitorSubscription = this.focusMonitor.monitor(this.input)\n .subscribe((origin) => this.onFocus(origin === 'keyboard'));\n }\n\n ngOnDestroy(): void {\n this.focusMonitorSubscription.unsubscribe();\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.files = [this.mapToFileItem(files[0])];\n this.fileQueueChanged.emit(this.files[0]);\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\n deleteItem(event?: MouseEvent): void {\n if (this.disabled) { return; }\n\n event?.stopPropagation();\n this.files = [];\n this.errors = [];\n this.fileQueueChanged.emit(null);\n }\n\n onFileDropped(files: FileList): void {\n if (this.disabled) { return; }\n\n if (this.isCorrectExtension(files[0])) {\n this.files = Array.from(files)\n .map((file) => this.mapToFileItem(file));\n this.fileQueueChanged.emit(this.files[0]);\n }\n }\n\n onFocus(focusState: boolean) {\n if (this.disabled) { return; }\n this.hasFocus = focusState;\n this.cdr.markForCheck();\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 && this.customValidation.length) {\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\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","<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"errors && errors.length\"\n (filesDropped)=\"onFileDropped($event)\">\n <div class=\"dropzone\" *ngIf=\"!files.length; else fileOutput\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n </div>\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\"\n >\n</div>\n<mc-hint class=\"mc-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n</mc-hint>\n<ng-container *ngIf=\"errors && errors.length\">\n <mc-hint class=\"mc-file-upload__hint mc-error\" *ngFor=\"let error of errors\">{{ error }}</mc-hint>\n</ng-container>\n\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"files && files.length\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: files[0].loading | async, progress: files[0].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]=\"files[0].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 { 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 { 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 McToolTipModule,\n McProgressSpinnerModule,\n McIconModule,\n McButtonModule,\n McListModule,\n McFormFieldModule,\n McEllipsisCenterModule,\n McDataSizeModule\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 */\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IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,uBAAuB;wBACvB,YAAY;wBACZ,cAAc;wBACd,YAAY;wBACZ,iBAAiB;wBACjB,sBAAsB;wBACtB,gBAAgB;AACnB,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;;;ACtCD;;AAEG;;;;"}
1
+ {"version":3,"file":"ptsecurity-mosaic-file-upload.mjs","sources":["../../../packages/mosaic/file-upload/file-upload.ts","../../../packages/mosaic/file-upload/file-drop.ts","../../../packages/mosaic/file-upload/multiple-file-upload.component.ts","../../../packages/mosaic/file-upload/multiple-file-upload.component.html","../../../packages/mosaic/file-upload/single-file-upload.component.ts","../../../packages/mosaic/file-upload/single-file-upload.component.html","../../../packages/mosaic/file-upload/file-upload.module.ts","../../../packages/mosaic/file-upload/ptsecurity-mosaic-file-upload.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { BehaviorSubject } 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 files: McFileItem[] | McFileItem | null;\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\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","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 { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter, Inject,\n Input, OnDestroy, Optional,\n Output, Renderer2,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { CanDisable } from '@ptsecurity/mosaic/core';\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport {\n MC_FILE_UPLOAD_CONFIGURATION,\n McFile,\n McFileItem,\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 captionText: 'Перетащите сюда или',\n captionTextWhenSelected: 'Перетащите еще или',\n captionTextForCompactSize: 'Перетащите файлы или',\n browseLink: 'выберите',\n title: 'Загрузите файлы',\n gridHeaders: {\n file: 'Файл',\n size: 'Размер'\n }\n};\n\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 host: {\n class: 'mc-multiple-file-upload'\n }\n})\nexport class McMultipleFileUploadComponent implements AfterViewInit, OnDestroy, McInputFile, CanDisable {\n @Input() accept?: string[];\n @Input() disabled: boolean;\n @Input() errors: string[] = [];\n @Input() files: McFileItem[] = [];\n @Input() size: 'compact' | 'default' = 'default';\n @Input() inputId: string = `mc-multiple-file-upload-${nextMultipleFileUploadUniqueId++}`;\n @Input() customValidation?: McFileValidatorFn[];\n @Output() fileQueueChanged: EventEmitter<McFileItem[]> = new EventEmitter<McFileItem[]>();\n\n @ContentChild('mcFileIcon', { static: false, read: TemplateRef }) customFileIcon: TemplateRef<HTMLElement>;\n\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n hasFocus = false;\n columnDefs: { header: string; cssClass: string }[];\n\n private focusMonitorSubscription = Subscription.EMPTY;\n\n get acceptedFiles(): string {\n return this.accept && this.accept.length > 0 ? this.accept.map((ext: string) => `.${ext}`).join(',') : '*/*';\n }\n\n get hasErrors(): boolean {\n return this.errors && !!this.errors.length;\n }\n\n constructor(\n private focusMonitor: FocusMonitor,\n private cdr: ChangeDetectorRef,\n private renderer: Renderer2,\n @Optional() @Inject(MC_FILE_UPLOAD_CONFIGURATION) public config: McInputFileMultipleLabel\n ) {\n this.config = config || MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;\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\n ngAfterViewInit(): void {\n this.focusMonitorSubscription = this.focusMonitor.monitor(this.input)\n .subscribe((origin) => this.onFocus(origin === 'keyboard'));\n }\n\n ngOnDestroy(): void {\n this.focusMonitorSubscription.unsubscribe();\n }\n\n onFileSelectedViaClick({ target }: Event) {\n if (this.disabled) { return; }\n this.files = [\n ...this.files,\n ...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 this.onFileListChange();\n }\n\n onFileDropped(files: FileList | McFile[]) {\n if (this.disabled) { return; }\n this.files = [...this.files, ...this.mapToFileItem(files)];\n\n this.onFileListChange();\n }\n\n deleteFile(index: number, event?: MouseEvent) {\n if (this.disabled) { return; }\n event?.stopPropagation();\n this.files.splice(index, 1);\n this.files = [...this.files];\n\n this.onFileListChange();\n }\n\n onFileListChange(): void {\n this.fileQueueChanged.emit(this.files);\n }\n\n onFocus(focusState: boolean) {\n if (this.disabled) { return; }\n this.hasFocus = focusState;\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","<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n\n\n </ng-container>\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 >\n</div>\n\n<div class=\"mc-file-upload__info-section\">\n <mc-hint class=\"mc-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </mc-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <mc-hint class=\"mc-file-upload__hint mc-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </mc-hint>\n </ng-container>\n</div>\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 {{ config.captionTextWhenSelected }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\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 {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n</ng-template>\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy, ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter, Inject,\n Input, OnDestroy, Optional,\n Output, Renderer2,\n ViewChild\n} from '@angular/core';\nimport { CanDisable } from '@ptsecurity/mosaic/core';\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport {\n MC_FILE_UPLOAD_CONFIGURATION,\n McFile,\n McFileItem,\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 = {\n captionText: 'Перетащите файл или',\n browseLink: 'выберите'\n};\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 host: {\n class: 'mc-single-file-upload'\n }\n})\nexport class McSingleFileUploadComponent implements AfterViewInit, OnDestroy, McInputFile, CanDisable {\n @Input() accept: string[];\n @Input() disabled: boolean = false;\n @Input() errors: string[] = [];\n @Input() files: McFileItem[] = [];\n @Input() inputId: string = `mc-single-file-upload-${nextSingleFileUploadUniqueId++}`;\n @Input() customValidation?: McFileValidatorFn[];\n @Output() fileQueueChanged: EventEmitter<McFileItem | null> = new EventEmitter<McFileItem | null>();\n\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n hasFocus = false;\n\n private focusMonitorSubscription = Subscription.EMPTY;\n\n get acceptedFiles(): string {\n return this.accept && this.accept.length > 0 ? this.accept.map((ext: string) => `.${ext}`).join(',') : '*/*';\n }\n\n constructor(\n private focusMonitor: FocusMonitor,\n private cdr: ChangeDetectorRef,\n private renderer: Renderer2,\n @Optional() @Inject(MC_FILE_UPLOAD_CONFIGURATION) public config: McInputFileLabel\n ) {\n this.config = config || MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;\n }\n\n ngAfterViewInit(): void {\n this.focusMonitorSubscription = this.focusMonitor.monitor(this.input)\n .subscribe((origin) => this.onFocus(origin === 'keyboard'));\n }\n\n ngOnDestroy(): void {\n this.focusMonitorSubscription.unsubscribe();\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.files = [this.mapToFileItem(files[0])];\n this.fileQueueChanged.emit(this.files[0]);\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\n deleteItem(event?: MouseEvent): void {\n if (this.disabled) { return; }\n\n event?.stopPropagation();\n this.files = [];\n this.errors = [];\n this.fileQueueChanged.emit(null);\n }\n\n onFileDropped(files: FileList | McFile[]): void {\n if (this.disabled) { return; }\n\n if (this.isCorrectExtension(files[0])) {\n this.files = Array.from(files)\n .map((file) => this.mapToFileItem(file));\n this.fileQueueChanged.emit(this.files[0]);\n }\n }\n\n onFocus(focusState: boolean) {\n if (this.disabled) { return; }\n this.hasFocus = focusState;\n this.cdr.markForCheck();\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 && this.customValidation.length) {\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\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","<div class=\"mc-file-upload\"\n mcFileDrop\n [class.disabled]=\"disabled\"\n [class.mc-error]=\"errors && errors.length\"\n (filesDropped)=\"onFileDropped($event)\">\n <div class=\"dropzone\" *ngIf=\"!files.length; else fileOutput\">\n <i mc-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ config.captionText }}\n <label class=\"mc-link\"\n [class.mc-focused]=\"hasFocus\"\n [for]=\"inputId\">\n {{ config.browseLink }}\n </label>\n </span>\n </div>\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\"\n >\n</div>\n<mc-hint class=\"mc-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n</mc-hint>\n<ng-container *ngIf=\"errors && errors.length\">\n <mc-hint class=\"mc-file-upload__hint mc-error\" *ngFor=\"let error of errors\">{{ error }}</mc-hint>\n</ng-container>\n\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"files && files.length\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: files[0].loading | async, progress: files[0].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]=\"files[0].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 { 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 { 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 McToolTipModule,\n McProgressSpinnerModule,\n McIconModule,\n McButtonModule,\n McListModule,\n McFormFieldModule,\n McEllipsisCenterModule,\n McDataSizeModule\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":["i8.McFileDropDirective","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmCA;MACa,4BAA4B,GAAG,IAAI,cAAc,CAAmB,2BAA2B;;AC/B5G,MAAM,oBAAoB,GAAG,MAAe,kBAAkB,IAAI,gBAAgB,CAAC,SAAS,CAAC;AAC7F,MAAM,gBAAgB,GAAG,CAAC,KAAuB,KAAwC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,CAAC;AACtH,MAAM,WAAW,GAAG,CAAC,KAAuB,KAAmC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC;MAa1F,mBAAmB,CAAA;AAVhC,IAAA,WAAA,GAAA;AAac,QAAA,IAAA,CAAA,YAAY,GAAsC,IAAI,YAAY,EAAuB,CAAC;AAmCvG,KAAA;AAjCG,IAAA,UAAU,CAAC,KAAgB,EAAA;QACvB,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;AACxB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;KACxB;AAED,IAAA,WAAW,CAAC,KAAgB,EAAA;QACxB,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;AACxB,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;KACzB;AAED,IAAA,MAAM,CAAC,KAAgB,EAAA;QACnB,IAAI,CAAC,oBAAoB,EAAE,EAAE;AACzB,YAAA,OAAO,CAAC,IAAI,CAAC,2EAA2E,CAAC,CAAC;AAC7F,SAAA;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;AACxB,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;AAEtB,QAAA,IAAI,KAAK,CAAC,YAAY,IAAI,KA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inBase {
442
442
  }
443
443
  }
444
444
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: McFormField, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$2.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
445
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: McFormField, selector: "mc-form-field", inputs: { color: "color" }, host: { listeners: { "keydown": "onKeyDown($event)", "mouseenter": "onHoverChanged(true)", "mouseleave": "onHoverChanged(false)" }, properties: { "class.mc-form-field_invalid": "control.errorState", "class.mc-form-field_has-prefix": "hasPrefix", "class.mc-form-field_has-suffix": "hasSuffix", "class.mc-form-field_has-cleaner": "canShowCleaner", "class.mc-form-field_has-stepper": "canShowStepper", "class.mc-disabled": "control.disabled", "class.ng-untouched": "shouldForward(\"untouched\")", "class.ng-touched": "shouldForward(\"touched\")", "class.ng-pristine": "shouldForward(\"pristine\")", "class.ng-dirty": "shouldForward(\"dirty\")", "class.ng-valid": "shouldForward(\"valid\")", "class.ng-invalid": "shouldForward(\"invalid\")", "class.ng-pending": "shouldForward(\"pending\")" }, classAttribute: "mc-form-field" }, providers: [{ provide: MC_FORM_FIELD, useExisting: McFormField }], queries: [{ propertyName: "control", first: true, predicate: McFormFieldControl, descendants: true }, { propertyName: "stepper", first: true, predicate: McStepper, descendants: true }, { propertyName: "cleaner", first: true, predicate: McCleaner, descendants: true }, { propertyName: "hint", predicate: McHint }, { propertyName: "passwordHints", predicate: McPasswordHint }, { propertyName: "suffix", predicate: McSuffix }, { propertyName: "prefix", predicate: McPrefix }], viewQueries: [{ propertyName: "connectionContainerRef", first: true, predicate: ["connectionContainer"], descendants: true, static: true }], exportAs: ["mcFormField"], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\" #connectionContainer>\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content select=\"mc-password-toggle\"></ng-content>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint, mc-password-hint\"></ng-content>\n</div>\n", styles: [".mc-form{display:flex;flex-direction:column}.mc-form__row{display:flex;flex-direction:row}.mc-form-horizontal .mc-form-row_margin{margin-bottom:var(--mc-forms-size-horizontal-row-margin-bottom, 20px)}.mc-form-horizontal .mc-form__label{padding-top:var(--mc-forms-size-horizontal-label-padding-top, 6px);text-align:start}.mc-form-horizontal .mc-form__control{padding-left:var(--mc-forms-size-horizontal-control-padding-left, 16px)}.mc-form-horizontal .mc-form__legend{margin-top:var(--mc-forms-size-horizontal-legend-margin-top, 32px);margin-bottom:var(--mc-forms-size-horizontal-legend-margin-bottom, 16px)}.mc-form-vertical .mc-form__row{flex-direction:column}.mc-form-vertical .mc-form-row_margin{margin-bottom:var(--mc-forms-size-vertical-row-margin-bottom, 16px)}.mc-form-vertical .mc-form__label{padding-top:var(--mc-forms-size-vertical-label-padding-top, 0);padding-bottom:var(--mc-forms-size-vertical-label-padding-bottom, 4px);text-align:start}.mc-form-vertical .mc-form__control{padding-left:0}.mc-form-vertical .mc-form__legend{margin-top:var(--mc-forms-size-vertical-legend-margin-top, 32px);margin-bottom:var(--mc-forms-size-vertical-legend-margin-bottom, 12px)}.mc-form__fieldset{display:flex;flex-direction:column}.mc-form__fieldset.mc-horizontal{flex-direction:row}.mc-form__fieldset.mc-horizontal .mc-form__row:not(:first-child){padding-left:var(--mc-forms-size-vertical-control-padding-left, 24px)}.mc-form-field{position:relative;display:inline-block;width:100%}.mc-form-field,.mc-form-field .mc-input{border-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-form-field:hover{z-index:1}.mc-form-field.mc-focused{z-index:2}.mc-form-field-type-input-password .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-hint{display:block}.mc-password-hint{display:block;padding-left:calc(16px + var(--mc-form-field-password-hint-size-icon-margin, 4px));margin-top:var(--mc-form-field-password-hint-size-margin-top, 8px)}.mc-password-hint .mc-icon{position:absolute;left:0}.mc-password-hint:first-child{margin-top:12px}.mc-form-field__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}.mc-form-field__container{position:relative;border-width:var(--mc-form-field-size-border-width, 1px);border-style:solid;border-color:transparent;border-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-form-field_without-borders .mc-form-field__container{border-color:transparent}.mc-form-field__prefix,.mc-form-field__suffix{position:absolute;top:0;bottom:0;width:32px;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-form-field__prefix{left:0}.mc-form-field__suffix{right:0}.mc-form-field_has-suffix .mc-input,.mc-form-field_has-cleaner .mc-input,.mc-form-field_has-stepper .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-form-field_has-prefix .mc-input{padding-left:var(--mc-form-field-size-button-width, 32px)}.mc-cleaner{display:flex;width:var(--mc-form-field-size-button-width, 32px);height:100%;cursor:pointer}.mc-cleaner .mc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.mc-form-field__cleaner .mc-cleaner{position:absolute;top:0;bottom:0;right:0}mc-stepper{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;bottom:0;right:0;width:var(--mc-form-field-size-button-width, 32px)}mc-stepper .mc-stepper-step-up,mc-stepper .mc-stepper-step-down{cursor:pointer;width:var(--mc-form-field-size-button-width, 32px);text-align:center}mc-stepper .mc-stepper-step-up{transform:scaleY(-1)}\n", ".mc-input{background:transparent;padding:0;margin:0;border:none;outline:none;width:var(--mc-input-size-width, 100%);min-height:calc(var(--mc-form-field-size-height, 32px) - var(--mc-form-field-size-border-width, 1px) * 2);padding:var(--mc-input-size-padding, 0 12px)}.mc-input::-ms-clear{display:none;width:0;height:0}.mc-input::-ms-reveal{display:none;width:0;height:0}.mc-input::-webkit-search-decoration,.mc-input::-webkit-search-cancel-button,.mc-input::-webkit-search-results-button,.mc-input::-webkit-search-results-decoration{display:none}.mc-input{display:inline-block;box-sizing:border-box}input.mc-input[type=number]{-moz-appearance:textfield}input.mc-input[type=number]::-webkit-inner-spin-button,input.mc-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input.mc-input:invalid{box-shadow:unset}input.mc-input::placeholder{opacity:1}.mc-password-toggle{display:flex;position:absolute;top:-1px;right:-1px;border:1px solid transparent;width:32px;height:32px;align-items:center;justify-content:center;cursor:pointer;border-top-right-radius:var(--mc-form-field-size-border-radius, 4px);border-bottom-right-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-password-toggle::-moz-focus-inner{border:0}.mc-password-toggle:focus{outline:none}\n", ".mc-timepicker{padding-right:calc(var(--mc-timepicker-size-padding-right, 16px) - var(--mc-form-field-size-border-width, 1px))}.mc-form-field-type-timepicker{width:auto}\n", ".mc-form-field-type-datepicker{width:auto}.mc-datepicker{width:var(--mc-datepicker-input-size-width, 130px)}\n", ".mc-textarea{background:transparent;margin:0;border:none;outline:none;resize:none;overflow:auto;width:100%;box-sizing:border-box;padding:var(--mc-textarea-size-padding, 5px 12px)}.mc-textarea{display:inline-block;-webkit-appearance:none;vertical-align:bottom}.mc-textarea:not(.mc-textarea-resizable){box-sizing:border-box;overflow-y:hidden}.mc-textarea.mc-textarea-resizable{resize:vertical;min-height:var(--mc-textarea-size-min-height, 50px)}.mc-textarea:invalid{box-shadow:unset}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
445
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: McFormField, selector: "mc-form-field", inputs: { color: "color" }, host: { listeners: { "keydown": "onKeyDown($event)", "mouseenter": "onHoverChanged(true)", "mouseleave": "onHoverChanged(false)" }, properties: { "class.mc-form-field_invalid": "control.errorState", "class.mc-form-field_has-prefix": "hasPrefix", "class.mc-form-field_has-suffix": "hasSuffix", "class.mc-form-field_has-cleaner": "canShowCleaner", "class.mc-form-field_has-stepper": "canShowStepper", "class.mc-disabled": "control.disabled", "class.ng-untouched": "shouldForward(\"untouched\")", "class.ng-touched": "shouldForward(\"touched\")", "class.ng-pristine": "shouldForward(\"pristine\")", "class.ng-dirty": "shouldForward(\"dirty\")", "class.ng-valid": "shouldForward(\"valid\")", "class.ng-invalid": "shouldForward(\"invalid\")", "class.ng-pending": "shouldForward(\"pending\")" }, classAttribute: "mc-form-field" }, providers: [{ provide: MC_FORM_FIELD, useExisting: McFormField }], queries: [{ propertyName: "control", first: true, predicate: McFormFieldControl, descendants: true }, { propertyName: "stepper", first: true, predicate: McStepper, descendants: true }, { propertyName: "cleaner", first: true, predicate: McCleaner, descendants: true }, { propertyName: "hint", predicate: McHint }, { propertyName: "passwordHints", predicate: McPasswordHint }, { propertyName: "suffix", predicate: McSuffix }, { propertyName: "prefix", predicate: McPrefix }], viewQueries: [{ propertyName: "connectionContainerRef", first: true, predicate: ["connectionContainer"], descendants: true, static: true }], exportAs: ["mcFormField"], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\" #connectionContainer>\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content select=\"mc-password-toggle\"></ng-content>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint, mc-password-hint\"></ng-content>\n</div>\n", styles: [".mc-form-field{position:relative;display:inline-block;width:100%}.mc-form-field,.mc-form-field .mc-input{border-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-form-field:hover{z-index:1}.mc-form-field.mc-focused{z-index:2}.mc-form-field-type-input-password .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-hint{display:block}.mc-password-hint{display:block;padding-left:calc(16px + var(--mc-form-field-password-hint-size-icon-margin, 4px));margin-top:var(--mc-form-field-password-hint-size-margin-top, 8px)}.mc-password-hint .mc-icon{position:absolute;left:0}.mc-password-hint:first-child{margin-top:12px}.mc-form-field__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}.mc-form-field__container{position:relative;border-width:var(--mc-form-field-size-border-width, 1px);border-style:solid;border-color:transparent;border-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-form-field_without-borders .mc-form-field__container{border-color:transparent}.mc-form-field__prefix,.mc-form-field__suffix{position:absolute;top:0;bottom:0;width:32px;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-form-field__prefix{left:0}.mc-form-field__suffix{right:0}.mc-form-field_has-suffix .mc-input,.mc-form-field_has-cleaner .mc-input,.mc-form-field_has-stepper .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-form-field_has-prefix .mc-input{padding-left:var(--mc-form-field-size-button-width, 32px)}.mc-cleaner{display:flex;width:var(--mc-form-field-size-button-width, 32px);height:100%;cursor:pointer}.mc-cleaner .mc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.mc-form-field__cleaner .mc-cleaner{position:absolute;top:0;bottom:0;right:0}mc-stepper{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;bottom:0;right:0;width:var(--mc-form-field-size-button-width, 32px)}mc-stepper .mc-stepper-step-up,mc-stepper .mc-stepper-step-down{cursor:pointer;width:var(--mc-form-field-size-button-width, 32px);text-align:center}mc-stepper .mc-stepper-step-up{transform:scaleY(-1)}\n", ".mc-input{background:transparent;padding:0;margin:0;border:none;outline:none;width:var(--mc-input-size-width, 100%);min-height:calc(var(--mc-form-field-size-height, 32px) - var(--mc-form-field-size-border-width, 1px) * 2);padding:var(--mc-input-size-padding, 0 12px)}.mc-input::-ms-clear{display:none;width:0;height:0}.mc-input::-ms-reveal{display:none;width:0;height:0}.mc-input::-webkit-search-decoration,.mc-input::-webkit-search-cancel-button,.mc-input::-webkit-search-results-button,.mc-input::-webkit-search-results-decoration{display:none}.mc-input{display:inline-block;box-sizing:border-box}input.mc-input[type=number]{-moz-appearance:textfield}input.mc-input[type=number]::-webkit-inner-spin-button,input.mc-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input.mc-input:invalid{box-shadow:unset}input.mc-input::placeholder{opacity:1}.mc-password-toggle{display:flex;position:absolute;top:-1px;right:-1px;border:1px solid transparent;width:32px;height:32px;align-items:center;justify-content:center;cursor:pointer;border-top-right-radius:var(--mc-form-field-size-border-radius, 4px);border-bottom-right-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-password-toggle::-moz-focus-inner{border:0}.mc-password-toggle:focus{outline:none}\n", ".mc-timepicker{padding-right:calc(var(--mc-timepicker-size-padding-right, 16px) - var(--mc-form-field-size-border-width, 1px))}.mc-form-field-type-timepicker{width:auto}\n", ".mc-form-field-type-datepicker{width:auto}.mc-datepicker{width:var(--mc-datepicker-input-size-width, 130px)}\n", ".mc-textarea{background:transparent;margin:0;border:none;outline:none;resize:none;overflow:auto;width:100%;box-sizing:border-box;padding:var(--mc-textarea-size-padding, 5px 12px)}.mc-textarea{display:inline-block;-webkit-appearance:none;vertical-align:bottom}.mc-textarea:not(.mc-textarea-resizable){box-sizing:border-box;overflow-y:hidden}.mc-textarea.mc-textarea-resizable{resize:vertical;min-height:var(--mc-textarea-size-min-height, 50px)}.mc-textarea:invalid{box-shadow:unset}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
446
446
  }
447
447
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: McFormField, decorators: [{
448
448
  type: Component,
@@ -464,7 +464,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
464
464
  '(keydown)': 'onKeyDown($event)',
465
465
  '(mouseenter)': 'onHoverChanged(true)',
466
466
  '(mouseleave)': 'onHoverChanged(false)'
467
- }, inputs: ['color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: MC_FORM_FIELD, useExisting: McFormField }], template: "<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\" #connectionContainer>\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content select=\"mc-password-toggle\"></ng-content>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint, mc-password-hint\"></ng-content>\n</div>\n", styles: [".mc-form{display:flex;flex-direction:column}.mc-form__row{display:flex;flex-direction:row}.mc-form-horizontal .mc-form-row_margin{margin-bottom:var(--mc-forms-size-horizontal-row-margin-bottom, 20px)}.mc-form-horizontal .mc-form__label{padding-top:var(--mc-forms-size-horizontal-label-padding-top, 6px);text-align:start}.mc-form-horizontal .mc-form__control{padding-left:var(--mc-forms-size-horizontal-control-padding-left, 16px)}.mc-form-horizontal .mc-form__legend{margin-top:var(--mc-forms-size-horizontal-legend-margin-top, 32px);margin-bottom:var(--mc-forms-size-horizontal-legend-margin-bottom, 16px)}.mc-form-vertical .mc-form__row{flex-direction:column}.mc-form-vertical .mc-form-row_margin{margin-bottom:var(--mc-forms-size-vertical-row-margin-bottom, 16px)}.mc-form-vertical .mc-form__label{padding-top:var(--mc-forms-size-vertical-label-padding-top, 0);padding-bottom:var(--mc-forms-size-vertical-label-padding-bottom, 4px);text-align:start}.mc-form-vertical .mc-form__control{padding-left:0}.mc-form-vertical .mc-form__legend{margin-top:var(--mc-forms-size-vertical-legend-margin-top, 32px);margin-bottom:var(--mc-forms-size-vertical-legend-margin-bottom, 12px)}.mc-form__fieldset{display:flex;flex-direction:column}.mc-form__fieldset.mc-horizontal{flex-direction:row}.mc-form__fieldset.mc-horizontal .mc-form__row:not(:first-child){padding-left:var(--mc-forms-size-vertical-control-padding-left, 24px)}.mc-form-field{position:relative;display:inline-block;width:100%}.mc-form-field,.mc-form-field .mc-input{border-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-form-field:hover{z-index:1}.mc-form-field.mc-focused{z-index:2}.mc-form-field-type-input-password .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-hint{display:block}.mc-password-hint{display:block;padding-left:calc(16px + var(--mc-form-field-password-hint-size-icon-margin, 4px));margin-top:var(--mc-form-field-password-hint-size-margin-top, 8px)}.mc-password-hint .mc-icon{position:absolute;left:0}.mc-password-hint:first-child{margin-top:12px}.mc-form-field__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}.mc-form-field__container{position:relative;border-width:var(--mc-form-field-size-border-width, 1px);border-style:solid;border-color:transparent;border-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-form-field_without-borders .mc-form-field__container{border-color:transparent}.mc-form-field__prefix,.mc-form-field__suffix{position:absolute;top:0;bottom:0;width:32px;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-form-field__prefix{left:0}.mc-form-field__suffix{right:0}.mc-form-field_has-suffix .mc-input,.mc-form-field_has-cleaner .mc-input,.mc-form-field_has-stepper .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-form-field_has-prefix .mc-input{padding-left:var(--mc-form-field-size-button-width, 32px)}.mc-cleaner{display:flex;width:var(--mc-form-field-size-button-width, 32px);height:100%;cursor:pointer}.mc-cleaner .mc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.mc-form-field__cleaner .mc-cleaner{position:absolute;top:0;bottom:0;right:0}mc-stepper{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;bottom:0;right:0;width:var(--mc-form-field-size-button-width, 32px)}mc-stepper .mc-stepper-step-up,mc-stepper .mc-stepper-step-down{cursor:pointer;width:var(--mc-form-field-size-button-width, 32px);text-align:center}mc-stepper .mc-stepper-step-up{transform:scaleY(-1)}\n", ".mc-input{background:transparent;padding:0;margin:0;border:none;outline:none;width:var(--mc-input-size-width, 100%);min-height:calc(var(--mc-form-field-size-height, 32px) - var(--mc-form-field-size-border-width, 1px) * 2);padding:var(--mc-input-size-padding, 0 12px)}.mc-input::-ms-clear{display:none;width:0;height:0}.mc-input::-ms-reveal{display:none;width:0;height:0}.mc-input::-webkit-search-decoration,.mc-input::-webkit-search-cancel-button,.mc-input::-webkit-search-results-button,.mc-input::-webkit-search-results-decoration{display:none}.mc-input{display:inline-block;box-sizing:border-box}input.mc-input[type=number]{-moz-appearance:textfield}input.mc-input[type=number]::-webkit-inner-spin-button,input.mc-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input.mc-input:invalid{box-shadow:unset}input.mc-input::placeholder{opacity:1}.mc-password-toggle{display:flex;position:absolute;top:-1px;right:-1px;border:1px solid transparent;width:32px;height:32px;align-items:center;justify-content:center;cursor:pointer;border-top-right-radius:var(--mc-form-field-size-border-radius, 4px);border-bottom-right-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-password-toggle::-moz-focus-inner{border:0}.mc-password-toggle:focus{outline:none}\n", ".mc-timepicker{padding-right:calc(var(--mc-timepicker-size-padding-right, 16px) - var(--mc-form-field-size-border-width, 1px))}.mc-form-field-type-timepicker{width:auto}\n", ".mc-form-field-type-datepicker{width:auto}.mc-datepicker{width:var(--mc-datepicker-input-size-width, 130px)}\n", ".mc-textarea{background:transparent;margin:0;border:none;outline:none;resize:none;overflow:auto;width:100%;box-sizing:border-box;padding:var(--mc-textarea-size-padding, 5px 12px)}.mc-textarea{display:inline-block;-webkit-appearance:none;vertical-align:bottom}.mc-textarea:not(.mc-textarea-resizable){box-sizing:border-box;overflow-y:hidden}.mc-textarea.mc-textarea-resizable{resize:vertical;min-height:var(--mc-textarea-size-min-height, 50px)}.mc-textarea:invalid{box-shadow:unset}\n"] }]
467
+ }, inputs: ['color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: MC_FORM_FIELD, useExisting: McFormField }], template: "<div class=\"mc-form-field__container\" (click)=\"onContainerClick($event)\" #connectionContainer>\n\n <div class=\"mc-form-field__prefix\" *ngIf=\"hasPrefix\">\n <ng-content select=\"[mcPrefix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__infix\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"mc-form-field__suffix\" *ngIf=\"hasSuffix\">\n <ng-content select=\"[mcSuffix]\"></ng-content>\n </div>\n\n <div class=\"mc-form-field__cleaner\"\n *ngIf=\"canShowCleaner && !hasSuffix\"\n (click)=\"clearValue($event)\">\n <ng-content select=\"mc-cleaner\"></ng-content>\n </div>\n\n <ng-content select=\"mc-password-toggle\"></ng-content>\n\n <ng-content *ngIf=\"canShowStepper\" select=\"mc-stepper\"></ng-content>\n</div>\n\n<div class=\"mc-form-field__hint\">\n <ng-content select=\"mc-hint, mc-password-hint\"></ng-content>\n</div>\n", styles: [".mc-form-field{position:relative;display:inline-block;width:100%}.mc-form-field,.mc-form-field .mc-input{border-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-form-field:hover{z-index:1}.mc-form-field.mc-focused{z-index:2}.mc-form-field-type-input-password .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-hint{display:block}.mc-password-hint{display:block;padding-left:calc(16px + var(--mc-form-field-password-hint-size-icon-margin, 4px));margin-top:var(--mc-form-field-password-hint-size-margin-top, 8px)}.mc-password-hint .mc-icon{position:absolute;left:0}.mc-password-hint:first-child{margin-top:12px}.mc-form-field__hint>.mc-hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}.mc-form-field__container{position:relative;border-width:var(--mc-form-field-size-border-width, 1px);border-style:solid;border-color:transparent;border-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-form-field_without-borders .mc-form-field__container{border-color:transparent}.mc-form-field__prefix,.mc-form-field__suffix{position:absolute;top:0;bottom:0;width:32px;display:flex;flex-direction:row;justify-content:center;align-items:center}.mc-form-field__prefix{left:0}.mc-form-field__suffix{right:0}.mc-form-field_has-suffix .mc-input,.mc-form-field_has-cleaner .mc-input,.mc-form-field_has-stepper .mc-input{padding-right:var(--mc-form-field-size-button-width, 32px)}.mc-form-field_has-prefix .mc-input{padding-left:var(--mc-form-field-size-button-width, 32px)}.mc-cleaner{display:flex;width:var(--mc-form-field-size-button-width, 32px);height:100%;cursor:pointer}.mc-cleaner .mc-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.mc-form-field__cleaner .mc-cleaner{position:absolute;top:0;bottom:0;right:0}mc-stepper{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;bottom:0;right:0;width:var(--mc-form-field-size-button-width, 32px)}mc-stepper .mc-stepper-step-up,mc-stepper .mc-stepper-step-down{cursor:pointer;width:var(--mc-form-field-size-button-width, 32px);text-align:center}mc-stepper .mc-stepper-step-up{transform:scaleY(-1)}\n", ".mc-input{background:transparent;padding:0;margin:0;border:none;outline:none;width:var(--mc-input-size-width, 100%);min-height:calc(var(--mc-form-field-size-height, 32px) - var(--mc-form-field-size-border-width, 1px) * 2);padding:var(--mc-input-size-padding, 0 12px)}.mc-input::-ms-clear{display:none;width:0;height:0}.mc-input::-ms-reveal{display:none;width:0;height:0}.mc-input::-webkit-search-decoration,.mc-input::-webkit-search-cancel-button,.mc-input::-webkit-search-results-button,.mc-input::-webkit-search-results-decoration{display:none}.mc-input{display:inline-block;box-sizing:border-box}input.mc-input[type=number]{-moz-appearance:textfield}input.mc-input[type=number]::-webkit-inner-spin-button,input.mc-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input.mc-input:invalid{box-shadow:unset}input.mc-input::placeholder{opacity:1}.mc-password-toggle{display:flex;position:absolute;top:-1px;right:-1px;border:1px solid transparent;width:32px;height:32px;align-items:center;justify-content:center;cursor:pointer;border-top-right-radius:var(--mc-form-field-size-border-radius, 4px);border-bottom-right-radius:var(--mc-form-field-size-border-radius, 4px)}.mc-password-toggle::-moz-focus-inner{border:0}.mc-password-toggle:focus{outline:none}\n", ".mc-timepicker{padding-right:calc(var(--mc-timepicker-size-padding-right, 16px) - var(--mc-form-field-size-border-width, 1px))}.mc-form-field-type-timepicker{width:auto}\n", ".mc-form-field-type-datepicker{width:auto}.mc-datepicker{width:var(--mc-datepicker-input-size-width, 130px)}\n", ".mc-textarea{background:transparent;margin:0;border:none;outline:none;resize:none;overflow:auto;width:100%;box-sizing:border-box;padding:var(--mc-textarea-size-padding, 5px 12px)}.mc-textarea{display:inline-block;-webkit-appearance:none;vertical-align:bottom}.mc-textarea:not(.mc-textarea-resizable){box-sizing:border-box;overflow-y:hidden}.mc-textarea.mc-textarea-resizable{resize:vertical;min-height:var(--mc-textarea-size-min-height, 50px)}.mc-textarea:invalid{box-shadow:unset}\n"] }]
468
468
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$2.FocusMonitor }]; }, propDecorators: { control: [{
469
469
  type: ContentChild,
470
470
  args: [McFormFieldControl, { static: false }]
@@ -591,8 +591,14 @@ class McValidateDirective {
591
591
  if (!this.validationControl) {
592
592
  return;
593
593
  }
594
- this.parent?.ngSubmit
595
- .subscribe(() => this.validationControl.updateValueAndValidity({ emitEvent: false }));
594
+ if (this.parent?.onSubmit) {
595
+ // tslint:disable-next-line: no-unbound-method
596
+ const originalSubmit = this.parent.onSubmit;
597
+ this.parent.onSubmit = ($event) => {
598
+ this.validationControl.updateValueAndValidity({ emitEvent: false });
599
+ return originalSubmit.call(this.parent, $event);
600
+ };
601
+ }
596
602
  if (this.isNgModel) {
597
603
  this.setMosaicValidationForModelControl();
598
604
  }