@ptsecurity/mosaic 15.5.0 → 15.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/_theming.scss +29 -6
  2. package/_visual.scss +6 -4
  3. package/autocomplete/autocomplete-trigger.directive.d.ts +5 -15
  4. package/button/_button-theme.scss +2 -5
  5. package/button-toggle/_button-toggle-theme.scss +2 -5
  6. package/checkbox/_checkbox-theme.scss +6 -5
  7. package/code-block/_code-block-theme.scss +2 -6
  8. package/core/formatters/index.d.ts +1 -1
  9. package/core/formatters/number/formatter.d.ts +25 -0
  10. package/core/forms/_forms-theme.scss +2 -4
  11. package/core/locales/en-US.d.ts +1 -2
  12. package/core/locales/es-LA.d.ts +9 -0
  13. package/core/locales/fa-IR.d.ts +9 -0
  14. package/core/locales/locale-service.d.ts +39 -5
  15. package/core/locales/pt-BR.d.ts +9 -0
  16. package/core/locales/ru-RU.d.ts +1 -2
  17. package/core/locales/zh-CN.d.ts +9 -0
  18. package/core/option/_optgroup-theme.scss +2 -4
  19. package/core/option/_option-theme.scss +2 -5
  20. package/core/option/option.d.ts +36 -7
  21. package/core/overlay/overlay-position-map.d.ts +7 -1
  22. package/core/styles/_variables.scss +1 -0
  23. package/core/styles/theming/_badges.scss +2 -1
  24. package/core/styles/theming/_theming.scss +1 -0
  25. package/datepicker/_datepicker-theme.scss +2 -5
  26. package/datepicker/calendar-header.component.d.ts +8 -2
  27. package/datepicker/calendar.component.d.ts +3 -4
  28. package/datepicker/month-view.component.d.ts +3 -4
  29. package/dl/_dl-theme.scss +2 -5
  30. package/dropdown/_dropdown-theme.scss +2 -5
  31. package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +27 -24
  32. package/esm2020/core/formatters/index.mjs +6 -2
  33. package/esm2020/core/formatters/number/formatter.mjs +90 -1
  34. package/esm2020/core/locales/en-US.mjs +3 -4
  35. package/esm2020/core/locales/es-LA.mjs +11 -2
  36. package/esm2020/core/locales/fa-IR.mjs +11 -2
  37. package/esm2020/core/locales/locale-service.mjs +4 -4
  38. package/esm2020/core/locales/pt-BR.mjs +11 -2
  39. package/esm2020/core/locales/ru-RU.mjs +3 -4
  40. package/esm2020/core/locales/zh-CN.mjs +11 -2
  41. package/esm2020/core/option/optgroup.mjs +2 -2
  42. package/esm2020/core/option/option.mjs +44 -8
  43. package/esm2020/core/overlay/overlay-position-map.mjs +7 -1
  44. package/esm2020/core/version.mjs +2 -2
  45. package/esm2020/datepicker/calendar-header.component.mjs +8 -7
  46. package/esm2020/datepicker/calendar.component.mjs +5 -14
  47. package/esm2020/datepicker/datepicker-input.directive.mjs +7 -6
  48. package/esm2020/datepicker/month-view.component.mjs +6 -15
  49. package/esm2020/file-upload/multiple-file-upload.component.mjs +9 -5
  50. package/esm2020/file-upload/single-file-upload.component.mjs +10 -6
  51. package/esm2020/form-field/form-field.mjs +5 -8
  52. package/esm2020/form-field/password-hint.mjs +13 -5
  53. package/esm2020/list/list-selection.component.mjs +2 -2
  54. package/esm2020/list/list.component.mjs +2 -2
  55. package/esm2020/loader-overlay/loader-overlay.component.mjs +2 -2
  56. package/esm2020/modal/modal.component.mjs +6 -5
  57. package/esm2020/modal/modal.module.mjs +8 -4
  58. package/esm2020/navbar/navbar-item.component.mjs +14 -13
  59. package/esm2020/navbar/navbar.component.mjs +18 -9
  60. package/esm2020/navbar/vertical-navbar.component.mjs +9 -6
  61. package/esm2020/radio/radio.component.mjs +3 -2
  62. package/esm2020/select/select.component.mjs +23 -9
  63. package/esm2020/tabs/tab.component.mjs +13 -4
  64. package/esm2020/tags/tag-default-options.mjs +1 -1
  65. package/esm2020/tags/tag-input.mjs +10 -8
  66. package/esm2020/tags/tag-list.component.mjs +10 -6
  67. package/esm2020/tags/tag.component.mjs +5 -5
  68. package/esm2020/timezone/timezone-option.component.mjs +2 -2
  69. package/esm2020/timezone/timezone-select.component.mjs +2 -2
  70. package/esm2020/title/title.directive.mjs +2 -2
  71. package/esm2020/toast/toast.module.mjs +10 -4
  72. package/esm2020/tree/tree-option.component.mjs +7 -3
  73. package/esm2020/tree/tree-selection.component.mjs +6 -5
  74. package/esm2020/tree-select/tree-select.component.mjs +5 -5
  75. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +30 -24
  76. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  77. package/fesm2015/ptsecurity-mosaic-core.mjs +192 -25
  78. package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -1
  79. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +20 -36
  80. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  81. package/fesm2015/ptsecurity-mosaic-file-upload.mjs +15 -7
  82. package/fesm2015/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  83. package/fesm2015/ptsecurity-mosaic-form-field.mjs +15 -11
  84. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
  85. package/fesm2015/ptsecurity-mosaic-list.mjs +4 -4
  86. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs +2 -2
  87. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  88. package/fesm2015/ptsecurity-mosaic-modal.mjs +10 -5
  89. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
  90. package/fesm2015/ptsecurity-mosaic-navbar.mjs +36 -27
  91. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -1
  92. package/fesm2015/ptsecurity-mosaic-radio.mjs +2 -1
  93. package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -1
  94. package/fesm2015/ptsecurity-mosaic-select.mjs +23 -8
  95. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
  96. package/fesm2015/ptsecurity-mosaic-tabs.mjs +12 -3
  97. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
  98. package/fesm2015/ptsecurity-mosaic-tags.mjs +22 -16
  99. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -1
  100. package/fesm2015/ptsecurity-mosaic-timezone.mjs +4 -4
  101. package/fesm2015/ptsecurity-mosaic-timezone.mjs.map +1 -1
  102. package/fesm2015/ptsecurity-mosaic-title.mjs +1 -1
  103. package/fesm2015/ptsecurity-mosaic-title.mjs.map +1 -1
  104. package/fesm2015/ptsecurity-mosaic-toast.mjs +8 -2
  105. package/fesm2015/ptsecurity-mosaic-toast.mjs.map +1 -1
  106. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +4 -4
  107. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  108. package/fesm2015/ptsecurity-mosaic-tree.mjs +12 -6
  109. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
  110. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs +27 -24
  111. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  112. package/fesm2020/ptsecurity-mosaic-core.mjs +192 -24
  113. package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -1
  114. package/fesm2020/ptsecurity-mosaic-datepicker.mjs +20 -36
  115. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  116. package/fesm2020/ptsecurity-mosaic-file-upload.mjs +15 -7
  117. package/fesm2020/ptsecurity-mosaic-file-upload.mjs.map +1 -1
  118. package/fesm2020/ptsecurity-mosaic-form-field.mjs +15 -10
  119. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
  120. package/fesm2020/ptsecurity-mosaic-list.mjs +4 -4
  121. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs +2 -2
  122. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  123. package/fesm2020/ptsecurity-mosaic-modal.mjs +10 -5
  124. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
  125. package/fesm2020/ptsecurity-mosaic-navbar.mjs +36 -27
  126. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -1
  127. package/fesm2020/ptsecurity-mosaic-radio.mjs +2 -1
  128. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -1
  129. package/fesm2020/ptsecurity-mosaic-select.mjs +22 -8
  130. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
  131. package/fesm2020/ptsecurity-mosaic-tabs.mjs +12 -3
  132. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -1
  133. package/fesm2020/ptsecurity-mosaic-tags.mjs +22 -16
  134. package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -1
  135. package/fesm2020/ptsecurity-mosaic-timezone.mjs +4 -4
  136. package/fesm2020/ptsecurity-mosaic-timezone.mjs.map +1 -1
  137. package/fesm2020/ptsecurity-mosaic-title.mjs +1 -1
  138. package/fesm2020/ptsecurity-mosaic-title.mjs.map +1 -1
  139. package/fesm2020/ptsecurity-mosaic-toast.mjs +8 -2
  140. package/fesm2020/ptsecurity-mosaic-toast.mjs.map +1 -1
  141. package/fesm2020/ptsecurity-mosaic-tree-select.mjs +4 -4
  142. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  143. package/fesm2020/ptsecurity-mosaic-tree.mjs +11 -6
  144. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
  145. package/file-upload/_file-upload-theme.scss +2 -4
  146. package/file-upload/multiple-file-upload.component.d.ts +4 -3
  147. package/file-upload/single-file-upload.component.d.ts +4 -3
  148. package/form-field/_form-field-theme.scss +7 -5
  149. package/form-field/form-field.d.ts +0 -1
  150. package/form-field/form-field.scss +1 -3
  151. package/form-field/password-hint.d.ts +6 -3
  152. package/input/_input-theme.scss +7 -6
  153. package/link/_link-theme.scss +7 -8
  154. package/list/_list-theme.scss +2 -5
  155. package/loader-overlay/_loader-overlay-theme.scss +2 -5
  156. package/loader-overlay/loader-overlay.scss +3 -0
  157. package/markdown/_markdown-theme.scss +3 -6
  158. package/modal/_modal-theme.scss +3 -5
  159. package/modal/modal.module.d.ts +2 -1
  160. package/modal/modal.scss +14 -2
  161. package/navbar/_navbar-theme.scss +2 -6
  162. package/navbar/navbar-item.component.d.ts +3 -2
  163. package/navbar/navbar.component.d.ts +5 -2
  164. package/navbar/vertical-navbar.component.d.ts +4 -2
  165. package/package.json +11 -14
  166. package/popover/_popover-theme.scss +2 -6
  167. package/prebuilt-themes/dark-theme.css +1 -1
  168. package/prebuilt-themes/default-theme.css +1 -1
  169. package/radio/_radio-theme.scss +6 -6
  170. package/select/_select-theme.scss +2 -5
  171. package/select/select.component.d.ts +12 -9
  172. package/select/select.scss +3 -1
  173. package/sidepanel/_sidepanel-theme.scss +2 -5
  174. package/table/_table-theme.scss +2 -5
  175. package/tabs/_tabs-theme.scss +2 -5
  176. package/tags/_tag-theme.scss +2 -5
  177. package/tags/tag-default-options.d.ts +4 -0
  178. package/tags/tag-list.component.d.ts +1 -0
  179. package/tags/tag-list.scss +6 -2
  180. package/tags/tag.component.d.ts +1 -1
  181. package/textarea/_textarea-theme.scss +2 -5
  182. package/timezone/_timezone-option-theme.scss +2 -5
  183. package/toast/_toast-theme.scss +2 -5
  184. package/toggle/_toggle-theme.scss +2 -5
  185. package/tooltip/_tooltip-theme.scss +2 -5
  186. package/tree/_tree-theme.scss +2 -4
  187. package/tree/tree-option.scss +4 -2
  188. package/tree-select/_tree-select-theme.scss +2 -5
