@covalent/core 4.0.0 → 4.1.0-develop.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/breadcrumbs/README.md +21 -17
- package/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +6 -1
- package/breadcrumbs/breadcrumbs.component.d.ts +4 -0
- package/breadcrumbs/breadcrumbs.module.d.ts +8 -0
- package/breadcrumbs/covalent-core-breadcrumbs.d.ts +2 -1
- package/breadcrumbs/package.json +6 -7
- package/breadcrumbs/{public-api.d.ts → public_api.d.ts} +0 -0
- package/common/README.md +3 -0
- package/common/_common-theme.scss +3 -1
- package/common/behaviors/disable-ripple.mixin.d.ts +1 -1
- package/common/behaviors/disabled.mixin.d.ts +1 -1
- package/common/common.module.d.ts +15 -0
- package/common/covalent-core-common.d.ts +2 -3
- package/common/directives/fullscreen/fullscreen.directive.d.ts +3 -0
- package/common/forms/auto-trim/auto-trim.directive.d.ts +3 -0
- package/common/package.json +6 -7
- package/common/pipes/bytes/bytes.pipe.d.ts +3 -0
- package/common/pipes/decimal-bytes/decimal-bytes.pipe.d.ts +3 -0
- package/common/pipes/digits/digits.pipe.d.ts +3 -0
- package/common/pipes/time-ago/time-ago.pipe.d.ts +3 -0
- package/common/pipes/time-difference/time-difference.pipe.d.ts +3 -0
- package/common/pipes/time-until/time-until.pipe.d.ts +3 -0
- package/common/pipes/truncate/truncate.pipe.d.ts +4 -1
- package/common/{public-api.d.ts → public_api.d.ts} +0 -0
- package/common/services/icon.service.d.ts +3 -0
- package/common/services/router-path.service.d.ts +3 -0
- package/common/styles/_elevation.scss +7 -2
- package/common/styles/_layout.scss +12 -10
- package/common/styles/_palette-dark.scss +2 -2
- package/common/styles/_palette-light.scss +6 -6
- package/common/styles/_rtl.scss +3 -0
- package/common/styles/_typography-functions.scss +10 -2
- package/common/styles/_variables.scss +7 -6
- package/common/styles/colors/_colors-dark.scss +327 -0
- package/common/styles/colors/_colors-light.scss +748 -0
- package/common/styles/core/_button.scss +37 -6
- package/common/styles/core/_card.scss +34 -9
- package/common/styles/core/_content.scss +2 -1
- package/common/styles/core/_divider.scss +1 -0
- package/common/styles/core/_icons.scss +2 -0
- package/common/styles/core/_sidenav.scss +2 -0
- package/common/styles/core/_structure.scss +6 -7
- package/common/styles/core/_toolbar.scss +7 -0
- package/common/styles/core/_whiteframe.scss +18 -10
- package/common/styles/font/README.md +4 -2
- package/common/styles/font/_font.scss +10 -4
- package/common/styles/utilities/_general.scss +14 -0
- package/common/styles/utilities/_text.scss +21 -0
- package/covalent-core.d.ts +2 -1
- package/dialogs/README.md +38 -30
- package/dialogs/_dialog-theme.scss +1 -0
- package/dialogs/alert-dialog/alert-dialog.component.d.ts +6 -3
- package/dialogs/confirm-dialog/confirm-dialog.component.d.ts +5 -2
- package/dialogs/covalent-core-dialogs.d.ts +2 -2
- package/dialogs/dialog.component.d.ts +9 -0
- package/dialogs/dialogs.module.d.ts +17 -0
- package/dialogs/package.json +6 -7
- package/dialogs/prompt-dialog/prompt-dialog.component.d.ts +6 -3
- package/dialogs/{public-api.d.ts → public_api.d.ts} +1 -0
- package/dialogs/services/dialog.service.d.ts +3 -0
- package/dialogs/src/README.md +223 -0
- package/dialogs/window-dialog/window-dialog.component.d.ts +8 -5
- package/dynamic-menu/README.md +6 -6
- package/dynamic-menu/covalent-core-dynamic-menu.d.ts +2 -2
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.d.ts +4 -1
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.d.ts +4 -1
- package/dynamic-menu/dynamic-menu.component.d.ts +4 -22
- package/dynamic-menu/dynamic-menu.menu.d.ts +22 -0
- package/dynamic-menu/dynamic-menu.module.d.ts +13 -0
- package/dynamic-menu/package.json +6 -7
- package/dynamic-menu/public_api.d.ts +2 -0
- package/esm2020/breadcrumbs/breadcrumb/breadcrumb.component.mjs +92 -0
- package/esm2020/breadcrumbs/breadcrumbs.component.mjs +134 -0
- package/esm2020/breadcrumbs/breadcrumbs.module.mjs +20 -0
- package/esm2020/breadcrumbs/covalent-core-breadcrumbs.mjs +5 -0
- package/esm2020/breadcrumbs/public_api.mjs +4 -0
- package/esm2020/common/animations/bounce/bounce.animation.mjs +70 -0
- package/esm2020/common/animations/collapse/collapse.animation.mjs +51 -0
- package/esm2020/common/animations/common/interfaces.mjs +2 -0
- package/esm2020/common/animations/fade/fadeInOut.animation.mjs +37 -0
- package/esm2020/common/animations/flash/flash.animation.mjs +34 -0
- package/esm2020/common/animations/headshake/headshake.animation.mjs +47 -0
- package/esm2020/common/animations/jello/jello.animation.mjs +59 -0
- package/esm2020/common/animations/pulse/pulse.animation.mjs +32 -0
- package/esm2020/common/animations/rotate/rotate.animation.mjs +30 -0
- package/esm2020/common/behaviors/control-value-accesor.mixin.mjs +41 -0
- package/esm2020/common/behaviors/disable-ripple.mixin.mjs +24 -0
- package/esm2020/common/behaviors/disabled.mixin.mjs +24 -0
- package/esm2020/common/common.module.mjs +63 -0
- package/esm2020/common/covalent-core-common.mjs +5 -0
- package/esm2020/common/directives/fullscreen/fullscreen.directive.mjs +85 -0
- package/esm2020/common/forms/auto-trim/auto-trim.directive.mjs +36 -0
- package/esm2020/common/forms/validators/validators.mjs +29 -0
- package/esm2020/common/functions/clipboard.mjs +23 -0
- package/esm2020/common/functions/convert.mjs +84 -0
- package/esm2020/common/functions/download.mjs +75 -0
- package/esm2020/common/functions/file.mjs +16 -0
- package/esm2020/common/pipes/bytes/bytes.pipe.mjs +42 -0
- package/esm2020/common/pipes/decimal-bytes/decimal-bytes.pipe.mjs +42 -0
- package/esm2020/common/pipes/digits/digits.pipe.mjs +39 -0
- package/esm2020/common/pipes/time-ago/time-ago.pipe.mjs +72 -0
- package/esm2020/common/pipes/time-difference/time-difference.pipe.mjs +51 -0
- package/esm2020/common/pipes/time-until/time-until.pipe.mjs +72 -0
- package/esm2020/common/pipes/truncate/truncate.pipe.mjs +27 -0
- package/esm2020/common/public_api.mjs +39 -0
- package/esm2020/common/services/icon.service.mjs +1089 -0
- package/esm2020/common/services/router-path.service.mjs +29 -0
- package/esm2020/covalent-core.mjs +5 -0
- package/esm2020/dialogs/alert-dialog/alert-dialog.component.mjs +23 -0
- package/esm2020/dialogs/confirm-dialog/confirm-dialog.component.mjs +28 -0
- package/esm2020/dialogs/covalent-core-dialogs.mjs +5 -0
- package/esm2020/dialogs/dialog.component.mjs +56 -0
- package/esm2020/dialogs/dialogs.module.mjs +89 -0
- package/esm2020/dialogs/prompt-dialog/prompt-dialog.component.mjs +46 -0
- package/esm2020/dialogs/public_api.mjs +9 -0
- package/esm2020/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.mjs +216 -0
- package/esm2020/dialogs/services/dialog.service.mjs +171 -0
- package/esm2020/dialogs/window-dialog/window-dialog.component.mjs +38 -0
- package/esm2020/dynamic-menu/covalent-core-dynamic-menu.mjs +5 -0
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.mjs +30 -0
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.mjs +24 -0
- package/esm2020/dynamic-menu/dynamic-menu.component.mjs +28 -0
- package/esm2020/dynamic-menu/dynamic-menu.menu.mjs +2 -0
- package/esm2020/dynamic-menu/dynamic-menu.module.mjs +57 -0
- package/esm2020/dynamic-menu/public_api.mjs +6 -0
- package/esm2020/file/covalent-core-file.mjs +5 -0
- package/esm2020/file/directives/file-drop.directive.mjs +147 -0
- package/esm2020/file/directives/file-select.directive.mjs +77 -0
- package/esm2020/file/file-input/file-input.component.mjs +110 -0
- package/esm2020/file/file-upload/file-upload.component.mjs +174 -0
- package/esm2020/file/file.module.mjs +58 -0
- package/esm2020/file/public_api.mjs +7 -0
- package/esm2020/file/services/file.service.mjs +64 -0
- package/esm2020/json-formatter/collapse.animation.mjs +51 -0
- package/esm2020/json-formatter/covalent-core-json-formatter.mjs +5 -0
- package/esm2020/json-formatter/json-formatter.component.mjs +217 -0
- package/esm2020/json-formatter/json-formatter.module.mjs +20 -0
- package/esm2020/json-formatter/public_api.mjs +3 -0
- package/esm2020/layout/covalent-core-layout.mjs +5 -0
- package/esm2020/layout/layout-card-over/layout-card-over.component.mjs +40 -0
- package/esm2020/layout/layout-footer/layout-footer.component.mjs +33 -0
- package/esm2020/layout/layout-manage-list/layout-manage-list.component.mjs +93 -0
- package/esm2020/layout/layout-manage-list/layout-manage-list.directives.mjs +84 -0
- package/esm2020/layout/layout-nav/layout-nav.component.mjs +50 -0
- package/esm2020/layout/layout-nav-list/layout-nav-list.component.mjs +128 -0
- package/esm2020/layout/layout-nav-list/layout-nav-list.directives.mjs +84 -0
- package/esm2020/layout/layout-toggle.class.mjs +92 -0
- package/esm2020/layout/layout.component.mjs +92 -0
- package/esm2020/layout/layout.directives.mjs +85 -0
- package/esm2020/layout/layout.module.mjs +117 -0
- package/esm2020/layout/navigation-drawer/navigation-drawer.component.mjs +161 -0
- package/esm2020/layout/public_api.mjs +13 -0
- package/esm2020/menu/covalent-core-menu.mjs +5 -0
- package/esm2020/menu/menu.component.mjs +12 -0
- package/esm2020/menu/menu.module.mjs +21 -0
- package/esm2020/menu/public_api.mjs +3 -0
- package/esm2020/message/collapse.animation.mjs +51 -0
- package/esm2020/message/covalent-core-message.mjs +5 -0
- package/esm2020/message/message.component.mjs +203 -0
- package/esm2020/message/message.module.mjs +25 -0
- package/esm2020/message/public_api.mjs +3 -0
- package/esm2020/public_api.mjs +2 -0
- package/esm2020/search/covalent-core-search.mjs +5 -0
- package/esm2020/search/public_api.mjs +4 -0
- package/esm2020/search/search-box/search-box.component.mjs +194 -0
- package/esm2020/search/search-input/search-input.component.mjs +203 -0
- package/esm2020/search/search.module.mjs +39 -0
- package/esm2020/side-sheet/covalent-core-side-sheet.mjs +5 -0
- package/esm2020/side-sheet/public_api.mjs +6 -0
- package/esm2020/side-sheet/side-sheet-container.mjs +274 -0
- package/esm2020/side-sheet/side-sheet-ref.mjs +21 -0
- package/esm2020/side-sheet/side-sheet.animation.mjs +12 -0
- package/esm2020/side-sheet/side-sheet.config.mjs +4 -0
- package/esm2020/side-sheet/side-sheet.content-directives.mjs +201 -0
- package/esm2020/side-sheet/side-sheet.mjs +221 -0
- package/esm2020/side-sheet/side-sheet.module.mjs +45 -0
- package/esm2020/user-profile/covalent-core-user-profile.mjs +5 -0
- package/esm2020/user-profile/public_api.mjs +4 -0
- package/esm2020/user-profile/user-profile-menu/user-profile-menu.component.mjs +24 -0
- package/esm2020/user-profile/user-profile.component.mjs +19 -0
- package/esm2020/user-profile/user-profile.module.mjs +44 -0
- package/fesm2015/covalent-core-breadcrumbs.mjs +246 -0
- package/fesm2015/covalent-core-breadcrumbs.mjs.map +1 -0
- package/fesm2015/covalent-core-common.mjs +2281 -0
- package/fesm2015/covalent-core-common.mjs.map +1 -0
- package/fesm2015/covalent-core-dialogs.mjs +639 -0
- package/fesm2015/covalent-core-dialogs.mjs.map +1 -0
- package/fesm2015/covalent-core-dynamic-menu.mjs +128 -0
- package/fesm2015/covalent-core-dynamic-menu.mjs.map +1 -0
- package/fesm2015/covalent-core-file.mjs +613 -0
- package/fesm2015/covalent-core-file.mjs.map +1 -0
- package/fesm2015/covalent-core-json-formatter.mjs +298 -0
- package/fesm2015/covalent-core-json-formatter.mjs.map +1 -0
- package/fesm2015/covalent-core-layout.mjs +1024 -0
- package/fesm2015/covalent-core-layout.mjs.map +1 -0
- package/fesm2015/covalent-core-menu.mjs +37 -0
- package/fesm2015/covalent-core-menu.mjs.map +1 -0
- package/fesm2015/covalent-core-message.mjs +284 -0
- package/fesm2015/covalent-core-message.mjs.map +1 -0
- package/fesm2015/covalent-core-search.mjs +428 -0
- package/fesm2015/covalent-core-search.mjs.map +1 -0
- package/fesm2015/covalent-core-side-sheet.mjs +762 -0
- package/fesm2015/covalent-core-side-sheet.mjs.map +1 -0
- package/fesm2015/covalent-core-user-profile.mjs +86 -0
- package/fesm2015/covalent-core-user-profile.mjs.map +1 -0
- package/fesm2015/covalent-core.mjs +4 -0
- package/fesm2015/covalent-core.mjs.map +1 -0
- package/fesm2020/covalent-core-breadcrumbs.mjs +246 -0
- package/fesm2020/covalent-core-breadcrumbs.mjs.map +1 -0
- package/{fesm2015/covalent-core-common.js → fesm2020/covalent-core-common.mjs} +317 -813
- package/fesm2020/covalent-core-common.mjs.map +1 -0
- package/fesm2020/covalent-core-dialogs.mjs +634 -0
- package/fesm2020/covalent-core-dialogs.mjs.map +1 -0
- package/fesm2020/covalent-core-dynamic-menu.mjs +128 -0
- package/fesm2020/covalent-core-dynamic-menu.mjs.map +1 -0
- package/fesm2020/covalent-core-file.mjs +607 -0
- package/fesm2020/covalent-core-file.mjs.map +1 -0
- package/fesm2020/covalent-core-json-formatter.mjs +290 -0
- package/fesm2020/covalent-core-json-formatter.mjs.map +1 -0
- package/fesm2020/covalent-core-layout.mjs +1000 -0
- package/fesm2020/covalent-core-layout.mjs.map +1 -0
- package/fesm2020/covalent-core-menu.mjs +37 -0
- package/fesm2020/covalent-core-menu.mjs.map +1 -0
- package/fesm2020/covalent-core-message.mjs +282 -0
- package/fesm2020/covalent-core-message.mjs.map +1 -0
- package/fesm2020/covalent-core-search.mjs +425 -0
- package/fesm2020/covalent-core-search.mjs.map +1 -0
- package/fesm2020/covalent-core-side-sheet.mjs +757 -0
- package/fesm2020/covalent-core-side-sheet.mjs.map +1 -0
- package/fesm2020/covalent-core-user-profile.mjs +86 -0
- package/fesm2020/covalent-core-user-profile.mjs.map +1 -0
- package/fesm2020/covalent-core.mjs +4 -0
- package/fesm2020/covalent-core.mjs.map +1 -0
- package/file/_file-theme.scss +3 -1
- package/file/covalent-core-file.d.ts +2 -1
- package/file/directives/file-drop.directive.d.ts +8 -6
- package/file/directives/file-select.directive.d.ts +5 -2
- package/file/file-input/file-input.component.d.ts +10 -5
- package/file/file-upload/file-upload.component.d.ts +18 -8
- package/file/file.module.d.ts +13 -0
- package/file/package.json +6 -7
- package/file/{public-api.d.ts → public_api.d.ts} +0 -0
- package/file/services/file.service.d.ts +3 -0
- package/file/{file-input → src/file-input}/README.md +46 -37
- package/file/{file-upload → src/file-upload}/README.md +36 -27
- package/json-formatter/README.md +8 -8
- package/json-formatter/_json-formatter-theme.scss +10 -0
- package/json-formatter/collapse.animation.d.ts +24 -0
- package/json-formatter/covalent-core-json-formatter.d.ts +2 -1
- package/json-formatter/json-formatter.component.d.ts +7 -4
- package/json-formatter/json-formatter.module.d.ts +8 -0
- package/json-formatter/package.json +6 -7
- package/json-formatter/{public-api.d.ts → public_api.d.ts} +0 -0
- package/layout/README.md +48 -50
- package/layout/_layout-theme.scss +12 -0
- package/layout/covalent-core-layout.d.ts +2 -1
- package/layout/layout-card-over/layout-card-over.component.d.ts +6 -3
- package/layout/layout-footer/layout-footer.component.d.ts +6 -3
- package/layout/layout-manage-list/layout-manage-list.component.d.ts +7 -4
- package/layout/layout-manage-list/layout-manage-list.directives.d.ts +9 -2
- package/layout/layout-nav/layout-nav.component.d.ts +8 -5
- package/layout/layout-nav-list/layout-nav-list.component.d.ts +12 -9
- package/layout/layout-nav-list/layout-nav-list.directives.d.ts +9 -2
- package/layout/layout-toggle.class.d.ts +4 -1
- package/layout/layout.component.d.ts +7 -4
- package/layout/layout.directives.d.ts +9 -2
- package/layout/layout.module.d.ts +23 -0
- package/layout/navigation-drawer/navigation-drawer.component.d.ts +17 -10
- package/layout/package.json +6 -7
- package/layout/{public-api.d.ts → public_api.d.ts} +0 -0
- package/layout/{layout-card-over → src/layout-card-over}/README.md +19 -17
- package/layout/{layout-manage-list → src/layout-manage-list}/README.md +24 -28
- package/layout/src/layout-nav/README.md +50 -0
- package/layout/{layout-nav-list → src/layout-nav-list}/README.md +44 -40
- package/menu/covalent-core-menu.d.ts +2 -1
- package/menu/menu.component.d.ts +3 -0
- package/menu/menu.module.d.ts +8 -0
- package/menu/package.json +6 -7
- package/menu/{public-api.d.ts → public_api.d.ts} +0 -0
- package/message/README.md +26 -18
- package/message/_message-theme.scss +3 -0
- package/message/collapse.animation.d.ts +24 -0
- package/message/covalent-core-message.d.ts +2 -1
- package/message/message.component.d.ts +9 -4
- package/message/message.module.d.ts +7 -0
- package/message/package.json +6 -7
- package/message/{public-api.d.ts → public_api.d.ts} +0 -0
- package/package.json +129 -37
- package/{index.d.ts → public_api.d.ts} +0 -0
- package/search/README.md +74 -73
- package/search/covalent-core-search.d.ts +2 -1
- package/search/package.json +6 -7
- package/search/{public-api.d.ts → public_api.d.ts} +0 -0
- package/search/search-box/search-box.component.d.ts +12 -5
- package/search/search-input/search-input.component.d.ts +12 -5
- package/search/search.module.d.ts +11 -0
- package/search/src/search-box/README.md +73 -0
- package/search/src/search-input/README.md +74 -0
- package/side-sheet/README.md +3 -5
- package/side-sheet/{side-sheet.theme.scss → _side-sheet.theme.scss} +0 -0
- package/side-sheet/covalent-core-side-sheet.d.ts +2 -3
- package/side-sheet/package.json +6 -7
- package/side-sheet/{public-api.d.ts → public_api.d.ts} +0 -0
- package/side-sheet/side-sheet-container.d.ts +21 -5
- package/side-sheet/side-sheet.content-directives.d.ts +23 -6
- package/side-sheet/side-sheet.d.ts +7 -2
- package/side-sheet/side-sheet.module.d.ts +9 -0
- package/user-profile/README.md +5 -5
- package/user-profile/covalent-core-user-profile.d.ts +2 -1
- package/user-profile/package.json +6 -7
- package/user-profile/user-profile-menu/user-profile-menu.component.d.ts +5 -2
- package/user-profile/user-profile.component.d.ts +5 -2
- package/user-profile/user-profile.module.d.ts +12 -0
- package/breadcrumbs/breadcrumb/breadcrumb.component.scss +0 -22
- package/breadcrumbs/breadcrumbs.component.scss +0 -7
- package/breadcrumbs/covalent-core-breadcrumbs.metadata.json +0 -1
- package/breadcrumbs/index.d.ts +0 -1
- package/bundles/covalent-core-breadcrumbs.umd.js +0 -490
- package/bundles/covalent-core-breadcrumbs.umd.js.map +0 -1
- package/bundles/covalent-core-breadcrumbs.umd.min.js +0 -2
- package/bundles/covalent-core-breadcrumbs.umd.min.js.map +0 -1
- package/bundles/covalent-core-common.umd.js +0 -3188
- package/bundles/covalent-core-common.umd.js.map +0 -1
- package/bundles/covalent-core-common.umd.min.js +0 -17
- package/bundles/covalent-core-common.umd.min.js.map +0 -1
- package/bundles/covalent-core-dialogs.umd.js +0 -1318
- package/bundles/covalent-core-dialogs.umd.js.map +0 -1
- package/bundles/covalent-core-dialogs.umd.min.js +0 -2
- package/bundles/covalent-core-dialogs.umd.min.js.map +0 -1
- package/bundles/covalent-core-dynamic-menu.umd.js +0 -215
- package/bundles/covalent-core-dynamic-menu.umd.js.map +0 -1
- package/bundles/covalent-core-dynamic-menu.umd.min.js +0 -2
- package/bundles/covalent-core-dynamic-menu.umd.min.js.map +0 -1
- package/bundles/covalent-core-file.umd.js +0 -1211
- package/bundles/covalent-core-file.umd.js.map +0 -1
- package/bundles/covalent-core-file.umd.min.js +0 -17
- package/bundles/covalent-core-file.umd.min.js.map +0 -1
- package/bundles/covalent-core-json-formatter.umd.js +0 -408
- package/bundles/covalent-core-json-formatter.umd.js.map +0 -1
- package/bundles/covalent-core-json-formatter.umd.min.js +0 -2
- package/bundles/covalent-core-json-formatter.umd.min.js.map +0 -1
- package/bundles/covalent-core-layout.umd.js +0 -2084
- package/bundles/covalent-core-layout.umd.js.map +0 -1
- package/bundles/covalent-core-layout.umd.min.js +0 -17
- package/bundles/covalent-core-layout.umd.min.js.map +0 -1
- package/bundles/covalent-core-menu.umd.js +0 -69
- package/bundles/covalent-core-menu.umd.js.map +0 -1
- package/bundles/covalent-core-menu.umd.min.js +0 -2
- package/bundles/covalent-core-menu.umd.min.js.map +0 -1
- package/bundles/covalent-core-message.umd.js +0 -375
- package/bundles/covalent-core-message.umd.js.map +0 -1
- package/bundles/covalent-core-message.umd.min.js +0 -2
- package/bundles/covalent-core-message.umd.min.js.map +0 -1
- package/bundles/covalent-core-search.umd.js +0 -877
- package/bundles/covalent-core-search.umd.js.map +0 -1
- package/bundles/covalent-core-search.umd.min.js +0 -16
- package/bundles/covalent-core-search.umd.min.js.map +0 -1
- package/bundles/covalent-core-side-sheet.umd.js +0 -1458
- package/bundles/covalent-core-side-sheet.umd.js.map +0 -1
- package/bundles/covalent-core-side-sheet.umd.min.js +0 -16
- package/bundles/covalent-core-side-sheet.umd.min.js.map +0 -1
- package/bundles/covalent-core-user-profile.umd.js +0 -116
- package/bundles/covalent-core-user-profile.umd.js.map +0 -1
- package/bundles/covalent-core-user-profile.umd.min.js +0 -2
- package/bundles/covalent-core-user-profile.umd.min.js.map +0 -1
- package/bundles/covalent-core.umd.js +0 -9
- package/bundles/covalent-core.umd.js.map +0 -1
- package/bundles/covalent-core.umd.min.js +0 -2
- package/bundles/covalent-core.umd.min.js.map +0 -1
- package/common/covalent-core-common.metadata.json +0 -1
- package/common/index.d.ts +0 -1
- package/common/material-icons.css +0 -98
- package/common/material-icons.css.map +0 -1
- package/common/material-icons.scss +0 -3
- package/common/platform.css +0 -15424
- package/common/platform.css.map +0 -1
- package/common/platform.scss +0 -7
- package/covalent-core.metadata.json +0 -1
- package/dialogs/alert-dialog/alert-dialog.component.scss +0 -3
- package/dialogs/confirm-dialog/confirm-dialog.component.scss +0 -3
- package/dialogs/covalent-core-dialogs.metadata.json +0 -1
- package/dialogs/dialog.component.scss +0 -44
- package/dialogs/index.d.ts +0 -1
- package/dialogs/prompt-dialog/prompt-dialog.component.scss +0 -15
- package/dialogs/window-dialog/window-dialog.component.scss +0 -31
- package/dynamic-menu/covalent-core-dynamic-menu.metadata.json +0 -1
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.scss +0 -6
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.scss +0 -11
- package/dynamic-menu/dynamic-menu.component.scss +0 -0
- package/dynamic-menu/index.d.ts +0 -1
- package/esm2015/breadcrumbs/breadcrumb/breadcrumb.component.js +0 -171
- package/esm2015/breadcrumbs/breadcrumbs.component.js +0 -241
- package/esm2015/breadcrumbs/breadcrumbs.module.js +0 -20
- package/esm2015/breadcrumbs/covalent-core-breadcrumbs.js +0 -10
- package/esm2015/breadcrumbs/index.js +0 -7
- package/esm2015/breadcrumbs/public-api.js +0 -9
- package/esm2015/common/animations/bounce/bounce.animation.js +0 -76
- package/esm2015/common/animations/collapse/collapse.animation.js +0 -67
- package/esm2015/common/animations/common/interfaces.js +0 -18
- package/esm2015/common/animations/fade/fadeInOut.animation.js +0 -53
- package/esm2015/common/animations/flash/flash.animation.js +0 -40
- package/esm2015/common/animations/headshake/headshake.animation.js +0 -41
- package/esm2015/common/animations/jello/jello.animation.js +0 -44
- package/esm2015/common/animations/pulse/pulse.animation.js +0 -38
- package/esm2015/common/animations/rotate/rotate.animation.js +0 -41
- package/esm2015/common/behaviors/control-value-accesor.mixin.js +0 -107
- package/esm2015/common/behaviors/disable-ripple.mixin.js +0 -63
- package/esm2015/common/behaviors/disabled.mixin.js +0 -63
- package/esm2015/common/common.module.js +0 -54
- package/esm2015/common/covalent-core-common.js +0 -12
- package/esm2015/common/directives/fullscreen/fullscreen.directive.js +0 -180
- package/esm2015/common/forms/auto-trim/auto-trim.directive.js +0 -46
- package/esm2015/common/forms/validators/validators.js +0 -58
- package/esm2015/common/functions/clipboard.js +0 -30
- package/esm2015/common/functions/convert.js +0 -103
- package/esm2015/common/functions/download.js +0 -88
- package/esm2015/common/functions/file.js +0 -29
- package/esm2015/common/index.js +0 -7
- package/esm2015/common/pipes/bytes/bytes.pipe.js +0 -41
- package/esm2015/common/pipes/decimal-bytes/decimal-bytes.pipe.js +0 -41
- package/esm2015/common/pipes/digits/digits.pipe.js +0 -65
- package/esm2015/common/pipes/time-ago/time-ago.pipe.js +0 -81
- package/esm2015/common/pipes/time-difference/time-difference.pipe.js +0 -66
- package/esm2015/common/pipes/time-until/time-until.pipe.js +0 -81
- package/esm2015/common/pipes/truncate/truncate.pipe.js +0 -34
- package/esm2015/common/public-api.js +0 -44
- package/esm2015/common/services/icon.service.js +0 -1109
- package/esm2015/common/services/router-path.service.js +0 -60
- package/esm2015/covalent-core.js +0 -10
- package/esm2015/dialogs/alert-dialog/alert-dialog.component.js +0 -47
- package/esm2015/dialogs/confirm-dialog/confirm-dialog.component.js +0 -59
- package/esm2015/dialogs/covalent-core-dialogs.js +0 -11
- package/esm2015/dialogs/dialog.component.js +0 -58
- package/esm2015/dialogs/dialogs.module.js +0 -57
- package/esm2015/dialogs/index.js +0 -7
- package/esm2015/dialogs/prompt-dialog/prompt-dialog.component.js +0 -83
- package/esm2015/dialogs/public-api.js +0 -13
- package/esm2015/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.js +0 -325
- package/esm2015/dialogs/services/dialog.service.js +0 -316
- package/esm2015/dialogs/window-dialog/window-dialog.component.js +0 -56
- package/esm2015/dynamic-menu/covalent-core-dynamic-menu.js +0 -11
- package/esm2015/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.js +0 -40
- package/esm2015/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.js +0 -35
- package/esm2015/dynamic-menu/dynamic-menu.component.js +0 -89
- package/esm2015/dynamic-menu/dynamic-menu.module.js +0 -26
- package/esm2015/dynamic-menu/index.js +0 -7
- package/esm2015/dynamic-menu/public_api.js +0 -9
- package/esm2015/file/covalent-core-file.js +0 -10
- package/esm2015/file/directives/file-drop.directive.js +0 -191
- package/esm2015/file/directives/file-select.directive.js +0 -98
- package/esm2015/file/file-input/file-input.component.js +0 -186
- package/esm2015/file/file-upload/file-upload.component.js +0 -237
- package/esm2015/file/file.module.js +0 -35
- package/esm2015/file/index.js +0 -7
- package/esm2015/file/public-api.js +0 -12
- package/esm2015/file/services/file.service.js +0 -109
- package/esm2015/index.js +0 -7
- package/esm2015/json-formatter/covalent-core-json-formatter.js +0 -10
- package/esm2015/json-formatter/index.js +0 -7
- package/esm2015/json-formatter/json-formatter.component.js +0 -338
- package/esm2015/json-formatter/json-formatter.module.js +0 -20
- package/esm2015/json-formatter/public-api.js +0 -8
- package/esm2015/layout/covalent-core-layout.js +0 -10
- package/esm2015/layout/index.js +0 -7
- package/esm2015/layout/layout-card-over/layout-card-over.component.js +0 -71
- package/esm2015/layout/layout-footer/layout-footer.component.js +0 -71
- package/esm2015/layout/layout-manage-list/layout-manage-list.component.js +0 -145
- package/esm2015/layout/layout-manage-list/layout-manage-list.directives.js +0 -132
- package/esm2015/layout/layout-nav/layout-nav.component.js +0 -100
- package/esm2015/layout/layout-nav-list/layout-nav-list.component.js +0 -220
- package/esm2015/layout/layout-nav-list/layout-nav-list.directives.js +0 -132
- package/esm2015/layout/layout-toggle.class.js +0 -188
- package/esm2015/layout/layout.component.js +0 -145
- package/esm2015/layout/layout.directives.js +0 -129
- package/esm2015/layout/layout.module.js +0 -64
- package/esm2015/layout/navigation-drawer/navigation-drawer.component.js +0 -280
- package/esm2015/layout/public-api.js +0 -18
- package/esm2015/menu/covalent-core-menu.js +0 -10
- package/esm2015/menu/index.js +0 -7
- package/esm2015/menu/menu.component.js +0 -16
- package/esm2015/menu/menu.module.js +0 -22
- package/esm2015/menu/public-api.js +0 -8
- package/esm2015/message/covalent-core-message.js +0 -10
- package/esm2015/message/index.js +0 -7
- package/esm2015/message/message.component.js +0 -307
- package/esm2015/message/message.module.js +0 -21
- package/esm2015/message/public-api.js +0 -8
- package/esm2015/search/covalent-core-search.js +0 -10
- package/esm2015/search/index.js +0 -7
- package/esm2015/search/public-api.js +0 -9
- package/esm2015/search/search-box/search-box.component.js +0 -270
- package/esm2015/search/search-input/search-input.component.js +0 -260
- package/esm2015/search/search.module.js +0 -23
- package/esm2015/side-sheet/covalent-core-side-sheet.js +0 -12
- package/esm2015/side-sheet/index.js +0 -7
- package/esm2015/side-sheet/public-api.js +0 -11
- package/esm2015/side-sheet/side-sheet-container.js +0 -402
- package/esm2015/side-sheet/side-sheet-ref.js +0 -50
- package/esm2015/side-sheet/side-sheet.animation.js +0 -20
- package/esm2015/side-sheet/side-sheet.config.js +0 -12
- package/esm2015/side-sheet/side-sheet.content-directives.js +0 -255
- package/esm2015/side-sheet/side-sheet.js +0 -360
- package/esm2015/side-sheet/side-sheet.module.js +0 -36
- package/esm2015/user-profile/covalent-core-user-profile.js +0 -10
- package/esm2015/user-profile/index.js +0 -7
- package/esm2015/user-profile/public_api.js +0 -9
- package/esm2015/user-profile/user-profile-menu/user-profile-menu.component.js +0 -35
- package/esm2015/user-profile/user-profile.component.js +0 -26
- package/esm2015/user-profile/user-profile.module.js +0 -25
- package/fesm2015/covalent-core-breadcrumbs.js +0 -448
- package/fesm2015/covalent-core-breadcrumbs.js.map +0 -1
- package/fesm2015/covalent-core-common.js.map +0 -1
- package/fesm2015/covalent-core-dialogs.js +0 -1001
- package/fesm2015/covalent-core-dialogs.js.map +0 -1
- package/fesm2015/covalent-core-dynamic-menu.js +0 -204
- package/fesm2015/covalent-core-dynamic-menu.js.map +0 -1
- package/fesm2015/covalent-core-file.js +0 -855
- package/fesm2015/covalent-core-file.js.map +0 -1
- package/fesm2015/covalent-core-json-formatter.js +0 -377
- package/fesm2015/covalent-core-json-formatter.js.map +0 -1
- package/fesm2015/covalent-core-layout.js +0 -1663
- package/fesm2015/covalent-core-layout.js.map +0 -1
- package/fesm2015/covalent-core-menu.js +0 -57
- package/fesm2015/covalent-core-menu.js.map +0 -1
- package/fesm2015/covalent-core-message.js +0 -347
- package/fesm2015/covalent-core-message.js.map +0 -1
- package/fesm2015/covalent-core-search.js +0 -564
- package/fesm2015/covalent-core-search.js.map +0 -1
- package/fesm2015/covalent-core-side-sheet.js +0 -1134
- package/fesm2015/covalent-core-side-sheet.js.map +0 -1
- package/fesm2015/covalent-core-user-profile.js +0 -103
- package/fesm2015/covalent-core-user-profile.js.map +0 -1
- package/fesm2015/covalent-core.js +0 -12
- package/fesm2015/covalent-core.js.map +0 -1
- package/file/covalent-core-file.metadata.json +0 -1
- package/file/file-input/file-input.component.scss +0 -20
- package/file/file-upload/file-upload.component.scss +0 -30
- package/file/index.d.ts +0 -1
- package/json-formatter/covalent-core-json-formatter.metadata.json +0 -1
- package/json-formatter/index.d.ts +0 -1
- package/json-formatter/json-formatter.component.scss +0 -61
- package/layout/covalent-core-layout.metadata.json +0 -1
- package/layout/index.d.ts +0 -1
- package/layout/layout-card-over/layout-card-over.component.scss +0 -42
- package/layout/layout-footer/layout-footer.component.scss +0 -4
- package/layout/layout-manage-list/layout-manage-list.component.scss +0 -78
- package/layout/layout-nav/README.md +0 -46
- package/layout/layout-nav/layout-nav.component.scss +0 -50
- package/layout/layout-nav-list/layout-nav-list.component.scss +0 -110
- package/layout/layout.component.scss +0 -20
- package/layout/navigation-drawer/navigation-drawer.component.scss +0 -73
- package/menu/covalent-core-menu.metadata.json +0 -1
- package/menu/index.d.ts +0 -1
- package/menu/menu.component.scss +0 -43
- package/message/covalent-core-message.metadata.json +0 -1
- package/message/index.d.ts +0 -1
- package/message/message.component.scss +0 -29
- package/schematics/README.md +0 -66
- package/schematics/collection.json +0 -11
- package/schematics/components.js +0 -111
- package/schematics/components.js.map +0 -1
- package/schematics/migration.json +0 -10
- package/schematics/ng-add/files/theme.scss +0 -64
- package/schematics/ng-add/index.js +0 -58
- package/schematics/ng-add/index.js.map +0 -1
- package/schematics/ng-add/schema.js +0 -3
- package/schematics/ng-add/schema.js.map +0 -1
- package/schematics/ng-add/schema.json +0 -81
- package/schematics/ng-update/index.js +0 -52
- package/schematics/ng-update/index.js.map +0 -1
- package/schematics/ng-update/target-version.js +0 -8
- package/schematics/ng-update/target-version.js.map +0 -1
- package/schematics/version-names.js +0 -6
- package/schematics/version-names.js.map +0 -1
- package/search/covalent-core-search.metadata.json +0 -1
- package/search/index.d.ts +0 -1
- package/search/search-box/README.md +0 -62
- package/search/search-box/search-box.component.scss +0 -32
- package/search/search-input/README.md +0 -65
- package/search/search-input/search-input.component.scss +0 -63
- package/side-sheet/covalent-core-side-sheet.metadata.json +0 -1
- package/side-sheet/index.d.ts +0 -1
- package/side-sheet/side-sheet.scss +0 -69
- package/theming/prebuilt/blue-grey-deep-orange.css +0 -2434
- package/theming/prebuilt/blue-grey-deep-orange.css.map +0 -1
- package/theming/prebuilt/blue-grey-deep-orange.scss +0 -13
- package/theming/prebuilt/blue-orange.css +0 -2434
- package/theming/prebuilt/blue-orange.css.map +0 -1
- package/theming/prebuilt/blue-orange.scss +0 -13
- package/theming/prebuilt/indigo-pink.css +0 -2434
- package/theming/prebuilt/indigo-pink.css.map +0 -1
- package/theming/prebuilt/indigo-pink.scss +0 -13
- package/theming/prebuilt/orange-light-blue.css +0 -2434
- package/theming/prebuilt/orange-light-blue.css.map +0 -1
- package/theming/prebuilt/orange-light-blue.scss +0 -13
- package/theming/prebuilt/teal-orange.css +0 -2434
- package/theming/prebuilt/teal-orange.css.map +0 -1
- package/theming/prebuilt/teal-orange.scss +0 -13
- package/user-profile/covalent-core-user-profile.metadata.json +0 -1
- package/user-profile/index.d.ts +0 -1
- package/user-profile/user-profile-menu/user-profile-menu.component.scss +0 -38
@@ -0,0 +1,762 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { EventEmitter, Directive, Optional, Inject, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, HostListener, Injector, TemplateRef, InjectFlags, Injectable, SkipSelf, Input, NgModule } from '@angular/core';
|
3
|
+
import * as i3 from '@angular/cdk/portal';
|
4
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
5
|
+
import { AnimationDurations, AnimationCurves, MatCommonModule } from '@angular/material/core';
|
6
|
+
import { MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule } from '@angular/material/dialog';
|
7
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
8
|
+
import { OverlayConfig } from '@angular/cdk/overlay';
|
9
|
+
import { DOCUMENT } from '@angular/common';
|
10
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
11
|
+
import * as i1 from '@angular/cdk/a11y';
|
12
|
+
import { Subject, of } from 'rxjs';
|
13
|
+
import { filter, take } from 'rxjs/operators';
|
14
|
+
import { Directionality } from '@angular/cdk/bidi';
|
15
|
+
|
16
|
+
const tdSideSheetAnimations = {
|
17
|
+
/** Animation that is applied on the side-sheet container by default. */
|
18
|
+
sideSheetContainer: trigger('sideSheetContainer', [
|
19
|
+
state('void, exit', style({ transform: 'translateX(100%)' })),
|
20
|
+
state('enter', style({ transform: 'translateX(0%)', opacity: 1 })),
|
21
|
+
transition('* => enter', animate(`${AnimationDurations.ENTERING} ${AnimationCurves.ACCELERATION_CURVE}`, style({ transform: 'translateX(0)', opacity: 1 }))),
|
22
|
+
transition('* => void, * => exit', animate(`${AnimationDurations.EXITING} ${AnimationCurves.ACCELERATION_CURVE}`, style({ transform: 'translateX(100%)' }))),
|
23
|
+
]),
|
24
|
+
};
|
25
|
+
|
26
|
+
class CovalentSideSheetConfig extends MatDialogConfig {
|
27
|
+
}
|
28
|
+
|
29
|
+
function _getFocusedElementPierceShadowDom() {
|
30
|
+
let activeElement = typeof document !== 'undefined' && document
|
31
|
+
? document.activeElement
|
32
|
+
: null;
|
33
|
+
while (activeElement && activeElement.shadowRoot) {
|
34
|
+
const newActiveElement = activeElement.shadowRoot
|
35
|
+
.activeElement;
|
36
|
+
if (newActiveElement === activeElement) {
|
37
|
+
break;
|
38
|
+
}
|
39
|
+
else {
|
40
|
+
activeElement = newActiveElement;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
return activeElement;
|
44
|
+
}
|
45
|
+
/**
|
46
|
+
* Base class for the `CovalentSideSheetContainer`. The base class does not implement
|
47
|
+
* animations as these are left to implementers of the side-sheet container.
|
48
|
+
*/
|
49
|
+
class _CovalentSideSheetContainerBase extends BasePortalOutlet {
|
50
|
+
constructor(_elementRef, _focusTrapFactory, _changeDetectorRef, _document,
|
51
|
+
/** The side-sheet configuration. */
|
52
|
+
_config, _focusMonitor) {
|
53
|
+
super();
|
54
|
+
this._elementRef = _elementRef;
|
55
|
+
this._focusTrapFactory = _focusTrapFactory;
|
56
|
+
this._changeDetectorRef = _changeDetectorRef;
|
57
|
+
this._config = _config;
|
58
|
+
this._focusMonitor = _focusMonitor;
|
59
|
+
/** Emits when an animation state changes. */
|
60
|
+
this._animationStateChanged = new EventEmitter();
|
61
|
+
/** Element that was focused before the side-sheet was opened. Save this to restore upon close. */
|
62
|
+
this._elementFocusedBeforeSideSheetWasOpened = null;
|
63
|
+
/**
|
64
|
+
* Type of interaction that led to the side-sheet being closed. This is used to determine
|
65
|
+
* whether the focus style will be applied when returning focus to its original location
|
66
|
+
* after the side-sheet is closed.
|
67
|
+
*/
|
68
|
+
this._closeInteractionType = null;
|
69
|
+
/**
|
70
|
+
* Attaches a DOM portal to the side-sheet container.
|
71
|
+
* @param portal Portal to be attached.
|
72
|
+
* @deprecated To be turned into a method.
|
73
|
+
*/
|
74
|
+
this.attachDomPortal = (portal) => {
|
75
|
+
return this._portalOutlet.attachDomPortal(portal);
|
76
|
+
};
|
77
|
+
this._ariaLabelledBy = _config.ariaLabelledBy || null;
|
78
|
+
this._document = _document;
|
79
|
+
}
|
80
|
+
/** Initializes the side-sheet container with the attached content. */
|
81
|
+
_initializeWithAttachedContent() {
|
82
|
+
this._setupFocusTrap();
|
83
|
+
// Save the previously focused element. This element will be re-focused
|
84
|
+
// when the side-sheet closes.
|
85
|
+
this._capturePreviouslyFocusedElement();
|
86
|
+
}
|
87
|
+
/**
|
88
|
+
* Attach a ComponentPortal as content to this side-sheet container.
|
89
|
+
* @param portal Portal to be attached as the side-sheet content.
|
90
|
+
*/
|
91
|
+
attachComponentPortal(portal) {
|
92
|
+
return this._portalOutlet.attachComponentPortal(portal);
|
93
|
+
}
|
94
|
+
/**
|
95
|
+
* Attach a TemplatePortal as content to this side-sheet container.
|
96
|
+
* @param portal Portal to be attached as the side-sheet content.
|
97
|
+
*/
|
98
|
+
attachTemplatePortal(portal) {
|
99
|
+
return this._portalOutlet.attachTemplatePortal(portal);
|
100
|
+
}
|
101
|
+
/** Moves focus back into the side-sheet if it was moved out. */
|
102
|
+
_recaptureFocus() {
|
103
|
+
if (!this._containsFocus()) {
|
104
|
+
this._trapFocus();
|
105
|
+
}
|
106
|
+
}
|
107
|
+
/**
|
108
|
+
* Moves the focus inside the focus trap. When autoFocus is not set to 'side-sheet', if focus
|
109
|
+
* cannot be moved then focus will go to the side-sheet container.
|
110
|
+
*/
|
111
|
+
_trapFocus() {
|
112
|
+
const element = this._elementRef.nativeElement;
|
113
|
+
if (!this._config.autoFocus) {
|
114
|
+
if (!this._containsFocus()) {
|
115
|
+
element.focus();
|
116
|
+
}
|
117
|
+
}
|
118
|
+
else {
|
119
|
+
this._focusTrap
|
120
|
+
.focusInitialElementWhenReady()
|
121
|
+
.then((focusedSuccessfully) => {
|
122
|
+
// If we weren't able to find a focusable element in the side-sheet, then focus the side-sheet
|
123
|
+
// container instead.
|
124
|
+
if (!focusedSuccessfully) {
|
125
|
+
this._focusSideSheetContainer();
|
126
|
+
}
|
127
|
+
});
|
128
|
+
}
|
129
|
+
}
|
130
|
+
/** Restores focus to the element that was focused before the side-sheet opened. */
|
131
|
+
_restoreFocus() {
|
132
|
+
const previousElement = this._elementFocusedBeforeSideSheetWasOpened;
|
133
|
+
// We need the extra check, because IE can set the `activeElement` to null in some cases.
|
134
|
+
if (this._config.restoreFocus &&
|
135
|
+
previousElement &&
|
136
|
+
typeof previousElement.focus === 'function') {
|
137
|
+
const activeElement = _getFocusedElementPierceShadowDom();
|
138
|
+
const element = this._elementRef.nativeElement;
|
139
|
+
// Make sure that focus is still inside the side-sheet or is on the body (usually because a
|
140
|
+
// non-focusable element like the backdrop was clicked) before moving it. It's possible that
|
141
|
+
// the consumer moved it themselves before the animation was done, in which case we shouldn't
|
142
|
+
// do anything.
|
143
|
+
if (!activeElement ||
|
144
|
+
activeElement === this._document.body ||
|
145
|
+
activeElement === element ||
|
146
|
+
element.contains(activeElement)) {
|
147
|
+
if (this._focusMonitor) {
|
148
|
+
this._focusMonitor.focusVia(previousElement, this._closeInteractionType);
|
149
|
+
this._closeInteractionType = null;
|
150
|
+
}
|
151
|
+
else {
|
152
|
+
previousElement.focus();
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
if (this._focusTrap) {
|
157
|
+
this._focusTrap.destroy();
|
158
|
+
}
|
159
|
+
}
|
160
|
+
/** Sets up the focus trap. */
|
161
|
+
_setupFocusTrap() {
|
162
|
+
this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
|
163
|
+
}
|
164
|
+
/** Captures the element that was focused before the side-sheet was opened. */
|
165
|
+
_capturePreviouslyFocusedElement() {
|
166
|
+
if (this._document) {
|
167
|
+
this._elementFocusedBeforeSideSheetWasOpened =
|
168
|
+
_getFocusedElementPierceShadowDom();
|
169
|
+
}
|
170
|
+
}
|
171
|
+
/** Focuses the side-sheet container. */
|
172
|
+
_focusSideSheetContainer() {
|
173
|
+
// Note that there is no focus method when rendering on the server.
|
174
|
+
if (this._elementRef.nativeElement.focus) {
|
175
|
+
this._elementRef.nativeElement.focus();
|
176
|
+
}
|
177
|
+
}
|
178
|
+
/** Returns whether focus is inside the side-sheet. */
|
179
|
+
_containsFocus() {
|
180
|
+
const element = this._elementRef.nativeElement;
|
181
|
+
const activeElement = _getFocusedElementPierceShadowDom();
|
182
|
+
return element === activeElement || element.contains(activeElement);
|
183
|
+
}
|
184
|
+
}
|
185
|
+
_CovalentSideSheetContainerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: _CovalentSideSheetContainerBase, deps: [{ token: i0.ElementRef }, { token: i1.ConfigurableFocusTrapFactory }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT, optional: true }, { token: CovalentSideSheetConfig }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive });
|
186
|
+
_CovalentSideSheetContainerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: _CovalentSideSheetContainerBase, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: _CovalentSideSheetContainerBase, decorators: [{
|
188
|
+
type: Directive
|
189
|
+
}], ctorParameters: function () {
|
190
|
+
return [{ type: i0.ElementRef }, { type: i1.ConfigurableFocusTrapFactory }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
191
|
+
type: Optional
|
192
|
+
}, {
|
193
|
+
type: Inject,
|
194
|
+
args: [DOCUMENT]
|
195
|
+
}] }, { type: CovalentSideSheetConfig }, { type: i1.FocusMonitor }];
|
196
|
+
}, propDecorators: { _portalOutlet: [{
|
197
|
+
type: ViewChild,
|
198
|
+
args: [CdkPortalOutlet, { static: true }]
|
199
|
+
}] } });
|
200
|
+
/**
|
201
|
+
* Internal component that wraps the generated side-sheet content.
|
202
|
+
* This animation below is the only reason for duplicating most of the Material dialog code
|
203
|
+
*/
|
204
|
+
class CovalentSideSheetContainerComponent extends _CovalentSideSheetContainerBase {
|
205
|
+
constructor() {
|
206
|
+
super(...arguments);
|
207
|
+
/** State of the side-sheet animation. */
|
208
|
+
this._state = 'enter';
|
209
|
+
this.tdSideSheetContainerClass = true;
|
210
|
+
this.tabIndex = -1;
|
211
|
+
this.arialModal = true;
|
212
|
+
this.idAttr = this._id;
|
213
|
+
this.roleAttr = this._config.role;
|
214
|
+
this.arialLabelByAttr = this._config.ariaLabel
|
215
|
+
? null
|
216
|
+
: this._ariaLabelledBy;
|
217
|
+
this.arialDescribeByAttr = this._config.ariaDescribedBy || null;
|
218
|
+
this.arialLabelAttr = this._config.ariaLabel;
|
219
|
+
}
|
220
|
+
get sideSheetAnimationState() {
|
221
|
+
return this._state;
|
222
|
+
}
|
223
|
+
onAnimateStart($event) {
|
224
|
+
this._onAnimationStart($event);
|
225
|
+
}
|
226
|
+
onAnimateDone($event) {
|
227
|
+
this._onAnimationDone($event);
|
228
|
+
}
|
229
|
+
/** Callback, invoked whenever an animation on the host completes. */
|
230
|
+
_onAnimationDone({ toState, totalTime }) {
|
231
|
+
if (toState === 'enter') {
|
232
|
+
this._trapFocus();
|
233
|
+
this._animationStateChanged.next({ state: 'opened', totalTime });
|
234
|
+
}
|
235
|
+
else if (toState === 'exit') {
|
236
|
+
this._restoreFocus();
|
237
|
+
this._animationStateChanged.next({ state: 'closed', totalTime });
|
238
|
+
}
|
239
|
+
}
|
240
|
+
/** Callback, invoked when an animation on the host starts. */
|
241
|
+
_onAnimationStart({ toState, totalTime }) {
|
242
|
+
if (toState === 'enter') {
|
243
|
+
this._animationStateChanged.next({ state: 'opening', totalTime });
|
244
|
+
}
|
245
|
+
else if (toState === 'exit' || toState === 'void') {
|
246
|
+
this._animationStateChanged.next({ state: 'closing', totalTime });
|
247
|
+
}
|
248
|
+
}
|
249
|
+
/** Starts the side-sheet exit animation. */
|
250
|
+
_startExitAnimation() {
|
251
|
+
this._state = 'exit';
|
252
|
+
this._changeDetectorRef.markForCheck();
|
253
|
+
}
|
254
|
+
}
|
255
|
+
CovalentSideSheetContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
256
|
+
CovalentSideSheetContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: CovalentSideSheetContainerComponent, selector: "td-side-sheet-container", host: { listeners: { "@sideSheetContainer.start": "onAnimateStart($event)", "@sideSheetContainer.done": "onAnimateDone($event)" }, properties: { "class.td-side-sheet-container": "this.tdSideSheetContainerClass", "tabindex": "this.tabIndex", "aria-modal": "this.arialModal", "id": "this.idAttr", "attr.role": "this.roleAttr", "attr.aria-labelledby": "this.arialLabelByAttr", "attr.aria-describedby": "this.arialDescribeByAttr", "attr.aria-label": "this.arialLabelAttr", "@sideSheetContainer": "this.sideSheetAnimationState" } }, usesInheritance: true, ngImport: i0, template: ` <ng-template cdkPortalOutlet></ng-template> `, isInline: true, styles: [".td-side-sheet-container{background-color:#fff;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f;display:block;padding:24px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.td-side-sheet-wrapper{display:flex;flex-direction:column;height:100%}.td-side-sheet-content{margin:0 -24px;padding:0 24px;overflow:auto;flex:1;-webkit-overflow-scrolling:touch}.td-side-sheet-title{margin:-16px 0 20px;display:flex;align-items:center}.td-side-sheet-actions{padding:8px 0;margin:0 -16px -24px;display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center;box-sizing:content-box}.td-side-sheet-actions[align=end]{justify-content:flex-end}.td-side-sheet-actions[align=center]{justify-content:center}.td-side-sheet-actions .mat-button-base+.mat-button-base,.td-side-sheet-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .td-side-sheet-actions .mat-button-base+.mat-button-base,[dir=rtl] .td-side-sheet-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"], directives: [{ type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [tdSideSheetAnimations.sideSheetContainer], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetContainerComponent, decorators: [{
|
258
|
+
type: Component,
|
259
|
+
args: [{ selector: 'td-side-sheet-container', template: ` <ng-template cdkPortalOutlet></ng-template> `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [tdSideSheetAnimations.sideSheetContainer], styles: [".td-side-sheet-container{background-color:#fff;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f;display:block;padding:24px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.td-side-sheet-wrapper{display:flex;flex-direction:column;height:100%}.td-side-sheet-content{margin:0 -24px;padding:0 24px;overflow:auto;flex:1;-webkit-overflow-scrolling:touch}.td-side-sheet-title{margin:-16px 0 20px;display:flex;align-items:center}.td-side-sheet-actions{padding:8px 0;margin:0 -16px -24px;display:flex;justify-content:space-between;flex-wrap:wrap;align-items:center;box-sizing:content-box}.td-side-sheet-actions[align=end]{justify-content:flex-end}.td-side-sheet-actions[align=center]{justify-content:center}.td-side-sheet-actions .mat-button-base+.mat-button-base,.td-side-sheet-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .td-side-sheet-actions .mat-button-base+.mat-button-base,[dir=rtl] .td-side-sheet-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"] }]
|
260
|
+
}], propDecorators: { tdSideSheetContainerClass: [{
|
261
|
+
type: HostBinding,
|
262
|
+
args: ['class.td-side-sheet-container']
|
263
|
+
}], tabIndex: [{
|
264
|
+
type: HostBinding,
|
265
|
+
args: ['tabindex']
|
266
|
+
}], arialModal: [{
|
267
|
+
type: HostBinding,
|
268
|
+
args: ['aria-modal']
|
269
|
+
}], idAttr: [{
|
270
|
+
type: HostBinding,
|
271
|
+
args: ['id']
|
272
|
+
}], roleAttr: [{
|
273
|
+
type: HostBinding,
|
274
|
+
args: ['attr.role']
|
275
|
+
}], arialLabelByAttr: [{
|
276
|
+
type: HostBinding,
|
277
|
+
args: ['attr.aria-labelledby']
|
278
|
+
}], arialDescribeByAttr: [{
|
279
|
+
type: HostBinding,
|
280
|
+
args: ['attr.aria-describedby']
|
281
|
+
}], arialLabelAttr: [{
|
282
|
+
type: HostBinding,
|
283
|
+
args: ['attr.aria-label']
|
284
|
+
}], sideSheetAnimationState: [{
|
285
|
+
type: HostBinding,
|
286
|
+
args: ['@sideSheetContainer']
|
287
|
+
}], onAnimateStart: [{
|
288
|
+
type: HostListener,
|
289
|
+
args: ['@sideSheetContainer.start', ['$event']]
|
290
|
+
}], onAnimateDone: [{
|
291
|
+
type: HostListener,
|
292
|
+
args: ['@sideSheetContainer.done', ['$event']]
|
293
|
+
}] } });
|
294
|
+
|
295
|
+
// Counter for unique dialog ids.
|
296
|
+
let uniqueId = 0;
|
297
|
+
// Create a new side sheet ref to change the id of the ref
|
298
|
+
class CovalentSideSheetRef extends MatDialogRef {
|
299
|
+
constructor(overlayRef, _containerInstance, id = `td-side-sheet-${uniqueId++}`) {
|
300
|
+
super(overlayRef, _containerInstance, id);
|
301
|
+
this.overlayRef = overlayRef;
|
302
|
+
this._containerInstance = _containerInstance;
|
303
|
+
this.id = id;
|
304
|
+
}
|
305
|
+
}
|
306
|
+
function _closeSideSheetVia(ref, interactionType, result) {
|
307
|
+
// Some mock dialog ref instances in tests do not have the `_containerInstance` property.
|
308
|
+
// For those, we keep the behavior as is and do not deal with the interaction type.
|
309
|
+
if (ref._containerInstance !== undefined) {
|
310
|
+
ref._containerInstance._closeInteractionType = interactionType;
|
311
|
+
}
|
312
|
+
return ref.close(result);
|
313
|
+
}
|
314
|
+
|
315
|
+
/* tslint:disable */
|
316
|
+
class _CovalentSideSheetBase {
|
317
|
+
constructor(_overlay, _injector, _defaultOptions, _parentSideSheet, _sideSheetRefConstructor, _sideSheetContainerType, _sideSheetDataToken) {
|
318
|
+
this._overlay = _overlay;
|
319
|
+
this._injector = _injector;
|
320
|
+
this._defaultOptions = _defaultOptions;
|
321
|
+
this._parentSideSheet = _parentSideSheet;
|
322
|
+
this._sideSheetRefConstructor = _sideSheetRefConstructor;
|
323
|
+
this._sideSheetContainerType = _sideSheetContainerType;
|
324
|
+
this._sideSheetDataToken = _sideSheetDataToken;
|
325
|
+
this._openSideSheetsAtThisLevel = [];
|
326
|
+
this._afterAllClosedAtThisLevel = new Subject();
|
327
|
+
this._afterOpenedAtThisLevel = new Subject();
|
328
|
+
this.defaultSidebarConfig = {
|
329
|
+
minWidth: '400px',
|
330
|
+
maxWidth: '100vw',
|
331
|
+
};
|
332
|
+
}
|
333
|
+
/** Keeps track of the currently-open side-sheets. */
|
334
|
+
get openSideSheets() {
|
335
|
+
return this._parentSideSheet
|
336
|
+
? this._parentSideSheet.openSideSheets
|
337
|
+
: this._openSideSheetsAtThisLevel;
|
338
|
+
}
|
339
|
+
open(componentOrTemplateRef, config) {
|
340
|
+
config = Object.assign(Object.assign(Object.assign({}, (this._defaultOptions || new CovalentSideSheetConfig())), this.defaultSidebarConfig), config);
|
341
|
+
const overlayRef = this._createOverlay(config);
|
342
|
+
const sideSheetContainer = this._attachSideSheetContainer(overlayRef, config);
|
343
|
+
const sideSheetRef = this._attachSideSheetContent(componentOrTemplateRef, sideSheetContainer, overlayRef, config);
|
344
|
+
const prevSideSheetRef = this.openSideSheets.slice(-1)[0];
|
345
|
+
const prevOverlayRef = prevSideSheetRef === null || prevSideSheetRef === void 0 ? void 0 : prevSideSheetRef.overlayRef;
|
346
|
+
// Animate previous side sheet to full width
|
347
|
+
if (prevOverlayRef === null || prevOverlayRef === void 0 ? void 0 : prevOverlayRef.overlayElement) {
|
348
|
+
prevOverlayRef.overlayElement.style.transition = `${AnimationDurations.COMPLEX} ${AnimationCurves.DECELERATION_CURVE}`;
|
349
|
+
prevOverlayRef.overlayElement.style.minWidth = `${window.innerWidth}px`;
|
350
|
+
}
|
351
|
+
// Revert the previous side sheet config & size
|
352
|
+
sideSheetRef._containerInstance._animationStateChanged
|
353
|
+
.pipe(filter((event) => event.state === 'closing' && !!(prevSideSheetRef && prevOverlayRef)), take(1))
|
354
|
+
.subscribe(() => {
|
355
|
+
prevOverlayRef.overlayElement.style.transition = `${AnimationDurations.EXITING} ${AnimationCurves.DECELERATION_CURVE}`;
|
356
|
+
prevSideSheetRef.updateSize();
|
357
|
+
});
|
358
|
+
// Add new side sheet to open list
|
359
|
+
this.openSideSheets.push(sideSheetRef);
|
360
|
+
// Remove side sheet ref after closed
|
361
|
+
sideSheetRef
|
362
|
+
.afterClosed()
|
363
|
+
.pipe(take(1))
|
364
|
+
.subscribe(() => this._removeOpenSideSheet(sideSheetRef));
|
365
|
+
// Notify the side-sheet container that the content has been attached.
|
366
|
+
sideSheetContainer._initializeWithAttachedContent();
|
367
|
+
return sideSheetRef;
|
368
|
+
}
|
369
|
+
ngOnDestroy() {
|
370
|
+
// Only close the side-sheets at this level on destroy
|
371
|
+
// since the parent service may still be active.
|
372
|
+
this._closeSideSheets(this._openSideSheetsAtThisLevel);
|
373
|
+
this._afterAllClosedAtThisLevel.complete();
|
374
|
+
this._afterOpenedAtThisLevel.complete();
|
375
|
+
// Clean up any subscriptions to side-sheet that never finished opening.
|
376
|
+
if (this._animationStateSubscriptions) {
|
377
|
+
this._animationStateSubscriptions.unsubscribe();
|
378
|
+
}
|
379
|
+
}
|
380
|
+
/**
|
381
|
+
* Closes all of the currently-open side-sheets.
|
382
|
+
*/
|
383
|
+
closeAll() {
|
384
|
+
this._closeSideSheets(this.openSideSheets);
|
385
|
+
}
|
386
|
+
_createOverlay(config) {
|
387
|
+
const overlayConfig = new OverlayConfig({
|
388
|
+
positionStrategy: this._overlay.position().global(),
|
389
|
+
scrollStrategy: this._overlay.scrollStrategies.block(),
|
390
|
+
panelClass: config.panelClass,
|
391
|
+
hasBackdrop: config.hasBackdrop,
|
392
|
+
direction: config.direction,
|
393
|
+
minWidth: config.minWidth,
|
394
|
+
minHeight: config.minHeight,
|
395
|
+
maxWidth: config.maxWidth,
|
396
|
+
});
|
397
|
+
const overlayRef = this._overlay.create(overlayConfig);
|
398
|
+
const positionStrategy = overlayRef.getConfig()
|
399
|
+
.positionStrategy;
|
400
|
+
positionStrategy.right('0px');
|
401
|
+
return overlayRef;
|
402
|
+
}
|
403
|
+
/**
|
404
|
+
* Attaches a container to a side-sheets's already-created overlay.
|
405
|
+
* @param overlay Reference to the side-sheet's underlying overlay.
|
406
|
+
* @param config The side-sheet configuration.
|
407
|
+
* @returns A promise resolving to a ComponentRef for the attached container.
|
408
|
+
*/
|
409
|
+
_attachSideSheetContainer(overlay, config) {
|
410
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
411
|
+
const injector = Injector.create({
|
412
|
+
parent: userInjector || this._injector,
|
413
|
+
providers: [{ provide: CovalentSideSheetConfig, useValue: config }],
|
414
|
+
});
|
415
|
+
const containerPortal = new ComponentPortal(this._sideSheetContainerType, config.viewContainerRef, injector, config.componentFactoryResolver);
|
416
|
+
const containerRef = overlay.attach(containerPortal);
|
417
|
+
return containerRef.instance;
|
418
|
+
}
|
419
|
+
/**
|
420
|
+
* Attaches the user-provided component to the already-created side sheet container.
|
421
|
+
* @param componentOrTemplateRef The type of component being loaded into the side-sheet,
|
422
|
+
* or a TemplateRef to instantiate as the content.
|
423
|
+
* @param dialogContainer Reference to the wrapping side-sheet container.
|
424
|
+
* @param overlayRef Reference to the overlay in which the side-sheet resides.
|
425
|
+
* @param config The side-sheet configuration.
|
426
|
+
* @returns A promise resolving to the CovalentSideSheetRef that should be returned to the user.
|
427
|
+
*/
|
428
|
+
_attachSideSheetContent(componentOrTemplateRef, sideSheetContainer, overlayRef, config) {
|
429
|
+
// Create a reference to the side-sheet we're creating in order to give the user a handle
|
430
|
+
// to modify and close it.
|
431
|
+
const sideSheetRef = new this._sideSheetRefConstructor(overlayRef, sideSheetContainer, config.id);
|
432
|
+
if (componentOrTemplateRef instanceof TemplateRef) {
|
433
|
+
sideSheetContainer.attachTemplatePortal(
|
434
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
435
|
+
new TemplatePortal(componentOrTemplateRef, null, {
|
436
|
+
$implicit: config.data,
|
437
|
+
sideSheetRef,
|
438
|
+
}));
|
439
|
+
}
|
440
|
+
else {
|
441
|
+
const injector = this._createInjector(config, sideSheetRef, sideSheetContainer);
|
442
|
+
const contentRef = sideSheetContainer.attach(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
|
443
|
+
sideSheetRef.componentInstance = contentRef.instance;
|
444
|
+
}
|
445
|
+
sideSheetRef.updateSize(config.width, config.height);
|
446
|
+
return sideSheetRef;
|
447
|
+
}
|
448
|
+
_createInjector(config, sideSheetRef, sideSheetContainer) {
|
449
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
450
|
+
// The side-sheet container should be provided as the side-sheet container and the side-sheet's
|
451
|
+
// content are created out of the same `ViewContainerRef` and as such, are siblings
|
452
|
+
// for injector purposes. To allow the hierarchy that is expected, the side-sheet
|
453
|
+
// container is explicitly provided in the injector.
|
454
|
+
const providers = [
|
455
|
+
{ provide: this._sideSheetContainerType, useValue: sideSheetContainer },
|
456
|
+
{ provide: this._sideSheetDataToken, useValue: config.data },
|
457
|
+
{ provide: this._sideSheetRefConstructor, useValue: sideSheetRef },
|
458
|
+
];
|
459
|
+
if (config.direction &&
|
460
|
+
(!userInjector ||
|
461
|
+
!userInjector.get(Directionality, null, InjectFlags.Optional))) {
|
462
|
+
providers.push({
|
463
|
+
provide: Directionality,
|
464
|
+
useValue: { value: config.direction, change: of() },
|
465
|
+
});
|
466
|
+
}
|
467
|
+
return Injector.create({
|
468
|
+
parent: userInjector || this._injector,
|
469
|
+
providers,
|
470
|
+
});
|
471
|
+
}
|
472
|
+
/**
|
473
|
+
* Removes a side sheet from the array of open side sheets.
|
474
|
+
* @param sideSheetRef Side Sheet to be removed.
|
475
|
+
*/
|
476
|
+
_removeOpenSideSheet(sideSheetRef) {
|
477
|
+
const index = this.openSideSheets.indexOf(sideSheetRef);
|
478
|
+
if (index > -1) {
|
479
|
+
this.openSideSheets.splice(index, 1);
|
480
|
+
}
|
481
|
+
}
|
482
|
+
/** Closes all of the side-sheet in an array. */
|
483
|
+
_closeSideSheets(sideSheets) {
|
484
|
+
let i = sideSheets.length;
|
485
|
+
while (i--) {
|
486
|
+
sideSheets[i].close();
|
487
|
+
}
|
488
|
+
}
|
489
|
+
}
|
490
|
+
_CovalentSideSheetBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: _CovalentSideSheetBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
491
|
+
_CovalentSideSheetBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: _CovalentSideSheetBase, ngImport: i0 });
|
492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: _CovalentSideSheetBase, decorators: [{
|
493
|
+
type: Directive
|
494
|
+
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: undefined }, { type: undefined }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }]; } });
|
495
|
+
/**
|
496
|
+
* Service to open Covalent Design side-sheet.
|
497
|
+
*/
|
498
|
+
class CovalentSideSheet extends _CovalentSideSheetBase {
|
499
|
+
constructor(overlay, injector, defaultOptions, parentSideSheet) {
|
500
|
+
super(overlay, injector, defaultOptions, parentSideSheet, CovalentSideSheetRef, CovalentSideSheetContainerComponent, MAT_DIALOG_DATA);
|
501
|
+
}
|
502
|
+
}
|
503
|
+
CovalentSideSheet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheet, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: MAT_DIALOG_DEFAULT_OPTIONS, optional: true }, { token: CovalentSideSheet, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
504
|
+
CovalentSideSheet.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheet });
|
505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheet, decorators: [{
|
506
|
+
type: Injectable
|
507
|
+
}], ctorParameters: function () {
|
508
|
+
return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: CovalentSideSheetConfig, decorators: [{
|
509
|
+
type: Optional
|
510
|
+
}, {
|
511
|
+
type: Inject,
|
512
|
+
args: [MAT_DIALOG_DEFAULT_OPTIONS]
|
513
|
+
}] }, { type: CovalentSideSheet, decorators: [{
|
514
|
+
type: Optional
|
515
|
+
}, {
|
516
|
+
type: SkipSelf
|
517
|
+
}] }];
|
518
|
+
} });
|
519
|
+
|
520
|
+
/* tslint:disable */
|
521
|
+
/** Counter used to generate unique IDs for dialog elements. */
|
522
|
+
let dialogElementUid = 0;
|
523
|
+
/**
|
524
|
+
* Button that will close the current dialog.
|
525
|
+
*/
|
526
|
+
class CovalentSideSheetCloseDirective {
|
527
|
+
constructor(dialogRef, _elementRef, _dialog) {
|
528
|
+
this.dialogRef = dialogRef;
|
529
|
+
this._elementRef = _elementRef;
|
530
|
+
this._dialog = _dialog;
|
531
|
+
/** Default to "button" to prevents accidental form submits. */
|
532
|
+
this.type = 'button';
|
533
|
+
}
|
534
|
+
onClick($event) {
|
535
|
+
this._onButtonClick($event);
|
536
|
+
}
|
537
|
+
ngOnInit() {
|
538
|
+
if (!this.dialogRef) {
|
539
|
+
// When this directive is included in a dialog via TemplateRef (rather than being
|
540
|
+
// in a Component), the DialogRef isn't available via injection because embedded
|
541
|
+
// views cannot be given a custom injector. Instead, we look up the DialogRef by
|
542
|
+
// ID. This must occur in `onInit`, as the ID binding for the dialog container won't
|
543
|
+
// be resolved at constructor time.
|
544
|
+
this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openSideSheets);
|
545
|
+
}
|
546
|
+
}
|
547
|
+
ngOnChanges(changes) {
|
548
|
+
const proxiedChange = changes['_CovalentSideSheetClose'] ||
|
549
|
+
changes['_CovalentSideSheetCloseResult'];
|
550
|
+
if (proxiedChange) {
|
551
|
+
this.dialogResult = proxiedChange.currentValue;
|
552
|
+
}
|
553
|
+
}
|
554
|
+
_onButtonClick(event) {
|
555
|
+
// Determinate the focus origin using the click event, because using the FocusMonitor will
|
556
|
+
// result in incorrect origins. Most of the time, close buttons will be auto focused in the
|
557
|
+
// dialog, and therefore clicking the button won't result in a focus change. This means that
|
558
|
+
// the FocusMonitor won't detect any origin change, and will always output `program`.
|
559
|
+
_closeSideSheetVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);
|
560
|
+
}
|
561
|
+
}
|
562
|
+
CovalentSideSheetCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetCloseDirective, deps: [{ token: CovalentSideSheetRef, optional: true }, { token: i0.ElementRef }, { token: CovalentSideSheet }], target: i0.ɵɵFactoryTarget.Directive });
|
563
|
+
CovalentSideSheetCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: CovalentSideSheetCloseDirective, selector: "[td-side-sheet-close], [CovalentSideSheetClose]", inputs: { ariaLabel: ["aria-label", "ariaLabel"], type: "type", dialogResult: ["td-side-sheet-close", "dialogResult"], _CovalentSideSheetClose: ["CovalentSideSheetClose", "_CovalentSideSheetClose"] }, host: { listeners: { "click": "onClick($event)" }, properties: { "attr.arial-label": "this.ariaLabel", "attr.type": "this.type" } }, exportAs: ["CovalentSideSheetClose"], usesOnChanges: true, ngImport: i0 });
|
564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetCloseDirective, decorators: [{
|
565
|
+
type: Directive,
|
566
|
+
args: [{
|
567
|
+
selector: '[td-side-sheet-close], [CovalentSideSheetClose]',
|
568
|
+
exportAs: 'CovalentSideSheetClose',
|
569
|
+
}]
|
570
|
+
}], ctorParameters: function () {
|
571
|
+
return [{ type: CovalentSideSheetRef, decorators: [{
|
572
|
+
type: Optional
|
573
|
+
}] }, { type: i0.ElementRef }, { type: CovalentSideSheet }];
|
574
|
+
}, propDecorators: { ariaLabel: [{
|
575
|
+
type: HostBinding,
|
576
|
+
args: ['attr.arial-label']
|
577
|
+
}, {
|
578
|
+
type: Input,
|
579
|
+
args: ['aria-label']
|
580
|
+
}], type: [{
|
581
|
+
type: HostBinding,
|
582
|
+
args: ['attr.type']
|
583
|
+
}, {
|
584
|
+
type: Input
|
585
|
+
}], dialogResult: [{
|
586
|
+
type: Input,
|
587
|
+
args: ['td-side-sheet-close']
|
588
|
+
}], _CovalentSideSheetClose: [{
|
589
|
+
type: Input,
|
590
|
+
args: ['CovalentSideSheetClose']
|
591
|
+
}], onClick: [{
|
592
|
+
type: HostListener,
|
593
|
+
args: ['click', ['$event']]
|
594
|
+
}] } });
|
595
|
+
/**
|
596
|
+
* Title of a side sheet element. Stays fixed to the top of the side sheet when scrolling.
|
597
|
+
*/
|
598
|
+
class CovalentSideSheetTitleDirective {
|
599
|
+
constructor(
|
600
|
+
// The dialog title directive is always used in combination with a `CovalentSideSheetRef`.
|
601
|
+
// tslint:disable-next-line: lightweight-tokens
|
602
|
+
_dialogRef, _elementRef, _dialog) {
|
603
|
+
this._dialogRef = _dialogRef;
|
604
|
+
this._elementRef = _elementRef;
|
605
|
+
this._dialog = _dialog;
|
606
|
+
/** Unique id for the dialog title. If none is supplied, it will be auto-generated. */
|
607
|
+
this.id = `td-side-sheet-title-${dialogElementUid++}`;
|
608
|
+
this.tdSideSheetTitle = true;
|
609
|
+
this.idAttr = this.id;
|
610
|
+
}
|
611
|
+
ngOnInit() {
|
612
|
+
if (this._dialogRef) {
|
613
|
+
Promise.resolve().then(() => {
|
614
|
+
const container = this._dialogRef._containerInstance;
|
615
|
+
if (container && !container._ariaLabelledBy) {
|
616
|
+
container._ariaLabelledBy = this.id;
|
617
|
+
}
|
618
|
+
});
|
619
|
+
}
|
620
|
+
else {
|
621
|
+
this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openSideSheets);
|
622
|
+
}
|
623
|
+
}
|
624
|
+
}
|
625
|
+
CovalentSideSheetTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetTitleDirective, deps: [{ token: CovalentSideSheetRef, optional: true }, { token: i0.ElementRef }, { token: CovalentSideSheet }], target: i0.ɵɵFactoryTarget.Directive });
|
626
|
+
CovalentSideSheetTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: CovalentSideSheetTitleDirective, selector: "[td-side-sheet-title], [CovalentSideSheetTitle]", inputs: { id: "id" }, host: { properties: { "class.td-side-sheet-title": "this.tdSideSheetTitle", "attr.id": "this.idAttr" } }, exportAs: ["CovalentSideSheetTitle"], ngImport: i0 });
|
627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetTitleDirective, decorators: [{
|
628
|
+
type: Directive,
|
629
|
+
args: [{
|
630
|
+
selector: '[td-side-sheet-title], [CovalentSideSheetTitle]',
|
631
|
+
exportAs: 'CovalentSideSheetTitle',
|
632
|
+
}]
|
633
|
+
}], ctorParameters: function () {
|
634
|
+
return [{ type: CovalentSideSheetRef, decorators: [{
|
635
|
+
type: Optional
|
636
|
+
}] }, { type: i0.ElementRef }, { type: CovalentSideSheet }];
|
637
|
+
}, propDecorators: { id: [{
|
638
|
+
type: Input
|
639
|
+
}], tdSideSheetTitle: [{
|
640
|
+
type: HostBinding,
|
641
|
+
args: ['class.td-side-sheet-title']
|
642
|
+
}], idAttr: [{
|
643
|
+
type: HostBinding,
|
644
|
+
args: ['attr.id']
|
645
|
+
}] } });
|
646
|
+
/**
|
647
|
+
* Scrollable content container of a dialog.
|
648
|
+
*/
|
649
|
+
class CovalentSideSheetContentDirective {
|
650
|
+
constructor() {
|
651
|
+
this.tdSideSheetContent = true;
|
652
|
+
}
|
653
|
+
}
|
654
|
+
CovalentSideSheetContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
655
|
+
CovalentSideSheetContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: CovalentSideSheetContentDirective, selector: "[td-side-sheet-content], td-side-sheet-content, [CovalentSideSheetContent]", host: { properties: { "class.td-side-sheet-content": "this.tdSideSheetContent" } }, ngImport: i0 });
|
656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetContentDirective, decorators: [{
|
657
|
+
type: Directive,
|
658
|
+
args: [{
|
659
|
+
selector: `[td-side-sheet-content], td-side-sheet-content, [CovalentSideSheetContent]`,
|
660
|
+
}]
|
661
|
+
}], propDecorators: { tdSideSheetContent: [{
|
662
|
+
type: HostBinding,
|
663
|
+
args: ['class.td-side-sheet-content']
|
664
|
+
}] } });
|
665
|
+
/**
|
666
|
+
* Container for the bottom action buttons in a dialog.
|
667
|
+
* Stays fixed to the bottom when scrolling.
|
668
|
+
*/
|
669
|
+
class CovalentSideSheetActionsDirective {
|
670
|
+
constructor() {
|
671
|
+
this.tdSideSheetActions = true;
|
672
|
+
}
|
673
|
+
}
|
674
|
+
CovalentSideSheetActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
675
|
+
CovalentSideSheetActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: CovalentSideSheetActionsDirective, selector: "[td-side-sheet-actions], td-side-sheet-actions, [CovalentSideSheetActions]", host: { properties: { "class.td-side-sheet-actions": "this.tdSideSheetActions" } }, ngImport: i0 });
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetActionsDirective, decorators: [{
|
677
|
+
type: Directive,
|
678
|
+
args: [{
|
679
|
+
selector: `[td-side-sheet-actions], td-side-sheet-actions, [CovalentSideSheetActions]`,
|
680
|
+
}]
|
681
|
+
}], propDecorators: { tdSideSheetActions: [{
|
682
|
+
type: HostBinding,
|
683
|
+
args: ['class.td-side-sheet-actions']
|
684
|
+
}] } });
|
685
|
+
/**
|
686
|
+
* Container for the wrapper part of the dialog
|
687
|
+
*/
|
688
|
+
class CovalentSideSheetWrapperDirective {
|
689
|
+
constructor() {
|
690
|
+
this.tdSideSheetWrapper = true;
|
691
|
+
}
|
692
|
+
}
|
693
|
+
CovalentSideSheetWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetWrapperDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
694
|
+
CovalentSideSheetWrapperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: CovalentSideSheetWrapperDirective, selector: "[td-side-sheet-wrapper], td-side-sheet-wrapper, [CovalentSideSheetWrapper]", host: { properties: { "class.td-side-sheet-wrapper": "this.tdSideSheetWrapper" } }, ngImport: i0 });
|
695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetWrapperDirective, decorators: [{
|
696
|
+
type: Directive,
|
697
|
+
args: [{
|
698
|
+
selector: `[td-side-sheet-wrapper], td-side-sheet-wrapper, [CovalentSideSheetWrapper]`,
|
699
|
+
}]
|
700
|
+
}], propDecorators: { tdSideSheetWrapper: [{
|
701
|
+
type: HostBinding,
|
702
|
+
args: ['class.td-side-sheet-wrapper']
|
703
|
+
}] } });
|
704
|
+
/**
|
705
|
+
* Finds the closest CovalentSideSheetRef to an element by looking at the DOM.
|
706
|
+
* @param element Element relative to which to look for a dialog.
|
707
|
+
* @param openDialogs References to the currently-open dialogs.
|
708
|
+
*/
|
709
|
+
function getClosestDialog(element, openDialogs) {
|
710
|
+
var _a;
|
711
|
+
let parent = element.nativeElement.parentElement;
|
712
|
+
while (parent && !parent.classList.contains('td-side-sheet-container')) {
|
713
|
+
parent = parent.parentElement;
|
714
|
+
}
|
715
|
+
return parent
|
716
|
+
? (_a = openDialogs.find((dialog) => dialog.id === (parent === null || parent === void 0 ? void 0 : parent.id))) !== null && _a !== void 0 ? _a : openDialogs[0]
|
717
|
+
: openDialogs[0];
|
718
|
+
}
|
719
|
+
|
720
|
+
class CovalentSideSheetModule {
|
721
|
+
}
|
722
|
+
CovalentSideSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
723
|
+
CovalentSideSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetModule, declarations: [CovalentSideSheetContainerComponent,
|
724
|
+
CovalentSideSheetActionsDirective,
|
725
|
+
CovalentSideSheetCloseDirective,
|
726
|
+
CovalentSideSheetContentDirective,
|
727
|
+
CovalentSideSheetTitleDirective,
|
728
|
+
CovalentSideSheetWrapperDirective], imports: [PortalModule, MatDialogModule, MatCommonModule], exports: [CovalentSideSheetActionsDirective,
|
729
|
+
CovalentSideSheetCloseDirective,
|
730
|
+
CovalentSideSheetContentDirective,
|
731
|
+
CovalentSideSheetTitleDirective,
|
732
|
+
CovalentSideSheetWrapperDirective] });
|
733
|
+
CovalentSideSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetModule, providers: [CovalentSideSheet], imports: [[PortalModule, MatDialogModule, MatCommonModule]] });
|
734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentSideSheetModule, decorators: [{
|
735
|
+
type: NgModule,
|
736
|
+
args: [{
|
737
|
+
declarations: [
|
738
|
+
CovalentSideSheetContainerComponent,
|
739
|
+
CovalentSideSheetActionsDirective,
|
740
|
+
CovalentSideSheetCloseDirective,
|
741
|
+
CovalentSideSheetContentDirective,
|
742
|
+
CovalentSideSheetTitleDirective,
|
743
|
+
CovalentSideSheetWrapperDirective,
|
744
|
+
],
|
745
|
+
exports: [
|
746
|
+
CovalentSideSheetActionsDirective,
|
747
|
+
CovalentSideSheetCloseDirective,
|
748
|
+
CovalentSideSheetContentDirective,
|
749
|
+
CovalentSideSheetTitleDirective,
|
750
|
+
CovalentSideSheetWrapperDirective,
|
751
|
+
],
|
752
|
+
imports: [PortalModule, MatDialogModule, MatCommonModule],
|
753
|
+
providers: [CovalentSideSheet],
|
754
|
+
}]
|
755
|
+
}] });
|
756
|
+
|
757
|
+
/**
|
758
|
+
* Generated bundle index. Do not edit.
|
759
|
+
*/
|
760
|
+
|
761
|
+
export { CovalentSideSheet, CovalentSideSheetActionsDirective, CovalentSideSheetCloseDirective, CovalentSideSheetConfig, CovalentSideSheetContentDirective, CovalentSideSheetModule, CovalentSideSheetRef, CovalentSideSheetTitleDirective, CovalentSideSheetWrapperDirective, _CovalentSideSheetBase, _closeSideSheetVia };
|
762
|
+
//# sourceMappingURL=covalent-core-side-sheet.mjs.map
|