@covalent/core 4.0.0-alpha.0 → 4.0.0-beta.1
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/breadcrumb/breadcrumb.component.d.ts +3 -0
- package/breadcrumbs/breadcrumb/breadcrumb.component.scss +3 -0
- package/breadcrumbs/breadcrumbs.component.d.ts +3 -0
- package/breadcrumbs/breadcrumbs.component.scss +1 -0
- package/breadcrumbs/breadcrumbs.module.d.ts +8 -0
- package/breadcrumbs/covalent-core-breadcrumbs.d.ts +1 -0
- package/breadcrumbs/package.json +6 -7
- package/common/_common-theme.scss +2 -0
- package/common/common.module.d.ts +15 -0
- package/common/covalent-core-common.d.ts +1 -2
- package/common/directives/fullscreen/fullscreen.directive.d.ts +3 -0
- package/common/forms/auto-trim/auto-trim.directive.d.ts +3 -0
- package/common/material-icons.css +31 -18
- package/common/material-icons.css.map +1 -1
- 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 +3 -0
- package/common/platform.css +11828 -10433
- package/common/platform.css.map +1 -1
- package/common/services/icon.service.d.ts +3 -0
- package/common/services/router-path.service.d.ts +3 -0
- 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/_variables.scss +5 -5
- package/common/styles/colors/_colors-dark.scss +327 -0
- package/common/styles/colors/_colors-light.scss +748 -0
- package/common/styles/core/_button.scss +2 -1
- package/common/styles/core/_card.scss +27 -7
- 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 +2 -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 +1 -0
- package/dialogs/_dialog-theme.scss +1 -0
- package/dialogs/alert-dialog/alert-dialog.component.d.ts +3 -0
- package/dialogs/confirm-dialog/confirm-dialog.component.d.ts +3 -0
- package/dialogs/covalent-core-dialogs.d.ts +1 -1
- package/dialogs/dialog.component.d.ts +9 -0
- package/dialogs/dialog.component.scss +5 -0
- package/dialogs/dialogs.module.d.ts +17 -0
- package/dialogs/package.json +6 -7
- package/dialogs/prompt-dialog/prompt-dialog.component.d.ts +3 -0
- package/dialogs/prompt-dialog/prompt-dialog.component.scss +1 -0
- package/dialogs/public-api.d.ts +1 -0
- package/dialogs/services/dialog.service.d.ts +3 -0
- package/dialogs/window-dialog/window-dialog.component.d.ts +3 -0
- package/dynamic-menu/covalent-core-dynamic-menu.d.ts +1 -1
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.d.ts +3 -0
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.scss +1 -0
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.d.ts +3 -0
- package/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.scss +3 -1
- package/dynamic-menu/dynamic-menu.component.d.ts +3 -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 +1 -0
- package/esm2020/breadcrumbs/breadcrumb/breadcrumb.component.mjs +108 -0
- package/esm2020/breadcrumbs/breadcrumbs.component.mjs +139 -0
- package/esm2020/breadcrumbs/breadcrumbs.module.mjs +21 -0
- package/esm2020/breadcrumbs/covalent-core-breadcrumbs.mjs +5 -0
- package/esm2020/breadcrumbs/index.mjs +2 -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 +35 -0
- package/esm2020/common/animations/jello/jello.animation.mjs +38 -0
- package/esm2020/common/animations/pulse/pulse.animation.mjs +32 -0
- package/esm2020/common/animations/rotate/rotate.animation.mjs +25 -0
- package/esm2020/common/behaviors/control-value-accesor.mixin.mjs +39 -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 +64 -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/{esm2015/common/functions/clipboard.js → esm2020/common/functions/clipboard.mjs} +3 -10
- 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/index.mjs +2 -0
- package/esm2020/common/pipes/bytes/bytes.pipe.mjs +32 -0
- package/esm2020/common/pipes/decimal-bytes/decimal-bytes.pipe.mjs +32 -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 +54 -0
- package/esm2020/dialogs/confirm-dialog/confirm-dialog.component.mjs +68 -0
- package/esm2020/dialogs/covalent-core-dialogs.mjs +5 -0
- package/esm2020/dialogs/dialog.component.mjs +97 -0
- package/esm2020/dialogs/dialogs.module.mjs +86 -0
- package/esm2020/dialogs/index.mjs +2 -0
- package/esm2020/dialogs/prompt-dialog/prompt-dialog.component.mjs +104 -0
- package/esm2020/dialogs/public-api.mjs +9 -0
- package/esm2020/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.mjs +199 -0
- package/esm2020/dialogs/services/dialog.service.mjs +168 -0
- package/esm2020/dialogs/window-dialog/window-dialog.component.mjs +69 -0
- package/esm2020/dynamic-menu/covalent-core-dynamic-menu.mjs +5 -0
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.mjs +147 -0
- package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.mjs +113 -0
- package/esm2020/dynamic-menu/dynamic-menu.component.mjs +111 -0
- package/esm2020/dynamic-menu/dynamic-menu.module.mjs +32 -0
- package/esm2020/dynamic-menu/index.mjs +2 -0
- package/esm2020/dynamic-menu/public_api.mjs +5 -0
- package/esm2020/file/covalent-core-file.mjs +5 -0
- package/esm2020/file/directives/file-drop.directive.mjs +148 -0
- package/esm2020/file/directives/file-select.directive.mjs +76 -0
- package/esm2020/file/file-input/file-input.component.mjs +137 -0
- package/esm2020/file/file-upload/file-upload.component.mjs +210 -0
- package/esm2020/file/file.module.mjs +43 -0
- package/esm2020/file/index.mjs +2 -0
- package/esm2020/file/public-api.mjs +7 -0
- package/esm2020/file/services/file.service.mjs +62 -0
- package/esm2020/index.mjs +2 -0
- package/esm2020/json-formatter/covalent-core-json-formatter.mjs +5 -0
- package/esm2020/json-formatter/index.mjs +2 -0
- package/esm2020/json-formatter/json-formatter.component.mjs +302 -0
- package/esm2020/json-formatter/json-formatter.module.mjs +21 -0
- package/esm2020/json-formatter/public-api.mjs +3 -0
- package/esm2020/layout/covalent-core-layout.mjs +5 -0
- package/esm2020/layout/index.mjs +2 -0
- package/esm2020/layout/layout-card-over/layout-card-over.component.mjs +87 -0
- package/esm2020/layout/layout-footer/layout-footer.component.mjs +38 -0
- package/esm2020/layout/layout-manage-list/layout-manage-list.component.mjs +122 -0
- package/esm2020/layout/layout-manage-list/layout-manage-list.directives.mjs +90 -0
- package/esm2020/layout/layout-nav/layout-nav.component.mjs +112 -0
- package/esm2020/layout/layout-nav-list/layout-nav-list.component.mjs +215 -0
- package/esm2020/layout/layout-nav-list/layout-nav-list.directives.mjs +90 -0
- package/esm2020/layout/layout-toggle.class.mjs +95 -0
- package/esm2020/layout/layout.component.mjs +113 -0
- package/esm2020/layout/layout.directives.mjs +87 -0
- package/esm2020/layout/layout.module.mjs +118 -0
- package/esm2020/layout/navigation-drawer/navigation-drawer.component.mjs +306 -0
- package/esm2020/layout/public-api.mjs +13 -0
- package/esm2020/menu/covalent-core-menu.mjs +5 -0
- package/esm2020/menu/index.mjs +2 -0
- package/esm2020/menu/menu.component.mjs +23 -0
- package/esm2020/menu/menu.module.mjs +22 -0
- package/esm2020/menu/public-api.mjs +3 -0
- package/esm2020/message/covalent-core-message.mjs +5 -0
- package/esm2020/message/index.mjs +2 -0
- package/esm2020/message/message.component.mjs +261 -0
- package/esm2020/message/message.module.mjs +21 -0
- package/esm2020/message/public-api.mjs +3 -0
- package/esm2020/search/covalent-core-search.mjs +5 -0
- package/esm2020/search/index.mjs +2 -0
- package/esm2020/search/public-api.mjs +4 -0
- package/esm2020/search/search-box/search-box.component.mjs +220 -0
- package/esm2020/search/search-input/search-input.component.mjs +240 -0
- package/esm2020/search/search.module.mjs +24 -0
- package/esm2020/side-sheet/covalent-core-side-sheet.mjs +5 -0
- package/esm2020/side-sheet/index.mjs +2 -0
- package/esm2020/side-sheet/public-api.mjs +6 -0
- package/esm2020/side-sheet/side-sheet-container.mjs +242 -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 +178 -0
- package/esm2020/side-sheet/side-sheet.mjs +208 -0
- package/esm2020/side-sheet/side-sheet.module.mjs +46 -0
- package/esm2020/user-profile/covalent-core-user-profile.mjs +5 -0
- package/esm2020/user-profile/index.mjs +2 -0
- package/esm2020/user-profile/public_api.mjs +4 -0
- package/esm2020/user-profile/user-profile-menu/user-profile-menu.component.mjs +75 -0
- package/esm2020/user-profile/user-profile.component.mjs +41 -0
- package/esm2020/user-profile/user-profile.module.mjs +26 -0
- package/fesm2015/covalent-core-breadcrumbs.mjs +287 -0
- package/fesm2015/covalent-core-breadcrumbs.mjs.map +1 -0
- package/fesm2015/covalent-core-common.mjs +2251 -0
- package/fesm2015/covalent-core-common.mjs.map +1 -0
- package/fesm2015/covalent-core-dialogs.mjs +872 -0
- package/fesm2015/covalent-core-dialogs.mjs.map +1 -0
- package/fesm2015/covalent-core-dynamic-menu.mjs +480 -0
- package/fesm2015/covalent-core-dynamic-menu.mjs.map +1 -0
- package/fesm2015/covalent-core-file.mjs +698 -0
- package/fesm2015/covalent-core-file.mjs.map +1 -0
- package/fesm2015/covalent-core-json-formatter.mjs +353 -0
- package/fesm2015/covalent-core-json-formatter.mjs.map +1 -0
- package/fesm2015/covalent-core-layout.mjs +1577 -0
- package/fesm2015/covalent-core-layout.mjs.map +1 -0
- package/fesm2015/covalent-core-menu.mjs +55 -0
- package/fesm2015/covalent-core-menu.mjs.map +1 -0
- package/fesm2015/covalent-core-message.mjs +309 -0
- package/fesm2015/covalent-core-message.mjs.map +1 -0
- package/fesm2015/covalent-core-search.mjs +508 -0
- package/fesm2015/covalent-core-search.mjs.map +1 -0
- package/fesm2015/covalent-core-side-sheet.mjs +733 -0
- package/fesm2015/covalent-core-side-sheet.mjs.map +1 -0
- package/fesm2015/covalent-core-user-profile.mjs +162 -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 +268 -0
- package/{fesm2015/covalent-core-breadcrumbs.js.map → fesm2020/covalent-core-breadcrumbs.mjs.map} +1 -1
- package/{fesm2015/covalent-core-common.js → fesm2020/covalent-core-common.mjs} +213 -768
- package/fesm2020/covalent-core-common.mjs.map +1 -0
- package/fesm2020/covalent-core-dialogs.mjs +812 -0
- package/fesm2020/covalent-core-dialogs.mjs.map +1 -0
- package/fesm2020/covalent-core-dynamic-menu.mjs +393 -0
- package/fesm2020/covalent-core-dynamic-menu.mjs.map +1 -0
- package/fesm2020/covalent-core-file.mjs +651 -0
- package/fesm2020/covalent-core-file.mjs.map +1 -0
- package/fesm2020/covalent-core-json-formatter.mjs +326 -0
- package/fesm2020/covalent-core-json-formatter.mjs.map +1 -0
- package/fesm2020/covalent-core-layout.mjs +1414 -0
- package/fesm2020/covalent-core-layout.mjs.map +1 -0
- package/fesm2020/covalent-core-menu.mjs +49 -0
- package/fesm2020/covalent-core-menu.mjs.map +1 -0
- package/fesm2020/covalent-core-message.mjs +286 -0
- package/fesm2020/covalent-core-message.mjs.map +1 -0
- package/fesm2020/covalent-core-search.mjs +473 -0
- package/fesm2020/covalent-core-search.mjs.map +1 -0
- package/{fesm2015/covalent-core-side-sheet.js → fesm2020/covalent-core-side-sheet.mjs} +202 -646
- package/fesm2020/covalent-core-side-sheet.mjs.map +1 -0
- package/fesm2020/covalent-core-user-profile.mjs +141 -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 +1 -0
- package/file/covalent-core-file.d.ts +1 -0
- package/file/directives/file-drop.directive.d.ts +3 -0
- package/file/directives/file-select.directive.d.ts +3 -0
- package/file/file-input/file-input.component.d.ts +5 -0
- package/file/file-input/file-input.component.scss +2 -0
- package/file/file-upload/file-upload.component.d.ts +3 -0
- package/file/file-upload/file-upload.component.scss +4 -0
- package/file/file.module.d.ts +13 -0
- package/file/package.json +6 -7
- package/file/services/file.service.d.ts +3 -0
- package/json-formatter/_json-formatter-theme.scss +10 -0
- package/json-formatter/covalent-core-json-formatter.d.ts +1 -0
- package/json-formatter/json-formatter.component.d.ts +3 -0
- package/json-formatter/json-formatter.component.scss +13 -0
- package/json-formatter/json-formatter.module.d.ts +8 -0
- package/json-formatter/package.json +6 -7
- package/layout/_layout-theme.scss +12 -0
- package/layout/covalent-core-layout.d.ts +1 -0
- package/layout/layout-card-over/layout-card-over.component.d.ts +3 -0
- package/layout/layout-card-over/layout-card-over.component.scss +3 -0
- package/layout/layout-footer/layout-footer.component.d.ts +3 -0
- package/layout/layout-manage-list/layout-manage-list.component.d.ts +3 -0
- package/layout/layout-manage-list/layout-manage-list.component.scss +9 -5
- package/layout/layout-manage-list/layout-manage-list.directives.d.ts +7 -0
- package/layout/layout-nav/layout-nav.component.d.ts +3 -0
- package/layout/layout-nav/layout-nav.component.scss +4 -0
- package/layout/layout-nav-list/layout-nav-list.component.d.ts +3 -0
- package/layout/layout-nav-list/layout-nav-list.component.scss +9 -4
- package/layout/layout-nav-list/layout-nav-list.directives.d.ts +7 -0
- package/layout/layout-toggle.class.d.ts +3 -0
- package/layout/layout.component.d.ts +3 -0
- package/layout/layout.component.scss +0 -4
- package/layout/layout.directives.d.ts +7 -0
- package/layout/layout.module.d.ts +23 -0
- package/layout/navigation-drawer/navigation-drawer.component.d.ts +7 -0
- package/layout/navigation-drawer/navigation-drawer.component.scss +8 -0
- package/layout/package.json +6 -7
- package/menu/covalent-core-menu.d.ts +1 -0
- package/menu/menu.component.d.ts +3 -0
- package/menu/menu.component.scss +9 -1
- package/menu/menu.module.d.ts +8 -0
- package/menu/package.json +6 -7
- package/message/_message-theme.scss +3 -0
- package/message/covalent-core-message.d.ts +1 -0
- package/message/message.component.d.ts +5 -0
- package/message/message.component.scss +3 -0
- package/message/message.module.d.ts +7 -0
- package/message/package.json +6 -7
- package/package.json +126 -15
- package/search/covalent-core-search.d.ts +1 -0
- package/search/package.json +6 -7
- package/search/search-box/search-box.component.d.ts +3 -0
- package/search/search-box/search-box.component.scss +5 -0
- package/search/search-input/search-input.component.d.ts +3 -0
- package/search/search-input/search-input.component.scss +12 -0
- package/search/search.module.d.ts +11 -0
- package/side-sheet/covalent-core-side-sheet.d.ts +1 -2
- package/side-sheet/package.json +6 -7
- package/side-sheet/side-sheet-container.d.ts +5 -0
- package/side-sheet/side-sheet.content-directives.d.ts +11 -0
- package/side-sheet/side-sheet.d.ts +5 -0
- package/side-sheet/side-sheet.module.d.ts +9 -0
- package/side-sheet/side-sheet.scss +1 -2
- package/theming/prebuilt/blue-grey-deep-orange.css +1714 -1333
- package/theming/prebuilt/blue-grey-deep-orange.css.map +1 -1
- package/theming/prebuilt/blue-grey-deep-orange.scss +15 -8
- package/theming/prebuilt/blue-orange.css +1714 -1333
- package/theming/prebuilt/blue-orange.css.map +1 -1
- package/theming/prebuilt/blue-orange.scss +15 -8
- package/theming/prebuilt/indigo-pink.css +1714 -1333
- package/theming/prebuilt/indigo-pink.css.map +1 -1
- package/theming/prebuilt/indigo-pink.scss +15 -8
- package/theming/prebuilt/orange-light-blue.css +1714 -1333
- package/theming/prebuilt/orange-light-blue.css.map +1 -1
- package/theming/prebuilt/orange-light-blue.scss +15 -8
- package/theming/prebuilt/teal-orange.css +1714 -1333
- package/theming/prebuilt/teal-orange.css.map +1 -1
- package/theming/prebuilt/teal-orange.scss +15 -8
- package/user-profile/covalent-core-user-profile.d.ts +1 -0
- package/user-profile/package.json +6 -7
- package/user-profile/user-profile-menu/user-profile-menu.component.d.ts +3 -0
- package/user-profile/user-profile-menu/user-profile-menu.component.scss +3 -0
- package/user-profile/user-profile.component.d.ts +3 -0
- package/user-profile/user-profile.module.d.ts +12 -0
- package/breadcrumbs/covalent-core-breadcrumbs.metadata.json +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/covalent-core.metadata.json +0 -1
- package/dialogs/covalent-core-dialogs.metadata.json +0 -1
- package/dynamic-menu/covalent-core-dynamic-menu.metadata.json +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/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-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.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/json-formatter/covalent-core-json-formatter.metadata.json +0 -1
- package/layout/covalent-core-layout.metadata.json +0 -1
- package/menu/covalent-core-menu.metadata.json +0 -1
- package/message/covalent-core-message.metadata.json +0 -1
- 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/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/side-sheet/covalent-core-side-sheet.metadata.json +0 -1
- package/user-profile/covalent-core-user-profile.metadata.json +0 -1
@@ -1,25 +1,20 @@
|
|
1
|
-
import
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { EventEmitter, Directive, Optional, Inject, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Injector, TemplateRef, InjectFlags, Injectable, SkipSelf, Input, NgModule } from '@angular/core';
|
3
|
+
import * as i3 from '@angular/cdk/portal';
|
2
4
|
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
3
5
|
import { AnimationDurations, AnimationCurves, MatCommonModule } from '@angular/material/core';
|
4
6
|
import { MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule } from '@angular/material/dialog';
|
5
|
-
import
|
6
|
-
import {
|
7
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
8
|
+
import { OverlayConfig } from '@angular/cdk/overlay';
|
9
|
+
import * as i1 from '@angular/cdk/a11y';
|
7
10
|
import { DOCUMENT } from '@angular/common';
|
8
11
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
9
12
|
import { Subject, of } from 'rxjs';
|
10
13
|
import { filter, take } from 'rxjs/operators';
|
11
14
|
import { Directionality } from '@angular/cdk/bidi';
|
12
15
|
|
13
|
-
/**
|
14
|
-
* @fileoverview added by tsickle
|
15
|
-
* Generated from: side-sheet.animation.ts
|
16
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
17
|
-
*/
|
18
|
-
/** @type {?} */
|
19
16
|
const tdSideSheetAnimations = {
|
20
|
-
/**
|
21
|
-
* Animation that is applied on the side-sheet container by default.
|
22
|
-
*/
|
17
|
+
/** Animation that is applied on the side-sheet container by default. */
|
23
18
|
sideSheetContainer: trigger('sideSheetContainer', [
|
24
19
|
state('void, exit', style({ transform: 'translateX(100%)' })),
|
25
20
|
state('enter', style({ transform: 'translateX(0%)', opacity: 1 })),
|
@@ -28,31 +23,14 @@ const tdSideSheetAnimations = {
|
|
28
23
|
]),
|
29
24
|
};
|
30
25
|
|
31
|
-
/**
|
32
|
-
* @fileoverview added by tsickle
|
33
|
-
* Generated from: side-sheet.config.ts
|
34
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
35
|
-
*/
|
36
|
-
/**
|
37
|
-
* @template D
|
38
|
-
*/
|
39
26
|
class CovalentSideSheetConfig extends MatDialogConfig {
|
40
27
|
}
|
41
28
|
|
42
|
-
|
43
|
-
* @fileoverview added by tsickle
|
44
|
-
* Generated from: side-sheet-container.ts
|
45
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
46
|
-
*/
|
47
|
-
/**
|
48
|
-
* @return {?}
|
49
|
-
*/
|
29
|
+
function CovalentSideSheetContainer_ng_template_0_Template(rf, ctx) { }
|
50
30
|
function _getFocusedElementPierceShadowDom() {
|
51
|
-
|
52
|
-
let activeElement = typeof document !== 'undefined' && document ? ((/** @type {?} */ (document.activeElement))) : null;
|
31
|
+
let activeElement = typeof document !== 'undefined' && document ? document.activeElement : null;
|
53
32
|
while (activeElement && activeElement.shadowRoot) {
|
54
|
-
|
55
|
-
const newActiveElement = (/** @type {?} */ (activeElement.shadowRoot.activeElement));
|
33
|
+
const newActiveElement = activeElement.shadowRoot.activeElement;
|
56
34
|
if (newActiveElement === activeElement) {
|
57
35
|
break;
|
58
36
|
}
|
@@ -65,31 +43,20 @@ function _getFocusedElementPierceShadowDom() {
|
|
65
43
|
/**
|
66
44
|
* Base class for the `CovalentSideSheetContainer`. The base class does not implement
|
67
45
|
* animations as these are left to implementers of the side-sheet container.
|
68
|
-
* @abstract
|
69
46
|
*/
|
70
47
|
class _CovalentSideSheetContainerBase extends BasePortalOutlet {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
* @param {?} _changeDetectorRef
|
75
|
-
* @param {?} _document
|
76
|
-
* @param {?} _config
|
77
|
-
* @param {?=} _focusMonitor
|
78
|
-
*/
|
79
|
-
constructor(_elementRef, _focusTrapFactory, _changeDetectorRef, _document, _config, _focusMonitor) {
|
48
|
+
constructor(_elementRef, _focusTrapFactory, _changeDetectorRef, _document,
|
49
|
+
/** The side-sheet configuration. */
|
50
|
+
_config, _focusMonitor) {
|
80
51
|
super();
|
81
52
|
this._elementRef = _elementRef;
|
82
53
|
this._focusTrapFactory = _focusTrapFactory;
|
83
54
|
this._changeDetectorRef = _changeDetectorRef;
|
84
55
|
this._config = _config;
|
85
56
|
this._focusMonitor = _focusMonitor;
|
86
|
-
/**
|
87
|
-
* Emits when an animation state changes.
|
88
|
-
*/
|
57
|
+
/** Emits when an animation state changes. */
|
89
58
|
this._animationStateChanged = new EventEmitter();
|
90
|
-
/**
|
91
|
-
* Element that was focused before the side-sheet was opened. Save this to restore upon close.
|
92
|
-
*/
|
59
|
+
/** Element that was focused before the side-sheet was opened. Save this to restore upon close. */
|
93
60
|
this._elementFocusedBeforeSideSheetWasOpened = null;
|
94
61
|
/**
|
95
62
|
* Type of interaction that led to the side-sheet being closed. This is used to determine
|
@@ -102,20 +69,13 @@ class _CovalentSideSheetContainerBase extends BasePortalOutlet {
|
|
102
69
|
* @param portal Portal to be attached.
|
103
70
|
* @deprecated To be turned into a method.
|
104
71
|
*/
|
105
|
-
this.attachDomPortal = (
|
106
|
-
* @param {?} portal
|
107
|
-
* @return {?}
|
108
|
-
*/
|
109
|
-
(portal) => {
|
72
|
+
this.attachDomPortal = (portal) => {
|
110
73
|
return this._portalOutlet.attachDomPortal(portal);
|
111
|
-
}
|
74
|
+
};
|
112
75
|
this._ariaLabelledBy = _config.ariaLabelledBy || null;
|
113
76
|
this._document = _document;
|
114
77
|
}
|
115
|
-
/**
|
116
|
-
* Initializes the side-sheet container with the attached content.
|
117
|
-
* @return {?}
|
118
|
-
*/
|
78
|
+
/** Initializes the side-sheet container with the attached content. */
|
119
79
|
_initializeWithAttachedContent() {
|
120
80
|
this._setupFocusTrap();
|
121
81
|
// Save the previously focused element. This element will be re-focused
|
@@ -124,26 +84,19 @@ class _CovalentSideSheetContainerBase extends BasePortalOutlet {
|
|
124
84
|
}
|
125
85
|
/**
|
126
86
|
* Attach a ComponentPortal as content to this side-sheet container.
|
127
|
-
* @
|
128
|
-
* @param {?} portal Portal to be attached as the side-sheet content.
|
129
|
-
* @return {?}
|
87
|
+
* @param portal Portal to be attached as the side-sheet content.
|
130
88
|
*/
|
131
89
|
attachComponentPortal(portal) {
|
132
90
|
return this._portalOutlet.attachComponentPortal(portal);
|
133
91
|
}
|
134
92
|
/**
|
135
93
|
* Attach a TemplatePortal as content to this side-sheet container.
|
136
|
-
* @
|
137
|
-
* @param {?} portal Portal to be attached as the side-sheet content.
|
138
|
-
* @return {?}
|
94
|
+
* @param portal Portal to be attached as the side-sheet content.
|
139
95
|
*/
|
140
96
|
attachTemplatePortal(portal) {
|
141
97
|
return this._portalOutlet.attachTemplatePortal(portal);
|
142
98
|
}
|
143
|
-
/**
|
144
|
-
* Moves focus back into the side-sheet if it was moved out.
|
145
|
-
* @return {?}
|
146
|
-
*/
|
99
|
+
/** Moves focus back into the side-sheet if it was moved out. */
|
147
100
|
_recaptureFocus() {
|
148
101
|
if (!this._containsFocus()) {
|
149
102
|
this._trapFocus();
|
@@ -152,11 +105,8 @@ class _CovalentSideSheetContainerBase extends BasePortalOutlet {
|
|
152
105
|
/**
|
153
106
|
* Moves the focus inside the focus trap. When autoFocus is not set to 'side-sheet', if focus
|
154
107
|
* cannot be moved then focus will go to the side-sheet container.
|
155
|
-
* @protected
|
156
|
-
* @return {?}
|
157
108
|
*/
|
158
109
|
_trapFocus() {
|
159
|
-
/** @type {?} */
|
160
110
|
const element = this._elementRef.nativeElement;
|
161
111
|
if (!this._config.autoFocus) {
|
162
112
|
if (!this._containsFocus()) {
|
@@ -164,32 +114,21 @@ class _CovalentSideSheetContainerBase extends BasePortalOutlet {
|
|
164
114
|
}
|
165
115
|
}
|
166
116
|
else {
|
167
|
-
this._focusTrap.focusInitialElementWhenReady().then((
|
168
|
-
* @param {?} focusedSuccessfully
|
169
|
-
* @return {?}
|
170
|
-
*/
|
171
|
-
(focusedSuccessfully) => {
|
117
|
+
this._focusTrap.focusInitialElementWhenReady().then((focusedSuccessfully) => {
|
172
118
|
// If we weren't able to find a focusable element in the side-sheet, then focus the side-sheet
|
173
119
|
// container instead.
|
174
120
|
if (!focusedSuccessfully) {
|
175
121
|
this._focusSideSheetContainer();
|
176
122
|
}
|
177
|
-
})
|
123
|
+
});
|
178
124
|
}
|
179
125
|
}
|
180
|
-
/**
|
181
|
-
* Restores focus to the element that was focused before the side-sheet opened.
|
182
|
-
* @protected
|
183
|
-
* @return {?}
|
184
|
-
*/
|
126
|
+
/** Restores focus to the element that was focused before the side-sheet opened. */
|
185
127
|
_restoreFocus() {
|
186
|
-
/** @type {?} */
|
187
128
|
const previousElement = this._elementFocusedBeforeSideSheetWasOpened;
|
188
129
|
// We need the extra check, because IE can set the `activeElement` to null in some cases.
|
189
130
|
if (this._config.restoreFocus && previousElement && typeof previousElement.focus === 'function') {
|
190
|
-
/** @type {?} */
|
191
131
|
const activeElement = _getFocusedElementPierceShadowDom();
|
192
|
-
/** @type {?} */
|
193
132
|
const element = this._elementRef.nativeElement;
|
194
133
|
// Make sure that focus is still inside the side-sheet or is on the body (usually because a
|
195
134
|
// non-focusable element like the backdrop was clicked) before moving it. It's possible that
|
@@ -212,147 +151,48 @@ class _CovalentSideSheetContainerBase extends BasePortalOutlet {
|
|
212
151
|
this._focusTrap.destroy();
|
213
152
|
}
|
214
153
|
}
|
215
|
-
/**
|
216
|
-
* Sets up the focus trap.
|
217
|
-
* @private
|
218
|
-
* @return {?}
|
219
|
-
*/
|
154
|
+
/** Sets up the focus trap. */
|
220
155
|
_setupFocusTrap() {
|
221
156
|
this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
|
222
157
|
}
|
223
|
-
/**
|
224
|
-
* Captures the element that was focused before the side-sheet was opened.
|
225
|
-
* @private
|
226
|
-
* @return {?}
|
227
|
-
*/
|
158
|
+
/** Captures the element that was focused before the side-sheet was opened. */
|
228
159
|
_capturePreviouslyFocusedElement() {
|
229
160
|
if (this._document) {
|
230
161
|
this._elementFocusedBeforeSideSheetWasOpened = _getFocusedElementPierceShadowDom();
|
231
162
|
}
|
232
163
|
}
|
233
|
-
/**
|
234
|
-
* Focuses the side-sheet container.
|
235
|
-
* @private
|
236
|
-
* @return {?}
|
237
|
-
*/
|
164
|
+
/** Focuses the side-sheet container. */
|
238
165
|
_focusSideSheetContainer() {
|
239
166
|
// Note that there is no focus method when rendering on the server.
|
240
167
|
if (this._elementRef.nativeElement.focus) {
|
241
168
|
this._elementRef.nativeElement.focus();
|
242
169
|
}
|
243
170
|
}
|
244
|
-
/**
|
245
|
-
* Returns whether focus is inside the side-sheet.
|
246
|
-
* @private
|
247
|
-
* @return {?}
|
248
|
-
*/
|
171
|
+
/** Returns whether focus is inside the side-sheet. */
|
249
172
|
_containsFocus() {
|
250
|
-
/** @type {?} */
|
251
173
|
const element = this._elementRef.nativeElement;
|
252
|
-
/** @type {?} */
|
253
174
|
const activeElement = _getFocusedElementPierceShadowDom();
|
254
175
|
return element === activeElement || element.contains(activeElement);
|
255
176
|
}
|
256
177
|
}
|
257
|
-
_CovalentSideSheetContainerBase
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
{ type:
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
};
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
* @protected
|
276
|
-
*/
|
277
|
-
_CovalentSideSheetContainerBase.prototype._document;
|
278
|
-
/**
|
279
|
-
* The portal outlet inside of this container into which the side-sheet content will be loaded.
|
280
|
-
* @type {?}
|
281
|
-
*/
|
282
|
-
_CovalentSideSheetContainerBase.prototype._portalOutlet;
|
283
|
-
/**
|
284
|
-
* The class that traps and manages focus within the side-sheet.
|
285
|
-
* @type {?}
|
286
|
-
* @private
|
287
|
-
*/
|
288
|
-
_CovalentSideSheetContainerBase.prototype._focusTrap;
|
289
|
-
/**
|
290
|
-
* Emits when an animation state changes.
|
291
|
-
* @type {?}
|
292
|
-
*/
|
293
|
-
_CovalentSideSheetContainerBase.prototype._animationStateChanged;
|
294
|
-
/**
|
295
|
-
* Element that was focused before the side-sheet was opened. Save this to restore upon close.
|
296
|
-
* @type {?}
|
297
|
-
* @private
|
298
|
-
*/
|
299
|
-
_CovalentSideSheetContainerBase.prototype._elementFocusedBeforeSideSheetWasOpened;
|
300
|
-
/**
|
301
|
-
* Type of interaction that led to the side-sheet being closed. This is used to determine
|
302
|
-
* whether the focus style will be applied when returning focus to its original location
|
303
|
-
* after the side-sheet is closed.
|
304
|
-
* @type {?}
|
305
|
-
*/
|
306
|
-
_CovalentSideSheetContainerBase.prototype._closeInteractionType;
|
307
|
-
/**
|
308
|
-
* ID of the element that should be considered as the side-sheet's label.
|
309
|
-
* @type {?}
|
310
|
-
*/
|
311
|
-
_CovalentSideSheetContainerBase.prototype._ariaLabelledBy;
|
312
|
-
/**
|
313
|
-
* ID for the container DOM element.
|
314
|
-
* @type {?}
|
315
|
-
*/
|
316
|
-
_CovalentSideSheetContainerBase.prototype._id;
|
317
|
-
/**
|
318
|
-
* Attaches a DOM portal to the side-sheet container.
|
319
|
-
* \@param portal Portal to be attached.
|
320
|
-
* @deprecated To be turned into a method.
|
321
|
-
* @type {?}
|
322
|
-
*/
|
323
|
-
_CovalentSideSheetContainerBase.prototype.attachDomPortal;
|
324
|
-
/**
|
325
|
-
* @type {?}
|
326
|
-
* @protected
|
327
|
-
*/
|
328
|
-
_CovalentSideSheetContainerBase.prototype._elementRef;
|
329
|
-
/**
|
330
|
-
* @type {?}
|
331
|
-
* @protected
|
332
|
-
*/
|
333
|
-
_CovalentSideSheetContainerBase.prototype._focusTrapFactory;
|
334
|
-
/**
|
335
|
-
* @type {?}
|
336
|
-
* @protected
|
337
|
-
*/
|
338
|
-
_CovalentSideSheetContainerBase.prototype._changeDetectorRef;
|
339
|
-
/**
|
340
|
-
* The side-sheet configuration.
|
341
|
-
* @type {?}
|
342
|
-
*/
|
343
|
-
_CovalentSideSheetContainerBase.prototype._config;
|
344
|
-
/**
|
345
|
-
* @type {?}
|
346
|
-
* @private
|
347
|
-
*/
|
348
|
-
_CovalentSideSheetContainerBase.prototype._focusMonitor;
|
349
|
-
/**
|
350
|
-
* Starts the side-sheet exit animation.
|
351
|
-
* @abstract
|
352
|
-
* @return {?}
|
353
|
-
*/
|
354
|
-
_CovalentSideSheetContainerBase.prototype._startExitAnimation = function () { };
|
355
|
-
}
|
178
|
+
/** @nocollapse */ /** @nocollapse */ _CovalentSideSheetContainerBase.ɵfac = function _CovalentSideSheetContainerBase_Factory(t) { return new (t || _CovalentSideSheetContainerBase)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.FocusTrapFactory), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(DOCUMENT, 8), i0.ɵɵdirectiveInject(CovalentSideSheetConfig), i0.ɵɵdirectiveInject(i1.FocusMonitor)); };
|
179
|
+
/** @nocollapse */ /** @nocollapse */ _CovalentSideSheetContainerBase.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: _CovalentSideSheetContainerBase, viewQuery: function _CovalentSideSheetContainerBase_Query(rf, ctx) { if (rf & 1) {
|
180
|
+
i0.ɵɵviewQuery(CdkPortalOutlet, 7);
|
181
|
+
} if (rf & 2) {
|
182
|
+
let _t;
|
183
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._portalOutlet = _t.first);
|
184
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature] });
|
185
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(_CovalentSideSheetContainerBase, [{
|
186
|
+
type: Directive
|
187
|
+
}], function () { return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
188
|
+
type: Optional
|
189
|
+
}, {
|
190
|
+
type: Inject,
|
191
|
+
args: [DOCUMENT]
|
192
|
+
}] }, { type: CovalentSideSheetConfig }, { type: i1.FocusMonitor }]; }, { _portalOutlet: [{
|
193
|
+
type: ViewChild,
|
194
|
+
args: [CdkPortalOutlet, { static: true }]
|
195
|
+
}] }); })();
|
356
196
|
/**
|
357
197
|
* Internal component that wraps the generated side-sheet content.
|
358
198
|
* This animation below is the only reason for duplicating most of the Material dialog code
|
@@ -360,16 +200,10 @@ if (false) {
|
|
360
200
|
class CovalentSideSheetContainer extends _CovalentSideSheetContainerBase {
|
361
201
|
constructor() {
|
362
202
|
super(...arguments);
|
363
|
-
/**
|
364
|
-
* State of the side-sheet animation.
|
365
|
-
*/
|
203
|
+
/** State of the side-sheet animation. */
|
366
204
|
this._state = 'enter';
|
367
205
|
}
|
368
|
-
/**
|
369
|
-
* Callback, invoked whenever an animation on the host completes.
|
370
|
-
* @param {?} __0
|
371
|
-
* @return {?}
|
372
|
-
*/
|
206
|
+
/** Callback, invoked whenever an animation on the host completes. */
|
373
207
|
_onAnimationDone({ toState, totalTime }) {
|
374
208
|
if (toState === 'enter') {
|
375
209
|
this._trapFocus();
|
@@ -380,11 +214,7 @@ class CovalentSideSheetContainer extends _CovalentSideSheetContainerBase {
|
|
380
214
|
this._animationStateChanged.next({ state: 'closed', totalTime });
|
381
215
|
}
|
382
216
|
}
|
383
|
-
/**
|
384
|
-
* Callback, invoked when an animation on the host starts.
|
385
|
-
* @param {?} __0
|
386
|
-
* @return {?}
|
387
|
-
*/
|
217
|
+
/** Callback, invoked when an animation on the host starts. */
|
388
218
|
_onAnimationStart({ toState, totalTime }) {
|
389
219
|
if (toState === 'enter') {
|
390
220
|
this._animationStateChanged.next({ state: 'opening', totalTime });
|
@@ -393,25 +223,27 @@ class CovalentSideSheetContainer extends _CovalentSideSheetContainerBase {
|
|
393
223
|
this._animationStateChanged.next({ state: 'closing', totalTime });
|
394
224
|
}
|
395
225
|
}
|
396
|
-
/**
|
397
|
-
* Starts the side-sheet exit animation.
|
398
|
-
* @return {?}
|
399
|
-
*/
|
226
|
+
/** Starts the side-sheet exit animation. */
|
400
227
|
_startExitAnimation() {
|
401
228
|
this._state = 'exit';
|
402
229
|
this._changeDetectorRef.markForCheck();
|
403
230
|
}
|
404
231
|
}
|
405
|
-
CovalentSideSheetContainer
|
406
|
-
|
407
|
-
|
408
|
-
|
232
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetContainer.ɵfac = /** @pureOrBreakMyCode */ function () { let ɵCovalentSideSheetContainer_BaseFactory; return function CovalentSideSheetContainer_Factory(t) { return (ɵCovalentSideSheetContainer_BaseFactory || (ɵCovalentSideSheetContainer_BaseFactory = i0.ɵɵgetInheritedFactory(CovalentSideSheetContainer)))(t || CovalentSideSheetContainer); }; }();
|
233
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetContainer.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: CovalentSideSheetContainer, selectors: [["td-side-sheet-container"]], hostAttrs: ["tabindex", "-1", "aria-modal", "true", 1, "td-side-sheet-container"], hostVars: 6, hostBindings: function CovalentSideSheetContainer_HostBindings(rf, ctx) { if (rf & 1) {
|
234
|
+
i0.ɵɵsyntheticHostListener("@sideSheetContainer.start", function CovalentSideSheetContainer_animation_sideSheetContainer_start_HostBindingHandler($event) { return ctx._onAnimationStart($event); })("@sideSheetContainer.done", function CovalentSideSheetContainer_animation_sideSheetContainer_done_HostBindingHandler($event) { return ctx._onAnimationDone($event); });
|
235
|
+
} if (rf & 2) {
|
236
|
+
i0.ɵɵhostProperty("id", ctx._id);
|
237
|
+
i0.ɵɵattribute("role", ctx._config.role)("aria-labelledby", ctx._config.ariaLabel ? null : ctx._ariaLabelledBy)("aria-label", ctx._config.ariaLabel)("aria-describedby", ctx._config.ariaDescribedBy || null);
|
238
|
+
i0.ɵɵsyntheticHostProperty("@sideSheetContainer", ctx._state);
|
239
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 0, consts: [["cdkPortalOutlet", ""]], template: function CovalentSideSheetContainer_Template(rf, ctx) { if (rf & 1) {
|
240
|
+
i0.ɵɵtemplate(0, CovalentSideSheetContainer_ng_template_0_Template, 0, 0, "ng-template", 0);
|
241
|
+
} }, directives: [i3.CdkPortalOutlet], styles: [".td-side-sheet-container{background-color:#fff;box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12);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:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.td-side-sheet-content{margin:0 -24px;padding:0 24px;overflow:auto;-ms-flex:1;flex:1;-webkit-overflow-scrolling:touch}.td-side-sheet-title{margin:-16px 0 20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.td-side-sheet-actions{padding:8px 0;margin:0 -16px -24px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;box-sizing:content-box}.td-side-sheet-actions[align=end]{-ms-flex-pack:end;justify-content:flex-end}.td-side-sheet-actions[align=center]{-ms-flex-pack: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"], encapsulation: 2, data: { animation: [tdSideSheetAnimations.sideSheetContainer] } });
|
242
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentSideSheetContainer, [{
|
243
|
+
type: Component,
|
244
|
+
args: [{ selector: 'td-side-sheet-container', template: `
|
409
245
|
<ng-template cdkPortalOutlet></ng-template>
|
410
|
-
`,
|
411
|
-
encapsulation: ViewEncapsulation.None,
|
412
|
-
changeDetection: ChangeDetectionStrategy.Default,
|
413
|
-
animations: [tdSideSheetAnimations.sideSheetContainer],
|
414
|
-
host: {
|
246
|
+
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [tdSideSheetAnimations.sideSheetContainer], host: {
|
415
247
|
'class': 'td-side-sheet-container',
|
416
248
|
'tabindex': '-1',
|
417
249
|
'aria-modal': 'true',
|
@@ -423,36 +255,13 @@ CovalentSideSheetContainer.decorators = [
|
|
423
255
|
'[@sideSheetContainer]': '_state',
|
424
256
|
'(@sideSheetContainer.start)': '_onAnimationStart($event)',
|
425
257
|
'(@sideSheetContainer.done)': '_onAnimationDone($event)',
|
426
|
-
},
|
427
|
-
|
428
|
-
}] }
|
429
|
-
];
|
430
|
-
if (false) {
|
431
|
-
/**
|
432
|
-
* State of the side-sheet animation.
|
433
|
-
* @type {?}
|
434
|
-
*/
|
435
|
-
CovalentSideSheetContainer.prototype._state;
|
436
|
-
}
|
258
|
+
}, styles: [".td-side-sheet-container{background-color:#fff;box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12);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:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.td-side-sheet-content{margin:0 -24px;padding:0 24px;overflow:auto;-ms-flex:1;flex:1;-webkit-overflow-scrolling:touch}.td-side-sheet-title{margin:-16px 0 20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.td-side-sheet-actions{padding:8px 0;margin:0 -16px -24px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;box-sizing:content-box}.td-side-sheet-actions[align=end]{-ms-flex-pack:end;justify-content:flex-end}.td-side-sheet-actions[align=center]{-ms-flex-pack: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"] }]
|
259
|
+
}], null, null); })();
|
437
260
|
|
438
|
-
/**
|
439
|
-
* @fileoverview added by tsickle
|
440
|
-
* Generated from: side-sheet-ref.ts
|
441
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
442
|
-
*/
|
443
261
|
// Counter for unique dialog ids.
|
444
|
-
/** @type {?} */
|
445
262
|
let uniqueId = 0;
|
446
263
|
// Create a new side sheet ref to change the id of the ref
|
447
|
-
/**
|
448
|
-
* @template T, R
|
449
|
-
*/
|
450
264
|
class CovalentSideSheetRef extends MatDialogRef {
|
451
|
-
/**
|
452
|
-
* @param {?} overlayRef
|
453
|
-
* @param {?} _containerInstance
|
454
|
-
* @param {?=} id
|
455
|
-
*/
|
456
265
|
constructor(overlayRef, _containerInstance, id = `td-side-sheet-${uniqueId++}`) {
|
457
266
|
super(overlayRef, _containerInstance, id);
|
458
267
|
this.overlayRef = overlayRef;
|
@@ -460,21 +269,6 @@ class CovalentSideSheetRef extends MatDialogRef {
|
|
460
269
|
this.id = id;
|
461
270
|
}
|
462
271
|
}
|
463
|
-
if (false) {
|
464
|
-
/** @type {?} */
|
465
|
-
CovalentSideSheetRef.prototype.overlayRef;
|
466
|
-
/** @type {?} */
|
467
|
-
CovalentSideSheetRef.prototype._containerInstance;
|
468
|
-
/** @type {?} */
|
469
|
-
CovalentSideSheetRef.prototype.id;
|
470
|
-
}
|
471
|
-
/**
|
472
|
-
* @template R
|
473
|
-
* @param {?} ref
|
474
|
-
* @param {?} interactionType
|
475
|
-
* @param {?=} result
|
476
|
-
* @return {?}
|
477
|
-
*/
|
478
272
|
function _closeSideSheetVia(ref, interactionType, result) {
|
479
273
|
// Some mock dialog ref instances in tests do not have the `_containerInstance` property.
|
480
274
|
// For those, we keep the behavior as is and do not deal with the interaction type.
|
@@ -484,24 +278,8 @@ function _closeSideSheetVia(ref, interactionType, result) {
|
|
484
278
|
return ref.close(result);
|
485
279
|
}
|
486
280
|
|
487
|
-
|
488
|
-
* @fileoverview added by tsickle
|
489
|
-
* Generated from: side-sheet.ts
|
490
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
491
|
-
*/
|
492
|
-
/**
|
493
|
-
* @template C
|
494
|
-
*/
|
281
|
+
/* tslint:disable */
|
495
282
|
class _CovalentSideSheetBase {
|
496
|
-
/**
|
497
|
-
* @param {?} _overlay
|
498
|
-
* @param {?} _injector
|
499
|
-
* @param {?} _defaultOptions
|
500
|
-
* @param {?} _parentSideSheet
|
501
|
-
* @param {?} _sideSheetRefConstructor
|
502
|
-
* @param {?} _sideSheetContainerType
|
503
|
-
* @param {?} _sideSheetDataToken
|
504
|
-
*/
|
505
283
|
constructor(_overlay, _injector, _defaultOptions, _parentSideSheet, _sideSheetRefConstructor, _sideSheetContainerType, _sideSheetDataToken) {
|
506
284
|
this._overlay = _overlay;
|
507
285
|
this._injector = _injector;
|
@@ -518,67 +296,40 @@ class _CovalentSideSheetBase {
|
|
518
296
|
maxWidth: '100vw',
|
519
297
|
};
|
520
298
|
}
|
521
|
-
/**
|
522
|
-
* Keeps track of the currently-open side-sheets.
|
523
|
-
* @return {?}
|
524
|
-
*/
|
299
|
+
/** Keeps track of the currently-open side-sheets. */
|
525
300
|
get openSideSheets() {
|
526
301
|
return this._parentSideSheet ? this._parentSideSheet.openSideSheets : this._openSideSheetsAtThisLevel;
|
527
302
|
}
|
528
|
-
/**
|
529
|
-
* @template T, D, R
|
530
|
-
* @param {?} componentOrTemplateRef
|
531
|
-
* @param {?=} config
|
532
|
-
* @return {?}
|
533
|
-
*/
|
534
303
|
open(componentOrTemplateRef, config) {
|
535
|
-
config =
|
536
|
-
/** @type {?} */
|
304
|
+
config = { ...(this._defaultOptions || new CovalentSideSheetConfig()), ...this.defaultSidebarConfig, ...config };
|
537
305
|
const overlayRef = this._createOverlay(config);
|
538
|
-
/** @type {?} */
|
539
306
|
const sideSheetContainer = this._attachSideSheetContainer(overlayRef, config);
|
540
|
-
/** @type {?} */
|
541
307
|
const sideSheetRef = this._attachSideSheetContent(componentOrTemplateRef, sideSheetContainer, overlayRef, config);
|
542
|
-
/** @type {?} */
|
543
308
|
const prevSideSheetRef = this.openSideSheets.slice(-1)[0];
|
544
|
-
|
545
|
-
const prevOverlayRef = prevSideSheetRef === null || prevSideSheetRef === void 0 ? void 0 : prevSideSheetRef.overlayRef;
|
309
|
+
const prevOverlayRef = prevSideSheetRef?.overlayRef;
|
546
310
|
// Animate previous side sheet to full width
|
547
|
-
if (prevOverlayRef
|
311
|
+
if (prevOverlayRef?.overlayElement) {
|
548
312
|
prevOverlayRef.overlayElement.style.transition = `${AnimationDurations.COMPLEX} ${AnimationCurves.DECELERATION_CURVE}`;
|
549
|
-
prevOverlayRef.overlayElement.style.minWidth = `${
|
313
|
+
prevOverlayRef.overlayElement.style.minWidth = `${window.innerWidth}px`;
|
550
314
|
}
|
551
315
|
// Revert the previous side sheet config & size
|
552
316
|
sideSheetRef._containerInstance._animationStateChanged
|
553
|
-
.pipe(filter((
|
554
|
-
|
555
|
-
* @return {?}
|
556
|
-
*/
|
557
|
-
(event) => event.state === 'closing' && !!(prevSideSheetRef && prevOverlayRef))), take(1))
|
558
|
-
.subscribe((/**
|
559
|
-
* @return {?}
|
560
|
-
*/
|
561
|
-
() => {
|
317
|
+
.pipe(filter((event) => event.state === 'closing' && !!(prevSideSheetRef && prevOverlayRef)), take(1))
|
318
|
+
.subscribe(() => {
|
562
319
|
prevOverlayRef.overlayElement.style.transition = `${AnimationDurations.EXITING} ${AnimationCurves.DECELERATION_CURVE}`;
|
563
320
|
prevSideSheetRef.updateSize();
|
564
|
-
})
|
321
|
+
});
|
565
322
|
// Add new side sheet to open list
|
566
323
|
this.openSideSheets.push(sideSheetRef);
|
567
324
|
// Remove side sheet ref after closed
|
568
325
|
sideSheetRef
|
569
326
|
.afterClosed()
|
570
327
|
.pipe(take(1))
|
571
|
-
.subscribe((
|
572
|
-
* @return {?}
|
573
|
-
*/
|
574
|
-
() => this._removeOpenSideSheet(sideSheetRef)));
|
328
|
+
.subscribe(() => this._removeOpenSideSheet(sideSheetRef));
|
575
329
|
// Notify the side-sheet container that the content has been attached.
|
576
330
|
sideSheetContainer._initializeWithAttachedContent();
|
577
331
|
return sideSheetRef;
|
578
332
|
}
|
579
|
-
/**
|
580
|
-
* @return {?}
|
581
|
-
*/
|
582
333
|
ngOnDestroy() {
|
583
334
|
// Only close the side-sheets at this level on destroy
|
584
335
|
// since the parent service may still be active.
|
@@ -592,19 +343,11 @@ class _CovalentSideSheetBase {
|
|
592
343
|
}
|
593
344
|
/**
|
594
345
|
* Closes all of the currently-open side-sheets.
|
595
|
-
* @return {?}
|
596
346
|
*/
|
597
347
|
closeAll() {
|
598
348
|
this._closeSideSheets(this.openSideSheets);
|
599
349
|
}
|
600
|
-
/**
|
601
|
-
* @private
|
602
|
-
* @template T
|
603
|
-
* @param {?} config
|
604
|
-
* @return {?}
|
605
|
-
*/
|
606
350
|
_createOverlay(config) {
|
607
|
-
/** @type {?} */
|
608
351
|
const overlayConfig = new OverlayConfig({
|
609
352
|
positionStrategy: this._overlay.position().global(),
|
610
353
|
scrollStrategy: this._overlay.scrollStrategies.block(),
|
@@ -615,82 +358,60 @@ class _CovalentSideSheetBase {
|
|
615
358
|
minHeight: config.minHeight,
|
616
359
|
maxWidth: config.maxWidth,
|
617
360
|
});
|
618
|
-
/** @type {?} */
|
619
361
|
const overlayRef = this._overlay.create(overlayConfig);
|
620
|
-
|
621
|
-
const positionStrategy = (/** @type {?} */ (overlayRef.getConfig().positionStrategy));
|
362
|
+
const positionStrategy = overlayRef.getConfig().positionStrategy;
|
622
363
|
positionStrategy.right('0px');
|
623
364
|
return overlayRef;
|
624
365
|
}
|
625
366
|
/**
|
626
367
|
* Attaches a container to a side-sheets's already-created overlay.
|
627
|
-
* @
|
628
|
-
* @param
|
629
|
-
* @
|
630
|
-
* @return {?} A promise resolving to a ComponentRef for the attached container.
|
368
|
+
* @param overlay Reference to the side-sheet's underlying overlay.
|
369
|
+
* @param config The side-sheet configuration.
|
370
|
+
* @returns A promise resolving to a ComponentRef for the attached container.
|
631
371
|
*/
|
632
372
|
_attachSideSheetContainer(overlay, config) {
|
633
|
-
/** @type {?} */
|
634
373
|
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
635
|
-
/** @type {?} */
|
636
374
|
const injector = Injector.create({
|
637
375
|
parent: userInjector || this._injector,
|
638
376
|
providers: [{ provide: CovalentSideSheetConfig, useValue: config }],
|
639
377
|
});
|
640
|
-
/** @type {?} */
|
641
378
|
const containerPortal = new ComponentPortal(this._sideSheetContainerType, config.viewContainerRef, injector, config.componentFactoryResolver);
|
642
|
-
/** @type {?} */
|
643
379
|
const containerRef = overlay.attach(containerPortal);
|
644
380
|
return containerRef.instance;
|
645
381
|
}
|
646
382
|
/**
|
647
383
|
* Attaches the user-provided component to the already-created side sheet container.
|
648
|
-
* @
|
649
|
-
* @template T, R
|
650
|
-
* @param {?} componentOrTemplateRef The type of component being loaded into the side-sheet,
|
384
|
+
* @param componentOrTemplateRef The type of component being loaded into the side-sheet,
|
651
385
|
* or a TemplateRef to instantiate as the content.
|
652
|
-
* @param
|
653
|
-
* @param
|
654
|
-
* @param
|
655
|
-
* @
|
386
|
+
* @param dialogContainer Reference to the wrapping side-sheet container.
|
387
|
+
* @param overlayRef Reference to the overlay in which the side-sheet resides.
|
388
|
+
* @param config The side-sheet configuration.
|
389
|
+
* @returns A promise resolving to the CovalentSideSheetRef that should be returned to the user.
|
656
390
|
*/
|
657
391
|
_attachSideSheetContent(componentOrTemplateRef, sideSheetContainer, overlayRef, config) {
|
658
392
|
// Create a reference to the side-sheet we're creating in order to give the user a handle
|
659
393
|
// to modify and close it.
|
660
|
-
/** @type {?} */
|
661
394
|
const sideSheetRef = new this._sideSheetRefConstructor(overlayRef, sideSheetContainer, config.id);
|
662
395
|
if (componentOrTemplateRef instanceof TemplateRef) {
|
663
|
-
sideSheetContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef,
|
396
|
+
sideSheetContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, {
|
664
397
|
$implicit: config.data,
|
665
398
|
sideSheetRef,
|
666
|
-
}))
|
399
|
+
}));
|
667
400
|
}
|
668
401
|
else {
|
669
|
-
/** @type {?} */
|
670
402
|
const injector = this._createInjector(config, sideSheetRef, sideSheetContainer);
|
671
|
-
/** @type {?} */
|
672
403
|
const contentRef = sideSheetContainer.attach(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
|
673
404
|
sideSheetRef.componentInstance = contentRef.instance;
|
674
405
|
}
|
675
406
|
sideSheetRef.updateSize(config.width, config.height);
|
676
407
|
return sideSheetRef;
|
677
408
|
}
|
678
|
-
/**
|
679
|
-
* @private
|
680
|
-
* @template T
|
681
|
-
* @param {?} config
|
682
|
-
* @param {?} sideSheetRef
|
683
|
-
* @param {?} sideSheetContainer
|
684
|
-
* @return {?}
|
685
|
-
*/
|
686
409
|
_createInjector(config, sideSheetRef, sideSheetContainer) {
|
687
|
-
/** @type {?} */
|
688
410
|
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
689
411
|
// The side-sheet container should be provided as the side-sheet container and the side-sheet's
|
690
412
|
// content are created out of the same `ViewContainerRef` and as such, are siblings
|
691
413
|
// for injector purposes. To allow the hierarchy that is expected, the side-sheet
|
692
414
|
// container is explicitly provided in the injector.
|
693
|
-
/** @type {?} */
|
694
415
|
const providers = [
|
695
416
|
{ provide: this._sideSheetContainerType, useValue: sideSheetContainer },
|
696
417
|
{ provide: this._sideSheetDataToken, useValue: config.data },
|
@@ -707,162 +428,64 @@ class _CovalentSideSheetBase {
|
|
707
428
|
}
|
708
429
|
/**
|
709
430
|
* Removes a side sheet from the array of open side sheets.
|
710
|
-
* @
|
711
|
-
* @param {?} sideSheetRef Side Sheet to be removed.
|
712
|
-
* @return {?}
|
431
|
+
* @param sideSheetRef Side Sheet to be removed.
|
713
432
|
*/
|
714
433
|
_removeOpenSideSheet(sideSheetRef) {
|
715
|
-
/** @type {?} */
|
716
434
|
const index = this.openSideSheets.indexOf(sideSheetRef);
|
717
435
|
if (index > -1) {
|
718
436
|
this.openSideSheets.splice(index, 1);
|
719
437
|
}
|
720
438
|
}
|
721
|
-
/**
|
722
|
-
* Closes all of the side-sheet in an array.
|
723
|
-
* @private
|
724
|
-
* @param {?} sideSheets
|
725
|
-
* @return {?}
|
726
|
-
*/
|
439
|
+
/** Closes all of the side-sheet in an array. */
|
727
440
|
_closeSideSheets(sideSheets) {
|
728
|
-
/** @type {?} */
|
729
441
|
let i = sideSheets.length;
|
730
442
|
while (i--) {
|
731
443
|
sideSheets[i].close();
|
732
444
|
}
|
733
445
|
}
|
734
446
|
}
|
735
|
-
_CovalentSideSheetBase
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
{ type: Overlay },
|
741
|
-
{ type: Injector },
|
742
|
-
{ type: undefined },
|
743
|
-
{ type: undefined },
|
744
|
-
{ type: Type },
|
745
|
-
{ type: Type },
|
746
|
-
{ type: InjectionToken }
|
747
|
-
];
|
748
|
-
if (false) {
|
749
|
-
/**
|
750
|
-
* @type {?}
|
751
|
-
* @private
|
752
|
-
*/
|
753
|
-
_CovalentSideSheetBase.prototype._openSideSheetsAtThisLevel;
|
754
|
-
/**
|
755
|
-
* @type {?}
|
756
|
-
* @private
|
757
|
-
*/
|
758
|
-
_CovalentSideSheetBase.prototype._afterAllClosedAtThisLevel;
|
759
|
-
/**
|
760
|
-
* @type {?}
|
761
|
-
* @private
|
762
|
-
*/
|
763
|
-
_CovalentSideSheetBase.prototype._afterOpenedAtThisLevel;
|
764
|
-
/**
|
765
|
-
* @type {?}
|
766
|
-
* @private
|
767
|
-
*/
|
768
|
-
_CovalentSideSheetBase.prototype._animationStateSubscriptions;
|
769
|
-
/**
|
770
|
-
* @type {?}
|
771
|
-
* @private
|
772
|
-
*/
|
773
|
-
_CovalentSideSheetBase.prototype.defaultSidebarConfig;
|
774
|
-
/**
|
775
|
-
* @type {?}
|
776
|
-
* @private
|
777
|
-
*/
|
778
|
-
_CovalentSideSheetBase.prototype._overlay;
|
779
|
-
/**
|
780
|
-
* @type {?}
|
781
|
-
* @private
|
782
|
-
*/
|
783
|
-
_CovalentSideSheetBase.prototype._injector;
|
784
|
-
/**
|
785
|
-
* @type {?}
|
786
|
-
* @private
|
787
|
-
*/
|
788
|
-
_CovalentSideSheetBase.prototype._defaultOptions;
|
789
|
-
/**
|
790
|
-
* @type {?}
|
791
|
-
* @private
|
792
|
-
*/
|
793
|
-
_CovalentSideSheetBase.prototype._parentSideSheet;
|
794
|
-
/**
|
795
|
-
* @type {?}
|
796
|
-
* @private
|
797
|
-
*/
|
798
|
-
_CovalentSideSheetBase.prototype._sideSheetRefConstructor;
|
799
|
-
/**
|
800
|
-
* @type {?}
|
801
|
-
* @private
|
802
|
-
*/
|
803
|
-
_CovalentSideSheetBase.prototype._sideSheetContainerType;
|
804
|
-
/**
|
805
|
-
* @type {?}
|
806
|
-
* @private
|
807
|
-
*/
|
808
|
-
_CovalentSideSheetBase.prototype._sideSheetDataToken;
|
809
|
-
}
|
447
|
+
/** @nocollapse */ /** @nocollapse */ _CovalentSideSheetBase.ɵfac = function _CovalentSideSheetBase_Factory(t) { i0.ɵɵinvalidFactory(); };
|
448
|
+
/** @nocollapse */ /** @nocollapse */ _CovalentSideSheetBase.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: _CovalentSideSheetBase });
|
449
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(_CovalentSideSheetBase, [{
|
450
|
+
type: Directive
|
451
|
+
}], function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: undefined }, { type: undefined }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }]; }, null); })();
|
810
452
|
/**
|
811
453
|
* Service to open Covalent Design side-sheet.
|
812
454
|
*/
|
813
455
|
class CovalentSideSheet extends _CovalentSideSheetBase {
|
814
|
-
/**
|
815
|
-
* @param {?} overlay
|
816
|
-
* @param {?} injector
|
817
|
-
* @param {?} defaultOptions
|
818
|
-
* @param {?} parentSideSheet
|
819
|
-
*/
|
820
456
|
constructor(overlay, injector, defaultOptions, parentSideSheet) {
|
821
457
|
super(overlay, injector, defaultOptions, parentSideSheet, CovalentSideSheetRef, CovalentSideSheetContainer, MAT_DIALOG_DATA);
|
822
458
|
}
|
823
459
|
}
|
824
|
-
CovalentSideSheet
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
]
|
460
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheet.ɵfac = function CovalentSideSheet_Factory(t) { return new (t || CovalentSideSheet)(i0.ɵɵinject(i1$1.Overlay), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8), i0.ɵɵinject(CovalentSideSheet, 12)); };
|
461
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheet.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: CovalentSideSheet, factory: CovalentSideSheet.ɵfac });
|
462
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentSideSheet, [{
|
463
|
+
type: Injectable
|
464
|
+
}], function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: CovalentSideSheetConfig, decorators: [{
|
465
|
+
type: Optional
|
466
|
+
}, {
|
467
|
+
type: Inject,
|
468
|
+
args: [MAT_DIALOG_DEFAULT_OPTIONS]
|
469
|
+
}] }, { type: CovalentSideSheet, decorators: [{
|
470
|
+
type: Optional
|
471
|
+
}, {
|
472
|
+
type: SkipSelf
|
473
|
+
}] }]; }, null); })();
|
834
474
|
|
835
|
-
|
836
|
-
|
837
|
-
* Generated from: side-sheet.content-directives.ts
|
838
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
839
|
-
*/
|
840
|
-
/**
|
841
|
-
* Counter used to generate unique IDs for dialog elements.
|
842
|
-
* @type {?}
|
843
|
-
*/
|
475
|
+
/* tslint:disable */
|
476
|
+
/** Counter used to generate unique IDs for dialog elements. */
|
844
477
|
let dialogElementUid = 0;
|
845
478
|
/**
|
846
479
|
* Button that will close the current dialog.
|
847
480
|
*/
|
848
481
|
class CovalentSideSheetClose {
|
849
|
-
/**
|
850
|
-
* @param {?} dialogRef
|
851
|
-
* @param {?} _elementRef
|
852
|
-
* @param {?} _dialog
|
853
|
-
*/
|
854
482
|
constructor(dialogRef, _elementRef, _dialog) {
|
855
483
|
this.dialogRef = dialogRef;
|
856
484
|
this._elementRef = _elementRef;
|
857
485
|
this._dialog = _dialog;
|
858
|
-
/**
|
859
|
-
* Default to "button" to prevents accidental form submits.
|
860
|
-
*/
|
486
|
+
/** Default to "button" to prevents accidental form submits. */
|
861
487
|
this.type = 'button';
|
862
488
|
}
|
863
|
-
/**
|
864
|
-
* @return {?}
|
865
|
-
*/
|
866
489
|
ngOnInit() {
|
867
490
|
if (!this.dialogRef) {
|
868
491
|
// When this directive is included in a dialog via TemplateRef (rather than being
|
@@ -870,24 +493,15 @@ class CovalentSideSheetClose {
|
|
870
493
|
// views cannot be given a custom injector. Instead, we look up the DialogRef by
|
871
494
|
// ID. This must occur in `onInit`, as the ID binding for the dialog container won't
|
872
495
|
// be resolved at constructor time.
|
873
|
-
this.dialogRef =
|
496
|
+
this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openSideSheets);
|
874
497
|
}
|
875
498
|
}
|
876
|
-
/**
|
877
|
-
* @param {?} changes
|
878
|
-
* @return {?}
|
879
|
-
*/
|
880
499
|
ngOnChanges(changes) {
|
881
|
-
/** @type {?} */
|
882
500
|
const proxiedChange = changes['_CovalentSideSheetClose'] || changes['_CovalentSideSheetCloseResult'];
|
883
501
|
if (proxiedChange) {
|
884
502
|
this.dialogResult = proxiedChange.currentValue;
|
885
503
|
}
|
886
504
|
}
|
887
|
-
/**
|
888
|
-
* @param {?} event
|
889
|
-
* @return {?}
|
890
|
-
*/
|
891
505
|
_onButtonClick(event) {
|
892
506
|
// Determinate the focus origin using the click event, because using the FocusMonitor will
|
893
507
|
// result in incorrect origins. Most of the time, close buttons will be auto focused in the
|
@@ -896,8 +510,15 @@ class CovalentSideSheetClose {
|
|
896
510
|
_closeSideSheetVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);
|
897
511
|
}
|
898
512
|
}
|
899
|
-
CovalentSideSheetClose
|
900
|
-
|
513
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetClose.ɵfac = function CovalentSideSheetClose_Factory(t) { return new (t || CovalentSideSheetClose)(i0.ɵɵdirectiveInject(CovalentSideSheetRef, 8), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CovalentSideSheet)); };
|
514
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetClose.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: CovalentSideSheetClose, selectors: [["", "td-side-sheet-close", ""], ["", "CovalentSideSheetClose", ""]], hostVars: 2, hostBindings: function CovalentSideSheetClose_HostBindings(rf, ctx) { if (rf & 1) {
|
515
|
+
i0.ɵɵlistener("click", function CovalentSideSheetClose_click_HostBindingHandler($event) { return ctx._onButtonClick($event); });
|
516
|
+
} if (rf & 2) {
|
517
|
+
i0.ɵɵattribute("aria-label", ctx.ariaLabel || null)("type", ctx.type);
|
518
|
+
} }, inputs: { ariaLabel: ["aria-label", "ariaLabel"], type: "type", dialogResult: ["td-side-sheet-close", "dialogResult"], _CovalentSideSheetClose: ["CovalentSideSheetClose", "_CovalentSideSheetClose"] }, exportAs: ["CovalentSideSheetClose"], features: [i0.ɵɵNgOnChangesFeature] });
|
519
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentSideSheetClose, [{
|
520
|
+
type: Directive,
|
521
|
+
args: [{
|
901
522
|
selector: '[td-side-sheet-close], [CovalentSideSheetClose]',
|
902
523
|
exportAs: 'CovalentSideSheetClose',
|
903
524
|
host: {
|
@@ -905,193 +526,132 @@ CovalentSideSheetClose.decorators = [
|
|
905
526
|
'[attr.aria-label]': 'ariaLabel || null',
|
906
527
|
'[attr.type]': 'type',
|
907
528
|
},
|
908
|
-
}
|
909
|
-
]
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
/**
|
924
|
-
* Screenreader label for the button.
|
925
|
-
* @type {?}
|
926
|
-
*/
|
927
|
-
CovalentSideSheetClose.prototype.ariaLabel;
|
928
|
-
/**
|
929
|
-
* Default to "button" to prevents accidental form submits.
|
930
|
-
* @type {?}
|
931
|
-
*/
|
932
|
-
CovalentSideSheetClose.prototype.type;
|
933
|
-
/**
|
934
|
-
* Dialog close input.
|
935
|
-
* @type {?}
|
936
|
-
*/
|
937
|
-
CovalentSideSheetClose.prototype.dialogResult;
|
938
|
-
/** @type {?} */
|
939
|
-
CovalentSideSheetClose.prototype._CovalentSideSheetClose;
|
940
|
-
/** @type {?} */
|
941
|
-
CovalentSideSheetClose.prototype.dialogRef;
|
942
|
-
/**
|
943
|
-
* @type {?}
|
944
|
-
* @private
|
945
|
-
*/
|
946
|
-
CovalentSideSheetClose.prototype._elementRef;
|
947
|
-
/**
|
948
|
-
* @type {?}
|
949
|
-
* @private
|
950
|
-
*/
|
951
|
-
CovalentSideSheetClose.prototype._dialog;
|
952
|
-
}
|
529
|
+
}]
|
530
|
+
}], function () { return [{ type: CovalentSideSheetRef, decorators: [{
|
531
|
+
type: Optional
|
532
|
+
}] }, { type: i0.ElementRef }, { type: CovalentSideSheet }]; }, { ariaLabel: [{
|
533
|
+
type: Input,
|
534
|
+
args: ['aria-label']
|
535
|
+
}], type: [{
|
536
|
+
type: Input
|
537
|
+
}], dialogResult: [{
|
538
|
+
type: Input,
|
539
|
+
args: ['td-side-sheet-close']
|
540
|
+
}], _CovalentSideSheetClose: [{
|
541
|
+
type: Input,
|
542
|
+
args: ['CovalentSideSheetClose']
|
543
|
+
}] }); })();
|
953
544
|
/**
|
954
545
|
* Title of a side sheet element. Stays fixed to the top of the side sheet when scrolling.
|
955
546
|
*/
|
956
547
|
class CovalentSideSheetTitle {
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
*/
|
962
|
-
constructor(_dialogRef, _elementRef, _dialog) {
|
548
|
+
constructor(
|
549
|
+
// The dialog title directive is always used in combination with a `CovalentSideSheetRef`.
|
550
|
+
// tslint:disable-next-line: lightweight-tokens
|
551
|
+
_dialogRef, _elementRef, _dialog) {
|
963
552
|
this._dialogRef = _dialogRef;
|
964
553
|
this._elementRef = _elementRef;
|
965
554
|
this._dialog = _dialog;
|
966
|
-
/**
|
967
|
-
* Unique id for the dialog title. If none is supplied, it will be auto-generated.
|
968
|
-
*/
|
555
|
+
/** Unique id for the dialog title. If none is supplied, it will be auto-generated. */
|
969
556
|
this.id = `td-side-sheet-title-${dialogElementUid++}`;
|
970
557
|
}
|
971
|
-
/**
|
972
|
-
* @return {?}
|
973
|
-
*/
|
974
558
|
ngOnInit() {
|
975
559
|
if (this._dialogRef) {
|
976
|
-
Promise.resolve().then((
|
977
|
-
* @return {?}
|
978
|
-
*/
|
979
|
-
() => {
|
980
|
-
/** @type {?} */
|
560
|
+
Promise.resolve().then(() => {
|
981
561
|
const container = this._dialogRef._containerInstance;
|
982
562
|
if (container && !container._ariaLabelledBy) {
|
983
563
|
container._ariaLabelledBy = this.id;
|
984
564
|
}
|
985
|
-
})
|
565
|
+
});
|
986
566
|
}
|
987
567
|
else {
|
988
|
-
this._dialogRef =
|
568
|
+
this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openSideSheets);
|
989
569
|
}
|
990
570
|
}
|
991
571
|
}
|
992
|
-
CovalentSideSheetTitle
|
993
|
-
|
572
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetTitle.ɵfac = function CovalentSideSheetTitle_Factory(t) { return new (t || CovalentSideSheetTitle)(i0.ɵɵdirectiveInject(CovalentSideSheetRef, 8), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CovalentSideSheet)); };
|
573
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetTitle.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: CovalentSideSheetTitle, selectors: [["", "td-side-sheet-title", ""], ["", "CovalentSideSheetTitle", ""]], hostAttrs: [1, "td-side-sheet-title"], hostVars: 1, hostBindings: function CovalentSideSheetTitle_HostBindings(rf, ctx) { if (rf & 2) {
|
574
|
+
i0.ɵɵhostProperty("id", ctx.id);
|
575
|
+
} }, inputs: { id: "id" }, exportAs: ["CovalentSideSheetTitle"] });
|
576
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentSideSheetTitle, [{
|
577
|
+
type: Directive,
|
578
|
+
args: [{
|
994
579
|
selector: '[td-side-sheet-title], [CovalentSideSheetTitle]',
|
995
580
|
exportAs: 'CovalentSideSheetTitle',
|
996
581
|
host: {
|
997
582
|
'class': 'td-side-sheet-title',
|
998
583
|
'[id]': 'id',
|
999
584
|
},
|
1000
|
-
}
|
1001
|
-
]
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
{ type: CovalentSideSheet }
|
1007
|
-
];
|
1008
|
-
CovalentSideSheetTitle.propDecorators = {
|
1009
|
-
id: [{ type: Input }]
|
1010
|
-
};
|
1011
|
-
if (false) {
|
1012
|
-
/**
|
1013
|
-
* Unique id for the dialog title. If none is supplied, it will be auto-generated.
|
1014
|
-
* @type {?}
|
1015
|
-
*/
|
1016
|
-
CovalentSideSheetTitle.prototype.id;
|
1017
|
-
/**
|
1018
|
-
* @type {?}
|
1019
|
-
* @private
|
1020
|
-
*/
|
1021
|
-
CovalentSideSheetTitle.prototype._dialogRef;
|
1022
|
-
/**
|
1023
|
-
* @type {?}
|
1024
|
-
* @private
|
1025
|
-
*/
|
1026
|
-
CovalentSideSheetTitle.prototype._elementRef;
|
1027
|
-
/**
|
1028
|
-
* @type {?}
|
1029
|
-
* @private
|
1030
|
-
*/
|
1031
|
-
CovalentSideSheetTitle.prototype._dialog;
|
1032
|
-
}
|
585
|
+
}]
|
586
|
+
}], function () { return [{ type: CovalentSideSheetRef, decorators: [{
|
587
|
+
type: Optional
|
588
|
+
}] }, { type: i0.ElementRef }, { type: CovalentSideSheet }]; }, { id: [{
|
589
|
+
type: Input
|
590
|
+
}] }); })();
|
1033
591
|
/**
|
1034
592
|
* Scrollable content container of a dialog.
|
1035
593
|
*/
|
1036
594
|
class CovalentSideSheetContent {
|
1037
595
|
}
|
1038
|
-
CovalentSideSheetContent
|
1039
|
-
|
596
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetContent.ɵfac = function CovalentSideSheetContent_Factory(t) { return new (t || CovalentSideSheetContent)(); };
|
597
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetContent.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: CovalentSideSheetContent, selectors: [["", "td-side-sheet-content", ""], ["td-side-sheet-content"], ["", "CovalentSideSheetContent", ""]], hostAttrs: [1, "td-side-sheet-content"] });
|
598
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentSideSheetContent, [{
|
599
|
+
type: Directive,
|
600
|
+
args: [{
|
1040
601
|
selector: `[td-side-sheet-content], td-side-sheet-content, [CovalentSideSheetContent]`,
|
1041
602
|
host: { class: 'td-side-sheet-content' },
|
1042
|
-
}
|
1043
|
-
];
|
603
|
+
}]
|
604
|
+
}], null, null); })();
|
1044
605
|
/**
|
1045
606
|
* Container for the bottom action buttons in a dialog.
|
1046
607
|
* Stays fixed to the bottom when scrolling.
|
1047
608
|
*/
|
1048
609
|
class CovalentSideSheetActions {
|
1049
610
|
}
|
1050
|
-
CovalentSideSheetActions
|
1051
|
-
|
611
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetActions.ɵfac = function CovalentSideSheetActions_Factory(t) { return new (t || CovalentSideSheetActions)(); };
|
612
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetActions.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: CovalentSideSheetActions, selectors: [["", "td-side-sheet-actions", ""], ["td-side-sheet-actions"], ["", "CovalentSideSheetActions", ""]], hostAttrs: [1, "td-side-sheet-actions"] });
|
613
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentSideSheetActions, [{
|
614
|
+
type: Directive,
|
615
|
+
args: [{
|
1052
616
|
selector: `[td-side-sheet-actions], td-side-sheet-actions, [CovalentSideSheetActions]`,
|
1053
617
|
host: { class: 'td-side-sheet-actions' },
|
1054
|
-
}
|
1055
|
-
];
|
618
|
+
}]
|
619
|
+
}], null, null); })();
|
1056
620
|
/**
|
1057
621
|
* Container for the wrapper part of the dialog
|
1058
622
|
*/
|
1059
623
|
class CovalentSideSheetWrapper {
|
1060
624
|
}
|
1061
|
-
CovalentSideSheetWrapper
|
1062
|
-
|
625
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetWrapper.ɵfac = function CovalentSideSheetWrapper_Factory(t) { return new (t || CovalentSideSheetWrapper)(); };
|
626
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetWrapper.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: CovalentSideSheetWrapper, selectors: [["", "td-side-sheet-wrapper", ""], ["td-side-sheet-wrapper"], ["", "CovalentSideSheetWrapper", ""]], hostAttrs: [1, "td-side-sheet-wrapper"] });
|
627
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentSideSheetWrapper, [{
|
628
|
+
type: Directive,
|
629
|
+
args: [{
|
1063
630
|
selector: `[td-side-sheet-wrapper], td-side-sheet-wrapper, [CovalentSideSheetWrapper]`,
|
1064
631
|
host: { class: 'td-side-sheet-wrapper' },
|
1065
|
-
}
|
1066
|
-
];
|
632
|
+
}]
|
633
|
+
}], null, null); })();
|
1067
634
|
/**
|
1068
635
|
* Finds the closest CovalentSideSheetRef to an element by looking at the DOM.
|
1069
|
-
* @param
|
1070
|
-
* @param
|
1071
|
-
* @return {?}
|
636
|
+
* @param element Element relative to which to look for a dialog.
|
637
|
+
* @param openDialogs References to the currently-open dialogs.
|
1072
638
|
*/
|
1073
639
|
function getClosestDialog(element, openDialogs) {
|
1074
|
-
/** @type {?} */
|
1075
640
|
let parent = element.nativeElement.parentElement;
|
1076
641
|
while (parent && !parent.classList.contains('td-side-sheet-container')) {
|
1077
642
|
parent = parent.parentElement;
|
1078
643
|
}
|
1079
|
-
return parent ? openDialogs.find((
|
1080
|
-
* @param {?} dialog
|
1081
|
-
* @return {?}
|
1082
|
-
*/
|
1083
|
-
(dialog) => dialog.id === (/** @type {?} */ (parent)).id)) : null;
|
644
|
+
return parent ? openDialogs.find((dialog) => dialog.id === parent.id) : null;
|
1084
645
|
}
|
1085
646
|
|
1086
|
-
/**
|
1087
|
-
* @fileoverview added by tsickle
|
1088
|
-
* Generated from: side-sheet.module.ts
|
1089
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1090
|
-
*/
|
1091
647
|
class CovalentSideSheetModule {
|
1092
648
|
}
|
1093
|
-
CovalentSideSheetModule
|
1094
|
-
|
649
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetModule.ɵfac = function CovalentSideSheetModule_Factory(t) { return new (t || CovalentSideSheetModule)(); };
|
650
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: CovalentSideSheetModule });
|
651
|
+
/** @nocollapse */ /** @nocollapse */ CovalentSideSheetModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ providers: [CovalentSideSheet], imports: [[PortalModule, MatDialogModule, MatCommonModule]] });
|
652
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentSideSheetModule, [{
|
653
|
+
type: NgModule,
|
654
|
+
args: [{
|
1095
655
|
declarations: [
|
1096
656
|
CovalentSideSheetContainer,
|
1097
657
|
CovalentSideSheetActions,
|
@@ -1109,26 +669,22 @@ CovalentSideSheetModule.decorators = [
|
|
1109
669
|
],
|
1110
670
|
imports: [PortalModule, MatDialogModule, MatCommonModule],
|
1111
671
|
providers: [CovalentSideSheet],
|
1112
|
-
}
|
1113
|
-
];
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1125
|
-
*/
|
672
|
+
}]
|
673
|
+
}], null, null); })();
|
674
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CovalentSideSheetModule, { declarations: [CovalentSideSheetContainer,
|
675
|
+
CovalentSideSheetActions,
|
676
|
+
CovalentSideSheetClose,
|
677
|
+
CovalentSideSheetContent,
|
678
|
+
CovalentSideSheetTitle,
|
679
|
+
CovalentSideSheetWrapper], imports: [PortalModule, MatDialogModule, MatCommonModule], exports: [CovalentSideSheetActions,
|
680
|
+
CovalentSideSheetClose,
|
681
|
+
CovalentSideSheetContent,
|
682
|
+
CovalentSideSheetTitle,
|
683
|
+
CovalentSideSheetWrapper] }); })();
|
1126
684
|
|
1127
685
|
/**
|
1128
|
-
*
|
1129
|
-
* Generated from: covalent-core-side-sheet.ts
|
1130
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
686
|
+
* Generated bundle index. Do not edit.
|
1131
687
|
*/
|
1132
688
|
|
1133
|
-
export { CovalentSideSheet, CovalentSideSheetActions, CovalentSideSheetClose, CovalentSideSheetConfig, CovalentSideSheetContent, CovalentSideSheetModule, CovalentSideSheetRef, CovalentSideSheetTitle, CovalentSideSheetWrapper, _CovalentSideSheetBase, _closeSideSheetVia
|
1134
|
-
//# sourceMappingURL=covalent-core-side-sheet.
|
689
|
+
export { CovalentSideSheet, CovalentSideSheetActions, CovalentSideSheetClose, CovalentSideSheetConfig, CovalentSideSheetContent, CovalentSideSheetModule, CovalentSideSheetRef, CovalentSideSheetTitle, CovalentSideSheetWrapper, _CovalentSideSheetBase, _closeSideSheetVia };
|
690
|
+
//# sourceMappingURL=covalent-core-side-sheet.mjs.map
|