@@ -77,9 +77,10 @@ const MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION = {
77
77
  }
78
78
  };
79
79
  class McMultipleFileUploadComponent {
80
- constructor(focusMonitor, cdr, config) {
80
+ constructor(focusMonitor, cdr, renderer, config) {
81
81
  this.focusMonitor = focusMonitor;
82
82
  this.cdr = cdr;
83
+ this.renderer = renderer;
83
84
  this.config = config;
84
85
  this.errors = [];
85
86
  this.files = [];
@@ -116,6 +117,9 @@ class McMultipleFileUploadComponent {
116
117
  ...this.files,
117
118
  ...this.mapToFileItem(target.files)
118
119
  ];
120
+ /* even if the user selects the same file,
121
+ the onchange event will be triggered every time user clicks on the control.*/
122
+ this.renderer.setProperty(this.input.nativeElement, 'value', null);
119
123
  this.onFileListChange();
120
124
  }
121
125
  onFileDropped(files) {
@@ -175,7 +179,7 @@ class McMultipleFileUploadComponent {
175
179
  return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;
176
180
  }
177
181
  }
178
- /** @nocollapse */ McMultipleFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McMultipleFileUploadComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: MC_FILE_UPLOAD_CONFIGURATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
182
+ /** @nocollapse */ McMultipleFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
179
183
  /** @nocollapse */ McMultipleFileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 });
