@aeris-ui/core 22.0.0-alpha.1 → 22.0.0-alpha.10
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/README.md +200 -191
- package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +1228 -446
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +562 -115
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +209 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +581 -189
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +741 -139
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +371 -101
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +773 -369
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +1171 -521
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +455 -258
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +440 -140
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +430 -117
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-code-block.mjs +637 -0
- package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-color-picker.mjs +1340 -700
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +823 -318
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1404 -555
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1471 -740
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +918 -443
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +1942 -1123
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1079 -346
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +204 -43
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +1015 -322
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +410 -254
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +967 -587
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1379 -522
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +688 -0
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-galleria.mjs +2446 -1117
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +110 -33
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +426 -98
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -107
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +658 -255
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +926 -291
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +678 -264
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +625 -158
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-mega-menu.mjs +613 -382
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1062 -472
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +994 -393
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +477 -145
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +623 -230
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1598 -561
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +592 -220
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +485 -199
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +428 -123
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +596 -196
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +925 -249
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +912 -375
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +549 -176
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +394 -124
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +506 -231
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +226 -63
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select.mjs +1845 -648
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +884 -430
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +861 -337
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +955 -266
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +2034 -869
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +789 -279
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +856 -219
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1284 -1399
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -144
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +909 -441
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +1076 -384
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +398 -132
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +625 -330
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1453 -621
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2019 -940
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1107 -658
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +985 -316
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +20 -8
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/runtime/schematics/ng-add/options.js +4 -4
- package/schematics/runtime/schematics/ng-add/options.js.map +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-contrast.js +6 -17
- package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-foundation.js +10 -4
- package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js +28 -5
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-generator.js +2 -2
- package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js +22 -8
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js +12 -4
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js +7 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +49 -33
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_fallback-colors.scss +10 -0
- package/styles/_mobile.scss +16 -0
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +412 -125
- package/styles/controls.css +61 -29
- package/tools/aeris-theme.mjs +2 -2
- package/tools/aeris-theme.schema.json +5 -2
- package/types/aeris-ui-core-accordion.d.ts +167 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +72 -31
- package/types/aeris-ui-core-auto-complete.d.ts +327 -140
- package/types/aeris-ui-core-auto-focus.d.ts +24 -16
- package/types/aeris-ui-core-avatar.d.ts +112 -42
- package/types/aeris-ui-core-badge.d.ts +160 -46
- package/types/aeris-ui-core-block-ui.d.ts +47 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +163 -92
- package/types/aeris-ui-core-button-group.d.ts +37 -16
- package/types/aeris-ui-core-button.d.ts +226 -67
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +201 -117
- package/types/aeris-ui-core-cascade-select.d.ts +257 -123
- package/types/aeris-ui-core-chart.d.ts +134 -84
- package/types/aeris-ui-core-checkbox.d.ts +139 -54
- package/types/aeris-ui-core-chip.d.ts +116 -51
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-code-block.d.ts +188 -0
- package/types/aeris-ui-core-color-picker.d.ts +348 -143
- package/types/aeris-ui-core-compare.d.ts +224 -102
- package/types/aeris-ui-core-confirm-dialog.d.ts +442 -245
- package/types/aeris-ui-core-confirm-popup.d.ts +442 -263
- package/types/aeris-ui-core-context-menu.d.ts +264 -146
- package/types/aeris-ui-core-date-picker.d.ts +489 -217
- package/types/aeris-ui-core-dialog.d.ts +288 -117
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +273 -112
- package/types/aeris-ui-core-dynamic-dialog.d.ts +158 -137
- package/types/aeris-ui-core-editor.d.ts +250 -123
- package/types/aeris-ui-core-file-upload.d.ts +367 -197
- package/types/aeris-ui-core-filter-service.d.ts +48 -52
- package/types/aeris-ui-core-fluid.d.ts +12 -9
- package/types/aeris-ui-core-focus-trap.d.ts +39 -31
- package/types/aeris-ui-core-form-field.d.ts +163 -0
- package/types/aeris-ui-core-galleria.d.ts +588 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -32
- package/types/aeris-ui-core-inplace.d.ts +123 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -33
- package/types/aeris-ui-core-input-mask.d.ts +194 -69
- package/types/aeris-ui-core-input-number.d.ts +272 -87
- package/types/aeris-ui-core-input-otp.d.ts +191 -81
- package/types/aeris-ui-core-input-text.d.ts +185 -60
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-mega-menu.d.ts +175 -121
- package/types/aeris-ui-core-menu.d.ts +277 -168
- package/types/aeris-ui-core-menubar.d.ts +273 -135
- package/types/aeris-ui-core-message.d.ts +132 -60
- package/types/aeris-ui-core-meter-group.d.ts +163 -90
- package/types/aeris-ui-core-multi-select.d.ts +439 -180
- package/types/aeris-ui-core-order-list.d.ts +144 -66
- package/types/aeris-ui-core-organization-chart.d.ts +133 -77
- package/types/aeris-ui-core-paginator.d.ts +93 -38
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +258 -102
- package/types/aeris-ui-core-pick-list.d.ts +374 -179
- package/types/aeris-ui-core-popover.d.ts +219 -105
- package/types/aeris-ui-core-progress-bar.d.ts +157 -73
- package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
- package/types/aeris-ui-core-radio-button.d.ts +124 -50
- package/types/aeris-ui-core-rating.d.ts +149 -76
- package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
- package/types/aeris-ui-core-scroll-top.d.ts +66 -29
- package/types/aeris-ui-core-select.d.ts +475 -217
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -115
- package/types/aeris-ui-core-speed-dial.d.ts +241 -111
- package/types/aeris-ui-core-split-button.d.ts +267 -113
- package/types/aeris-ui-core-splitter.d.ts +225 -106
- package/types/aeris-ui-core-stepper.d.ts +184 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +596 -304
- package/types/aeris-ui-core-tabs.d.ts +181 -76
- package/types/aeris-ui-core-textarea.d.ts +261 -78
- package/types/aeris-ui-core-theme-builder.d.ts +472 -450
- package/types/aeris-ui-core-theming.d.ts +42 -45
- package/types/aeris-ui-core-tiered-menu.d.ts +251 -142
- package/types/aeris-ui-core-timeline.d.ts +109 -71
- package/types/aeris-ui-core-toast.d.ts +225 -115
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -51
- package/types/aeris-ui-core-toolbar.d.ts +98 -41
- package/types/aeris-ui-core-tooltip.d.ts +157 -88
- package/types/aeris-ui-core-tree-select.d.ts +364 -171
- package/types/aeris-ui-core-tree-table.d.ts +566 -286
- package/types/aeris-ui-core-tree.d.ts +270 -165
- package/types/aeris-ui-core.d.ts +197 -72
|
@@ -1,489 +1,932 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
class AerisFileUploadToolbarTemplate {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Component, DestroyRef, Directive, TemplateRef, booleanAttribute, computed, contentChild, effect, inject, input, model, numberAttribute, output, signal, viewChild } from "@angular/core";
|
|
4
|
+
import { AerisButtonDirective } from "@aeris-ui/core/button";
|
|
5
|
+
var AerisFileUploadToolbarTemplate = class AerisFileUploadToolbarTemplate {
|
|
6
|
+
template = inject(TemplateRef);
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
8
|
+
minVersion: "12.0.0",
|
|
9
|
+
version: "22.2.2",
|
|
10
|
+
ngImport: i0,
|
|
11
|
+
type: AerisFileUploadToolbarTemplate,
|
|
12
|
+
deps: [],
|
|
13
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
14
|
+
});
|
|
15
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
16
|
+
minVersion: "14.0.0",
|
|
17
|
+
version: "22.2.2",
|
|
18
|
+
type: AerisFileUploadToolbarTemplate,
|
|
19
|
+
isStandalone: true,
|
|
20
|
+
selector: "ng-template[aerisFileUploadToolbar]",
|
|
21
|
+
ngImport: i0
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
25
|
+
minVersion: "12.0.0",
|
|
26
|
+
version: "22.2.2",
|
|
27
|
+
ngImport: i0,
|
|
28
|
+
type: AerisFileUploadToolbarTemplate,
|
|
29
|
+
decorators: [{
|
|
30
|
+
type: Directive,
|
|
31
|
+
args: [{ selector: "ng-template[aerisFileUploadToolbar]" }]
|
|
32
|
+
}]
|
|
33
|
+
});
|
|
34
|
+
var AerisFileUploadContentTemplate = class AerisFileUploadContentTemplate {
|
|
35
|
+
template = inject(TemplateRef);
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
37
|
+
minVersion: "12.0.0",
|
|
38
|
+
version: "22.2.2",
|
|
39
|
+
ngImport: i0,
|
|
40
|
+
type: AerisFileUploadContentTemplate,
|
|
41
|
+
deps: [],
|
|
42
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
43
|
+
});
|
|
44
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
45
|
+
minVersion: "14.0.0",
|
|
46
|
+
version: "22.2.2",
|
|
47
|
+
type: AerisFileUploadContentTemplate,
|
|
48
|
+
isStandalone: true,
|
|
49
|
+
selector: "ng-template[aerisFileUploadContent]",
|
|
50
|
+
ngImport: i0
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
54
|
+
minVersion: "12.0.0",
|
|
55
|
+
version: "22.2.2",
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
type: AerisFileUploadContentTemplate,
|
|
58
|
+
decorators: [{
|
|
59
|
+
type: Directive,
|
|
60
|
+
args: [{ selector: "ng-template[aerisFileUploadContent]" }]
|
|
61
|
+
}]
|
|
62
|
+
});
|
|
63
|
+
var AerisFileUploadFileTemplate = class AerisFileUploadFileTemplate {
|
|
64
|
+
template = inject(TemplateRef);
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
66
|
+
minVersion: "12.0.0",
|
|
67
|
+
version: "22.2.2",
|
|
68
|
+
ngImport: i0,
|
|
69
|
+
type: AerisFileUploadFileTemplate,
|
|
70
|
+
deps: [],
|
|
71
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
72
|
+
});
|
|
73
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
74
|
+
minVersion: "14.0.0",
|
|
75
|
+
version: "22.2.2",
|
|
76
|
+
type: AerisFileUploadFileTemplate,
|
|
77
|
+
isStandalone: true,
|
|
78
|
+
selector: "ng-template[aerisFileUploadFile]",
|
|
79
|
+
ngImport: i0
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
83
|
+
minVersion: "12.0.0",
|
|
84
|
+
version: "22.2.2",
|
|
85
|
+
ngImport: i0,
|
|
86
|
+
type: AerisFileUploadFileTemplate,
|
|
87
|
+
decorators: [{
|
|
88
|
+
type: Directive,
|
|
89
|
+
args: [{ selector: "ng-template[aerisFileUploadFile]" }]
|
|
90
|
+
}]
|
|
91
|
+
});
|
|
92
|
+
var AerisFileUploadEmptyTemplate = class AerisFileUploadEmptyTemplate {
|
|
93
|
+
template = inject(TemplateRef);
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
95
|
+
minVersion: "12.0.0",
|
|
96
|
+
version: "22.2.2",
|
|
97
|
+
ngImport: i0,
|
|
98
|
+
type: AerisFileUploadEmptyTemplate,
|
|
99
|
+
deps: [],
|
|
100
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
101
|
+
});
|
|
102
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
103
|
+
minVersion: "14.0.0",
|
|
104
|
+
version: "22.2.2",
|
|
105
|
+
type: AerisFileUploadEmptyTemplate,
|
|
106
|
+
isStandalone: true,
|
|
107
|
+
selector: "ng-template[aerisFileUploadEmpty]",
|
|
108
|
+
ngImport: i0
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
112
|
+
minVersion: "12.0.0",
|
|
113
|
+
version: "22.2.2",
|
|
114
|
+
ngImport: i0,
|
|
115
|
+
type: AerisFileUploadEmptyTemplate,
|
|
116
|
+
decorators: [{
|
|
117
|
+
type: Directive,
|
|
118
|
+
args: [{ selector: "ng-template[aerisFileUploadEmpty]" }]
|
|
119
|
+
}]
|
|
120
|
+
});
|
|
121
|
+
var AerisFileUploadChooseIconTemplate = class AerisFileUploadChooseIconTemplate {
|
|
122
|
+
template = inject(TemplateRef);
|
|
123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
124
|
+
minVersion: "12.0.0",
|
|
125
|
+
version: "22.2.2",
|
|
126
|
+
ngImport: i0,
|
|
127
|
+
type: AerisFileUploadChooseIconTemplate,
|
|
128
|
+
deps: [],
|
|
129
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
130
|
+
});
|
|
131
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
132
|
+
minVersion: "14.0.0",
|
|
133
|
+
version: "22.2.2",
|
|
134
|
+
type: AerisFileUploadChooseIconTemplate,
|
|
135
|
+
isStandalone: true,
|
|
136
|
+
selector: "ng-template[aerisFileUploadChooseIcon]",
|
|
137
|
+
ngImport: i0
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
141
|
+
minVersion: "12.0.0",
|
|
142
|
+
version: "22.2.2",
|
|
143
|
+
ngImport: i0,
|
|
144
|
+
type: AerisFileUploadChooseIconTemplate,
|
|
145
|
+
decorators: [{
|
|
146
|
+
type: Directive,
|
|
147
|
+
args: [{ selector: "ng-template[aerisFileUploadChooseIcon]" }]
|
|
148
|
+
}]
|
|
149
|
+
});
|
|
150
|
+
var AerisFileUploadUploadIconTemplate = class AerisFileUploadUploadIconTemplate {
|
|
151
|
+
template = inject(TemplateRef);
|
|
152
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
153
|
+
minVersion: "12.0.0",
|
|
154
|
+
version: "22.2.2",
|
|
155
|
+
ngImport: i0,
|
|
156
|
+
type: AerisFileUploadUploadIconTemplate,
|
|
157
|
+
deps: [],
|
|
158
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
159
|
+
});
|
|
160
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
161
|
+
minVersion: "14.0.0",
|
|
162
|
+
version: "22.2.2",
|
|
163
|
+
type: AerisFileUploadUploadIconTemplate,
|
|
164
|
+
isStandalone: true,
|
|
165
|
+
selector: "ng-template[aerisFileUploadUploadIcon]",
|
|
166
|
+
ngImport: i0
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
170
|
+
minVersion: "12.0.0",
|
|
171
|
+
version: "22.2.2",
|
|
172
|
+
ngImport: i0,
|
|
173
|
+
type: AerisFileUploadUploadIconTemplate,
|
|
174
|
+
decorators: [{
|
|
175
|
+
type: Directive,
|
|
176
|
+
args: [{ selector: "ng-template[aerisFileUploadUploadIcon]" }]
|
|
177
|
+
}]
|
|
178
|
+
});
|
|
179
|
+
var AerisFileUploadClearIconTemplate = class AerisFileUploadClearIconTemplate {
|
|
180
|
+
template = inject(TemplateRef);
|
|
181
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
182
|
+
minVersion: "12.0.0",
|
|
183
|
+
version: "22.2.2",
|
|
184
|
+
ngImport: i0,
|
|
185
|
+
type: AerisFileUploadClearIconTemplate,
|
|
186
|
+
deps: [],
|
|
187
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
188
|
+
});
|
|
189
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
190
|
+
minVersion: "14.0.0",
|
|
191
|
+
version: "22.2.2",
|
|
192
|
+
type: AerisFileUploadClearIconTemplate,
|
|
193
|
+
isStandalone: true,
|
|
194
|
+
selector: "ng-template[aerisFileUploadClearIcon]",
|
|
195
|
+
ngImport: i0
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
199
|
+
minVersion: "12.0.0",
|
|
200
|
+
version: "22.2.2",
|
|
201
|
+
ngImport: i0,
|
|
202
|
+
type: AerisFileUploadClearIconTemplate,
|
|
203
|
+
decorators: [{
|
|
204
|
+
type: Directive,
|
|
205
|
+
args: [{ selector: "ng-template[aerisFileUploadClearIcon]" }]
|
|
206
|
+
}]
|
|
207
|
+
});
|
|
208
|
+
const SAFE_IMAGE_PREVIEW_TYPES = /* @__PURE__ */ new Set([
|
|
209
|
+
"image/avif",
|
|
210
|
+
"image/bmp",
|
|
211
|
+
"image/gif",
|
|
212
|
+
"image/jpeg",
|
|
213
|
+
"image/png",
|
|
214
|
+
"image/vnd.microsoft.icon",
|
|
215
|
+
"image/webp",
|
|
216
|
+
"image/x-icon"
|
|
77
217
|
]);
|
|
78
|
-
const DEFAULT_MAX_PREVIEW_FILE_SIZE =
|
|
218
|
+
const DEFAULT_MAX_PREVIEW_FILE_SIZE = 10485760;
|
|
79
219
|
let nextFileUploadId = 0;
|
|
80
|
-
class AerisFileUpload {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
220
|
+
var AerisFileUpload = class AerisFileUpload {
|
|
221
|
+
fileInput = viewChild("fileInput", ...ngDevMode ? [{ debugName: "fileInput" }] : /* istanbul ignore next */ []);
|
|
222
|
+
destroyRef = inject(DestroyRef);
|
|
223
|
+
toolbarTemplate = contentChild(AerisFileUploadToolbarTemplate, ...ngDevMode ? [{ debugName: "toolbarTemplate" }] : /* istanbul ignore next */ []);
|
|
224
|
+
contentTemplate = contentChild(AerisFileUploadContentTemplate, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
|
|
225
|
+
fileTemplate = contentChild(AerisFileUploadFileTemplate, ...ngDevMode ? [{ debugName: "fileTemplate" }] : /* istanbul ignore next */ []);
|
|
226
|
+
emptyTemplate = contentChild(AerisFileUploadEmptyTemplate, ...ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []);
|
|
227
|
+
chooseIconTemplate = contentChild(AerisFileUploadChooseIconTemplate, ...ngDevMode ? [{ debugName: "chooseIconTemplate" }] : /* istanbul ignore next */ []);
|
|
228
|
+
uploadIconTemplate = contentChild(AerisFileUploadUploadIconTemplate, ...ngDevMode ? [{ debugName: "uploadIconTemplate" }] : /* istanbul ignore next */ []);
|
|
229
|
+
clearIconTemplate = contentChild(AerisFileUploadClearIconTemplate, ...ngDevMode ? [{ debugName: "clearIconTemplate" }] : /* istanbul ignore next */ []);
|
|
230
|
+
generatedId = `aeris-file-upload-${++nextFileUploadId}`;
|
|
231
|
+
dragDepth = 0;
|
|
232
|
+
items = signal([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
233
|
+
rejections = signal([], ...ngDevMode ? [{ debugName: "rejections" }] : /* istanbul ignore next */ []);
|
|
234
|
+
dragActive = signal(false, ...ngDevMode ? [{ debugName: "dragActive" }] : /* istanbul ignore next */ []);
|
|
235
|
+
dragRejected = signal(false, ...ngDevMode ? [{ debugName: "dragRejected" }] : /* istanbul ignore next */ []);
|
|
236
|
+
files = model([], ...ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []);
|
|
237
|
+
mode = input("advanced", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
|
|
238
|
+
multiple = input(false, {
|
|
239
|
+
...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
|
|
240
|
+
transform: booleanAttribute
|
|
241
|
+
});
|
|
242
|
+
accept = input("", ...ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []);
|
|
243
|
+
minFileSize = input(0, {
|
|
244
|
+
...ngDevMode ? { debugName: "minFileSize" } : /* istanbul ignore next */ {},
|
|
245
|
+
transform: numberAttribute
|
|
246
|
+
});
|
|
247
|
+
maxFileSize = input(0, {
|
|
248
|
+
...ngDevMode ? { debugName: "maxFileSize" } : /* istanbul ignore next */ {},
|
|
249
|
+
transform: numberAttribute
|
|
250
|
+
});
|
|
251
|
+
maxPreviewFileSize = input(DEFAULT_MAX_PREVIEW_FILE_SIZE, {
|
|
252
|
+
...ngDevMode ? { debugName: "maxPreviewFileSize" } : /* istanbul ignore next */ {},
|
|
253
|
+
transform: numberAttribute
|
|
254
|
+
});
|
|
255
|
+
maxFiles = input(0, {
|
|
256
|
+
...ngDevMode ? { debugName: "maxFiles" } : /* istanbul ignore next */ {},
|
|
257
|
+
transform: numberAttribute
|
|
258
|
+
});
|
|
259
|
+
disabled = input(false, {
|
|
260
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
261
|
+
transform: booleanAttribute
|
|
262
|
+
});
|
|
263
|
+
autoUpload = input(false, {
|
|
264
|
+
...ngDevMode ? { debugName: "autoUpload" } : /* istanbul ignore next */ {},
|
|
265
|
+
transform: booleanAttribute
|
|
266
|
+
});
|
|
267
|
+
customUpload = input(false, {
|
|
268
|
+
...ngDevMode ? { debugName: "customUpload" } : /* istanbul ignore next */ {},
|
|
269
|
+
transform: booleanAttribute
|
|
270
|
+
});
|
|
271
|
+
dragDrop = input(true, {
|
|
272
|
+
...ngDevMode ? { debugName: "dragDrop" } : /* istanbul ignore next */ {},
|
|
273
|
+
transform: booleanAttribute
|
|
274
|
+
});
|
|
275
|
+
imagePreview = input(false, {
|
|
276
|
+
...ngDevMode ? { debugName: "imagePreview" } : /* istanbul ignore next */ {},
|
|
277
|
+
transform: booleanAttribute
|
|
278
|
+
});
|
|
279
|
+
showFileList = input(true, {
|
|
280
|
+
...ngDevMode ? { debugName: "showFileList" } : /* istanbul ignore next */ {},
|
|
281
|
+
transform: booleanAttribute
|
|
282
|
+
});
|
|
283
|
+
showProgress = input(true, {
|
|
284
|
+
...ngDevMode ? { debugName: "showProgress" } : /* istanbul ignore next */ {},
|
|
285
|
+
transform: booleanAttribute
|
|
286
|
+
});
|
|
287
|
+
showSize = input(true, {
|
|
288
|
+
...ngDevMode ? { debugName: "showSize" } : /* istanbul ignore next */ {},
|
|
289
|
+
transform: booleanAttribute
|
|
290
|
+
});
|
|
291
|
+
showUploadButton = input(true, {
|
|
292
|
+
...ngDevMode ? { debugName: "showUploadButton" } : /* istanbul ignore next */ {},
|
|
293
|
+
transform: booleanAttribute
|
|
294
|
+
});
|
|
295
|
+
showClearButton = input(true, {
|
|
296
|
+
...ngDevMode ? { debugName: "showClearButton" } : /* istanbul ignore next */ {},
|
|
297
|
+
transform: booleanAttribute
|
|
298
|
+
});
|
|
299
|
+
chooseLabel = input("Choose", ...ngDevMode ? [{ debugName: "chooseLabel" }] : /* istanbul ignore next */ []);
|
|
300
|
+
uploadLabel = input("Upload", ...ngDevMode ? [{ debugName: "uploadLabel" }] : /* istanbul ignore next */ []);
|
|
301
|
+
clearLabel = input("Clear", ...ngDevMode ? [{ debugName: "clearLabel" }] : /* istanbul ignore next */ []);
|
|
302
|
+
dropLabel = input("Drop files or click to browse", ...ngDevMode ? [{ debugName: "dropLabel" }] : /* istanbul ignore next */ []);
|
|
303
|
+
emptyLabel = input("No files selected.", ...ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []);
|
|
304
|
+
helperText = input("", ...ngDevMode ? [{ debugName: "helperText" }] : /* istanbul ignore next */ []);
|
|
305
|
+
name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
306
|
+
inputId = input(`${this.generatedId}-input`, ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
307
|
+
inputAriaLabel = input("Choose files", ...ngDevMode ? [{ debugName: "inputAriaLabel" }] : /* istanbul ignore next */ []);
|
|
308
|
+
fileListAriaLabel = input("Selected files", ...ngDevMode ? [{ debugName: "fileListAriaLabel" }] : /* istanbul ignore next */ []);
|
|
309
|
+
removeAriaLabel = input("Remove file", ...ngDevMode ? [{ debugName: "removeAriaLabel" }] : /* istanbul ignore next */ []);
|
|
310
|
+
invalidFileTypeMessage = input("File type is not allowed.", ...ngDevMode ? [{ debugName: "invalidFileTypeMessage" }] : /* istanbul ignore next */ []);
|
|
311
|
+
invalidMinFileSizeMessage = input("File is smaller than the minimum size.", ...ngDevMode ? [{ debugName: "invalidMinFileSizeMessage" }] : /* istanbul ignore next */ []);
|
|
312
|
+
invalidMaxFileSizeMessage = input("File exceeds the maximum size.", ...ngDevMode ? [{ debugName: "invalidMaxFileSizeMessage" }] : /* istanbul ignore next */ []);
|
|
313
|
+
invalidFileLimitMessage = input("Too many files selected.", ...ngDevMode ? [{ debugName: "invalidFileLimitMessage" }] : /* istanbul ignore next */ []);
|
|
314
|
+
selected = output();
|
|
315
|
+
removed = output();
|
|
316
|
+
cleared = output();
|
|
317
|
+
uploadRequested = output();
|
|
318
|
+
validationFailed = output();
|
|
319
|
+
labelId = computed(() => `${this.generatedId}-label`, ...ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []);
|
|
320
|
+
helpId = computed(() => `${this.generatedId}-help`, ...ngDevMode ? [{ debugName: "helpId" }] : /* istanbul ignore next */ []);
|
|
321
|
+
descriptionIds = computed(() => this.resolvedHelpText() ? this.helpId() : null, ...ngDevMode ? [{ debugName: "descriptionIds" }] : /* istanbul ignore next */ []);
|
|
322
|
+
canClear = computed(() => !this.disabled() && this.items().length > 0, ...ngDevMode ? [{ debugName: "canClear" }] : /* istanbul ignore next */ []);
|
|
323
|
+
canUpload = computed(() => !this.disabled() && this.items().some((item) => item.status === "ready"), ...ngDevMode ? [{ debugName: "canUpload" }] : /* istanbul ignore next */ []);
|
|
324
|
+
summaryText = computed(() => {
|
|
325
|
+
const count = this.items().length;
|
|
326
|
+
if (count === 0) return "No file chosen";
|
|
327
|
+
if (count === 1) return this.items()[0]?.name ?? "1 file selected";
|
|
328
|
+
return `${count} files selected`;
|
|
329
|
+
}, ...ngDevMode ? [{ debugName: "summaryText" }] : /* istanbul ignore next */ []);
|
|
330
|
+
resolvedHelpText = computed(() => {
|
|
331
|
+
const custom = this.helperText();
|
|
332
|
+
if (custom) return custom;
|
|
333
|
+
const parts = [];
|
|
334
|
+
if (this.accept()) parts.push(`Accepted: ${this.accept()}`);
|
|
335
|
+
if (this.maxFileSize() > 0) parts.push(`Up to ${this.formatSize(this.maxFileSize())} each`);
|
|
336
|
+
if (this.maxFiles() > 0) parts.push(`Maximum ${this.maxFiles()} files`);
|
|
337
|
+
return parts.join(" · ") || "Use the choose button or drop files here.";
|
|
338
|
+
}, ...ngDevMode ? [{ debugName: "resolvedHelpText" }] : /* istanbul ignore next */ []);
|
|
339
|
+
templateContext = computed(() => ({
|
|
340
|
+
$implicit: this.items(),
|
|
341
|
+
files: this.items(),
|
|
342
|
+
component: this,
|
|
343
|
+
choose: (event) => this.choose(event ?? null),
|
|
344
|
+
upload: (event) => this.upload(event ?? null),
|
|
345
|
+
clear: (event) => this.clear(event ?? null)
|
|
346
|
+
}), ...ngDevMode ? [{ debugName: "templateContext" }] : /* istanbul ignore next */ []);
|
|
347
|
+
fileContexts = computed(() => {
|
|
348
|
+
const contexts = {};
|
|
349
|
+
for (const item of this.items()) contexts[item.id] = {
|
|
350
|
+
$implicit: item,
|
|
351
|
+
file: item,
|
|
352
|
+
component: this,
|
|
353
|
+
remove: (event) => this.remove(item.file, event ?? null)
|
|
354
|
+
};
|
|
355
|
+
return contexts;
|
|
356
|
+
}, ...ngDevMode ? [{ debugName: "fileContexts" }] : /* istanbul ignore next */ []);
|
|
357
|
+
constructor() {
|
|
358
|
+
this.destroyRef.onDestroy(() => this.revokeItems(this.items()));
|
|
359
|
+
effect(() => {
|
|
360
|
+
const nextFiles = this.files();
|
|
361
|
+
this.items.update((current) => this.reconcileItems(current, nextFiles));
|
|
362
|
+
});
|
|
363
|
+
effect(() => {
|
|
364
|
+
if (!this.disabled()) return;
|
|
365
|
+
this.dragActive.set(false);
|
|
366
|
+
this.dragRejected.set(false);
|
|
367
|
+
this.dragDepth = 0;
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
choose(originalEvent = null) {
|
|
371
|
+
if (this.disabled()) return;
|
|
372
|
+
originalEvent?.preventDefault();
|
|
373
|
+
const input = this.fileInput()?.nativeElement;
|
|
374
|
+
if (!input) return;
|
|
375
|
+
input.value = "";
|
|
376
|
+
input.click();
|
|
377
|
+
}
|
|
378
|
+
upload(originalEvent = null) {
|
|
379
|
+
if (!this.canUpload()) return;
|
|
380
|
+
const uploadItems = this.items().filter((item) => item.status === "ready");
|
|
381
|
+
const uploadFiles = uploadItems.map((item) => item.file);
|
|
382
|
+
this.updateItems(uploadFiles, {
|
|
383
|
+
status: "uploading",
|
|
384
|
+
progress: 0,
|
|
385
|
+
error: ""
|
|
386
|
+
});
|
|
387
|
+
const event = {
|
|
388
|
+
originalEvent,
|
|
389
|
+
files: uploadFiles,
|
|
390
|
+
items: uploadItems,
|
|
391
|
+
setProgress: (file, progress) => this.setProgress(file, progress),
|
|
392
|
+
complete: (files = uploadFiles) => this.markUploaded(files),
|
|
393
|
+
error: (message = "Upload failed.", files = uploadFiles) => this.markError(files, message)
|
|
394
|
+
};
|
|
395
|
+
this.uploadRequested.emit(event);
|
|
396
|
+
if (!this.customUpload()) this.markUploaded(uploadFiles);
|
|
397
|
+
}
|
|
398
|
+
clear(originalEvent = null, reason = "api") {
|
|
399
|
+
const current = this.items();
|
|
400
|
+
if (current.length === 0) return;
|
|
401
|
+
this.revokeItems(current);
|
|
402
|
+
this.items.set([]);
|
|
403
|
+
this.files.set([]);
|
|
404
|
+
this.rejections.set([]);
|
|
405
|
+
this.resetInput();
|
|
406
|
+
this.cleared.emit({
|
|
407
|
+
originalEvent,
|
|
408
|
+
files: current.map((item) => item.file),
|
|
409
|
+
reason
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
remove(file, originalEvent = null) {
|
|
413
|
+
const item = this.items().find((candidate) => candidate.file === file);
|
|
414
|
+
if (!item) return;
|
|
415
|
+
this.revokeItems([item]);
|
|
416
|
+
this.items.update((items) => items.filter((candidate) => candidate.file !== file));
|
|
417
|
+
this.files.update((files) => files.filter((candidate) => candidate !== file));
|
|
418
|
+
this.removed.emit({
|
|
419
|
+
originalEvent,
|
|
420
|
+
file,
|
|
421
|
+
item
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
setProgress(file, progress) {
|
|
425
|
+
this.updateItems([file], {
|
|
426
|
+
status: "uploading",
|
|
427
|
+
progress: this.clampProgress(progress),
|
|
428
|
+
error: ""
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
markUploaded(files = this.files()) {
|
|
432
|
+
this.updateItems(files, {
|
|
433
|
+
status: "uploaded",
|
|
434
|
+
progress: 100,
|
|
435
|
+
error: ""
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
markError(files = this.files(), message = "Upload failed.") {
|
|
439
|
+
this.updateItems(files, {
|
|
440
|
+
status: "error",
|
|
441
|
+
error: message
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
handleFileInput(event) {
|
|
445
|
+
const input = event.target;
|
|
446
|
+
this.addFiles(input?.files, event);
|
|
447
|
+
}
|
|
448
|
+
handleDragEnter(event) {
|
|
449
|
+
if (!this.canReceiveDrop()) return;
|
|
450
|
+
event.preventDefault();
|
|
451
|
+
this.dragDepth += 1;
|
|
452
|
+
this.dragActive.set(true);
|
|
453
|
+
this.dragRejected.set(!this.hasAllowedDragItems(event.dataTransfer));
|
|
454
|
+
}
|
|
455
|
+
handleDragOver(event) {
|
|
456
|
+
if (!this.canReceiveDrop()) return;
|
|
457
|
+
event.preventDefault();
|
|
458
|
+
if (event.dataTransfer) event.dataTransfer.dropEffect = "copy";
|
|
459
|
+
this.dragActive.set(true);
|
|
460
|
+
this.dragRejected.set(!this.hasAllowedDragItems(event.dataTransfer));
|
|
461
|
+
}
|
|
462
|
+
handleDragLeave(event) {
|
|
463
|
+
if (!this.canReceiveDrop()) return;
|
|
464
|
+
event.preventDefault();
|
|
465
|
+
this.dragDepth = Math.max(0, this.dragDepth - 1);
|
|
466
|
+
if (this.dragDepth > 0) return;
|
|
467
|
+
this.dragActive.set(false);
|
|
468
|
+
this.dragRejected.set(false);
|
|
469
|
+
}
|
|
470
|
+
handleDrop(event) {
|
|
471
|
+
if (!this.canReceiveDrop()) return;
|
|
472
|
+
event.preventDefault();
|
|
473
|
+
this.dragDepth = 0;
|
|
474
|
+
this.dragActive.set(false);
|
|
475
|
+
this.dragRejected.set(false);
|
|
476
|
+
this.addFiles(event.dataTransfer?.files, event);
|
|
477
|
+
}
|
|
478
|
+
canReceiveDrop() {
|
|
479
|
+
return !this.disabled() && this.dragDrop();
|
|
480
|
+
}
|
|
481
|
+
addFiles(fileList, originalEvent) {
|
|
482
|
+
if (this.disabled() || !fileList) return;
|
|
483
|
+
const incoming = Array.from(fileList);
|
|
484
|
+
const accepted = [];
|
|
485
|
+
const rejected = [];
|
|
486
|
+
const existingCount = this.multiple() ? this.files().length : 0;
|
|
487
|
+
const maxFiles = this.maxFiles();
|
|
488
|
+
for (const file of incoming) {
|
|
489
|
+
const rejection = this.validateFile(file, existingCount + accepted.length, maxFiles);
|
|
490
|
+
if (rejection) rejected.push(rejection);
|
|
491
|
+
else accepted.push(file);
|
|
492
|
+
}
|
|
493
|
+
const nextAccepted = this.multiple() ? accepted : accepted.slice(0, 1);
|
|
494
|
+
const nextFiles = this.multiple() ? [...this.files(), ...nextAccepted] : nextAccepted;
|
|
495
|
+
this.files.set(nextFiles);
|
|
496
|
+
this.items.update((current) => this.reconcileItems(current, nextFiles));
|
|
497
|
+
this.rejections.set(rejected);
|
|
498
|
+
this.selected.emit({
|
|
499
|
+
originalEvent,
|
|
500
|
+
files: incoming,
|
|
501
|
+
acceptedFiles: nextAccepted,
|
|
502
|
+
rejectedFiles: rejected
|
|
503
|
+
});
|
|
504
|
+
if (rejected.length > 0) this.validationFailed.emit(rejected);
|
|
505
|
+
this.resetInput();
|
|
506
|
+
if (this.autoUpload() && nextAccepted.length > 0) queueMicrotask(() => this.upload(originalEvent));
|
|
507
|
+
}
|
|
508
|
+
validateFile(file, nextIndex, maxFiles) {
|
|
509
|
+
if (maxFiles > 0 && nextIndex >= maxFiles) return this.reject(file, "limit", this.invalidFileLimitMessage());
|
|
510
|
+
if (!this.acceptsType(file)) return this.reject(file, "type", this.invalidFileTypeMessage());
|
|
511
|
+
if (this.minFileSize() > 0 && file.size < this.minFileSize()) return this.reject(file, "size-min", this.invalidMinFileSizeMessage());
|
|
512
|
+
if (this.maxFileSize() > 0 && file.size > this.maxFileSize()) return this.reject(file, "size-max", this.invalidMaxFileSizeMessage());
|
|
513
|
+
return null;
|
|
514
|
+
}
|
|
515
|
+
reject(file, reason, message) {
|
|
516
|
+
return {
|
|
517
|
+
file,
|
|
518
|
+
reason,
|
|
519
|
+
message: `${file.name}: ${message}`
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
acceptsType(file) {
|
|
523
|
+
const accept = this.accept().split(",").map((item) => item.trim().toLowerCase()).filter(Boolean);
|
|
524
|
+
if (accept.length === 0) return true;
|
|
525
|
+
const name = file.name.toLowerCase();
|
|
526
|
+
const type = file.type.toLowerCase();
|
|
527
|
+
return accept.some((entry) => {
|
|
528
|
+
if (entry.startsWith(".")) return name.endsWith(entry);
|
|
529
|
+
if (entry.endsWith("/*")) return type.startsWith(entry.slice(0, -1));
|
|
530
|
+
return type === entry;
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
hasAllowedDragItems(dataTransfer) {
|
|
534
|
+
const items = Array.from(dataTransfer?.items ?? []);
|
|
535
|
+
if (items.length === 0) return true;
|
|
536
|
+
return items.some((item) => item.kind === "file");
|
|
537
|
+
}
|
|
538
|
+
reconcileItems(current, files) {
|
|
539
|
+
const next = files.map((file) => {
|
|
540
|
+
return current.find((item) => item.file === file) ?? this.createItem(file);
|
|
541
|
+
});
|
|
542
|
+
this.revokeItems(current.filter((item) => !files.includes(item.file)));
|
|
543
|
+
return next;
|
|
544
|
+
}
|
|
545
|
+
createItem(file) {
|
|
546
|
+
const image = this.isSafePreviewImage(file);
|
|
547
|
+
const preview = image && this.imagePreview() ? this.createObjectUrl(file) : {
|
|
548
|
+
url: "",
|
|
549
|
+
created: false
|
|
550
|
+
};
|
|
551
|
+
return {
|
|
552
|
+
id: `${this.generatedId}-file-${globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random()}`}`,
|
|
553
|
+
file,
|
|
554
|
+
name: file.name,
|
|
555
|
+
size: file.size,
|
|
556
|
+
type: file.type,
|
|
557
|
+
displaySize: this.formatSize(file.size),
|
|
558
|
+
status: "ready",
|
|
559
|
+
progress: 0,
|
|
560
|
+
previewUrl: preview.url,
|
|
561
|
+
objectUrlCreated: preview.created,
|
|
562
|
+
error: "",
|
|
563
|
+
image
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
createObjectUrl(file) {
|
|
567
|
+
if (typeof URL === "undefined" || typeof URL.createObjectURL !== "function") return {
|
|
568
|
+
url: "",
|
|
569
|
+
created: false
|
|
570
|
+
};
|
|
571
|
+
return {
|
|
572
|
+
url: URL.createObjectURL(file),
|
|
573
|
+
created: true
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
isSafePreviewImage(file) {
|
|
577
|
+
if (!SAFE_IMAGE_PREVIEW_TYPES.has(file.type.toLowerCase())) return false;
|
|
578
|
+
const limit = this.maxPreviewFileSize();
|
|
579
|
+
return limit <= 0 || file.size <= limit;
|
|
580
|
+
}
|
|
581
|
+
revokeItems(items) {
|
|
582
|
+
if (typeof URL === "undefined" || typeof URL.revokeObjectURL !== "function") return;
|
|
583
|
+
for (const item of items) if (item.objectUrlCreated && item.previewUrl) URL.revokeObjectURL(item.previewUrl);
|
|
584
|
+
}
|
|
585
|
+
updateItems(files, patch) {
|
|
586
|
+
const targets = new Set(files);
|
|
587
|
+
this.items.update((items) => items.map((item) => targets.has(item.file) ? {
|
|
588
|
+
...item,
|
|
589
|
+
...patch
|
|
590
|
+
} : item));
|
|
591
|
+
}
|
|
592
|
+
clampProgress(progress) {
|
|
593
|
+
if (!Number.isFinite(progress)) return 0;
|
|
594
|
+
return Math.min(100, Math.max(0, Math.round(progress)));
|
|
595
|
+
}
|
|
596
|
+
resetInput() {
|
|
597
|
+
const input = this.fileInput()?.nativeElement;
|
|
598
|
+
if (input) input.value = "";
|
|
599
|
+
}
|
|
600
|
+
formatSize(bytes) {
|
|
601
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
602
|
+
const kilobytes = bytes / 1024;
|
|
603
|
+
if (kilobytes < 1024) return `${kilobytes.toFixed(kilobytes >= 10 ? 0 : 1)} KB`;
|
|
604
|
+
const megabytes = kilobytes / 1024;
|
|
605
|
+
return `${megabytes.toFixed(megabytes >= 10 ? 0 : 1)} MB`;
|
|
606
|
+
}
|
|
607
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
608
|
+
minVersion: "12.0.0",
|
|
609
|
+
version: "22.2.2",
|
|
610
|
+
ngImport: i0,
|
|
611
|
+
type: AerisFileUpload,
|
|
612
|
+
deps: [],
|
|
613
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
614
|
+
});
|
|
615
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
616
|
+
minVersion: "17.0.0",
|
|
617
|
+
version: "22.2.2",
|
|
618
|
+
type: AerisFileUpload,
|
|
619
|
+
isStandalone: true,
|
|
620
|
+
selector: "aeris-file-upload",
|
|
621
|
+
inputs: {
|
|
622
|
+
files: {
|
|
623
|
+
classPropertyName: "files",
|
|
624
|
+
publicName: "files",
|
|
625
|
+
isSignal: true,
|
|
626
|
+
isRequired: false,
|
|
627
|
+
transformFunction: null
|
|
628
|
+
},
|
|
629
|
+
mode: {
|
|
630
|
+
classPropertyName: "mode",
|
|
631
|
+
publicName: "mode",
|
|
632
|
+
isSignal: true,
|
|
633
|
+
isRequired: false,
|
|
634
|
+
transformFunction: null
|
|
635
|
+
},
|
|
636
|
+
multiple: {
|
|
637
|
+
classPropertyName: "multiple",
|
|
638
|
+
publicName: "multiple",
|
|
639
|
+
isSignal: true,
|
|
640
|
+
isRequired: false,
|
|
641
|
+
transformFunction: null
|
|
642
|
+
},
|
|
643
|
+
accept: {
|
|
644
|
+
classPropertyName: "accept",
|
|
645
|
+
publicName: "accept",
|
|
646
|
+
isSignal: true,
|
|
647
|
+
isRequired: false,
|
|
648
|
+
transformFunction: null
|
|
649
|
+
},
|
|
650
|
+
minFileSize: {
|
|
651
|
+
classPropertyName: "minFileSize",
|
|
652
|
+
publicName: "minFileSize",
|
|
653
|
+
isSignal: true,
|
|
654
|
+
isRequired: false,
|
|
655
|
+
transformFunction: null
|
|
656
|
+
},
|
|
657
|
+
maxFileSize: {
|
|
658
|
+
classPropertyName: "maxFileSize",
|
|
659
|
+
publicName: "maxFileSize",
|
|
660
|
+
isSignal: true,
|
|
661
|
+
isRequired: false,
|
|
662
|
+
transformFunction: null
|
|
663
|
+
},
|
|
664
|
+
maxPreviewFileSize: {
|
|
665
|
+
classPropertyName: "maxPreviewFileSize",
|
|
666
|
+
publicName: "maxPreviewFileSize",
|
|
667
|
+
isSignal: true,
|
|
668
|
+
isRequired: false,
|
|
669
|
+
transformFunction: null
|
|
670
|
+
},
|
|
671
|
+
maxFiles: {
|
|
672
|
+
classPropertyName: "maxFiles",
|
|
673
|
+
publicName: "maxFiles",
|
|
674
|
+
isSignal: true,
|
|
675
|
+
isRequired: false,
|
|
676
|
+
transformFunction: null
|
|
677
|
+
},
|
|
678
|
+
disabled: {
|
|
679
|
+
classPropertyName: "disabled",
|
|
680
|
+
publicName: "disabled",
|
|
681
|
+
isSignal: true,
|
|
682
|
+
isRequired: false,
|
|
683
|
+
transformFunction: null
|
|
684
|
+
},
|
|
685
|
+
autoUpload: {
|
|
686
|
+
classPropertyName: "autoUpload",
|
|
687
|
+
publicName: "autoUpload",
|
|
688
|
+
isSignal: true,
|
|
689
|
+
isRequired: false,
|
|
690
|
+
transformFunction: null
|
|
691
|
+
},
|
|
692
|
+
customUpload: {
|
|
693
|
+
classPropertyName: "customUpload",
|
|
694
|
+
publicName: "customUpload",
|
|
695
|
+
isSignal: true,
|
|
696
|
+
isRequired: false,
|
|
697
|
+
transformFunction: null
|
|
698
|
+
},
|
|
699
|
+
dragDrop: {
|
|
700
|
+
classPropertyName: "dragDrop",
|
|
701
|
+
publicName: "dragDrop",
|
|
702
|
+
isSignal: true,
|
|
703
|
+
isRequired: false,
|
|
704
|
+
transformFunction: null
|
|
705
|
+
},
|
|
706
|
+
imagePreview: {
|
|
707
|
+
classPropertyName: "imagePreview",
|
|
708
|
+
publicName: "imagePreview",
|
|
709
|
+
isSignal: true,
|
|
710
|
+
isRequired: false,
|
|
711
|
+
transformFunction: null
|
|
712
|
+
},
|
|
713
|
+
showFileList: {
|
|
714
|
+
classPropertyName: "showFileList",
|
|
715
|
+
publicName: "showFileList",
|
|
716
|
+
isSignal: true,
|
|
717
|
+
isRequired: false,
|
|
718
|
+
transformFunction: null
|
|
719
|
+
},
|
|
720
|
+
showProgress: {
|
|
721
|
+
classPropertyName: "showProgress",
|
|
722
|
+
publicName: "showProgress",
|
|
723
|
+
isSignal: true,
|
|
724
|
+
isRequired: false,
|
|
725
|
+
transformFunction: null
|
|
726
|
+
},
|
|
727
|
+
showSize: {
|
|
728
|
+
classPropertyName: "showSize",
|
|
729
|
+
publicName: "showSize",
|
|
730
|
+
isSignal: true,
|
|
731
|
+
isRequired: false,
|
|
732
|
+
transformFunction: null
|
|
733
|
+
},
|
|
734
|
+
showUploadButton: {
|
|
735
|
+
classPropertyName: "showUploadButton",
|
|
736
|
+
publicName: "showUploadButton",
|
|
737
|
+
isSignal: true,
|
|
738
|
+
isRequired: false,
|
|
739
|
+
transformFunction: null
|
|
740
|
+
},
|
|
741
|
+
showClearButton: {
|
|
742
|
+
classPropertyName: "showClearButton",
|
|
743
|
+
publicName: "showClearButton",
|
|
744
|
+
isSignal: true,
|
|
745
|
+
isRequired: false,
|
|
746
|
+
transformFunction: null
|
|
747
|
+
},
|
|
748
|
+
chooseLabel: {
|
|
749
|
+
classPropertyName: "chooseLabel",
|
|
750
|
+
publicName: "chooseLabel",
|
|
751
|
+
isSignal: true,
|
|
752
|
+
isRequired: false,
|
|
753
|
+
transformFunction: null
|
|
754
|
+
},
|
|
755
|
+
uploadLabel: {
|
|
756
|
+
classPropertyName: "uploadLabel",
|
|
757
|
+
publicName: "uploadLabel",
|
|
758
|
+
isSignal: true,
|
|
759
|
+
isRequired: false,
|
|
760
|
+
transformFunction: null
|
|
761
|
+
},
|
|
762
|
+
clearLabel: {
|
|
763
|
+
classPropertyName: "clearLabel",
|
|
764
|
+
publicName: "clearLabel",
|
|
765
|
+
isSignal: true,
|
|
766
|
+
isRequired: false,
|
|
767
|
+
transformFunction: null
|
|
768
|
+
},
|
|
769
|
+
dropLabel: {
|
|
770
|
+
classPropertyName: "dropLabel",
|
|
771
|
+
publicName: "dropLabel",
|
|
772
|
+
isSignal: true,
|
|
773
|
+
isRequired: false,
|
|
774
|
+
transformFunction: null
|
|
775
|
+
},
|
|
776
|
+
emptyLabel: {
|
|
777
|
+
classPropertyName: "emptyLabel",
|
|
778
|
+
publicName: "emptyLabel",
|
|
779
|
+
isSignal: true,
|
|
780
|
+
isRequired: false,
|
|
781
|
+
transformFunction: null
|
|
782
|
+
},
|
|
783
|
+
helperText: {
|
|
784
|
+
classPropertyName: "helperText",
|
|
785
|
+
publicName: "helperText",
|
|
786
|
+
isSignal: true,
|
|
787
|
+
isRequired: false,
|
|
788
|
+
transformFunction: null
|
|
789
|
+
},
|
|
790
|
+
name: {
|
|
791
|
+
classPropertyName: "name",
|
|
792
|
+
publicName: "name",
|
|
793
|
+
isSignal: true,
|
|
794
|
+
isRequired: false,
|
|
795
|
+
transformFunction: null
|
|
796
|
+
},
|
|
797
|
+
inputId: {
|
|
798
|
+
classPropertyName: "inputId",
|
|
799
|
+
publicName: "inputId",
|
|
800
|
+
isSignal: true,
|
|
801
|
+
isRequired: false,
|
|
802
|
+
transformFunction: null
|
|
803
|
+
},
|
|
804
|
+
inputAriaLabel: {
|
|
805
|
+
classPropertyName: "inputAriaLabel",
|
|
806
|
+
publicName: "inputAriaLabel",
|
|
807
|
+
isSignal: true,
|
|
808
|
+
isRequired: false,
|
|
809
|
+
transformFunction: null
|
|
810
|
+
},
|
|
811
|
+
fileListAriaLabel: {
|
|
812
|
+
classPropertyName: "fileListAriaLabel",
|
|
813
|
+
publicName: "fileListAriaLabel",
|
|
814
|
+
isSignal: true,
|
|
815
|
+
isRequired: false,
|
|
816
|
+
transformFunction: null
|
|
817
|
+
},
|
|
818
|
+
removeAriaLabel: {
|
|
819
|
+
classPropertyName: "removeAriaLabel",
|
|
820
|
+
publicName: "removeAriaLabel",
|
|
821
|
+
isSignal: true,
|
|
822
|
+
isRequired: false,
|
|
823
|
+
transformFunction: null
|
|
824
|
+
},
|
|
825
|
+
invalidFileTypeMessage: {
|
|
826
|
+
classPropertyName: "invalidFileTypeMessage",
|
|
827
|
+
publicName: "invalidFileTypeMessage",
|
|
828
|
+
isSignal: true,
|
|
829
|
+
isRequired: false,
|
|
830
|
+
transformFunction: null
|
|
831
|
+
},
|
|
832
|
+
invalidMinFileSizeMessage: {
|
|
833
|
+
classPropertyName: "invalidMinFileSizeMessage",
|
|
834
|
+
publicName: "invalidMinFileSizeMessage",
|
|
835
|
+
isSignal: true,
|
|
836
|
+
isRequired: false,
|
|
837
|
+
transformFunction: null
|
|
838
|
+
},
|
|
839
|
+
invalidMaxFileSizeMessage: {
|
|
840
|
+
classPropertyName: "invalidMaxFileSizeMessage",
|
|
841
|
+
publicName: "invalidMaxFileSizeMessage",
|
|
842
|
+
isSignal: true,
|
|
843
|
+
isRequired: false,
|
|
844
|
+
transformFunction: null
|
|
845
|
+
},
|
|
846
|
+
invalidFileLimitMessage: {
|
|
847
|
+
classPropertyName: "invalidFileLimitMessage",
|
|
848
|
+
publicName: "invalidFileLimitMessage",
|
|
849
|
+
isSignal: true,
|
|
850
|
+
isRequired: false,
|
|
851
|
+
transformFunction: null
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
outputs: {
|
|
855
|
+
files: "filesChange",
|
|
856
|
+
selected: "selected",
|
|
857
|
+
removed: "removed",
|
|
858
|
+
cleared: "cleared",
|
|
859
|
+
uploadRequested: "uploadRequested",
|
|
860
|
+
validationFailed: "validationFailed"
|
|
861
|
+
},
|
|
862
|
+
host: {
|
|
863
|
+
properties: {
|
|
864
|
+
"attr.data-mode": "mode()",
|
|
865
|
+
"attr.data-disabled": "disabled() || null",
|
|
866
|
+
"attr.data-drag-active": "dragActive() || null"
|
|
867
|
+
},
|
|
868
|
+
classAttribute: "aeris-file-upload"
|
|
869
|
+
},
|
|
870
|
+
queries: [
|
|
871
|
+
{
|
|
872
|
+
propertyName: "toolbarTemplate",
|
|
873
|
+
first: true,
|
|
874
|
+
predicate: AerisFileUploadToolbarTemplate,
|
|
875
|
+
descendants: true,
|
|
876
|
+
isSignal: true
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
propertyName: "contentTemplate",
|
|
880
|
+
first: true,
|
|
881
|
+
predicate: AerisFileUploadContentTemplate,
|
|
882
|
+
descendants: true,
|
|
883
|
+
isSignal: true
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
propertyName: "fileTemplate",
|
|
887
|
+
first: true,
|
|
888
|
+
predicate: AerisFileUploadFileTemplate,
|
|
889
|
+
descendants: true,
|
|
890
|
+
isSignal: true
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
propertyName: "emptyTemplate",
|
|
894
|
+
first: true,
|
|
895
|
+
predicate: AerisFileUploadEmptyTemplate,
|
|
896
|
+
descendants: true,
|
|
897
|
+
isSignal: true
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
propertyName: "chooseIconTemplate",
|
|
901
|
+
first: true,
|
|
902
|
+
predicate: AerisFileUploadChooseIconTemplate,
|
|
903
|
+
descendants: true,
|
|
904
|
+
isSignal: true
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
propertyName: "uploadIconTemplate",
|
|
908
|
+
first: true,
|
|
909
|
+
predicate: AerisFileUploadUploadIconTemplate,
|
|
910
|
+
descendants: true,
|
|
911
|
+
isSignal: true
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
propertyName: "clearIconTemplate",
|
|
915
|
+
first: true,
|
|
916
|
+
predicate: AerisFileUploadClearIconTemplate,
|
|
917
|
+
descendants: true,
|
|
918
|
+
isSignal: true
|
|
919
|
+
}
|
|
920
|
+
],
|
|
921
|
+
viewQueries: [{
|
|
922
|
+
propertyName: "fileInput",
|
|
923
|
+
first: true,
|
|
924
|
+
predicate: ["fileInput"],
|
|
925
|
+
descendants: true,
|
|
926
|
+
isSignal: true
|
|
927
|
+
}],
|
|
928
|
+
ngImport: i0,
|
|
929
|
+
template: `
|
|
487
930
|
<input
|
|
488
931
|
#fileInput
|
|
489
932
|
class="aeris-file-upload__input"
|
|
@@ -500,8 +943,9 @@ class AerisFileUpload {
|
|
|
500
943
|
@if (mode() === 'basic') {
|
|
501
944
|
<div class="aeris-file-upload__basic">
|
|
502
945
|
<button
|
|
946
|
+
aerisButton
|
|
503
947
|
type="button"
|
|
504
|
-
class="aeris-file-upload__button
|
|
948
|
+
class="aeris-file-upload__button"
|
|
505
949
|
[disabled]="disabled()"
|
|
506
950
|
(click)="choose($event)"
|
|
507
951
|
>
|
|
@@ -520,8 +964,11 @@ class AerisFileUpload {
|
|
|
520
964
|
<span class="aeris-file-upload__summary" aria-live="polite">{{ summaryText() }}</span>
|
|
521
965
|
@if (showUploadButton()) {
|
|
522
966
|
<button
|
|
967
|
+
aerisButton
|
|
523
968
|
type="button"
|
|
524
969
|
class="aeris-file-upload__button"
|
|
970
|
+
variant="outline"
|
|
971
|
+
severity="secondary"
|
|
525
972
|
[disabled]="!canUpload()"
|
|
526
973
|
(click)="upload($event)"
|
|
527
974
|
>
|
|
@@ -544,8 +991,9 @@ class AerisFileUpload {
|
|
|
544
991
|
} @else {
|
|
545
992
|
<div class="aeris-file-upload__actions">
|
|
546
993
|
<button
|
|
994
|
+
aerisButton
|
|
547
995
|
type="button"
|
|
548
|
-
class="aeris-file-upload__button
|
|
996
|
+
class="aeris-file-upload__button"
|
|
549
997
|
[disabled]="disabled()"
|
|
550
998
|
(click)="choose($event)"
|
|
551
999
|
>
|
|
@@ -564,8 +1012,11 @@ class AerisFileUpload {
|
|
|
564
1012
|
|
|
565
1013
|
@if (showUploadButton()) {
|
|
566
1014
|
<button
|
|
1015
|
+
aerisButton
|
|
567
1016
|
type="button"
|
|
568
1017
|
class="aeris-file-upload__button"
|
|
1018
|
+
variant="outline"
|
|
1019
|
+
severity="secondary"
|
|
569
1020
|
[disabled]="!canUpload()"
|
|
570
1021
|
(click)="upload($event)"
|
|
571
1022
|
>
|
|
@@ -585,8 +1036,11 @@ class AerisFileUpload {
|
|
|
585
1036
|
|
|
586
1037
|
@if (showClearButton()) {
|
|
587
1038
|
<button
|
|
1039
|
+
aerisButton
|
|
588
1040
|
type="button"
|
|
589
1041
|
class="aeris-file-upload__button"
|
|
1042
|
+
variant="outline"
|
|
1043
|
+
severity="secondary"
|
|
590
1044
|
[disabled]="!canClear()"
|
|
591
1045
|
(click)="clear($event, 'clear-button')"
|
|
592
1046
|
>
|
|
@@ -630,11 +1084,17 @@ class AerisFileUpload {
|
|
|
630
1084
|
>
|
|
631
1085
|
<span class="aeris-file-upload__drop-icon" aria-hidden="true"></span>
|
|
632
1086
|
<span [id]="labelId()" class="aeris-file-upload__drop-title">{{ dropLabel() }}</span>
|
|
633
|
-
<span [id]="helpId()" class="aeris-file-upload__drop-help">{{
|
|
1087
|
+
<span [id]="helpId()" class="aeris-file-upload__drop-help">{{
|
|
1088
|
+
resolvedHelpText()
|
|
1089
|
+
}}</span>
|
|
634
1090
|
</button>
|
|
635
1091
|
|
|
636
1092
|
@if (showFileList()) {
|
|
637
|
-
<div
|
|
1093
|
+
<div
|
|
1094
|
+
class="aeris-file-upload__list"
|
|
1095
|
+
role="list"
|
|
1096
|
+
[attr.aria-label]="fileListAriaLabel()"
|
|
1097
|
+
>
|
|
638
1098
|
@for (item of items(); track item.id) {
|
|
639
1099
|
@if (fileTemplate(); as fileTemplateRef) {
|
|
640
1100
|
<ng-container
|
|
@@ -642,9 +1102,19 @@ class AerisFileUpload {
|
|
|
642
1102
|
[ngTemplateOutletContext]="fileContexts()[item.id]"
|
|
643
1103
|
/>
|
|
644
1104
|
} @else {
|
|
645
|
-
<article
|
|
1105
|
+
<article
|
|
1106
|
+
class="aeris-file-upload__file"
|
|
1107
|
+
animate.enter="aeris-file-upload__file--enter"
|
|
1108
|
+
animate.leave="aeris-file-upload__file--leave"
|
|
1109
|
+
role="listitem"
|
|
1110
|
+
[attr.data-status]="item.status"
|
|
1111
|
+
>
|
|
646
1112
|
@if (imagePreview() && item.image && item.previewUrl) {
|
|
647
|
-
<img
|
|
1113
|
+
<img
|
|
1114
|
+
class="aeris-file-upload__preview"
|
|
1115
|
+
[src]="item.previewUrl"
|
|
1116
|
+
[alt]="'Preview of ' + item.name"
|
|
1117
|
+
/>
|
|
648
1118
|
} @else {
|
|
649
1119
|
<span class="aeris-file-upload__file-icon" aria-hidden="true"></span>
|
|
650
1120
|
}
|
|
@@ -709,11 +1179,49 @@ class AerisFileUpload {
|
|
|
709
1179
|
}
|
|
710
1180
|
</section>
|
|
711
1181
|
}
|
|
712
|
-
`,
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
1182
|
+
`,
|
|
1183
|
+
isInline: true,
|
|
1184
|
+
styles: [":host{display:block;color:var(--aeris-file-upload-text, var(--aeris-text, #111111))}.aeris-file-upload__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap}.aeris-file-upload__surface,.aeris-file-upload__basic{border:1px solid var(--aeris-file-upload-border, var(--aeris-border));border-radius:var(--aeris-file-upload-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:var(--aeris-file-upload-background, var(--aeris-surface, #fff));box-shadow:var(--aeris-file-upload-shadow, var(--aeris-shadow-xs, 0 1px 2px rgba(0, 0, 0, .1)))}.aeris-file-upload__basic{display:flex;flex-wrap:wrap;align-items:center;gap:.625rem;padding:var(--aeris-file-upload-basic-padding, .75rem)}.aeris-file-upload__toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;padding:var(--aeris-file-upload-toolbar-padding, var(--aeris-overlay-padding, .375rem));border-bottom:1px solid var(--aeris-file-upload-border, var(--aeris-border))}.aeris-file-upload__actions{display:flex;flex-wrap:wrap;gap:.5rem}.aeris-file-upload__dropzone:focus-visible,.aeris-file-upload__remove:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-file-upload-focus, var(--aeris-focus, #111111));outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-file-upload__dropzone:disabled,.aeris-file-upload__remove:disabled{opacity:.56;cursor:not-allowed}.aeris-file-upload__button-icon{display:inline-flex;width:1rem;height:1rem;align-items:center;justify-content:center}.aeris-file-upload__summary{color:var(--aeris-file-upload-muted-text, var(--aeris-text-3, #6f7667));font-size:var(--aeris-font-size-md, .8125rem);font-weight:var(--aeris-font-weight-bold, 700)}.aeris-file-upload__dropzone{width:calc(100% - 1.75rem);min-height:var(--aeris-file-upload-dropzone-min-height, 10rem);display:grid;place-items:center;gap:.45rem;margin:.875rem;padding:1.5rem;border:1px dashed var(--aeris-file-upload-dropzone-border, var(--aeris-border, #efefef));border-radius:var(--aeris-file-upload-dropzone-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:linear-gradient(135deg,color-mix(in srgb,var(--aeris-primary, #6f8f3d) 6%,transparent),transparent),var(--aeris-file-upload-dropzone-background, var(--aeris-surface-2, #f3f3f3));color:inherit;font:inherit;text-align:center;cursor:pointer;transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-file-upload__dropzone[data-active=true]{border-color:var(--aeris-file-upload-dropzone-active-border, var(--aeris-primary, #6f8f3d));background:linear-gradient(135deg,color-mix(in srgb,var(--aeris-primary, #6f8f3d) 14%,transparent),transparent),var(--aeris-file-upload-dropzone-active-background, var(--aeris-surface, #fff));transform:translateY(-1px)}.aeris-file-upload__dropzone[data-reject=true]{border-color:var(--aeris-danger, #c81e2a)}.aeris-file-upload__drop-title{font-size:var(--aeris-font-size-2xl, 1rem);font-weight:var(--aeris-font-weight-bold, 700)}.aeris-file-upload__drop-help,.aeris-file-upload__empty,.aeris-file-upload__file-size{color:var(--aeris-file-upload-muted-text, var(--aeris-text-3, #6f7667));font-size:var(--aeris-font-size-md, .8125rem)}.aeris-file-upload__list{display:grid;gap:.625rem;padding:0 .875rem .875rem}.aeris-file-upload__file{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;min-width:0;padding:.75rem;border:1px solid var(--aeris-file-upload-file-border, var(--aeris-border));border-radius:var(--aeris-file-upload-file-radius, var(--aeris-radius-md, .625rem));background:var(--aeris-file-upload-file-background, var(--aeris-surface, #fff));opacity:1;transform:translateY(0);transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),opacity var(--aeris-motion-normal, .15s) var(--aeris-ease-enter, ease-out),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-enter, ease-out)}.aeris-file-upload__file--enter{animation:aeris-file-upload-file-enter var(--aeris-motion-normal, .15s) var(--aeris-ease-enter, ease-out) both}.aeris-file-upload__file--leave{animation:aeris-file-upload-file-leave var(--aeris-motion-fast, .1s) var(--aeris-ease-exit, ease-in) both}.aeris-file-upload__file[data-status=uploaded]{border-color:color-mix(in srgb,var(--aeris-success, #4f8f54) 34%,var(--aeris-border, #efefef))}.aeris-file-upload__file[data-status=error]{border-color:color-mix(in srgb,var(--aeris-danger, #c81e2a) 42%,var(--aeris-border, #efefef))}.aeris-file-upload__preview,.aeris-file-upload__file-icon{width:3rem;height:3rem;border-radius:var(--aeris-radius-md, .625rem)}.aeris-file-upload__preview{display:block;object-fit:cover;background:var(--aeris-surface-2, #f3f3f3)}.aeris-file-upload__file-icon{position:relative;display:inline-grid;place-items:center;border:1px solid var(--aeris-file-upload-border, var(--aeris-border, #efefef));background:var(--aeris-surface-2, #f3f3f3)}.aeris-file-upload__file-icon:before{width:1.2rem;height:1.45rem;border:2px solid currentColor;border-radius:.18rem;color:var(--aeris-text-3, #6f7667);content:\"\"}.aeris-file-upload__file-body{min-width:0;display:grid;gap:.35rem}.aeris-file-upload__file-heading{min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:.45rem .75rem}.aeris-file-upload__file-name{min-width:0;overflow:hidden;color:var(--aeris-file-upload-text, var(--aeris-text, #111111));font-weight:var(--aeris-font-weight-bold, 700);text-overflow:ellipsis;white-space:nowrap}.aeris-file-upload__file-error{margin:0;color:var(--aeris-danger-text, #a31722);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-file-upload__progress{height:.45rem;overflow:hidden;border-radius:var(--aeris-radius-pill, 999px);background:color-mix(in srgb,var(--aeris-primary, #6f8f3d) 14%,transparent)}.aeris-file-upload__progress span{display:block;height:100%;border-radius:inherit;background:var(--aeris-file-upload-progress-background, var(--aeris-primary, #6f8f3d));transition:width var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-file-upload__remove{position:relative;width:2rem;height:2rem;display:inline-grid;place-items:center;border:1px solid transparent;border-radius:var(--aeris-radius-pill, 999px);background:transparent;color:var(--aeris-text-3, #6f7667);cursor:pointer}@media(hover:hover){.aeris-file-upload__remove:hover:not(:disabled){border-color:var(--aeris-file-upload-border, var(--aeris-border, #efefef));background:var(--aeris-surface-2, #f3f3f3);color:var(--aeris-danger-text, #a31722)}}.aeris-file-upload__remove span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-file-upload__errors{display:grid;gap:.25rem;margin:0 .875rem .875rem;padding:.75rem;border:1px solid color-mix(in srgb,var(--aeris-danger, #c81e2a) 36%,transparent);border-radius:var(--aeris-radius-md, .625rem);background:color-mix(in srgb,var(--aeris-danger, #c81e2a) 8%,transparent);color:var(--aeris-danger-text, #a31722);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-file-upload__errors p{margin:0}.aeris-file-upload__empty{padding:.75rem;text-align:center}.aeris-file-upload__icon,.aeris-file-upload__drop-icon{display:inline-block;flex:0 0 auto;background:currentColor;color:currentColor}.aeris-file-upload__icon--choose,.aeris-file-upload__icon--upload{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem)}.aeris-file-upload__icon--choose{-webkit-mask:var(--aeris-icon-plus) center/100% 100% no-repeat;mask:var(--aeris-icon-plus) center/100% 100% no-repeat}.aeris-file-upload__icon--upload{-webkit-mask:var(--aeris-icon-upload) center/100% 100% no-repeat;mask:var(--aeris-icon-upload) center/100% 100% no-repeat}.aeris-file-upload__icon--clear{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-file-upload__drop-icon{width:2rem;height:2rem;color:var(--aeris-primary, #6f8f3d);-webkit-mask:var(--aeris-icon-upload) center/100% 100% no-repeat;mask:var(--aeris-icon-upload) center/100% 100% no-repeat}@media(max-width:40rem){.aeris-file-upload__toolbar,.aeris-file-upload__actions,.aeris-file-upload__basic{align-items:stretch}.aeris-file-upload__toolbar,.aeris-file-upload__actions{flex-direction:column}.aeris-file-upload__button,.aeris-file-upload__summary{width:100%}.aeris-file-upload__file{grid-template-columns:minmax(0,1fr) auto}.aeris-file-upload__preview,.aeris-file-upload__file-icon{display:none}}@media(prefers-reduced-motion:reduce){.aeris-file-upload__dropzone,.aeris-file-upload__progress span,.aeris-file-upload__file{transition:none}.aeris-file-upload__file--enter,.aeris-file-upload__file--leave{animation:none}}@keyframes aeris-file-upload-file-enter{0%{opacity:0;transform:translateY(var(--aeris-motion-distance, .25rem))}}@keyframes aeris-file-upload-file-leave{to{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1))}}\n"],
|
|
1185
|
+
dependencies: [{
|
|
1186
|
+
kind: "component",
|
|
1187
|
+
type: AerisButtonDirective,
|
|
1188
|
+
selector: "button[aerisButton], a[aerisButton]",
|
|
1189
|
+
inputs: [
|
|
1190
|
+
"variant",
|
|
1191
|
+
"size",
|
|
1192
|
+
"severity",
|
|
1193
|
+
"iconPosition",
|
|
1194
|
+
"loading",
|
|
1195
|
+
"disabled",
|
|
1196
|
+
"showSpinner",
|
|
1197
|
+
"iconOnly",
|
|
1198
|
+
"raised",
|
|
1199
|
+
"rounded",
|
|
1200
|
+
"fluid"
|
|
1201
|
+
]
|
|
1202
|
+
}, {
|
|
1203
|
+
kind: "directive",
|
|
1204
|
+
type: NgTemplateOutlet,
|
|
1205
|
+
selector: "[ngTemplateOutlet]",
|
|
1206
|
+
inputs: [
|
|
1207
|
+
"ngTemplateOutletContext",
|
|
1208
|
+
"ngTemplateOutlet",
|
|
1209
|
+
"ngTemplateOutletInjector"
|
|
1210
|
+
]
|
|
1211
|
+
}]
|
|
1212
|
+
});
|
|
1213
|
+
};
|
|
1214
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1215
|
+
minVersion: "12.0.0",
|
|
1216
|
+
version: "22.2.2",
|
|
1217
|
+
ngImport: i0,
|
|
1218
|
+
type: AerisFileUpload,
|
|
1219
|
+
decorators: [{
|
|
1220
|
+
type: Component,
|
|
1221
|
+
args: [{
|
|
1222
|
+
selector: "aeris-file-upload",
|
|
1223
|
+
imports: [AerisButtonDirective, NgTemplateOutlet],
|
|
1224
|
+
template: `
|
|
717
1225
|
<input
|
|
718
1226
|
#fileInput
|
|
719
1227
|
class="aeris-file-upload__input"
|
|
@@ -730,8 +1238,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
730
1238
|
@if (mode() === 'basic') {
|
|
731
1239
|
<div class="aeris-file-upload__basic">
|
|
732
1240
|
<button
|
|
1241
|
+
aerisButton
|
|
733
1242
|
type="button"
|
|
734
|
-
class="aeris-file-upload__button
|
|
1243
|
+
class="aeris-file-upload__button"
|
|
735
1244
|
[disabled]="disabled()"
|
|
736
1245
|
(click)="choose($event)"
|
|
737
1246
|
>
|
|
@@ -750,8 +1259,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
750
1259
|
<span class="aeris-file-upload__summary" aria-live="polite">{{ summaryText() }}</span>
|
|
751
1260
|
@if (showUploadButton()) {
|
|
752
1261
|
<button
|
|
1262
|
+
aerisButton
|
|
753
1263
|
type="button"
|
|
754
1264
|
class="aeris-file-upload__button"
|
|
1265
|
+
variant="outline"
|
|
1266
|
+
severity="secondary"
|
|
755
1267
|
[disabled]="!canUpload()"
|
|
756
1268
|
(click)="upload($event)"
|
|
757
1269
|
>
|
|
@@ -774,8 +1286,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
774
1286
|
} @else {
|
|
775
1287
|
<div class="aeris-file-upload__actions">
|
|
776
1288
|
<button
|
|
1289
|
+
aerisButton
|
|
777
1290
|
type="button"
|
|
778
|
-
class="aeris-file-upload__button
|
|
1291
|
+
class="aeris-file-upload__button"
|
|
779
1292
|
[disabled]="disabled()"
|
|
780
1293
|
(click)="choose($event)"
|
|
781
1294
|
>
|
|
@@ -794,8 +1307,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
794
1307
|
|
|
795
1308
|
@if (showUploadButton()) {
|
|
796
1309
|
<button
|
|
1310
|
+
aerisButton
|
|
797
1311
|
type="button"
|
|
798
1312
|
class="aeris-file-upload__button"
|
|
1313
|
+
variant="outline"
|
|
1314
|
+
severity="secondary"
|
|
799
1315
|
[disabled]="!canUpload()"
|
|
800
1316
|
(click)="upload($event)"
|
|
801
1317
|
>
|
|
@@ -815,8 +1331,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
815
1331
|
|
|
816
1332
|
@if (showClearButton()) {
|
|
817
1333
|
<button
|
|
1334
|
+
aerisButton
|
|
818
1335
|
type="button"
|
|
819
1336
|
class="aeris-file-upload__button"
|
|
1337
|
+
variant="outline"
|
|
1338
|
+
severity="secondary"
|
|
820
1339
|
[disabled]="!canClear()"
|
|
821
1340
|
(click)="clear($event, 'clear-button')"
|
|
822
1341
|
>
|
|
@@ -860,11 +1379,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
860
1379
|
>
|
|
861
1380
|
<span class="aeris-file-upload__drop-icon" aria-hidden="true"></span>
|
|
862
1381
|
<span [id]="labelId()" class="aeris-file-upload__drop-title">{{ dropLabel() }}</span>
|
|
863
|
-
<span [id]="helpId()" class="aeris-file-upload__drop-help">{{
|
|
1382
|
+
<span [id]="helpId()" class="aeris-file-upload__drop-help">{{
|
|
1383
|
+
resolvedHelpText()
|
|
1384
|
+
}}</span>
|
|
864
1385
|
</button>
|
|
865
1386
|
|
|
866
1387
|
@if (showFileList()) {
|
|
867
|
-
<div
|
|
1388
|
+
<div
|
|
1389
|
+
class="aeris-file-upload__list"
|
|
1390
|
+
role="list"
|
|
1391
|
+
[attr.aria-label]="fileListAriaLabel()"
|
|
1392
|
+
>
|
|
868
1393
|
@for (item of items(); track item.id) {
|
|
869
1394
|
@if (fileTemplate(); as fileTemplateRef) {
|
|
870
1395
|
<ng-container
|
|
@@ -872,9 +1397,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
872
1397
|
[ngTemplateOutletContext]="fileContexts()[item.id]"
|
|
873
1398
|
/>
|
|
874
1399
|
} @else {
|
|
875
|
-
<article
|
|
1400
|
+
<article
|
|
1401
|
+
class="aeris-file-upload__file"
|
|
1402
|
+
animate.enter="aeris-file-upload__file--enter"
|
|
1403
|
+
animate.leave="aeris-file-upload__file--leave"
|
|
1404
|
+
role="listitem"
|
|
1405
|
+
[attr.data-status]="item.status"
|
|
1406
|
+
>
|
|
876
1407
|
@if (imagePreview() && item.image && item.previewUrl) {
|
|
877
|
-
<img
|
|
1408
|
+
<img
|
|
1409
|
+
class="aeris-file-upload__preview"
|
|
1410
|
+
[src]="item.previewUrl"
|
|
1411
|
+
[alt]="'Preview of ' + item.name"
|
|
1412
|
+
/>
|
|
878
1413
|
} @else {
|
|
879
1414
|
<span class="aeris-file-upload__file-icon" aria-hidden="true"></span>
|
|
880
1415
|
}
|
|
@@ -939,27 +1474,349 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
939
1474
|
}
|
|
940
1475
|
</section>
|
|
941
1476
|
}
|
|
942
|
-
`,
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
1477
|
+
`,
|
|
1478
|
+
host: {
|
|
1479
|
+
class: "aeris-file-upload",
|
|
1480
|
+
"[attr.data-mode]": "mode()",
|
|
1481
|
+
"[attr.data-disabled]": "disabled() || null",
|
|
1482
|
+
"[attr.data-drag-active]": "dragActive() || null"
|
|
1483
|
+
},
|
|
1484
|
+
styles: [":host{display:block;color:var(--aeris-file-upload-text, var(--aeris-text, #111111))}.aeris-file-upload__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap}.aeris-file-upload__surface,.aeris-file-upload__basic{border:1px solid var(--aeris-file-upload-border, var(--aeris-border));border-radius:var(--aeris-file-upload-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:var(--aeris-file-upload-background, var(--aeris-surface, #fff));box-shadow:var(--aeris-file-upload-shadow, var(--aeris-shadow-xs, 0 1px 2px rgba(0, 0, 0, .1)))}.aeris-file-upload__basic{display:flex;flex-wrap:wrap;align-items:center;gap:.625rem;padding:var(--aeris-file-upload-basic-padding, .75rem)}.aeris-file-upload__toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;padding:var(--aeris-file-upload-toolbar-padding, var(--aeris-overlay-padding, .375rem));border-bottom:1px solid var(--aeris-file-upload-border, var(--aeris-border))}.aeris-file-upload__actions{display:flex;flex-wrap:wrap;gap:.5rem}.aeris-file-upload__dropzone:focus-visible,.aeris-file-upload__remove:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-file-upload-focus, var(--aeris-focus, #111111));outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-file-upload__dropzone:disabled,.aeris-file-upload__remove:disabled{opacity:.56;cursor:not-allowed}.aeris-file-upload__button-icon{display:inline-flex;width:1rem;height:1rem;align-items:center;justify-content:center}.aeris-file-upload__summary{color:var(--aeris-file-upload-muted-text, var(--aeris-text-3, #6f7667));font-size:var(--aeris-font-size-md, .8125rem);font-weight:var(--aeris-font-weight-bold, 700)}.aeris-file-upload__dropzone{width:calc(100% - 1.75rem);min-height:var(--aeris-file-upload-dropzone-min-height, 10rem);display:grid;place-items:center;gap:.45rem;margin:.875rem;padding:1.5rem;border:1px dashed var(--aeris-file-upload-dropzone-border, var(--aeris-border, #efefef));border-radius:var(--aeris-file-upload-dropzone-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:linear-gradient(135deg,color-mix(in srgb,var(--aeris-primary, #6f8f3d) 6%,transparent),transparent),var(--aeris-file-upload-dropzone-background, var(--aeris-surface-2, #f3f3f3));color:inherit;font:inherit;text-align:center;cursor:pointer;transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),background var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-file-upload__dropzone[data-active=true]{border-color:var(--aeris-file-upload-dropzone-active-border, var(--aeris-primary, #6f8f3d));background:linear-gradient(135deg,color-mix(in srgb,var(--aeris-primary, #6f8f3d) 14%,transparent),transparent),var(--aeris-file-upload-dropzone-active-background, var(--aeris-surface, #fff));transform:translateY(-1px)}.aeris-file-upload__dropzone[data-reject=true]{border-color:var(--aeris-danger, #c81e2a)}.aeris-file-upload__drop-title{font-size:var(--aeris-font-size-2xl, 1rem);font-weight:var(--aeris-font-weight-bold, 700)}.aeris-file-upload__drop-help,.aeris-file-upload__empty,.aeris-file-upload__file-size{color:var(--aeris-file-upload-muted-text, var(--aeris-text-3, #6f7667));font-size:var(--aeris-font-size-md, .8125rem)}.aeris-file-upload__list{display:grid;gap:.625rem;padding:0 .875rem .875rem}.aeris-file-upload__file{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;min-width:0;padding:.75rem;border:1px solid var(--aeris-file-upload-file-border, var(--aeris-border));border-radius:var(--aeris-file-upload-file-radius, var(--aeris-radius-md, .625rem));background:var(--aeris-file-upload-file-background, var(--aeris-surface, #fff));opacity:1;transform:translateY(0);transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),opacity var(--aeris-motion-normal, .15s) var(--aeris-ease-enter, ease-out),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-enter, ease-out)}.aeris-file-upload__file--enter{animation:aeris-file-upload-file-enter var(--aeris-motion-normal, .15s) var(--aeris-ease-enter, ease-out) both}.aeris-file-upload__file--leave{animation:aeris-file-upload-file-leave var(--aeris-motion-fast, .1s) var(--aeris-ease-exit, ease-in) both}.aeris-file-upload__file[data-status=uploaded]{border-color:color-mix(in srgb,var(--aeris-success, #4f8f54) 34%,var(--aeris-border, #efefef))}.aeris-file-upload__file[data-status=error]{border-color:color-mix(in srgb,var(--aeris-danger, #c81e2a) 42%,var(--aeris-border, #efefef))}.aeris-file-upload__preview,.aeris-file-upload__file-icon{width:3rem;height:3rem;border-radius:var(--aeris-radius-md, .625rem)}.aeris-file-upload__preview{display:block;object-fit:cover;background:var(--aeris-surface-2, #f3f3f3)}.aeris-file-upload__file-icon{position:relative;display:inline-grid;place-items:center;border:1px solid var(--aeris-file-upload-border, var(--aeris-border, #efefef));background:var(--aeris-surface-2, #f3f3f3)}.aeris-file-upload__file-icon:before{width:1.2rem;height:1.45rem;border:2px solid currentColor;border-radius:.18rem;color:var(--aeris-text-3, #6f7667);content:\"\"}.aeris-file-upload__file-body{min-width:0;display:grid;gap:.35rem}.aeris-file-upload__file-heading{min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:.45rem .75rem}.aeris-file-upload__file-name{min-width:0;overflow:hidden;color:var(--aeris-file-upload-text, var(--aeris-text, #111111));font-weight:var(--aeris-font-weight-bold, 700);text-overflow:ellipsis;white-space:nowrap}.aeris-file-upload__file-error{margin:0;color:var(--aeris-danger-text, #a31722);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-file-upload__progress{height:.45rem;overflow:hidden;border-radius:var(--aeris-radius-pill, 999px);background:color-mix(in srgb,var(--aeris-primary, #6f8f3d) 14%,transparent)}.aeris-file-upload__progress span{display:block;height:100%;border-radius:inherit;background:var(--aeris-file-upload-progress-background, var(--aeris-primary, #6f8f3d));transition:width var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-file-upload__remove{position:relative;width:2rem;height:2rem;display:inline-grid;place-items:center;border:1px solid transparent;border-radius:var(--aeris-radius-pill, 999px);background:transparent;color:var(--aeris-text-3, #6f7667);cursor:pointer}@media(hover:hover){.aeris-file-upload__remove:hover:not(:disabled){border-color:var(--aeris-file-upload-border, var(--aeris-border, #efefef));background:var(--aeris-surface-2, #f3f3f3);color:var(--aeris-danger-text, #a31722)}}.aeris-file-upload__remove span{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-file-upload__errors{display:grid;gap:.25rem;margin:0 .875rem .875rem;padding:.75rem;border:1px solid color-mix(in srgb,var(--aeris-danger, #c81e2a) 36%,transparent);border-radius:var(--aeris-radius-md, .625rem);background:color-mix(in srgb,var(--aeris-danger, #c81e2a) 8%,transparent);color:var(--aeris-danger-text, #a31722);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-file-upload__errors p{margin:0}.aeris-file-upload__empty{padding:.75rem;text-align:center}.aeris-file-upload__icon,.aeris-file-upload__drop-icon{display:inline-block;flex:0 0 auto;background:currentColor;color:currentColor}.aeris-file-upload__icon--choose,.aeris-file-upload__icon--upload{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem)}.aeris-file-upload__icon--choose{-webkit-mask:var(--aeris-icon-plus) center/100% 100% no-repeat;mask:var(--aeris-icon-plus) center/100% 100% no-repeat}.aeris-file-upload__icon--upload{-webkit-mask:var(--aeris-icon-upload) center/100% 100% no-repeat;mask:var(--aeris-icon-upload) center/100% 100% no-repeat}.aeris-file-upload__icon--clear{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-file-upload__drop-icon{width:2rem;height:2rem;color:var(--aeris-primary, #6f8f3d);-webkit-mask:var(--aeris-icon-upload) center/100% 100% no-repeat;mask:var(--aeris-icon-upload) center/100% 100% no-repeat}@media(max-width:40rem){.aeris-file-upload__toolbar,.aeris-file-upload__actions,.aeris-file-upload__basic{align-items:stretch}.aeris-file-upload__toolbar,.aeris-file-upload__actions{flex-direction:column}.aeris-file-upload__button,.aeris-file-upload__summary{width:100%}.aeris-file-upload__file{grid-template-columns:minmax(0,1fr) auto}.aeris-file-upload__preview,.aeris-file-upload__file-icon{display:none}}@media(prefers-reduced-motion:reduce){.aeris-file-upload__dropzone,.aeris-file-upload__progress span,.aeris-file-upload__file{transition:none}.aeris-file-upload__file--enter,.aeris-file-upload__file--leave{animation:none}}@keyframes aeris-file-upload-file-enter{0%{opacity:0;transform:translateY(var(--aeris-motion-distance, .25rem))}}@keyframes aeris-file-upload-file-leave{to{opacity:0;transform:translateY(calc(var(--aeris-motion-distance, .25rem) * -1))}}\n"]
|
|
1485
|
+
}]
|
|
1486
|
+
}],
|
|
1487
|
+
ctorParameters: () => [],
|
|
1488
|
+
propDecorators: {
|
|
1489
|
+
fileInput: [{
|
|
1490
|
+
type: i0.ViewChild,
|
|
1491
|
+
args: ["fileInput", { isSignal: true }]
|
|
1492
|
+
}],
|
|
1493
|
+
toolbarTemplate: [{
|
|
1494
|
+
type: i0.ContentChild,
|
|
1495
|
+
args: [i0.forwardRef(() => AerisFileUploadToolbarTemplate), { isSignal: true }]
|
|
1496
|
+
}],
|
|
1497
|
+
contentTemplate: [{
|
|
1498
|
+
type: i0.ContentChild,
|
|
1499
|
+
args: [i0.forwardRef(() => AerisFileUploadContentTemplate), { isSignal: true }]
|
|
1500
|
+
}],
|
|
1501
|
+
fileTemplate: [{
|
|
1502
|
+
type: i0.ContentChild,
|
|
1503
|
+
args: [i0.forwardRef(() => AerisFileUploadFileTemplate), { isSignal: true }]
|
|
1504
|
+
}],
|
|
1505
|
+
emptyTemplate: [{
|
|
1506
|
+
type: i0.ContentChild,
|
|
1507
|
+
args: [i0.forwardRef(() => AerisFileUploadEmptyTemplate), { isSignal: true }]
|
|
1508
|
+
}],
|
|
1509
|
+
chooseIconTemplate: [{
|
|
1510
|
+
type: i0.ContentChild,
|
|
1511
|
+
args: [i0.forwardRef(() => AerisFileUploadChooseIconTemplate), { isSignal: true }]
|
|
1512
|
+
}],
|
|
1513
|
+
uploadIconTemplate: [{
|
|
1514
|
+
type: i0.ContentChild,
|
|
1515
|
+
args: [i0.forwardRef(() => AerisFileUploadUploadIconTemplate), { isSignal: true }]
|
|
1516
|
+
}],
|
|
1517
|
+
clearIconTemplate: [{
|
|
1518
|
+
type: i0.ContentChild,
|
|
1519
|
+
args: [i0.forwardRef(() => AerisFileUploadClearIconTemplate), { isSignal: true }]
|
|
1520
|
+
}],
|
|
1521
|
+
files: [{
|
|
1522
|
+
type: i0.Input,
|
|
1523
|
+
args: [{
|
|
1524
|
+
isSignal: true,
|
|
1525
|
+
alias: "files",
|
|
1526
|
+
required: false
|
|
1527
|
+
}]
|
|
1528
|
+
}, {
|
|
1529
|
+
type: i0.Output,
|
|
1530
|
+
args: ["filesChange"]
|
|
1531
|
+
}],
|
|
1532
|
+
mode: [{
|
|
1533
|
+
type: i0.Input,
|
|
1534
|
+
args: [{
|
|
1535
|
+
isSignal: true,
|
|
1536
|
+
alias: "mode",
|
|
1537
|
+
required: false
|
|
1538
|
+
}]
|
|
1539
|
+
}],
|
|
1540
|
+
multiple: [{
|
|
1541
|
+
type: i0.Input,
|
|
1542
|
+
args: [{
|
|
1543
|
+
isSignal: true,
|
|
1544
|
+
alias: "multiple",
|
|
1545
|
+
required: false
|
|
1546
|
+
}]
|
|
1547
|
+
}],
|
|
1548
|
+
accept: [{
|
|
1549
|
+
type: i0.Input,
|
|
1550
|
+
args: [{
|
|
1551
|
+
isSignal: true,
|
|
1552
|
+
alias: "accept",
|
|
1553
|
+
required: false
|
|
1554
|
+
}]
|
|
1555
|
+
}],
|
|
1556
|
+
minFileSize: [{
|
|
1557
|
+
type: i0.Input,
|
|
1558
|
+
args: [{
|
|
1559
|
+
isSignal: true,
|
|
1560
|
+
alias: "minFileSize",
|
|
1561
|
+
required: false
|
|
1562
|
+
}]
|
|
1563
|
+
}],
|
|
1564
|
+
maxFileSize: [{
|
|
1565
|
+
type: i0.Input,
|
|
1566
|
+
args: [{
|
|
1567
|
+
isSignal: true,
|
|
1568
|
+
alias: "maxFileSize",
|
|
1569
|
+
required: false
|
|
1570
|
+
}]
|
|
1571
|
+
}],
|
|
1572
|
+
maxPreviewFileSize: [{
|
|
1573
|
+
type: i0.Input,
|
|
1574
|
+
args: [{
|
|
1575
|
+
isSignal: true,
|
|
1576
|
+
alias: "maxPreviewFileSize",
|
|
1577
|
+
required: false
|
|
1578
|
+
}]
|
|
1579
|
+
}],
|
|
1580
|
+
maxFiles: [{
|
|
1581
|
+
type: i0.Input,
|
|
1582
|
+
args: [{
|
|
1583
|
+
isSignal: true,
|
|
1584
|
+
alias: "maxFiles",
|
|
1585
|
+
required: false
|
|
1586
|
+
}]
|
|
1587
|
+
}],
|
|
1588
|
+
disabled: [{
|
|
1589
|
+
type: i0.Input,
|
|
1590
|
+
args: [{
|
|
1591
|
+
isSignal: true,
|
|
1592
|
+
alias: "disabled",
|
|
1593
|
+
required: false
|
|
1594
|
+
}]
|
|
1595
|
+
}],
|
|
1596
|
+
autoUpload: [{
|
|
1597
|
+
type: i0.Input,
|
|
1598
|
+
args: [{
|
|
1599
|
+
isSignal: true,
|
|
1600
|
+
alias: "autoUpload",
|
|
1601
|
+
required: false
|
|
1602
|
+
}]
|
|
1603
|
+
}],
|
|
1604
|
+
customUpload: [{
|
|
1605
|
+
type: i0.Input,
|
|
1606
|
+
args: [{
|
|
1607
|
+
isSignal: true,
|
|
1608
|
+
alias: "customUpload",
|
|
1609
|
+
required: false
|
|
1610
|
+
}]
|
|
1611
|
+
}],
|
|
1612
|
+
dragDrop: [{
|
|
1613
|
+
type: i0.Input,
|
|
1614
|
+
args: [{
|
|
1615
|
+
isSignal: true,
|
|
1616
|
+
alias: "dragDrop",
|
|
1617
|
+
required: false
|
|
1618
|
+
}]
|
|
1619
|
+
}],
|
|
1620
|
+
imagePreview: [{
|
|
1621
|
+
type: i0.Input,
|
|
1622
|
+
args: [{
|
|
1623
|
+
isSignal: true,
|
|
1624
|
+
alias: "imagePreview",
|
|
1625
|
+
required: false
|
|
1626
|
+
}]
|
|
1627
|
+
}],
|
|
1628
|
+
showFileList: [{
|
|
1629
|
+
type: i0.Input,
|
|
1630
|
+
args: [{
|
|
1631
|
+
isSignal: true,
|
|
1632
|
+
alias: "showFileList",
|
|
1633
|
+
required: false
|
|
1634
|
+
}]
|
|
1635
|
+
}],
|
|
1636
|
+
showProgress: [{
|
|
1637
|
+
type: i0.Input,
|
|
1638
|
+
args: [{
|
|
1639
|
+
isSignal: true,
|
|
1640
|
+
alias: "showProgress",
|
|
1641
|
+
required: false
|
|
1642
|
+
}]
|
|
1643
|
+
}],
|
|
1644
|
+
showSize: [{
|
|
1645
|
+
type: i0.Input,
|
|
1646
|
+
args: [{
|
|
1647
|
+
isSignal: true,
|
|
1648
|
+
alias: "showSize",
|
|
1649
|
+
required: false
|
|
1650
|
+
}]
|
|
1651
|
+
}],
|
|
1652
|
+
showUploadButton: [{
|
|
1653
|
+
type: i0.Input,
|
|
1654
|
+
args: [{
|
|
1655
|
+
isSignal: true,
|
|
1656
|
+
alias: "showUploadButton",
|
|
1657
|
+
required: false
|
|
1658
|
+
}]
|
|
1659
|
+
}],
|
|
1660
|
+
showClearButton: [{
|
|
1661
|
+
type: i0.Input,
|
|
1662
|
+
args: [{
|
|
1663
|
+
isSignal: true,
|
|
1664
|
+
alias: "showClearButton",
|
|
1665
|
+
required: false
|
|
1666
|
+
}]
|
|
1667
|
+
}],
|
|
1668
|
+
chooseLabel: [{
|
|
1669
|
+
type: i0.Input,
|
|
1670
|
+
args: [{
|
|
1671
|
+
isSignal: true,
|
|
1672
|
+
alias: "chooseLabel",
|
|
1673
|
+
required: false
|
|
1674
|
+
}]
|
|
1675
|
+
}],
|
|
1676
|
+
uploadLabel: [{
|
|
1677
|
+
type: i0.Input,
|
|
1678
|
+
args: [{
|
|
1679
|
+
isSignal: true,
|
|
1680
|
+
alias: "uploadLabel",
|
|
1681
|
+
required: false
|
|
1682
|
+
}]
|
|
1683
|
+
}],
|
|
1684
|
+
clearLabel: [{
|
|
1685
|
+
type: i0.Input,
|
|
1686
|
+
args: [{
|
|
1687
|
+
isSignal: true,
|
|
1688
|
+
alias: "clearLabel",
|
|
1689
|
+
required: false
|
|
1690
|
+
}]
|
|
1691
|
+
}],
|
|
1692
|
+
dropLabel: [{
|
|
1693
|
+
type: i0.Input,
|
|
1694
|
+
args: [{
|
|
1695
|
+
isSignal: true,
|
|
1696
|
+
alias: "dropLabel",
|
|
1697
|
+
required: false
|
|
1698
|
+
}]
|
|
1699
|
+
}],
|
|
1700
|
+
emptyLabel: [{
|
|
1701
|
+
type: i0.Input,
|
|
1702
|
+
args: [{
|
|
1703
|
+
isSignal: true,
|
|
1704
|
+
alias: "emptyLabel",
|
|
1705
|
+
required: false
|
|
1706
|
+
}]
|
|
1707
|
+
}],
|
|
1708
|
+
helperText: [{
|
|
1709
|
+
type: i0.Input,
|
|
1710
|
+
args: [{
|
|
1711
|
+
isSignal: true,
|
|
1712
|
+
alias: "helperText",
|
|
1713
|
+
required: false
|
|
1714
|
+
}]
|
|
1715
|
+
}],
|
|
1716
|
+
name: [{
|
|
1717
|
+
type: i0.Input,
|
|
1718
|
+
args: [{
|
|
1719
|
+
isSignal: true,
|
|
1720
|
+
alias: "name",
|
|
1721
|
+
required: false
|
|
1722
|
+
}]
|
|
1723
|
+
}],
|
|
1724
|
+
inputId: [{
|
|
1725
|
+
type: i0.Input,
|
|
1726
|
+
args: [{
|
|
1727
|
+
isSignal: true,
|
|
1728
|
+
alias: "inputId",
|
|
1729
|
+
required: false
|
|
1730
|
+
}]
|
|
1731
|
+
}],
|
|
1732
|
+
inputAriaLabel: [{
|
|
1733
|
+
type: i0.Input,
|
|
1734
|
+
args: [{
|
|
1735
|
+
isSignal: true,
|
|
1736
|
+
alias: "inputAriaLabel",
|
|
1737
|
+
required: false
|
|
1738
|
+
}]
|
|
1739
|
+
}],
|
|
1740
|
+
fileListAriaLabel: [{
|
|
1741
|
+
type: i0.Input,
|
|
1742
|
+
args: [{
|
|
1743
|
+
isSignal: true,
|
|
1744
|
+
alias: "fileListAriaLabel",
|
|
1745
|
+
required: false
|
|
1746
|
+
}]
|
|
1747
|
+
}],
|
|
1748
|
+
removeAriaLabel: [{
|
|
1749
|
+
type: i0.Input,
|
|
1750
|
+
args: [{
|
|
1751
|
+
isSignal: true,
|
|
1752
|
+
alias: "removeAriaLabel",
|
|
1753
|
+
required: false
|
|
1754
|
+
}]
|
|
1755
|
+
}],
|
|
1756
|
+
invalidFileTypeMessage: [{
|
|
1757
|
+
type: i0.Input,
|
|
1758
|
+
args: [{
|
|
1759
|
+
isSignal: true,
|
|
1760
|
+
alias: "invalidFileTypeMessage",
|
|
1761
|
+
required: false
|
|
1762
|
+
}]
|
|
1763
|
+
}],
|
|
1764
|
+
invalidMinFileSizeMessage: [{
|
|
1765
|
+
type: i0.Input,
|
|
1766
|
+
args: [{
|
|
1767
|
+
isSignal: true,
|
|
1768
|
+
alias: "invalidMinFileSizeMessage",
|
|
1769
|
+
required: false
|
|
1770
|
+
}]
|
|
1771
|
+
}],
|
|
1772
|
+
invalidMaxFileSizeMessage: [{
|
|
1773
|
+
type: i0.Input,
|
|
1774
|
+
args: [{
|
|
1775
|
+
isSignal: true,
|
|
1776
|
+
alias: "invalidMaxFileSizeMessage",
|
|
1777
|
+
required: false
|
|
1778
|
+
}]
|
|
1779
|
+
}],
|
|
1780
|
+
invalidFileLimitMessage: [{
|
|
1781
|
+
type: i0.Input,
|
|
1782
|
+
args: [{
|
|
1783
|
+
isSignal: true,
|
|
1784
|
+
alias: "invalidFileLimitMessage",
|
|
1785
|
+
required: false
|
|
1786
|
+
}]
|
|
1787
|
+
}],
|
|
1788
|
+
selected: [{
|
|
1789
|
+
type: i0.Output,
|
|
1790
|
+
args: ["selected"]
|
|
1791
|
+
}],
|
|
1792
|
+
removed: [{
|
|
1793
|
+
type: i0.Output,
|
|
1794
|
+
args: ["removed"]
|
|
1795
|
+
}],
|
|
1796
|
+
cleared: [{
|
|
1797
|
+
type: i0.Output,
|
|
1798
|
+
args: ["cleared"]
|
|
1799
|
+
}],
|
|
1800
|
+
uploadRequested: [{
|
|
1801
|
+
type: i0.Output,
|
|
1802
|
+
args: ["uploadRequested"]
|
|
1803
|
+
}],
|
|
1804
|
+
validationFailed: [{
|
|
1805
|
+
type: i0.Output,
|
|
1806
|
+
args: ["validationFailed"]
|
|
1807
|
+
}]
|
|
1808
|
+
}
|
|
1809
|
+
});
|
|
949
1810
|
const AerisFileUploadModule = [
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1811
|
+
AerisFileUpload,
|
|
1812
|
+
AerisFileUploadToolbarTemplate,
|
|
1813
|
+
AerisFileUploadContentTemplate,
|
|
1814
|
+
AerisFileUploadFileTemplate,
|
|
1815
|
+
AerisFileUploadEmptyTemplate,
|
|
1816
|
+
AerisFileUploadChooseIconTemplate,
|
|
1817
|
+
AerisFileUploadUploadIconTemplate,
|
|
1818
|
+
AerisFileUploadClearIconTemplate
|
|
958
1819
|
];
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
* Generated bundle index. Do not edit.
|
|
962
|
-
*/
|
|
963
|
-
|
|
964
1820
|
export { AerisFileUpload, AerisFileUploadChooseIconTemplate, AerisFileUploadClearIconTemplate, AerisFileUploadContentTemplate, AerisFileUploadEmptyTemplate, AerisFileUploadFileTemplate, AerisFileUploadModule, AerisFileUploadToolbarTemplate, AerisFileUploadUploadIconTemplate };
|
|
965
|
-
|
|
1821
|
+
|
|
1822
|
+
//# sourceMappingURL=aeris-ui-core-file-upload.mjs.map
|