@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,1562 +0,0 @@
|
|
1
|
-
import { Component, ElementRef, ChangeDetectorRef, Injectable, ComponentFactoryResolver, Injector, Optional, SkipSelf, Directive, ViewContainerRef, TemplateRef, Input, NgModule } from '@angular/core';
|
2
|
-
import { CommonModule } from '@angular/common';
|
3
|
-
import { ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
4
|
-
import { OverlayConfig, Overlay, OverlayModule } from '@angular/cdk/overlay';
|
5
|
-
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
6
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
7
|
-
import { __extends } from 'tslib';
|
8
|
-
import { tdFadeInOutAnimation } from '@covalent/core/common';
|
9
|
-
import { Subject } from 'rxjs';
|
10
|
-
import { distinctUntilChanged } from 'rxjs/operators';
|
11
|
-
|
12
|
-
/**
|
13
|
-
* @fileoverview added by tsickle
|
14
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
15
|
-
*/
|
16
|
-
/** @enum {string} */
|
17
|
-
var LoadingType = {
|
18
|
-
Circular: 'circular',
|
19
|
-
Linear: 'linear',
|
20
|
-
};
|
21
|
-
/** @enum {string} */
|
22
|
-
var LoadingMode = {
|
23
|
-
Determinate: 'determinate',
|
24
|
-
Indeterminate: 'indeterminate',
|
25
|
-
};
|
26
|
-
/** @enum {string} */
|
27
|
-
var LoadingStrategy = {
|
28
|
-
Overlay: 'overlay',
|
29
|
-
Replace: 'replace',
|
30
|
-
};
|
31
|
-
/** @enum {string} */
|
32
|
-
var LoadingStyle = {
|
33
|
-
FullScreen: 'fullscreen',
|
34
|
-
Overlay: 'overlay',
|
35
|
-
None: 'none',
|
36
|
-
};
|
37
|
-
/** @type {?} */
|
38
|
-
var TD_CIRCLE_DIAMETER = 100;
|
39
|
-
var TdLoadingComponent = /** @class */ (function () {
|
40
|
-
function TdLoadingComponent(_elementRef, _changeDetectorRef) {
|
41
|
-
this._elementRef = _elementRef;
|
42
|
-
this._changeDetectorRef = _changeDetectorRef;
|
43
|
-
this._mode = LoadingMode.Indeterminate;
|
44
|
-
this._defaultMode = LoadingMode.Indeterminate;
|
45
|
-
this._value = 0;
|
46
|
-
this._circleDiameter = TD_CIRCLE_DIAMETER;
|
47
|
-
/**
|
48
|
-
* Flag for animation
|
49
|
-
*/
|
50
|
-
this.animation = false;
|
51
|
-
this.style = LoadingStyle.None;
|
52
|
-
/**
|
53
|
-
* type: LoadingType
|
54
|
-
* Sets type of [TdLoadingComponent] rendered.
|
55
|
-
*/
|
56
|
-
this.type = LoadingType.Circular;
|
57
|
-
/**
|
58
|
-
* color: primary' | 'accent' | 'warn'
|
59
|
-
* Sets theme color of [TdLoadingComponent] rendered.
|
60
|
-
*/
|
61
|
-
this.color = 'primary';
|
62
|
-
}
|
63
|
-
Object.defineProperty(TdLoadingComponent.prototype, "mode", {
|
64
|
-
get: /**
|
65
|
-
* @return {?}
|
66
|
-
*/
|
67
|
-
function () {
|
68
|
-
return this._mode;
|
69
|
-
},
|
70
|
-
/**
|
71
|
-
* Sets mode of [TdLoadingComponent] to LoadingMode.Determinate or LoadingMode.Indeterminate
|
72
|
-
*/
|
73
|
-
set: /**
|
74
|
-
* Sets mode of [TdLoadingComponent] to LoadingMode.Determinate or LoadingMode.Indeterminate
|
75
|
-
* @param {?} mode
|
76
|
-
* @return {?}
|
77
|
-
*/
|
78
|
-
function (mode) {
|
79
|
-
this._defaultMode = mode;
|
80
|
-
},
|
81
|
-
enumerable: true,
|
82
|
-
configurable: true
|
83
|
-
});
|
84
|
-
Object.defineProperty(TdLoadingComponent.prototype, "value", {
|
85
|
-
get: /**
|
86
|
-
* @return {?}
|
87
|
-
*/
|
88
|
-
function () {
|
89
|
-
return this._value;
|
90
|
-
},
|
91
|
-
/**
|
92
|
-
* Sets value of [TdLoadingComponent] if mode is 'LoadingMode.Determinate'
|
93
|
-
*/
|
94
|
-
set: /**
|
95
|
-
* Sets value of [TdLoadingComponent] if mode is 'LoadingMode.Determinate'
|
96
|
-
* @param {?} value
|
97
|
-
* @return {?}
|
98
|
-
*/
|
99
|
-
function (value) {
|
100
|
-
this._value = value;
|
101
|
-
// Check for changes for `OnPush` change detection
|
102
|
-
this._changeDetectorRef.markForCheck();
|
103
|
-
},
|
104
|
-
enumerable: true,
|
105
|
-
configurable: true
|
106
|
-
});
|
107
|
-
/**
|
108
|
-
* @return {?}
|
109
|
-
*/
|
110
|
-
TdLoadingComponent.prototype.ngDoCheck = /**
|
111
|
-
* @return {?}
|
112
|
-
*/
|
113
|
-
function () {
|
114
|
-
// When overlay is used and the host width has a value greater than 1px
|
115
|
-
// set the circle diameter when possible incase the loading component was rendered in a hidden state
|
116
|
-
if (this.isOverlay() && this._hostHeight() > 1 && this.animation) {
|
117
|
-
this._setCircleDiameter();
|
118
|
-
this._changeDetectorRef.markForCheck();
|
119
|
-
}
|
120
|
-
};
|
121
|
-
/**
|
122
|
-
* @return {?}
|
123
|
-
*/
|
124
|
-
TdLoadingComponent.prototype.getHeight = /**
|
125
|
-
* @return {?}
|
126
|
-
*/
|
127
|
-
function () {
|
128
|
-
// Ignore height if style is `overlay` or `fullscreen`.
|
129
|
-
// Add height if child elements have a height and style is `none`, else return default height.
|
130
|
-
if (this.isOverlay() || this.isFullScreen()) {
|
131
|
-
return undefined;
|
132
|
-
}
|
133
|
-
else {
|
134
|
-
return this.height ? this.height + "px" : '150px';
|
135
|
-
}
|
136
|
-
};
|
137
|
-
/**
|
138
|
-
* @return {?}
|
139
|
-
*/
|
140
|
-
TdLoadingComponent.prototype.getCircleDiameter = /**
|
141
|
-
* @return {?}
|
142
|
-
*/
|
143
|
-
function () {
|
144
|
-
return this._circleDiameter;
|
145
|
-
};
|
146
|
-
/**
|
147
|
-
* @return {?}
|
148
|
-
*/
|
149
|
-
TdLoadingComponent.prototype.getCircleStrokeWidth = /**
|
150
|
-
* @return {?}
|
151
|
-
*/
|
152
|
-
function () {
|
153
|
-
// we calculate the stroke width by setting it as 10% of its diameter
|
154
|
-
/** @type {?} */
|
155
|
-
var strokeWidth = this.getCircleDiameter() / 10;
|
156
|
-
return Math.abs(strokeWidth);
|
157
|
-
};
|
158
|
-
/**
|
159
|
-
* @return {?}
|
160
|
-
*/
|
161
|
-
TdLoadingComponent.prototype.isCircular = /**
|
162
|
-
* @return {?}
|
163
|
-
*/
|
164
|
-
function () {
|
165
|
-
return this.type === LoadingType.Circular;
|
166
|
-
};
|
167
|
-
/**
|
168
|
-
* @return {?}
|
169
|
-
*/
|
170
|
-
TdLoadingComponent.prototype.isLinear = /**
|
171
|
-
* @return {?}
|
172
|
-
*/
|
173
|
-
function () {
|
174
|
-
return this.type === LoadingType.Linear;
|
175
|
-
};
|
176
|
-
/**
|
177
|
-
* @return {?}
|
178
|
-
*/
|
179
|
-
TdLoadingComponent.prototype.isFullScreen = /**
|
180
|
-
* @return {?}
|
181
|
-
*/
|
182
|
-
function () {
|
183
|
-
return this.style === LoadingStyle.FullScreen;
|
184
|
-
};
|
185
|
-
/**
|
186
|
-
* @return {?}
|
187
|
-
*/
|
188
|
-
TdLoadingComponent.prototype.isOverlay = /**
|
189
|
-
* @return {?}
|
190
|
-
*/
|
191
|
-
function () {
|
192
|
-
return this.style === LoadingStyle.Overlay;
|
193
|
-
};
|
194
|
-
/**
|
195
|
-
* Starts in animation and returns an observable for completition event.
|
196
|
-
*/
|
197
|
-
/**
|
198
|
-
* Starts in animation and returns an observable for completition event.
|
199
|
-
* @return {?}
|
200
|
-
*/
|
201
|
-
TdLoadingComponent.prototype.show = /**
|
202
|
-
* Starts in animation and returns an observable for completition event.
|
203
|
-
* @return {?}
|
204
|
-
*/
|
205
|
-
function () {
|
206
|
-
/* need to switch back to the selected mode, so we have saved it in another variable
|
207
|
-
* and then recover it. (issue with protractor)
|
208
|
-
*/
|
209
|
-
this._mode = this._defaultMode;
|
210
|
-
// Set values before the animations starts
|
211
|
-
this._setCircleDiameter();
|
212
|
-
// Check for changes for `OnPush` change detection
|
213
|
-
this.animation = true;
|
214
|
-
this._changeDetectorRef.markForCheck();
|
215
|
-
};
|
216
|
-
/**
|
217
|
-
* Starts out animation and returns an observable for completition event.
|
218
|
-
*/
|
219
|
-
/**
|
220
|
-
* Starts out animation and returns an observable for completition event.
|
221
|
-
* @return {?}
|
222
|
-
*/
|
223
|
-
TdLoadingComponent.prototype.hide = /**
|
224
|
-
* Starts out animation and returns an observable for completition event.
|
225
|
-
* @return {?}
|
226
|
-
*/
|
227
|
-
function () {
|
228
|
-
this.animation = false;
|
229
|
-
/* need to switch back and forth from determinate/indeterminate so the setInterval()
|
230
|
-
* inside mat-progress-spinner stops and protractor doesnt timeout waiting to sync.
|
231
|
-
*/
|
232
|
-
this._mode = LoadingMode.Determinate;
|
233
|
-
// Check for changes for `OnPush` change detection
|
234
|
-
/* little hack to reset the loader value and animation before removing it from DOM
|
235
|
-
* else, the loader will appear with prev value when its registered again
|
236
|
-
* and will do an animation going prev value to 0.
|
237
|
-
*/
|
238
|
-
this.value = 0;
|
239
|
-
// Check for changes for `OnPush` change detection
|
240
|
-
this._changeDetectorRef.markForCheck();
|
241
|
-
};
|
242
|
-
/**
|
243
|
-
* Calculate the proper diameter for the circle and set it
|
244
|
-
*/
|
245
|
-
/**
|
246
|
-
* Calculate the proper diameter for the circle and set it
|
247
|
-
* @private
|
248
|
-
* @return {?}
|
249
|
-
*/
|
250
|
-
TdLoadingComponent.prototype._setCircleDiameter = /**
|
251
|
-
* Calculate the proper diameter for the circle and set it
|
252
|
-
* @private
|
253
|
-
* @return {?}
|
254
|
-
*/
|
255
|
-
function () {
|
256
|
-
// we set a default diameter of 100 since this is the default in material
|
257
|
-
/** @type {?} */
|
258
|
-
var diameter = TD_CIRCLE_DIAMETER;
|
259
|
-
// if height is provided, then we take that as diameter
|
260
|
-
if (this.height) {
|
261
|
-
diameter = this.height;
|
262
|
-
// else if its not provided, then we take the host height
|
263
|
-
}
|
264
|
-
else if (this.height === undefined) {
|
265
|
-
diameter = this._hostHeight();
|
266
|
-
}
|
267
|
-
// if the diameter is over TD_CIRCLE_DIAMETER, we set TD_CIRCLE_DIAMETER
|
268
|
-
if (!!diameter && diameter <= TD_CIRCLE_DIAMETER) {
|
269
|
-
this._circleDiameter = Math.floor(diameter);
|
270
|
-
}
|
271
|
-
else {
|
272
|
-
this._circleDiameter = TD_CIRCLE_DIAMETER;
|
273
|
-
}
|
274
|
-
};
|
275
|
-
/**
|
276
|
-
* Returns the host height of the loading component
|
277
|
-
*/
|
278
|
-
/**
|
279
|
-
* Returns the host height of the loading component
|
280
|
-
* @private
|
281
|
-
* @return {?}
|
282
|
-
*/
|
283
|
-
TdLoadingComponent.prototype._hostHeight = /**
|
284
|
-
* Returns the host height of the loading component
|
285
|
-
* @private
|
286
|
-
* @return {?}
|
287
|
-
*/
|
288
|
-
function () {
|
289
|
-
if ((/** @type {?} */ (this._elementRef.nativeElement))) {
|
290
|
-
return ((/** @type {?} */ (this._elementRef.nativeElement))).getBoundingClientRect().height;
|
291
|
-
}
|
292
|
-
return 0;
|
293
|
-
};
|
294
|
-
TdLoadingComponent.decorators = [
|
295
|
-
{ type: Component, args: [{
|
296
|
-
selector: 'td-loading',
|
297
|
-
template: "<div\n class=\"td-loading-wrapper\"\n [style.min-height]=\"getHeight()\"\n [class.td-overlay-circular]=\"(isOverlay() || isFullScreen()) && !isLinear()\"\n [class.td-overlay]=\"isOverlay() || isFullScreen()\"\n [class.td-fullscreen]=\"isFullScreen()\"\n>\n <div [@tdFadeInOut]=\"animation\" [style.min-height]=\"getHeight()\" class=\"td-loading\">\n <mat-progress-spinner\n *ngIf=\"isCircular()\"\n [mode]=\"mode\"\n [value]=\"value\"\n [color]=\"color\"\n [diameter]=\"getCircleDiameter()\"\n [strokeWidth]=\"getCircleStrokeWidth()\"\n ></mat-progress-spinner>\n <mat-progress-bar *ngIf=\"isLinear()\" [mode]=\"mode\" [value]=\"value\" [color]=\"color\"></mat-progress-bar>\n </div>\n <ng-template [cdkPortalOutlet]=\"content\"></ng-template>\n</div>\n",
|
298
|
-
animations: [tdFadeInOutAnimation],
|
299
|
-
styles: [".td-loading-wrapper{position:relative;display:block}.td-loading-wrapper.td-fullscreen{position:inherit}.td-loading-wrapper .td-loading{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%;-ms-flex-pack:center;justify-content:center;-ms-flex:1;flex:1}.td-loading-wrapper.td-overlay .td-loading{position:absolute;margin:0;top:0;left:0;right:0;z-index:1000}.td-loading-wrapper.td-overlay .td-loading mat-progress-bar{position:absolute;top:0;left:0;right:0}.td-loading-wrapper.td-overlay-circular .td-loading{bottom:0}"]
|
300
|
-
}] }
|
301
|
-
];
|
302
|
-
/** @nocollapse */
|
303
|
-
TdLoadingComponent.ctorParameters = function () { return [
|
304
|
-
{ type: ElementRef },
|
305
|
-
{ type: ChangeDetectorRef }
|
306
|
-
]; };
|
307
|
-
return TdLoadingComponent;
|
308
|
-
}());
|
309
|
-
if (false) {
|
310
|
-
/**
|
311
|
-
* @type {?}
|
312
|
-
* @private
|
313
|
-
*/
|
314
|
-
TdLoadingComponent.prototype._mode;
|
315
|
-
/**
|
316
|
-
* @type {?}
|
317
|
-
* @private
|
318
|
-
*/
|
319
|
-
TdLoadingComponent.prototype._defaultMode;
|
320
|
-
/**
|
321
|
-
* @type {?}
|
322
|
-
* @private
|
323
|
-
*/
|
324
|
-
TdLoadingComponent.prototype._value;
|
325
|
-
/**
|
326
|
-
* @type {?}
|
327
|
-
* @private
|
328
|
-
*/
|
329
|
-
TdLoadingComponent.prototype._circleDiameter;
|
330
|
-
/**
|
331
|
-
* Flag for animation
|
332
|
-
* @type {?}
|
333
|
-
*/
|
334
|
-
TdLoadingComponent.prototype.animation;
|
335
|
-
/**
|
336
|
-
* Content injected into loading component.
|
337
|
-
* @type {?}
|
338
|
-
*/
|
339
|
-
TdLoadingComponent.prototype.content;
|
340
|
-
/** @type {?} */
|
341
|
-
TdLoadingComponent.prototype.style;
|
342
|
-
/**
|
343
|
-
* height: number
|
344
|
-
* Sets height of [TdLoadingComponent].
|
345
|
-
* @type {?}
|
346
|
-
*/
|
347
|
-
TdLoadingComponent.prototype.height;
|
348
|
-
/**
|
349
|
-
* type: LoadingType
|
350
|
-
* Sets type of [TdLoadingComponent] rendered.
|
351
|
-
* @type {?}
|
352
|
-
*/
|
353
|
-
TdLoadingComponent.prototype.type;
|
354
|
-
/**
|
355
|
-
* color: primary' | 'accent' | 'warn'
|
356
|
-
* Sets theme color of [TdLoadingComponent] rendered.
|
357
|
-
* @type {?}
|
358
|
-
*/
|
359
|
-
TdLoadingComponent.prototype.color;
|
360
|
-
/**
|
361
|
-
* @type {?}
|
362
|
-
* @private
|
363
|
-
*/
|
364
|
-
TdLoadingComponent.prototype._elementRef;
|
365
|
-
/**
|
366
|
-
* @type {?}
|
367
|
-
* @private
|
368
|
-
*/
|
369
|
-
TdLoadingComponent.prototype._changeDetectorRef;
|
370
|
-
}
|
371
|
-
|
372
|
-
/**
|
373
|
-
* @fileoverview added by tsickle
|
374
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
375
|
-
*/
|
376
|
-
/**
|
377
|
-
* @record
|
378
|
-
*/
|
379
|
-
function IInternalLoadingOptions() { }
|
380
|
-
if (false) {
|
381
|
-
/** @type {?|undefined} */
|
382
|
-
IInternalLoadingOptions.prototype.height;
|
383
|
-
/** @type {?|undefined} */
|
384
|
-
IInternalLoadingOptions.prototype.style;
|
385
|
-
}
|
386
|
-
/**
|
387
|
-
* @record
|
388
|
-
*/
|
389
|
-
function ILoadingRef() { }
|
390
|
-
if (false) {
|
391
|
-
/** @type {?} */
|
392
|
-
ILoadingRef.prototype.observable;
|
393
|
-
/** @type {?} */
|
394
|
-
ILoadingRef.prototype.componentRef;
|
395
|
-
/** @type {?|undefined} */
|
396
|
-
ILoadingRef.prototype.subject;
|
397
|
-
/** @type {?|undefined} */
|
398
|
-
ILoadingRef.prototype.times;
|
399
|
-
}
|
400
|
-
/**
|
401
|
-
* NOTE: \@internal usage only.
|
402
|
-
*/
|
403
|
-
var TdLoadingFactory = /** @class */ (function () {
|
404
|
-
function TdLoadingFactory(_componentFactoryResolver, _overlay, _injector) {
|
405
|
-
this._componentFactoryResolver = _componentFactoryResolver;
|
406
|
-
this._overlay = _overlay;
|
407
|
-
this._injector = _injector;
|
408
|
-
}
|
409
|
-
/**
|
410
|
-
* Uses material `Overlay` services to create a DOM element and attach the loading component
|
411
|
-
* into it. Leveraging the state and configuration from it.
|
412
|
-
*
|
413
|
-
* Saves a reference in context to be called when registering/resolving the loading element.
|
414
|
-
*/
|
415
|
-
/**
|
416
|
-
* Uses material `Overlay` services to create a DOM element and attach the loading component
|
417
|
-
* into it. Leveraging the state and configuration from it.
|
418
|
-
*
|
419
|
-
* Saves a reference in context to be called when registering/resolving the loading element.
|
420
|
-
* @param {?} options
|
421
|
-
* @return {?}
|
422
|
-
*/
|
423
|
-
TdLoadingFactory.prototype.createFullScreenComponent = /**
|
424
|
-
* Uses material `Overlay` services to create a DOM element and attach the loading component
|
425
|
-
* into it. Leveraging the state and configuration from it.
|
426
|
-
*
|
427
|
-
* Saves a reference in context to be called when registering/resolving the loading element.
|
428
|
-
* @param {?} options
|
429
|
-
* @return {?}
|
430
|
-
*/
|
431
|
-
function (options) {
|
432
|
-
var _this = this;
|
433
|
-
((/** @type {?} */ (options))).height = undefined;
|
434
|
-
((/** @type {?} */ (options))).style = LoadingStyle.FullScreen;
|
435
|
-
/** @type {?} */
|
436
|
-
var loadingRef = this._initializeContext();
|
437
|
-
/** @type {?} */
|
438
|
-
var loading = false;
|
439
|
-
/** @type {?} */
|
440
|
-
var overlayRef;
|
441
|
-
loadingRef.observable.pipe(distinctUntilChanged()).subscribe((/**
|
442
|
-
* @param {?} registered
|
443
|
-
* @return {?}
|
444
|
-
*/
|
445
|
-
function (registered) {
|
446
|
-
if (registered > 0 && !loading) {
|
447
|
-
loading = true;
|
448
|
-
overlayRef = _this._createOverlay();
|
449
|
-
loadingRef.componentRef = overlayRef.attach(new ComponentPortal(TdLoadingComponent));
|
450
|
-
_this._mapOptions(options, loadingRef.componentRef.instance);
|
451
|
-
loadingRef.componentRef.instance.show();
|
452
|
-
loadingRef.componentRef.changeDetectorRef.detectChanges();
|
453
|
-
}
|
454
|
-
else if (registered <= 0 && loading) {
|
455
|
-
loading = false;
|
456
|
-
loadingRef.componentRef.instance.hide();
|
457
|
-
loadingRef.componentRef.destroy();
|
458
|
-
overlayRef.detach();
|
459
|
-
overlayRef.dispose();
|
460
|
-
}
|
461
|
-
}));
|
462
|
-
return loadingRef;
|
463
|
-
};
|
464
|
-
/**
|
465
|
-
* Creates a loading component dynamically and attaches it into the given viewContainerRef.
|
466
|
-
* Leverages TemplatePortals from material to inject the template inside of it so it fits
|
467
|
-
* perfectly when overlaying it.
|
468
|
-
*
|
469
|
-
* Saves a reference in context to be called when registering/resolving the loading element.
|
470
|
-
*/
|
471
|
-
/**
|
472
|
-
* Creates a loading component dynamically and attaches it into the given viewContainerRef.
|
473
|
-
* Leverages TemplatePortals from material to inject the template inside of it so it fits
|
474
|
-
* perfectly when overlaying it.
|
475
|
-
*
|
476
|
-
* Saves a reference in context to be called when registering/resolving the loading element.
|
477
|
-
* @param {?} options
|
478
|
-
* @param {?} viewContainerRef
|
479
|
-
* @param {?} templateRef
|
480
|
-
* @return {?}
|
481
|
-
*/
|
482
|
-
TdLoadingFactory.prototype.createOverlayComponent = /**
|
483
|
-
* Creates a loading component dynamically and attaches it into the given viewContainerRef.
|
484
|
-
* Leverages TemplatePortals from material to inject the template inside of it so it fits
|
485
|
-
* perfectly when overlaying it.
|
486
|
-
*
|
487
|
-
* Saves a reference in context to be called when registering/resolving the loading element.
|
488
|
-
* @param {?} options
|
489
|
-
* @param {?} viewContainerRef
|
490
|
-
* @param {?} templateRef
|
491
|
-
* @return {?}
|
492
|
-
*/
|
493
|
-
function (options, viewContainerRef, templateRef) {
|
494
|
-
((/** @type {?} */ (options))).height = undefined;
|
495
|
-
((/** @type {?} */ (options))).style = LoadingStyle.Overlay;
|
496
|
-
/** @type {?} */
|
497
|
-
var loadingRef = this._createComponent(options);
|
498
|
-
/** @type {?} */
|
499
|
-
var loading = false;
|
500
|
-
loadingRef.componentRef.instance.content = new TemplatePortal(templateRef, viewContainerRef);
|
501
|
-
viewContainerRef.clear();
|
502
|
-
viewContainerRef.insert(loadingRef.componentRef.hostView, 0);
|
503
|
-
loadingRef.observable.pipe(distinctUntilChanged()).subscribe((/**
|
504
|
-
* @param {?} registered
|
505
|
-
* @return {?}
|
506
|
-
*/
|
507
|
-
function (registered) {
|
508
|
-
if (registered > 0 && !loading) {
|
509
|
-
loading = true;
|
510
|
-
loadingRef.componentRef.instance.show();
|
511
|
-
}
|
512
|
-
else if (registered <= 0 && loading) {
|
513
|
-
loading = false;
|
514
|
-
loadingRef.componentRef.instance.hide();
|
515
|
-
}
|
516
|
-
}));
|
517
|
-
return loadingRef;
|
518
|
-
};
|
519
|
-
/**
|
520
|
-
* Creates a loading component dynamically and attaches it into the given viewContainerRef.
|
521
|
-
* Replaces the template with the loading component depending if it was registered or resolved.
|
522
|
-
*
|
523
|
-
* Saves a reference in context to be called when registering/resolving the loading element.
|
524
|
-
*/
|
525
|
-
/**
|
526
|
-
* Creates a loading component dynamically and attaches it into the given viewContainerRef.
|
527
|
-
* Replaces the template with the loading component depending if it was registered or resolved.
|
528
|
-
*
|
529
|
-
* Saves a reference in context to be called when registering/resolving the loading element.
|
530
|
-
* @param {?} options
|
531
|
-
* @param {?} viewContainerRef
|
532
|
-
* @param {?} templateRef
|
533
|
-
* @param {?} context
|
534
|
-
* @return {?}
|
535
|
-
*/
|
536
|
-
TdLoadingFactory.prototype.createReplaceComponent = /**
|
537
|
-
* Creates a loading component dynamically and attaches it into the given viewContainerRef.
|
538
|
-
* Replaces the template with the loading component depending if it was registered or resolved.
|
539
|
-
*
|
540
|
-
* Saves a reference in context to be called when registering/resolving the loading element.
|
541
|
-
* @param {?} options
|
542
|
-
* @param {?} viewContainerRef
|
543
|
-
* @param {?} templateRef
|
544
|
-
* @param {?} context
|
545
|
-
* @return {?}
|
546
|
-
*/
|
547
|
-
function (options, viewContainerRef, templateRef, context) {
|
548
|
-
/** @type {?} */
|
549
|
-
var nativeElement = (/** @type {?} */ (templateRef.elementRef.nativeElement));
|
550
|
-
((/** @type {?} */ (options))).height = nativeElement.nextElementSibling
|
551
|
-
? nativeElement.nextElementSibling.scrollHeight
|
552
|
-
: undefined;
|
553
|
-
((/** @type {?} */ (options))).style = LoadingStyle.None;
|
554
|
-
/** @type {?} */
|
555
|
-
var loadingRef = this._createComponent(options);
|
556
|
-
/** @type {?} */
|
557
|
-
var loading = false;
|
558
|
-
// passing context so when the template is attached, we can keep the reference of the variables
|
559
|
-
/** @type {?} */
|
560
|
-
var contentRef = viewContainerRef.createEmbeddedView(templateRef, context);
|
561
|
-
loadingRef.observable.pipe(distinctUntilChanged()).subscribe((/**
|
562
|
-
* @param {?} registered
|
563
|
-
* @return {?}
|
564
|
-
*/
|
565
|
-
function (registered) {
|
566
|
-
if (registered > 0 && !loading) {
|
567
|
-
loading = true;
|
568
|
-
// detach the content and attach the loader if loader is there
|
569
|
-
/** @type {?} */
|
570
|
-
var index = viewContainerRef.indexOf(loadingRef.componentRef.hostView);
|
571
|
-
if (index < 0) {
|
572
|
-
viewContainerRef.detach(viewContainerRef.indexOf(contentRef));
|
573
|
-
viewContainerRef.insert(loadingRef.componentRef.hostView, 0);
|
574
|
-
}
|
575
|
-
loadingRef.componentRef.instance.show();
|
576
|
-
}
|
577
|
-
else if (registered <= 0 && loading) {
|
578
|
-
loading = false;
|
579
|
-
loadingRef.componentRef.instance.hide();
|
580
|
-
// detach loader and attach the content if content is there
|
581
|
-
/** @type {?} */
|
582
|
-
var index = viewContainerRef.indexOf(contentRef);
|
583
|
-
if (index < 0) {
|
584
|
-
viewContainerRef.detach(viewContainerRef.indexOf(loadingRef.componentRef.hostView));
|
585
|
-
viewContainerRef.insert(contentRef, 0);
|
586
|
-
}
|
587
|
-
/**
|
588
|
-
* Need to call "markForCheck" and "detectChanges" on attached template, so its detected by parent component when attached
|
589
|
-
* with "OnPush" change detection
|
590
|
-
*/
|
591
|
-
contentRef.detectChanges();
|
592
|
-
contentRef.markForCheck();
|
593
|
-
}
|
594
|
-
}));
|
595
|
-
return loadingRef;
|
596
|
-
};
|
597
|
-
/**
|
598
|
-
* Creates a fullscreen overlay for the loading usage.
|
599
|
-
*/
|
600
|
-
/**
|
601
|
-
* Creates a fullscreen overlay for the loading usage.
|
602
|
-
* @private
|
603
|
-
* @return {?}
|
604
|
-
*/
|
605
|
-
TdLoadingFactory.prototype._createOverlay = /**
|
606
|
-
* Creates a fullscreen overlay for the loading usage.
|
607
|
-
* @private
|
608
|
-
* @return {?}
|
609
|
-
*/
|
610
|
-
function () {
|
611
|
-
/** @type {?} */
|
612
|
-
var state = new OverlayConfig();
|
613
|
-
state.hasBackdrop = false;
|
614
|
-
state.positionStrategy = this._overlay.position().global().centerHorizontally().centerVertically();
|
615
|
-
return this._overlay.create(state);
|
616
|
-
};
|
617
|
-
/**
|
618
|
-
* Creates a generic component dynamically waiting to be attached to a viewContainerRef.
|
619
|
-
*/
|
620
|
-
/**
|
621
|
-
* Creates a generic component dynamically waiting to be attached to a viewContainerRef.
|
622
|
-
* @private
|
623
|
-
* @param {?} options
|
624
|
-
* @return {?}
|
625
|
-
*/
|
626
|
-
TdLoadingFactory.prototype._createComponent = /**
|
627
|
-
* Creates a generic component dynamically waiting to be attached to a viewContainerRef.
|
628
|
-
* @private
|
629
|
-
* @param {?} options
|
630
|
-
* @return {?}
|
631
|
-
*/
|
632
|
-
function (options) {
|
633
|
-
/** @type {?} */
|
634
|
-
var compRef = this._initializeContext();
|
635
|
-
compRef.componentRef = this._componentFactoryResolver
|
636
|
-
.resolveComponentFactory(TdLoadingComponent)
|
637
|
-
.create(this._injector);
|
638
|
-
this._mapOptions(options, compRef.componentRef.instance);
|
639
|
-
return compRef;
|
640
|
-
};
|
641
|
-
/**
|
642
|
-
* Initialize context for loading component.
|
643
|
-
*/
|
644
|
-
/**
|
645
|
-
* Initialize context for loading component.
|
646
|
-
* @private
|
647
|
-
* @return {?}
|
648
|
-
*/
|
649
|
-
TdLoadingFactory.prototype._initializeContext = /**
|
650
|
-
* Initialize context for loading component.
|
651
|
-
* @private
|
652
|
-
* @return {?}
|
653
|
-
*/
|
654
|
-
function () {
|
655
|
-
/** @type {?} */
|
656
|
-
var subject = new Subject();
|
657
|
-
return {
|
658
|
-
observable: subject.asObservable(),
|
659
|
-
subject: subject,
|
660
|
-
componentRef: undefined,
|
661
|
-
times: 0,
|
662
|
-
};
|
663
|
-
};
|
664
|
-
/**
|
665
|
-
* Maps configuration to the loading component instance.
|
666
|
-
*/
|
667
|
-
/**
|
668
|
-
* Maps configuration to the loading component instance.
|
669
|
-
* @private
|
670
|
-
* @param {?} options
|
671
|
-
* @param {?} instance
|
672
|
-
* @return {?}
|
673
|
-
*/
|
674
|
-
TdLoadingFactory.prototype._mapOptions = /**
|
675
|
-
* Maps configuration to the loading component instance.
|
676
|
-
* @private
|
677
|
-
* @param {?} options
|
678
|
-
* @param {?} instance
|
679
|
-
* @return {?}
|
680
|
-
*/
|
681
|
-
function (options, instance) {
|
682
|
-
instance.style = options.style;
|
683
|
-
if (options.type !== undefined) {
|
684
|
-
instance.type = options.type;
|
685
|
-
}
|
686
|
-
if (options.height !== undefined) {
|
687
|
-
instance.height = options.height;
|
688
|
-
}
|
689
|
-
if (options.mode !== undefined) {
|
690
|
-
instance.mode = options.mode;
|
691
|
-
}
|
692
|
-
if (options.color !== undefined) {
|
693
|
-
instance.color = options.color;
|
694
|
-
}
|
695
|
-
};
|
696
|
-
TdLoadingFactory.decorators = [
|
697
|
-
{ type: Injectable }
|
698
|
-
];
|
699
|
-
/** @nocollapse */
|
700
|
-
TdLoadingFactory.ctorParameters = function () { return [
|
701
|
-
{ type: ComponentFactoryResolver },
|
702
|
-
{ type: Overlay },
|
703
|
-
{ type: Injector }
|
704
|
-
]; };
|
705
|
-
return TdLoadingFactory;
|
706
|
-
}());
|
707
|
-
if (false) {
|
708
|
-
/**
|
709
|
-
* @type {?}
|
710
|
-
* @private
|
711
|
-
*/
|
712
|
-
TdLoadingFactory.prototype._componentFactoryResolver;
|
713
|
-
/**
|
714
|
-
* @type {?}
|
715
|
-
* @private
|
716
|
-
*/
|
717
|
-
TdLoadingFactory.prototype._overlay;
|
718
|
-
/**
|
719
|
-
* @type {?}
|
720
|
-
* @private
|
721
|
-
*/
|
722
|
-
TdLoadingFactory.prototype._injector;
|
723
|
-
}
|
724
|
-
/**
|
725
|
-
* @param {?} parent
|
726
|
-
* @param {?} componentFactoryResolver
|
727
|
-
* @param {?} overlay
|
728
|
-
* @param {?} injector
|
729
|
-
* @return {?}
|
730
|
-
*/
|
731
|
-
function LOADING_FACTORY_PROVIDER_FACTORY(parent, componentFactoryResolver, overlay, injector) {
|
732
|
-
return parent || new TdLoadingFactory(componentFactoryResolver, overlay, injector);
|
733
|
-
}
|
734
|
-
/** @type {?} */
|
735
|
-
var LOADING_FACTORY_PROVIDER = {
|
736
|
-
// If there is already a service available, use that. Otherwise, provide a new one.
|
737
|
-
provide: TdLoadingFactory,
|
738
|
-
deps: [[new Optional(), new SkipSelf(), TdLoadingFactory], ComponentFactoryResolver, Overlay, Injector],
|
739
|
-
useFactory: LOADING_FACTORY_PROVIDER_FACTORY,
|
740
|
-
};
|
741
|
-
|
742
|
-
/**
|
743
|
-
* @fileoverview added by tsickle
|
744
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
745
|
-
*/
|
746
|
-
/**
|
747
|
-
* @record
|
748
|
-
*/
|
749
|
-
function ITdLoadingConfig() { }
|
750
|
-
if (false) {
|
751
|
-
/** @type {?} */
|
752
|
-
ITdLoadingConfig.prototype.name;
|
753
|
-
/** @type {?|undefined} */
|
754
|
-
ITdLoadingConfig.prototype.type;
|
755
|
-
/** @type {?|undefined} */
|
756
|
-
ITdLoadingConfig.prototype.mode;
|
757
|
-
/** @type {?|undefined} */
|
758
|
-
ITdLoadingConfig.prototype.color;
|
759
|
-
}
|
760
|
-
var TdLoadingConfig = /** @class */ (function () {
|
761
|
-
function TdLoadingConfig(config) {
|
762
|
-
this.name = config.name;
|
763
|
-
if (!this.name) {
|
764
|
-
throw Error('Name is required for [TdLoading] configuration.');
|
765
|
-
}
|
766
|
-
this.mode = config.mode ? config.mode : LoadingMode.Indeterminate;
|
767
|
-
this.type = config.type ? config.type : LoadingType.Circular;
|
768
|
-
this.color = config.color ? config.color : 'primary';
|
769
|
-
}
|
770
|
-
return TdLoadingConfig;
|
771
|
-
}());
|
772
|
-
if (false) {
|
773
|
-
/** @type {?} */
|
774
|
-
TdLoadingConfig.prototype.name;
|
775
|
-
/** @type {?} */
|
776
|
-
TdLoadingConfig.prototype.type;
|
777
|
-
/** @type {?} */
|
778
|
-
TdLoadingConfig.prototype.mode;
|
779
|
-
/** @type {?} */
|
780
|
-
TdLoadingConfig.prototype.color;
|
781
|
-
}
|
782
|
-
/**
|
783
|
-
* @record
|
784
|
-
*/
|
785
|
-
function ITdLoadingDirectiveConfig() { }
|
786
|
-
if (false) {
|
787
|
-
/** @type {?|undefined} */
|
788
|
-
ITdLoadingDirectiveConfig.prototype.strategy;
|
789
|
-
}
|
790
|
-
var TdLoadingDirectiveConfig = /** @class */ (function (_super) {
|
791
|
-
__extends(TdLoadingDirectiveConfig, _super);
|
792
|
-
function TdLoadingDirectiveConfig(config) {
|
793
|
-
var _this = _super.call(this, config) || this;
|
794
|
-
_this.strategy = config.strategy ? config.strategy : LoadingStrategy.Replace;
|
795
|
-
return _this;
|
796
|
-
}
|
797
|
-
return TdLoadingDirectiveConfig;
|
798
|
-
}(TdLoadingConfig));
|
799
|
-
if (false) {
|
800
|
-
/** @type {?} */
|
801
|
-
TdLoadingDirectiveConfig.prototype.name;
|
802
|
-
/** @type {?} */
|
803
|
-
TdLoadingDirectiveConfig.prototype.type;
|
804
|
-
/** @type {?} */
|
805
|
-
TdLoadingDirectiveConfig.prototype.mode;
|
806
|
-
/** @type {?} */
|
807
|
-
TdLoadingDirectiveConfig.prototype.strategy;
|
808
|
-
}
|
809
|
-
var TdLoadingService = /** @class */ (function () {
|
810
|
-
function TdLoadingService(_loadingFactory) {
|
811
|
-
this._loadingFactory = _loadingFactory;
|
812
|
-
this._context = {};
|
813
|
-
this._timeouts = {};
|
814
|
-
this.create({
|
815
|
-
name: 'td-loading-main',
|
816
|
-
});
|
817
|
-
}
|
818
|
-
/**
|
819
|
-
* params:
|
820
|
-
* - config: ILoadingDirectiveConfig
|
821
|
-
* - viewContainerRef: ViewContainerRef
|
822
|
-
* - templateRef: TemplateRef<Object>
|
823
|
-
*
|
824
|
-
* Creates an replace loading mask and attaches it to the viewContainerRef.
|
825
|
-
* Replaces the templateRef with the mask when a request is registered on it.
|
826
|
-
*
|
827
|
-
* NOTE: @internal usage only.
|
828
|
-
*/
|
829
|
-
/**
|
830
|
-
* params:
|
831
|
-
* - config: ILoadingDirectiveConfig
|
832
|
-
* - viewContainerRef: ViewContainerRef
|
833
|
-
* - templateRef: TemplateRef<Object>
|
834
|
-
*
|
835
|
-
* Creates an replace loading mask and attaches it to the viewContainerRef.
|
836
|
-
* Replaces the templateRef with the mask when a request is registered on it.
|
837
|
-
*
|
838
|
-
* NOTE: \@internal usage only.
|
839
|
-
* @param {?} config
|
840
|
-
* @param {?} viewContainerRef
|
841
|
-
* @param {?} templateRef
|
842
|
-
* @param {?} context
|
843
|
-
* @return {?}
|
844
|
-
*/
|
845
|
-
TdLoadingService.prototype.createComponent = /**
|
846
|
-
* params:
|
847
|
-
* - config: ILoadingDirectiveConfig
|
848
|
-
* - viewContainerRef: ViewContainerRef
|
849
|
-
* - templateRef: TemplateRef<Object>
|
850
|
-
*
|
851
|
-
* Creates an replace loading mask and attaches it to the viewContainerRef.
|
852
|
-
* Replaces the templateRef with the mask when a request is registered on it.
|
853
|
-
*
|
854
|
-
* NOTE: \@internal usage only.
|
855
|
-
* @param {?} config
|
856
|
-
* @param {?} viewContainerRef
|
857
|
-
* @param {?} templateRef
|
858
|
-
* @param {?} context
|
859
|
-
* @return {?}
|
860
|
-
*/
|
861
|
-
function (config, viewContainerRef, templateRef, context) {
|
862
|
-
/** @type {?} */
|
863
|
-
var directiveConfig = new TdLoadingDirectiveConfig(config);
|
864
|
-
if (this._context[directiveConfig.name]) {
|
865
|
-
throw Error("Name duplication: [TdLoading] directive has a name conflict with " + directiveConfig.name + ".");
|
866
|
-
}
|
867
|
-
if (directiveConfig.strategy === LoadingStrategy.Overlay) {
|
868
|
-
this._context[directiveConfig.name] = this._loadingFactory.createOverlayComponent(directiveConfig, viewContainerRef, templateRef);
|
869
|
-
}
|
870
|
-
else {
|
871
|
-
this._context[directiveConfig.name] = this._loadingFactory.createReplaceComponent(directiveConfig, viewContainerRef, templateRef, context);
|
872
|
-
}
|
873
|
-
return this._context[directiveConfig.name];
|
874
|
-
};
|
875
|
-
/**
|
876
|
-
* params:
|
877
|
-
* - config: ITdLoadingConfig
|
878
|
-
*
|
879
|
-
* Creates a fullscreen loading mask and attaches it to the DOM with the given configuration.
|
880
|
-
* Only displayed when the mask has a request registered on it.
|
881
|
-
*/
|
882
|
-
/**
|
883
|
-
* params:
|
884
|
-
* - config: ITdLoadingConfig
|
885
|
-
*
|
886
|
-
* Creates a fullscreen loading mask and attaches it to the DOM with the given configuration.
|
887
|
-
* Only displayed when the mask has a request registered on it.
|
888
|
-
* @param {?} config
|
889
|
-
* @return {?}
|
890
|
-
*/
|
891
|
-
TdLoadingService.prototype.create = /**
|
892
|
-
* params:
|
893
|
-
* - config: ITdLoadingConfig
|
894
|
-
*
|
895
|
-
* Creates a fullscreen loading mask and attaches it to the DOM with the given configuration.
|
896
|
-
* Only displayed when the mask has a request registered on it.
|
897
|
-
* @param {?} config
|
898
|
-
* @return {?}
|
899
|
-
*/
|
900
|
-
function (config) {
|
901
|
-
/** @type {?} */
|
902
|
-
var fullscreenConfig = new TdLoadingConfig(config);
|
903
|
-
this.removeComponent(fullscreenConfig.name);
|
904
|
-
this._context[fullscreenConfig.name] = this._loadingFactory.createFullScreenComponent(fullscreenConfig);
|
905
|
-
};
|
906
|
-
/**
|
907
|
-
* params:
|
908
|
-
* - name: string
|
909
|
-
*
|
910
|
-
* Removes `loading` component from service context.
|
911
|
-
*/
|
912
|
-
/**
|
913
|
-
* params:
|
914
|
-
* - name: string
|
915
|
-
*
|
916
|
-
* Removes `loading` component from service context.
|
917
|
-
* @param {?} name
|
918
|
-
* @return {?}
|
919
|
-
*/
|
920
|
-
TdLoadingService.prototype.removeComponent = /**
|
921
|
-
* params:
|
922
|
-
* - name: string
|
923
|
-
*
|
924
|
-
* Removes `loading` component from service context.
|
925
|
-
* @param {?} name
|
926
|
-
* @return {?}
|
927
|
-
*/
|
928
|
-
function (name) {
|
929
|
-
if (this._context[name]) {
|
930
|
-
this._context[name].subject.unsubscribe();
|
931
|
-
if (this._context[name].componentRef) {
|
932
|
-
this._context[name].componentRef.destroy();
|
933
|
-
}
|
934
|
-
this._context[name] = undefined;
|
935
|
-
delete this._context[name];
|
936
|
-
}
|
937
|
-
};
|
938
|
-
/**
|
939
|
-
* params:
|
940
|
-
* - name: string
|
941
|
-
* - registers?: number
|
942
|
-
* returns: true if successful
|
943
|
-
*
|
944
|
-
* Resolves a request for the loading mask referenced by the name parameter.
|
945
|
-
* Can optionally pass registers argument to set a number of register calls.
|
946
|
-
*
|
947
|
-
* If no paramemeters are used, then default main mask will be used.
|
948
|
-
*
|
949
|
-
* e.g. loadingService.register()
|
950
|
-
*/
|
951
|
-
/**
|
952
|
-
* params:
|
953
|
-
* - name: string
|
954
|
-
* - registers?: number
|
955
|
-
* returns: true if successful
|
956
|
-
*
|
957
|
-
* Resolves a request for the loading mask referenced by the name parameter.
|
958
|
-
* Can optionally pass registers argument to set a number of register calls.
|
959
|
-
*
|
960
|
-
* If no paramemeters are used, then default main mask will be used.
|
961
|
-
*
|
962
|
-
* e.g. loadingService.register()
|
963
|
-
* @param {?=} name
|
964
|
-
* @param {?=} registers
|
965
|
-
* @return {?}
|
966
|
-
*/
|
967
|
-
TdLoadingService.prototype.register = /**
|
968
|
-
* params:
|
969
|
-
* - name: string
|
970
|
-
* - registers?: number
|
971
|
-
* returns: true if successful
|
972
|
-
*
|
973
|
-
* Resolves a request for the loading mask referenced by the name parameter.
|
974
|
-
* Can optionally pass registers argument to set a number of register calls.
|
975
|
-
*
|
976
|
-
* If no paramemeters are used, then default main mask will be used.
|
977
|
-
*
|
978
|
-
* e.g. loadingService.register()
|
979
|
-
* @param {?=} name
|
980
|
-
* @param {?=} registers
|
981
|
-
* @return {?}
|
982
|
-
*/
|
983
|
-
function (name, registers) {
|
984
|
-
var _this = this;
|
985
|
-
if (name === void 0) { name = 'td-loading-main'; }
|
986
|
-
if (registers === void 0) { registers = 1; }
|
987
|
-
// try registering into the service if the loading component has been instanciated or if it exists.
|
988
|
-
if (this._context[name]) {
|
989
|
-
registers = registers < 1 ? 1 : registers;
|
990
|
-
this._context[name].times += registers;
|
991
|
-
this._context[name].subject.next(this._context[name].times);
|
992
|
-
return true;
|
993
|
-
}
|
994
|
-
else {
|
995
|
-
// if it doesnt exist, set a timeout so its registered after change detection happens
|
996
|
-
// this in case "register" occured on the `ngOnInit` lifehook cycle.
|
997
|
-
if (!this._timeouts[name]) {
|
998
|
-
this._timeouts[name] = setTimeout((/**
|
999
|
-
* @return {?}
|
1000
|
-
*/
|
1001
|
-
function () {
|
1002
|
-
_this.register(name, registers);
|
1003
|
-
}));
|
1004
|
-
}
|
1005
|
-
else {
|
1006
|
-
// if it timeout occured and still doesnt exist, it means the tiemout wasnt needed so we clear it.
|
1007
|
-
this._clearTimeout(name);
|
1008
|
-
}
|
1009
|
-
}
|
1010
|
-
return false;
|
1011
|
-
};
|
1012
|
-
/**
|
1013
|
-
* params:
|
1014
|
-
* - name: string
|
1015
|
-
* - resolves?: number
|
1016
|
-
* returns: true if successful
|
1017
|
-
*
|
1018
|
-
* Resolves a request for the loading mask referenced by the name parameter.
|
1019
|
-
* Can optionally pass resolves argument to set a number of resolve calls.
|
1020
|
-
*
|
1021
|
-
* If no paramemeters are used, then default main mask will be used.
|
1022
|
-
*
|
1023
|
-
* e.g. loadingService.resolve()
|
1024
|
-
*/
|
1025
|
-
/**
|
1026
|
-
* params:
|
1027
|
-
* - name: string
|
1028
|
-
* - resolves?: number
|
1029
|
-
* returns: true if successful
|
1030
|
-
*
|
1031
|
-
* Resolves a request for the loading mask referenced by the name parameter.
|
1032
|
-
* Can optionally pass resolves argument to set a number of resolve calls.
|
1033
|
-
*
|
1034
|
-
* If no paramemeters are used, then default main mask will be used.
|
1035
|
-
*
|
1036
|
-
* e.g. loadingService.resolve()
|
1037
|
-
* @param {?=} name
|
1038
|
-
* @param {?=} resolves
|
1039
|
-
* @return {?}
|
1040
|
-
*/
|
1041
|
-
TdLoadingService.prototype.resolve = /**
|
1042
|
-
* params:
|
1043
|
-
* - name: string
|
1044
|
-
* - resolves?: number
|
1045
|
-
* returns: true if successful
|
1046
|
-
*
|
1047
|
-
* Resolves a request for the loading mask referenced by the name parameter.
|
1048
|
-
* Can optionally pass resolves argument to set a number of resolve calls.
|
1049
|
-
*
|
1050
|
-
* If no paramemeters are used, then default main mask will be used.
|
1051
|
-
*
|
1052
|
-
* e.g. loadingService.resolve()
|
1053
|
-
* @param {?=} name
|
1054
|
-
* @param {?=} resolves
|
1055
|
-
* @return {?}
|
1056
|
-
*/
|
1057
|
-
function (name, resolves) {
|
1058
|
-
if (name === void 0) { name = 'td-loading-main'; }
|
1059
|
-
if (resolves === void 0) { resolves = 1; }
|
1060
|
-
// clear timeout if the loading component is "resolved" before its "registered"
|
1061
|
-
this._clearTimeout(name);
|
1062
|
-
if (this._context[name]) {
|
1063
|
-
resolves = resolves < 1 ? 1 : resolves;
|
1064
|
-
if (this._context[name].times > 0) {
|
1065
|
-
/** @type {?} */
|
1066
|
-
var times = this._context[name].times;
|
1067
|
-
times -= resolves;
|
1068
|
-
this._context[name].times = times < 0 ? 0 : times;
|
1069
|
-
}
|
1070
|
-
this._context[name].subject.next(this._context[name].times);
|
1071
|
-
return true;
|
1072
|
-
}
|
1073
|
-
return false;
|
1074
|
-
};
|
1075
|
-
/**
|
1076
|
-
* params:
|
1077
|
-
* - name: string
|
1078
|
-
* returns: true if successful
|
1079
|
-
*
|
1080
|
-
* Resolves all request for the loading mask referenced by the name parameter.
|
1081
|
-
*
|
1082
|
-
* If no paramemeters are used, then default main mask will be used.
|
1083
|
-
*
|
1084
|
-
* e.g. loadingService.resolveAll()
|
1085
|
-
*/
|
1086
|
-
/**
|
1087
|
-
* params:
|
1088
|
-
* - name: string
|
1089
|
-
* returns: true if successful
|
1090
|
-
*
|
1091
|
-
* Resolves all request for the loading mask referenced by the name parameter.
|
1092
|
-
*
|
1093
|
-
* If no paramemeters are used, then default main mask will be used.
|
1094
|
-
*
|
1095
|
-
* e.g. loadingService.resolveAll()
|
1096
|
-
* @param {?=} name
|
1097
|
-
* @return {?}
|
1098
|
-
*/
|
1099
|
-
TdLoadingService.prototype.resolveAll = /**
|
1100
|
-
* params:
|
1101
|
-
* - name: string
|
1102
|
-
* returns: true if successful
|
1103
|
-
*
|
1104
|
-
* Resolves all request for the loading mask referenced by the name parameter.
|
1105
|
-
*
|
1106
|
-
* If no paramemeters are used, then default main mask will be used.
|
1107
|
-
*
|
1108
|
-
* e.g. loadingService.resolveAll()
|
1109
|
-
* @param {?=} name
|
1110
|
-
* @return {?}
|
1111
|
-
*/
|
1112
|
-
function (name) {
|
1113
|
-
if (name === void 0) { name = 'td-loading-main'; }
|
1114
|
-
// clear timeout if the loading component is "resolved" before its "registered"
|
1115
|
-
this._clearTimeout(name);
|
1116
|
-
if (this._context[name]) {
|
1117
|
-
this._context[name].times = 0;
|
1118
|
-
this._context[name].subject.next(this._context[name].times);
|
1119
|
-
return true;
|
1120
|
-
}
|
1121
|
-
return false;
|
1122
|
-
};
|
1123
|
-
/**
|
1124
|
-
* params:
|
1125
|
-
* - name: string
|
1126
|
-
* - value: number
|
1127
|
-
* returns: true if successful
|
1128
|
-
*
|
1129
|
-
* Set value on a loading mask referenced by the name parameter.
|
1130
|
-
* Usage only available if its mode is 'determinate' and if loading is showing.
|
1131
|
-
*/
|
1132
|
-
/**
|
1133
|
-
* params:
|
1134
|
-
* - name: string
|
1135
|
-
* - value: number
|
1136
|
-
* returns: true if successful
|
1137
|
-
*
|
1138
|
-
* Set value on a loading mask referenced by the name parameter.
|
1139
|
-
* Usage only available if its mode is 'determinate' and if loading is showing.
|
1140
|
-
* @param {?} name
|
1141
|
-
* @param {?} value
|
1142
|
-
* @return {?}
|
1143
|
-
*/
|
1144
|
-
TdLoadingService.prototype.setValue = /**
|
1145
|
-
* params:
|
1146
|
-
* - name: string
|
1147
|
-
* - value: number
|
1148
|
-
* returns: true if successful
|
1149
|
-
*
|
1150
|
-
* Set value on a loading mask referenced by the name parameter.
|
1151
|
-
* Usage only available if its mode is 'determinate' and if loading is showing.
|
1152
|
-
* @param {?} name
|
1153
|
-
* @param {?} value
|
1154
|
-
* @return {?}
|
1155
|
-
*/
|
1156
|
-
function (name, value) {
|
1157
|
-
if (this._context[name]) {
|
1158
|
-
/** @type {?} */
|
1159
|
-
var instance = this._context[name].componentRef.instance;
|
1160
|
-
if (instance.mode === LoadingMode.Determinate && instance.animation) {
|
1161
|
-
instance.value = value;
|
1162
|
-
return true;
|
1163
|
-
}
|
1164
|
-
}
|
1165
|
-
return false;
|
1166
|
-
};
|
1167
|
-
/**
|
1168
|
-
* Clears timeout linked to the name.
|
1169
|
-
* @param name Name of the loading component to be cleared
|
1170
|
-
*/
|
1171
|
-
/**
|
1172
|
-
* Clears timeout linked to the name.
|
1173
|
-
* @private
|
1174
|
-
* @param {?} name Name of the loading component to be cleared
|
1175
|
-
* @return {?}
|
1176
|
-
*/
|
1177
|
-
TdLoadingService.prototype._clearTimeout = /**
|
1178
|
-
* Clears timeout linked to the name.
|
1179
|
-
* @private
|
1180
|
-
* @param {?} name Name of the loading component to be cleared
|
1181
|
-
* @return {?}
|
1182
|
-
*/
|
1183
|
-
function (name) {
|
1184
|
-
clearTimeout(this._timeouts[name]);
|
1185
|
-
delete this._timeouts[name];
|
1186
|
-
};
|
1187
|
-
TdLoadingService.decorators = [
|
1188
|
-
{ type: Injectable }
|
1189
|
-
];
|
1190
|
-
/** @nocollapse */
|
1191
|
-
TdLoadingService.ctorParameters = function () { return [
|
1192
|
-
{ type: TdLoadingFactory }
|
1193
|
-
]; };
|
1194
|
-
return TdLoadingService;
|
1195
|
-
}());
|
1196
|
-
if (false) {
|
1197
|
-
/**
|
1198
|
-
* @type {?}
|
1199
|
-
* @private
|
1200
|
-
*/
|
1201
|
-
TdLoadingService.prototype._context;
|
1202
|
-
/**
|
1203
|
-
* @type {?}
|
1204
|
-
* @private
|
1205
|
-
*/
|
1206
|
-
TdLoadingService.prototype._timeouts;
|
1207
|
-
/**
|
1208
|
-
* @type {?}
|
1209
|
-
* @private
|
1210
|
-
*/
|
1211
|
-
TdLoadingService.prototype._loadingFactory;
|
1212
|
-
}
|
1213
|
-
/**
|
1214
|
-
* @param {?} parent
|
1215
|
-
* @param {?} loadingFactory
|
1216
|
-
* @return {?}
|
1217
|
-
*/
|
1218
|
-
function LOADING_PROVIDER_FACTORY(parent, loadingFactory) {
|
1219
|
-
return parent || new TdLoadingService(loadingFactory);
|
1220
|
-
}
|
1221
|
-
/** @type {?} */
|
1222
|
-
var LOADING_PROVIDER = {
|
1223
|
-
// If there is already a service available, use that. Otherwise, provide a new one.
|
1224
|
-
provide: TdLoadingService,
|
1225
|
-
deps: [[new Optional(), new SkipSelf(), TdLoadingService], TdLoadingFactory],
|
1226
|
-
useFactory: LOADING_PROVIDER_FACTORY,
|
1227
|
-
};
|
1228
|
-
|
1229
|
-
/**
|
1230
|
-
* @fileoverview added by tsickle
|
1231
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1232
|
-
*/
|
1233
|
-
/**
|
1234
|
-
* Context class for variable reference
|
1235
|
-
*/
|
1236
|
-
var /**
|
1237
|
-
* Context class for variable reference
|
1238
|
-
*/
|
1239
|
-
TdLoadingContext = /** @class */ (function () {
|
1240
|
-
function TdLoadingContext() {
|
1241
|
-
this.$implicit = undefined;
|
1242
|
-
this.tdLoading = undefined;
|
1243
|
-
}
|
1244
|
-
return TdLoadingContext;
|
1245
|
-
}());
|
1246
|
-
if (false) {
|
1247
|
-
/** @type {?} */
|
1248
|
-
TdLoadingContext.prototype.$implicit;
|
1249
|
-
/** @type {?} */
|
1250
|
-
TdLoadingContext.prototype.tdLoading;
|
1251
|
-
}
|
1252
|
-
// Constant for generation of the id for the next component
|
1253
|
-
/** @type {?} */
|
1254
|
-
var TD_LOADING_NEXT_ID = 0;
|
1255
|
-
var TdLoadingDirective = /** @class */ (function () {
|
1256
|
-
function TdLoadingDirective(_viewContainerRef, _templateRef, _loadingService) {
|
1257
|
-
this._viewContainerRef = _viewContainerRef;
|
1258
|
-
this._templateRef = _templateRef;
|
1259
|
-
this._loadingService = _loadingService;
|
1260
|
-
this._context = new TdLoadingContext();
|
1261
|
-
/**
|
1262
|
-
* tdLoadingColor?: "primary" | "accent" | "warn"
|
1263
|
-
* Sets the theme color of the loading component. Defaults to "primary"
|
1264
|
-
*/
|
1265
|
-
this.color = 'primary';
|
1266
|
-
}
|
1267
|
-
Object.defineProperty(TdLoadingDirective.prototype, "name", {
|
1268
|
-
/**
|
1269
|
-
* tdLoading: string
|
1270
|
-
* Name reference of the loading mask, used to register/resolve requests to the mask.
|
1271
|
-
*/
|
1272
|
-
set: /**
|
1273
|
-
* tdLoading: string
|
1274
|
-
* Name reference of the loading mask, used to register/resolve requests to the mask.
|
1275
|
-
* @param {?} name
|
1276
|
-
* @return {?}
|
1277
|
-
*/
|
1278
|
-
function (name) {
|
1279
|
-
if (!this._name && name) {
|
1280
|
-
this._name = name;
|
1281
|
-
}
|
1282
|
-
},
|
1283
|
-
enumerable: true,
|
1284
|
-
configurable: true
|
1285
|
-
});
|
1286
|
-
Object.defineProperty(TdLoadingDirective.prototype, "until", {
|
1287
|
-
/**
|
1288
|
-
* tdLoadingUntil?: any
|
1289
|
-
* If its null, undefined or false it will be used to register requests to the mask.
|
1290
|
-
* Else if its any value that can be resolved as true, it will resolve the mask.
|
1291
|
-
* [name] is optional when using [until], but can still be used to register/resolve it manually.
|
1292
|
-
*/
|
1293
|
-
set: /**
|
1294
|
-
* tdLoadingUntil?: any
|
1295
|
-
* If its null, undefined or false it will be used to register requests to the mask.
|
1296
|
-
* Else if its any value that can be resolved as true, it will resolve the mask.
|
1297
|
-
* [name] is optional when using [until], but can still be used to register/resolve it manually.
|
1298
|
-
* @param {?} until
|
1299
|
-
* @return {?}
|
1300
|
-
*/
|
1301
|
-
function (until) {
|
1302
|
-
if (!this._name) {
|
1303
|
-
this._name = 'td-loading-until-' + TD_LOADING_NEXT_ID++;
|
1304
|
-
}
|
1305
|
-
this._context.$implicit = this._context.tdLoading = until;
|
1306
|
-
if (!until) {
|
1307
|
-
this._loadingService.register(this._name);
|
1308
|
-
}
|
1309
|
-
else {
|
1310
|
-
this._loadingService.resolveAll(this._name);
|
1311
|
-
}
|
1312
|
-
},
|
1313
|
-
enumerable: true,
|
1314
|
-
configurable: true
|
1315
|
-
});
|
1316
|
-
Object.defineProperty(TdLoadingDirective.prototype, "type", {
|
1317
|
-
/**
|
1318
|
-
* tdLoadingType?: LoadingType or ['linear' | 'circular']
|
1319
|
-
* Sets the type of loading mask depending on value.
|
1320
|
-
* Defaults to [LoadingType.Circular | 'circular'].
|
1321
|
-
*/
|
1322
|
-
set: /**
|
1323
|
-
* tdLoadingType?: LoadingType or ['linear' | 'circular']
|
1324
|
-
* Sets the type of loading mask depending on value.
|
1325
|
-
* Defaults to [LoadingType.Circular | 'circular'].
|
1326
|
-
* @param {?} type
|
1327
|
-
* @return {?}
|
1328
|
-
*/
|
1329
|
-
function (type) {
|
1330
|
-
if (type === LoadingType.Linear) {
|
1331
|
-
this._type = LoadingType.Linear;
|
1332
|
-
}
|
1333
|
-
else {
|
1334
|
-
this._type = LoadingType.Circular;
|
1335
|
-
}
|
1336
|
-
},
|
1337
|
-
enumerable: true,
|
1338
|
-
configurable: true
|
1339
|
-
});
|
1340
|
-
Object.defineProperty(TdLoadingDirective.prototype, "mode", {
|
1341
|
-
/**
|
1342
|
-
* tdLoadingMode?: LoadingMode or ['determinate' | 'indeterminate']
|
1343
|
-
* Sets the mode of loading mask depending on value.
|
1344
|
-
* Defaults to [LoadingMode.Indeterminate | 'indeterminate'].
|
1345
|
-
*/
|
1346
|
-
set: /**
|
1347
|
-
* tdLoadingMode?: LoadingMode or ['determinate' | 'indeterminate']
|
1348
|
-
* Sets the mode of loading mask depending on value.
|
1349
|
-
* Defaults to [LoadingMode.Indeterminate | 'indeterminate'].
|
1350
|
-
* @param {?} mode
|
1351
|
-
* @return {?}
|
1352
|
-
*/
|
1353
|
-
function (mode) {
|
1354
|
-
if (mode === LoadingMode.Determinate) {
|
1355
|
-
this._mode = LoadingMode.Determinate;
|
1356
|
-
}
|
1357
|
-
else {
|
1358
|
-
this._mode = LoadingMode.Indeterminate;
|
1359
|
-
}
|
1360
|
-
},
|
1361
|
-
enumerable: true,
|
1362
|
-
configurable: true
|
1363
|
-
});
|
1364
|
-
Object.defineProperty(TdLoadingDirective.prototype, "strategy", {
|
1365
|
-
/**
|
1366
|
-
* tdLoadingStrategy?: LoadingStrategy or ['replace' | 'overlay']
|
1367
|
-
* Sets the strategy of loading mask depending on value.
|
1368
|
-
* Defaults to [LoadingMode.Replace | 'replace'].
|
1369
|
-
*/
|
1370
|
-
set: /**
|
1371
|
-
* tdLoadingStrategy?: LoadingStrategy or ['replace' | 'overlay']
|
1372
|
-
* Sets the strategy of loading mask depending on value.
|
1373
|
-
* Defaults to [LoadingMode.Replace | 'replace'].
|
1374
|
-
* @param {?} strategy
|
1375
|
-
* @return {?}
|
1376
|
-
*/
|
1377
|
-
function (strategy) {
|
1378
|
-
if (strategy === LoadingStrategy.Overlay) {
|
1379
|
-
this._strategy = LoadingStrategy.Overlay;
|
1380
|
-
}
|
1381
|
-
else {
|
1382
|
-
this._strategy = LoadingStrategy.Replace;
|
1383
|
-
}
|
1384
|
-
},
|
1385
|
-
enumerable: true,
|
1386
|
-
configurable: true
|
1387
|
-
});
|
1388
|
-
/**
|
1389
|
-
* Registers component in the DOM, so it will be available when calling resolve/register.
|
1390
|
-
*/
|
1391
|
-
/**
|
1392
|
-
* Registers component in the DOM, so it will be available when calling resolve/register.
|
1393
|
-
* @return {?}
|
1394
|
-
*/
|
1395
|
-
TdLoadingDirective.prototype.ngOnInit = /**
|
1396
|
-
* Registers component in the DOM, so it will be available when calling resolve/register.
|
1397
|
-
* @return {?}
|
1398
|
-
*/
|
1399
|
-
function () {
|
1400
|
-
this._registerComponent();
|
1401
|
-
};
|
1402
|
-
/**
|
1403
|
-
* Remove component when directive is destroyed.
|
1404
|
-
*/
|
1405
|
-
/**
|
1406
|
-
* Remove component when directive is destroyed.
|
1407
|
-
* @return {?}
|
1408
|
-
*/
|
1409
|
-
TdLoadingDirective.prototype.ngOnDestroy = /**
|
1410
|
-
* Remove component when directive is destroyed.
|
1411
|
-
* @return {?}
|
1412
|
-
*/
|
1413
|
-
function () {
|
1414
|
-
this._loadingService.removeComponent(this._name);
|
1415
|
-
this._loadingRef = undefined;
|
1416
|
-
};
|
1417
|
-
/**
|
1418
|
-
* Creates [TdLoadingComponent] and attaches it to this directive's [ViewContainerRef].
|
1419
|
-
* Passes this directive's [TemplateRef] to modify DOM depending on loading `strategy`.
|
1420
|
-
*/
|
1421
|
-
/**
|
1422
|
-
* Creates [TdLoadingComponent] and attaches it to this directive's [ViewContainerRef].
|
1423
|
-
* Passes this directive's [TemplateRef] to modify DOM depending on loading `strategy`.
|
1424
|
-
* @private
|
1425
|
-
* @return {?}
|
1426
|
-
*/
|
1427
|
-
TdLoadingDirective.prototype._registerComponent = /**
|
1428
|
-
* Creates [TdLoadingComponent] and attaches it to this directive's [ViewContainerRef].
|
1429
|
-
* Passes this directive's [TemplateRef] to modify DOM depending on loading `strategy`.
|
1430
|
-
* @private
|
1431
|
-
* @return {?}
|
1432
|
-
*/
|
1433
|
-
function () {
|
1434
|
-
if (!this._name) {
|
1435
|
-
throw new Error('Name is needed to register loading directive');
|
1436
|
-
}
|
1437
|
-
// Check if `TdLoadingComponent` has been created before trying to add one again.
|
1438
|
-
// There is a weird edge case when using `[routerLinkActive]` that calls the `ngOnInit` twice in a row
|
1439
|
-
if (!this._loadingRef) {
|
1440
|
-
this._loadingRef = this._loadingService.createComponent({
|
1441
|
-
name: this._name,
|
1442
|
-
type: this._type,
|
1443
|
-
mode: this._mode,
|
1444
|
-
color: this.color,
|
1445
|
-
strategy: this._strategy,
|
1446
|
-
}, this._viewContainerRef, this._templateRef, this._context);
|
1447
|
-
}
|
1448
|
-
};
|
1449
|
-
TdLoadingDirective.decorators = [
|
1450
|
-
{ type: Directive, args: [{
|
1451
|
-
selector: '[tdLoading]',
|
1452
|
-
},] }
|
1453
|
-
];
|
1454
|
-
/** @nocollapse */
|
1455
|
-
TdLoadingDirective.ctorParameters = function () { return [
|
1456
|
-
{ type: ViewContainerRef },
|
1457
|
-
{ type: TemplateRef },
|
1458
|
-
{ type: TdLoadingService }
|
1459
|
-
]; };
|
1460
|
-
TdLoadingDirective.propDecorators = {
|
1461
|
-
name: [{ type: Input, args: ['tdLoading',] }],
|
1462
|
-
until: [{ type: Input, args: ['tdLoadingUntil',] }],
|
1463
|
-
type: [{ type: Input, args: ['tdLoadingType',] }],
|
1464
|
-
mode: [{ type: Input, args: ['tdLoadingMode',] }],
|
1465
|
-
strategy: [{ type: Input, args: ['tdLoadingStrategy',] }],
|
1466
|
-
color: [{ type: Input, args: ['tdLoadingColor',] }]
|
1467
|
-
};
|
1468
|
-
return TdLoadingDirective;
|
1469
|
-
}());
|
1470
|
-
if (false) {
|
1471
|
-
/**
|
1472
|
-
* @type {?}
|
1473
|
-
* @private
|
1474
|
-
*/
|
1475
|
-
TdLoadingDirective.prototype._context;
|
1476
|
-
/**
|
1477
|
-
* @type {?}
|
1478
|
-
* @private
|
1479
|
-
*/
|
1480
|
-
TdLoadingDirective.prototype._type;
|
1481
|
-
/**
|
1482
|
-
* @type {?}
|
1483
|
-
* @private
|
1484
|
-
*/
|
1485
|
-
TdLoadingDirective.prototype._mode;
|
1486
|
-
/**
|
1487
|
-
* @type {?}
|
1488
|
-
* @private
|
1489
|
-
*/
|
1490
|
-
TdLoadingDirective.prototype._strategy;
|
1491
|
-
/**
|
1492
|
-
* @type {?}
|
1493
|
-
* @private
|
1494
|
-
*/
|
1495
|
-
TdLoadingDirective.prototype._name;
|
1496
|
-
/**
|
1497
|
-
* @type {?}
|
1498
|
-
* @private
|
1499
|
-
*/
|
1500
|
-
TdLoadingDirective.prototype._loadingRef;
|
1501
|
-
/**
|
1502
|
-
* tdLoadingColor?: "primary" | "accent" | "warn"
|
1503
|
-
* Sets the theme color of the loading component. Defaults to "primary"
|
1504
|
-
* @type {?}
|
1505
|
-
*/
|
1506
|
-
TdLoadingDirective.prototype.color;
|
1507
|
-
/**
|
1508
|
-
* @type {?}
|
1509
|
-
* @private
|
1510
|
-
*/
|
1511
|
-
TdLoadingDirective.prototype._viewContainerRef;
|
1512
|
-
/**
|
1513
|
-
* @type {?}
|
1514
|
-
* @private
|
1515
|
-
*/
|
1516
|
-
TdLoadingDirective.prototype._templateRef;
|
1517
|
-
/**
|
1518
|
-
* @type {?}
|
1519
|
-
* @private
|
1520
|
-
*/
|
1521
|
-
TdLoadingDirective.prototype._loadingService;
|
1522
|
-
}
|
1523
|
-
|
1524
|
-
/**
|
1525
|
-
* @fileoverview added by tsickle
|
1526
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1527
|
-
*/
|
1528
|
-
/** @type {?} */
|
1529
|
-
var TD_LOADING = [TdLoadingComponent, TdLoadingDirective];
|
1530
|
-
/** @type {?} */
|
1531
|
-
var TD_LOADING_ENTRY_COMPONENTS = [TdLoadingComponent];
|
1532
|
-
var CovalentLoadingModule = /** @class */ (function () {
|
1533
|
-
function CovalentLoadingModule() {
|
1534
|
-
}
|
1535
|
-
CovalentLoadingModule.decorators = [
|
1536
|
-
{ type: NgModule, args: [{
|
1537
|
-
imports: [CommonModule, MatProgressBarModule, MatProgressSpinnerModule, OverlayModule, PortalModule],
|
1538
|
-
declarations: [TD_LOADING],
|
1539
|
-
exports: [TD_LOADING],
|
1540
|
-
providers: [LOADING_FACTORY_PROVIDER, LOADING_PROVIDER],
|
1541
|
-
},] }
|
1542
|
-
];
|
1543
|
-
return CovalentLoadingModule;
|
1544
|
-
}());
|
1545
|
-
|
1546
|
-
/**
|
1547
|
-
* @fileoverview added by tsickle
|
1548
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1549
|
-
*/
|
1550
|
-
|
1551
|
-
/**
|
1552
|
-
* @fileoverview added by tsickle
|
1553
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1554
|
-
*/
|
1555
|
-
|
1556
|
-
/**
|
1557
|
-
* @fileoverview added by tsickle
|
1558
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1559
|
-
*/
|
1560
|
-
|
1561
|
-
export { CovalentLoadingModule, LOADING_FACTORY_PROVIDER, LOADING_FACTORY_PROVIDER_FACTORY, LOADING_PROVIDER, LOADING_PROVIDER_FACTORY, LoadingMode, LoadingStrategy, LoadingStyle, LoadingType, TD_CIRCLE_DIAMETER, TdLoadingComponent, TdLoadingConfig, TdLoadingContext, TdLoadingDirective, TdLoadingDirectiveConfig, TdLoadingFactory, TdLoadingService };
|
1562
|
-
//# sourceMappingURL=covalent-core-loading.js.map
|