@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.
Files changed (602) hide show
  1. package/README.md +5 -4
  2. package/breadcrumbs/README.md +21 -17
  3. package/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +6 -1
  4. package/breadcrumbs/breadcrumbs.component.d.ts +4 -0
  5. package/breadcrumbs/breadcrumbs.module.d.ts +8 -0
  6. package/breadcrumbs/covalent-core-breadcrumbs.d.ts +2 -1
  7. package/breadcrumbs/package.json +6 -7
  8. package/breadcrumbs/{public-api.d.ts → public_api.d.ts} +0 -0
  9. package/common/README.md +3 -0
  10. package/common/_common-theme.scss +3 -1
  11. package/common/behaviors/disable-ripple.mixin.d.ts +1 -1
  12. package/common/behaviors/disabled.mixin.d.ts +1 -1
  13. package/common/common.module.d.ts +15 -0
  14. package/common/covalent-core-common.d.ts +2 -3
  15. package/common/directives/fullscreen/fullscreen.directive.d.ts +3 -0
  16. package/common/forms/auto-trim/auto-trim.directive.d.ts +3 -0
  17. package/common/package.json +6 -7
  18. package/common/pipes/bytes/bytes.pipe.d.ts +3 -0
  19. package/common/pipes/decimal-bytes/decimal-bytes.pipe.d.ts +3 -0
  20. package/common/pipes/digits/digits.pipe.d.ts +3 -0
  21. package/common/pipes/time-ago/time-ago.pipe.d.ts +3 -0
  22. package/common/pipes/time-difference/time-difference.pipe.d.ts +3 -0
  23. package/common/pipes/time-until/time-until.pipe.d.ts +3 -0
  24. package/common/pipes/truncate/truncate.pipe.d.ts +4 -1
  25. package/common/{public-api.d.ts → public_api.d.ts} +0 -0
  26. package/common/services/icon.service.d.ts +3 -0
  27. package/common/services/router-path.service.d.ts +3 -0
  28. package/common/styles/_elevation.scss +7 -2
  29. package/common/styles/_layout.scss +12 -10
  30. package/common/styles/_palette-dark.scss +2 -2
  31. package/common/styles/_palette-light.scss +6 -6
  32. package/common/styles/_rtl.scss +3 -0
  33. package/common/styles/_typography-functions.scss +10 -2
  34. package/common/styles/_variables.scss +7 -6
  35. package/common/styles/colors/_colors-dark.scss +327 -0
  36. package/common/styles/colors/_colors-light.scss +748 -0
  37. package/common/styles/core/_button.scss +37 -6
  38. package/common/styles/core/_card.scss +34 -9
  39. package/common/styles/core/_content.scss +2 -1
  40. package/common/styles/core/_divider.scss +1 -0
  41. package/common/styles/core/_icons.scss +2 -0
  42. package/common/styles/core/_sidenav.scss +2 -0
  43. package/common/styles/core/_structure.scss +6 -7
  44. package/common/styles/core/_toolbar.scss +7 -0
  45. package/common/styles/core/_whiteframe.scss +18 -10
  46. package/common/styles/font/README.md +4 -2
  47. package/common/styles/font/_font.scss +10 -4
  48. package/common/styles/utilities/_general.scss +14 -0
  49. package/common/styles/utilities/_text.scss +21 -0
  50. package/covalent-core.d.ts +2 -1
  51. package/dialogs/README.md +38 -30
  52. package/dialogs/_dialog-theme.scss +1 -0
  53. package/dialogs/alert-dialog/alert-dialog.component.d.ts +6 -3
  54. package/dialogs/confirm-dialog/confirm-dialog.component.d.ts +5 -2
  55. package/dialogs/covalent-core-dialogs.d.ts +2 -2
  56. package/dialogs/dialog.component.d.ts +9 -0
  57. package/dialogs/dialogs.module.d.ts +17 -0
  58. package/dialogs/package.json +6 -7
  59. package/dialogs/prompt-dialog/prompt-dialog.component.d.ts +6 -3
  60. package/dialogs/{public-api.d.ts → public_api.d.ts} +1 -0
  61. package/dialogs/services/dialog.service.d.ts +3 -0
  62. package/dialogs/src/README.md +223 -0
  63. package/dialogs/window-dialog/window-dialog.component.d.ts +8 -5
  64. package/dynamic-menu/README.md +6 -6
  65. package/dynamic-menu/covalent-core-dynamic-menu.d.ts +2 -2
  66. package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.d.ts +4 -1
  67. package/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.d.ts +4 -1
  68. package/dynamic-menu/dynamic-menu.component.d.ts +4 -22
  69. package/dynamic-menu/dynamic-menu.menu.d.ts +22 -0
  70. package/dynamic-menu/dynamic-menu.module.d.ts +13 -0
  71. package/dynamic-menu/package.json +6 -7
  72. package/dynamic-menu/public_api.d.ts +2 -0
  73. package/esm2020/breadcrumbs/breadcrumb/breadcrumb.component.mjs +92 -0
  74. package/esm2020/breadcrumbs/breadcrumbs.component.mjs +134 -0
  75. package/esm2020/breadcrumbs/breadcrumbs.module.mjs +20 -0
  76. package/esm2020/breadcrumbs/covalent-core-breadcrumbs.mjs +5 -0
  77. package/esm2020/breadcrumbs/public_api.mjs +4 -0
  78. package/esm2020/common/animations/bounce/bounce.animation.mjs +70 -0
  79. package/esm2020/common/animations/collapse/collapse.animation.mjs +51 -0
  80. package/esm2020/common/animations/common/interfaces.mjs +2 -0
  81. package/esm2020/common/animations/fade/fadeInOut.animation.mjs +37 -0
  82. package/esm2020/common/animations/flash/flash.animation.mjs +34 -0
  83. package/esm2020/common/animations/headshake/headshake.animation.mjs +47 -0
  84. package/esm2020/common/animations/jello/jello.animation.mjs +59 -0
  85. package/esm2020/common/animations/pulse/pulse.animation.mjs +32 -0
  86. package/esm2020/common/animations/rotate/rotate.animation.mjs +30 -0
  87. package/esm2020/common/behaviors/control-value-accesor.mixin.mjs +41 -0
  88. package/esm2020/common/behaviors/disable-ripple.mixin.mjs +24 -0
  89. package/esm2020/common/behaviors/disabled.mixin.mjs +24 -0
  90. package/esm2020/common/common.module.mjs +63 -0
  91. package/esm2020/common/covalent-core-common.mjs +5 -0
  92. package/esm2020/common/directives/fullscreen/fullscreen.directive.mjs +85 -0
  93. package/esm2020/common/forms/auto-trim/auto-trim.directive.mjs +36 -0
  94. package/esm2020/common/forms/validators/validators.mjs +29 -0
  95. package/esm2020/common/functions/clipboard.mjs +23 -0
  96. package/esm2020/common/functions/convert.mjs +84 -0
  97. package/esm2020/common/functions/download.mjs +75 -0
  98. package/esm2020/common/functions/file.mjs +16 -0
  99. package/esm2020/common/pipes/bytes/bytes.pipe.mjs +42 -0
  100. package/esm2020/common/pipes/decimal-bytes/decimal-bytes.pipe.mjs +42 -0
  101. package/esm2020/common/pipes/digits/digits.pipe.mjs +39 -0
  102. package/esm2020/common/pipes/time-ago/time-ago.pipe.mjs +72 -0
  103. package/esm2020/common/pipes/time-difference/time-difference.pipe.mjs +51 -0
  104. package/esm2020/common/pipes/time-until/time-until.pipe.mjs +72 -0
  105. package/esm2020/common/pipes/truncate/truncate.pipe.mjs +27 -0
  106. package/esm2020/common/public_api.mjs +39 -0
  107. package/esm2020/common/services/icon.service.mjs +1089 -0
  108. package/esm2020/common/services/router-path.service.mjs +29 -0
  109. package/esm2020/covalent-core.mjs +5 -0
  110. package/esm2020/dialogs/alert-dialog/alert-dialog.component.mjs +23 -0
  111. package/esm2020/dialogs/confirm-dialog/confirm-dialog.component.mjs +28 -0
  112. package/esm2020/dialogs/covalent-core-dialogs.mjs +5 -0
  113. package/esm2020/dialogs/dialog.component.mjs +56 -0
  114. package/esm2020/dialogs/dialogs.module.mjs +89 -0
  115. package/esm2020/dialogs/prompt-dialog/prompt-dialog.component.mjs +46 -0
  116. package/esm2020/dialogs/public_api.mjs +9 -0
  117. package/esm2020/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.mjs +216 -0
  118. package/esm2020/dialogs/services/dialog.service.mjs +171 -0
  119. package/esm2020/dialogs/window-dialog/window-dialog.component.mjs +38 -0
  120. package/esm2020/dynamic-menu/covalent-core-dynamic-menu.mjs +5 -0
  121. package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.mjs +30 -0
  122. package/esm2020/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.mjs +24 -0
  123. package/esm2020/dynamic-menu/dynamic-menu.component.mjs +28 -0
  124. package/esm2020/dynamic-menu/dynamic-menu.menu.mjs +2 -0
  125. package/esm2020/dynamic-menu/dynamic-menu.module.mjs +57 -0
  126. package/esm2020/dynamic-menu/public_api.mjs +6 -0
  127. package/esm2020/file/covalent-core-file.mjs +5 -0
  128. package/esm2020/file/directives/file-drop.directive.mjs +147 -0
  129. package/esm2020/file/directives/file-select.directive.mjs +77 -0
  130. package/esm2020/file/file-input/file-input.component.mjs +110 -0
  131. package/esm2020/file/file-upload/file-upload.component.mjs +174 -0
  132. package/esm2020/file/file.module.mjs +58 -0
  133. package/esm2020/file/public_api.mjs +7 -0
  134. package/esm2020/file/services/file.service.mjs +64 -0
  135. package/esm2020/json-formatter/collapse.animation.mjs +51 -0
  136. package/esm2020/json-formatter/covalent-core-json-formatter.mjs +5 -0
  137. package/esm2020/json-formatter/json-formatter.component.mjs +217 -0
  138. package/esm2020/json-formatter/json-formatter.module.mjs +20 -0
  139. package/esm2020/json-formatter/public_api.mjs +3 -0
  140. package/esm2020/layout/covalent-core-layout.mjs +5 -0
  141. package/esm2020/layout/layout-card-over/layout-card-over.component.mjs +40 -0
  142. package/esm2020/layout/layout-footer/layout-footer.component.mjs +33 -0
  143. package/esm2020/layout/layout-manage-list/layout-manage-list.component.mjs +93 -0
  144. package/esm2020/layout/layout-manage-list/layout-manage-list.directives.mjs +84 -0
  145. package/esm2020/layout/layout-nav/layout-nav.component.mjs +50 -0
  146. package/esm2020/layout/layout-nav-list/layout-nav-list.component.mjs +128 -0
  147. package/esm2020/layout/layout-nav-list/layout-nav-list.directives.mjs +84 -0
  148. package/esm2020/layout/layout-toggle.class.mjs +92 -0
  149. package/esm2020/layout/layout.component.mjs +92 -0
  150. package/esm2020/layout/layout.directives.mjs +85 -0
  151. package/esm2020/layout/layout.module.mjs +117 -0
  152. package/esm2020/layout/navigation-drawer/navigation-drawer.component.mjs +161 -0
  153. package/esm2020/layout/public_api.mjs +13 -0
  154. package/esm2020/menu/covalent-core-menu.mjs +5 -0
  155. package/esm2020/menu/menu.component.mjs +12 -0
  156. package/esm2020/menu/menu.module.mjs +21 -0
  157. package/esm2020/menu/public_api.mjs +3 -0
  158. package/esm2020/message/collapse.animation.mjs +51 -0
  159. package/esm2020/message/covalent-core-message.mjs +5 -0
  160. package/esm2020/message/message.component.mjs +203 -0
  161. package/esm2020/message/message.module.mjs +25 -0
  162. package/esm2020/message/public_api.mjs +3 -0
  163. package/esm2020/public_api.mjs +2 -0
  164. package/esm2020/search/covalent-core-search.mjs +5 -0
  165. package/esm2020/search/public_api.mjs +4 -0
  166. package/esm2020/search/search-box/search-box.component.mjs +194 -0
  167. package/esm2020/search/search-input/search-input.component.mjs +203 -0
  168. package/esm2020/search/search.module.mjs +39 -0
  169. package/esm2020/side-sheet/covalent-core-side-sheet.mjs +5 -0
  170. package/esm2020/side-sheet/public_api.mjs +6 -0
  171. package/esm2020/side-sheet/side-sheet-container.mjs +274 -0
  172. package/esm2020/side-sheet/side-sheet-ref.mjs +21 -0
  173. package/esm2020/side-sheet/side-sheet.animation.mjs +12 -0
  174. package/esm2020/side-sheet/side-sheet.config.mjs +4 -0
  175. package/esm2020/side-sheet/side-sheet.content-directives.mjs +201 -0
  176. package/esm2020/side-sheet/side-sheet.mjs +221 -0
  177. package/esm2020/side-sheet/side-sheet.module.mjs +45 -0
  178. package/esm2020/user-profile/covalent-core-user-profile.mjs +5 -0
  179. package/esm2020/user-profile/public_api.mjs +4 -0
  180. package/esm2020/user-profile/user-profile-menu/user-profile-menu.component.mjs +24 -0
  181. package/esm2020/user-profile/user-profile.component.mjs +19 -0
  182. package/esm2020/user-profile/user-profile.module.mjs +44 -0
  183. package/fesm2015/covalent-core-breadcrumbs.mjs +246 -0
  184. package/fesm2015/covalent-core-breadcrumbs.mjs.map +1 -0
  185. package/fesm2015/covalent-core-common.mjs +2281 -0
  186. package/fesm2015/covalent-core-common.mjs.map +1 -0
  187. package/fesm2015/covalent-core-dialogs.mjs +639 -0
  188. package/fesm2015/covalent-core-dialogs.mjs.map +1 -0
  189. package/fesm2015/covalent-core-dynamic-menu.mjs +128 -0
  190. package/fesm2015/covalent-core-dynamic-menu.mjs.map +1 -0
  191. package/fesm2015/covalent-core-file.mjs +613 -0
  192. package/fesm2015/covalent-core-file.mjs.map +1 -0
  193. package/fesm2015/covalent-core-json-formatter.mjs +298 -0
  194. package/fesm2015/covalent-core-json-formatter.mjs.map +1 -0
  195. package/fesm2015/covalent-core-layout.mjs +1024 -0
  196. package/fesm2015/covalent-core-layout.mjs.map +1 -0
  197. package/fesm2015/covalent-core-menu.mjs +37 -0
  198. package/fesm2015/covalent-core-menu.mjs.map +1 -0
  199. package/fesm2015/covalent-core-message.mjs +284 -0
  200. package/fesm2015/covalent-core-message.mjs.map +1 -0
  201. package/fesm2015/covalent-core-search.mjs +428 -0
  202. package/fesm2015/covalent-core-search.mjs.map +1 -0
  203. package/fesm2015/covalent-core-side-sheet.mjs +762 -0
  204. package/fesm2015/covalent-core-side-sheet.mjs.map +1 -0
  205. package/fesm2015/covalent-core-user-profile.mjs +86 -0
  206. package/fesm2015/covalent-core-user-profile.mjs.map +1 -0
  207. package/fesm2015/covalent-core.mjs +4 -0
  208. package/fesm2015/covalent-core.mjs.map +1 -0
  209. package/fesm2020/covalent-core-breadcrumbs.mjs +246 -0
  210. package/fesm2020/covalent-core-breadcrumbs.mjs.map +1 -0
  211. package/{fesm2015/covalent-core-common.js → fesm2020/covalent-core-common.mjs} +317 -813
  212. package/fesm2020/covalent-core-common.mjs.map +1 -0
  213. package/fesm2020/covalent-core-dialogs.mjs +634 -0
  214. package/fesm2020/covalent-core-dialogs.mjs.map +1 -0
  215. package/fesm2020/covalent-core-dynamic-menu.mjs +128 -0
  216. package/fesm2020/covalent-core-dynamic-menu.mjs.map +1 -0
  217. package/fesm2020/covalent-core-file.mjs +607 -0
  218. package/fesm2020/covalent-core-file.mjs.map +1 -0
  219. package/fesm2020/covalent-core-json-formatter.mjs +290 -0
  220. package/fesm2020/covalent-core-json-formatter.mjs.map +1 -0
  221. package/fesm2020/covalent-core-layout.mjs +1000 -0
  222. package/fesm2020/covalent-core-layout.mjs.map +1 -0
  223. package/fesm2020/covalent-core-menu.mjs +37 -0
  224. package/fesm2020/covalent-core-menu.mjs.map +1 -0
  225. package/fesm2020/covalent-core-message.mjs +282 -0
  226. package/fesm2020/covalent-core-message.mjs.map +1 -0
  227. package/fesm2020/covalent-core-search.mjs +425 -0
  228. package/fesm2020/covalent-core-search.mjs.map +1 -0
  229. package/fesm2020/covalent-core-side-sheet.mjs +757 -0
  230. package/fesm2020/covalent-core-side-sheet.mjs.map +1 -0
  231. package/fesm2020/covalent-core-user-profile.mjs +86 -0
  232. package/fesm2020/covalent-core-user-profile.mjs.map +1 -0
  233. package/fesm2020/covalent-core.mjs +4 -0
  234. package/fesm2020/covalent-core.mjs.map +1 -0
  235. package/file/_file-theme.scss +3 -1
  236. package/file/covalent-core-file.d.ts +2 -1
  237. package/file/directives/file-drop.directive.d.ts +8 -6
  238. package/file/directives/file-select.directive.d.ts +5 -2
  239. package/file/file-input/file-input.component.d.ts +10 -5
  240. package/file/file-upload/file-upload.component.d.ts +18 -8
  241. package/file/file.module.d.ts +13 -0
  242. package/file/package.json +6 -7
  243. package/file/{public-api.d.ts → public_api.d.ts} +0 -0
  244. package/file/services/file.service.d.ts +3 -0
  245. package/file/{file-input → src/file-input}/README.md +46 -37
  246. package/file/{file-upload → src/file-upload}/README.md +36 -27
  247. package/json-formatter/README.md +8 -8
  248. package/json-formatter/_json-formatter-theme.scss +10 -0
  249. package/json-formatter/collapse.animation.d.ts +24 -0
  250. package/json-formatter/covalent-core-json-formatter.d.ts +2 -1
  251. package/json-formatter/json-formatter.component.d.ts +7 -4
  252. package/json-formatter/json-formatter.module.d.ts +8 -0
  253. package/json-formatter/package.json +6 -7
  254. package/json-formatter/{public-api.d.ts → public_api.d.ts} +0 -0
  255. package/layout/README.md +48 -50
  256. package/layout/_layout-theme.scss +12 -0
  257. package/layout/covalent-core-layout.d.ts +2 -1
  258. package/layout/layout-card-over/layout-card-over.component.d.ts +6 -3
  259. package/layout/layout-footer/layout-footer.component.d.ts +6 -3
  260. package/layout/layout-manage-list/layout-manage-list.component.d.ts +7 -4
  261. package/layout/layout-manage-list/layout-manage-list.directives.d.ts +9 -2
  262. package/layout/layout-nav/layout-nav.component.d.ts +8 -5
  263. package/layout/layout-nav-list/layout-nav-list.component.d.ts +12 -9
  264. package/layout/layout-nav-list/layout-nav-list.directives.d.ts +9 -2
  265. package/layout/layout-toggle.class.d.ts +4 -1
  266. package/layout/layout.component.d.ts +7 -4
  267. package/layout/layout.directives.d.ts +9 -2
  268. package/layout/layout.module.d.ts +23 -0
  269. package/layout/navigation-drawer/navigation-drawer.component.d.ts +17 -10
  270. package/layout/package.json +6 -7
  271. package/layout/{public-api.d.ts → public_api.d.ts} +0 -0
  272. package/layout/{layout-card-over → src/layout-card-over}/README.md +19 -17
  273. package/layout/{layout-manage-list → src/layout-manage-list}/README.md +24 -28
  274. package/layout/src/layout-nav/README.md +50 -0
  275. package/layout/{layout-nav-list → src/layout-nav-list}/README.md +44 -40
  276. package/menu/covalent-core-menu.d.ts +2 -1
  277. package/menu/menu.component.d.ts +3 -0
  278. package/menu/menu.module.d.ts +8 -0
  279. package/menu/package.json +6 -7
  280. package/menu/{public-api.d.ts → public_api.d.ts} +0 -0
  281. package/message/README.md +26 -18
  282. package/message/_message-theme.scss +3 -0
  283. package/message/collapse.animation.d.ts +24 -0
  284. package/message/covalent-core-message.d.ts +2 -1
  285. package/message/message.component.d.ts +9 -4
  286. package/message/message.module.d.ts +7 -0
  287. package/message/package.json +6 -7
  288. package/message/{public-api.d.ts → public_api.d.ts} +0 -0
  289. package/package.json +129 -37
  290. package/{index.d.ts → public_api.d.ts} +0 -0
  291. package/search/README.md +74 -73
  292. package/search/covalent-core-search.d.ts +2 -1
  293. package/search/package.json +6 -7
  294. package/search/{public-api.d.ts → public_api.d.ts} +0 -0
  295. package/search/search-box/search-box.component.d.ts +12 -5
  296. package/search/search-input/search-input.component.d.ts +12 -5
  297. package/search/search.module.d.ts +11 -0
  298. package/search/src/search-box/README.md +73 -0
  299. package/search/src/search-input/README.md +74 -0
  300. package/side-sheet/README.md +3 -5
  301. package/side-sheet/{side-sheet.theme.scss → _side-sheet.theme.scss} +0 -0
  302. package/side-sheet/covalent-core-side-sheet.d.ts +2 -3
  303. package/side-sheet/package.json +6 -7
  304. package/side-sheet/{public-api.d.ts → public_api.d.ts} +0 -0
  305. package/side-sheet/side-sheet-container.d.ts +21 -5
  306. package/side-sheet/side-sheet.content-directives.d.ts +23 -6
  307. package/side-sheet/side-sheet.d.ts +7 -2
  308. package/side-sheet/side-sheet.module.d.ts +9 -0
  309. package/user-profile/README.md +5 -5
  310. package/user-profile/covalent-core-user-profile.d.ts +2 -1
  311. package/user-profile/package.json +6 -7
  312. package/user-profile/user-profile-menu/user-profile-menu.component.d.ts +5 -2
  313. package/user-profile/user-profile.component.d.ts +5 -2
  314. package/user-profile/user-profile.module.d.ts +12 -0
  315. package/breadcrumbs/breadcrumb/breadcrumb.component.scss +0 -22
  316. package/breadcrumbs/breadcrumbs.component.scss +0 -7
  317. package/breadcrumbs/covalent-core-breadcrumbs.metadata.json +0 -1
  318. package/breadcrumbs/index.d.ts +0 -1
  319. package/bundles/covalent-core-breadcrumbs.umd.js +0 -490
  320. package/bundles/covalent-core-breadcrumbs.umd.js.map +0 -1
  321. package/bundles/covalent-core-breadcrumbs.umd.min.js +0 -2
  322. package/bundles/covalent-core-breadcrumbs.umd.min.js.map +0 -1
  323. package/bundles/covalent-core-common.umd.js +0 -3188
  324. package/bundles/covalent-core-common.umd.js.map +0 -1
  325. package/bundles/covalent-core-common.umd.min.js +0 -17
  326. package/bundles/covalent-core-common.umd.min.js.map +0 -1
  327. package/bundles/covalent-core-dialogs.umd.js +0 -1318
  328. package/bundles/covalent-core-dialogs.umd.js.map +0 -1
  329. package/bundles/covalent-core-dialogs.umd.min.js +0 -2
  330. package/bundles/covalent-core-dialogs.umd.min.js.map +0 -1
  331. package/bundles/covalent-core-dynamic-menu.umd.js +0 -215
  332. package/bundles/covalent-core-dynamic-menu.umd.js.map +0 -1
  333. package/bundles/covalent-core-dynamic-menu.umd.min.js +0 -2
  334. package/bundles/covalent-core-dynamic-menu.umd.min.js.map +0 -1
  335. package/bundles/covalent-core-file.umd.js +0 -1211
  336. package/bundles/covalent-core-file.umd.js.map +0 -1
  337. package/bundles/covalent-core-file.umd.min.js +0 -17
  338. package/bundles/covalent-core-file.umd.min.js.map +0 -1
  339. package/bundles/covalent-core-json-formatter.umd.js +0 -408
  340. package/bundles/covalent-core-json-formatter.umd.js.map +0 -1
  341. package/bundles/covalent-core-json-formatter.umd.min.js +0 -2
  342. package/bundles/covalent-core-json-formatter.umd.min.js.map +0 -1
  343. package/bundles/covalent-core-layout.umd.js +0 -2084
  344. package/bundles/covalent-core-layout.umd.js.map +0 -1
  345. package/bundles/covalent-core-layout.umd.min.js +0 -17
  346. package/bundles/covalent-core-layout.umd.min.js.map +0 -1
  347. package/bundles/covalent-core-menu.umd.js +0 -69
  348. package/bundles/covalent-core-menu.umd.js.map +0 -1
  349. package/bundles/covalent-core-menu.umd.min.js +0 -2
  350. package/bundles/covalent-core-menu.umd.min.js.map +0 -1
  351. package/bundles/covalent-core-message.umd.js +0 -375
  352. package/bundles/covalent-core-message.umd.js.map +0 -1
  353. package/bundles/covalent-core-message.umd.min.js +0 -2
  354. package/bundles/covalent-core-message.umd.min.js.map +0 -1
  355. package/bundles/covalent-core-search.umd.js +0 -877
  356. package/bundles/covalent-core-search.umd.js.map +0 -1
  357. package/bundles/covalent-core-search.umd.min.js +0 -16
  358. package/bundles/covalent-core-search.umd.min.js.map +0 -1
  359. package/bundles/covalent-core-side-sheet.umd.js +0 -1458
  360. package/bundles/covalent-core-side-sheet.umd.js.map +0 -1
  361. package/bundles/covalent-core-side-sheet.umd.min.js +0 -16
  362. package/bundles/covalent-core-side-sheet.umd.min.js.map +0 -1
  363. package/bundles/covalent-core-user-profile.umd.js +0 -116
  364. package/bundles/covalent-core-user-profile.umd.js.map +0 -1
  365. package/bundles/covalent-core-user-profile.umd.min.js +0 -2
  366. package/bundles/covalent-core-user-profile.umd.min.js.map +0 -1
  367. package/bundles/covalent-core.umd.js +0 -9
  368. package/bundles/covalent-core.umd.js.map +0 -1
  369. package/bundles/covalent-core.umd.min.js +0 -2
  370. package/bundles/covalent-core.umd.min.js.map +0 -1
  371. package/common/covalent-core-common.metadata.json +0 -1
  372. package/common/index.d.ts +0 -1
  373. package/common/material-icons.css +0 -98
  374. package/common/material-icons.css.map +0 -1
  375. package/common/material-icons.scss +0 -3
  376. package/common/platform.css +0 -15424
  377. package/common/platform.css.map +0 -1
  378. package/common/platform.scss +0 -7
  379. package/covalent-core.metadata.json +0 -1
  380. package/dialogs/alert-dialog/alert-dialog.component.scss +0 -3
  381. package/dialogs/confirm-dialog/confirm-dialog.component.scss +0 -3
  382. package/dialogs/covalent-core-dialogs.metadata.json +0 -1
  383. package/dialogs/dialog.component.scss +0 -44
  384. package/dialogs/index.d.ts +0 -1
  385. package/dialogs/prompt-dialog/prompt-dialog.component.scss +0 -15
  386. package/dialogs/window-dialog/window-dialog.component.scss +0 -31
  387. package/dynamic-menu/covalent-core-dynamic-menu.metadata.json +0 -1
  388. package/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.scss +0 -6
  389. package/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.scss +0 -11
  390. package/dynamic-menu/dynamic-menu.component.scss +0 -0
  391. package/dynamic-menu/index.d.ts +0 -1
  392. package/esm2015/breadcrumbs/breadcrumb/breadcrumb.component.js +0 -171
  393. package/esm2015/breadcrumbs/breadcrumbs.component.js +0 -241
  394. package/esm2015/breadcrumbs/breadcrumbs.module.js +0 -20
  395. package/esm2015/breadcrumbs/covalent-core-breadcrumbs.js +0 -10
  396. package/esm2015/breadcrumbs/index.js +0 -7
  397. package/esm2015/breadcrumbs/public-api.js +0 -9
  398. package/esm2015/common/animations/bounce/bounce.animation.js +0 -76
  399. package/esm2015/common/animations/collapse/collapse.animation.js +0 -67
  400. package/esm2015/common/animations/common/interfaces.js +0 -18
  401. package/esm2015/common/animations/fade/fadeInOut.animation.js +0 -53
  402. package/esm2015/common/animations/flash/flash.animation.js +0 -40
  403. package/esm2015/common/animations/headshake/headshake.animation.js +0 -41
  404. package/esm2015/common/animations/jello/jello.animation.js +0 -44
  405. package/esm2015/common/animations/pulse/pulse.animation.js +0 -38
  406. package/esm2015/common/animations/rotate/rotate.animation.js +0 -41
  407. package/esm2015/common/behaviors/control-value-accesor.mixin.js +0 -107
  408. package/esm2015/common/behaviors/disable-ripple.mixin.js +0 -63
  409. package/esm2015/common/behaviors/disabled.mixin.js +0 -63
  410. package/esm2015/common/common.module.js +0 -54
  411. package/esm2015/common/covalent-core-common.js +0 -12
  412. package/esm2015/common/directives/fullscreen/fullscreen.directive.js +0 -180
  413. package/esm2015/common/forms/auto-trim/auto-trim.directive.js +0 -46
  414. package/esm2015/common/forms/validators/validators.js +0 -58
  415. package/esm2015/common/functions/clipboard.js +0 -30
  416. package/esm2015/common/functions/convert.js +0 -103
  417. package/esm2015/common/functions/download.js +0 -88
  418. package/esm2015/common/functions/file.js +0 -29
  419. package/esm2015/common/index.js +0 -7
  420. package/esm2015/common/pipes/bytes/bytes.pipe.js +0 -41
  421. package/esm2015/common/pipes/decimal-bytes/decimal-bytes.pipe.js +0 -41
  422. package/esm2015/common/pipes/digits/digits.pipe.js +0 -65
  423. package/esm2015/common/pipes/time-ago/time-ago.pipe.js +0 -81
  424. package/esm2015/common/pipes/time-difference/time-difference.pipe.js +0 -66
  425. package/esm2015/common/pipes/time-until/time-until.pipe.js +0 -81
  426. package/esm2015/common/pipes/truncate/truncate.pipe.js +0 -34
  427. package/esm2015/common/public-api.js +0 -44
  428. package/esm2015/common/services/icon.service.js +0 -1109
  429. package/esm2015/common/services/router-path.service.js +0 -60
  430. package/esm2015/covalent-core.js +0 -10
  431. package/esm2015/dialogs/alert-dialog/alert-dialog.component.js +0 -47
  432. package/esm2015/dialogs/confirm-dialog/confirm-dialog.component.js +0 -59
  433. package/esm2015/dialogs/covalent-core-dialogs.js +0 -11
  434. package/esm2015/dialogs/dialog.component.js +0 -58
  435. package/esm2015/dialogs/dialogs.module.js +0 -57
  436. package/esm2015/dialogs/index.js +0 -7
  437. package/esm2015/dialogs/prompt-dialog/prompt-dialog.component.js +0 -83
  438. package/esm2015/dialogs/public-api.js +0 -13
  439. package/esm2015/dialogs/resizable-draggable-dialog/resizable-draggable-dialog.js +0 -325
  440. package/esm2015/dialogs/services/dialog.service.js +0 -316
  441. package/esm2015/dialogs/window-dialog/window-dialog.component.js +0 -56
  442. package/esm2015/dynamic-menu/covalent-core-dynamic-menu.js +0 -11
  443. package/esm2015/dynamic-menu/dynamic-menu-item/dynamic-menu-item.component.js +0 -40
  444. package/esm2015/dynamic-menu/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.js +0 -35
  445. package/esm2015/dynamic-menu/dynamic-menu.component.js +0 -89
  446. package/esm2015/dynamic-menu/dynamic-menu.module.js +0 -26
  447. package/esm2015/dynamic-menu/index.js +0 -7
  448. package/esm2015/dynamic-menu/public_api.js +0 -9
  449. package/esm2015/file/covalent-core-file.js +0 -10
  450. package/esm2015/file/directives/file-drop.directive.js +0 -191
  451. package/esm2015/file/directives/file-select.directive.js +0 -98
  452. package/esm2015/file/file-input/file-input.component.js +0 -186
  453. package/esm2015/file/file-upload/file-upload.component.js +0 -237
  454. package/esm2015/file/file.module.js +0 -35
  455. package/esm2015/file/index.js +0 -7
  456. package/esm2015/file/public-api.js +0 -12
  457. package/esm2015/file/services/file.service.js +0 -109
  458. package/esm2015/index.js +0 -7
  459. package/esm2015/json-formatter/covalent-core-json-formatter.js +0 -10
  460. package/esm2015/json-formatter/index.js +0 -7
  461. package/esm2015/json-formatter/json-formatter.component.js +0 -338
  462. package/esm2015/json-formatter/json-formatter.module.js +0 -20
  463. package/esm2015/json-formatter/public-api.js +0 -8
  464. package/esm2015/layout/covalent-core-layout.js +0 -10
  465. package/esm2015/layout/index.js +0 -7
  466. package/esm2015/layout/layout-card-over/layout-card-over.component.js +0 -71
  467. package/esm2015/layout/layout-footer/layout-footer.component.js +0 -71
  468. package/esm2015/layout/layout-manage-list/layout-manage-list.component.js +0 -145
  469. package/esm2015/layout/layout-manage-list/layout-manage-list.directives.js +0 -132
  470. package/esm2015/layout/layout-nav/layout-nav.component.js +0 -100
  471. package/esm2015/layout/layout-nav-list/layout-nav-list.component.js +0 -220
  472. package/esm2015/layout/layout-nav-list/layout-nav-list.directives.js +0 -132
  473. package/esm2015/layout/layout-toggle.class.js +0 -188
  474. package/esm2015/layout/layout.component.js +0 -145
  475. package/esm2015/layout/layout.directives.js +0 -129
  476. package/esm2015/layout/layout.module.js +0 -64
  477. package/esm2015/layout/navigation-drawer/navigation-drawer.component.js +0 -280
  478. package/esm2015/layout/public-api.js +0 -18
  479. package/esm2015/menu/covalent-core-menu.js +0 -10
  480. package/esm2015/menu/index.js +0 -7
  481. package/esm2015/menu/menu.component.js +0 -16
  482. package/esm2015/menu/menu.module.js +0 -22
  483. package/esm2015/menu/public-api.js +0 -8
  484. package/esm2015/message/covalent-core-message.js +0 -10
  485. package/esm2015/message/index.js +0 -7
  486. package/esm2015/message/message.component.js +0 -307
  487. package/esm2015/message/message.module.js +0 -21
  488. package/esm2015/message/public-api.js +0 -8
  489. package/esm2015/search/covalent-core-search.js +0 -10
  490. package/esm2015/search/index.js +0 -7
  491. package/esm2015/search/public-api.js +0 -9
  492. package/esm2015/search/search-box/search-box.component.js +0 -270
  493. package/esm2015/search/search-input/search-input.component.js +0 -260
  494. package/esm2015/search/search.module.js +0 -23
  495. package/esm2015/side-sheet/covalent-core-side-sheet.js +0 -12
  496. package/esm2015/side-sheet/index.js +0 -7
  497. package/esm2015/side-sheet/public-api.js +0 -11
  498. package/esm2015/side-sheet/side-sheet-container.js +0 -402
  499. package/esm2015/side-sheet/side-sheet-ref.js +0 -50
  500. package/esm2015/side-sheet/side-sheet.animation.js +0 -20
  501. package/esm2015/side-sheet/side-sheet.config.js +0 -12
  502. package/esm2015/side-sheet/side-sheet.content-directives.js +0 -255
  503. package/esm2015/side-sheet/side-sheet.js +0 -360
  504. package/esm2015/side-sheet/side-sheet.module.js +0 -36
  505. package/esm2015/user-profile/covalent-core-user-profile.js +0 -10
  506. package/esm2015/user-profile/index.js +0 -7
  507. package/esm2015/user-profile/public_api.js +0 -9
  508. package/esm2015/user-profile/user-profile-menu/user-profile-menu.component.js +0 -35
  509. package/esm2015/user-profile/user-profile.component.js +0 -26
  510. package/esm2015/user-profile/user-profile.module.js +0 -25
  511. package/fesm2015/covalent-core-breadcrumbs.js +0 -448
  512. package/fesm2015/covalent-core-breadcrumbs.js.map +0 -1
  513. package/fesm2015/covalent-core-common.js.map +0 -1
  514. package/fesm2015/covalent-core-dialogs.js +0 -1001
  515. package/fesm2015/covalent-core-dialogs.js.map +0 -1
  516. package/fesm2015/covalent-core-dynamic-menu.js +0 -204
  517. package/fesm2015/covalent-core-dynamic-menu.js.map +0 -1
  518. package/fesm2015/covalent-core-file.js +0 -855
  519. package/fesm2015/covalent-core-file.js.map +0 -1
  520. package/fesm2015/covalent-core-json-formatter.js +0 -377
  521. package/fesm2015/covalent-core-json-formatter.js.map +0 -1
  522. package/fesm2015/covalent-core-layout.js +0 -1663
  523. package/fesm2015/covalent-core-layout.js.map +0 -1
  524. package/fesm2015/covalent-core-menu.js +0 -57
  525. package/fesm2015/covalent-core-menu.js.map +0 -1
  526. package/fesm2015/covalent-core-message.js +0 -347
  527. package/fesm2015/covalent-core-message.js.map +0 -1
  528. package/fesm2015/covalent-core-search.js +0 -564
  529. package/fesm2015/covalent-core-search.js.map +0 -1
  530. package/fesm2015/covalent-core-side-sheet.js +0 -1134
  531. package/fesm2015/covalent-core-side-sheet.js.map +0 -1
  532. package/fesm2015/covalent-core-user-profile.js +0 -103
  533. package/fesm2015/covalent-core-user-profile.js.map +0 -1
  534. package/fesm2015/covalent-core.js +0 -12
  535. package/fesm2015/covalent-core.js.map +0 -1
  536. package/file/covalent-core-file.metadata.json +0 -1
  537. package/file/file-input/file-input.component.scss +0 -20
  538. package/file/file-upload/file-upload.component.scss +0 -30
  539. package/file/index.d.ts +0 -1
  540. package/json-formatter/covalent-core-json-formatter.metadata.json +0 -1
  541. package/json-formatter/index.d.ts +0 -1
  542. package/json-formatter/json-formatter.component.scss +0 -61
  543. package/layout/covalent-core-layout.metadata.json +0 -1
  544. package/layout/index.d.ts +0 -1
  545. package/layout/layout-card-over/layout-card-over.component.scss +0 -42
  546. package/layout/layout-footer/layout-footer.component.scss +0 -4
  547. package/layout/layout-manage-list/layout-manage-list.component.scss +0 -78
  548. package/layout/layout-nav/README.md +0 -46
  549. package/layout/layout-nav/layout-nav.component.scss +0 -50
  550. package/layout/layout-nav-list/layout-nav-list.component.scss +0 -110
  551. package/layout/layout.component.scss +0 -20
  552. package/layout/navigation-drawer/navigation-drawer.component.scss +0 -73
  553. package/menu/covalent-core-menu.metadata.json +0 -1
  554. package/menu/index.d.ts +0 -1
  555. package/menu/menu.component.scss +0 -43
  556. package/message/covalent-core-message.metadata.json +0 -1
  557. package/message/index.d.ts +0 -1
  558. package/message/message.component.scss +0 -29
  559. package/schematics/README.md +0 -66
  560. package/schematics/collection.json +0 -11
  561. package/schematics/components.js +0 -111
  562. package/schematics/components.js.map +0 -1
  563. package/schematics/migration.json +0 -10
  564. package/schematics/ng-add/files/theme.scss +0 -64
  565. package/schematics/ng-add/index.js +0 -58
  566. package/schematics/ng-add/index.js.map +0 -1
  567. package/schematics/ng-add/schema.js +0 -3
  568. package/schematics/ng-add/schema.js.map +0 -1
  569. package/schematics/ng-add/schema.json +0 -81
  570. package/schematics/ng-update/index.js +0 -52
  571. package/schematics/ng-update/index.js.map +0 -1
  572. package/schematics/ng-update/target-version.js +0 -8
  573. package/schematics/ng-update/target-version.js.map +0 -1
  574. package/schematics/version-names.js +0 -6
  575. package/schematics/version-names.js.map +0 -1
  576. package/search/covalent-core-search.metadata.json +0 -1
  577. package/search/index.d.ts +0 -1
  578. package/search/search-box/README.md +0 -62
  579. package/search/search-box/search-box.component.scss +0 -32
  580. package/search/search-input/README.md +0 -65
  581. package/search/search-input/search-input.component.scss +0 -63
  582. package/side-sheet/covalent-core-side-sheet.metadata.json +0 -1
  583. package/side-sheet/index.d.ts +0 -1
  584. package/side-sheet/side-sheet.scss +0 -69
  585. package/theming/prebuilt/blue-grey-deep-orange.css +0 -2434
  586. package/theming/prebuilt/blue-grey-deep-orange.css.map +0 -1
  587. package/theming/prebuilt/blue-grey-deep-orange.scss +0 -13
  588. package/theming/prebuilt/blue-orange.css +0 -2434
  589. package/theming/prebuilt/blue-orange.css.map +0 -1
  590. package/theming/prebuilt/blue-orange.scss +0 -13
  591. package/theming/prebuilt/indigo-pink.css +0 -2434
  592. package/theming/prebuilt/indigo-pink.css.map +0 -1
  593. package/theming/prebuilt/indigo-pink.scss +0 -13
  594. package/theming/prebuilt/orange-light-blue.css +0 -2434
  595. package/theming/prebuilt/orange-light-blue.css.map +0 -1
  596. package/theming/prebuilt/orange-light-blue.scss +0 -13
  597. package/theming/prebuilt/teal-orange.css +0 -2434
  598. package/theming/prebuilt/teal-orange.css.map +0 -1
  599. package/theming/prebuilt/teal-orange.scss +0 -13
  600. package/user-profile/covalent-core-user-profile.metadata.json +0 -1
  601. package/user-profile/index.d.ts +0 -1
  602. 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