@covalent/core 3.1.0 → 3.1.2-beta.6
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/covalent-core-breadcrumbs.metadata.json +1 -1
- package/breadcrumbs/package.json +1 -3
- package/bundles/covalent-core-breadcrumbs.umd.js +131 -167
- package/bundles/covalent-core-breadcrumbs.umd.js.map +1 -1
- package/bundles/covalent-core-breadcrumbs.umd.min.js +1 -1
- package/bundles/covalent-core-breadcrumbs.umd.min.js.map +1 -1
- package/bundles/covalent-core-chips.umd.js +533 -708
- package/bundles/covalent-core-chips.umd.js.map +1 -1
- package/bundles/covalent-core-chips.umd.min.js +12 -12
- package/bundles/covalent-core-chips.umd.min.js.map +1 -1
- package/bundles/covalent-core-common.umd.js +566 -571
- package/bundles/covalent-core-common.umd.js.map +1 -1
- package/bundles/covalent-core-common.umd.min.js +13 -12
- package/bundles/covalent-core-common.umd.min.js.map +1 -1
- package/bundles/covalent-core-data-table.umd.js +727 -1038
- package/bundles/covalent-core-data-table.umd.js.map +1 -1
- package/bundles/covalent-core-data-table.umd.min.js +12 -12
- package/bundles/covalent-core-data-table.umd.min.js.map +1 -1
- package/bundles/covalent-core-dialogs.umd.js +515 -592
- package/bundles/covalent-core-dialogs.umd.js.map +1 -1
- package/bundles/covalent-core-dialogs.umd.min.js +1 -15
- package/bundles/covalent-core-dialogs.umd.min.js.map +1 -1
- package/bundles/covalent-core-dynamic-menu.umd.js +73 -62
- package/bundles/covalent-core-dynamic-menu.umd.js.map +1 -1
- package/bundles/covalent-core-dynamic-menu.umd.min.js +1 -1
- package/bundles/covalent-core-dynamic-menu.umd.min.js.map +1 -1
- package/bundles/covalent-core-expansion-panel.umd.js +465 -449
- package/bundles/covalent-core-expansion-panel.umd.js.map +1 -1
- package/bundles/covalent-core-expansion-panel.umd.min.js +12 -12
- package/bundles/covalent-core-expansion-panel.umd.min.js.map +1 -1
- package/bundles/covalent-core-file.umd.js +533 -598
- package/bundles/covalent-core-file.umd.js.map +1 -1
- package/bundles/covalent-core-file.umd.min.js +13 -12
- package/bundles/covalent-core-file.umd.min.js.map +1 -1
- package/bundles/covalent-core-json-formatter.umd.js +101 -152
- package/bundles/covalent-core-json-formatter.umd.js.map +1 -1
- package/bundles/covalent-core-json-formatter.umd.min.js +1 -1
- package/bundles/covalent-core-json-formatter.umd.min.js.map +1 -1
- package/bundles/covalent-core-layout.umd.js +845 -883
- package/bundles/covalent-core-layout.umd.js.map +1 -1
- package/bundles/covalent-core-layout.umd.min.js +13 -12
- package/bundles/covalent-core-layout.umd.min.js.map +1 -1
- package/bundles/covalent-core-loading.umd.js +481 -723
- package/bundles/covalent-core-loading.umd.js.map +1 -1
- package/bundles/covalent-core-loading.umd.min.js +12 -12
- package/bundles/covalent-core-loading.umd.min.js.map +1 -1
- package/bundles/covalent-core-media.umd.js +395 -375
- package/bundles/covalent-core-media.umd.js.map +1 -1
- package/bundles/covalent-core-media.umd.min.js +12 -12
- package/bundles/covalent-core-media.umd.min.js.map +1 -1
- package/bundles/covalent-core-menu.umd.js +37 -17
- package/bundles/covalent-core-menu.umd.js.map +1 -1
- package/bundles/covalent-core-menu.umd.min.js +1 -1
- package/bundles/covalent-core-menu.umd.min.js.map +1 -1
- package/bundles/covalent-core-message.umd.js +96 -152
- package/bundles/covalent-core-message.umd.js.map +1 -1
- package/bundles/covalent-core-message.umd.min.js +1 -1
- package/bundles/covalent-core-message.umd.min.js.map +1 -1
- package/bundles/covalent-core-nav-links.umd.js +63 -75
- package/bundles/covalent-core-nav-links.umd.js.map +1 -1
- package/bundles/covalent-core-nav-links.umd.min.js +1 -1
- package/bundles/covalent-core-nav-links.umd.min.js.map +1 -1
- package/bundles/covalent-core-notifications.umd.js +77 -101
- package/bundles/covalent-core-notifications.umd.js.map +1 -1
- package/bundles/covalent-core-notifications.umd.min.js +1 -1
- package/bundles/covalent-core-notifications.umd.min.js.map +1 -1
- package/bundles/covalent-core-paging.umd.js +89 -166
- package/bundles/covalent-core-paging.umd.js.map +1 -1
- package/bundles/covalent-core-paging.umd.min.js +1 -1
- package/bundles/covalent-core-paging.umd.min.js.map +1 -1
- package/bundles/covalent-core-search.umd.js +469 -418
- package/bundles/covalent-core-search.umd.js.map +1 -1
- package/bundles/covalent-core-search.umd.min.js +12 -12
- package/bundles/covalent-core-search.umd.min.js.map +1 -1
- package/bundles/covalent-core-sidesheet.umd.js +72 -52
- package/bundles/covalent-core-sidesheet.umd.js.map +1 -1
- package/bundles/covalent-core-sidesheet.umd.min.js +1 -1
- package/bundles/covalent-core-sidesheet.umd.min.js.map +1 -1
- package/bundles/covalent-core-steps.umd.js +663 -822
- package/bundles/covalent-core-steps.umd.js.map +1 -1
- package/bundles/covalent-core-steps.umd.min.js +12 -12
- package/bundles/covalent-core-steps.umd.min.js.map +1 -1
- package/bundles/covalent-core-tab-select.umd.js +446 -385
- package/bundles/covalent-core-tab-select.umd.js.map +1 -1
- package/bundles/covalent-core-tab-select.umd.min.js +12 -12
- package/bundles/covalent-core-tab-select.umd.min.js.map +1 -1
- package/bundles/covalent-core-user-profile.umd.js +65 -48
- package/bundles/covalent-core-user-profile.umd.js.map +1 -1
- package/bundles/covalent-core-user-profile.umd.min.js +1 -1
- package/bundles/covalent-core-user-profile.umd.min.js.map +1 -1
- package/bundles/covalent-core-virtual-scroll.umd.js +412 -356
- package/bundles/covalent-core-virtual-scroll.umd.js.map +1 -1
- package/bundles/covalent-core-virtual-scroll.umd.min.js +12 -12
- package/bundles/covalent-core-virtual-scroll.umd.min.js.map +1 -1
- package/bundles/covalent-core.umd.js +0 -8
- package/bundles/covalent-core.umd.js.map +1 -1
- package/chips/covalent-core-chips.metadata.json +1 -1
- package/chips/package.json +1 -3
- package/common/_common-theme.scss +11 -0
- package/common/package.json +1 -3
- package/data-table/covalent-core-data-table.metadata.json +1 -1
- package/data-table/package.json +1 -3
- package/dialogs/_dialog-theme.scss +6 -0
- package/dialogs/covalent-core-dialogs.metadata.json +1 -1
- package/dialogs/package.json +1 -3
- package/dialogs/window-dialog/window-dialog.component.scss +4 -0
- package/dynamic-menu/covalent-core-dynamic-menu.metadata.json +1 -1
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.scss +0 -4
- package/dynamic-menu/package.json +1 -3
- package/esm2015/breadcrumbs/breadcrumb/breadcrumb.component.js +4 -3
- package/esm2015/breadcrumbs/breadcrumbs.component.js +3 -2
- package/esm2015/breadcrumbs/breadcrumbs.module.js +3 -2
- package/esm2015/breadcrumbs/covalent-core-breadcrumbs.js +3 -2
- package/esm2015/breadcrumbs/index.js +3 -2
- package/esm2015/breadcrumbs/public-api.js +3 -2
- package/esm2015/chips/chips.component.js +4 -3
- package/esm2015/chips/chips.module.js +3 -2
- package/esm2015/chips/covalent-core-chips.js +3 -2
- package/esm2015/chips/index.js +3 -2
- package/esm2015/chips/public-api.js +3 -2
- package/esm2015/common/animations/bounce/bounce.animation.js +3 -2
- package/esm2015/common/animations/collapse/collapse.animation.js +3 -2
- package/esm2015/common/animations/common/interfaces.js +3 -2
- package/esm2015/common/animations/fade/fadeInOut.animation.js +3 -2
- package/esm2015/common/animations/flash/flash.animation.js +3 -2
- package/esm2015/common/animations/headshake/headshake.animation.js +3 -2
- package/esm2015/common/animations/jello/jello.animation.js +3 -2
- package/esm2015/common/animations/pulse/pulse.animation.js +3 -2
- package/esm2015/common/animations/rotate/rotate.animation.js +3 -2
- package/esm2015/common/behaviors/control-value-accesor.mixin.js +3 -2
- package/esm2015/common/behaviors/disable-ripple.mixin.js +3 -2
- package/esm2015/common/behaviors/disabled.mixin.js +3 -2
- package/esm2015/common/common.module.js +3 -2
- package/esm2015/common/covalent-core-common.js +3 -2
- package/esm2015/common/directives/fullscreen/fullscreen.directive.js +3 -2
- package/esm2015/common/forms/auto-trim/auto-trim.directive.js +3 -2
- package/esm2015/common/forms/validators/validators.js +3 -2
- package/esm2015/common/functions/clipboard.js +3 -2
- package/esm2015/common/functions/convert.js +3 -2
- package/esm2015/common/functions/download.js +3 -2
- package/esm2015/common/functions/file.js +3 -2
- package/esm2015/common/index.js +3 -2
- package/esm2015/common/pipes/bytes/bytes.pipe.js +3 -2
- package/esm2015/common/pipes/decimal-bytes/decimal-bytes.pipe.js +3 -2
- package/esm2015/common/pipes/digits/digits.pipe.js +3 -2
- package/esm2015/common/pipes/time-ago/time-ago.pipe.js +3 -2
- package/esm2015/common/pipes/time-difference/time-difference.pipe.js +3 -2
- package/esm2015/common/pipes/time-until/time-until.pipe.js +3 -2
- package/esm2015/common/pipes/truncate/truncate.pipe.js +3 -2
- package/esm2015/common/public-api.js +3 -2
- package/esm2015/common/services/icon.service.js +3 -2
- package/esm2015/common/services/router-path.service.js +3 -2
- package/esm2015/covalent-core.js +3 -2
- package/esm2015/data-table/covalent-core-data-table.js +3 -2
- package/esm2015/data-table/data-table-cell/data-table-cell.component.js +4 -3
- package/esm2015/data-table/data-table-column/data-table-column.component.js +4 -3
- package/esm2015/data-table/data-table-row/data-table-row.component.js +3 -2
- package/esm2015/data-table/data-table-table/data-table-table.component.js +4 -3
- package/esm2015/data-table/data-table.component.js +6 -5
- package/esm2015/data-table/data-table.module.js +3 -2
- package/esm2015/data-table/directives/data-table-template.directive.js +3 -2
- package/esm2015/data-table/index.js +3 -2
- package/esm2015/data-table/public-api.js +3 -2
- package/esm2015/data-table/services/data-table.service.js +3 -2
- package/esm2015/dialogs/alert-dialog/alert-dialog.component.js +3 -2
- package/esm2015/dialogs/confirm-dialog/confirm-dialog.component.js +3 -2
- package/esm2015/dialogs/covalent-core-dialogs.js +3 -2
- package/esm2015/dialogs/dialog.component.js +4 -3
- package/esm2015/dialogs/dialogs.module.js +3 -2
- package/esm2015/dialogs/index.js +3 -2
- package/esm2015/dialogs/prompt-dialog/prompt-dialog.component.js +4 -3
- package/esm2015/dialogs/public-api.js +3 -2
- package/esm2015/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.js +14 -13
- package/esm2015/dialogs/services/dialog.service.js +3 -2
- package/esm2015/dialogs/window-dialog/window-dialog.component.js +4 -3
- package/esm2015/dynamic-menu/covalent-core-dynamic-menu.js +3 -2
- package/esm2015/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.js +5 -4
- package/esm2015/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.js +4 -3
- package/esm2015/dynamic-menu/dynamic-menu.component.js +3 -2
- package/esm2015/dynamic-menu/dynamic-menu.module.js +3 -2
- package/esm2015/dynamic-menu/index.js +3 -2
- package/esm2015/dynamic-menu/public_api.js +3 -2
- package/esm2015/expansion-panel/covalent-core-expansion-panel.js +3 -2
- package/esm2015/expansion-panel/expansion-panel-group.component.js +3 -2
- package/esm2015/expansion-panel/expansion-panel.component.js +4 -3
- package/esm2015/expansion-panel/expansion-panel.module.js +3 -2
- package/esm2015/expansion-panel/index.js +3 -2
- package/esm2015/expansion-panel/public-api.js +3 -2
- package/esm2015/file/covalent-core-file.js +3 -2
- package/esm2015/file/directives/file-drop.directive.js +3 -2
- package/esm2015/file/directives/file-select.directive.js +3 -2
- package/esm2015/file/file-input/file-input.component.js +3 -2
- package/esm2015/file/file-upload/file-upload.component.js +4 -3
- package/esm2015/file/file.module.js +3 -2
- package/esm2015/file/index.js +3 -2
- package/esm2015/file/public-api.js +3 -2
- package/esm2015/file/services/file.service.js +3 -2
- package/esm2015/index.js +4 -2
- package/esm2015/json-formatter/covalent-core-json-formatter.js +3 -2
- package/esm2015/json-formatter/index.js +3 -2
- package/esm2015/json-formatter/json-formatter.component.js +4 -3
- package/esm2015/json-formatter/json-formatter.module.js +3 -2
- package/esm2015/json-formatter/public-api.js +3 -2
- package/esm2015/layout/covalent-core-layout.js +4 -3
- package/esm2015/layout/index.js +4 -3
- package/esm2015/layout/layout-card-over/layout-card-over.component.js +4 -3
- package/esm2015/layout/layout-footer/layout-footer.component.js +3 -2
- package/esm2015/layout/layout-manage-list/layout-manage-list.component.js +4 -3
- package/esm2015/layout/layout-manage-list/layout-manage-list.directives.js +7 -6
- package/esm2015/layout/layout-nav/layout-nav.component.js +4 -3
- package/esm2015/layout/layout-nav-list/layout-nav-list.component.js +4 -3
- package/esm2015/layout/layout-nav-list/layout-nav-list.directives.js +7 -6
- package/esm2015/layout/layout-toggle.class.js +22 -12
- package/esm2015/layout/layout.component.js +4 -3
- package/esm2015/layout/layout.directives.js +7 -6
- package/esm2015/layout/layout.module.js +3 -2
- package/esm2015/layout/navigation-drawer/navigation-drawer.component.js +4 -3
- package/esm2015/layout/public-api.js +4 -3
- package/esm2015/loading/covalent-core-loading.js +3 -2
- package/esm2015/loading/directives/loading.directive.js +3 -2
- package/esm2015/loading/index.js +3 -2
- package/esm2015/loading/loading.component.js +13 -12
- package/esm2015/loading/loading.module.js +3 -2
- package/esm2015/loading/public-api.js +3 -2
- package/esm2015/loading/services/loading.factory.js +3 -2
- package/esm2015/loading/services/loading.service.js +3 -2
- package/esm2015/media/covalent-core-media.js +3 -2
- package/esm2015/media/directives/media-toggle.directive.js +3 -2
- package/esm2015/media/index.js +3 -2
- package/esm2015/media/media.module.js +3 -2
- package/esm2015/media/public-api.js +3 -2
- package/esm2015/media/services/media.service.js +3 -2
- package/esm2015/menu/covalent-core-menu.js +3 -2
- package/esm2015/menu/index.js +3 -2
- package/esm2015/menu/menu.component.js +4 -3
- package/esm2015/menu/menu.module.js +3 -2
- package/esm2015/menu/public-api.js +3 -2
- package/esm2015/message/covalent-core-message.js +3 -2
- package/esm2015/message/index.js +3 -2
- package/esm2015/message/message.component.js +4 -3
- package/esm2015/message/message.module.js +3 -2
- package/esm2015/message/public-api.js +3 -2
- package/esm2015/nav-links/covalent-core-nav-links.js +3 -2
- package/esm2015/nav-links/index.js +3 -2
- package/esm2015/nav-links/nav-links.component.js +3 -2
- package/esm2015/nav-links/nav-links.module.js +3 -2
- package/esm2015/nav-links/public-api.js +3 -2
- package/esm2015/notifications/covalent-core-notifications.js +3 -2
- package/esm2015/notifications/index.js +3 -2
- package/esm2015/notifications/notification-count.component.js +10 -9
- package/esm2015/notifications/notifications.module.js +3 -2
- package/esm2015/notifications/public-api.js +3 -2
- package/esm2015/paging/covalent-core-paging.js +3 -2
- package/esm2015/paging/index.js +3 -2
- package/esm2015/paging/paging-bar.component.js +4 -3
- package/esm2015/paging/paging.module.js +3 -2
- package/esm2015/paging/public-api.js +3 -2
- package/esm2015/search/covalent-core-search.js +3 -2
- package/esm2015/search/index.js +3 -2
- package/esm2015/search/public-api.js +3 -2
- package/esm2015/search/search-box/search-box.component.js +4 -3
- package/esm2015/search/search-input/search-input.component.js +4 -3
- package/esm2015/search/search.module.js +3 -2
- package/esm2015/sidesheet/covalent-core-sidesheet.js +3 -2
- package/esm2015/sidesheet/index.js +3 -2
- package/esm2015/sidesheet/public-api.js +3 -2
- package/esm2015/sidesheet/sidesheet.component.js +4 -3
- package/esm2015/sidesheet/sidesheet.module.js +3 -2
- package/esm2015/steps/covalent-core-steps.js +3 -2
- package/esm2015/steps/index.js +3 -2
- package/esm2015/steps/nav/nav-step-link/nav-step-link.component.js +4 -3
- package/esm2015/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.js +4 -3
- package/esm2015/steps/nav/nav-steps-vertical/nav-steps-vertical.component.js +4 -3
- package/esm2015/steps/public-api.js +3 -2
- package/esm2015/steps/step-body/step-body.component.js +4 -3
- package/esm2015/steps/step-header/step-header.component.js +4 -3
- package/esm2015/steps/step.component.js +6 -5
- package/esm2015/steps/steps.component.js +6 -5
- package/esm2015/steps/steps.module.js +3 -2
- package/esm2015/tab-select/covalent-core-tab-select.js +3 -2
- package/esm2015/tab-select/index.js +3 -2
- package/esm2015/tab-select/public-api.js +3 -2
- package/esm2015/tab-select/tab-option.component.js +3 -2
- package/esm2015/tab-select/tab-select.component.js +3 -2
- package/esm2015/tab-select/tab-select.module.js +3 -2
- package/esm2015/user-profile/covalent-core-user-profile.js +3 -2
- package/esm2015/user-profile/index.js +3 -2
- package/esm2015/user-profile/public_api.js +3 -2
- package/esm2015/user-profile/user-profile-menu/user-profile-menu.component.js +4 -3
- package/esm2015/user-profile/user-profile.component.js +3 -2
- package/esm2015/user-profile/user-profile.module.js +3 -2
- package/esm2015/virtual-scroll/covalent-core-virtual-scroll.js +3 -2
- package/esm2015/virtual-scroll/index.js +3 -2
- package/esm2015/virtual-scroll/public-api.js +3 -2
- package/esm2015/virtual-scroll/virtual-scroll-container.component.js +4 -3
- package/esm2015/virtual-scroll/virtual-scroll-row.directive.js +3 -2
- package/esm2015/virtual-scroll/virtual-scroll.module.js +3 -2
- package/expansion-panel/covalent-core-expansion-panel.metadata.json +1 -1
- package/expansion-panel/package.json +1 -3
- package/fesm2015/covalent-core-breadcrumbs.js +13 -7
- package/fesm2015/covalent-core-breadcrumbs.js.map +1 -1
- package/fesm2015/covalent-core-chips.js +11 -6
- package/fesm2015/covalent-core-chips.js.map +1 -1
- package/fesm2015/covalent-core-common.js +62 -31
- package/fesm2015/covalent-core-common.js.map +1 -1
- package/fesm2015/covalent-core-data-table.js +28 -17
- package/fesm2015/covalent-core-data-table.js.map +1 -1
- package/fesm2015/covalent-core-dialogs.js +36 -25
- package/fesm2015/covalent-core-dialogs.js.map +1 -1
- package/fesm2015/covalent-core-dynamic-menu.js +17 -10
- package/fesm2015/covalent-core-dynamic-menu.js.map +1 -1
- package/fesm2015/covalent-core-expansion-panel.js +13 -7
- package/fesm2015/covalent-core-expansion-panel.js.map +1 -1
- package/fesm2015/covalent-core-file.js +19 -10
- package/fesm2015/covalent-core-file.js.map +1 -1
- package/fesm2015/covalent-core-json-formatter.js +11 -6
- package/fesm2015/covalent-core-json-formatter.js.map +1 -1
- package/fesm2015/covalent-core-layout.js +65 -41
- package/fesm2015/covalent-core-layout.js.map +1 -1
- package/fesm2015/covalent-core-loading.js +26 -18
- package/fesm2015/covalent-core-loading.js.map +1 -1
- package/fesm2015/covalent-core-media.js +12 -6
- package/fesm2015/covalent-core-media.js.map +1 -1
- package/fesm2015/covalent-core-menu.js +11 -6
- package/fesm2015/covalent-core-menu.js.map +1 -1
- package/fesm2015/covalent-core-message.js +11 -6
- package/fesm2015/covalent-core-message.js.map +1 -1
- package/fesm2015/covalent-core-nav-links.js +10 -5
- package/fesm2015/covalent-core-nav-links.js.map +1 -1
- package/fesm2015/covalent-core-notifications.js +17 -12
- package/fesm2015/covalent-core-notifications.js.map +1 -1
- package/fesm2015/covalent-core-paging.js +11 -6
- package/fesm2015/covalent-core-paging.js.map +1 -1
- package/fesm2015/covalent-core-search.js +14 -8
- package/fesm2015/covalent-core-search.js.map +1 -1
- package/fesm2015/covalent-core-sidesheet.js +11 -6
- package/fesm2015/covalent-core-sidesheet.js.map +1 -1
- package/fesm2015/covalent-core-steps.js +33 -22
- package/fesm2015/covalent-core-steps.js.map +1 -1
- package/fesm2015/covalent-core-tab-select.js +12 -6
- package/fesm2015/covalent-core-tab-select.js.map +1 -1
- package/fesm2015/covalent-core-user-profile.js +13 -7
- package/fesm2015/covalent-core-user-profile.js.map +1 -1
- package/fesm2015/covalent-core-virtual-scroll.js +13 -7
- package/fesm2015/covalent-core-virtual-scroll.js.map +1 -1
- package/fesm2015/covalent-core.js +4 -2
- package/fesm2015/covalent-core.js.map +1 -1
- package/file/covalent-core-file.metadata.json +1 -1
- package/file/package.json +1 -3
- package/json-formatter/covalent-core-json-formatter.metadata.json +1 -1
- package/json-formatter/package.json +1 -3
- package/layout/covalent-core-layout.metadata.json +1 -1
- package/layout/layout-manage-list/layout-manage-list.directives.d.ts +4 -4
- package/layout/layout-nav-list/layout-nav-list.directives.d.ts +4 -4
- package/layout/layout-toggle.class.d.ts +1 -1
- package/layout/layout.directives.d.ts +4 -4
- package/layout/package.json +1 -3
- package/loading/covalent-core-loading.metadata.json +1 -1
- package/loading/package.json +1 -3
- package/media/package.json +1 -3
- package/menu/covalent-core-menu.metadata.json +1 -1
- package/menu/package.json +1 -3
- package/message/covalent-core-message.metadata.json +1 -1
- package/message/package.json +1 -3
- package/nav-links/package.json +1 -3
- package/notifications/covalent-core-notifications.metadata.json +1 -1
- package/notifications/package.json +1 -3
- package/package.json +12 -12
- package/paging/covalent-core-paging.metadata.json +1 -1
- package/paging/package.json +1 -3
- package/schematics/components.js +1 -0
- package/schematics/components.js.map +1 -1
- package/schematics/ng-add/files/theme.scss +1 -1
- package/schematics/ng-add/index.js +4 -6
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-update/index.js +1 -0
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/target-version.js +1 -0
- package/schematics/ng-update/target-version.js.map +1 -1
- package/schematics/version-names.js +1 -0
- package/schematics/version-names.js.map +1 -1
- package/search/covalent-core-search.metadata.json +1 -1
- package/search/package.json +1 -3
- package/sidesheet/covalent-core-sidesheet.metadata.json +1 -1
- package/sidesheet/package.json +1 -3
- package/steps/covalent-core-steps.metadata.json +1 -1
- package/steps/package.json +1 -3
- package/tab-select/covalent-core-tab-select.metadata.json +1 -1
- package/tab-select/package.json +1 -3
- package/theming/prebuilt/blue-grey-deep-orange.css +193 -28
- package/theming/prebuilt/blue-grey-deep-orange.css.map +1 -1
- package/theming/prebuilt/blue-orange.css +193 -28
- package/theming/prebuilt/blue-orange.css.map +1 -1
- package/theming/prebuilt/indigo-pink.css +193 -28
- package/theming/prebuilt/indigo-pink.css.map +1 -1
- package/theming/prebuilt/orange-light-blue.css +193 -28
- package/theming/prebuilt/orange-light-blue.css.map +1 -1
- package/theming/prebuilt/teal-orange.css +193 -28
- package/theming/prebuilt/teal-orange.css.map +1 -1
- package/user-profile/covalent-core-user-profile.metadata.json +1 -1
- package/user-profile/package.json +1 -3
- package/virtual-scroll/covalent-core-virtual-scroll.metadata.json +1 -1
- package/virtual-scroll/package.json +1 -3
- package/esm5/breadcrumbs/breadcrumb/breadcrumb.component.js +0 -216
- package/esm5/breadcrumbs/breadcrumbs.component.js +0 -286
- package/esm5/breadcrumbs/breadcrumbs.module.js +0 -23
- package/esm5/breadcrumbs/covalent-core-breadcrumbs.js +0 -9
- package/esm5/breadcrumbs/index.js +0 -6
- package/esm5/breadcrumbs/public-api.js +0 -8
- package/esm5/chips/chips.component.js +0 -1453
- package/esm5/chips/chips.module.js +0 -26
- package/esm5/chips/covalent-core-chips.js +0 -9
- package/esm5/chips/index.js +0 -6
- package/esm5/chips/public-api.js +0 -7
- package/esm5/common/animations/bounce/bounce.animation.js +0 -75
- package/esm5/common/animations/collapse/collapse.animation.js +0 -66
- package/esm5/common/animations/common/interfaces.js +0 -17
- package/esm5/common/animations/fade/fadeInOut.animation.js +0 -52
- package/esm5/common/animations/flash/flash.animation.js +0 -39
- package/esm5/common/animations/headshake/headshake.animation.js +0 -40
- package/esm5/common/animations/jello/jello.animation.js +0 -43
- package/esm5/common/animations/pulse/pulse.animation.js +0 -37
- package/esm5/common/animations/rotate/rotate.animation.js +0 -40
- package/esm5/common/behaviors/control-value-accesor.mixin.js +0 -127
- package/esm5/common/behaviors/disable-ripple.mixin.js +0 -75
- package/esm5/common/behaviors/disabled.mixin.js +0 -75
- package/esm5/common/common.module.js +0 -57
- package/esm5/common/covalent-core-common.js +0 -11
- package/esm5/common/directives/fullscreen/fullscreen.directive.js +0 -228
- package/esm5/common/forms/auto-trim/auto-trim.directive.js +0 -52
- package/esm5/common/forms/validators/validators.js +0 -73
- package/esm5/common/functions/clipboard.js +0 -29
- package/esm5/common/functions/convert.js +0 -120
- package/esm5/common/functions/download.js +0 -93
- package/esm5/common/functions/file.js +0 -28
- package/esm5/common/index.js +0 -6
- package/esm5/common/pipes/bytes/bytes.pipe.js +0 -54
- package/esm5/common/pipes/decimal-bytes/decimal-bytes.pipe.js +0 -54
- package/esm5/common/pipes/digits/digits.pipe.js +0 -72
- package/esm5/common/pipes/time-ago/time-ago.pipe.js +0 -89
- package/esm5/common/pipes/time-difference/time-difference.pipe.js +0 -74
- package/esm5/common/pipes/time-until/time-until.pipe.js +0 -89
- package/esm5/common/pipes/truncate/truncate.pipe.js +0 -42
- package/esm5/common/public-api.js +0 -43
- package/esm5/common/services/icon.service.js +0 -1118
- package/esm5/common/services/router-path.service.js +0 -69
- package/esm5/covalent-core.js +0 -9
- package/esm5/data-table/covalent-core-data-table.js +0 -9
- package/esm5/data-table/data-table-cell/data-table-cell.component.js +0 -98
- package/esm5/data-table/data-table-column/data-table-column.component.js +0 -257
- package/esm5/data-table/data-table-row/data-table-row.component.js +0 -145
- package/esm5/data-table/data-table-table/data-table-table.component.js +0 -40
- package/esm5/data-table/data-table.component.js +0 -2079
- package/esm5/data-table/data-table.module.js +0 -42
- package/esm5/data-table/directives/data-table-template.directive.js +0 -31
- package/esm5/data-table/index.js +0 -6
- package/esm5/data-table/public-api.js +0 -13
- package/esm5/data-table/services/data-table.service.js +0 -184
- package/esm5/dialogs/alert-dialog/alert-dialog.component.js +0 -48
- package/esm5/dialogs/confirm-dialog/confirm-dialog.component.js +0 -63
- package/esm5/dialogs/covalent-core-dialogs.js +0 -10
- package/esm5/dialogs/dialog.component.js +0 -76
- package/esm5/dialogs/dialogs.module.js +0 -60
- package/esm5/dialogs/index.js +0 -6
- package/esm5/dialogs/prompt-dialog/prompt-dialog.component.js +0 -100
- package/esm5/dialogs/public-api.js +0 -12
- package/esm5/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.js +0 -356
- package/esm5/dialogs/services/dialog.service.js +0 -441
- package/esm5/dialogs/window-dialog/window-dialog.component.js +0 -60
- package/esm5/dynamic-menu/covalent-core-dynamic-menu.js +0 -10
- package/esm5/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.js +0 -45
- package/esm5/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.js +0 -39
- package/esm5/dynamic-menu/dynamic-menu.component.js +0 -94
- package/esm5/dynamic-menu/dynamic-menu.module.js +0 -29
- package/esm5/dynamic-menu/index.js +0 -6
- package/esm5/dynamic-menu/public_api.js +0 -8
- package/esm5/expansion-panel/covalent-core-expansion-panel.js +0 -9
- package/esm5/expansion-panel/expansion-panel-group.component.js +0 -251
- package/esm5/expansion-panel/expansion-panel.component.js +0 -344
- package/esm5/expansion-panel/expansion-panel.module.js +0 -34
- package/esm5/expansion-panel/index.js +0 -6
- package/esm5/expansion-panel/public-api.js +0 -8
- package/esm5/file/covalent-core-file.js +0 -9
- package/esm5/file/directives/file-drop.directive.js +0 -276
- package/esm5/file/directives/file-select.directive.js +0 -124
- package/esm5/file/file-input/file-input.component.js +0 -225
- package/esm5/file/file-upload/file-upload.component.js +0 -284
- package/esm5/file/file.module.js +0 -38
- package/esm5/file/index.js +0 -6
- package/esm5/file/public-api.js +0 -11
- package/esm5/file/services/file.service.js +0 -137
- package/esm5/index.js +0 -5
- package/esm5/json-formatter/covalent-core-json-formatter.js +0 -9
- package/esm5/json-formatter/index.js +0 -6
- package/esm5/json-formatter/json-formatter.component.js +0 -433
- package/esm5/json-formatter/json-formatter.module.js +0 -23
- package/esm5/json-formatter/public-api.js +0 -7
- package/esm5/layout/covalent-core-layout.js +0 -9
- package/esm5/layout/index.js +0 -6
- package/esm5/layout/layout-card-over/layout-card-over.component.js +0 -72
- package/esm5/layout/layout-footer/layout-footer.component.js +0 -77
- package/esm5/layout/layout-manage-list/layout-manage-list.component.js +0 -175
- package/esm5/layout/layout-manage-list/layout-manage-list.directives.js +0 -147
- package/esm5/layout/layout-nav/layout-nav.component.js +0 -108
- package/esm5/layout/layout-nav-list/layout-nav-list.component.js +0 -257
- package/esm5/layout/layout-nav-list/layout-nav-list.directives.js +0 -147
- package/esm5/layout/layout-toggle.class.js +0 -214
- package/esm5/layout/layout.component.js +0 -175
- package/esm5/layout/layout.directives.js +0 -144
- package/esm5/layout/layout.module.js +0 -67
- package/esm5/layout/navigation-drawer/navigation-drawer.component.js +0 -364
- package/esm5/layout/public-api.js +0 -17
- package/esm5/loading/covalent-core-loading.js +0 -9
- package/esm5/loading/directives/loading.directive.js +0 -304
- package/esm5/loading/index.js +0 -6
- package/esm5/loading/loading.component.js +0 -367
- package/esm5/loading/loading.module.js +0 -33
- package/esm5/loading/public-api.js +0 -10
- package/esm5/loading/services/loading.factory.js +0 -378
- package/esm5/loading/services/loading.service.js +0 -494
- package/esm5/media/covalent-core-media.js +0 -9
- package/esm5/media/directives/media-toggle.directive.js +0 -261
- package/esm5/media/index.js +0 -6
- package/esm5/media/media.module.js +0 -23
- package/esm5/media/public-api.js +0 -8
- package/esm5/media/services/media.service.js +0 -229
- package/esm5/menu/covalent-core-menu.js +0 -9
- package/esm5/menu/index.js +0 -6
- package/esm5/menu/menu.component.js +0 -19
- package/esm5/menu/menu.module.js +0 -25
- package/esm5/menu/public-api.js +0 -7
- package/esm5/message/covalent-core-message.js +0 -9
- package/esm5/message/index.js +0 -6
- package/esm5/message/message.component.js +0 -402
- package/esm5/message/message.module.js +0 -24
- package/esm5/message/public-api.js +0 -7
- package/esm5/nav-links/covalent-core-nav-links.js +0 -9
- package/esm5/nav-links/index.js +0 -6
- package/esm5/nav-links/nav-links.component.js +0 -171
- package/esm5/nav-links/nav-links.module.js +0 -40
- package/esm5/nav-links/public-api.js +0 -7
- package/esm5/notifications/covalent-core-notifications.js +0 -9
- package/esm5/notifications/index.js +0 -6
- package/esm5/notifications/notification-count.component.js +0 -268
- package/esm5/notifications/notifications.module.js +0 -23
- package/esm5/notifications/public-api.js +0 -7
- package/esm5/paging/covalent-core-paging.js +0 -9
- package/esm5/paging/index.js +0 -6
- package/esm5/paging/paging-bar.component.js +0 -542
- package/esm5/paging/paging.module.js +0 -23
- package/esm5/paging/public-api.js +0 -7
- package/esm5/search/covalent-core-search.js +0 -9
- package/esm5/search/index.js +0 -6
- package/esm5/search/public-api.js +0 -8
- package/esm5/search/search-box/search-box.component.js +0 -298
- package/esm5/search/search-input/search-input.component.js +0 -297
- package/esm5/search/search.module.js +0 -26
- package/esm5/sidesheet/covalent-core-sidesheet.js +0 -9
- package/esm5/sidesheet/index.js +0 -6
- package/esm5/sidesheet/public-api.js +0 -7
- package/esm5/sidesheet/sidesheet.component.js +0 -89
- package/esm5/sidesheet/sidesheet.module.js +0 -30
- package/esm5/steps/covalent-core-steps.js +0 -9
- package/esm5/steps/index.js +0 -6
- package/esm5/steps/nav/nav-step-link/nav-step-link.component.js +0 -165
- package/esm5/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.js +0 -464
- package/esm5/steps/nav/nav-steps-vertical/nav-steps-vertical.component.js +0 -143
- package/esm5/steps/public-api.js +0 -13
- package/esm5/steps/step-body/step-body.component.js +0 -103
- package/esm5/steps/step-header/step-header.component.js +0 -101
- package/esm5/steps/step.component.js +0 -399
- package/esm5/steps/steps.component.js +0 -313
- package/esm5/steps/steps.module.js +0 -47
- package/esm5/tab-select/covalent-core-tab-select.js +0 -9
- package/esm5/tab-select/index.js +0 -6
- package/esm5/tab-select/public-api.js +0 -8
- package/esm5/tab-select/tab-option.component.js +0 -86
- package/esm5/tab-select/tab-select.component.js +0 -344
- package/esm5/tab-select/tab-select.module.js +0 -34
- package/esm5/user-profile/covalent-core-user-profile.js +0 -9
- package/esm5/user-profile/index.js +0 -6
- package/esm5/user-profile/public_api.js +0 -8
- package/esm5/user-profile/user-profile-menu/user-profile-menu.component.js +0 -42
- package/esm5/user-profile/user-profile.component.js +0 -29
- package/esm5/user-profile/user-profile.module.js +0 -36
- package/esm5/virtual-scroll/covalent-core-virtual-scroll.js +0 -9
- package/esm5/virtual-scroll/index.js +0 -6
- package/esm5/virtual-scroll/public-api.js +0 -8
- package/esm5/virtual-scroll/virtual-scroll-container.component.js +0 -468
- package/esm5/virtual-scroll/virtual-scroll-row.directive.js +0 -24
- package/esm5/virtual-scroll/virtual-scroll.module.js +0 -24
- package/fesm5/covalent-core-breadcrumbs.js +0 -535
- package/fesm5/covalent-core-breadcrumbs.js.map +0 -1
- package/fesm5/covalent-core-chips.js +0 -1484
- package/fesm5/covalent-core-chips.js.map +0 -1
- package/fesm5/covalent-core-common.js +0 -2961
- package/fesm5/covalent-core-common.js.map +0 -1
- package/fesm5/covalent-core-data-table.js +0 -2863
- package/fesm5/covalent-core-data-table.js.map +0 -1
- package/fesm5/covalent-core-dialogs.js +0 -1189
- package/fesm5/covalent-core-dialogs.js.map +0 -1
- package/fesm5/covalent-core-dynamic-menu.js +0 -214
- package/fesm5/covalent-core-dynamic-menu.js.map +0 -1
- package/fesm5/covalent-core-expansion-panel.js +0 -631
- package/fesm5/covalent-core-expansion-panel.js.map +0 -1
- package/fesm5/covalent-core-file.js +0 -1068
- package/fesm5/covalent-core-file.js.map +0 -1
- package/fesm5/covalent-core-json-formatter.js +0 -470
- package/fesm5/covalent-core-json-formatter.js.map +0 -1
- package/fesm5/covalent-core-layout.js +0 -1906
- package/fesm5/covalent-core-layout.js.map +0 -1
- package/fesm5/covalent-core-loading.js +0 -1562
- package/fesm5/covalent-core-loading.js.map +0 -1
- package/fesm5/covalent-core-media.js +0 -522
- package/fesm5/covalent-core-media.js.map +0 -1
- package/fesm5/covalent-core-menu.js +0 -58
- package/fesm5/covalent-core-menu.js.map +0 -1
- package/fesm5/covalent-core-message.js +0 -439
- package/fesm5/covalent-core-message.js.map +0 -1
- package/fesm5/covalent-core-nav-links.js +0 -224
- package/fesm5/covalent-core-nav-links.js.map +0 -1
- package/fesm5/covalent-core-notifications.js +0 -303
- package/fesm5/covalent-core-notifications.js.map +0 -1
- package/fesm5/covalent-core-paging.js +0 -579
- package/fesm5/covalent-core-paging.js.map +0 -1
- package/fesm5/covalent-core-search.js +0 -623
- package/fesm5/covalent-core-search.js.map +0 -1
- package/fesm5/covalent-core-sidesheet.js +0 -129
- package/fesm5/covalent-core-sidesheet.js.map +0 -1
- package/fesm5/covalent-core-steps.js +0 -1704
- package/fesm5/covalent-core-steps.js.map +0 -1
- package/fesm5/covalent-core-tab-select.js +0 -467
- package/fesm5/covalent-core-tab-select.js.map +0 -1
- package/fesm5/covalent-core-user-profile.js +0 -118
- package/fesm5/covalent-core-user-profile.js.map +0 -1
- package/fesm5/covalent-core-virtual-scroll.js +0 -526
- package/fesm5/covalent-core-virtual-scroll.js.map +0 -1
- package/fesm5/covalent-core.js +0 -10
- package/fesm5/covalent-core.js.map +0 -1
@@ -1,1484 +0,0 @@
|
|
1
|
-
import { Directive, TemplateRef, ViewContainerRef, EventEmitter, Component, forwardRef, ChangeDetectionStrategy, ElementRef, Renderer2, Optional, Inject, ChangeDetectorRef, ViewChild, ViewChildren, ContentChild, Input, Output, HostBinding, HostListener, NgModule } from '@angular/core';
|
2
|
-
import { FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
3
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
4
|
-
import { MatInput, MatInputModule } from '@angular/material/input';
|
5
|
-
import { MatIconModule } from '@angular/material/icon';
|
6
|
-
import { MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
|
7
|
-
import { MatChip, MatChipsModule } from '@angular/material/chips';
|
8
|
-
import { __extends } from 'tslib';
|
9
|
-
import { TemplatePortalDirective } from '@angular/cdk/portal';
|
10
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
11
|
-
import { ESCAPE, TAB, RIGHT_ARROW, BACKSPACE, DELETE, LEFT_ARROW, UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
|
12
|
-
import { MatOption } from '@angular/material/core';
|
13
|
-
import { Subscription, timer, merge, fromEvent } from 'rxjs';
|
14
|
-
import { debounceTime, filter } from 'rxjs/operators';
|
15
|
-
import { mixinControlValueAccessor, mixinDisabled } from '@covalent/core/common';
|
16
|
-
|
17
|
-
/**
|
18
|
-
* @fileoverview added by tsickle
|
19
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
20
|
-
*/
|
21
|
-
var TdChipDirective = /** @class */ (function (_super) {
|
22
|
-
__extends(TdChipDirective, _super);
|
23
|
-
function TdChipDirective(templateRef, viewContainerRef) {
|
24
|
-
return _super.call(this, templateRef, viewContainerRef) || this;
|
25
|
-
}
|
26
|
-
TdChipDirective.decorators = [
|
27
|
-
{ type: Directive, args: [{
|
28
|
-
selector: '[td-chip]ng-template',
|
29
|
-
},] }
|
30
|
-
];
|
31
|
-
/** @nocollapse */
|
32
|
-
TdChipDirective.ctorParameters = function () { return [
|
33
|
-
{ type: TemplateRef },
|
34
|
-
{ type: ViewContainerRef }
|
35
|
-
]; };
|
36
|
-
return TdChipDirective;
|
37
|
-
}(TemplatePortalDirective));
|
38
|
-
var TdAutocompleteOptionDirective = /** @class */ (function (_super) {
|
39
|
-
__extends(TdAutocompleteOptionDirective, _super);
|
40
|
-
function TdAutocompleteOptionDirective(templateRef, viewContainerRef) {
|
41
|
-
return _super.call(this, templateRef, viewContainerRef) || this;
|
42
|
-
}
|
43
|
-
TdAutocompleteOptionDirective.decorators = [
|
44
|
-
{ type: Directive, args: [{
|
45
|
-
selector: '[td-autocomplete-option]ng-template',
|
46
|
-
},] }
|
47
|
-
];
|
48
|
-
/** @nocollapse */
|
49
|
-
TdAutocompleteOptionDirective.ctorParameters = function () { return [
|
50
|
-
{ type: TemplateRef },
|
51
|
-
{ type: ViewContainerRef }
|
52
|
-
]; };
|
53
|
-
return TdAutocompleteOptionDirective;
|
54
|
-
}(TemplatePortalDirective));
|
55
|
-
var TdChipsBase = /** @class */ (function () {
|
56
|
-
function TdChipsBase(_changeDetectorRef) {
|
57
|
-
this._changeDetectorRef = _changeDetectorRef;
|
58
|
-
}
|
59
|
-
return TdChipsBase;
|
60
|
-
}());
|
61
|
-
if (false) {
|
62
|
-
/** @type {?} */
|
63
|
-
TdChipsBase.prototype._changeDetectorRef;
|
64
|
-
}
|
65
|
-
/* tslint:disable-next-line */
|
66
|
-
/** @type {?} */
|
67
|
-
var _TdChipsMixinBase = mixinControlValueAccessor(mixinDisabled(TdChipsBase), []);
|
68
|
-
var TdChipsComponent = /** @class */ (function (_super) {
|
69
|
-
__extends(TdChipsComponent, _super);
|
70
|
-
function TdChipsComponent(_elementRef, _renderer, _document, _changeDetectorRef) {
|
71
|
-
var _this = _super.call(this, _changeDetectorRef) || this;
|
72
|
-
_this._elementRef = _elementRef;
|
73
|
-
_this._renderer = _renderer;
|
74
|
-
_this._document = _document;
|
75
|
-
_this._outsideClickSubs = Subscription.EMPTY;
|
76
|
-
_this._inputValueChangesSubs = Subscription.EMPTY;
|
77
|
-
_this._isMousedown = false;
|
78
|
-
_this._length = 0;
|
79
|
-
_this._stacked = false;
|
80
|
-
_this._requireMatch = false;
|
81
|
-
_this._color = 'primary';
|
82
|
-
_this._inputPosition = 'after';
|
83
|
-
_this._chipAddition = true;
|
84
|
-
_this._chipRemoval = true;
|
85
|
-
_this._focused = false;
|
86
|
-
_this._required = false;
|
87
|
-
_this._tabIndex = 0;
|
88
|
-
_this._touchendDebounce = 100;
|
89
|
-
_this._internalClick = false;
|
90
|
-
_this._internalActivateOption = false;
|
91
|
-
/**
|
92
|
-
* FormControl for the matInput element.
|
93
|
-
*/
|
94
|
-
_this.inputControl = new FormControl();
|
95
|
-
/**
|
96
|
-
* debounce?: number
|
97
|
-
* Debounce timeout between keypresses. Defaults to 200.
|
98
|
-
*/
|
99
|
-
_this.debounce = 200;
|
100
|
-
/**
|
101
|
-
* add?: function
|
102
|
-
* Method to be executed when a chip is added.
|
103
|
-
* Sends chip value as event.
|
104
|
-
*/
|
105
|
-
_this.add = new EventEmitter();
|
106
|
-
/**
|
107
|
-
* remove?: function
|
108
|
-
* Method to be executed when a chip is removed.
|
109
|
-
* Sends chip value as event.
|
110
|
-
*/
|
111
|
-
_this.remove = new EventEmitter();
|
112
|
-
/**
|
113
|
-
* inputChange?: function
|
114
|
-
* Method to be executed when the value in the autocomplete input changes.
|
115
|
-
* Sends string value as event.
|
116
|
-
*/
|
117
|
-
_this.inputChange = new EventEmitter();
|
118
|
-
/**
|
119
|
-
* chipFocus?: function
|
120
|
-
* Method to be executed when a chip is focused.
|
121
|
-
* Sends chip value as event.
|
122
|
-
*/
|
123
|
-
_this.chipFocus = new EventEmitter();
|
124
|
-
/**
|
125
|
-
* blur?: function
|
126
|
-
* Method to be executed when a chip is blurred.
|
127
|
-
* Sends chip value as event.
|
128
|
-
*/
|
129
|
-
_this.chipBlur = new EventEmitter();
|
130
|
-
/**
|
131
|
-
* compareWith? function
|
132
|
-
* Function used to check whether a chip value already exists.
|
133
|
-
* Defaults to strict equality comparison ===
|
134
|
-
*/
|
135
|
-
_this.compareWith = (/**
|
136
|
-
* @param {?} o1
|
137
|
-
* @param {?} o2
|
138
|
-
* @return {?}
|
139
|
-
*/
|
140
|
-
function (o1, o2) {
|
141
|
-
return o1 === o2;
|
142
|
-
});
|
143
|
-
_this._renderer.addClass(_this._elementRef.nativeElement, 'mat-' + _this._color);
|
144
|
-
return _this;
|
145
|
-
}
|
146
|
-
Object.defineProperty(TdChipsComponent.prototype, "focused", {
|
147
|
-
/**
|
148
|
-
* Flag that is true when autocomplete is focused.
|
149
|
-
*/
|
150
|
-
get: /**
|
151
|
-
* Flag that is true when autocomplete is focused.
|
152
|
-
* @return {?}
|
153
|
-
*/
|
154
|
-
function () {
|
155
|
-
return this._focused;
|
156
|
-
},
|
157
|
-
enumerable: true,
|
158
|
-
configurable: true
|
159
|
-
});
|
160
|
-
Object.defineProperty(TdChipsComponent.prototype, "items", {
|
161
|
-
get: /**
|
162
|
-
* @return {?}
|
163
|
-
*/
|
164
|
-
function () {
|
165
|
-
return this._items;
|
166
|
-
},
|
167
|
-
/**
|
168
|
-
* items?: any[]
|
169
|
-
* Renders the `mat-autocomplete` with the provided list to display as options.
|
170
|
-
*/
|
171
|
-
set: /**
|
172
|
-
* items?: any[]
|
173
|
-
* Renders the `mat-autocomplete` with the provided list to display as options.
|
174
|
-
* @param {?} items
|
175
|
-
* @return {?}
|
176
|
-
*/
|
177
|
-
function (items) {
|
178
|
-
this._items = items;
|
179
|
-
this._setFirstOptionActive();
|
180
|
-
this._changeDetectorRef.markForCheck();
|
181
|
-
},
|
182
|
-
enumerable: true,
|
183
|
-
configurable: true
|
184
|
-
});
|
185
|
-
Object.defineProperty(TdChipsComponent.prototype, "stacked", {
|
186
|
-
get: /**
|
187
|
-
* @return {?}
|
188
|
-
*/
|
189
|
-
function () {
|
190
|
-
return this._stacked;
|
191
|
-
},
|
192
|
-
/**
|
193
|
-
* stacked?: boolean
|
194
|
-
* Set stacked or horizontal chips depending on value.
|
195
|
-
* Defaults to false.
|
196
|
-
*/
|
197
|
-
set: /**
|
198
|
-
* stacked?: boolean
|
199
|
-
* Set stacked or horizontal chips depending on value.
|
200
|
-
* Defaults to false.
|
201
|
-
* @param {?} stacked
|
202
|
-
* @return {?}
|
203
|
-
*/
|
204
|
-
function (stacked) {
|
205
|
-
this._stacked = coerceBooleanProperty(stacked);
|
206
|
-
},
|
207
|
-
enumerable: true,
|
208
|
-
configurable: true
|
209
|
-
});
|
210
|
-
Object.defineProperty(TdChipsComponent.prototype, "inputPosition", {
|
211
|
-
get: /**
|
212
|
-
* @return {?}
|
213
|
-
*/
|
214
|
-
function () {
|
215
|
-
return this._inputPosition;
|
216
|
-
},
|
217
|
-
/**
|
218
|
-
* inputPosition?: 'before' | 'after'
|
219
|
-
* Set input position before or after the chips.
|
220
|
-
* Defaults to 'after'.
|
221
|
-
*/
|
222
|
-
set: /**
|
223
|
-
* inputPosition?: 'before' | 'after'
|
224
|
-
* Set input position before or after the chips.
|
225
|
-
* Defaults to 'after'.
|
226
|
-
* @param {?} inputPosition
|
227
|
-
* @return {?}
|
228
|
-
*/
|
229
|
-
function (inputPosition) {
|
230
|
-
this._inputPosition = inputPosition;
|
231
|
-
},
|
232
|
-
enumerable: true,
|
233
|
-
configurable: true
|
234
|
-
});
|
235
|
-
Object.defineProperty(TdChipsComponent.prototype, "requireMatch", {
|
236
|
-
get: /**
|
237
|
-
* @return {?}
|
238
|
-
*/
|
239
|
-
function () {
|
240
|
-
return this._requireMatch;
|
241
|
-
},
|
242
|
-
/**
|
243
|
-
* requireMatch?: boolean
|
244
|
-
* Blocks custom inputs and only allows selections from the autocomplete list.
|
245
|
-
*/
|
246
|
-
set: /**
|
247
|
-
* requireMatch?: boolean
|
248
|
-
* Blocks custom inputs and only allows selections from the autocomplete list.
|
249
|
-
* @param {?} requireMatch
|
250
|
-
* @return {?}
|
251
|
-
*/
|
252
|
-
function (requireMatch) {
|
253
|
-
this._requireMatch = coerceBooleanProperty(requireMatch);
|
254
|
-
},
|
255
|
-
enumerable: true,
|
256
|
-
configurable: true
|
257
|
-
});
|
258
|
-
Object.defineProperty(TdChipsComponent.prototype, "required", {
|
259
|
-
get: /**
|
260
|
-
* @return {?}
|
261
|
-
*/
|
262
|
-
function () {
|
263
|
-
return this._required;
|
264
|
-
},
|
265
|
-
/**
|
266
|
-
* required?: boolean
|
267
|
-
* Value is set to true if at least one chip is needed
|
268
|
-
* Defaults to false
|
269
|
-
*/
|
270
|
-
set: /**
|
271
|
-
* required?: boolean
|
272
|
-
* Value is set to true if at least one chip is needed
|
273
|
-
* Defaults to false
|
274
|
-
* @param {?} required
|
275
|
-
* @return {?}
|
276
|
-
*/
|
277
|
-
function (required) {
|
278
|
-
this._required = coerceBooleanProperty(required);
|
279
|
-
},
|
280
|
-
enumerable: true,
|
281
|
-
configurable: true
|
282
|
-
});
|
283
|
-
Object.defineProperty(TdChipsComponent.prototype, "chipAddition", {
|
284
|
-
get: /**
|
285
|
-
* @return {?}
|
286
|
-
*/
|
287
|
-
function () {
|
288
|
-
return this._chipAddition;
|
289
|
-
},
|
290
|
-
/**
|
291
|
-
* chipAddition?: boolean
|
292
|
-
* Disables the ability to add chips. When setting disabled as true, this will be overriden.
|
293
|
-
* Defaults to true.
|
294
|
-
*/
|
295
|
-
set: /**
|
296
|
-
* chipAddition?: boolean
|
297
|
-
* Disables the ability to add chips. When setting disabled as true, this will be overriden.
|
298
|
-
* Defaults to true.
|
299
|
-
* @param {?} chipAddition
|
300
|
-
* @return {?}
|
301
|
-
*/
|
302
|
-
function (chipAddition) {
|
303
|
-
this._chipAddition = chipAddition;
|
304
|
-
this._toggleInput();
|
305
|
-
},
|
306
|
-
enumerable: true,
|
307
|
-
configurable: true
|
308
|
-
});
|
309
|
-
Object.defineProperty(TdChipsComponent.prototype, "canAddChip", {
|
310
|
-
/**
|
311
|
-
* Checks if not in disabled state and if chipAddition is set to 'true'
|
312
|
-
* States if a chip can be added and if the input is available
|
313
|
-
*/
|
314
|
-
get: /**
|
315
|
-
* Checks if not in disabled state and if chipAddition is set to 'true'
|
316
|
-
* States if a chip can be added and if the input is available
|
317
|
-
* @return {?}
|
318
|
-
*/
|
319
|
-
function () {
|
320
|
-
return this.chipAddition && !this.disabled;
|
321
|
-
},
|
322
|
-
enumerable: true,
|
323
|
-
configurable: true
|
324
|
-
});
|
325
|
-
Object.defineProperty(TdChipsComponent.prototype, "chipRemoval", {
|
326
|
-
get: /**
|
327
|
-
* @return {?}
|
328
|
-
*/
|
329
|
-
function () {
|
330
|
-
return this._chipRemoval;
|
331
|
-
},
|
332
|
-
/**
|
333
|
-
* chipRemoval?: boolean
|
334
|
-
* Disables the ability to remove chips. If it doesn't exist chip remmoval defaults to true.
|
335
|
-
* When setting disabled as true, this will be overriden to false.
|
336
|
-
*/
|
337
|
-
set: /**
|
338
|
-
* chipRemoval?: boolean
|
339
|
-
* Disables the ability to remove chips. If it doesn't exist chip remmoval defaults to true.
|
340
|
-
* When setting disabled as true, this will be overriden to false.
|
341
|
-
* @param {?} chipRemoval
|
342
|
-
* @return {?}
|
343
|
-
*/
|
344
|
-
function (chipRemoval) {
|
345
|
-
this._chipRemoval = chipRemoval;
|
346
|
-
},
|
347
|
-
enumerable: true,
|
348
|
-
configurable: true
|
349
|
-
});
|
350
|
-
Object.defineProperty(TdChipsComponent.prototype, "canRemoveChip", {
|
351
|
-
/**
|
352
|
-
* Checks if not in disabled state and if chipRemoval is set to 'true'
|
353
|
-
* States if a chip can be removed
|
354
|
-
*/
|
355
|
-
get: /**
|
356
|
-
* Checks if not in disabled state and if chipRemoval is set to 'true'
|
357
|
-
* States if a chip can be removed
|
358
|
-
* @return {?}
|
359
|
-
*/
|
360
|
-
function () {
|
361
|
-
return this.chipRemoval && !this.disabled;
|
362
|
-
},
|
363
|
-
enumerable: true,
|
364
|
-
configurable: true
|
365
|
-
});
|
366
|
-
Object.defineProperty(TdChipsComponent.prototype, "displayPlaceHolder", {
|
367
|
-
/**
|
368
|
-
* returns the display placeholder
|
369
|
-
*/
|
370
|
-
get: /**
|
371
|
-
* returns the display placeholder
|
372
|
-
* @return {?}
|
373
|
-
*/
|
374
|
-
function () {
|
375
|
-
if (!this.canAddChip) {
|
376
|
-
return '';
|
377
|
-
}
|
378
|
-
return this._required ? this.placeholder + " *" : this.placeholder;
|
379
|
-
},
|
380
|
-
enumerable: true,
|
381
|
-
configurable: true
|
382
|
-
});
|
383
|
-
Object.defineProperty(TdChipsComponent.prototype, "color", {
|
384
|
-
get: /**
|
385
|
-
* @return {?}
|
386
|
-
*/
|
387
|
-
function () {
|
388
|
-
return this._color;
|
389
|
-
},
|
390
|
-
/**
|
391
|
-
* color?: 'primary' | 'accent' | 'warn'
|
392
|
-
* Sets the color for the input and focus/selected state of the chips.
|
393
|
-
* Defaults to 'primary'
|
394
|
-
*/
|
395
|
-
set: /**
|
396
|
-
* color?: 'primary' | 'accent' | 'warn'
|
397
|
-
* Sets the color for the input and focus/selected state of the chips.
|
398
|
-
* Defaults to 'primary'
|
399
|
-
* @param {?} color
|
400
|
-
* @return {?}
|
401
|
-
*/
|
402
|
-
function (color) {
|
403
|
-
if (color) {
|
404
|
-
this._renderer.removeClass(this._elementRef.nativeElement, 'mat-' + this._color);
|
405
|
-
this._color = color;
|
406
|
-
this._renderer.addClass(this._elementRef.nativeElement, 'mat-' + this._color);
|
407
|
-
}
|
408
|
-
},
|
409
|
-
enumerable: true,
|
410
|
-
configurable: true
|
411
|
-
});
|
412
|
-
Object.defineProperty(TdChipsComponent.prototype, "tabIndex", {
|
413
|
-
/**
|
414
|
-
* Hostbinding to set the a11y of the TdChipsComponent depending on its state
|
415
|
-
*/
|
416
|
-
get: /**
|
417
|
-
* Hostbinding to set the a11y of the TdChipsComponent depending on its state
|
418
|
-
* @return {?}
|
419
|
-
*/
|
420
|
-
function () {
|
421
|
-
return this.disabled ? -1 : this._tabIndex;
|
422
|
-
},
|
423
|
-
enumerable: true,
|
424
|
-
configurable: true
|
425
|
-
});
|
426
|
-
/**
|
427
|
-
* Listens to host focus event to act on it
|
428
|
-
*/
|
429
|
-
/**
|
430
|
-
* Listens to host focus event to act on it
|
431
|
-
* @param {?} event
|
432
|
-
* @return {?}
|
433
|
-
*/
|
434
|
-
TdChipsComponent.prototype.focusListener = /**
|
435
|
-
* Listens to host focus event to act on it
|
436
|
-
* @param {?} event
|
437
|
-
* @return {?}
|
438
|
-
*/
|
439
|
-
function (event) {
|
440
|
-
// should only focus if its not via mousedown to prevent clashing with autocomplete
|
441
|
-
if (!this._isMousedown) {
|
442
|
-
this.focus();
|
443
|
-
}
|
444
|
-
event.preventDefault();
|
445
|
-
};
|
446
|
-
/**
|
447
|
-
* Listens to host mousedown event to act on it
|
448
|
-
*/
|
449
|
-
/**
|
450
|
-
* Listens to host mousedown event to act on it
|
451
|
-
* @param {?} event
|
452
|
-
* @return {?}
|
453
|
-
*/
|
454
|
-
TdChipsComponent.prototype.mousedownListener = /**
|
455
|
-
* Listens to host mousedown event to act on it
|
456
|
-
* @param {?} event
|
457
|
-
* @return {?}
|
458
|
-
*/
|
459
|
-
function (event) {
|
460
|
-
var _this = this;
|
461
|
-
// sets a flag to know if there was a mousedown and then it returns it back to false
|
462
|
-
this._isMousedown = true;
|
463
|
-
timer()
|
464
|
-
.toPromise()
|
465
|
-
.then((/**
|
466
|
-
* @return {?}
|
467
|
-
*/
|
468
|
-
function () {
|
469
|
-
_this._isMousedown = false;
|
470
|
-
}));
|
471
|
-
};
|
472
|
-
/**
|
473
|
-
* If clicking on :host or `td-chips-wrapper`, then we stop the click propagation so the autocomplete
|
474
|
-
* doesnt close automatically.
|
475
|
-
*/
|
476
|
-
/**
|
477
|
-
* If clicking on :host or `td-chips-wrapper`, then we stop the click propagation so the autocomplete
|
478
|
-
* doesnt close automatically.
|
479
|
-
* @param {?} event
|
480
|
-
* @return {?}
|
481
|
-
*/
|
482
|
-
TdChipsComponent.prototype.clickListener = /**
|
483
|
-
* If clicking on :host or `td-chips-wrapper`, then we stop the click propagation so the autocomplete
|
484
|
-
* doesnt close automatically.
|
485
|
-
* @param {?} event
|
486
|
-
* @return {?}
|
487
|
-
*/
|
488
|
-
function (event) {
|
489
|
-
/** @type {?} */
|
490
|
-
var clickTarget = (/** @type {?} */ (event.target));
|
491
|
-
if (clickTarget === this._elementRef.nativeElement || clickTarget.className.indexOf('td-chips-wrapper') > -1) {
|
492
|
-
this.focus();
|
493
|
-
event.preventDefault();
|
494
|
-
event.stopPropagation();
|
495
|
-
}
|
496
|
-
};
|
497
|
-
/**
|
498
|
-
* Listens to host keydown event to act on it depending on the keypress
|
499
|
-
*/
|
500
|
-
/**
|
501
|
-
* Listens to host keydown event to act on it depending on the keypress
|
502
|
-
* @param {?} event
|
503
|
-
* @return {?}
|
504
|
-
*/
|
505
|
-
TdChipsComponent.prototype.keydownListener = /**
|
506
|
-
* Listens to host keydown event to act on it depending on the keypress
|
507
|
-
* @param {?} event
|
508
|
-
* @return {?}
|
509
|
-
*/
|
510
|
-
function (event) {
|
511
|
-
var _this = this;
|
512
|
-
switch (event.keyCode) {
|
513
|
-
case TAB:
|
514
|
-
// if tabing out, then unfocus the component
|
515
|
-
timer()
|
516
|
-
.toPromise()
|
517
|
-
.then((/**
|
518
|
-
* @return {?}
|
519
|
-
*/
|
520
|
-
function () {
|
521
|
-
_this.removeFocusedState();
|
522
|
-
}));
|
523
|
-
break;
|
524
|
-
case ESCAPE:
|
525
|
-
if (this._inputChild.focused) {
|
526
|
-
this._nativeInput.nativeElement.blur();
|
527
|
-
this.removeFocusedState();
|
528
|
-
this._closeAutocomplete();
|
529
|
-
}
|
530
|
-
else {
|
531
|
-
this.focus();
|
532
|
-
}
|
533
|
-
break;
|
534
|
-
default:
|
535
|
-
// default
|
536
|
-
}
|
537
|
-
};
|
538
|
-
/**
|
539
|
-
* @return {?}
|
540
|
-
*/
|
541
|
-
TdChipsComponent.prototype.ngOnInit = /**
|
542
|
-
* @return {?}
|
543
|
-
*/
|
544
|
-
function () {
|
545
|
-
var _this = this;
|
546
|
-
this._inputValueChangesSubs = this.inputControl.valueChanges
|
547
|
-
.pipe(debounceTime(this.debounce))
|
548
|
-
.subscribe((/**
|
549
|
-
* @param {?} value
|
550
|
-
* @return {?}
|
551
|
-
*/
|
552
|
-
function (value) {
|
553
|
-
_this.inputChange.emit(value ? value : '');
|
554
|
-
}));
|
555
|
-
this._changeDetectorRef.markForCheck();
|
556
|
-
};
|
557
|
-
/**
|
558
|
-
* @return {?}
|
559
|
-
*/
|
560
|
-
TdChipsComponent.prototype.ngAfterViewInit = /**
|
561
|
-
* @return {?}
|
562
|
-
*/
|
563
|
-
function () {
|
564
|
-
this._watchOutsideClick();
|
565
|
-
this._changeDetectorRef.markForCheck();
|
566
|
-
};
|
567
|
-
/**
|
568
|
-
* @return {?}
|
569
|
-
*/
|
570
|
-
TdChipsComponent.prototype.ngDoCheck = /**
|
571
|
-
* @return {?}
|
572
|
-
*/
|
573
|
-
function () {
|
574
|
-
// Throw onChange event only if array changes size.
|
575
|
-
if (this.value && this.value.length !== this._length) {
|
576
|
-
this._length = this.value.length;
|
577
|
-
this.onChange(this.value);
|
578
|
-
}
|
579
|
-
};
|
580
|
-
/**
|
581
|
-
* @return {?}
|
582
|
-
*/
|
583
|
-
TdChipsComponent.prototype.ngOnDestroy = /**
|
584
|
-
* @return {?}
|
585
|
-
*/
|
586
|
-
function () {
|
587
|
-
this._outsideClickSubs.unsubscribe();
|
588
|
-
this._inputValueChangesSubs.unsubscribe();
|
589
|
-
};
|
590
|
-
/**
|
591
|
-
* @return {?}
|
592
|
-
*/
|
593
|
-
TdChipsComponent.prototype._setInternalClick = /**
|
594
|
-
* @return {?}
|
595
|
-
*/
|
596
|
-
function () {
|
597
|
-
this._internalClick = true;
|
598
|
-
};
|
599
|
-
/** Method executed when the disabled value changes */
|
600
|
-
/**
|
601
|
-
* Method executed when the disabled value changes
|
602
|
-
* @param {?} v
|
603
|
-
* @return {?}
|
604
|
-
*/
|
605
|
-
TdChipsComponent.prototype.onDisabledChange = /**
|
606
|
-
* Method executed when the disabled value changes
|
607
|
-
* @param {?} v
|
608
|
-
* @return {?}
|
609
|
-
*/
|
610
|
-
function (v) {
|
611
|
-
this._toggleInput();
|
612
|
-
};
|
613
|
-
/**
|
614
|
-
* Method that is executed when trying to create a new chip from the autocomplete.
|
615
|
-
* It check if [requireMatch] is enabled, and tries to add the first active option
|
616
|
-
* else if just adds the value thats on the input
|
617
|
-
* returns 'true' if successful, 'false' if it fails.
|
618
|
-
*/
|
619
|
-
/**
|
620
|
-
* Method that is executed when trying to create a new chip from the autocomplete.
|
621
|
-
* It check if [requireMatch] is enabled, and tries to add the first active option
|
622
|
-
* else if just adds the value thats on the input
|
623
|
-
* returns 'true' if successful, 'false' if it fails.
|
624
|
-
* @return {?}
|
625
|
-
*/
|
626
|
-
TdChipsComponent.prototype._handleAddChip = /**
|
627
|
-
* Method that is executed when trying to create a new chip from the autocomplete.
|
628
|
-
* It check if [requireMatch] is enabled, and tries to add the first active option
|
629
|
-
* else if just adds the value thats on the input
|
630
|
-
* returns 'true' if successful, 'false' if it fails.
|
631
|
-
* @return {?}
|
632
|
-
*/
|
633
|
-
function () {
|
634
|
-
/** @type {?} */
|
635
|
-
var value;
|
636
|
-
if (this.requireMatch) {
|
637
|
-
/** @type {?} */
|
638
|
-
var selectedOptions = this._options.toArray().filter((/**
|
639
|
-
* @param {?} option
|
640
|
-
* @return {?}
|
641
|
-
*/
|
642
|
-
function (option) {
|
643
|
-
return option.active;
|
644
|
-
}));
|
645
|
-
if (selectedOptions.length > 0) {
|
646
|
-
value = selectedOptions[0].value;
|
647
|
-
selectedOptions[0].setInactiveStyles();
|
648
|
-
}
|
649
|
-
if (!value) {
|
650
|
-
return false;
|
651
|
-
}
|
652
|
-
}
|
653
|
-
else {
|
654
|
-
// if there is a selection, then use that
|
655
|
-
// else use the input value as chip
|
656
|
-
if (this._autocompleteTrigger.activeOption) {
|
657
|
-
value = this._autocompleteTrigger.activeOption.value;
|
658
|
-
this._autocompleteTrigger.activeOption.setInactiveStyles();
|
659
|
-
}
|
660
|
-
else {
|
661
|
-
value = this._inputChild.value;
|
662
|
-
if (value.trim() === '') {
|
663
|
-
return false;
|
664
|
-
}
|
665
|
-
}
|
666
|
-
}
|
667
|
-
return this.addChip(value);
|
668
|
-
};
|
669
|
-
/**
|
670
|
-
* Method thats exectuted when trying to add a value as chip
|
671
|
-
* returns 'true' if successful, 'false' if it fails.
|
672
|
-
*/
|
673
|
-
/**
|
674
|
-
* Method thats exectuted when trying to add a value as chip
|
675
|
-
* returns 'true' if successful, 'false' if it fails.
|
676
|
-
* @param {?} value
|
677
|
-
* @return {?}
|
678
|
-
*/
|
679
|
-
TdChipsComponent.prototype.addChip = /**
|
680
|
-
* Method thats exectuted when trying to add a value as chip
|
681
|
-
* returns 'true' if successful, 'false' if it fails.
|
682
|
-
* @param {?} value
|
683
|
-
* @return {?}
|
684
|
-
*/
|
685
|
-
function (value) {
|
686
|
-
/**
|
687
|
-
* add a debounce ms delay when reopening the autocomplete to give it time
|
688
|
-
* to rerender the next list and at the correct spot
|
689
|
-
*/
|
690
|
-
var _this = this;
|
691
|
-
this._closeAutocomplete();
|
692
|
-
timer(this.debounce)
|
693
|
-
.toPromise()
|
694
|
-
.then((/**
|
695
|
-
* @return {?}
|
696
|
-
*/
|
697
|
-
function () {
|
698
|
-
_this.setFocusedState();
|
699
|
-
_this._setFirstOptionActive();
|
700
|
-
_this._openAutocomplete();
|
701
|
-
}));
|
702
|
-
this.inputControl.setValue('');
|
703
|
-
// check if value is already part of the model
|
704
|
-
if (this.value.findIndex((/**
|
705
|
-
* @param {?} item
|
706
|
-
* @return {?}
|
707
|
-
*/
|
708
|
-
function (item) { return _this.compareWith(item, value); })) > -1) {
|
709
|
-
return false;
|
710
|
-
}
|
711
|
-
this.value.push(value);
|
712
|
-
this.add.emit(value);
|
713
|
-
this.onChange(this.value);
|
714
|
-
this._changeDetectorRef.markForCheck();
|
715
|
-
return true;
|
716
|
-
};
|
717
|
-
/**
|
718
|
-
* Method that is executed when trying to remove a chip.
|
719
|
-
* returns 'true' if successful, 'false' if it fails.
|
720
|
-
*/
|
721
|
-
/**
|
722
|
-
* Method that is executed when trying to remove a chip.
|
723
|
-
* returns 'true' if successful, 'false' if it fails.
|
724
|
-
* @param {?} index
|
725
|
-
* @return {?}
|
726
|
-
*/
|
727
|
-
TdChipsComponent.prototype.removeChip = /**
|
728
|
-
* Method that is executed when trying to remove a chip.
|
729
|
-
* returns 'true' if successful, 'false' if it fails.
|
730
|
-
* @param {?} index
|
731
|
-
* @return {?}
|
732
|
-
*/
|
733
|
-
function (index) {
|
734
|
-
/** @type {?} */
|
735
|
-
var removedValues = this.value.splice(index, 1);
|
736
|
-
if (removedValues.length === 0) {
|
737
|
-
return false;
|
738
|
-
}
|
739
|
-
/**
|
740
|
-
* Checks if deleting last single chip, to focus input afterwards
|
741
|
-
* Else check if its not the last chip of the list to focus the next one.
|
742
|
-
*/
|
743
|
-
if (index === this._totalChips - 1 && index === 0) {
|
744
|
-
this._inputChild.focus();
|
745
|
-
}
|
746
|
-
else if (index < this._totalChips - 1) {
|
747
|
-
this._focusChip(index + 1);
|
748
|
-
}
|
749
|
-
else if (index > 0) {
|
750
|
-
this._focusChip(index - 1);
|
751
|
-
}
|
752
|
-
this.remove.emit(removedValues[0]);
|
753
|
-
this.onChange(this.value);
|
754
|
-
this.inputControl.setValue('');
|
755
|
-
this._changeDetectorRef.markForCheck();
|
756
|
-
return true;
|
757
|
-
};
|
758
|
-
/**
|
759
|
-
* Sets blur of chip and sends out event
|
760
|
-
*/
|
761
|
-
/**
|
762
|
-
* Sets blur of chip and sends out event
|
763
|
-
* @param {?} event
|
764
|
-
* @param {?} value
|
765
|
-
* @return {?}
|
766
|
-
*/
|
767
|
-
TdChipsComponent.prototype._handleChipBlur = /**
|
768
|
-
* Sets blur of chip and sends out event
|
769
|
-
* @param {?} event
|
770
|
-
* @param {?} value
|
771
|
-
* @return {?}
|
772
|
-
*/
|
773
|
-
function (event, value) {
|
774
|
-
this.chipBlur.emit(value);
|
775
|
-
};
|
776
|
-
/**
|
777
|
-
* Sets focus of chip and sends out event
|
778
|
-
*/
|
779
|
-
/**
|
780
|
-
* Sets focus of chip and sends out event
|
781
|
-
* @param {?} event
|
782
|
-
* @param {?} value
|
783
|
-
* @return {?}
|
784
|
-
*/
|
785
|
-
TdChipsComponent.prototype._handleChipFocus = /**
|
786
|
-
* Sets focus of chip and sends out event
|
787
|
-
* @param {?} event
|
788
|
-
* @param {?} value
|
789
|
-
* @return {?}
|
790
|
-
*/
|
791
|
-
function (event, value) {
|
792
|
-
this.setFocusedState();
|
793
|
-
this.chipFocus.emit(value);
|
794
|
-
};
|
795
|
-
/**
|
796
|
-
* @return {?}
|
797
|
-
*/
|
798
|
-
TdChipsComponent.prototype._handleFocus = /**
|
799
|
-
* @return {?}
|
800
|
-
*/
|
801
|
-
function () {
|
802
|
-
this.setFocusedState();
|
803
|
-
this._setFirstOptionActive();
|
804
|
-
return true;
|
805
|
-
};
|
806
|
-
/**
|
807
|
-
* Sets focus state of the component
|
808
|
-
*/
|
809
|
-
/**
|
810
|
-
* Sets focus state of the component
|
811
|
-
* @return {?}
|
812
|
-
*/
|
813
|
-
TdChipsComponent.prototype.setFocusedState = /**
|
814
|
-
* Sets focus state of the component
|
815
|
-
* @return {?}
|
816
|
-
*/
|
817
|
-
function () {
|
818
|
-
if (!this.disabled) {
|
819
|
-
this._focused = true;
|
820
|
-
this._tabIndex = -1;
|
821
|
-
this._changeDetectorRef.markForCheck();
|
822
|
-
}
|
823
|
-
};
|
824
|
-
/**
|
825
|
-
* Removes focus state of the component
|
826
|
-
*/
|
827
|
-
/**
|
828
|
-
* Removes focus state of the component
|
829
|
-
* @return {?}
|
830
|
-
*/
|
831
|
-
TdChipsComponent.prototype.removeFocusedState = /**
|
832
|
-
* Removes focus state of the component
|
833
|
-
* @return {?}
|
834
|
-
*/
|
835
|
-
function () {
|
836
|
-
this._focused = false;
|
837
|
-
this._tabIndex = 0;
|
838
|
-
this._changeDetectorRef.markForCheck();
|
839
|
-
};
|
840
|
-
/**
|
841
|
-
* Programmatically focus the input or first chip. Since its the component entry point
|
842
|
-
* depending if a user can add or remove chips
|
843
|
-
*/
|
844
|
-
/**
|
845
|
-
* Programmatically focus the input or first chip. Since its the component entry point
|
846
|
-
* depending if a user can add or remove chips
|
847
|
-
* @return {?}
|
848
|
-
*/
|
849
|
-
TdChipsComponent.prototype.focus = /**
|
850
|
-
* Programmatically focus the input or first chip. Since its the component entry point
|
851
|
-
* depending if a user can add or remove chips
|
852
|
-
* @return {?}
|
853
|
-
*/
|
854
|
-
function () {
|
855
|
-
if (this.canAddChip) {
|
856
|
-
this._inputChild.focus();
|
857
|
-
}
|
858
|
-
else if (!this.disabled) {
|
859
|
-
this._focusFirstChip();
|
860
|
-
}
|
861
|
-
};
|
862
|
-
/**
|
863
|
-
* Passes relevant input key presses.
|
864
|
-
*/
|
865
|
-
/**
|
866
|
-
* Passes relevant input key presses.
|
867
|
-
* @param {?} event
|
868
|
-
* @return {?}
|
869
|
-
*/
|
870
|
-
TdChipsComponent.prototype._inputKeydown = /**
|
871
|
-
* Passes relevant input key presses.
|
872
|
-
* @param {?} event
|
873
|
-
* @return {?}
|
874
|
-
*/
|
875
|
-
function (event) {
|
876
|
-
switch (event.keyCode) {
|
877
|
-
case UP_ARROW:
|
878
|
-
/**
|
879
|
-
* Since the first item is highlighted on [requireMatch], we need to inactivate it
|
880
|
-
* when pressing the up key
|
881
|
-
*/
|
882
|
-
if (this.requireMatch) {
|
883
|
-
/** @type {?} */
|
884
|
-
var length_1 = this._options.length;
|
885
|
-
if (length_1 > 1 && this._options.toArray()[0].active && this._internalActivateOption) {
|
886
|
-
this._options.toArray()[0].setInactiveStyles();
|
887
|
-
this._internalActivateOption = false;
|
888
|
-
// prevent default window scrolling
|
889
|
-
event.preventDefault();
|
890
|
-
}
|
891
|
-
}
|
892
|
-
break;
|
893
|
-
case LEFT_ARROW:
|
894
|
-
case DELETE:
|
895
|
-
case BACKSPACE:
|
896
|
-
this._closeAutocomplete();
|
897
|
-
/** Check to see if input is empty when pressing left arrow to move to the last chip */
|
898
|
-
if (!this._inputChild.value) {
|
899
|
-
this._focusLastChip();
|
900
|
-
// prevent default window scrolling
|
901
|
-
event.preventDefault();
|
902
|
-
}
|
903
|
-
break;
|
904
|
-
case RIGHT_ARROW:
|
905
|
-
this._closeAutocomplete();
|
906
|
-
/** Check to see if input is empty when pressing right arrow to move to the first chip */
|
907
|
-
if (!this._inputChild.value) {
|
908
|
-
this._focusFirstChip();
|
909
|
-
// prevent default window scrolling
|
910
|
-
event.preventDefault();
|
911
|
-
}
|
912
|
-
break;
|
913
|
-
default:
|
914
|
-
// default
|
915
|
-
}
|
916
|
-
};
|
917
|
-
/**
|
918
|
-
* Passes relevant chip key presses.
|
919
|
-
*/
|
920
|
-
/**
|
921
|
-
* Passes relevant chip key presses.
|
922
|
-
* @param {?} event
|
923
|
-
* @param {?} index
|
924
|
-
* @return {?}
|
925
|
-
*/
|
926
|
-
TdChipsComponent.prototype._chipKeydown = /**
|
927
|
-
* Passes relevant chip key presses.
|
928
|
-
* @param {?} event
|
929
|
-
* @param {?} index
|
930
|
-
* @return {?}
|
931
|
-
*/
|
932
|
-
function (event, index) {
|
933
|
-
switch (event.keyCode) {
|
934
|
-
case DELETE:
|
935
|
-
case BACKSPACE:
|
936
|
-
/** Check to see if we can delete a chip */
|
937
|
-
if (this.canRemoveChip) {
|
938
|
-
this.removeChip(index);
|
939
|
-
}
|
940
|
-
break;
|
941
|
-
case UP_ARROW:
|
942
|
-
case LEFT_ARROW:
|
943
|
-
/**
|
944
|
-
* Check to see if left/down arrow was pressed while focusing the first chip to focus input next
|
945
|
-
* Also check if input should be focused
|
946
|
-
*/
|
947
|
-
if (index === 0) {
|
948
|
-
// only try to target input if pressing left
|
949
|
-
if (this.canAddChip && event.keyCode === LEFT_ARROW) {
|
950
|
-
this._inputChild.focus();
|
951
|
-
}
|
952
|
-
else {
|
953
|
-
this._focusLastChip();
|
954
|
-
}
|
955
|
-
}
|
956
|
-
else if (index > 0) {
|
957
|
-
this._focusChip(index - 1);
|
958
|
-
}
|
959
|
-
// prevent default window scrolling
|
960
|
-
event.preventDefault();
|
961
|
-
break;
|
962
|
-
case DOWN_ARROW:
|
963
|
-
case RIGHT_ARROW:
|
964
|
-
/**
|
965
|
-
* Check to see if right/up arrow was pressed while focusing the last chip to focus input next
|
966
|
-
* Also check if input should be focused
|
967
|
-
*/
|
968
|
-
if (index === this._totalChips - 1) {
|
969
|
-
// only try to target input if pressing right
|
970
|
-
if (this.canAddChip && event.keyCode === RIGHT_ARROW) {
|
971
|
-
this._inputChild.focus();
|
972
|
-
}
|
973
|
-
else {
|
974
|
-
this._focusFirstChip();
|
975
|
-
}
|
976
|
-
}
|
977
|
-
else if (index < this._totalChips - 1) {
|
978
|
-
this._focusChip(index + 1);
|
979
|
-
}
|
980
|
-
// prevent default window scrolling
|
981
|
-
event.preventDefault();
|
982
|
-
break;
|
983
|
-
default:
|
984
|
-
// default
|
985
|
-
}
|
986
|
-
};
|
987
|
-
/**
|
988
|
-
* Method to remove from display the value added from the autocomplete since it goes directly as chip.
|
989
|
-
*/
|
990
|
-
/**
|
991
|
-
* Method to remove from display the value added from the autocomplete since it goes directly as chip.
|
992
|
-
* @return {?}
|
993
|
-
*/
|
994
|
-
TdChipsComponent.prototype._removeInputDisplay = /**
|
995
|
-
* Method to remove from display the value added from the autocomplete since it goes directly as chip.
|
996
|
-
* @return {?}
|
997
|
-
*/
|
998
|
-
function () {
|
999
|
-
return '';
|
1000
|
-
};
|
1001
|
-
/**
|
1002
|
-
* Method to open the autocomplete manually if its not already opened
|
1003
|
-
*/
|
1004
|
-
/**
|
1005
|
-
* Method to open the autocomplete manually if its not already opened
|
1006
|
-
* @return {?}
|
1007
|
-
*/
|
1008
|
-
TdChipsComponent.prototype._openAutocomplete = /**
|
1009
|
-
* Method to open the autocomplete manually if its not already opened
|
1010
|
-
* @return {?}
|
1011
|
-
*/
|
1012
|
-
function () {
|
1013
|
-
if (!this._autocompleteTrigger.panelOpen) {
|
1014
|
-
this._autocompleteTrigger.openPanel();
|
1015
|
-
this._changeDetectorRef.markForCheck();
|
1016
|
-
}
|
1017
|
-
};
|
1018
|
-
/**
|
1019
|
-
* Method to close the autocomplete manually if its not already closed
|
1020
|
-
*/
|
1021
|
-
/**
|
1022
|
-
* Method to close the autocomplete manually if its not already closed
|
1023
|
-
* @return {?}
|
1024
|
-
*/
|
1025
|
-
TdChipsComponent.prototype._closeAutocomplete = /**
|
1026
|
-
* Method to close the autocomplete manually if its not already closed
|
1027
|
-
* @return {?}
|
1028
|
-
*/
|
1029
|
-
function () {
|
1030
|
-
if (this._autocompleteTrigger.panelOpen) {
|
1031
|
-
this._autocompleteTrigger.closePanel();
|
1032
|
-
this._changeDetectorRef.markForCheck();
|
1033
|
-
}
|
1034
|
-
};
|
1035
|
-
Object.defineProperty(TdChipsComponent.prototype, "_totalChips", {
|
1036
|
-
/**
|
1037
|
-
* Get total of chips
|
1038
|
-
*/
|
1039
|
-
get: /**
|
1040
|
-
* Get total of chips
|
1041
|
-
* @return {?}
|
1042
|
-
*/
|
1043
|
-
function () {
|
1044
|
-
/** @type {?} */
|
1045
|
-
var chips = this._chipsChildren.toArray();
|
1046
|
-
return chips.length;
|
1047
|
-
},
|
1048
|
-
enumerable: true,
|
1049
|
-
configurable: true
|
1050
|
-
});
|
1051
|
-
/**
|
1052
|
-
* Method to focus a desired chip by index
|
1053
|
-
*/
|
1054
|
-
/**
|
1055
|
-
* Method to focus a desired chip by index
|
1056
|
-
* @private
|
1057
|
-
* @param {?} index
|
1058
|
-
* @return {?}
|
1059
|
-
*/
|
1060
|
-
TdChipsComponent.prototype._focusChip = /**
|
1061
|
-
* Method to focus a desired chip by index
|
1062
|
-
* @private
|
1063
|
-
* @param {?} index
|
1064
|
-
* @return {?}
|
1065
|
-
*/
|
1066
|
-
function (index) {
|
1067
|
-
/** check to see if index exists in the array before focusing */
|
1068
|
-
if (index > -1 && this._totalChips > index) {
|
1069
|
-
this._chipsChildren.toArray()[index].focus();
|
1070
|
-
}
|
1071
|
-
};
|
1072
|
-
/** Method to focus first chip */
|
1073
|
-
/**
|
1074
|
-
* Method to focus first chip
|
1075
|
-
* @private
|
1076
|
-
* @return {?}
|
1077
|
-
*/
|
1078
|
-
TdChipsComponent.prototype._focusFirstChip = /**
|
1079
|
-
* Method to focus first chip
|
1080
|
-
* @private
|
1081
|
-
* @return {?}
|
1082
|
-
*/
|
1083
|
-
function () {
|
1084
|
-
this._focusChip(0);
|
1085
|
-
};
|
1086
|
-
/** Method to focus last chip */
|
1087
|
-
/**
|
1088
|
-
* Method to focus last chip
|
1089
|
-
* @private
|
1090
|
-
* @return {?}
|
1091
|
-
*/
|
1092
|
-
TdChipsComponent.prototype._focusLastChip = /**
|
1093
|
-
* Method to focus last chip
|
1094
|
-
* @private
|
1095
|
-
* @return {?}
|
1096
|
-
*/
|
1097
|
-
function () {
|
1098
|
-
this._focusChip(this._totalChips - 1);
|
1099
|
-
};
|
1100
|
-
/**
|
1101
|
-
* Method to toggle the disable state of input
|
1102
|
-
* Checks if not in disabled state and if chipAddition is set to 'true'
|
1103
|
-
*/
|
1104
|
-
/**
|
1105
|
-
* Method to toggle the disable state of input
|
1106
|
-
* Checks if not in disabled state and if chipAddition is set to 'true'
|
1107
|
-
* @private
|
1108
|
-
* @return {?}
|
1109
|
-
*/
|
1110
|
-
TdChipsComponent.prototype._toggleInput = /**
|
1111
|
-
* Method to toggle the disable state of input
|
1112
|
-
* Checks if not in disabled state and if chipAddition is set to 'true'
|
1113
|
-
* @private
|
1114
|
-
* @return {?}
|
1115
|
-
*/
|
1116
|
-
function () {
|
1117
|
-
if (this.canAddChip) {
|
1118
|
-
this.inputControl.enable();
|
1119
|
-
}
|
1120
|
-
else {
|
1121
|
-
this.inputControl.disable();
|
1122
|
-
}
|
1123
|
-
this._changeDetectorRef.markForCheck();
|
1124
|
-
};
|
1125
|
-
/**
|
1126
|
-
* Sets first option as active to let the user know which one will be added when pressing enter
|
1127
|
-
* Only if [requireMatch] has been set
|
1128
|
-
*/
|
1129
|
-
/**
|
1130
|
-
* Sets first option as active to let the user know which one will be added when pressing enter
|
1131
|
-
* Only if [requireMatch] has been set
|
1132
|
-
* @private
|
1133
|
-
* @return {?}
|
1134
|
-
*/
|
1135
|
-
TdChipsComponent.prototype._setFirstOptionActive = /**
|
1136
|
-
* Sets first option as active to let the user know which one will be added when pressing enter
|
1137
|
-
* Only if [requireMatch] has been set
|
1138
|
-
* @private
|
1139
|
-
* @return {?}
|
1140
|
-
*/
|
1141
|
-
function () {
|
1142
|
-
var _this = this;
|
1143
|
-
if (this.requireMatch) {
|
1144
|
-
// need to use a timer here to wait until the autocomplete has been opened (end of queue)
|
1145
|
-
timer()
|
1146
|
-
.toPromise()
|
1147
|
-
.then((/**
|
1148
|
-
* @return {?}
|
1149
|
-
*/
|
1150
|
-
function () {
|
1151
|
-
if (_this.focused && _this._options && _this._options.length > 0) {
|
1152
|
-
// clean up of previously active options
|
1153
|
-
_this._options.toArray().forEach((/**
|
1154
|
-
* @param {?} option
|
1155
|
-
* @return {?}
|
1156
|
-
*/
|
1157
|
-
function (option) {
|
1158
|
-
option.setInactiveStyles();
|
1159
|
-
}));
|
1160
|
-
// set the first one as active
|
1161
|
-
_this._options.toArray()[0].setActiveStyles();
|
1162
|
-
_this._internalActivateOption = true;
|
1163
|
-
_this._changeDetectorRef.markForCheck();
|
1164
|
-
}
|
1165
|
-
}));
|
1166
|
-
}
|
1167
|
-
};
|
1168
|
-
/**
|
1169
|
-
* Watches clicks outside of the component to remove the focus
|
1170
|
-
* The autocomplete panel is considered inside the component so we
|
1171
|
-
* need to use a flag to find out when its clicked.
|
1172
|
-
*/
|
1173
|
-
/**
|
1174
|
-
* Watches clicks outside of the component to remove the focus
|
1175
|
-
* The autocomplete panel is considered inside the component so we
|
1176
|
-
* need to use a flag to find out when its clicked.
|
1177
|
-
* @private
|
1178
|
-
* @return {?}
|
1179
|
-
*/
|
1180
|
-
TdChipsComponent.prototype._watchOutsideClick = /**
|
1181
|
-
* Watches clicks outside of the component to remove the focus
|
1182
|
-
* The autocomplete panel is considered inside the component so we
|
1183
|
-
* need to use a flag to find out when its clicked.
|
1184
|
-
* @private
|
1185
|
-
* @return {?}
|
1186
|
-
*/
|
1187
|
-
function () {
|
1188
|
-
var _this = this;
|
1189
|
-
if (this._document) {
|
1190
|
-
this._outsideClickSubs = merge(fromEvent(this._document, 'click'), fromEvent(this._document, 'touchend'))
|
1191
|
-
.pipe(debounceTime(this._touchendDebounce), filter((/**
|
1192
|
-
* @param {?} event
|
1193
|
-
* @return {?}
|
1194
|
-
*/
|
1195
|
-
function (event) {
|
1196
|
-
/** @type {?} */
|
1197
|
-
var clickTarget = (/** @type {?} */ (event.target));
|
1198
|
-
setTimeout((/**
|
1199
|
-
* @return {?}
|
1200
|
-
*/
|
1201
|
-
function () {
|
1202
|
-
_this._internalClick = false;
|
1203
|
-
}));
|
1204
|
-
return (_this.focused &&
|
1205
|
-
clickTarget !== _this._elementRef.nativeElement &&
|
1206
|
-
!_this._elementRef.nativeElement.contains(clickTarget) &&
|
1207
|
-
!_this._internalClick);
|
1208
|
-
})))
|
1209
|
-
.subscribe((/**
|
1210
|
-
* @return {?}
|
1211
|
-
*/
|
1212
|
-
function () {
|
1213
|
-
if (_this.focused) {
|
1214
|
-
_this._autocompleteTrigger.closePanel();
|
1215
|
-
_this.removeFocusedState();
|
1216
|
-
_this.onTouched();
|
1217
|
-
_this._changeDetectorRef.markForCheck();
|
1218
|
-
}
|
1219
|
-
}));
|
1220
|
-
}
|
1221
|
-
return undefined;
|
1222
|
-
};
|
1223
|
-
TdChipsComponent.decorators = [
|
1224
|
-
{ type: Component, args: [{
|
1225
|
-
providers: [
|
1226
|
-
{
|
1227
|
-
provide: NG_VALUE_ACCESSOR,
|
1228
|
-
useExisting: forwardRef((/**
|
1229
|
-
* @return {?}
|
1230
|
-
*/
|
1231
|
-
function () { return TdChipsComponent; })),
|
1232
|
-
multi: true,
|
1233
|
-
},
|
1234
|
-
],
|
1235
|
-
selector: 'td-chips',
|
1236
|
-
inputs: ['disabled', 'value'],
|
1237
|
-
template: "<div\n class=\"td-chips-wrapper\"\n [class.td-chips-stacked]=\"stacked\"\n [class.td-chips-input-before-position]=\"inputPosition === 'before'\"\n>\n <ng-template let-chip let-first=\"first\" let-index=\"index\" ngFor [ngForOf]=\"value\">\n <mat-basic-chip\n [class.td-chip-disabled]=\"disabled\"\n [class.td-chip-after-pad]=\"!canRemoveChip\"\n [disableRipple]=\"true\"\n [color]=\"color\"\n (keydown)=\"_chipKeydown($event, index)\"\n (blur)=\"_handleChipBlur($event, chip)\"\n (focus)=\"_handleChipFocus($event, chip)\"\n >\n <div class=\"td-chip\" [class.td-chip-stacked]=\"stacked\">\n <span class=\"td-chip-content\">\n <span *ngIf=\"!_chipTemplate?.templateRef\">{{ chip }}</span>\n <ng-template\n *ngIf=\"_chipTemplate?.templateRef\"\n [ngTemplateOutlet]=\"_chipTemplate?.templateRef\"\n [ngTemplateOutletContext]=\"{ chip: chip }\"\n ></ng-template>\n </span>\n <mat-icon *ngIf=\"canRemoveChip\" class=\"td-chip-removal\" (click)=\"_internalClick = removeChip(index)\">\n cancel\n </mat-icon>\n </div>\n </mat-basic-chip>\n </ng-template>\n <mat-form-field\n floatLabel=\"never\"\n class=\"td-chips-form-field\"\n [style.width.px]=\"canAddChip ? null : 0\"\n [style.height.px]=\"canAddChip ? null : 0\"\n [color]=\"color\"\n >\n <input\n matInput\n #input\n [tabIndex]=\"-1\"\n [matAutocomplete]=\"autocomplete\"\n [formControl]=\"inputControl\"\n [placeholder]=\"displayPlaceHolder\"\n (keydown)=\"_inputKeydown($event)\"\n (keyup.enter)=\"_handleAddChip()\"\n (focus)=\"_handleFocus()\"\n />\n </mat-form-field>\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [displayWith]=\"_removeInputDisplay\"\n (optionSelected)=\"addChip($event.option.value)\"\n >\n <ng-template let-item let-first=\"first\" ngFor [ngForOf]=\"items\">\n <mat-option (click)=\"_setInternalClick()\" [value]=\"item\">\n <span *ngIf=\"!_autocompleteOptionTemplate?.templateRef\">{{ item }}</span>\n <ng-template\n *ngIf=\"_autocompleteOptionTemplate?.templateRef\"\n [ngTemplateOutlet]=\"_autocompleteOptionTemplate?.templateRef\"\n [ngTemplateOutletContext]=\"{ option: item }\"\n ></ng-template>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n</div>\n<div *ngIf=\"chipAddition\" class=\"mat-form-field-underline\" [class.mat-disabled]=\"disabled\">\n <span class=\"mat-form-field-ripple\" [class.mat-focused]=\"focused\"></span>\n</div>\n<ng-content></ng-content>\n",
|
1238
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1239
|
-
styles: [":host{display:block;padding:0 5px;min-height:48px}:host .td-chips-wrapper{min-height:42px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:start;align-items:flex-start}:host .td-chips-wrapper.td-chips-stacked .mat-basic-chip,:host .td-chips-wrapper.td-chips-stacked .td-chips-form-field{width:100%}:host .td-chips-wrapper.td-chips-input-before-position .td-chips-form-field{-ms-flex-order:-1;order:-1}:host .td-chip,:host .td-chip>.td-chip-content{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;max-width:100%;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:start;justify-content:flex-start;min-width:0}:host .td-chip.td-chip-stacked,:host .td-chip>.td-chip-content.td-chip-stacked{-ms-flex-pack:justify;justify-content:space-between}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:2px}:host ::ng-deep .mat-basic-chip{display:inline-block;cursor:default;border-radius:16px;margin:8px 8px 0 0;box-sizing:border-box;max-width:100%;position:relative}html[dir=rtl] :host ::ng-deep .mat-basic-chip{margin:8px 0 0 8px;unicode-bidi:embed}body[dir=rtl] :host ::ng-deep .mat-basic-chip{margin:8px 0 0 8px;unicode-bidi:embed}[dir=rtl] :host ::ng-deep .mat-basic-chip{margin:8px 0 0 8px;unicode-bidi:embed}:host ::ng-deep .mat-basic-chip bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip .td-chip{min-height:32px;line-height:32px;font-size:13px;padding:0 0 0 12px}html[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip{padding:0 12px 0 0;unicode-bidi:embed}body[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip{padding:0 12px 0 0;unicode-bidi:embed}[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip{padding:0 12px 0 0;unicode-bidi:embed}:host ::ng-deep .mat-basic-chip .td-chip bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip .td-chip bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar]{display:inline-block;-ms-flex-order:-20;order:-20;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;height:32px;width:32px;margin:0 8px 0 -12px;border-radius:50%;-ms-flex:0 0 auto;flex:0 0 auto;box-sizing:border-box}html[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar]{margin:0 -12px 0 8px;unicode-bidi:embed}body[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar]{margin:0 -12px 0 8px;unicode-bidi:embed}[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar]{margin:0 -12px 0 8px;unicode-bidi:embed}:host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar] bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar] bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip.td-chip-after-pad{padding:0 12px 0 0}html[dir=rtl] :host ::ng-deep .mat-basic-chip.td-chip-after-pad{padding:0 0 0 12px;unicode-bidi:embed}body[dir=rtl] :host ::ng-deep .mat-basic-chip.td-chip-after-pad{padding:0 0 0 12px;unicode-bidi:embed}[dir=rtl] :host ::ng-deep .mat-basic-chip.td-chip-after-pad{padding:0 0 0 12px;unicode-bidi:embed}:host ::ng-deep .mat-basic-chip.td-chip-after-pad bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip.td-chip-after-pad bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip mat-icon.td-chip-removal{margin:0 4px;font-size:21px;line-height:22px}:host ::ng-deep .mat-basic-chip mat-icon.td-chip-removal:hover{cursor:pointer}:host ::ng-deep .td-chips-stacked .mat-basic-chip{margin:4px 0}:host ::ng-deep .td-chips-stacked .mat-basic-chip:first-of-type{margin:8px 0 4px}:host ::ng-deep .td-chips-stacked .mat-basic-chip:last-of-type{margin:4px 0 8px}:host .mat-form-field-underline{position:relative;height:1px;width:100%;bottom:0}:host .mat-form-field-underline.mat-disabled{background-position:0;bottom:-4px;background-color:transparent}:host .mat-form-field-underline .mat-form-field-ripple{position:absolute;height:2px;top:0;width:100%;-ms-transform-origin:50%;transform-origin:50%;-ms-transform:scaleX(.5);transform:scaleX(.5);visibility:hidden;opacity:0;transition:background-color .3s cubic-bezier(.55,0,.55,.2)}:host .mat-form-field-underline .mat-form-field-ripple.mat-focused{visibility:visible;opacity:1;-ms-transform:scaleX(1);transform:scaleX(1);transition:transform 150ms linear,background-color .3s cubic-bezier(.55,0,.55,.2)}:host.ng-invalid .mat-form-field-underline .mat-form-field-ripple{visibility:visible;opacity:1;-ms-transform:scaleX(1);transform:scaleX(1);transition:transform 150ms linear,background-color .3s cubic-bezier(.55,0,.55,.2)}:host ::ng-deep mat-form-field .mat-form-field-underline{display:none}"]
|
1240
|
-
}] }
|
1241
|
-
];
|
1242
|
-
/** @nocollapse */
|
1243
|
-
TdChipsComponent.ctorParameters = function () { return [
|
1244
|
-
{ type: ElementRef },
|
1245
|
-
{ type: Renderer2 },
|
1246
|
-
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] },
|
1247
|
-
{ type: ChangeDetectorRef }
|
1248
|
-
]; };
|
1249
|
-
TdChipsComponent.propDecorators = {
|
1250
|
-
_nativeInput: [{ type: ViewChild, args: ['input', { static: true },] }],
|
1251
|
-
_inputChild: [{ type: ViewChild, args: [MatInput, { static: true },] }],
|
1252
|
-
_autocompleteTrigger: [{ type: ViewChild, args: [MatAutocompleteTrigger, { static: true },] }],
|
1253
|
-
_chipsChildren: [{ type: ViewChildren, args: [MatChip,] }],
|
1254
|
-
_chipTemplate: [{ type: ContentChild, args: [TdChipDirective,] }],
|
1255
|
-
_autocompleteOptionTemplate: [{ type: ContentChild, args: [TdAutocompleteOptionDirective,] }],
|
1256
|
-
_options: [{ type: ViewChildren, args: [MatOption,] }],
|
1257
|
-
items: [{ type: Input, args: ['items',] }],
|
1258
|
-
stacked: [{ type: Input, args: ['stacked',] }],
|
1259
|
-
inputPosition: [{ type: Input, args: ['inputPosition',] }],
|
1260
|
-
requireMatch: [{ type: Input, args: ['requireMatch',] }],
|
1261
|
-
required: [{ type: Input, args: ['required',] }],
|
1262
|
-
chipAddition: [{ type: Input, args: ['chipAddition',] }],
|
1263
|
-
chipRemoval: [{ type: Input, args: ['chipRemoval',] }],
|
1264
|
-
placeholder: [{ type: Input }],
|
1265
|
-
debounce: [{ type: Input }],
|
1266
|
-
color: [{ type: Input, args: ['color',] }],
|
1267
|
-
add: [{ type: Output }],
|
1268
|
-
remove: [{ type: Output }],
|
1269
|
-
inputChange: [{ type: Output }],
|
1270
|
-
chipFocus: [{ type: Output }],
|
1271
|
-
chipBlur: [{ type: Output }],
|
1272
|
-
tabIndex: [{ type: HostBinding, args: ['attr.tabindex',] }],
|
1273
|
-
compareWith: [{ type: Input }],
|
1274
|
-
focusListener: [{ type: HostListener, args: ['focus', ['$event'],] }],
|
1275
|
-
mousedownListener: [{ type: HostListener, args: ['mousedown', ['$event'],] }],
|
1276
|
-
clickListener: [{ type: HostListener, args: ['click', ['$event'],] }],
|
1277
|
-
keydownListener: [{ type: HostListener, args: ['keydown', ['$event'],] }]
|
1278
|
-
};
|
1279
|
-
return TdChipsComponent;
|
1280
|
-
}(_TdChipsMixinBase));
|
1281
|
-
if (false) {
|
1282
|
-
/**
|
1283
|
-
* @type {?}
|
1284
|
-
* @private
|
1285
|
-
*/
|
1286
|
-
TdChipsComponent.prototype._outsideClickSubs;
|
1287
|
-
/**
|
1288
|
-
* @type {?}
|
1289
|
-
* @private
|
1290
|
-
*/
|
1291
|
-
TdChipsComponent.prototype._inputValueChangesSubs;
|
1292
|
-
/**
|
1293
|
-
* @type {?}
|
1294
|
-
* @private
|
1295
|
-
*/
|
1296
|
-
TdChipsComponent.prototype._isMousedown;
|
1297
|
-
/**
|
1298
|
-
* @type {?}
|
1299
|
-
* @private
|
1300
|
-
*/
|
1301
|
-
TdChipsComponent.prototype._items;
|
1302
|
-
/**
|
1303
|
-
* @type {?}
|
1304
|
-
* @private
|
1305
|
-
*/
|
1306
|
-
TdChipsComponent.prototype._length;
|
1307
|
-
/**
|
1308
|
-
* @type {?}
|
1309
|
-
* @private
|
1310
|
-
*/
|
1311
|
-
TdChipsComponent.prototype._stacked;
|
1312
|
-
/**
|
1313
|
-
* @type {?}
|
1314
|
-
* @private
|
1315
|
-
*/
|
1316
|
-
TdChipsComponent.prototype._requireMatch;
|
1317
|
-
/**
|
1318
|
-
* @type {?}
|
1319
|
-
* @private
|
1320
|
-
*/
|
1321
|
-
TdChipsComponent.prototype._color;
|
1322
|
-
/**
|
1323
|
-
* @type {?}
|
1324
|
-
* @private
|
1325
|
-
*/
|
1326
|
-
TdChipsComponent.prototype._inputPosition;
|
1327
|
-
/**
|
1328
|
-
* @type {?}
|
1329
|
-
* @private
|
1330
|
-
*/
|
1331
|
-
TdChipsComponent.prototype._chipAddition;
|
1332
|
-
/**
|
1333
|
-
* @type {?}
|
1334
|
-
* @private
|
1335
|
-
*/
|
1336
|
-
TdChipsComponent.prototype._chipRemoval;
|
1337
|
-
/**
|
1338
|
-
* @type {?}
|
1339
|
-
* @private
|
1340
|
-
*/
|
1341
|
-
TdChipsComponent.prototype._focused;
|
1342
|
-
/**
|
1343
|
-
* @type {?}
|
1344
|
-
* @private
|
1345
|
-
*/
|
1346
|
-
TdChipsComponent.prototype._required;
|
1347
|
-
/**
|
1348
|
-
* @type {?}
|
1349
|
-
* @private
|
1350
|
-
*/
|
1351
|
-
TdChipsComponent.prototype._tabIndex;
|
1352
|
-
/**
|
1353
|
-
* @type {?}
|
1354
|
-
* @private
|
1355
|
-
*/
|
1356
|
-
TdChipsComponent.prototype._touchendDebounce;
|
1357
|
-
/** @type {?} */
|
1358
|
-
TdChipsComponent.prototype._internalClick;
|
1359
|
-
/** @type {?} */
|
1360
|
-
TdChipsComponent.prototype._internalActivateOption;
|
1361
|
-
/** @type {?} */
|
1362
|
-
TdChipsComponent.prototype._nativeInput;
|
1363
|
-
/** @type {?} */
|
1364
|
-
TdChipsComponent.prototype._inputChild;
|
1365
|
-
/** @type {?} */
|
1366
|
-
TdChipsComponent.prototype._autocompleteTrigger;
|
1367
|
-
/** @type {?} */
|
1368
|
-
TdChipsComponent.prototype._chipsChildren;
|
1369
|
-
/** @type {?} */
|
1370
|
-
TdChipsComponent.prototype._chipTemplate;
|
1371
|
-
/** @type {?} */
|
1372
|
-
TdChipsComponent.prototype._autocompleteOptionTemplate;
|
1373
|
-
/** @type {?} */
|
1374
|
-
TdChipsComponent.prototype._options;
|
1375
|
-
/**
|
1376
|
-
* FormControl for the matInput element.
|
1377
|
-
* @type {?}
|
1378
|
-
*/
|
1379
|
-
TdChipsComponent.prototype.inputControl;
|
1380
|
-
/**
|
1381
|
-
* placeholder?: string
|
1382
|
-
* Placeholder for the autocomplete input.
|
1383
|
-
* @type {?}
|
1384
|
-
*/
|
1385
|
-
TdChipsComponent.prototype.placeholder;
|
1386
|
-
/**
|
1387
|
-
* debounce?: number
|
1388
|
-
* Debounce timeout between keypresses. Defaults to 200.
|
1389
|
-
* @type {?}
|
1390
|
-
*/
|
1391
|
-
TdChipsComponent.prototype.debounce;
|
1392
|
-
/**
|
1393
|
-
* add?: function
|
1394
|
-
* Method to be executed when a chip is added.
|
1395
|
-
* Sends chip value as event.
|
1396
|
-
* @type {?}
|
1397
|
-
*/
|
1398
|
-
TdChipsComponent.prototype.add;
|
1399
|
-
/**
|
1400
|
-
* remove?: function
|
1401
|
-
* Method to be executed when a chip is removed.
|
1402
|
-
* Sends chip value as event.
|
1403
|
-
* @type {?}
|
1404
|
-
*/
|
1405
|
-
TdChipsComponent.prototype.remove;
|
1406
|
-
/**
|
1407
|
-
* inputChange?: function
|
1408
|
-
* Method to be executed when the value in the autocomplete input changes.
|
1409
|
-
* Sends string value as event.
|
1410
|
-
* @type {?}
|
1411
|
-
*/
|
1412
|
-
TdChipsComponent.prototype.inputChange;
|
1413
|
-
/**
|
1414
|
-
* chipFocus?: function
|
1415
|
-
* Method to be executed when a chip is focused.
|
1416
|
-
* Sends chip value as event.
|
1417
|
-
* @type {?}
|
1418
|
-
*/
|
1419
|
-
TdChipsComponent.prototype.chipFocus;
|
1420
|
-
/**
|
1421
|
-
* blur?: function
|
1422
|
-
* Method to be executed when a chip is blurred.
|
1423
|
-
* Sends chip value as event.
|
1424
|
-
* @type {?}
|
1425
|
-
*/
|
1426
|
-
TdChipsComponent.prototype.chipBlur;
|
1427
|
-
/**
|
1428
|
-
* compareWith? function
|
1429
|
-
* Function used to check whether a chip value already exists.
|
1430
|
-
* Defaults to strict equality comparison ===
|
1431
|
-
* @type {?}
|
1432
|
-
*/
|
1433
|
-
TdChipsComponent.prototype.compareWith;
|
1434
|
-
/**
|
1435
|
-
* @type {?}
|
1436
|
-
* @private
|
1437
|
-
*/
|
1438
|
-
TdChipsComponent.prototype._elementRef;
|
1439
|
-
/**
|
1440
|
-
* @type {?}
|
1441
|
-
* @private
|
1442
|
-
*/
|
1443
|
-
TdChipsComponent.prototype._renderer;
|
1444
|
-
/**
|
1445
|
-
* @type {?}
|
1446
|
-
* @private
|
1447
|
-
*/
|
1448
|
-
TdChipsComponent.prototype._document;
|
1449
|
-
}
|
1450
|
-
|
1451
|
-
/**
|
1452
|
-
* @fileoverview added by tsickle
|
1453
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1454
|
-
*/
|
1455
|
-
var CovalentChipsModule = /** @class */ (function () {
|
1456
|
-
function CovalentChipsModule() {
|
1457
|
-
}
|
1458
|
-
CovalentChipsModule.decorators = [
|
1459
|
-
{ type: NgModule, args: [{
|
1460
|
-
imports: [ReactiveFormsModule, CommonModule, MatInputModule, MatIconModule, MatChipsModule, MatAutocompleteModule],
|
1461
|
-
declarations: [TdChipsComponent, TdChipDirective, TdAutocompleteOptionDirective],
|
1462
|
-
exports: [TdChipsComponent, TdChipDirective, TdAutocompleteOptionDirective],
|
1463
|
-
},] }
|
1464
|
-
];
|
1465
|
-
return CovalentChipsModule;
|
1466
|
-
}());
|
1467
|
-
|
1468
|
-
/**
|
1469
|
-
* @fileoverview added by tsickle
|
1470
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1471
|
-
*/
|
1472
|
-
|
1473
|
-
/**
|
1474
|
-
* @fileoverview added by tsickle
|
1475
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1476
|
-
*/
|
1477
|
-
|
1478
|
-
/**
|
1479
|
-
* @fileoverview added by tsickle
|
1480
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1481
|
-
*/
|
1482
|
-
|
1483
|
-
export { CovalentChipsModule, TdAutocompleteOptionDirective, TdChipDirective, TdChipsBase, TdChipsComponent, _TdChipsMixinBase };
|
1484
|
-
//# sourceMappingURL=covalent-core-chips.js.map
|