@covalent/core 6.4.0 → 6.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/breadcrumbs/breadcrumbs.component.d.ts +1 -1
- package/common/styles/font/_font.scss +1 -35
- package/dialogs/src/README.md +223 -0
- package/dialogs/window-dialog/window-dialog.component.d.ts +1 -1
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.d.ts +1 -1
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.d.ts +1 -1
- package/dynamic-menu/dynamic-menu.component.d.ts +1 -1
- package/esm2020/breadcrumbs/breadcrumb/breadcrumb.component.mjs +92 -0
- package/esm2020/breadcrumbs/breadcrumbs.component.mjs +131 -0
- package/{esm2022 → esm2020}/breadcrumbs/breadcrumbs.module.mjs +5 -5
- package/esm2020/common/behaviors/control-value-accesor.mixin.mjs +41 -0
- package/esm2020/common/behaviors/disable-ripple.mixin.mjs +24 -0
- package/{esm2022 → esm2020}/common/behaviors/disabled.mixin.mjs +2 -2
- package/{esm2022 → esm2020}/common/common.module.mjs +17 -17
- package/esm2020/common/directives/fullscreen/fullscreen.directive.mjs +85 -0
- package/esm2020/common/forms/auto-trim/auto-trim.directive.mjs +36 -0
- package/esm2020/common/functions/convert.mjs +84 -0
- package/esm2020/common/functions/download.mjs +75 -0
- package/esm2020/common/pipes/bytes/bytes.pipe.mjs +42 -0
- package/esm2020/common/pipes/decimal-bytes/decimal-bytes.pipe.mjs +42 -0
- package/esm2020/common/pipes/digits/digits.pipe.mjs +39 -0
- package/{esm2022 → esm2020}/common/pipes/time-ago/time-ago.pipe.mjs +4 -4
- package/{esm2022 → esm2020}/common/pipes/time-difference/time-difference.pipe.mjs +4 -4
- package/{esm2022 → esm2020}/common/pipes/time-until/time-until.pipe.mjs +4 -4
- package/esm2020/common/pipes/truncate/truncate.pipe.mjs +27 -0
- package/esm2020/common/services/icon.service.mjs +1089 -0
- package/esm2020/common/services/router-path.service.mjs +29 -0
- package/esm2020/dialogs/alert-dialog/alert-dialog.component.mjs +23 -0
- package/esm2020/dialogs/confirm-dialog/confirm-dialog.component.mjs +28 -0
- package/esm2020/dialogs/dialog.component.mjs +57 -0
- package/{esm2022 → esm2020}/dialogs/dialogs.module.mjs +39 -39
- package/esm2020/dialogs/prompt-dialog/prompt-dialog.component.mjs +75 -0
- package/esm2020/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.mjs +216 -0
- package/esm2020/dialogs/services/dialog.service.mjs +174 -0
- package/esm2020/dialogs/window-dialog/window-dialog.component.mjs +38 -0
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.mjs +30 -0
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.mjs +24 -0
- package/esm2020/dynamic-menu/dynamic-menu.component.mjs +28 -0
- package/{esm2022 → esm2020}/dynamic-menu/dynamic-menu.module.mjs +19 -19
- package/esm2020/file/directives/file-drop.directive.mjs +139 -0
- package/esm2020/file/directives/file-select.directive.mjs +77 -0
- package/esm2020/file/file-input/file-input.component.mjs +128 -0
- package/esm2020/file/file-upload/file-upload.component.mjs +174 -0
- package/{esm2022 → esm2020}/file/file.module.mjs +21 -21
- package/esm2020/file/services/file.service.mjs +64 -0
- package/esm2020/json-formatter/json-formatter.component.mjs +217 -0
- package/{esm2022 → esm2020}/json-formatter/json-formatter.module.mjs +5 -5
- package/esm2020/layout/layout-card-over/layout-card-over.component.mjs +40 -0
- package/esm2020/layout/layout-footer/layout-footer.component.mjs +33 -0
- package/esm2020/layout/layout-manage-list/layout-manage-list.component.mjs +93 -0
- package/{esm2022 → esm2020}/layout/layout-manage-list/layout-manage-list.directives.mjs +10 -10
- package/esm2020/layout/layout-nav/layout-nav.component.mjs +50 -0
- package/esm2020/layout/layout-nav-list/layout-nav-list.component.mjs +128 -0
- package/{esm2022 → esm2020}/layout/layout-nav-list/layout-nav-list.directives.mjs +10 -10
- package/esm2020/layout/layout-toggle.class.mjs +92 -0
- package/esm2020/layout/layout.component.mjs +92 -0
- package/{esm2022 → esm2020}/layout/layout.directives.mjs +10 -10
- package/{esm2022 → esm2020}/layout/layout.module.mjs +55 -55
- package/esm2020/layout/navigation-drawer/navigation-drawer.component.mjs +163 -0
- package/esm2020/loading/directives/loading.directive.mjs +126 -0
- package/esm2020/loading/loading.component.mjs +187 -0
- package/{esm2022 → esm2020}/loading/loading.module.mjs +13 -13
- package/esm2020/loading/services/loading.factory.mjs +207 -0
- package/esm2020/loading/services/loading.service.mjs +213 -0
- package/{esm2022 → esm2020}/menu/menu.component.mjs +4 -4
- package/{esm2022 → esm2020}/menu/menu.module.mjs +5 -5
- package/esm2020/message/message.component.mjs +203 -0
- package/{esm2022 → esm2020}/message/message.module.mjs +7 -7
- package/esm2020/search/search-box/search-box.component.mjs +194 -0
- package/esm2020/search/search-input/search-input.component.mjs +207 -0
- package/{esm2022 → esm2020}/search/search.module.mjs +13 -13
- package/esm2020/side-sheet/side-sheet-container.mjs +274 -0
- package/esm2020/side-sheet/side-sheet-ref.mjs +26 -0
- package/{esm2022 → esm2020}/side-sheet/side-sheet.config.mjs +5 -2
- package/esm2020/side-sheet/side-sheet.content-directives.mjs +201 -0
- package/esm2020/side-sheet/side-sheet.mjs +228 -0
- package/{esm2022 → esm2020}/side-sheet/side-sheet.module.mjs +14 -14
- package/esm2020/user-profile/user-profile-menu/user-profile-menu.component.mjs +23 -0
- package/esm2020/user-profile/user-profile.component.mjs +19 -0
- package/{esm2022 → esm2020}/user-profile/user-profile.module.mjs +15 -15
- package/{fesm2022 → fesm2015}/covalent-core-breadcrumbs.mjs +22 -28
- package/{fesm2022 → fesm2015}/covalent-core-breadcrumbs.mjs.map +1 -1
- package/fesm2015/covalent-core-common.mjs +2281 -0
- package/fesm2015/covalent-core-common.mjs.map +1 -0
- package/fesm2015/covalent-core-dialogs.mjs +668 -0
- package/fesm2015/covalent-core-dialogs.mjs.map +1 -0
- package/fesm2015/covalent-core-dynamic-menu.mjs +126 -0
- package/fesm2015/covalent-core-dynamic-menu.mjs.map +1 -0
- package/fesm2015/covalent-core-file.mjs +621 -0
- package/fesm2015/covalent-core-file.mjs.map +1 -0
- package/fesm2015/covalent-core-json-formatter.mjs +298 -0
- package/fesm2015/covalent-core-json-formatter.mjs.map +1 -0
- package/fesm2015/covalent-core-layout.mjs +1024 -0
- package/{fesm2022 → fesm2015}/covalent-core-layout.mjs.map +1 -1
- package/fesm2015/covalent-core-loading.mjs +766 -0
- package/fesm2015/covalent-core-loading.mjs.map +1 -0
- package/{fesm2022 → fesm2015}/covalent-core-menu.mjs +7 -7
- package/{fesm2022 → fesm2015}/covalent-core-menu.mjs.map +1 -1
- package/fesm2015/covalent-core-message.mjs +284 -0
- package/fesm2015/covalent-core-message.mjs.map +1 -0
- package/fesm2015/covalent-core-search.mjs +430 -0
- package/fesm2015/covalent-core-search.mjs.map +1 -0
- package/fesm2015/covalent-core-side-sheet.mjs +784 -0
- package/fesm2015/covalent-core-side-sheet.mjs.map +1 -0
- package/fesm2015/covalent-core-user-profile.mjs +83 -0
- package/fesm2015/covalent-core-user-profile.mjs.map +1 -0
- package/fesm2020/covalent-core-breadcrumbs.mjs +243 -0
- package/fesm2020/covalent-core-breadcrumbs.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/covalent-core-common.mjs +1125 -1131
- package/fesm2020/covalent-core-common.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/covalent-core-dialogs.mjs +82 -111
- package/fesm2020/covalent-core-dialogs.mjs.map +1 -0
- package/fesm2020/covalent-core-dynamic-menu.mjs +126 -0
- package/{fesm2022 → fesm2020}/covalent-core-dynamic-menu.mjs.map +1 -1
- package/{fesm2022 → fesm2020}/covalent-core-file.mjs +110 -148
- package/{fesm2022 → fesm2020}/covalent-core-file.mjs.map +1 -1
- package/{fesm2022 → fesm2020}/covalent-core-json-formatter.mjs +21 -26
- package/{fesm2022 → fesm2020}/covalent-core-json-formatter.mjs.map +1 -1
- package/{fesm2022 → fesm2020}/covalent-core-layout.mjs +271 -396
- package/fesm2020/covalent-core-layout.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/covalent-core-loading.mjs +78 -100
- package/{fesm2022 → fesm2020}/covalent-core-loading.mjs.map +1 -1
- package/fesm2020/covalent-core-menu.mjs +37 -0
- package/fesm2020/covalent-core-menu.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/covalent-core-message.mjs +23 -42
- package/{fesm2022 → fesm2020}/covalent-core-message.mjs.map +1 -1
- package/fesm2020/covalent-core-search.mjs +427 -0
- package/fesm2020/covalent-core-search.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/covalent-core-side-sheet.mjs +99 -124
- package/{fesm2022 → fesm2020}/covalent-core-side-sheet.mjs.map +1 -1
- package/fesm2020/covalent-core-user-profile.mjs +83 -0
- package/fesm2020/covalent-core-user-profile.mjs.map +1 -0
- package/fesm2020/covalent-core.mjs +4 -0
- package/fesm2020/covalent-core.mjs.map +1 -0
- package/file/directives/file-drop.directive.d.ts +1 -1
- package/file/directives/file-select.directive.d.ts +1 -1
- package/file/file-input/file-input.component.d.ts +1 -1
- package/file/file-upload/file-upload.component.d.ts +1 -1
- package/file/src/file-input/README.md +147 -0
- package/file/src/file-upload/README.md +136 -0
- package/json-formatter/json-formatter.component.d.ts +1 -1
- package/layout/layout-card-over/layout-card-over.component.d.ts +1 -1
- package/layout/layout-footer/layout-footer.component.d.ts +1 -1
- package/layout/layout-manage-list/layout-manage-list.component.d.ts +1 -1
- package/layout/layout-manage-list/layout-manage-list.directives.d.ts +3 -3
- package/layout/layout-nav/layout-nav.component.d.ts +1 -1
- package/layout/layout-nav-list/layout-nav-list.component.d.ts +1 -1
- package/layout/layout-nav-list/layout-nav-list.directives.d.ts +3 -3
- package/layout/layout-toggle.class.d.ts +1 -1
- package/layout/layout.component.d.ts +1 -1
- package/layout/layout.directives.d.ts +3 -3
- package/layout/navigation-drawer/navigation-drawer.component.d.ts +1 -1
- package/layout/src/layout-card-over/README.md +43 -0
- package/layout/src/layout-manage-list/README.md +80 -0
- package/layout/src/layout-nav/README.md +50 -0
- package/layout/src/layout-nav-list/README.md +105 -0
- package/loading/directives/loading.directive.d.ts +1 -1
- package/message/message.component.d.ts +1 -1
- package/package.json +91 -55
- package/search/search-box/search-box.component.d.ts +1 -1
- package/search/search-input/search-input.component.d.ts +1 -1
- package/search/src/search-box/README.md +73 -0
- package/search/src/search-input/README.md +74 -0
- package/side-sheet/side-sheet.content-directives.d.ts +2 -2
- package/user-profile/user-profile-menu/user-profile-menu.component.d.ts +1 -1
- package/user-profile/user-profile.component.d.ts +1 -1
- package/common/styles/font/MaterialIcons-Regular-v48.woff2 +0 -0
- package/esm2022/breadcrumbs/breadcrumb/breadcrumb.component.mjs +0 -94
- package/esm2022/breadcrumbs/breadcrumbs.component.mjs +0 -135
- package/esm2022/common/behaviors/control-value-accesor.mixin.mjs +0 -43
- package/esm2022/common/behaviors/disable-ripple.mixin.mjs +0 -24
- package/esm2022/common/directives/fullscreen/fullscreen.directive.mjs +0 -87
- package/esm2022/common/forms/auto-trim/auto-trim.directive.mjs +0 -37
- package/esm2022/common/functions/convert.mjs +0 -84
- package/esm2022/common/functions/download.mjs +0 -75
- package/esm2022/common/pipes/bytes/bytes.pipe.mjs +0 -42
- package/esm2022/common/pipes/decimal-bytes/decimal-bytes.pipe.mjs +0 -42
- package/esm2022/common/pipes/digits/digits.pipe.mjs +0 -41
- package/esm2022/common/pipes/truncate/truncate.pipe.mjs +0 -27
- package/esm2022/common/services/icon.service.mjs +0 -1087
- package/esm2022/common/services/router-path.service.mjs +0 -30
- package/esm2022/dialogs/alert-dialog/alert-dialog.component.mjs +0 -26
- package/esm2022/dialogs/confirm-dialog/confirm-dialog.component.mjs +0 -31
- package/esm2022/dialogs/dialog.component.mjs +0 -60
- package/esm2022/dialogs/prompt-dialog/prompt-dialog.component.mjs +0 -84
- package/esm2022/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.mjs +0 -220
- package/esm2022/dialogs/services/dialog.service.mjs +0 -179
- package/esm2022/dialogs/window-dialog/window-dialog.component.mjs +0 -40
- package/esm2022/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.mjs +0 -30
- package/esm2022/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.mjs +0 -23
- package/esm2022/dynamic-menu/dynamic-menu.component.mjs +0 -28
- package/esm2022/file/directives/file-drop.directive.mjs +0 -145
- package/esm2022/file/directives/file-select.directive.mjs +0 -78
- package/esm2022/file/file-input/file-input.component.mjs +0 -146
- package/esm2022/file/file-upload/file-upload.component.mjs +0 -185
- package/esm2022/file/services/file.service.mjs +0 -66
- package/esm2022/json-formatter/json-formatter.component.mjs +0 -222
- package/esm2022/layout/layout-card-over/layout-card-over.component.mjs +0 -50
- package/esm2022/layout/layout-footer/layout-footer.component.mjs +0 -36
- package/esm2022/layout/layout-manage-list/layout-manage-list.component.mjs +0 -92
- package/esm2022/layout/layout-nav/layout-nav.component.mjs +0 -76
- package/esm2022/layout/layout-nav-list/layout-nav-list.component.mjs +0 -154
- package/esm2022/layout/layout-toggle.class.mjs +0 -96
- package/esm2022/layout/layout.component.mjs +0 -91
- package/esm2022/layout/navigation-drawer/navigation-drawer.component.mjs +0 -221
- package/esm2022/loading/directives/loading.directive.mjs +0 -133
- package/esm2022/loading/loading.component.mjs +0 -193
- package/esm2022/loading/services/loading.factory.mjs +0 -210
- package/esm2022/loading/services/loading.service.mjs +0 -219
- package/esm2022/message/message.component.mjs +0 -222
- package/esm2022/search/search-box/search-box.component.mjs +0 -198
- package/esm2022/search/search-input/search-input.component.mjs +0 -214
- package/esm2022/side-sheet/side-sheet-container.mjs +0 -285
- package/esm2022/side-sheet/side-sheet-ref.mjs +0 -30
- package/esm2022/side-sheet/side-sheet.content-directives.mjs +0 -206
- package/esm2022/side-sheet/side-sheet.mjs +0 -236
- package/esm2022/user-profile/user-profile-menu/user-profile-menu.component.mjs +0 -25
- package/esm2022/user-profile/user-profile.component.mjs +0 -21
- package/fesm2022/covalent-core-common.mjs.map +0 -1
- package/fesm2022/covalent-core-dialogs.mjs.map +0 -1
- package/fesm2022/covalent-core-dynamic-menu.mjs +0 -125
- package/fesm2022/covalent-core-search.mjs +0 -438
- package/fesm2022/covalent-core-search.mjs.map +0 -1
- package/fesm2022/covalent-core-user-profile.mjs +0 -87
- package/fesm2022/covalent-core-user-profile.mjs.map +0 -1
- /package/{esm2022 → esm2020}/breadcrumbs/covalent-core-breadcrumbs.mjs +0 -0
- /package/{esm2022 → esm2020}/breadcrumbs/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/common/animations/bounce/bounce.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/common/animations/collapse/collapse.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/common/animations/common/interfaces.mjs +0 -0
- /package/{esm2022 → esm2020}/common/animations/fade/fadeInOut.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/common/animations/flash/flash.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/common/animations/headshake/headshake.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/common/animations/jello/jello.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/common/animations/pulse/pulse.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/common/animations/rotate/rotate.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/common/covalent-core-common.mjs +0 -0
- /package/{esm2022 → esm2020}/common/forms/validators/validators.mjs +0 -0
- /package/{esm2022 → esm2020}/common/functions/clipboard.mjs +0 -0
- /package/{esm2022 → esm2020}/common/functions/file.mjs +0 -0
- /package/{esm2022 → esm2020}/common/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/covalent-core.mjs +0 -0
- /package/{esm2022 → esm2020}/dialogs/covalent-core-dialogs.mjs +0 -0
- /package/{esm2022 → esm2020}/dialogs/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/dynamic-menu/covalent-core-dynamic-menu.mjs +0 -0
- /package/{esm2022 → esm2020}/dynamic-menu/dynamic-menu.menu.mjs +0 -0
- /package/{esm2022 → esm2020}/dynamic-menu/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/file/covalent-core-file.mjs +0 -0
- /package/{esm2022 → esm2020}/file/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/json-formatter/collapse.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/json-formatter/covalent-core-json-formatter.mjs +0 -0
- /package/{esm2022 → esm2020}/json-formatter/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/layout/covalent-core-layout.mjs +0 -0
- /package/{esm2022 → esm2020}/layout/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/loading/covalent-core-loading.mjs +0 -0
- /package/{esm2022 → esm2020}/loading/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/menu/covalent-core-menu.mjs +0 -0
- /package/{esm2022 → esm2020}/menu/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/message/collapse.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/message/covalent-core-message.mjs +0 -0
- /package/{esm2022 → esm2020}/message/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/search/covalent-core-search.mjs +0 -0
- /package/{esm2022 → esm2020}/search/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/side-sheet/covalent-core-side-sheet.mjs +0 -0
- /package/{esm2022 → esm2020}/side-sheet/public_api.mjs +0 -0
- /package/{esm2022 → esm2020}/side-sheet/side-sheet.animation.mjs +0 -0
- /package/{esm2022 → esm2020}/user-profile/covalent-core-user-profile.mjs +0 -0
- /package/{esm2022 → esm2020}/user-profile/public_api.mjs +0 -0
- /package/{fesm2022 → fesm2015}/covalent-core.mjs +0 -0
- /package/{fesm2022 → fesm2015}/covalent-core.mjs.map +0 -0
@@ -19,8 +19,6 @@ import * as i1$1 from '@angular/common/http';
|
|
19
19
|
import { HttpRequest, HttpHeaders, HttpParams, HttpEventType } from '@angular/common/http';
|
20
20
|
|
21
21
|
class TdFileSelectDirective {
|
22
|
-
model;
|
23
|
-
_multiple = false;
|
24
22
|
/**
|
25
23
|
* multiple?: boolean
|
26
24
|
* Sets whether multiple files can be selected at once in host element, or just a single file.
|
@@ -29,13 +27,6 @@ class TdFileSelectDirective {
|
|
29
27
|
set multiple(multiple) {
|
30
28
|
this._multiple = coerceBooleanProperty(multiple);
|
31
29
|
}
|
32
|
-
/**
|
33
|
-
* fileSelect?: function
|
34
|
-
* Event emitted when a file or files are selected in host [HTMLInputElement].
|
35
|
-
* Emits a [FileList | File] object.
|
36
|
-
* Alternative to not use [(ngModel)].
|
37
|
-
*/
|
38
|
-
fileSelect = new EventEmitter();
|
39
30
|
/**
|
40
31
|
* Binds native 'multiple' attribute if [multiple] property is 'true'.
|
41
32
|
*/
|
@@ -44,6 +35,14 @@ class TdFileSelectDirective {
|
|
44
35
|
}
|
45
36
|
constructor(model) {
|
46
37
|
this.model = model;
|
38
|
+
this._multiple = false;
|
39
|
+
/**
|
40
|
+
* fileSelect?: function
|
41
|
+
* Event emitted when a file or files are selected in host [HTMLInputElement].
|
42
|
+
* Emits a [FileList | File] object.
|
43
|
+
* Alternative to not use [(ngModel)].
|
44
|
+
*/
|
45
|
+
this.fileSelect = new EventEmitter();
|
47
46
|
}
|
48
47
|
/**
|
49
48
|
* Listens to 'change' host event to get [HTMLInputElement] files.
|
@@ -66,10 +65,10 @@ class TdFileSelectDirective {
|
|
66
65
|
}
|
67
66
|
}
|
68
67
|
}
|
69
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdFileSelectDirective, deps: [{ token: i1.NgModel, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
70
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.7", type: TdFileSelectDirective, selector: "[tdFileSelect]", inputs: { multiple: "multiple" }, outputs: { fileSelect: "fileSelect" }, host: { listeners: { "change": "onChange($event)" }, properties: { "attr.multiple": "this.multipleBinding" } }, ngImport: i0 });
|
71
68
|
}
|
72
|
-
i0.ɵɵ
|
69
|
+
TdFileSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileSelectDirective, deps: [{ token: i1.NgModel, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
70
|
+
TdFileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TdFileSelectDirective, selector: "[tdFileSelect]", inputs: { multiple: "multiple" }, outputs: { fileSelect: "fileSelect" }, host: { listeners: { "change": "onChange($event)" }, properties: { "attr.multiple": "this.multipleBinding" } }, ngImport: i0 });
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileSelectDirective, decorators: [{
|
73
72
|
type: Directive,
|
74
73
|
args: [{
|
75
74
|
selector: '[tdFileSelect]',
|
@@ -93,13 +92,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImpor
|
|
93
92
|
class TdFileDropBase {
|
94
93
|
}
|
95
94
|
class TdFileDropDirective {
|
96
|
-
_renderer;
|
97
|
-
_element;
|
98
|
-
_ngZone;
|
99
|
-
_multiple = false;
|
100
|
-
_dragenterListener;
|
101
|
-
_dragleaveListener;
|
102
|
-
_dragoverListener;
|
103
95
|
/**
|
104
96
|
* multiple?: boolean
|
105
97
|
* Sets whether multiple files can be dropped at once in host element, or just a single file.
|
@@ -108,13 +100,6 @@ class TdFileDropDirective {
|
|
108
100
|
set multiple(multiple) {
|
109
101
|
this._multiple = coerceBooleanProperty(multiple);
|
110
102
|
}
|
111
|
-
disabled = false;
|
112
|
-
/**
|
113
|
-
* fileDrop?: function
|
114
|
-
* Event emitted when a file or files are dropped in host element after being validated.
|
115
|
-
* Emits a [FileList | File] object.
|
116
|
-
*/
|
117
|
-
fileDrop = new EventEmitter();
|
118
103
|
/**
|
119
104
|
* Binds native 'multiple' attribute if [multiple] property is 'true'.
|
120
105
|
*/
|
@@ -131,6 +116,14 @@ class TdFileDropDirective {
|
|
131
116
|
this._renderer = _renderer;
|
132
117
|
this._element = _element;
|
133
118
|
this._ngZone = _ngZone;
|
119
|
+
this._multiple = false;
|
120
|
+
this.disabled = false;
|
121
|
+
/**
|
122
|
+
* fileDrop?: function
|
123
|
+
* Event emitted when a file or files are dropped in host element after being validated.
|
124
|
+
* Emits a [FileList | File] object.
|
125
|
+
*/
|
126
|
+
this.fileDrop = new EventEmitter();
|
134
127
|
}
|
135
128
|
ngOnInit() {
|
136
129
|
this._ngZone.runOutsideAngular(() => {
|
@@ -209,10 +202,10 @@ class TdFileDropDirective {
|
|
209
202
|
event.preventDefault();
|
210
203
|
event.stopPropagation();
|
211
204
|
}
|
212
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdFileDropDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
213
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.7", type: TdFileDropDirective, selector: "[tdFileDrop]", inputs: { multiple: "multiple", disabled: "disabled" }, outputs: { fileDrop: "fileDrop" }, host: { listeners: { "drop": "onDrop($event)" }, properties: { "attr.multiple": "this.multipleBinding", "attr.disabled": "this.disabledBinding" } }, ngImport: i0 });
|
214
205
|
}
|
215
|
-
i0.ɵɵ
|
206
|
+
TdFileDropDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileDropDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
207
|
+
TdFileDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TdFileDropDirective, selector: "[tdFileDrop]", inputs: { multiple: "multiple", disabled: "disabled" }, outputs: { fileDrop: "fileDrop" }, host: { listeners: { "drop": "onDrop($event)" }, properties: { "attr.multiple": "this.multipleBinding", "attr.disabled": "this.disabledBinding" } }, ngImport: i0 });
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileDropDirective, decorators: [{
|
216
209
|
type: Directive,
|
217
210
|
args: [{ selector: '[tdFileDrop]' }]
|
218
211
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { multiple: [{
|
@@ -236,38 +229,25 @@ class TdFileInputLabelDirective extends TemplatePortalDirective {
|
|
236
229
|
constructor(templateRef, viewContainerRef) {
|
237
230
|
super(templateRef, viewContainerRef);
|
238
231
|
}
|
239
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdFileInputLabelDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
240
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.7", type: TdFileInputLabelDirective, selector: "[tdFileInputLabel]ng-template", usesInheritance: true, ngImport: i0 });
|
241
232
|
}
|
242
|
-
i0.ɵɵ
|
233
|
+
TdFileInputLabelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileInputLabelDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
234
|
+
TdFileInputLabelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TdFileInputLabelDirective, selector: "[tdFileInputLabel]ng-template", usesInheritance: true, ngImport: i0 });
|
235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileInputLabelDirective, decorators: [{
|
243
236
|
type: Directive,
|
244
237
|
args: [{
|
245
238
|
selector: '[tdFileInputLabel]ng-template',
|
246
239
|
}]
|
247
240
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
248
241
|
class TdFileInputBase {
|
249
|
-
_changeDetectorRef;
|
250
242
|
constructor(_changeDetectorRef) {
|
251
243
|
this._changeDetectorRef = _changeDetectorRef;
|
252
244
|
}
|
253
245
|
}
|
254
246
|
const _TdFileInputMixinBase = mixinControlValueAccessor(mixinDisabled(TdFileInputBase));
|
255
247
|
class TdFileInputComponent extends _TdFileInputMixinBase {
|
256
|
-
_ngZone;
|
257
|
-
_renderer;
|
258
|
-
_multiple = false;
|
259
|
-
/** The native `<button class="td-file-input"></button>` element */
|
260
|
-
_inputButton;
|
261
|
-
/** The native `<input type="file"> element */
|
262
|
-
_inputElement;
|
263
248
|
get inputElement() {
|
264
249
|
return this._inputElement.nativeElement;
|
265
250
|
}
|
266
|
-
/**
|
267
|
-
* color?: 'accent' | 'primary' | 'warn'
|
268
|
-
* Sets button color. Uses same color palette accepted as [MatButton].
|
269
|
-
*/
|
270
|
-
color;
|
271
251
|
/**
|
272
252
|
* multiple?: boolean
|
273
253
|
* Sets if multiple files can be dropped/selected at once in [TdFileInputComponent].
|
@@ -278,23 +258,18 @@ class TdFileInputComponent extends _TdFileInputMixinBase {
|
|
278
258
|
get multiple() {
|
279
259
|
return this._multiple;
|
280
260
|
}
|
281
|
-
/**
|
282
|
-
* accept?: string
|
283
|
-
* Sets files accepted when opening the file browser dialog.
|
284
|
-
* Same as 'accept' attribute in <input/> element.
|
285
|
-
*/
|
286
|
-
accept;
|
287
|
-
/**
|
288
|
-
* select?: function
|
289
|
-
* Event emitted a file is selected
|
290
|
-
* Emits a [File | FileList] object.
|
291
|
-
*/
|
292
|
-
selectFile = new EventEmitter();
|
293
|
-
_destroy$ = new Subject();
|
294
261
|
constructor(_ngZone, _renderer, _changeDetectorRef) {
|
295
262
|
super(_changeDetectorRef);
|
296
263
|
this._ngZone = _ngZone;
|
297
264
|
this._renderer = _renderer;
|
265
|
+
this._multiple = false;
|
266
|
+
/**
|
267
|
+
* select?: function
|
268
|
+
* Event emitted a file is selected
|
269
|
+
* Emits a [File | FileList] object.
|
270
|
+
*/
|
271
|
+
this.selectFile = new EventEmitter();
|
272
|
+
this._destroy$ = new Subject();
|
298
273
|
}
|
299
274
|
ngOnInit() {
|
300
275
|
this._ngZone.runOutsideAngular(() => {
|
@@ -332,16 +307,16 @@ class TdFileInputComponent extends _TdFileInputMixinBase {
|
|
332
307
|
setDisabledState(isDisabled) {
|
333
308
|
this.disabled = isDisabled;
|
334
309
|
}
|
335
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdFileInputComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
336
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: TdFileInputComponent, selector: "td-file-input", inputs: { disabled: "disabled", value: "value", color: "color", multiple: "multiple", accept: "accept" }, outputs: { selectFile: "selectFile" }, providers: [
|
337
|
-
{
|
338
|
-
provide: NG_VALUE_ACCESSOR,
|
339
|
-
useExisting: forwardRef(() => TdFileInputComponent),
|
340
|
-
multi: true,
|
341
|
-
},
|
342
|
-
], viewQueries: [{ propertyName: "_inputButton", first: true, predicate: ["fileInputButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "_inputElement", first: true, predicate: ["fileInput"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<button\n #fileInputButton\n mat-raised-button\n class=\"td-file-input\"\n type=\"button\"\n [color]=\"color\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n (fileDrop)=\"handleSelect($event)\"\n tdFileDrop\n>\n <ng-content></ng-content>\n</button>\n<input\n #fileInput\n class=\"td-file-input-hidden\"\n type=\"file\"\n [attr.accept]=\"accept\"\n (fileSelect)=\"handleSelect($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n tdFileSelect\n/>\n", styles: [":host .td-file-input{padding-left:8px;padding-right:8px}:host input.td-file-input-hidden{display:none}:host ::ng-deep .mdc-button__label{display:flex;align-items:center}:host .drop-zone{border-radius:3px}:host .drop-zone *{pointer-events:none}\n"], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: TdFileSelectDirective, selector: "[tdFileSelect]", inputs: ["multiple"], outputs: ["fileSelect"] }, { kind: "directive", type: TdFileDropDirective, selector: "[tdFileDrop]", inputs: ["multiple", "disabled"], outputs: ["fileDrop"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
343
310
|
}
|
344
|
-
i0.ɵɵ
|
311
|
+
TdFileInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileInputComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
312
|
+
TdFileInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TdFileInputComponent, selector: "td-file-input", inputs: { disabled: "disabled", value: "value", color: "color", multiple: "multiple", accept: "accept" }, outputs: { selectFile: "selectFile" }, providers: [
|
313
|
+
{
|
314
|
+
provide: NG_VALUE_ACCESSOR,
|
315
|
+
useExisting: forwardRef(() => TdFileInputComponent),
|
316
|
+
multi: true,
|
317
|
+
},
|
318
|
+
], viewQueries: [{ propertyName: "_inputButton", first: true, predicate: ["fileInputButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "_inputElement", first: true, predicate: ["fileInput"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<button\n #fileInputButton\n mat-raised-button\n class=\"td-file-input\"\n type=\"button\"\n [color]=\"color\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n (fileDrop)=\"handleSelect($event)\"\n tdFileDrop\n>\n <ng-content></ng-content>\n</button>\n<input\n #fileInput\n class=\"td-file-input-hidden\"\n type=\"file\"\n [attr.accept]=\"accept\"\n (fileSelect)=\"handleSelect($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n tdFileSelect\n/>\n", styles: [":host .td-file-input{padding-left:8px;padding-right:8px}:host input.td-file-input-hidden{display:none}:host ::ng-deep .mdc-button__label{display:flex;align-items:center}:host .drop-zone{border-radius:3px}:host .drop-zone *{pointer-events:none}\n"], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: TdFileSelectDirective, selector: "[tdFileSelect]", inputs: ["multiple"], outputs: ["fileSelect"] }, { kind: "directive", type: TdFileDropDirective, selector: "[tdFileDrop]", inputs: ["multiple", "disabled"], outputs: ["fileDrop"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileInputComponent, decorators: [{
|
345
320
|
type: Component,
|
346
321
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
347
322
|
{
|
@@ -367,33 +342,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImpor
|
|
367
342
|
}] } });
|
368
343
|
|
369
344
|
class TdFileUploadBase {
|
370
|
-
_changeDetectorRef;
|
371
345
|
constructor(_changeDetectorRef) {
|
372
346
|
this._changeDetectorRef = _changeDetectorRef;
|
373
347
|
}
|
374
348
|
}
|
375
349
|
class TdFileUploadComponent {
|
376
|
-
_changeDetectorRef;
|
377
|
-
_multiple = false;
|
378
|
-
_required = false;
|
379
|
-
_disabled = false;
|
380
|
-
fileInput;
|
381
|
-
inputLabel;
|
382
|
-
/**
|
383
|
-
* defaultColor?: 'accent' | 'primary' | 'warn'
|
384
|
-
* Sets browse button color. Uses same color palette accepted as [MatButton] and defaults to 'primary'.
|
385
|
-
*/
|
386
|
-
defaultColor = 'primary';
|
387
|
-
/**
|
388
|
-
* activeColor?: 'accent' | 'primary' | 'warn'
|
389
|
-
* Sets upload button color. Uses same color palette accepted as [MatButton] and defaults to 'accent'.
|
390
|
-
*/
|
391
|
-
activeColor = 'accent';
|
392
|
-
/**
|
393
|
-
* cancelColor?: 'accent' | 'primary' | 'warn'
|
394
|
-
* Sets cancel button color. Uses same color palette accepted as [MatButton] and defaults to 'warn'.
|
395
|
-
*/
|
396
|
-
cancelColor = 'warn';
|
397
350
|
/**
|
398
351
|
* multiple?: boolean
|
399
352
|
* Sets if multiple files can be dropped/selected at once in [TdFileUploadComponent].
|
@@ -415,12 +368,6 @@ class TdFileUploadComponent {
|
|
415
368
|
get required() {
|
416
369
|
return this._required;
|
417
370
|
}
|
418
|
-
/**
|
419
|
-
* accept?: string
|
420
|
-
* Sets files accepted when opening the file browser dialog.
|
421
|
-
* Same as 'accept' attribute in <input/> element.
|
422
|
-
*/
|
423
|
-
accept;
|
424
371
|
set disabled(disabled) {
|
425
372
|
this._disabled = disabled;
|
426
373
|
this.onDisabledChange(disabled);
|
@@ -428,26 +375,43 @@ class TdFileUploadComponent {
|
|
428
375
|
get disabled() {
|
429
376
|
return this._disabled;
|
430
377
|
}
|
431
|
-
value;
|
432
|
-
/**
|
433
|
-
* select?: function
|
434
|
-
* Event emitted when a file is selected.
|
435
|
-
* Emits a [File | FileList] object.
|
436
|
-
*/
|
437
|
-
selectFile = new EventEmitter();
|
438
|
-
/**
|
439
|
-
* upload?: function
|
440
|
-
* Event emitted when upload button is clicked.
|
441
|
-
* Emits a [File | FileList] object.
|
442
|
-
*/
|
443
|
-
upload = new EventEmitter();
|
444
|
-
/**
|
445
|
-
* cancel?: function
|
446
|
-
* Event emitted when cancel button is clicked.
|
447
|
-
*/
|
448
|
-
cancel = new EventEmitter();
|
449
378
|
constructor(_changeDetectorRef) {
|
450
379
|
this._changeDetectorRef = _changeDetectorRef;
|
380
|
+
this._multiple = false;
|
381
|
+
this._required = false;
|
382
|
+
this._disabled = false;
|
383
|
+
/**
|
384
|
+
* defaultColor?: 'accent' | 'primary' | 'warn'
|
385
|
+
* Sets browse button color. Uses same color palette accepted as [MatButton] and defaults to 'primary'.
|
386
|
+
*/
|
387
|
+
this.defaultColor = 'primary';
|
388
|
+
/**
|
389
|
+
* activeColor?: 'accent' | 'primary' | 'warn'
|
390
|
+
* Sets upload button color. Uses same color palette accepted as [MatButton] and defaults to 'accent'.
|
391
|
+
*/
|
392
|
+
this.activeColor = 'accent';
|
393
|
+
/**
|
394
|
+
* cancelColor?: 'accent' | 'primary' | 'warn'
|
395
|
+
* Sets cancel button color. Uses same color palette accepted as [MatButton] and defaults to 'warn'.
|
396
|
+
*/
|
397
|
+
this.cancelColor = 'warn';
|
398
|
+
/**
|
399
|
+
* select?: function
|
400
|
+
* Event emitted when a file is selected.
|
401
|
+
* Emits a [File | FileList] object.
|
402
|
+
*/
|
403
|
+
this.selectFile = new EventEmitter();
|
404
|
+
/**
|
405
|
+
* upload?: function
|
406
|
+
* Event emitted when upload button is clicked.
|
407
|
+
* Emits a [File | FileList] object.
|
408
|
+
*/
|
409
|
+
this.upload = new EventEmitter();
|
410
|
+
/**
|
411
|
+
* cancel?: function
|
412
|
+
* Event emitted when cancel button is clicked.
|
413
|
+
*/
|
414
|
+
this.cancel = new EventEmitter();
|
451
415
|
}
|
452
416
|
writeValue(value) {
|
453
417
|
this.value = value;
|
@@ -492,16 +456,16 @@ class TdFileUploadComponent {
|
|
492
456
|
this._cancel();
|
493
457
|
}
|
494
458
|
}
|
495
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdFileUploadComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
496
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: TdFileUploadComponent, selector: "td-file-upload", inputs: { defaultColor: "defaultColor", activeColor: "activeColor", cancelColor: "cancelColor", multiple: "multiple", required: "required", accept: "accept", disabled: "disabled", value: "value" }, outputs: { selectFile: "selectFile", upload: "upload", cancel: "cancel" }, providers: [
|
497
|
-
{
|
498
|
-
provide: NG_VALUE_ACCESSOR,
|
499
|
-
useExisting: forwardRef(() => TdFileUploadComponent),
|
500
|
-
multi: true,
|
501
|
-
},
|
502
|
-
], queries: [{ propertyName: "inputLabel", first: true, predicate: TdFileInputLabelDirective, descendants: true }], viewQueries: [{ propertyName: "fileInput", first: true, predicate: TdFileInputComponent, descendants: true }], ngImport: i0, template: "<td-file-input\n *ngIf=\"!value\"\n [(ngModel)]=\"value\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n [accept]=\"accept\"\n [color]=\"defaultColor\"\n (selectFile)=\"(handleSelect)\"\n>\n <ng-template [cdkPortalOutlet]=\"inputLabel\" [ngIf]=\"true\"></ng-template>\n</td-file-input>\n<div *ngIf=\"value\">\n <button\n #fileUpload\n class=\"td-file-upload\"\n mat-raised-button\n type=\"button\"\n [color]=\"activeColor\"\n (keyup.delete)=\"_cancel()\"\n (keyup.backspace)=\"_cancel()\"\n (keyup.escape)=\"_cancel()\"\n (click)=\"uploadPressed()\"\n >\n <ng-content></ng-content>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n class=\"td-file-upload-cancel\"\n [color]=\"cancelColor\"\n (click)=\"_cancel()\"\n >\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n", styles: [".td-file-upload{padding-left:8px;padding-right:8px}.td-file-upload-cancel{height:24px;width:24px;position:relative;top:24px;left:-12px}::ng-deep [dir=rtl] .td-file-upload-cancel{right:-12px;left:0}.td-file-upload-cancel mat-icon{border-radius:12px;vertical-align:baseline}.drop-zone{border-radius:3px}.drop-zone *{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: TdFileInputComponent, selector: "td-file-input", inputs: ["disabled", "value", "color", "multiple", "accept"], outputs: ["selectFile"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
503
459
|
}
|
504
|
-
i0.ɵɵ
|
460
|
+
TdFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileUploadComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
461
|
+
TdFileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TdFileUploadComponent, selector: "td-file-upload", inputs: { defaultColor: "defaultColor", activeColor: "activeColor", cancelColor: "cancelColor", multiple: "multiple", required: "required", accept: "accept", disabled: "disabled", value: "value" }, outputs: { selectFile: "selectFile", upload: "upload", cancel: "cancel" }, providers: [
|
462
|
+
{
|
463
|
+
provide: NG_VALUE_ACCESSOR,
|
464
|
+
useExisting: forwardRef(() => TdFileUploadComponent),
|
465
|
+
multi: true,
|
466
|
+
},
|
467
|
+
], queries: [{ propertyName: "inputLabel", first: true, predicate: TdFileInputLabelDirective, descendants: true }], viewQueries: [{ propertyName: "fileInput", first: true, predicate: TdFileInputComponent, descendants: true }], ngImport: i0, template: "<td-file-input\n *ngIf=\"!value\"\n [(ngModel)]=\"value\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n [accept]=\"accept\"\n [color]=\"defaultColor\"\n (selectFile)=\"(handleSelect)\"\n>\n <ng-template [cdkPortalOutlet]=\"inputLabel\" [ngIf]=\"true\"></ng-template>\n</td-file-input>\n<div *ngIf=\"value\">\n <button\n #fileUpload\n class=\"td-file-upload\"\n mat-raised-button\n type=\"button\"\n [color]=\"activeColor\"\n (keyup.delete)=\"_cancel()\"\n (keyup.backspace)=\"_cancel()\"\n (keyup.escape)=\"_cancel()\"\n (click)=\"uploadPressed()\"\n >\n <ng-content></ng-content>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n class=\"td-file-upload-cancel\"\n [color]=\"cancelColor\"\n (click)=\"_cancel()\"\n >\n <mat-icon>cancel</mat-icon>\n </button>\n</div>\n", styles: [".td-file-upload{padding-left:8px;padding-right:8px}.td-file-upload-cancel{height:24px;width:24px;position:relative;top:24px;left:-12px}::ng-deep [dir=rtl] .td-file-upload-cancel{right:-12px;left:0}.td-file-upload-cancel mat-icon{border-radius:12px;vertical-align:baseline}.drop-zone{border-radius:3px}.drop-zone *{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: TdFileInputComponent, selector: "td-file-input", inputs: ["disabled", "value", "color", "multiple", "accept"], outputs: ["selectFile"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileUploadComponent, decorators: [{
|
505
469
|
type: Component,
|
506
470
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
507
471
|
{
|
@@ -541,9 +505,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImpor
|
|
541
505
|
}] } });
|
542
506
|
|
543
507
|
class TdFileService {
|
544
|
-
_http;
|
545
|
-
_progressSubject = new Subject();
|
546
|
-
_progressObservable;
|
547
508
|
/**
|
548
509
|
* Gets progress observable to keep track of the files being uploaded.
|
549
510
|
* Needs to be supported by backend.
|
@@ -558,6 +519,7 @@ class TdFileService {
|
|
558
519
|
*/
|
559
520
|
constructor(_http) {
|
560
521
|
this._http = _http;
|
522
|
+
this._progressSubject = new Subject();
|
561
523
|
this._progressObservable = this._progressSubject.asObservable();
|
562
524
|
}
|
563
525
|
/**
|
@@ -591,10 +553,10 @@ class TdFileService {
|
|
591
553
|
break;
|
592
554
|
}
|
593
555
|
}
|
594
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdFileService, deps: [{ token: i1$1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
595
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdFileService });
|
596
556
|
}
|
597
|
-
i0.ɵɵ
|
557
|
+
TdFileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileService, deps: [{ token: i1$1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
558
|
+
TdFileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileService });
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdFileService, decorators: [{
|
598
560
|
type: Injectable
|
599
561
|
}], ctorParameters: function () { return [{ type: i1$1.HttpClient, decorators: [{
|
600
562
|
type: Optional
|
@@ -608,27 +570,27 @@ const TD_FILE = [
|
|
608
570
|
TdFileInputLabelDirective,
|
609
571
|
];
|
610
572
|
class CovalentFileModule {
|
611
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: CovalentFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
612
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: CovalentFileModule, declarations: [TdFileSelectDirective,
|
613
|
-
TdFileDropDirective,
|
614
|
-
TdFileUploadComponent,
|
615
|
-
TdFileInputComponent,
|
616
|
-
TdFileInputLabelDirective], imports: [FormsModule,
|
617
|
-
CommonModule,
|
618
|
-
MatIconModule,
|
619
|
-
MatButtonModule,
|
620
|
-
PortalModule], exports: [TdFileSelectDirective,
|
621
|
-
TdFileDropDirective,
|
622
|
-
TdFileUploadComponent,
|
623
|
-
TdFileInputComponent,
|
624
|
-
TdFileInputLabelDirective] });
|
625
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: CovalentFileModule, providers: [TdFileService], imports: [FormsModule,
|
626
|
-
CommonModule,
|
627
|
-
MatIconModule,
|
628
|
-
MatButtonModule,
|
629
|
-
PortalModule] });
|
630
573
|
}
|
631
|
-
i0.ɵɵ
|
574
|
+
CovalentFileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CovalentFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
575
|
+
CovalentFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CovalentFileModule, declarations: [TdFileSelectDirective,
|
576
|
+
TdFileDropDirective,
|
577
|
+
TdFileUploadComponent,
|
578
|
+
TdFileInputComponent,
|
579
|
+
TdFileInputLabelDirective], imports: [FormsModule,
|
580
|
+
CommonModule,
|
581
|
+
MatIconModule,
|
582
|
+
MatButtonModule,
|
583
|
+
PortalModule], exports: [TdFileSelectDirective,
|
584
|
+
TdFileDropDirective,
|
585
|
+
TdFileUploadComponent,
|
586
|
+
TdFileInputComponent,
|
587
|
+
TdFileInputLabelDirective] });
|
588
|
+
CovalentFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CovalentFileModule, providers: [TdFileService], imports: [FormsModule,
|
589
|
+
CommonModule,
|
590
|
+
MatIconModule,
|
591
|
+
MatButtonModule,
|
592
|
+
PortalModule] });
|
593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CovalentFileModule, decorators: [{
|
632
594
|
type: NgModule,
|
633
595
|
args: [{
|
634
596
|
imports: [
|