180
184
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McMultipleFileUploadComponent, decorators: [{
181
185
  type: Component,
@@ -183,7 +187,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
183
187
  class: 'mc-multiple-file-upload'
184
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"] }]
185
189
  }], ctorParameters: function () {
186
- return [{ type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
190
+ return [{ type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
187
191
  type: Optional
188
192
  }, {
189
193
  type: Inject,
@@ -219,9 +223,10 @@ const MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION = {
219
223
  browseLink: 'выберите'
220
224
  };
221
225
  class McSingleFileUploadComponent {
222
- constructor(focusMonitor, cdr, config) {
226
+ constructor(focusMonitor, cdr, renderer, config) {
223
227
  this.focusMonitor = focusMonitor;
224
228
  this.cdr = cdr;
229
+ this.renderer = renderer;
225
230
  this.config = config;
226
231
  this.disabled = false;
227
232
  this.errors = [];
@@ -247,10 +252,13 @@ class McSingleFileUploadComponent {
247
252
  return;
248
253
  }
249
254
  const files = target.files;
250
- if (files) {
255
+ if (files === null || files === void 0 ? void 0 : files.length) {
251
256
  this.files = [this.mapToFileItem(files[0])];
252
257
  this.fileQueueChanged.emit(this.files[0]);
253
258
  }
259
+ /* even if the user selects the same file,
260
+ the onchange event will be triggered every time user clicks on the control.*/
261
+ this.renderer.setProperty(this.input.nativeElement, 'value', null);
254
262
  }
255
263
  deleteItem(event) {
256
264
  if (this.disabled) {
@@ -299,7 +307,7 @@ class McSingleFileUploadComponent {
299
307
  return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;
300
308
  }
301
309
  }
302
- /** @nocollapse */ McSingleFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McSingleFileUploadComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: MC_FILE_UPLOAD_CONFIGURATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
310
+ /** @nocollapse */ McSingleFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McSingleFileUploadComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: MC_FILE_UPLOAD_CONFIGURATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
303
311
  /** @nocollapse */ McSingleFileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: McSingleFileUploadComponent, selector: "mc-single-file-upload", inputs: { accept: "accept", disabled: "disabled", errors: "errors", files: "files", inputId: "inputId", customValidation: "customValidation" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "mc-single-file-upload" }, 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.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", 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{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;border-radius:var(--mc-file-upload-size-single-border-radius, 4px);border-width:var(--mc-file-upload-size-single-border-width, 1px);border-style:var(--mc-file-upload-size-single-border-style, dashed)}.mc-file-upload .file-item{width:100%}.mc-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%}.mc-file-upload .file-item .file-item__text-wrapper .file-item__text{margin-left:8px;width:120px;flex-grow:1}.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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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$1.McButton, selector: "[mc-button]", inputs: ["color", "tabIndex", "disabled"] }, { kind: "directive", type: i5$1.McButtonCssStyler, selector: "[mc-button]" }, { 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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
304
312
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McSingleFileUploadComponent, decorators: [{
305
313
  type: Component,
@@ -307,7 +315,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
307
315
  class: 'mc-single-file-upload'
308
316
  }, template: "<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", 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{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;border-radius:var(--mc-file-upload-size-single-border-radius, 4px);border-width:var(--mc-file-upload-size-single-border-width, 1px);border-style:var(--mc-file-upload-size-single-border-style, dashed)}.mc-file-upload .file-item{width:100%}.mc-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%}.mc-file-upload .file-item .file-item__text-wrapper .file-item__text{margin-left:8px;width:120px;flex-grow:1}.mc-hint{display:block}.mc-file-upload__hint{margin-top:var(--mc-form-field-hint-size-margin-top, 4px)}\n"] }]
309
317
  }], ctorParameters: function () {
310
- return [{ type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
318
+ return [{ type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
311
319
  type: Optional
312
320
  }, {
313
321
  type: Inject,
@@ -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,\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 @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\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,\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 @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) {\n this.files = [this.mapToFileItem(files[0])];\n this.fileQueueChanged.emit(this.files[0]);\n }\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 */\n\nexport * from './index';\n"],"names":["i8.McFileDropDirective","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8BA;MACa,4BAA4B,GAAG,IAAI,cAAc,CAAmB,2BAA2B;;MClB/F,mBAAmB,CAAA;AAVhC,IAAA,WAAA,GAAA;AAac,QAAA,IAAA,CAAA,YAAY,GAA2B,IAAI,YAAY,EAAY,CAAC;KAuBjF;AArBG,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,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;AACxB,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;AAEtB,QAAA,IAAI,KAAK,CAAC,YAA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AAY;QACZ,eAAe;QACf,uBAAuB;QACvB,YAAY;QACZ,cAAc;QACd,YAAY;QACZ,iBAAiB;QACjB,sBAAsB;QACtB,gBAAgB,CAAA,EAAA,CAAA,CAAA;2FAaX,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAvB9B,QAAQ;AAAC,YAAA,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;iBACJ,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 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 */\n\nexport * from './index';\n"],"names":["i8.McFileDropDirective","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8BA;MACa,4BAA4B,GAAG,IAAI,cAAc,CAAmB,2BAA2B;;MClB/F,mBAAmB,CAAA;AAVhC,IAAA,WAAA,GAAA;AAac,QAAA,IAAA,CAAA,YAAY,GAA2B,IAAI,YAAY,EAAY,CAAC;KAuBjF;AArBG,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,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,KAAK,CAAC,YAAY,CAAC,KAA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QACnB,2BAA2B;AAC3B,QAAA,6BAA6B,aAb7B,YAAY;QACZ,eAAe;QACf,uBAAuB;QACvB,YAAY;QACZ,cAAc;QACd,YAAY;QACZ,iBAAiB;QACjB,sBAAsB;AACtB,QAAA,gBAAgB,aAQhB,2BAA2B;QAC3B,6BAA6B;QAC7B,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAGd,mBAAA,kBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YArBvB,YAAY;QACZ,eAAe;QACf,uBAAuB;QACvB,YAAY;QACZ,cAAc;QACd,YAAY;QACZ,iBAAiB;QACjB,sBAAsB;QACtB,gBAAgB,CAAA,EAAA,CAAA,CAAA;2FAaX,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAvB9B,QAAQ;AAAC,YAAA,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;iBACJ,CAAA;;;ACtCD;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i1$1 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Component, Directive, Input, forwardRef, ChangeDetectionStrategy, Inject, EventEmitter, Output, InjectionToken, ViewEncapsulation, ContentChild, ContentChildren, ViewChild, Attribute, Optional, Self, NgModule } from '@angular/core';
4
+ import { Component, Directive, Input, forwardRef, ChangeDetectionStrategy, Optional, Inject, EventEmitter, Output, InjectionToken, ViewEncapsulation, ContentChild, ContentChildren, ViewChild, Attribute, Self, NgModule } from '@angular/core';
5
5
  import * as i1 from '@ptsecurity/mosaic/icon';
6
6
  import { McIconModule } from '@ptsecurity/mosaic/icon';
7
7
  import { ThemePalette, mixinColor, MC_VALIDATION } from '@ptsecurity/mosaic/core';
@@ -91,6 +91,9 @@ const regExpPasswordValidator = {
91
91
  [PasswordRules.Digit]: RegExp(/^(?=.*?[0-9])/),
92
92
  [PasswordRules.LatinAndSpecialSymbols]: RegExp(/[^ !`"'#№$%&()*+,-./\\:;<=>?@[\]^_{|}~A-Za-z0-9]/)
93
93
  };
94
+ const hasPasswordStrengthError = (passwordHints) => {
95
+ return passwordHints.some((hint) => hint.hasError);
96
+ };
94
97
  class McPasswordHint {
95
98
  constructor(changeDetectorRef, formField) {
96
99
  this.changeDetectorRef = changeDetectorRef;
@@ -117,6 +120,7 @@ class McPasswordHint {
117
120
  return this.formField.control;
118
121
  }
119
122
  ngAfterContentInit() {
123
+ this.formField = this.formField || this.viewFormField;
120
124
  if (this.rule === null) {
121
125
  throw Error('You should set [rule] name');
122
126
  }
@@ -166,8 +170,8 @@ class McPasswordHint {
166
170
  return this.lastControlValue !== this.formField.control.value;
167
171
  }
168
172
  }
169
- /** @nocollapse */ McPasswordHint.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McPasswordHint, deps: [{ token: i0.ChangeDetectorRef }, { token: forwardRef(() => MC_FORM_FIELD) }], target: i0.ɵɵFactoryTarget.Component });
170
- /** @nocollapse */ McPasswordHint.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: McPasswordHint, selector: "mc-password-hint", inputs: { id: "id", rule: "rule", min: "min", max: "max", regex: "regex" }, host: { properties: { "class.mc-password-hint_valid": "checked", "class.mc-password-hint_invalid": "hasError", "attr.id": "id" }, classAttribute: "mc-password-hint" }, ngImport: i0, template: `
173
+ /** @nocollapse */ McPasswordHint.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McPasswordHint, deps: [{ token: i0.ChangeDetectorRef }, { token: forwardRef(() => MC_FORM_FIELD), optional: true }], target: i0.ɵɵFactoryTarget.Component });
174
+ /** @nocollapse */ McPasswordHint.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: McPasswordHint, selector: "mc-password-hint", inputs: { id: "id", rule: "rule", min: "min", max: "max", regex: "regex", viewFormField: "viewFormField" }, host: { properties: { "class.mc-password-hint_valid": "checked", "class.mc-password-hint_invalid": "hasError", "attr.id": "id" }, classAttribute: "mc-password-hint" }, ngImport: i0, template: `
171
175
  <i *ngIf="!checked" class="mc-password-hint__icon" mc-icon="mc-close-M_16"></i>
172
176
  <i *ngIf="checked" class="mc-password-hint__icon" mc-icon="mc-check_16"></i>
173
177
 
@@ -197,6 +201,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
197
201
  }]
198
202
  }], ctorParameters: function () {
199
203
  return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
204
+ type: Optional
205
+ }, {
200
206
  type: Inject,
201
207
  args: [forwardRef(() => MC_FORM_FIELD)]
202
208
  }] }];
@@ -210,6 +216,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
210
216
  type: Input
211
217
  }], regex: [{
212
218
  type: Input
219
+ }], viewFormField: [{
220
+ type: Input
213
221
  }] } });
214
222
 
215
223
  class McPrefix {
@@ -319,10 +327,6 @@ class McFormField extends McFormFieldMixinBase {
319
327
  var _a;
320
328
  return ((_a = this.hint) === null || _a === void 0 ? void 0 : _a.length) > 0;
321
329
  }
322
- get hasPasswordStrengthError() {
323
- var _a;
324
- return (_a = this.passwordHints) === null || _a === void 0 ? void 0 : _a.some((hint) => hint.hasError);
325
- }
326
330
  get hasSuffix() {
327
331
  var _a;
328
332
  return ((_a = this.suffix) === null || _a === void 0 ? void 0 : _a.length) > 0;
@@ -369,7 +373,7 @@ class McFormField extends McFormFieldMixinBase {
369
373
  .pipe(startWith())
370
374
  .subscribe((state) => {
371
375
  var _a, _b;
372
- if (!(state === null || state === void 0 ? void 0 : state.focused) && this.hasPasswordStrengthError) {
376
+ if (this.passwordHints.length && !(state === null || state === void 0 ? void 0 : state.focused) && hasPasswordStrengthError(this.passwordHints)) {
373
377
  (_b = (_a = this.control.ngControl) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.setErrors({ passwordStrength: true });
374
378
  }
375
379
  this.changeDetectorRef.markForCheck();
@@ -451,7 +455,7 @@ class McFormField extends McFormFieldMixinBase {
451
455
  }
452
456
  }
453
457
  /** @nocollapse */ McFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McFormField, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$2.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
454
- /** @nocollapse */ McFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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)\">\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))}.mc-password-hint .mc-icon{position:absolute;left:0}.mc-form-field__hint>.mc-password-hint{margin-top:var(--mc-form-field-password-hint-size-margin-top, 8px)}.mc-form-field__hint>.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 });
458
+ /** @nocollapse */ McFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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)\">\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 });
455
459
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McFormField, decorators: [{
456
460
  type: Component,
457
461
  args: [{ selector: 'mc-form-field', exportAs: 'mcFormField', host: {
@@ -472,7 +476,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
472
476
  '(keydown)': 'onKeyDown($event)',
473
477
  '(mouseenter)': 'onHoverChanged(true)',
474
478
  '(mouseleave)': 'onHoverChanged(false)'
475
- }, 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)\">\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))}.mc-password-hint .mc-icon{position:absolute;left:0}.mc-form-field__hint>.mc-password-hint{margin-top:var(--mc-form-field-password-hint-size-margin-top, 8px)}.mc-form-field__hint>.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"] }]
479
+ }, 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)\">\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"] }]
476
480
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$2.FocusMonitor }]; }, propDecorators: { control: [{
477
481
  type: ContentChild,
478
482
  args: [McFormFieldControl, { static: false }]
@@ -764,5 +768,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
764
768
  * Generated bundle index. Do not edit.
765
769
  */
766
770
 
767
- export { MC_FORM_FIELD, McCleaner, McFormField, McFormFieldBase, McFormFieldControl, McFormFieldMixinBase, McFormFieldModule, McFormFieldWithoutBorders, McHint, McHintBase, McHintMixinBase, McPasswordHint, McPrefix, McStepper, McSuffix, McTrim, McValidateDirective, PasswordRules, getMcFormFieldMissingControlError, getMcFormFieldYouCanNotUseCleanerInNumberInputError, regExpPasswordValidator };
771
+ export { MC_FORM_FIELD, McCleaner, McFormField, McFormFieldBase, McFormFieldControl, McFormFieldMixinBase, McFormFieldModule, McFormFieldWithoutBorders, McHint, McHintBase, McHintMixinBase, McPasswordHint, McPrefix, McStepper, McSuffix, McTrim, McValidateDirective, PasswordRules, getMcFormFieldMissingControlError, getMcFormFieldYouCanNotUseCleanerInNumberInputError, hasPasswordStrengthError, regExpPasswordValidator };
768
772
  //# sourceMappingURL=ptsecurity-mosaic-form-field.mjs.map