@covalent/core 6.3.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/breadcrumbs/breadcrumbs.component.d.ts +1 -1
- 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/esm2022/breadcrumbs/breadcrumb/breadcrumb.component.mjs +94 -0
- package/esm2022/breadcrumbs/breadcrumbs.component.mjs +135 -0
- package/{esm2020 → esm2022}/breadcrumbs/breadcrumbs.module.mjs +5 -5
- package/esm2022/common/behaviors/control-value-accesor.mixin.mjs +43 -0
- package/esm2022/common/behaviors/disable-ripple.mixin.mjs +24 -0
- package/{esm2020 → esm2022}/common/behaviors/disabled.mixin.mjs +2 -2
- package/{esm2020 → esm2022}/common/common.module.mjs +17 -17
- package/esm2022/common/directives/fullscreen/fullscreen.directive.mjs +87 -0
- package/esm2022/common/forms/auto-trim/auto-trim.directive.mjs +37 -0
- package/esm2022/common/functions/convert.mjs +84 -0
- package/esm2022/common/functions/download.mjs +75 -0
- package/esm2022/common/pipes/bytes/bytes.pipe.mjs +42 -0
- package/esm2022/common/pipes/decimal-bytes/decimal-bytes.pipe.mjs +42 -0
- package/esm2022/common/pipes/digits/digits.pipe.mjs +41 -0
- package/{esm2020 → esm2022}/common/pipes/time-ago/time-ago.pipe.mjs +4 -4
- package/{esm2020 → esm2022}/common/pipes/time-difference/time-difference.pipe.mjs +4 -4
- package/{esm2020 → esm2022}/common/pipes/time-until/time-until.pipe.mjs +4 -4
- package/esm2022/common/pipes/truncate/truncate.pipe.mjs +27 -0
- package/esm2022/common/services/icon.service.mjs +1087 -0
- package/esm2022/common/services/router-path.service.mjs +30 -0
- package/esm2022/dialogs/alert-dialog/alert-dialog.component.mjs +26 -0
- package/esm2022/dialogs/confirm-dialog/confirm-dialog.component.mjs +31 -0
- package/esm2022/dialogs/dialog.component.mjs +60 -0
- package/{esm2020 → esm2022}/dialogs/dialogs.module.mjs +39 -39
- package/esm2022/dialogs/prompt-dialog/prompt-dialog.component.mjs +84 -0
- package/esm2022/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.mjs +220 -0
- package/esm2022/dialogs/services/dialog.service.mjs +179 -0
- package/esm2022/dialogs/window-dialog/window-dialog.component.mjs +40 -0
- package/esm2022/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.mjs +30 -0
- package/esm2022/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.mjs +23 -0
- package/esm2022/dynamic-menu/dynamic-menu.component.mjs +28 -0
- package/{esm2020 → esm2022}/dynamic-menu/dynamic-menu.module.mjs +19 -19
- package/esm2022/file/directives/file-drop.directive.mjs +145 -0
- package/esm2022/file/directives/file-select.directive.mjs +78 -0
- package/esm2022/file/file-input/file-input.component.mjs +146 -0
- package/esm2022/file/file-upload/file-upload.component.mjs +185 -0
- package/{esm2020 → esm2022}/file/file.module.mjs +21 -21
- package/esm2022/file/services/file.service.mjs +66 -0
- package/esm2022/json-formatter/json-formatter.component.mjs +222 -0
- package/{esm2020 → esm2022}/json-formatter/json-formatter.module.mjs +5 -5
- package/esm2022/layout/layout-card-over/layout-card-over.component.mjs +50 -0
- package/esm2022/layout/layout-footer/layout-footer.component.mjs +36 -0
- package/esm2022/layout/layout-manage-list/layout-manage-list.component.mjs +92 -0
- package/{esm2020 → esm2022}/layout/layout-manage-list/layout-manage-list.directives.mjs +10 -10
- package/esm2022/layout/layout-nav/layout-nav.component.mjs +76 -0
- package/esm2022/layout/layout-nav-list/layout-nav-list.component.mjs +154 -0
- package/{esm2020 → esm2022}/layout/layout-nav-list/layout-nav-list.directives.mjs +10 -10
- package/esm2022/layout/layout-toggle.class.mjs +96 -0
- package/esm2022/layout/layout.component.mjs +91 -0
- package/{esm2020 → esm2022}/layout/layout.directives.mjs +10 -10
- package/{esm2020 → esm2022}/layout/layout.module.mjs +55 -55
- package/esm2022/layout/navigation-drawer/navigation-drawer.component.mjs +221 -0
- package/esm2022/loading/directives/loading.directive.mjs +133 -0
- package/esm2022/loading/loading.component.mjs +193 -0
- package/{esm2020 → esm2022}/loading/loading.module.mjs +13 -13
- package/esm2022/loading/services/loading.factory.mjs +210 -0
- package/esm2022/loading/services/loading.service.mjs +219 -0
- package/{esm2020 → esm2022}/menu/menu.component.mjs +4 -4
- package/{esm2020 → esm2022}/menu/menu.module.mjs +5 -5
- package/esm2022/message/message.component.mjs +222 -0
- package/{esm2020 → esm2022}/message/message.module.mjs +7 -7
- package/esm2022/search/search-box/search-box.component.mjs +198 -0
- package/esm2022/search/search-input/search-input.component.mjs +214 -0
- package/{esm2020 → esm2022}/search/search.module.mjs +13 -13
- package/esm2022/side-sheet/side-sheet-container.mjs +285 -0
- package/esm2022/side-sheet/side-sheet-ref.mjs +30 -0
- package/{esm2020 → esm2022}/side-sheet/side-sheet.config.mjs +2 -5
- package/esm2022/side-sheet/side-sheet.content-directives.mjs +206 -0
- package/esm2022/side-sheet/side-sheet.mjs +236 -0
- package/{esm2020 → esm2022}/side-sheet/side-sheet.module.mjs +14 -14
- package/esm2022/user-profile/user-profile-menu/user-profile-menu.component.mjs +25 -0
- package/esm2022/user-profile/user-profile.component.mjs +21 -0
- package/{esm2020 → esm2022}/user-profile/user-profile.module.mjs +15 -15
- package/{fesm2015 → fesm2022}/covalent-core-breadcrumbs.mjs +28 -22
- package/{fesm2015 → fesm2022}/covalent-core-breadcrumbs.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/covalent-core-common.mjs +1131 -1125
- package/fesm2022/covalent-core-common.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/covalent-core-dialogs.mjs +109 -80
- package/{fesm2020 → fesm2022}/covalent-core-dialogs.mjs.map +1 -1
- package/fesm2022/covalent-core-dynamic-menu.mjs +125 -0
- package/{fesm2015 → fesm2022}/covalent-core-dynamic-menu.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/covalent-core-file.mjs +148 -110
- package/{fesm2020 → fesm2022}/covalent-core-file.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/covalent-core-json-formatter.mjs +26 -21
- package/{fesm2020 → fesm2022}/covalent-core-json-formatter.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/covalent-core-layout.mjs +396 -271
- package/{fesm2015 → fesm2022}/covalent-core-layout.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/covalent-core-loading.mjs +100 -78
- package/{fesm2020 → fesm2022}/covalent-core-loading.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/covalent-core-menu.mjs +7 -7
- package/{fesm2015 → fesm2022}/covalent-core-menu.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/covalent-core-message.mjs +42 -23
- package/{fesm2020 → fesm2022}/covalent-core-message.mjs.map +1 -1
- package/fesm2022/covalent-core-search.mjs +438 -0
- package/fesm2022/covalent-core-search.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/covalent-core-side-sheet.mjs +124 -99
- package/{fesm2020 → fesm2022}/covalent-core-side-sheet.mjs.map +1 -1
- package/fesm2022/covalent-core-user-profile.mjs +87 -0
- package/fesm2022/covalent-core-user-profile.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/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/loading/directives/loading.directive.d.ts +1 -1
- package/message/message.component.d.ts +1 -1
- package/package.json +55 -91
- package/search/search-box/search-box.component.d.ts +1 -1
- package/search/search-input/search-input.component.d.ts +1 -1
- 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/README.md +0 -11
- package/dialogs/src/README.md +0 -223
- package/esm2020/breadcrumbs/breadcrumb/breadcrumb.component.mjs +0 -92
- package/esm2020/breadcrumbs/breadcrumbs.component.mjs +0 -131
- package/esm2020/common/behaviors/control-value-accesor.mixin.mjs +0 -41
- package/esm2020/common/behaviors/disable-ripple.mixin.mjs +0 -24
- package/esm2020/common/directives/fullscreen/fullscreen.directive.mjs +0 -85
- package/esm2020/common/forms/auto-trim/auto-trim.directive.mjs +0 -36
- package/esm2020/common/functions/convert.mjs +0 -84
- package/esm2020/common/functions/download.mjs +0 -75
- package/esm2020/common/pipes/bytes/bytes.pipe.mjs +0 -42
- package/esm2020/common/pipes/decimal-bytes/decimal-bytes.pipe.mjs +0 -42
- package/esm2020/common/pipes/digits/digits.pipe.mjs +0 -39
- package/esm2020/common/pipes/truncate/truncate.pipe.mjs +0 -27
- package/esm2020/common/services/icon.service.mjs +0 -1089
- package/esm2020/common/services/router-path.service.mjs +0 -29
- package/esm2020/dialogs/alert-dialog/alert-dialog.component.mjs +0 -23
- package/esm2020/dialogs/confirm-dialog/confirm-dialog.component.mjs +0 -28
- package/esm2020/dialogs/dialog.component.mjs +0 -57
- package/esm2020/dialogs/prompt-dialog/prompt-dialog.component.mjs +0 -75
- package/esm2020/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.mjs +0 -216
- package/esm2020/dialogs/services/dialog.service.mjs +0 -174
- package/esm2020/dialogs/window-dialog/window-dialog.component.mjs +0 -38
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.mjs +0 -30
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.mjs +0 -24
- package/esm2020/dynamic-menu/dynamic-menu.component.mjs +0 -28
- package/esm2020/file/directives/file-drop.directive.mjs +0 -139
- package/esm2020/file/directives/file-select.directive.mjs +0 -77
- package/esm2020/file/file-input/file-input.component.mjs +0 -128
- package/esm2020/file/file-upload/file-upload.component.mjs +0 -174
- package/esm2020/file/services/file.service.mjs +0 -64
- package/esm2020/json-formatter/json-formatter.component.mjs +0 -217
- package/esm2020/layout/layout-card-over/layout-card-over.component.mjs +0 -40
- package/esm2020/layout/layout-footer/layout-footer.component.mjs +0 -33
- package/esm2020/layout/layout-manage-list/layout-manage-list.component.mjs +0 -93
- package/esm2020/layout/layout-nav/layout-nav.component.mjs +0 -50
- package/esm2020/layout/layout-nav-list/layout-nav-list.component.mjs +0 -128
- package/esm2020/layout/layout-toggle.class.mjs +0 -92
- package/esm2020/layout/layout.component.mjs +0 -92
- package/esm2020/layout/navigation-drawer/navigation-drawer.component.mjs +0 -163
- package/esm2020/loading/directives/loading.directive.mjs +0 -126
- package/esm2020/loading/loading.component.mjs +0 -187
- package/esm2020/loading/services/loading.factory.mjs +0 -207
- package/esm2020/loading/services/loading.service.mjs +0 -213
- package/esm2020/message/message.component.mjs +0 -203
- package/esm2020/search/search-box/search-box.component.mjs +0 -194
- package/esm2020/search/search-input/search-input.component.mjs +0 -207
- package/esm2020/side-sheet/side-sheet-container.mjs +0 -274
- package/esm2020/side-sheet/side-sheet-ref.mjs +0 -26
- package/esm2020/side-sheet/side-sheet.content-directives.mjs +0 -201
- package/esm2020/side-sheet/side-sheet.mjs +0 -228
- package/esm2020/user-profile/user-profile-menu/user-profile-menu.component.mjs +0 -23
- package/esm2020/user-profile/user-profile.component.mjs +0 -19
- package/fesm2015/covalent-core-common.mjs +0 -2281
- package/fesm2015/covalent-core-common.mjs.map +0 -1
- package/fesm2015/covalent-core-dialogs.mjs +0 -668
- package/fesm2015/covalent-core-dialogs.mjs.map +0 -1
- package/fesm2015/covalent-core-dynamic-menu.mjs +0 -126
- package/fesm2015/covalent-core-file.mjs +0 -621
- package/fesm2015/covalent-core-file.mjs.map +0 -1
- package/fesm2015/covalent-core-json-formatter.mjs +0 -298
- package/fesm2015/covalent-core-json-formatter.mjs.map +0 -1
- package/fesm2015/covalent-core-layout.mjs +0 -1024
- package/fesm2015/covalent-core-loading.mjs +0 -766
- package/fesm2015/covalent-core-loading.mjs.map +0 -1
- package/fesm2015/covalent-core-message.mjs +0 -284
- package/fesm2015/covalent-core-message.mjs.map +0 -1
- package/fesm2015/covalent-core-search.mjs +0 -430
- package/fesm2015/covalent-core-search.mjs.map +0 -1
- package/fesm2015/covalent-core-side-sheet.mjs +0 -784
- package/fesm2015/covalent-core-side-sheet.mjs.map +0 -1
- package/fesm2015/covalent-core-user-profile.mjs +0 -83
- package/fesm2015/covalent-core-user-profile.mjs.map +0 -1
- package/fesm2020/covalent-core-breadcrumbs.mjs +0 -243
- package/fesm2020/covalent-core-breadcrumbs.mjs.map +0 -1
- package/fesm2020/covalent-core-common.mjs.map +0 -1
- package/fesm2020/covalent-core-dynamic-menu.mjs +0 -126
- package/fesm2020/covalent-core-dynamic-menu.mjs.map +0 -1
- package/fesm2020/covalent-core-layout.mjs.map +0 -1
- package/fesm2020/covalent-core-menu.mjs +0 -37
- package/fesm2020/covalent-core-menu.mjs.map +0 -1
- package/fesm2020/covalent-core-search.mjs +0 -427
- package/fesm2020/covalent-core-search.mjs.map +0 -1
- package/fesm2020/covalent-core-user-profile.mjs +0 -83
- package/fesm2020/covalent-core-user-profile.mjs.map +0 -1
- package/fesm2020/covalent-core.mjs +0 -4
- package/fesm2020/covalent-core.mjs.map +0 -1
- package/file/src/file-input/README.md +0 -147
- package/file/src/file-upload/README.md +0 -136
- package/layout/src/layout-card-over/README.md +0 -43
- package/layout/src/layout-manage-list/README.md +0 -80
- package/layout/src/layout-nav/README.md +0 -50
- package/layout/src/layout-nav-list/README.md +0 -105
- package/search/src/search-box/README.md +0 -73
- package/search/src/search-input/README.md +0 -74
- /package/{esm2020 → esm2022}/breadcrumbs/covalent-core-breadcrumbs.mjs +0 -0
- /package/{esm2020 → esm2022}/breadcrumbs/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/common/animations/bounce/bounce.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/common/animations/collapse/collapse.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/common/animations/common/interfaces.mjs +0 -0
- /package/{esm2020 → esm2022}/common/animations/fade/fadeInOut.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/common/animations/flash/flash.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/common/animations/headshake/headshake.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/common/animations/jello/jello.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/common/animations/pulse/pulse.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/common/animations/rotate/rotate.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/common/covalent-core-common.mjs +0 -0
- /package/{esm2020 → esm2022}/common/forms/validators/validators.mjs +0 -0
- /package/{esm2020 → esm2022}/common/functions/clipboard.mjs +0 -0
- /package/{esm2020 → esm2022}/common/functions/file.mjs +0 -0
- /package/{esm2020 → esm2022}/common/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/covalent-core.mjs +0 -0
- /package/{esm2020 → esm2022}/dialogs/covalent-core-dialogs.mjs +0 -0
- /package/{esm2020 → esm2022}/dialogs/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/dynamic-menu/covalent-core-dynamic-menu.mjs +0 -0
- /package/{esm2020 → esm2022}/dynamic-menu/dynamic-menu.menu.mjs +0 -0
- /package/{esm2020 → esm2022}/dynamic-menu/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/file/covalent-core-file.mjs +0 -0
- /package/{esm2020 → esm2022}/file/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/json-formatter/collapse.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/json-formatter/covalent-core-json-formatter.mjs +0 -0
- /package/{esm2020 → esm2022}/json-formatter/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/layout/covalent-core-layout.mjs +0 -0
- /package/{esm2020 → esm2022}/layout/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/loading/covalent-core-loading.mjs +0 -0
- /package/{esm2020 → esm2022}/loading/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/menu/covalent-core-menu.mjs +0 -0
- /package/{esm2020 → esm2022}/menu/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/message/collapse.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/message/covalent-core-message.mjs +0 -0
- /package/{esm2020 → esm2022}/message/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/search/covalent-core-search.mjs +0 -0
- /package/{esm2020 → esm2022}/search/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/side-sheet/covalent-core-side-sheet.mjs +0 -0
- /package/{esm2020 → esm2022}/side-sheet/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/side-sheet/side-sheet.animation.mjs +0 -0
- /package/{esm2020 → esm2022}/user-profile/covalent-core-user-profile.mjs +0 -0
- /package/{esm2020 → esm2022}/user-profile/public_api.mjs +0 -0
- /package/{fesm2015 → fesm2022}/covalent-core.mjs +0 -0
- /package/{fesm2015 → fesm2022}/covalent-core.mjs.map +0 -0
@@ -1,147 +0,0 @@
|
|
1
|
-
## TdFileInputComponent: td-file-input
|
2
|
-
|
3
|
-
## Usage
|
4
|
-
|
5
|
-
Add the element wherever you want to bind a [File | FileList] into a class model without additional elements.
|
6
|
-
|
7
|
-
Can also drop a file(s) into the component to bind the file(s) to it.
|
8
|
-
|
9
|
-
Example for usage:
|
10
|
-
|
11
|
-
```html
|
12
|
-
<td-file-input
|
13
|
-
[(ngModel)]="files"
|
14
|
-
color="primary"
|
15
|
-
(selectFile)="selectEvent($event)"
|
16
|
-
accept=".ext,.anotherExt"
|
17
|
-
[disabled]="disabled"
|
18
|
-
multiple
|
19
|
-
>
|
20
|
-
<mat-icon>attach_file</mat-icon><span>Choose a file...</span>
|
21
|
-
</td-file-input>
|
22
|
-
```
|
23
|
-
|
24
|
-
```typescript
|
25
|
-
export class Demo {
|
26
|
-
|
27
|
-
files: File | FileList;
|
28
|
-
disabled: boolean = false;
|
29
|
-
|
30
|
-
selectEvent(files: FileList | File): void {
|
31
|
-
if (files instanceof FileList) {
|
32
|
-
...
|
33
|
-
} else {
|
34
|
-
...
|
35
|
-
}
|
36
|
-
};
|
37
|
-
}
|
38
|
-
```
|
39
|
-
|
40
|
-
## API Summary
|
41
|
-
|
42
|
-
#### Inputs
|
43
|
-
|
44
|
-
- color: string
|
45
|
-
- Sets button color. Uses same color palette accepted as [MatButton].
|
46
|
-
- multiple: boolean
|
47
|
-
- Sets if multiple files can be dropped/selected at once in [TdFileUploadComponent].
|
48
|
-
- accept: string
|
49
|
-
- Sets files accepted when opening the file browser dialog. Same as "accept" attribute in `<input/>` element.
|
50
|
-
- disabled: boolean
|
51
|
-
- Disables [TdFileUploadComponent] and clears selected/dropped files.
|
52
|
-
|
53
|
-
#### Events
|
54
|
-
|
55
|
-
- selectFile: function($event)
|
56
|
-
- Event emitted when a file is selected.
|
57
|
-
- Emits a [File or FileList] object.
|
58
|
-
|
59
|
-
#### Methods
|
60
|
-
|
61
|
-
- clear: function
|
62
|
-
- Used to clear the selected files from the [TdFileInputComponent].
|
63
|
-
|
64
|
-
## Setup
|
65
|
-
|
66
|
-
Import the [CovalentFileModule] in your NgModule:
|
67
|
-
|
68
|
-
```typescript
|
69
|
-
import { CovalentFileModule } from '@covalent/core/file';
|
70
|
-
@NgModule({
|
71
|
-
imports: [
|
72
|
-
CovalentFileModule,
|
73
|
-
...
|
74
|
-
],
|
75
|
-
...
|
76
|
-
})
|
77
|
-
export class MyModule {}
|
78
|
-
```
|
79
|
-
|
80
|
-
---
|
81
|
-
|
82
|
-
## TdFileSelectDirective: tdFileSelect
|
83
|
-
|
84
|
-
## Usage
|
85
|
-
|
86
|
-
Add the directive wherever you want to bind a [File | FileList] into a class model to an existing <input type="file"/> element.
|
87
|
-
|
88
|
-
Uses optional [(ngModel)] directive to bind file. (if [(ngModel]) exists, [fileSelect] is omitted)
|
89
|
-
|
90
|
-
Example for usage:
|
91
|
-
|
92
|
-
```html
|
93
|
-
<input type="file" tdFileSelect (fileSelect)="files = $event" multiple />
|
94
|
-
```
|
95
|
-
|
96
|
-
## API Summary
|
97
|
-
|
98
|
-
#### Inputs
|
99
|
-
|
100
|
-
- multiple: boolean
|
101
|
-
- Sets whether multiple files can be selected at once in host element, or just a single file.
|
102
|
-
- Can also be "multiple" native attribute.
|
103
|
-
|
104
|
-
#### Events
|
105
|
-
|
106
|
-
- fileSelect: function($event)
|
107
|
-
- Event emitted when a file or files are selected in host [HTMLInputElement].
|
108
|
-
- Emits a [FileList or File] object. Alternative to not use [(ngModel)].
|
109
|
-
|
110
|
-
## TdFileDropDirective: tdFileDrop
|
111
|
-
|
112
|
-
## Usage
|
113
|
-
|
114
|
-
Add the directive wherever you want to add drop support to an element to bind a [File | FileList] into a class model.
|
115
|
-
|
116
|
-
To add effect when <code>ondragenter</code> event is executed, override <code>.drop-zone</code> class in the context you are using it.
|
117
|
-
|
118
|
-
Note: if element has child elements, add <code>\* { pointer-events: none; }</code> to avoid event being thrown again while navigating in child elements.
|
119
|
-
|
120
|
-
Example for usage:
|
121
|
-
|
122
|
-
```html
|
123
|
-
<div
|
124
|
-
tdFileDrop
|
125
|
-
(fileDrop)="files = $event"
|
126
|
-
multiple
|
127
|
-
[disabled]="disabled"
|
128
|
-
></div>
|
129
|
-
```
|
130
|
-
|
131
|
-
## API Summary
|
132
|
-
|
133
|
-
#### Inputs
|
134
|
-
|
135
|
-
- multiple: boolean
|
136
|
-
- Sets whether multiple files can be dropped at once in host element, or just a single file.
|
137
|
-
- Can also be "multiple" native attribute.
|
138
|
-
- disabled: boolean
|
139
|
-
- Disabled drop events for host element.
|
140
|
-
|
141
|
-
#### Events
|
142
|
-
|
143
|
-
- fileDrop: function($event)
|
144
|
-
- Event emitted when a file or files are dropped in host element after being validated.
|
145
|
-
- Emits a [FileList or File] object.
|
146
|
-
|
147
|
-
|
@@ -1,136 +0,0 @@
|
|
1
|
-
## TdFileUploadComponent: td-file-upload
|
2
|
-
|
3
|
-
## Usage
|
4
|
-
|
5
|
-
Perfect component for file selection and upload in simple flows. Uses `TdFileInputComponent` internally.
|
6
|
-
|
7
|
-
Example for usage:
|
8
|
-
|
9
|
-
```html
|
10
|
-
<td-file-upload
|
11
|
-
#fileUpload
|
12
|
-
[(ngModel)]="files"
|
13
|
-
defaultColor="accent"
|
14
|
-
activeColor="warn"
|
15
|
-
cancelColor="primary"
|
16
|
-
(selectFile)="selectEvent($event)"
|
17
|
-
(upload)="uploadEvent($event)"
|
18
|
-
(cancel)="cancelEvent()"
|
19
|
-
accept=".ext,.anotherExt"
|
20
|
-
[disabled]="disabled"
|
21
|
-
multiple
|
22
|
-
>
|
23
|
-
<mat-icon>file_upload</mat-icon><span>{{ files?.name }}</span>
|
24
|
-
<ng-template td-file-input-label>
|
25
|
-
<mat-icon>attach_file</mat-icon>
|
26
|
-
<span> Choose a file... </span>
|
27
|
-
</ng-template>
|
28
|
-
</td-file-upload>
|
29
|
-
```
|
30
|
-
|
31
|
-
```typescript
|
32
|
-
export class Demo {
|
33
|
-
|
34
|
-
files: File | FileList;
|
35
|
-
disabled: boolean = false;
|
36
|
-
|
37
|
-
selectEvent(files: FileList | File): void {
|
38
|
-
if (files instanceof FileList) {
|
39
|
-
...
|
40
|
-
} else {
|
41
|
-
...
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
uploadEvent(files: FileList | File): void {
|
46
|
-
if (files instanceof FileList) {
|
47
|
-
...
|
48
|
-
} else {
|
49
|
-
...
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
cancelEvent(): void {
|
54
|
-
...
|
55
|
-
}
|
56
|
-
}
|
57
|
-
```
|
58
|
-
|
59
|
-
## API Summary
|
60
|
-
|
61
|
-
#### Inputs
|
62
|
-
|
63
|
-
- defaultColor: string
|
64
|
-
- Sets browse button color. Uses same color palette accepted as [MatButton] and defaults to 'primary'.
|
65
|
-
- activeColor: string
|
66
|
-
- Sets upload button color. Uses same color palette accepted as [MatButton] and defaults to 'accent'.
|
67
|
-
- cancelColor: string
|
68
|
-
- Sets cancel button color. Uses same color palette accepted as [MatButton] and defaults to 'warn'.
|
69
|
-
- multiple: boolean
|
70
|
-
- Sets if multiple files can be dropped/selected at once in [TdFileUploadComponent].
|
71
|
-
- accept: string
|
72
|
-
- Sets files accepted when opening the file browser dialog. Same as "accept" attribute in `<input/>` element.
|
73
|
-
- disabled: boolean
|
74
|
-
- Disables [TdFileUploadComponent] and clears selected/dropped files.
|
75
|
-
|
76
|
-
#### Events
|
77
|
-
|
78
|
-
- upload: function($event)
|
79
|
-
- Event emitted when upload button is clicked. Emits a [File or FileList] object.
|
80
|
-
- selectFile: function($event)
|
81
|
-
- Event emitted when a file is selected. Emits a [File or FileList] object.
|
82
|
-
- cancel: function
|
83
|
-
- Event emitted when cancel button is clicked.
|
84
|
-
|
85
|
-
#### Methods
|
86
|
-
|
87
|
-
- cancel: function
|
88
|
-
- Method used to clear the files selected.
|
89
|
-
|
90
|
-
## Setup
|
91
|
-
|
92
|
-
Import the [CovalentFileModule] in your NgModule:
|
93
|
-
|
94
|
-
```typescript
|
95
|
-
import { CovalentFileModule } from '@covalent/core/file';
|
96
|
-
@NgModule({
|
97
|
-
imports: [
|
98
|
-
CovalentFileModule,
|
99
|
-
...
|
100
|
-
],
|
101
|
-
...
|
102
|
-
})
|
103
|
-
export class MyModule {}
|
104
|
-
```
|
105
|
-
|
106
|
-
## tdFileService
|
107
|
-
|
108
|
-
Service provided with methods that wrap complexity for as easier file upload experience.
|
109
|
-
|
110
|
-
## API Summary
|
111
|
-
|
112
|
-
#### Methods
|
113
|
-
|
114
|
-
- send: function(url: string, method: string, body: File | FormData, uploadExtras: IUploadExtras)
|
115
|
-
- Uploads a file to a URL.
|
116
|
-
|
117
|
-
## Usage
|
118
|
-
|
119
|
-
```typescript
|
120
|
-
import { TdFileService } from '@covalent/core/file';
|
121
|
-
|
122
|
-
export class Demo {
|
123
|
-
|
124
|
-
file: File;
|
125
|
-
|
126
|
-
constructor(private fileUploadService: TdFileService) {
|
127
|
-
};
|
128
|
-
|
129
|
-
uploadEvent1(file: File) {
|
130
|
-
this.fileService.send('https://url.to/API', 'post', file).subscribe((response) => {
|
131
|
-
...
|
132
|
-
});
|
133
|
-
};
|
134
|
-
|
135
|
-
}
|
136
|
-
```
|
@@ -1,43 +0,0 @@
|
|
1
|
-
## TdLayoutCardOverComponent: td-layout-card-over
|
2
|
-
|
3
|
-
`<td-layout-card-over>` is a layout component which lets you customize a `card over` view.
|
4
|
-
|
5
|
-
## API Summary
|
6
|
-
|
7
|
-
#### Inputs
|
8
|
-
|
9
|
-
- cardTitle: string
|
10
|
-
- Title set in card.
|
11
|
-
- cardSubtitle: string
|
12
|
-
- Subtitle set in card.
|
13
|
-
- cardWidth: string
|
14
|
-
- Card flex width in %.
|
15
|
-
- Defaults to 70.
|
16
|
-
- color: string
|
17
|
-
- Optional toolbar color.
|
18
|
-
- Defaults to primary.
|
19
|
-
|
20
|
-
## Usage
|
21
|
-
|
22
|
-
`[td-after-card]` is used to include content after the main card over content.
|
23
|
-
|
24
|
-
`td-layout-footer` is used to include items in the footer.
|
25
|
-
|
26
|
-
Example for Card Over Layout / Nav Layout combo:
|
27
|
-
|
28
|
-
```html
|
29
|
-
<td-layout-nav toolbarTitle="title" logo="logo" icon="icon" color="primary">
|
30
|
-
<td-layout-card-over
|
31
|
-
cardTitle="title"
|
32
|
-
cardSubtitle="subtitle"
|
33
|
-
cardWidth="widthIn%"
|
34
|
-
color="primary"
|
35
|
-
>
|
36
|
-
.. main content
|
37
|
-
<div td-after-card>.. content after card</div>
|
38
|
-
</td-layout-card-over>
|
39
|
-
<td-layout-footer color="primary">
|
40
|
-
// color is optional ... main footer content
|
41
|
-
</td-layout-footer>
|
42
|
-
</td-layout-nav>
|
43
|
-
```
|
@@ -1,80 +0,0 @@
|
|
1
|
-
## TdLayoutManageListComponent: td-layout-manage-list
|
2
|
-
|
3
|
-
`<td-layout-manage-list>` is a layout component which lets you customize a `management` view with toolbar items, item selections and footers.
|
4
|
-
|
5
|
-
## API Summary
|
6
|
-
|
7
|
-
#### Inputs
|
8
|
-
|
9
|
-
- mode: 'over' | 'side' | 'push'
|
10
|
-
- The mode or styling of the sidenav. Defaults to 'side'.
|
11
|
-
- opened: boolean
|
12
|
-
- Whether or not the sidenav is opened.
|
13
|
-
- Use this binding to open/close the sidenav.
|
14
|
-
- Defaults to 'true'.
|
15
|
-
- sidenavWidth: string
|
16
|
-
- Sets the 'width' of the sidenav in either 'px' or '%'.
|
17
|
-
- Defaults to '257px'.
|
18
|
-
- containerAutosize: boolean
|
19
|
-
- Sets 'autosize' of the sidenav-container.
|
20
|
-
- Defaults to 'false'.
|
21
|
-
|
22
|
-
## Usage
|
23
|
-
|
24
|
-
To toggle/close/open the manage list sidenav from child layouts/components, you can use the `[tdLayoutManageListToggle]`, `[tdLayoutManageListClose]` or `[tdLayoutManageListOpen]` directives on any element and its click event will trigger the sidenav action.
|
25
|
-
|
26
|
-
Example:
|
27
|
-
|
28
|
-
```html
|
29
|
-
<button
|
30
|
-
mat-icon-button
|
31
|
-
[tdLayoutManageListToggle]="true"
|
32
|
-
[hideWhenOpened]="true"
|
33
|
-
>
|
34
|
-
// or tdLayoutManageListOpen / tdLayoutManageListClose
|
35
|
-
<mat-icon>menu</mat-icon>
|
36
|
-
</button>
|
37
|
-
```
|
38
|
-
|
39
|
-
To disable the sidenav action, just set the input to false.
|
40
|
-
|
41
|
-
```html
|
42
|
-
<button mat-icon-button [tdLayoutManageListToggle]="false">
|
43
|
-
<mat-icon>menu</mat-icon>
|
44
|
-
</button>
|
45
|
-
```
|
46
|
-
|
47
|
-
`[td-sidenav-content]` is used to include items in the left side list.
|
48
|
-
|
49
|
-
`[td-toolbar-content]` is used to include items in the toolbar.
|
50
|
-
|
51
|
-
`td-layout-footer-inner` is used to include items in the inner footer.
|
52
|
-
|
53
|
-
`[tdLayoutManageListToggle]` is used to add the sidenav toggle behavior to any clickable element.
|
54
|
-
|
55
|
-
`[tdLayoutManageListClose]` is used to add the sidenav close behavior to any clickable element.
|
56
|
-
|
57
|
-
`[tdLayoutManageListOpen]` is used to add the sidenav open behavior to any clickable element.
|
58
|
-
|
59
|
-
Example for Manage List Layout / Nav Layout combo:
|
60
|
-
|
61
|
-
```html
|
62
|
-
<td-layout-nav sidenavTitle="title" logo="logo" icon="icon" color="primary">
|
63
|
-
<div td-toolbar-content>.. main toolbar content</div>
|
64
|
-
<td-layout-manage-list opened="true" mode="side" sidenavWidth="257px">
|
65
|
-
<mat-toolbar td-sidenav-content> ... toolbar in sidenav </mat-toolbar>
|
66
|
-
<mat-nav-list td-sidenav-content> ... sidenav content </mat-nav-list>
|
67
|
-
<mat-toolbar>
|
68
|
-
<button mat-icon-button tdLayoutManageListOpen [hideWhenOpened]="true">
|
69
|
-
<mat-icon>arrow_back</mat-icon>
|
70
|
-
</button>
|
71
|
-
... sub toolbar content
|
72
|
-
</mat-toolbar>
|
73
|
-
... main content
|
74
|
-
<td-layout-footer-inner> ... sub footer content </td-layout-footer-inner>
|
75
|
-
</td-layout-manage-list>
|
76
|
-
<td-layout-footer color="primary">
|
77
|
-
// color is optional ... main footer content
|
78
|
-
</td-layout-footer>
|
79
|
-
</td-layout-nav>
|
80
|
-
```
|
@@ -1,50 +0,0 @@
|
|
1
|
-
## TdLayoutNavComponent: td-layout-nav
|
2
|
-
|
3
|
-
`<td-layout-nav>` is a layout component which lets you customize a `navigation` view with toolbar items and footers.
|
4
|
-
|
5
|
-
## API Summary
|
6
|
-
|
7
|
-
#### Inputs
|
8
|
-
|
9
|
-
- toolbarTitle: string
|
10
|
-
- Title set in toolbar.
|
11
|
-
- icon: string
|
12
|
-
- Icon name to be displayed before the title.
|
13
|
-
- logo: string
|
14
|
-
- Logo icon name to be displayed before the title.
|
15
|
-
- If [icon] is set, then this will not be shown.
|
16
|
-
- color: string
|
17
|
-
- Optional toolbar color.
|
18
|
-
- Defaults to primary.
|
19
|
-
- navigationRoute: string
|
20
|
-
- Option to set the combined route for the icon, logo, and toolbarTitle.
|
21
|
-
|
22
|
-
## Usage
|
23
|
-
|
24
|
-
`[td-menu-button]` is used to include a menu button before the logo and title.
|
25
|
-
|
26
|
-
`[td-toolbar-content]` is used to include items in the toolbar.
|
27
|
-
|
28
|
-
`td-layout-footer` is used to include items in the footer.
|
29
|
-
|
30
|
-
Example for Nav Layout:
|
31
|
-
|
32
|
-
```html
|
33
|
-
<td-layout-nav
|
34
|
-
toolbarTitle="title"
|
35
|
-
logo="logo"
|
36
|
-
icon="icon"
|
37
|
-
color="primary"
|
38
|
-
navigationRoute="/"
|
39
|
-
>
|
40
|
-
<button mat-icon-button td-menu-button>
|
41
|
-
// can use `[tdLayoutToggle]` to toggle main sidenav
|
42
|
-
<mat-icon>menu</mat-icon>
|
43
|
-
</button>
|
44
|
-
<div td-toolbar-content>.. main toolbar content</div>
|
45
|
-
... main content
|
46
|
-
<td-layout-footer color="primary">
|
47
|
-
// color is optional ... main footer content
|
48
|
-
</td-layout-footer>
|
49
|
-
</td-layout-nav>
|
50
|
-
```
|
@@ -1,105 +0,0 @@
|
|
1
|
-
## TdLayoutNavListComponent: td-layout-nav-list
|
2
|
-
|
3
|
-
`<td-layout-nav-list>` is a layout component which lets you customize a `navigation` list view with toolbar items, item selections and footers.
|
4
|
-
|
5
|
-
## API Summary
|
6
|
-
|
7
|
-
#### Inputs
|
8
|
-
|
9
|
-
- toolbarTitle: string
|
10
|
-
- Title set in toolbar.
|
11
|
-
- icon: string
|
12
|
-
- Icon name to be displayed before the title.
|
13
|
-
- logo: string
|
14
|
-
- Logo icon name to be displayed before the title.
|
15
|
-
- If [icon] is set, then this will not be shown.
|
16
|
-
- color: string
|
17
|
-
- optional toolbar color.
|
18
|
-
- Defaults to primary.
|
19
|
-
- navigationRoute: string
|
20
|
-
- option to set the combined route for the icon, logo, and toolbarTitle.
|
21
|
-
- mode: 'over' | 'side' | 'push'
|
22
|
-
- The mode or styling of the sidenav.
|
23
|
-
- Defaults to 'side'.
|
24
|
-
- opened: boolean
|
25
|
-
- Whether or not the sidenav is opened.
|
26
|
-
- Use this binding to open/close the sidenav.
|
27
|
-
- Defaults to 'true'.
|
28
|
-
- sidenavWidth: string
|
29
|
-
- Sets the 'width' of the sidenav in either 'px' or '%'.
|
30
|
-
- Defaults to '257px'.
|
31
|
-
- containerAutosize: boolean
|
32
|
-
- Sets 'autosize' of the sidenav-container.
|
33
|
-
- Defaults to 'false'.
|
34
|
-
|
35
|
-
## Usage
|
36
|
-
|
37
|
-
To toggle/close/open the nav list sidenav from child layouts/components, you can use the `[tdLayoutNavListToggle]`, `[tdLayoutNavListClose]` or `[tdLayoutNavListOpen]` directives on any element and its click event will trigger the sidenav action.
|
38
|
-
|
39
|
-
Example:
|
40
|
-
|
41
|
-
```html
|
42
|
-
<button mat-icon-button [tdLayoutNavListToggle]="true" [hideWhenOpened]="true">
|
43
|
-
// or tdLayoutNavListOpen / tdLayoutNavListClose
|
44
|
-
<mat-icon>menu</mat-icon>
|
45
|
-
</button>
|
46
|
-
```
|
47
|
-
|
48
|
-
To disable the sidenav action, just set the input to false.
|
49
|
-
|
50
|
-
```html
|
51
|
-
<button mat-icon-button [tdLayoutNavListToggle]="false">
|
52
|
-
<mat-icon>menu</mat-icon>
|
53
|
-
</button>
|
54
|
-
```
|
55
|
-
|
56
|
-
`[td-menu-button]` is used to include a menu button before the logo and title.
|
57
|
-
|
58
|
-
`[td-sidenav-content]` is used to include items in the left side list.
|
59
|
-
|
60
|
-
`[td-sidenav-toolbar-content]` is used to include items in the left toolbar.
|
61
|
-
|
62
|
-
`[td-toolbar-content]` is used to include items in the right toolbar.
|
63
|
-
|
64
|
-
`td-layout-footer-inner` is used to include items in the inner footer.
|
65
|
-
|
66
|
-
`td-layout-footer` is used to include items in the main footer.
|
67
|
-
|
68
|
-
`[tdLayoutNavListToggle]` is used to add the sidenav toggle behavior to any clickable element.
|
69
|
-
|
70
|
-
`[tdLayoutNavListClose]` is used to add the sidenav close behavior to any clickable element.
|
71
|
-
|
72
|
-
`[tdLayoutNavListOpen]` is used to add the sidenav open behavior to any clickable element.
|
73
|
-
|
74
|
-
Example for Nav List Layout:
|
75
|
-
|
76
|
-
```html
|
77
|
-
<td-layout-nav-list
|
78
|
-
sidenavTitle="title"
|
79
|
-
logo="logo"
|
80
|
-
icon="icon"
|
81
|
-
opened="true"
|
82
|
-
mode="side"
|
83
|
-
sidenavWidth="350px"
|
84
|
-
color="primary"
|
85
|
-
navigationRoute="/"
|
86
|
-
>
|
87
|
-
<button mat-icon-button td-menu-button>
|
88
|
-
// can use `[tdLayoutToggle]` to toggle main sidenav
|
89
|
-
<mat-icon>menu</mat-icon>
|
90
|
-
</button>
|
91
|
-
<div td-sidenav-toolbar-content>... left toolbar content</div>
|
92
|
-
<mat-nav-list td-sidenav-content>
|
93
|
-
<button mat-icon-button tdLayoutNavListOpen [hideWhenOpened]="true">
|
94
|
-
<mat-icon>arrow_back</mat-icon>
|
95
|
-
</button>
|
96
|
-
... sidenav content
|
97
|
-
</mat-nav-list>
|
98
|
-
<div td-toolbar-content>... right toolbar content</div>
|
99
|
-
... main content
|
100
|
-
<td-layout-footer-inner> ... sub footer content </td-layout-footer-inner>
|
101
|
-
<td-layout-footer color="primary">
|
102
|
-
// color is optional ... main footer content
|
103
|
-
</td-layout-footer>
|
104
|
-
</td-layout-nav-list>
|
105
|
-
```
|
@@ -1,73 +0,0 @@
|
|
1
|
-
# TdSearchBoxComponent: td-search-box
|
2
|
-
|
3
|
-
`td-search-box` element to generate a search box with animations.
|
4
|
-
|
5
|
-
## API Summary
|
6
|
-
|
7
|
-
#### Inputs
|
8
|
-
|
9
|
-
- backIcon?: string
|
10
|
-
- The icon used to close the search toggle, only shown when [alwaysVisible] is false. Defaults to 'search' icon.
|
11
|
-
- searchIcon?: string
|
12
|
-
- The icon used to open/focus the search toggle. Defaults to 'search' icon.
|
13
|
-
- clearIcon?: string
|
14
|
-
- The icon used to clear the search input. Defaults to 'cancel' icon.
|
15
|
-
- showUnderline?: boolean
|
16
|
-
- Sets if the input underline should be visible. Defaults to 'false'.
|
17
|
-
- debounce?: number
|
18
|
-
- Debounce timeout between keypresses. Defaults to 400.
|
19
|
-
- alwaysVisible?: boolean
|
20
|
-
- Sets if the input should always be visible. Defaults to 'false'.
|
21
|
-
- placeholder?: string
|
22
|
-
- Placeholder for the underlying input component.
|
23
|
-
|
24
|
-
#### Events
|
25
|
-
|
26
|
-
- searchDebounce?: string
|
27
|
-
- Event emitted after the [debounce] timeout.
|
28
|
-
- Emits a [string].
|
29
|
-
- search?: string
|
30
|
-
- Event emitted after the key enter has been pressed.
|
31
|
-
- Emits a [string].
|
32
|
-
- clear?: string
|
33
|
-
- Event emitted after the clear icon has been clicked.
|
34
|
-
- Emits [void].
|
35
|
-
- blur: function
|
36
|
-
- Event emitted after the blur event has been called in underlying input.
|
37
|
-
- Emits [void].
|
38
|
-
|
39
|
-
## Setup
|
40
|
-
|
41
|
-
Import the [CovalentSearchModule] in your NgModule:
|
42
|
-
|
43
|
-
```typescript
|
44
|
-
import { CovalentSearchModule } from '@covalent/core/search';
|
45
|
-
@NgModule({
|
46
|
-
imports: [
|
47
|
-
CovalentSearchModule,
|
48
|
-
...
|
49
|
-
],
|
50
|
-
...
|
51
|
-
})
|
52
|
-
export class MyModule {}
|
53
|
-
```
|
54
|
-
|
55
|
-
## Usage
|
56
|
-
|
57
|
-
Example for HTML usage:
|
58
|
-
|
59
|
-
```html
|
60
|
-
<td-search-box
|
61
|
-
backIcon="arrow_back"
|
62
|
-
placeholder="Search here"
|
63
|
-
[(ngModel)]="searchInputTerm"
|
64
|
-
[showUnderline]="false|true"
|
65
|
-
[debounce]="500"
|
66
|
-
[alwaysVisible]="false|true"
|
67
|
-
(searchDebounce)="searchInputTerm = $event"
|
68
|
-
(search)="searchInputTerm = $event"
|
69
|
-
(clear)="searchInputTerm = ''"
|
70
|
-
(blur)="onBlurEvent()"
|
71
|
-
>
|
72
|
-
</td-search-box>
|
73
|
-
```
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# TdSearchInputComponent: td-search-input
|
2
|
-
|
3
|
-
`td-search-input` element to generate a search input with its animated cancel button.
|
4
|
-
|
5
|
-
## API Summary
|
6
|
-
|
7
|
-
#### Inputs
|
8
|
-
|
9
|
-
- debounce?: number
|
10
|
-
- Debounce timeout between keypresses. Defaults to 400.
|
11
|
-
- placeholder?: string
|
12
|
-
- Placeholder for the underlying input component.
|
13
|
-
- showUnderline?: boolean
|
14
|
-
- Sets if the input underline should be visible. Defaults to 'false'.
|
15
|
-
- clearIcon?: string
|
16
|
-
- The icon used to clear the search input. Defaults to 'cancel' icon.
|
17
|
-
- appearance?: MatFormFieldAppearance
|
18
|
-
- Appearance style for the underlying input component.
|
19
|
-
|
20
|
-
#### Events
|
21
|
-
|
22
|
-
- searchDebounce: function
|
23
|
-
- Event emitted after the [debounce] timeout.
|
24
|
-
- Emits a [string].
|
25
|
-
- search: function
|
26
|
-
- Event emitted after the key enter has been pressed.
|
27
|
-
- Emits a [string].
|
28
|
-
- clear: function
|
29
|
-
- Event emitted after the clear icon has been clicked.
|
30
|
-
- Emits [void].
|
31
|
-
- blur: function
|
32
|
-
- Event emitted after the blur event has been called in underlying input.
|
33
|
-
- Emits [void].
|
34
|
-
|
35
|
-
#### Methods
|
36
|
-
|
37
|
-
- focus: function
|
38
|
-
- Method to focus to underlying input.
|
39
|
-
- clearSearch: function
|
40
|
-
- Method to clear the underlying input.
|
41
|
-
|
42
|
-
## Setup
|
43
|
-
|
44
|
-
Import the [CovalentSearchModule] in your NgModule:
|
45
|
-
|
46
|
-
```typescript
|
47
|
-
import { CovalentSearchModule } from '@covalent/core/search';
|
48
|
-
@NgModule({
|
49
|
-
imports: [
|
50
|
-
CovalentSearchModule,
|
51
|
-
...
|
52
|
-
],
|
53
|
-
...
|
54
|
-
})
|
55
|
-
export class MyModule {}
|
56
|
-
```
|
57
|
-
|
58
|
-
## Usage
|
59
|
-
|
60
|
-
Example for HTML usage:
|
61
|
-
|
62
|
-
```html
|
63
|
-
<td-search-input
|
64
|
-
appearance="fill|outline"
|
65
|
-
placeholder="Search here"
|
66
|
-
[(ngModel)]="searchInputTerm"
|
67
|
-
[showUnderline]="false|true"
|
68
|
-
[debounce]="500"
|
69
|
-
(searchDebounce)="searchInputTerm = $event"
|
70
|
-
(search)="searchInputTerm = $event"
|
71
|
-
(clear)="searchInputTerm = ''"
|
72
|
-
>
|
73
|
-
</td-search-input>
|
74
|
-
```
|