@ptsecurity/mosaic 15.3.1 → 15.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +688 -212
- package/_visual.scss +132 -42
- package/alert/README.md +0 -0
- package/alert/_alert-theme.scss +61 -0
- package/alert/alert.component.d.ts +22 -0
- package/alert/alert.component.scss +81 -0
- package/alert/alert.module.d.ts +10 -0
- package/alert/index.d.ts +1 -0
- package/alert/public-api.d.ts +2 -0
- package/autocomplete/_autocomplete-theme.nvl.scss +21 -0
- package/button/_button-base.scss +2 -2
- package/button/_button-theme.nvl.scss +180 -0
- package/button/_button-theme.scss +0 -2
- package/button/button.component.d.ts +12 -3
- package/button/button.scss +19 -5
- package/button-toggle/_button-toggle-theme.scss +92 -0
- package/button-toggle/button-toggle.component.d.ts +6 -2
- package/button-toggle/button-toggle.module.d.ts +2 -1
- package/button-toggle/button-toggle.scss +110 -82
- package/card/_card-theme.nvl.scss +61 -0
- package/checkbox/_checkbox-theme.nvl.scss +120 -0
- package/checkbox/_checkbox-theme.scss +7 -7
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.scss +85 -52
- package/code-block/_code-block-theme.nvl.scss +326 -0
- package/core/common-behaviors/color.d.ts +13 -2
- package/core/common-behaviors/index.d.ts +1 -1
- package/core/forms/_forms-theme.nvl.scss +31 -0
- package/core/highlight/_highlight-theme.nvl.scss +8 -0
- package/core/highlight/_highlight-theme.scss +0 -2
- package/core/option/_optgroup-theme.nvl.scss +25 -0
- package/core/option/_option-action-theme.nvl.scss +41 -0
- package/core/option/_option-theme.nvl.scss +44 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.nvl.scss +48 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +2 -1
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +26 -6
- package/core/styles/_mosaic-theme.nvl.scss +153 -0
- package/core/styles/_mosaic-theme.scss +7 -2
- package/core/styles/_tokens.scss +4 -4
- package/core/styles/theming/_badges-theme.nvl.scss +118 -0
- package/core/styles/theming/_badges.nvl.scss +57 -0
- package/core/styles/theming/_components-theming.nvl.scss +1185 -0
- package/core/styles/theming/_components-theming.scss +92 -0
- package/core/styles/theming/_scrollbars-theme.nvl.scss +98 -0
- package/core/styles/theming/_scrollbars.nvl.scss +39 -0
- package/core/styles/theming/_theming.nvl.scss +137 -0
- package/core/styles/theming/prebuilt/dark-theme.nvl.scss +20 -0
- package/core/styles/theming/prebuilt/light-theme.nvl.scss +20 -0
- package/core/styles/typography/_typography.scss +5 -4
- package/core/utils/data-size/config.d.ts +20 -0
- package/core/utils/data-size/data-size.pipe.d.ts +13 -0
- package/core/utils/data-size/index.d.ts +3 -0
- package/core/utils/data-size/size.d.ts +16 -0
- package/core/utils/public-api.d.ts +1 -0
- package/datepicker/_datepicker-theme.nvl.scss +101 -0
- package/datepicker/datepicker-toggle.scss +2 -2
- package/divider/_divider-theme.nvl.scss +10 -0
- package/divider/_divider-theme.scss +1 -0
- package/divider/divider.component.d.ts +4 -1
- package/divider/divider.scss +24 -24
- package/dl/_dl-theme.nvl.scss +86 -0
- package/dl/_dl-theme.scss +0 -1
- package/dropdown/_dropdown-theme.nvl.scss +85 -0
- package/dropdown/dropdown.scss +3 -3
- package/ellipsis-center/ellipsis-center.directive.d.ts +27 -0
- package/ellipsis-center/index.d.ts +1 -0
- package/ellipsis-center/public-api.d.ts +1 -0
- package/esm2020/alert/alert.component.mjs +67 -0
- package/esm2020/alert/alert.module.mjs +44 -0
- package/esm2020/alert/index.mjs +2 -0
- package/esm2020/alert/ptsecurity-mosaic-alert.mjs +5 -0
- package/esm2020/alert/public-api.mjs +3 -0
- package/esm2020/autocomplete/autocomplete-origin.directive.mjs +3 -3
- package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +3 -3
- package/esm2020/autocomplete/autocomplete.component.mjs +5 -5
- package/esm2020/autocomplete/autocomplete.module.mjs +4 -4
- package/esm2020/button/button.component.mjs +37 -19
- package/esm2020/button/button.module.mjs +4 -4
- package/esm2020/button-toggle/button-toggle.component.mjs +33 -14
- package/esm2020/button-toggle/button-toggle.module.mjs +7 -6
- package/esm2020/card/card.component.mjs +3 -3
- package/esm2020/card/card.module.mjs +4 -4
- package/esm2020/checkbox/checkbox-module.mjs +4 -4
- package/esm2020/checkbox/checkbox-required-validator.mjs +3 -3
- package/esm2020/checkbox/checkbox.mjs +13 -9
- package/esm2020/code-block/actionbar.component.mjs +5 -5
- package/esm2020/code-block/code-block.component.mjs +4 -4
- package/esm2020/code-block/code-block.module.mjs +4 -4
- package/esm2020/core/common-behaviors/color.mjs +14 -2
- package/esm2020/core/common-behaviors/common-module.mjs +4 -4
- package/esm2020/core/common-behaviors/index.mjs +2 -2
- package/esm2020/core/error/error-options.mjs +6 -6
- package/esm2020/core/formatters/date/formatter.mjs +3 -3
- package/esm2020/core/formatters/date/formatter.pipe.mjs +39 -39
- package/esm2020/core/formatters/index.mjs +4 -4
- package/esm2020/core/formatters/number/formatter.mjs +4 -4
- package/esm2020/core/forms/forms-module.mjs +4 -4
- package/esm2020/core/forms/forms.directive.mjs +6 -6
- package/esm2020/core/highlight/highlight.pipe.mjs +3 -3
- package/esm2020/core/highlight/index.mjs +4 -4
- package/esm2020/core/line/line.mjs +7 -7
- package/esm2020/core/locales/locale-service.mjs +3 -3
- package/esm2020/core/locales/locale-service.module.mjs +4 -4
- package/esm2020/core/option/action.mjs +3 -3
- package/esm2020/core/option/optgroup.mjs +3 -3
- package/esm2020/core/option/option-module.mjs +4 -4
- package/esm2020/core/option/option.mjs +4 -4
- package/esm2020/core/pop-up/pop-up-trigger.mjs +3 -3
- package/esm2020/core/pop-up/pop-up.mjs +3 -3
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +12 -8
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +4 -4
- package/esm2020/core/services/measure-scrollbar.service.mjs +3 -3
- package/esm2020/core/utils/data-size/config.mjs +22 -0
- package/esm2020/core/utils/data-size/data-size.pipe.mjs +32 -0
- package/esm2020/core/utils/data-size/index.mjs +4 -0
- package/esm2020/core/utils/data-size/size.mjs +50 -0
- package/esm2020/core/utils/public-api.mjs +2 -1
- package/esm2020/core/version.mjs +2 -2
- package/esm2020/datepicker/calendar-body.component.mjs +3 -3
- package/esm2020/datepicker/calendar-header.component.mjs +3 -3
- package/esm2020/datepicker/calendar.component.mjs +3 -3
- package/esm2020/datepicker/datepicker-input.directive.mjs +3 -3
- package/esm2020/datepicker/datepicker-intl.mjs +3 -3
- package/esm2020/datepicker/datepicker-module.mjs +4 -4
- package/esm2020/datepicker/datepicker-toggle.component.mjs +7 -7
- package/esm2020/datepicker/datepicker.component.mjs +6 -6
- package/esm2020/datepicker/month-view.component.mjs +3 -3
- package/esm2020/divider/divider.component.mjs +16 -6
- package/esm2020/divider/divider.module.mjs +4 -4
- package/esm2020/dl/dl.component.mjs +9 -9
- package/esm2020/dl/dl.module.mjs +4 -4
- package/esm2020/dropdown/dropdown-content.directive.mjs +3 -3
- package/esm2020/dropdown/dropdown-item.component.mjs +5 -5
- package/esm2020/dropdown/dropdown-trigger.directive.mjs +3 -3
- package/esm2020/dropdown/dropdown.component.mjs +6 -6
- package/esm2020/dropdown/dropdown.module.mjs +4 -4
- package/esm2020/ellipsis-center/ellipsis-center.directive.mjs +106 -0
- package/esm2020/ellipsis-center/index.mjs +2 -0
- package/esm2020/ellipsis-center/ptsecurity-mosaic-ellipsis-center.mjs +5 -0
- package/esm2020/ellipsis-center/public-api.mjs +2 -0
- package/esm2020/file-upload/file-drop.mjs +43 -0
- package/esm2020/file-upload/file-upload.mjs +4 -0
- package/esm2020/file-upload/file-upload.module.mjs +66 -0
- package/esm2020/file-upload/index.mjs +2 -0
- package/esm2020/file-upload/multiple-file-upload.component.mjs +161 -0
- package/esm2020/file-upload/ptsecurity-mosaic-file-upload.mjs +5 -0
- package/esm2020/file-upload/public-api.mjs +6 -0
- package/esm2020/file-upload/single-file-upload.component.mjs +130 -0
- package/esm2020/form-field/cleaner.mjs +7 -7
- package/esm2020/form-field/form-field.mjs +10 -10
- package/esm2020/form-field/form-field.module.mjs +4 -4
- package/esm2020/form-field/hint.mjs +15 -15
- package/esm2020/form-field/password-hint.mjs +4 -4
- package/esm2020/form-field/prefix.mjs +3 -3
- package/esm2020/form-field/stepper.mjs +3 -3
- package/esm2020/form-field/suffix.mjs +3 -3
- package/esm2020/form-field/validate.directive.mjs +3 -3
- package/esm2020/icon/icon.component.mjs +78 -21
- package/esm2020/icon/icon.module.mjs +14 -10
- package/esm2020/input/input-number-validators.mjs +6 -6
- package/esm2020/input/input-number.mjs +3 -3
- package/esm2020/input/input-password.mjs +6 -6
- package/esm2020/input/input.mjs +6 -6
- package/esm2020/input/input.module.mjs +4 -4
- package/esm2020/link/link.component.mjs +14 -4
- package/esm2020/link/link.module.mjs +4 -4
- package/esm2020/list/list-selection.component.mjs +9 -9
- package/esm2020/list/list.component.mjs +7 -7
- package/esm2020/list/list.module.mjs +4 -4
- package/esm2020/loader-overlay/loader-overlay.component.mjs +12 -12
- package/esm2020/loader-overlay/loader-overlay.module.mjs +4 -4
- package/esm2020/markdown/markdown.component.mjs +5 -5
- package/esm2020/markdown/markdown.module.mjs +4 -4
- package/esm2020/markdown/markdown.service.mjs +3 -3
- package/esm2020/modal/css-unit.pipe.mjs +3 -3
- package/esm2020/modal/modal-control.service.mjs +3 -3
- package/esm2020/modal/modal.component.mjs +4 -4
- package/esm2020/modal/modal.directive.mjs +12 -12
- package/esm2020/modal/modal.module.mjs +4 -4
- package/esm2020/modal/modal.service.mjs +3 -3
- package/esm2020/navbar/navbar-item.component.mjs +31 -31
- package/esm2020/navbar/navbar.component.mjs +9 -9
- package/esm2020/navbar/navbar.module.mjs +4 -4
- package/esm2020/navbar/vertical-navbar.component.mjs +3 -3
- package/esm2020/popover/popover-confirm.component.mjs +8 -8
- package/esm2020/popover/popover.component.mjs +7 -7
- package/esm2020/popover/popover.module.mjs +4 -4
- package/esm2020/progress-bar/progress-bar.component.mjs +3 -3
- package/esm2020/progress-bar/progress-bar.module.mjs +4 -4
- package/esm2020/progress-spinner/progress-spinner.component.mjs +6 -6
- package/esm2020/progress-spinner/progress-spinner.module.mjs +4 -4
- package/esm2020/radio/radio.component.mjs +13 -9
- package/esm2020/radio/radio.module.mjs +4 -4
- package/esm2020/select/select-option.directive.mjs +3 -3
- package/esm2020/select/select.component.mjs +22 -22
- package/esm2020/select/select.module.mjs +4 -4
- package/esm2020/sidebar/sidebar.component.mjs +9 -9
- package/esm2020/sidebar/sidebar.module.mjs +4 -4
- package/esm2020/sidepanel/sidepanel-container.component.mjs +4 -4
- package/esm2020/sidepanel/sidepanel-directives.mjs +17 -17
- package/esm2020/sidepanel/sidepanel.module.mjs +4 -4
- package/esm2020/sidepanel/sidepanel.service.mjs +3 -3
- package/esm2020/splitter/splitter.component.mjs +12 -12
- package/esm2020/splitter/splitter.module.mjs +4 -4
- package/esm2020/table/table.component.mjs +3 -3
- package/esm2020/table/table.module.mjs +4 -4
- package/esm2020/tabs/paginated-tab-header.mjs +3 -3
- package/esm2020/tabs/tab-body.component.mjs +9 -8
- package/esm2020/tabs/tab-content.directive.mjs +3 -3
- package/esm2020/tabs/tab-group.component.mjs +18 -18
- package/esm2020/tabs/tab-header.component.mjs +4 -4
- package/esm2020/tabs/tab-label-wrapper.directive.mjs +3 -3
- package/esm2020/tabs/tab-label.directive.mjs +3 -3
- package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +7 -7
- package/esm2020/tabs/tab.component.mjs +3 -3
- package/esm2020/tabs/tabs.module.mjs +9 -5
- package/esm2020/tags/tag-input.mjs +3 -3
- package/esm2020/tags/tag-list.component.mjs +4 -4
- package/esm2020/tags/tag.component.mjs +16 -16
- package/esm2020/tags/tag.module.mjs +4 -4
- package/esm2020/textarea/textarea.component.mjs +3 -3
- package/esm2020/textarea/textarea.module.mjs +4 -4
- package/esm2020/timepicker/timepicker.directive.mjs +3 -3
- package/esm2020/timepicker/timepicker.module.mjs +4 -4
- package/esm2020/timezone/cities-by-filter.pipe.mjs +3 -3
- package/esm2020/timezone/timezone-option.component.mjs +3 -3
- package/esm2020/timezone/timezone-option.directive.mjs +3 -3
- package/esm2020/timezone/timezone-select.component.mjs +8 -8
- package/esm2020/timezone/timezone.module.mjs +4 -4
- package/esm2020/timezone/utc-offset.pipe.mjs +3 -3
- package/esm2020/title/title.directive.mjs +3 -3
- package/esm2020/title/title.module.mjs +4 -4
- package/esm2020/toast/toast-container.component.mjs +3 -3
- package/esm2020/toast/toast.component.mjs +5 -5
- package/esm2020/toast/toast.module.mjs +4 -4
- package/esm2020/toast/toast.service.mjs +3 -3
- package/esm2020/toggle/toggle.component.mjs +17 -13
- package/esm2020/toggle/toggle.module.mjs +4 -4
- package/esm2020/tooltip/tooltip.component.mjs +26 -17
- package/esm2020/tooltip/tooltip.module.mjs +4 -4
- package/esm2020/tree/node.mjs +3 -3
- package/esm2020/tree/outlet.mjs +3 -3
- package/esm2020/tree/padding.directive.mjs +3 -3
- package/esm2020/tree/toggle.mjs +9 -9
- package/esm2020/tree/tree-base.mjs +6 -6
- package/esm2020/tree/tree-option.component.mjs +4 -4
- package/esm2020/tree/tree-selection.component.mjs +3 -3
- package/esm2020/tree/tree.mjs +3 -3
- package/esm2020/tree/tree.module.mjs +4 -4
- package/esm2020/tree-select/tree-select.component.mjs +16 -13
- package/esm2020/tree-select/tree-select.module.mjs +4 -4
- package/fesm2015/ptsecurity-mosaic-alert.mjs +115 -0
- package/fesm2015/ptsecurity-mosaic-alert.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +15 -15
- package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +38 -18
- package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-button.mjs +41 -23
- package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-card.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-checkbox.mjs +19 -15
- package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-code-block.mjs +12 -12
- package/fesm2015/ptsecurity-mosaic-code-block.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-core.mjs +242 -127
- package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-datepicker.mjs +35 -35
- package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-divider.mjs +19 -9
- package/fesm2015/ptsecurity-mosaic-divider.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-dl.mjs +13 -13
- package/fesm2015/ptsecurity-mosaic-dropdown.mjs +20 -20
- package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-ellipsis-center.mjs +113 -0
- package/fesm2015/ptsecurity-mosaic-ellipsis-center.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-file-upload.mjs +392 -0
- package/fesm2015/ptsecurity-mosaic-file-upload.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-form-field.mjs +49 -49
- package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-icon.mjs +93 -29
- package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-input.mjs +25 -25
- package/fesm2015/ptsecurity-mosaic-link.mjs +17 -7
- package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-list.mjs +20 -20
- package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs +16 -16
- package/fesm2015/ptsecurity-mosaic-markdown.mjs +12 -12
- package/fesm2015/ptsecurity-mosaic-markdown.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-modal.mjs +29 -29
- package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-navbar.mjs +47 -47
- package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-popover.mjs +18 -18
- package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-progress-bar.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +9 -9
- package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-radio.mjs +16 -12
- package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-select.mjs +28 -28
- package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-sidebar.mjs +13 -13
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +27 -27
- package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-splitter.mjs +16 -16
- package/fesm2015/ptsecurity-mosaic-table.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-tabs.mjs +60 -56
- package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tags.mjs +26 -26
- package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-textarea.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-timepicker.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-timezone.mjs +24 -24
- package/fesm2015/ptsecurity-mosaic-timezone.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-title.mjs +7 -7
- package/fesm2015/ptsecurity-mosaic-toast.mjs +14 -14
- package/fesm2015/ptsecurity-mosaic-toast.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-toggle.mjs +21 -17
- package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs +29 -20
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs +19 -16
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree.mjs +38 -38
- package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-alert.mjs +115 -0
- package/fesm2020/ptsecurity-mosaic-alert.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-autocomplete.mjs +15 -15
- package/fesm2020/ptsecurity-mosaic-button-toggle.mjs +38 -18
- package/fesm2020/ptsecurity-mosaic-button-toggle.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-button.mjs +41 -23
- package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-card.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-checkbox.mjs +19 -15
- package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-code-block.mjs +12 -12
- package/fesm2020/ptsecurity-mosaic-code-block.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-core.mjs +242 -127
- package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-datepicker.mjs +36 -35
- package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-divider.mjs +19 -9
- package/fesm2020/ptsecurity-mosaic-divider.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-dl.mjs +13 -13
- package/fesm2020/ptsecurity-mosaic-dropdown.mjs +20 -20
- package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-ellipsis-center.mjs +111 -0
- package/fesm2020/ptsecurity-mosaic-ellipsis-center.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-file-upload.mjs +388 -0
- package/fesm2020/ptsecurity-mosaic-file-upload.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-form-field.mjs +49 -49
- package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-icon.mjs +89 -29
- package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-input.mjs +25 -25
- package/fesm2020/ptsecurity-mosaic-link.mjs +17 -7
- package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-list.mjs +20 -20
- package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs +16 -16
- package/fesm2020/ptsecurity-mosaic-markdown.mjs +12 -12
- package/fesm2020/ptsecurity-mosaic-markdown.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-modal.mjs +29 -29
- package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-navbar.mjs +47 -47
- package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-popover.mjs +18 -18
- package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +9 -9
- package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-radio.mjs +16 -12
- package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-select.mjs +28 -28
- package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-sidebar.mjs +13 -13
- package/fesm2020/ptsecurity-mosaic-sidepanel.mjs +27 -27
- package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-splitter.mjs +16 -16
- package/fesm2020/ptsecurity-mosaic-table.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-tabs.mjs +60 -56
- package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tags.mjs +26 -26
- package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-textarea.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-timepicker.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-timezone.mjs +24 -24
- package/fesm2020/ptsecurity-mosaic-timezone.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-title.mjs +7 -7
- package/fesm2020/ptsecurity-mosaic-toast.mjs +14 -14
- package/fesm2020/ptsecurity-mosaic-toast.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-toggle.mjs +21 -17
- package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs +29 -20
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs +19 -16
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tree.mjs +38 -38
- package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
- package/file-upload/README.md +0 -0
- package/file-upload/_file-upload-theme.scss +174 -0
- package/file-upload/file-drop.d.ts +11 -0
- package/file-upload/file-upload.d.ts +22 -0
- package/file-upload/file-upload.module.d.ts +18 -0
- package/file-upload/file-upload.scss +46 -0
- package/file-upload/index.d.ts +1 -0
- package/file-upload/multiple-file-upload.component.d.ts +51 -0
- package/file-upload/multiple-file-upload.component.scss +148 -0
- package/file-upload/public-api.d.ts +5 -0
- package/file-upload/single-file-upload.component.d.ts +34 -0
- package/file-upload/single-file-upload.component.scss +60 -0
- package/form-field/_form-field-theme.nvl.scss +111 -0
- package/form-field/_hint-theme.nvl.scss +67 -0
- package/form-field/cleaner.d.ts +2 -2
- package/form-field/hint.d.ts +2 -1
- package/form-field/hint.scss +15 -0
- package/icon/_icon-theme.nvl.scss +267 -0
- package/icon/icon.component.d.ts +22 -6
- package/icon/icon.module.d.ts +1 -1
- package/icon/icon.scss +39 -0
- package/input/_input-theme.nvl.scss +56 -0
- package/input/input.scss +5 -0
- package/link/_link-theme.nvl.scss +178 -0
- package/link/_link-theme.scss +2 -3
- package/link/link.component.d.ts +4 -1
- package/list/_list-theme.nvl.scss +47 -0
- package/loader-overlay/_loader-overlay-theme.nvl.scss +34 -0
- package/loader-overlay/_loader-overlay-theme.scss +0 -1
- package/markdown/_markdown-theme.nvl.scss +142 -0
- package/markdown/markdown.scss +13 -7
- package/modal/_modal-theme.nvl.scss +90 -0
- package/navbar/_navbar-theme.nvl.scss +123 -0
- package/package.json +26 -2
- package/popover/_popover-theme.nvl.scss +111 -0
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/dark-theme.nvl.css +1 -0
- package/prebuilt-themes/default-theme.css +1 -1
- package/prebuilt-themes/light-theme.nvl.css +1 -0
- package/progress-bar/_progress-bar-theme.nvl.scss +28 -0
- package/progress-spinner/_progress-spinner-theme.nvl.scss +24 -0
- package/radio/_radio-theme.nvl.scss +95 -0
- package/radio/_radio-theme.scss +1 -1
- package/radio/radio.component.d.ts +2 -1
- package/radio/radio.scss +60 -27
- package/select/_select-theme.nvl.scss +55 -0
- package/select/_select-theme.scss +6 -0
- package/select/select.component.d.ts +1 -1
- package/select/select.scss +51 -27
- package/sidepanel/_sidepanel-theme.nvl.scss +67 -0
- package/splitter/_splitter-theme.nvl.scss +31 -0
- package/table/_table-theme.nvl.scss +65 -0
- package/table/_table-theme.scss +0 -1
- package/tabs/_tabs-theme.nvl.scss +240 -0
- package/tabs/tabs.module.d.ts +5 -4
- package/tags/_tag-theme.nvl.scss +100 -0
- package/tags/_tag-theme.scss +0 -1
- package/tags/tag-list.scss +23 -7
- package/tags/tag.scss +21 -69
- package/textarea/_textarea-theme.nvl.scss +37 -0
- package/timezone/_timezone-option-theme.nvl.scss +34 -0
- package/toast/_toast-theme.nvl.scss +61 -0
- package/toggle/_toggle-theme.nvl.scss +98 -0
- package/toggle/_toggle-theme.scss +0 -3
- package/toggle/toggle.component.d.ts +2 -1
- package/toggle/toggle.scss +51 -76
- package/tooltip/_tooltip-theme.nvl.scss +49 -0
- package/tooltip/tooltip.component.d.ts +5 -2
- package/tooltip/tooltip.scss +10 -39
- package/tree/_tree-theme.nvl.scss +69 -0
- package/tree-select/_tree-select-theme.nvl.scss +41 -0
- package/tree-select/_tree-select-theme.scss +6 -0
- package/tree-select/tree-select.component.d.ts +2 -2
- package/tree-select/tree-select.scss +13 -0
- package/core/styles/theming/_alerts.scss +0 -166
@@ -0,0 +1,388 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { InjectionToken, EventEmitter, Directive, Output, TemplateRef, Component, ChangeDetectionStrategy, Optional, Inject, Input, ContentChild, ViewChild, NgModule } from '@angular/core';
|
3
|
+
import * as i2 from '@angular/common';
|
4
|
+
import { CommonModule } from '@angular/common';
|
5
|
+
import * as i5$1 from '@ptsecurity/mosaic/button';
|
6
|
+
import { McButtonModule } from '@ptsecurity/mosaic/button';
|
7
|
+
import * as i9 from '@ptsecurity/mosaic/core';
|
8
|
+
import { McDataSizeModule } from '@ptsecurity/mosaic/core';
|
9
|
+
import * as i7 from '@ptsecurity/mosaic/ellipsis-center';
|
10
|
+
import { McEllipsisCenterModule } from '@ptsecurity/mosaic/ellipsis-center';
|
11
|
+
import * as i6 from '@ptsecurity/mosaic/form-field';
|
12
|
+
import { McFormFieldModule } from '@ptsecurity/mosaic/form-field';
|
13
|
+
import * as i4 from '@ptsecurity/mosaic/icon';
|
14
|
+
import { McIconModule } from '@ptsecurity/mosaic/icon';
|
15
|
+
import * as i5 from '@ptsecurity/mosaic/list';
|
16
|
+
import { McListModule } from '@ptsecurity/mosaic/list';
|
17
|
+
import * as i3 from '@ptsecurity/mosaic/progress-spinner';
|
18
|
+
import { McProgressSpinnerModule } from '@ptsecurity/mosaic/progress-spinner';
|
19
|
+
import { McToolTipModule } from '@ptsecurity/mosaic/tooltip';
|
20
|
+
import * as i1 from '@angular/cdk/a11y';
|
21
|
+
import { Subscription, BehaviorSubject } from 'rxjs';
|
22
|
+
|
23
|
+
/* Object for labels customization inside file upload component */
|
24
|
+
const MC_FILE_UPLOAD_CONFIGURATION = new InjectionToken('McFileUploadConfiguration');
|
25
|
+
|
26
|
+
class McFileDropDirective {
|
27
|
+
constructor() {
|
28
|
+
this.filesDropped = new EventEmitter();
|
29
|
+
}
|
30
|
+
onDragOver(event) {
|
31
|
+
event.preventDefault();
|
32
|
+
event.stopPropagation();
|
33
|
+
this.dragover = true;
|
34
|
+
}
|
35
|
+
onDragLeave(event) {
|
36
|
+
event.preventDefault();
|
37
|
+
event.stopPropagation();
|
38
|
+
this.dragover = false;
|
39
|
+
}
|
40
|
+
onDrop(event) {
|
41
|
+
event.preventDefault();
|
42
|
+
event.stopPropagation();
|
43
|
+
this.dragover = false;
|
44
|
+
if (event.dataTransfer && event.dataTransfer.files.length > 0) {
|
45
|
+
this.filesDropped.emit(event.dataTransfer.files);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
/** @nocollapse */ McFileDropDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McFileDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
50
|
+
/** @nocollapse */ McFileDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: McFileDropDirective, selector: "[mcFileDrop]", outputs: { filesDropped: "filesDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" }, properties: { "class.dragover": "dragover" } }, exportAs: ["mcFileDrop"], ngImport: i0 });
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McFileDropDirective, decorators: [{
|
52
|
+
type: Directive,
|
53
|
+
args: [{
|
54
|
+
selector: '[mcFileDrop]',
|
55
|
+
exportAs: 'mcFileDrop',
|
56
|
+
host: {
|
57
|
+
'[class.dragover]': 'dragover',
|
58
|
+
'(dragover)': 'onDragOver($event)',
|
59
|
+
'(dragleave)': 'onDragLeave($event)',
|
60
|
+
'(drop)': 'onDrop($event)'
|
61
|
+
}
|
62
|
+
}]
|
63
|
+
}], propDecorators: { filesDropped: [{
|
64
|
+
type: Output
|
65
|
+
}] } });
|
66
|
+
|
67
|
+
let nextMultipleFileUploadUniqueId = 0;
|
68
|
+
const MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION = {
|
69
|
+
captionText: 'Перетащите сюда или',
|
70
|
+
captionTextWhenSelected: 'Перетащите еще или',
|
71
|
+
captionTextForCompactSize: 'Перетащите файлы или',
|
72
|
+
browseLink: 'выберите',
|
73
|
+
title: 'Загрузите файлы',
|
74
|
+
gridHeaders: {
|
75
|
+
file: 'Файл',
|
76
|
+
size: 'Размер'
|
77
|
+
}
|
78
|
+
};
|
79
|
+
class McMultipleFileUploadComponent {
|
80
|
+
constructor(focusMonitor, cdr, config) {
|
81
|
+
this.focusMonitor = focusMonitor;
|
82
|
+
this.cdr = cdr;
|
83
|
+
this.config = config;
|
84
|
+
this.errors = [];
|
85
|
+
this.files = [];
|
86
|
+
this.size = 'default';
|
87
|
+
this.inputId = `mc-multiple-file-upload-${nextMultipleFileUploadUniqueId++}`;
|
88
|
+
this.fileQueueChanged = new EventEmitter();
|
89
|
+
this.hasFocus = false;
|
90
|
+
this.focusMonitorSubscription = Subscription.EMPTY;
|
91
|
+
this.config = config || MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;
|
92
|
+
this.columnDefs = [
|
93
|
+
{ header: this.config.gridHeaders.file, cssClass: 'file' },
|
94
|
+
{ header: this.config.gridHeaders.size, cssClass: 'size' },
|
95
|
+
{ header: '', cssClass: 'action' }
|
96
|
+
];
|
97
|
+
}
|
98
|
+
get acceptedFiles() {
|
99
|
+
return this.accept && this.accept.length > 0 ? this.accept.map((ext) => `.${ext}`).join(',') : '*/*';
|
100
|
+
}
|
101
|
+
get hasErrors() {
|
102
|
+
return this.errors && !!this.errors.length;
|
103
|
+
}
|
104
|
+
ngAfterViewInit() {
|
105
|
+
this.focusMonitorSubscription = this.focusMonitor.monitor(this.input)
|
106
|
+
.subscribe((origin) => this.onFocus(origin === 'keyboard'));
|
107
|
+
}
|
108
|
+
ngOnDestroy() {
|
109
|
+
this.focusMonitorSubscription.unsubscribe();
|
110
|
+
}
|
111
|
+
onFileSelectedViaClick({ target }) {
|
112
|
+
if (this.disabled) {
|
113
|
+
return;
|
114
|
+
}
|
115
|
+
this.files = [
|
116
|
+
...this.files,
|
117
|
+
...this.mapToFileItem(target.files)
|
118
|
+
];
|
119
|
+
this.onFileListChange();
|
120
|
+
}
|
121
|
+
onFileDropped(files) {
|
122
|
+
if (this.disabled) {
|
123
|
+
return;
|
124
|
+
}
|
125
|
+
this.files = [...this.files, ...this.mapToFileItem(files)];
|
126
|
+
this.onFileListChange();
|
127
|
+
}
|
128
|
+
deleteFile(index, event) {
|
129
|
+
if (this.disabled) {
|
130
|
+
return;
|
131
|
+
}
|
132
|
+
event?.stopPropagation();
|
133
|
+
this.files.splice(index, 1);
|
134
|
+
this.files = [...this.files];
|
135
|
+
this.onFileListChange();
|
136
|
+
}
|
137
|
+
onFileListChange() {
|
138
|
+
this.fileQueueChanged.emit(this.files);
|
139
|
+
}
|
140
|
+
onFocus(focusState) {
|
141
|
+
if (this.disabled) {
|
142
|
+
return;
|
143
|
+
}
|
144
|
+
this.hasFocus = focusState;
|
145
|
+
this.cdr.markForCheck();
|
146
|
+
}
|
147
|
+
mapToFileItem(files) {
|
148
|
+
if (!files) {
|
149
|
+
return [];
|
150
|
+
}
|
151
|
+
return Array.from(files)
|
152
|
+
.filter((file) => this.isCorrectExtension(file))
|
153
|
+
.map((file) => ({
|
154
|
+
file,
|
155
|
+
hasError: this.validateFile(file),
|
156
|
+
loading: new BehaviorSubject(false),
|
157
|
+
progress: new BehaviorSubject(0)
|
158
|
+
}));
|
159
|
+
}
|
160
|
+
validateFile(file) {
|
161
|
+
if (this.customValidation && this.customValidation.length) {
|
162
|
+
const errorsPerFile = this.customValidation.reduce((errors, validatorFn) => {
|
163
|
+
errors.push(validatorFn(file));
|
164
|
+
return errors;
|
165
|
+
}, []).filter(Boolean);
|
166
|
+
this.errors = [
|
167
|
+
...this.errors,
|
168
|
+
...errorsPerFile
|
169
|
+
];
|
170
|
+
return !!errorsPerFile.length;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
isCorrectExtension(file) {
|
174
|
+
const fileExt = file.name.split('.').pop() || '';
|
175
|
+
return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;
|
176
|
+
}
|
177
|
+
}
|
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 });
|
179
|
+
/** @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, 2px))}.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, 8px)}.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, 8px)}.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, 2px))}.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, 2px))}.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, 8px)}.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, 8px)}.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, 2px))}.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, 8px);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", "small"] }, { 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: "component", type: i6.McHint, selector: "mc-hint", inputs: ["color", "id", "fillTextOff"], exportAs: ["mcHint"] }, { 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
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McMultipleFileUploadComponent, decorators: [{
|
181
|
+
type: Component,
|
182
|
+
args: [{ selector: 'mc-multiple-file-upload', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
183
|
+
class: 'mc-multiple-file-upload'
|
184
|
+
}, 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, 2px))}.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, 8px)}.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, 8px)}.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, 2px))}.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, 2px))}.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, 8px)}.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, 8px)}.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, 2px))}.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, 8px);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
|
+
}], ctorParameters: function () { return [{ type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
186
|
+
type: Optional
|
187
|
+
}, {
|
188
|
+
type: Inject,
|
189
|
+
args: [MC_FILE_UPLOAD_CONFIGURATION]
|
190
|
+
}] }]; }, propDecorators: { accept: [{
|
191
|
+
type: Input
|
192
|
+
}], disabled: [{
|
193
|
+
type: Input
|
194
|
+
}], errors: [{
|
195
|
+
type: Input
|
196
|
+
}], files: [{
|
197
|
+
type: Input
|
198
|
+
}], size: [{
|
199
|
+
type: Input
|
200
|
+
}], inputId: [{
|
201
|
+
type: Input
|
202
|
+
}], customValidation: [{
|
203
|
+
type: Input
|
204
|
+
}], fileQueueChanged: [{
|
205
|
+
type: Output
|
206
|
+
}], customFileIcon: [{
|
207
|
+
type: ContentChild,
|
208
|
+
args: ['mcFileIcon', { static: false, read: TemplateRef }]
|
209
|
+
}], input: [{
|
210
|
+
type: ViewChild,
|
211
|
+
args: ['input']
|
212
|
+
}] } });
|
213
|
+
|
214
|
+
let nextSingleFileUploadUniqueId = 0;
|
215
|
+
const MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION = {
|
216
|
+
captionText: 'Перетащите файл или',
|
217
|
+
browseLink: 'выберите'
|
218
|
+
};
|
219
|
+
class McSingleFileUploadComponent {
|
220
|
+
constructor(focusMonitor, cdr, config) {
|
221
|
+
this.focusMonitor = focusMonitor;
|
222
|
+
this.cdr = cdr;
|
223
|
+
this.config = config;
|
224
|
+
this.disabled = false;
|
225
|
+
this.errors = [];
|
226
|
+
this.files = [];
|
227
|
+
this.inputId = `mc-single-file-upload-${nextSingleFileUploadUniqueId++}`;
|
228
|
+
this.fileQueueChanged = new EventEmitter();
|
229
|
+
this.hasFocus = false;
|
230
|
+
this.focusMonitorSubscription = Subscription.EMPTY;
|
231
|
+
this.config = config || MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;
|
232
|
+
}
|
233
|
+
get acceptedFiles() {
|
234
|
+
return this.accept && this.accept.length > 0 ? this.accept.map((ext) => `.${ext}`).join(',') : '*/*';
|
235
|
+
}
|
236
|
+
ngAfterViewInit() {
|
237
|
+
this.focusMonitorSubscription = this.focusMonitor.monitor(this.input)
|
238
|
+
.subscribe((origin) => this.onFocus(origin === 'keyboard'));
|
239
|
+
}
|
240
|
+
ngOnDestroy() {
|
241
|
+
this.focusMonitorSubscription.unsubscribe();
|
242
|
+
}
|
243
|
+
onFileSelectedViaClick({ target }) {
|
244
|
+
if (this.disabled) {
|
245
|
+
return;
|
246
|
+
}
|
247
|
+
const files = target.files;
|
248
|
+
if (files) {
|
249
|
+
this.files = [this.mapToFileItem(files[0])];
|
250
|
+
this.fileQueueChanged.emit(this.files[0]);
|
251
|
+
}
|
252
|
+
}
|
253
|
+
deleteItem(event) {
|
254
|
+
if (this.disabled) {
|
255
|
+
return;
|
256
|
+
}
|
257
|
+
event?.stopPropagation();
|
258
|
+
this.files = [];
|
259
|
+
this.errors = [];
|
260
|
+
this.fileQueueChanged.emit(null);
|
261
|
+
}
|
262
|
+
onFileDropped(files) {
|
263
|
+
if (this.disabled) {
|
264
|
+
return;
|
265
|
+
}
|
266
|
+
if (this.isCorrectExtension(files[0])) {
|
267
|
+
this.files = Array.from(files)
|
268
|
+
.map((file) => this.mapToFileItem(file));
|
269
|
+
this.fileQueueChanged.emit(this.files[0]);
|
270
|
+
}
|
271
|
+
}
|
272
|
+
onFocus(focusState) {
|
273
|
+
if (this.disabled) {
|
274
|
+
return;
|
275
|
+
}
|
276
|
+
this.hasFocus = focusState;
|
277
|
+
this.cdr.markForCheck();
|
278
|
+
}
|
279
|
+
mapToFileItem(file) {
|
280
|
+
this.validateFile(file);
|
281
|
+
return {
|
282
|
+
file,
|
283
|
+
progress: new BehaviorSubject(0),
|
284
|
+
loading: new BehaviorSubject(false)
|
285
|
+
};
|
286
|
+
}
|
287
|
+
validateFile(file) {
|
288
|
+
if (this.customValidation && this.customValidation.length) {
|
289
|
+
this.errors = this.customValidation.reduce((errors, validatorFn) => {
|
290
|
+
errors.push(validatorFn(file));
|
291
|
+
return errors;
|
292
|
+
}, []).filter(Boolean);
|
293
|
+
}
|
294
|
+
}
|
295
|
+
isCorrectExtension(file) {
|
296
|
+
const fileExt = file.name.split('.').pop() || '';
|
297
|
+
return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;
|
298
|
+
}
|
299
|
+
}
|
300
|
+
/** @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 });
|
301
|
+
/** @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, 2px))}.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, 8px)}.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, 8px)}.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, 2px))}.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, 2px))}.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, 8px)}.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, 8px)}.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, 2px))}.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, 8px);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", "small"] }, { kind: "component", type: i5$1.McButton, selector: "[mc-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i5$1.McButtonCssStyler, selector: "[mc-button]" }, { kind: "component", type: i6.McHint, selector: "mc-hint", inputs: ["color", "id", "fillTextOff"], exportAs: ["mcHint"] }, { 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 });
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McSingleFileUploadComponent, decorators: [{
|
303
|
+
type: Component,
|
304
|
+
args: [{ selector: 'mc-single-file-upload', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
305
|
+
class: 'mc-single-file-upload'
|
306
|
+
}, 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, 2px))}.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, 8px)}.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, 8px)}.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, 2px))}.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, 2px))}.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, 8px)}.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, 8px)}.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, 2px))}.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, 8px);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"] }]
|
307
|
+
}], ctorParameters: function () { return [{ type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
308
|
+
type: Optional
|
309
|
+
}, {
|
310
|
+
type: Inject,
|
311
|
+
args: [MC_FILE_UPLOAD_CONFIGURATION]
|
312
|
+
}] }]; }, propDecorators: { accept: [{
|
313
|
+
type: Input
|
314
|
+
}], disabled: [{
|
315
|
+
type: Input
|
316
|
+
}], errors: [{
|
317
|
+
type: Input
|
318
|
+
}], files: [{
|
319
|
+
type: Input
|
320
|
+
}], inputId: [{
|
321
|
+
type: Input
|
322
|
+
}], customValidation: [{
|
323
|
+
type: Input
|
324
|
+
}], fileQueueChanged: [{
|
325
|
+
type: Output
|
326
|
+
}], input: [{
|
327
|
+
type: ViewChild,
|
328
|
+
args: ['input']
|
329
|
+
}] } });
|
330
|
+
|
331
|
+
class McFileUploadModule {
|
332
|
+
}
|
333
|
+
/** @nocollapse */ McFileUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McFileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
334
|
+
/** @nocollapse */ McFileUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: McFileUploadModule, declarations: [McFileDropDirective,
|
335
|
+
McSingleFileUploadComponent,
|
336
|
+
McMultipleFileUploadComponent], imports: [CommonModule,
|
337
|
+
McToolTipModule,
|
338
|
+
McProgressSpinnerModule,
|
339
|
+
McIconModule,
|
340
|
+
McButtonModule,
|
341
|
+
McListModule,
|
342
|
+
McFormFieldModule,
|
343
|
+
McEllipsisCenterModule,
|
344
|
+
McDataSizeModule], exports: [McSingleFileUploadComponent,
|
345
|
+
McMultipleFileUploadComponent,
|
346
|
+
McFileDropDirective] });
|
347
|
+
/** @nocollapse */ McFileUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McFileUploadModule, imports: [CommonModule,
|
348
|
+
McToolTipModule,
|
349
|
+
McProgressSpinnerModule,
|
350
|
+
McIconModule,
|
351
|
+
McButtonModule,
|
352
|
+
McListModule,
|
353
|
+
McFormFieldModule,
|
354
|
+
McEllipsisCenterModule,
|
355
|
+
McDataSizeModule] });
|
356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: McFileUploadModule, decorators: [{
|
357
|
+
type: NgModule,
|
358
|
+
args: [{
|
359
|
+
imports: [
|
360
|
+
CommonModule,
|
361
|
+
McToolTipModule,
|
362
|
+
McProgressSpinnerModule,
|
363
|
+
McIconModule,
|
364
|
+
McButtonModule,
|
365
|
+
McListModule,
|
366
|
+
McFormFieldModule,
|
367
|
+
McEllipsisCenterModule,
|
368
|
+
McDataSizeModule
|
369
|
+
],
|
370
|
+
declarations: [
|
371
|
+
McFileDropDirective,
|
372
|
+
McSingleFileUploadComponent,
|
373
|
+
McMultipleFileUploadComponent
|
374
|
+
],
|
375
|
+
exports: [
|
376
|
+
McSingleFileUploadComponent,
|
377
|
+
McMultipleFileUploadComponent,
|
378
|
+
McFileDropDirective
|
379
|
+
]
|
380
|
+
}]
|
381
|
+
}] });
|
382
|
+
|
383
|
+
/**
|
384
|
+
* Generated bundle index. Do not edit.
|
385
|
+
*/
|
386
|
+
|
387
|
+
export { MC_FILE_UPLOAD_CONFIGURATION, MC_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION, MC_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION, McFileDropDirective, McFileUploadModule, McMultipleFileUploadComponent, McSingleFileUploadComponent };
|
388
|
+
//# sourceMappingURL=ptsecurity-mosaic-file-upload.mjs.map
|
@@ -0,0 +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;AAuBjF,KAAA;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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