@covalent/core 3.1.2-beta.4 → 4.0.0

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 (348) hide show
  1. package/bundles/covalent-core-side-sheet.umd.js +1458 -0
  2. package/bundles/covalent-core-side-sheet.umd.js.map +1 -0
  3. package/bundles/covalent-core-side-sheet.umd.min.js +16 -0
  4. package/bundles/covalent-core-side-sheet.umd.min.js.map +1 -0
  5. package/bundles/covalent-core-user-profile.umd.js +1 -9
  6. package/bundles/covalent-core-user-profile.umd.js.map +1 -1
  7. package/bundles/covalent-core-user-profile.umd.min.js.map +1 -1
  8. package/dialogs/_dialog-theme.scss +1 -0
  9. package/esm2015/side-sheet/covalent-core-side-sheet.js +12 -0
  10. package/esm2015/side-sheet/index.js +7 -0
  11. package/esm2015/side-sheet/public-api.js +11 -0
  12. package/esm2015/side-sheet/side-sheet-container.js +402 -0
  13. package/esm2015/side-sheet/side-sheet-ref.js +50 -0
  14. package/esm2015/side-sheet/side-sheet.animation.js +20 -0
  15. package/esm2015/side-sheet/side-sheet.config.js +12 -0
  16. package/esm2015/side-sheet/side-sheet.content-directives.js +255 -0
  17. package/esm2015/side-sheet/side-sheet.js +360 -0
  18. package/esm2015/side-sheet/side-sheet.module.js +36 -0
  19. package/esm2015/user-profile/user-profile.module.js +3 -11
  20. package/fesm2015/covalent-core-side-sheet.js +1134 -0
  21. package/fesm2015/covalent-core-side-sheet.js.map +1 -0
  22. package/fesm2015/covalent-core-user-profile.js +1 -9
  23. package/fesm2015/covalent-core-user-profile.js.map +1 -1
  24. package/package.json +1 -1
  25. package/schematics/components.js +1 -14
  26. package/schematics/components.js.map +1 -1
  27. package/side-sheet/README.md +66 -0
  28. package/side-sheet/covalent-core-side-sheet.d.ts +6 -0
  29. package/side-sheet/covalent-core-side-sheet.metadata.json +1 -0
  30. package/{chips → side-sheet}/index.d.ts +0 -0
  31. package/side-sheet/package.json +11 -0
  32. package/side-sheet/public-api.d.ts +5 -0
  33. package/side-sheet/side-sheet-container.d.ts +94 -0
  34. package/side-sheet/side-sheet-ref.d.ts +10 -0
  35. package/side-sheet/side-sheet.animation.d.ts +4 -0
  36. package/side-sheet/side-sheet.config.d.ts +3 -0
  37. package/side-sheet/side-sheet.content-directives.d.ts +50 -0
  38. package/side-sheet/side-sheet.d.ts +61 -0
  39. package/side-sheet/side-sheet.module.d.ts +2 -0
  40. package/side-sheet/side-sheet.scss +69 -0
  41. package/side-sheet/side-sheet.theme.scss +8 -0
  42. package/theming/_all-theme.scss +2 -14
  43. package/theming/prebuilt/blue-grey-deep-orange.css +5 -249
  44. package/theming/prebuilt/blue-grey-deep-orange.css.map +1 -1
  45. package/theming/prebuilt/blue-orange.css +5 -249
  46. package/theming/prebuilt/blue-orange.css.map +1 -1
  47. package/theming/prebuilt/indigo-pink.css +5 -249
  48. package/theming/prebuilt/indigo-pink.css.map +1 -1
  49. package/theming/prebuilt/orange-light-blue.css +5 -249
  50. package/theming/prebuilt/orange-light-blue.css.map +1 -1
  51. package/theming/prebuilt/teal-orange.css +5 -249
  52. package/theming/prebuilt/teal-orange.css.map +1 -1
  53. package/typography/_all-typography.scss +0 -10
  54. package/user-profile/covalent-core-user-profile.metadata.json +1 -1
  55. package/bundles/covalent-core-chips.umd.js +0 -1507
  56. package/bundles/covalent-core-chips.umd.js.map +0 -1
  57. package/bundles/covalent-core-chips.umd.min.js +0 -16
  58. package/bundles/covalent-core-chips.umd.min.js.map +0 -1
  59. package/bundles/covalent-core-data-table.umd.js +0 -2756
  60. package/bundles/covalent-core-data-table.umd.js.map +0 -1
  61. package/bundles/covalent-core-data-table.umd.min.js +0 -16
  62. package/bundles/covalent-core-data-table.umd.min.js.map +0 -1
  63. package/bundles/covalent-core-expansion-panel.umd.js +0 -853
  64. package/bundles/covalent-core-expansion-panel.umd.js.map +0 -1
  65. package/bundles/covalent-core-expansion-panel.umd.min.js +0 -16
  66. package/bundles/covalent-core-expansion-panel.umd.min.js.map +0 -1
  67. package/bundles/covalent-core-loading.umd.js +0 -1534
  68. package/bundles/covalent-core-loading.umd.js.map +0 -1
  69. package/bundles/covalent-core-loading.umd.min.js +0 -16
  70. package/bundles/covalent-core-loading.umd.min.js.map +0 -1
  71. package/bundles/covalent-core-media.umd.js +0 -749
  72. package/bundles/covalent-core-media.umd.js.map +0 -1
  73. package/bundles/covalent-core-media.umd.min.js +0 -16
  74. package/bundles/covalent-core-media.umd.min.js.map +0 -1
  75. package/bundles/covalent-core-nav-links.umd.js +0 -197
  76. package/bundles/covalent-core-nav-links.umd.js.map +0 -1
  77. package/bundles/covalent-core-nav-links.umd.min.js +0 -2
  78. package/bundles/covalent-core-nav-links.umd.min.js.map +0 -1
  79. package/bundles/covalent-core-notifications.umd.js +0 -275
  80. package/bundles/covalent-core-notifications.umd.js.map +0 -1
  81. package/bundles/covalent-core-notifications.umd.min.js +0 -2
  82. package/bundles/covalent-core-notifications.umd.min.js.map +0 -1
  83. package/bundles/covalent-core-paging.umd.js +0 -491
  84. package/bundles/covalent-core-paging.umd.js.map +0 -1
  85. package/bundles/covalent-core-paging.umd.min.js +0 -2
  86. package/bundles/covalent-core-paging.umd.min.js.map +0 -1
  87. package/bundles/covalent-core-sidesheet.umd.js +0 -145
  88. package/bundles/covalent-core-sidesheet.umd.js.map +0 -1
  89. package/bundles/covalent-core-sidesheet.umd.min.js +0 -2
  90. package/bundles/covalent-core-sidesheet.umd.min.js.map +0 -1
  91. package/bundles/covalent-core-steps.umd.js +0 -1756
  92. package/bundles/covalent-core-steps.umd.js.map +0 -1
  93. package/bundles/covalent-core-steps.umd.min.js +0 -16
  94. package/bundles/covalent-core-steps.umd.min.js.map +0 -1
  95. package/bundles/covalent-core-tab-select.umd.js +0 -732
  96. package/bundles/covalent-core-tab-select.umd.js.map +0 -1
  97. package/bundles/covalent-core-tab-select.umd.min.js +0 -16
  98. package/bundles/covalent-core-tab-select.umd.min.js.map +0 -1
  99. package/bundles/covalent-core-virtual-scroll.umd.js +0 -785
  100. package/bundles/covalent-core-virtual-scroll.umd.js.map +0 -1
  101. package/bundles/covalent-core-virtual-scroll.umd.min.js +0 -16
  102. package/bundles/covalent-core-virtual-scroll.umd.min.js.map +0 -1
  103. package/chips/README.md +0 -99
  104. package/chips/_chips-theme.scss +0 -87
  105. package/chips/chips.component.d.ts +0 -287
  106. package/chips/chips.component.scss +0 -147
  107. package/chips/chips.module.d.ts +0 -2
  108. package/chips/covalent-core-chips.d.ts +0 -4
  109. package/chips/covalent-core-chips.metadata.json +0 -1
  110. package/chips/package.json +0 -11
  111. package/chips/public-api.d.ts +0 -2
  112. package/data-table/README.md +0 -134
  113. package/data-table/_data-table-theme.scss +0 -115
  114. package/data-table/covalent-core-data-table.d.ts +0 -4
  115. package/data-table/covalent-core-data-table.metadata.json +0 -1
  116. package/data-table/data-table-cell/data-table-cell.component.d.ts +0 -22
  117. package/data-table/data-table-cell/data-table-cell.component.scss +0 -58
  118. package/data-table/data-table-column/data-table-column.component.d.ts +0 -63
  119. package/data-table/data-table-column/data-table-column.component.scss +0 -80
  120. package/data-table/data-table-row/data-table-row.component.d.ts +0 -20
  121. package/data-table/data-table-row/data-table-row.component.scss +0 -12
  122. package/data-table/data-table-table/data-table-table.component.d.ts +0 -6
  123. package/data-table/data-table-table/data-table-table.component.scss +0 -7
  124. package/data-table/data-table.component.d.ts +0 -356
  125. package/data-table/data-table.component.scss +0 -93
  126. package/data-table/data-table.module.d.ts +0 -2
  127. package/data-table/directives/data-table-template.directive.d.ts +0 -6
  128. package/data-table/index.d.ts +0 -1
  129. package/data-table/package.json +0 -11
  130. package/data-table/public-api.d.ts +0 -8
  131. package/data-table/services/data-table.service.d.ts +0 -31
  132. package/esm2015/chips/chips.component.js +0 -1115
  133. package/esm2015/chips/chips.module.js +0 -23
  134. package/esm2015/chips/covalent-core-chips.js +0 -10
  135. package/esm2015/chips/index.js +0 -7
  136. package/esm2015/chips/public-api.js +0 -8
  137. package/esm2015/data-table/covalent-core-data-table.js +0 -10
  138. package/esm2015/data-table/data-table-cell/data-table-cell.component.js +0 -88
  139. package/esm2015/data-table/data-table-column/data-table-column.component.js +0 -218
  140. package/esm2015/data-table/data-table-row/data-table-row.component.js +0 -132
  141. package/esm2015/data-table/data-table-table/data-table-table.component.js +0 -43
  142. package/esm2015/data-table/data-table.component.js +0 -1640
  143. package/esm2015/data-table/data-table.module.js +0 -39
  144. package/esm2015/data-table/directives/data-table-template.directive.js +0 -32
  145. package/esm2015/data-table/index.js +0 -7
  146. package/esm2015/data-table/public-api.js +0 -14
  147. package/esm2015/data-table/services/data-table.service.js +0 -116
  148. package/esm2015/expansion-panel/covalent-core-expansion-panel.js +0 -10
  149. package/esm2015/expansion-panel/expansion-panel-group.component.js +0 -212
  150. package/esm2015/expansion-panel/expansion-panel.component.js +0 -272
  151. package/esm2015/expansion-panel/expansion-panel.module.js +0 -31
  152. package/esm2015/expansion-panel/index.js +0 -7
  153. package/esm2015/expansion-panel/public-api.js +0 -9
  154. package/esm2015/loading/covalent-core-loading.js +0 -10
  155. package/esm2015/loading/directives/loading.directive.js +0 -231
  156. package/esm2015/loading/index.js +0 -7
  157. package/esm2015/loading/loading.component.js +0 -302
  158. package/esm2015/loading/loading.module.js +0 -30
  159. package/esm2015/loading/public-api.js +0 -11
  160. package/esm2015/loading/services/loading.factory.js +0 -297
  161. package/esm2015/loading/services/loading.service.js +0 -319
  162. package/esm2015/media/covalent-core-media.js +0 -10
  163. package/esm2015/media/directives/media-toggle.directive.js +0 -207
  164. package/esm2015/media/index.js +0 -7
  165. package/esm2015/media/media.module.js +0 -20
  166. package/esm2015/media/public-api.js +0 -9
  167. package/esm2015/media/services/media.service.js +0 -169
  168. package/esm2015/nav-links/covalent-core-nav-links.js +0 -10
  169. package/esm2015/nav-links/index.js +0 -7
  170. package/esm2015/nav-links/nav-links.component.js +0 -138
  171. package/esm2015/nav-links/nav-links.module.js +0 -37
  172. package/esm2015/nav-links/public-api.js +0 -8
  173. package/esm2015/notifications/covalent-core-notifications.js +0 -10
  174. package/esm2015/notifications/index.js +0 -7
  175. package/esm2015/notifications/notification-count.component.js +0 -191
  176. package/esm2015/notifications/notifications.module.js +0 -20
  177. package/esm2015/notifications/public-api.js +0 -8
  178. package/esm2015/paging/covalent-core-paging.js +0 -10
  179. package/esm2015/paging/index.js +0 -7
  180. package/esm2015/paging/paging-bar.component.js +0 -412
  181. package/esm2015/paging/paging.module.js +0 -20
  182. package/esm2015/paging/public-api.js +0 -8
  183. package/esm2015/sidesheet/covalent-core-sidesheet.js +0 -10
  184. package/esm2015/sidesheet/index.js +0 -7
  185. package/esm2015/sidesheet/public-api.js +0 -8
  186. package/esm2015/sidesheet/sidesheet.component.js +0 -72
  187. package/esm2015/sidesheet/sidesheet.module.js +0 -27
  188. package/esm2015/steps/covalent-core-steps.js +0 -10
  189. package/esm2015/steps/index.js +0 -7
  190. package/esm2015/steps/nav/nav-step-link/nav-step-link.component.js +0 -144
  191. package/esm2015/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.js +0 -371
  192. package/esm2015/steps/nav/nav-steps-vertical/nav-steps-vertical.component.js +0 -130
  193. package/esm2015/steps/public-api.js +0 -14
  194. package/esm2015/steps/step-body/step-body.component.js +0 -83
  195. package/esm2015/steps/step-header/step-header.component.js +0 -79
  196. package/esm2015/steps/step.component.js +0 -312
  197. package/esm2015/steps/steps.component.js +0 -234
  198. package/esm2015/steps/steps.module.js +0 -44
  199. package/esm2015/tab-select/covalent-core-tab-select.js +0 -10
  200. package/esm2015/tab-select/index.js +0 -7
  201. package/esm2015/tab-select/public-api.js +0 -9
  202. package/esm2015/tab-select/tab-option.component.js +0 -82
  203. package/esm2015/tab-select/tab-select.component.js +0 -291
  204. package/esm2015/tab-select/tab-select.module.js +0 -31
  205. package/esm2015/virtual-scroll/covalent-core-virtual-scroll.js +0 -10
  206. package/esm2015/virtual-scroll/index.js +0 -7
  207. package/esm2015/virtual-scroll/public-api.js +0 -9
  208. package/esm2015/virtual-scroll/virtual-scroll-container.component.js +0 -391
  209. package/esm2015/virtual-scroll/virtual-scroll-row.directive.js +0 -25
  210. package/esm2015/virtual-scroll/virtual-scroll.module.js +0 -21
  211. package/expansion-panel/README.md +0 -116
  212. package/expansion-panel/_expansion-panel-theme.scss +0 -80
  213. package/expansion-panel/covalent-core-expansion-panel.d.ts +0 -4
  214. package/expansion-panel/covalent-core-expansion-panel.metadata.json +0 -1
  215. package/expansion-panel/expansion-panel-group.component.d.ts +0 -31
  216. package/expansion-panel/expansion-panel-group.component.scss +0 -0
  217. package/expansion-panel/expansion-panel.component.d.ts +0 -82
  218. package/expansion-panel/expansion-panel.component.scss +0 -50
  219. package/expansion-panel/expansion-panel.module.d.ts +0 -2
  220. package/expansion-panel/index.d.ts +0 -1
  221. package/expansion-panel/package.json +0 -11
  222. package/expansion-panel/public-api.d.ts +0 -3
  223. package/fesm2015/covalent-core-chips.js +0 -1151
  224. package/fesm2015/covalent-core-chips.js.map +0 -1
  225. package/fesm2015/covalent-core-data-table.js +0 -2309
  226. package/fesm2015/covalent-core-data-table.js.map +0 -1
  227. package/fesm2015/covalent-core-expansion-panel.js +0 -528
  228. package/fesm2015/covalent-core-expansion-panel.js.map +0 -1
  229. package/fesm2015/covalent-core-loading.js +0 -1179
  230. package/fesm2015/covalent-core-loading.js.map +0 -1
  231. package/fesm2015/covalent-core-media.js +0 -411
  232. package/fesm2015/covalent-core-media.js.map +0 -1
  233. package/fesm2015/covalent-core-nav-links.js +0 -193
  234. package/fesm2015/covalent-core-nav-links.js.map +0 -1
  235. package/fesm2015/covalent-core-notifications.js +0 -228
  236. package/fesm2015/covalent-core-notifications.js.map +0 -1
  237. package/fesm2015/covalent-core-paging.js +0 -451
  238. package/fesm2015/covalent-core-paging.js.map +0 -1
  239. package/fesm2015/covalent-core-sidesheet.js +0 -118
  240. package/fesm2015/covalent-core-sidesheet.js.map +0 -1
  241. package/fesm2015/covalent-core-steps.js +0 -1384
  242. package/fesm2015/covalent-core-steps.js.map +0 -1
  243. package/fesm2015/covalent-core-tab-select.js +0 -416
  244. package/fesm2015/covalent-core-tab-select.js.map +0 -1
  245. package/fesm2015/covalent-core-virtual-scroll.js +0 -453
  246. package/fesm2015/covalent-core-virtual-scroll.js.map +0 -1
  247. package/loading/README.md +0 -180
  248. package/loading/_loading-theme.scss +0 -10
  249. package/loading/covalent-core-loading.d.ts +0 -4
  250. package/loading/covalent-core-loading.metadata.json +0 -1
  251. package/loading/directives/loading.directive.d.ts +0 -71
  252. package/loading/index.d.ts +0 -1
  253. package/loading/loading.component.d.ts +0 -87
  254. package/loading/loading.component.scss +0 -42
  255. package/loading/loading.module.d.ts +0 -2
  256. package/loading/package.json +0 -11
  257. package/loading/public-api.d.ts +0 -5
  258. package/loading/services/loading.factory.d.ts +0 -66
  259. package/loading/services/loading.service.d.ts +0 -118
  260. package/media/covalent-core-media.d.ts +0 -4
  261. package/media/covalent-core-media.metadata.json +0 -1
  262. package/media/directives/media-toggle.directive.d.ts +0 -42
  263. package/media/index.d.ts +0 -1
  264. package/media/media.module.d.ts +0 -2
  265. package/media/package.json +0 -11
  266. package/media/public-api.d.ts +0 -3
  267. package/media/services/media.service.d.ts +0 -31
  268. package/nav-links/README.md +0 -1
  269. package/nav-links/covalent-core-nav-links.d.ts +0 -4
  270. package/nav-links/covalent-core-nav-links.metadata.json +0 -1
  271. package/nav-links/index.d.ts +0 -1
  272. package/nav-links/nav-links.component.d.ts +0 -51
  273. package/nav-links/nav-links.component.scss +0 -15
  274. package/nav-links/nav-links.module.d.ts +0 -2
  275. package/nav-links/package.json +0 -11
  276. package/nav-links/public-api.d.ts +0 -2
  277. package/notifications/README.md +0 -69
  278. package/notifications/_notification-count-theme.scss +0 -27
  279. package/notifications/covalent-core-notifications.d.ts +0 -4
  280. package/notifications/covalent-core-notifications.metadata.json +0 -1
  281. package/notifications/index.d.ts +0 -1
  282. package/notifications/notification-count.component.d.ts +0 -74
  283. package/notifications/notification-count.component.scss +0 -90
  284. package/notifications/notifications.module.d.ts +0 -2
  285. package/notifications/package.json +0 -11
  286. package/notifications/public-api.d.ts +0 -2
  287. package/paging/README.md +0 -141
  288. package/paging/_paging-bar-theme.scss +0 -26
  289. package/paging/covalent-core-paging.d.ts +0 -4
  290. package/paging/covalent-core-paging.metadata.json +0 -1
  291. package/paging/index.d.ts +0 -1
  292. package/paging/package.json +0 -11
  293. package/paging/paging-bar.component.d.ts +0 -115
  294. package/paging/paging-bar.component.scss +0 -23
  295. package/paging/paging.module.d.ts +0 -2
  296. package/paging/public-api.d.ts +0 -2
  297. package/sidesheet/README.md +0 -68
  298. package/sidesheet/covalent-core-sidesheet.d.ts +0 -4
  299. package/sidesheet/covalent-core-sidesheet.metadata.json +0 -1
  300. package/sidesheet/index.d.ts +0 -1
  301. package/sidesheet/package.json +0 -11
  302. package/sidesheet/public-api.d.ts +0 -2
  303. package/sidesheet/sidesheet.component.d.ts +0 -13
  304. package/sidesheet/sidesheet.component.scss +0 -101
  305. package/sidesheet/sidesheet.module.d.ts +0 -2
  306. package/steps/README.md +0 -159
  307. package/steps/_steps-theme.scss +0 -108
  308. package/steps/covalent-core-steps.d.ts +0 -4
  309. package/steps/covalent-core-steps.metadata.json +0 -1
  310. package/steps/index.d.ts +0 -1
  311. package/steps/nav/README.md +0 -90
  312. package/steps/nav/nav-step-link/nav-step-link.component.d.ts +0 -42
  313. package/steps/nav/nav-step-link/nav-step-link.component.scss +0 -17
  314. package/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.d.ts +0 -79
  315. package/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.scss +0 -83
  316. package/steps/nav/nav-steps-vertical/nav-steps-vertical.component.d.ts +0 -18
  317. package/steps/nav/nav-steps-vertical/nav-steps-vertical.component.scss +0 -18
  318. package/steps/package.json +0 -11
  319. package/steps/public-api.d.ts +0 -8
  320. package/steps/step-body/step-body.component.d.ts +0 -25
  321. package/steps/step-body/step-body.component.scss +0 -29
  322. package/steps/step-header/step-header.component.d.ts +0 -35
  323. package/steps/step-header/step-header.component.scss +0 -90
  324. package/steps/step.component.d.ts +0 -97
  325. package/steps/steps.component.d.ts +0 -60
  326. package/steps/steps.component.scss +0 -55
  327. package/steps/steps.module.d.ts +0 -2
  328. package/tab-select/README.md +0 -93
  329. package/tab-select/covalent-core-tab-select.d.ts +0 -4
  330. package/tab-select/covalent-core-tab-select.metadata.json +0 -1
  331. package/tab-select/index.d.ts +0 -1
  332. package/tab-select/package.json +0 -11
  333. package/tab-select/public-api.d.ts +0 -3
  334. package/tab-select/tab-option.component.d.ts +0 -20
  335. package/tab-select/tab-option.component.scss +0 -0
  336. package/tab-select/tab-select.component.d.ts +0 -62
  337. package/tab-select/tab-select.component.scss +0 -3
  338. package/tab-select/tab-select.module.d.ts +0 -2
  339. package/virtual-scroll/README.md +0 -68
  340. package/virtual-scroll/covalent-core-virtual-scroll.d.ts +0 -4
  341. package/virtual-scroll/covalent-core-virtual-scroll.metadata.json +0 -1
  342. package/virtual-scroll/index.d.ts +0 -1
  343. package/virtual-scroll/package.json +0 -11
  344. package/virtual-scroll/public-api.d.ts +0 -3
  345. package/virtual-scroll/virtual-scroll-container.component.d.ts +0 -73
  346. package/virtual-scroll/virtual-scroll-container.component.scss +0 -7
  347. package/virtual-scroll/virtual-scroll-row.directive.d.ts +0 -5
  348. package/virtual-scroll/virtual-scroll.module.d.ts +0 -2
@@ -0,0 +1,1458 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/portal'), require('@angular/material/core'), require('@angular/material/dialog'), require('@angular/cdk/overlay'), require('@angular/cdk/a11y'), require('@angular/common'), require('@angular/animations'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/bidi')) :
3
+ typeof define === 'function' && define.amd ? define('@covalent/core/side-sheet', ['exports', '@angular/core', '@angular/cdk/portal', '@angular/material/core', '@angular/material/dialog', '@angular/cdk/overlay', '@angular/cdk/a11y', '@angular/common', '@angular/animations', 'rxjs', 'rxjs/operators', '@angular/cdk/bidi'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.covalent = global.covalent || {}, global.covalent.core = global.covalent.core || {}, global.covalent.core['side-sheet'] = {}), global.ng.core, global.ng.cdk.portal, global.ng.material.core, global.ng.material.dialog, global.ng.cdk.overlay, global.ng.cdk.a11y, global.ng.common, global.ng.animations, global.rxjs, global.rxjs.operators, global.ng.cdk.bidi));
5
+ }(this, (function (exports, core$1, portal, core, dialog, overlay, a11y, common, animations, rxjs, operators, bidi) { 'use strict';
6
+
7
+ /*! *****************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+ /* global Reflect, Promise */
22
+ var extendStatics = function (d, b) {
23
+ extendStatics = Object.setPrototypeOf ||
24
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25
+ function (d, b) { for (var p in b)
26
+ if (Object.prototype.hasOwnProperty.call(b, p))
27
+ d[p] = b[p]; };
28
+ return extendStatics(d, b);
29
+ };
30
+ function __extends(d, b) {
31
+ extendStatics(d, b);
32
+ function __() { this.constructor = d; }
33
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
+ }
35
+ var __assign = function () {
36
+ __assign = Object.assign || function __assign(t) {
37
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
38
+ s = arguments[i];
39
+ for (var p in s)
40
+ if (Object.prototype.hasOwnProperty.call(s, p))
41
+ t[p] = s[p];
42
+ }
43
+ return t;
44
+ };
45
+ return __assign.apply(this, arguments);
46
+ };
47
+ function __rest(s, e) {
48
+ var t = {};
49
+ for (var p in s)
50
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
+ t[p] = s[p];
52
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
+ t[p[i]] = s[p[i]];
56
+ }
57
+ return t;
58
+ }
59
+ function __decorate(decorators, target, key, desc) {
60
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
62
+ r = Reflect.decorate(decorators, target, key, desc);
63
+ else
64
+ for (var i = decorators.length - 1; i >= 0; i--)
65
+ if (d = decorators[i])
66
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
67
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
68
+ }
69
+ function __param(paramIndex, decorator) {
70
+ return function (target, key) { decorator(target, key, paramIndex); };
71
+ }
72
+ function __metadata(metadataKey, metadataValue) {
73
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
74
+ return Reflect.metadata(metadataKey, metadataValue);
75
+ }
76
+ function __awaiter(thisArg, _arguments, P, generator) {
77
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
78
+ return new (P || (P = Promise))(function (resolve, reject) {
79
+ function fulfilled(value) { try {
80
+ step(generator.next(value));
81
+ }
82
+ catch (e) {
83
+ reject(e);
84
+ } }
85
+ function rejected(value) { try {
86
+ step(generator["throw"](value));
87
+ }
88
+ catch (e) {
89
+ reject(e);
90
+ } }
91
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
92
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
93
+ });
94
+ }
95
+ function __generator(thisArg, body) {
96
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
97
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
98
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
99
+ function verb(n) { return function (v) { return step([n, v]); }; }
100
+ function step(op) {
101
+ if (f)
102
+ throw new TypeError("Generator is already executing.");
103
+ while (_)
104
+ try {
105
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
106
+ return t;
107
+ if (y = 0, t)
108
+ op = [op[0] & 2, t.value];
109
+ switch (op[0]) {
110
+ case 0:
111
+ case 1:
112
+ t = op;
113
+ break;
114
+ case 4:
115
+ _.label++;
116
+ return { value: op[1], done: false };
117
+ case 5:
118
+ _.label++;
119
+ y = op[1];
120
+ op = [0];
121
+ continue;
122
+ case 7:
123
+ op = _.ops.pop();
124
+ _.trys.pop();
125
+ continue;
126
+ default:
127
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
128
+ _ = 0;
129
+ continue;
130
+ }
131
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
132
+ _.label = op[1];
133
+ break;
134
+ }
135
+ if (op[0] === 6 && _.label < t[1]) {
136
+ _.label = t[1];
137
+ t = op;
138
+ break;
139
+ }
140
+ if (t && _.label < t[2]) {
141
+ _.label = t[2];
142
+ _.ops.push(op);
143
+ break;
144
+ }
145
+ if (t[2])
146
+ _.ops.pop();
147
+ _.trys.pop();
148
+ continue;
149
+ }
150
+ op = body.call(thisArg, _);
151
+ }
152
+ catch (e) {
153
+ op = [6, e];
154
+ y = 0;
155
+ }
156
+ finally {
157
+ f = t = 0;
158
+ }
159
+ if (op[0] & 5)
160
+ throw op[1];
161
+ return { value: op[0] ? op[1] : void 0, done: true };
162
+ }
163
+ }
164
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
165
+ if (k2 === undefined)
166
+ k2 = k;
167
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
168
+ }) : (function (o, m, k, k2) {
169
+ if (k2 === undefined)
170
+ k2 = k;
171
+ o[k2] = m[k];
172
+ });
173
+ function __exportStar(m, o) {
174
+ for (var p in m)
175
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
176
+ __createBinding(o, m, p);
177
+ }
178
+ function __values(o) {
179
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
180
+ if (m)
181
+ return m.call(o);
182
+ if (o && typeof o.length === "number")
183
+ return {
184
+ next: function () {
185
+ if (o && i >= o.length)
186
+ o = void 0;
187
+ return { value: o && o[i++], done: !o };
188
+ }
189
+ };
190
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
191
+ }
192
+ function __read(o, n) {
193
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
194
+ if (!m)
195
+ return o;
196
+ var i = m.call(o), r, ar = [], e;
197
+ try {
198
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
199
+ ar.push(r.value);
200
+ }
201
+ catch (error) {
202
+ e = { error: error };
203
+ }
204
+ finally {
205
+ try {
206
+ if (r && !r.done && (m = i["return"]))
207
+ m.call(i);
208
+ }
209
+ finally {
210
+ if (e)
211
+ throw e.error;
212
+ }
213
+ }
214
+ return ar;
215
+ }
216
+ function __spread() {
217
+ for (var ar = [], i = 0; i < arguments.length; i++)
218
+ ar = ar.concat(__read(arguments[i]));
219
+ return ar;
220
+ }
221
+ function __spreadArrays() {
222
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
223
+ s += arguments[i].length;
224
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
225
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
226
+ r[k] = a[j];
227
+ return r;
228
+ }
229
+ ;
230
+ function __await(v) {
231
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
232
+ }
233
+ function __asyncGenerator(thisArg, _arguments, generator) {
234
+ if (!Symbol.asyncIterator)
235
+ throw new TypeError("Symbol.asyncIterator is not defined.");
236
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
237
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
238
+ function verb(n) { if (g[n])
239
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
240
+ function resume(n, v) { try {
241
+ step(g[n](v));
242
+ }
243
+ catch (e) {
244
+ settle(q[0][3], e);
245
+ } }
246
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
247
+ function fulfill(value) { resume("next", value); }
248
+ function reject(value) { resume("throw", value); }
249
+ function settle(f, v) { if (f(v), q.shift(), q.length)
250
+ resume(q[0][0], q[0][1]); }
251
+ }
252
+ function __asyncDelegator(o) {
253
+ var i, p;
254
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
255
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
256
+ }
257
+ function __asyncValues(o) {
258
+ if (!Symbol.asyncIterator)
259
+ throw new TypeError("Symbol.asyncIterator is not defined.");
260
+ var m = o[Symbol.asyncIterator], i;
261
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
262
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
263
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
264
+ }
265
+ function __makeTemplateObject(cooked, raw) {
266
+ if (Object.defineProperty) {
267
+ Object.defineProperty(cooked, "raw", { value: raw });
268
+ }
269
+ else {
270
+ cooked.raw = raw;
271
+ }
272
+ return cooked;
273
+ }
274
+ ;
275
+ var __setModuleDefault = Object.create ? (function (o, v) {
276
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
277
+ }) : function (o, v) {
278
+ o["default"] = v;
279
+ };
280
+ function __importStar(mod) {
281
+ if (mod && mod.__esModule)
282
+ return mod;
283
+ var result = {};
284
+ if (mod != null)
285
+ for (var k in mod)
286
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
287
+ __createBinding(result, mod, k);
288
+ __setModuleDefault(result, mod);
289
+ return result;
290
+ }
291
+ function __importDefault(mod) {
292
+ return (mod && mod.__esModule) ? mod : { default: mod };
293
+ }
294
+ function __classPrivateFieldGet(receiver, privateMap) {
295
+ if (!privateMap.has(receiver)) {
296
+ throw new TypeError("attempted to get private field on non-instance");
297
+ }
298
+ return privateMap.get(receiver);
299
+ }
300
+ function __classPrivateFieldSet(receiver, privateMap, value) {
301
+ if (!privateMap.has(receiver)) {
302
+ throw new TypeError("attempted to set private field on non-instance");
303
+ }
304
+ privateMap.set(receiver, value);
305
+ return value;
306
+ }
307
+
308
+ /**
309
+ * @fileoverview added by tsickle
310
+ * Generated from: side-sheet.animation.ts
311
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
312
+ */
313
+ /** @type {?} */
314
+ var tdSideSheetAnimations = {
315
+ /**
316
+ * Animation that is applied on the side-sheet container by default.
317
+ */
318
+ sideSheetContainer: animations.trigger('sideSheetContainer', [
319
+ animations.state('void, exit', animations.style({ transform: 'translateX(100%)' })),
320
+ animations.state('enter', animations.style({ transform: 'translateX(0%)', opacity: 1 })),
321
+ animations.transition('* => enter', animations.animate(core.AnimationDurations.ENTERING + " " + core.AnimationCurves.ACCELERATION_CURVE, animations.style({ transform: 'translateX(0)', opacity: 1 }))),
322
+ animations.transition('* => void, * => exit', animations.animate(core.AnimationDurations.EXITING + " " + core.AnimationCurves.ACCELERATION_CURVE, animations.style({ transform: 'translateX(100%)' }))),
323
+ ]),
324
+ };
325
+
326
+ /**
327
+ * @template D
328
+ */
329
+ var CovalentSideSheetConfig = /** @class */ (function (_super) {
330
+ __extends(CovalentSideSheetConfig, _super);
331
+ function CovalentSideSheetConfig() {
332
+ return _super !== null && _super.apply(this, arguments) || this;
333
+ }
334
+ return CovalentSideSheetConfig;
335
+ }(dialog.MatDialogConfig));
336
+
337
+ /**
338
+ * @return {?}
339
+ */
340
+ function _getFocusedElementPierceShadowDom() {
341
+ /** @type {?} */
342
+ var activeElement = typeof document !== 'undefined' && document ? (( /** @type {?} */(document.activeElement))) : null;
343
+ while (activeElement && activeElement.shadowRoot) {
344
+ /** @type {?} */
345
+ var newActiveElement = ( /** @type {?} */(activeElement.shadowRoot.activeElement));
346
+ if (newActiveElement === activeElement) {
347
+ break;
348
+ }
349
+ else {
350
+ activeElement = newActiveElement;
351
+ }
352
+ }
353
+ return activeElement;
354
+ }
355
+ /**
356
+ * Base class for the `CovalentSideSheetContainer`. The base class does not implement
357
+ * animations as these are left to implementers of the side-sheet container.
358
+ * @abstract
359
+ */
360
+ var _CovalentSideSheetContainerBase = /** @class */ (function (_super) {
361
+ __extends(_CovalentSideSheetContainerBase, _super);
362
+ /**
363
+ * @param {?} _elementRef
364
+ * @param {?} _focusTrapFactory
365
+ * @param {?} _changeDetectorRef
366
+ * @param {?} _document
367
+ * @param {?} _config
368
+ * @param {?=} _focusMonitor
369
+ */
370
+ function _CovalentSideSheetContainerBase(_elementRef, _focusTrapFactory, _changeDetectorRef, _document, _config, _focusMonitor) {
371
+ var _this = _super.call(this) || this;
372
+ _this._elementRef = _elementRef;
373
+ _this._focusTrapFactory = _focusTrapFactory;
374
+ _this._changeDetectorRef = _changeDetectorRef;
375
+ _this._config = _config;
376
+ _this._focusMonitor = _focusMonitor;
377
+ /**
378
+ * Emits when an animation state changes.
379
+ */
380
+ _this._animationStateChanged = new core$1.EventEmitter();
381
+ /**
382
+ * Element that was focused before the side-sheet was opened. Save this to restore upon close.
383
+ */
384
+ _this._elementFocusedBeforeSideSheetWasOpened = null;
385
+ /**
386
+ * Type of interaction that led to the side-sheet being closed. This is used to determine
387
+ * whether the focus style will be applied when returning focus to its original location
388
+ * after the side-sheet is closed.
389
+ */
390
+ _this._closeInteractionType = null;
391
+ /**
392
+ * Attaches a DOM portal to the side-sheet container.
393
+ * @param portal Portal to be attached.
394
+ * @deprecated To be turned into a method.
395
+ */
396
+ _this.attachDomPortal = ( /**
397
+ * @param {?} portal
398
+ * @return {?}
399
+ */function (portal) {
400
+ return _this._portalOutlet.attachDomPortal(portal);
401
+ });
402
+ _this._ariaLabelledBy = _config.ariaLabelledBy || null;
403
+ _this._document = _document;
404
+ return _this;
405
+ }
406
+ /**
407
+ * Initializes the side-sheet container with the attached content.
408
+ * @return {?}
409
+ */
410
+ _CovalentSideSheetContainerBase.prototype._initializeWithAttachedContent = function () {
411
+ this._setupFocusTrap();
412
+ // Save the previously focused element. This element will be re-focused
413
+ // when the side-sheet closes.
414
+ this._capturePreviouslyFocusedElement();
415
+ };
416
+ /**
417
+ * Attach a ComponentPortal as content to this side-sheet container.
418
+ * @template T
419
+ * @param {?} portal Portal to be attached as the side-sheet content.
420
+ * @return {?}
421
+ */
422
+ _CovalentSideSheetContainerBase.prototype.attachComponentPortal = function (portal) {
423
+ return this._portalOutlet.attachComponentPortal(portal);
424
+ };
425
+ /**
426
+ * Attach a TemplatePortal as content to this side-sheet container.
427
+ * @template C
428
+ * @param {?} portal Portal to be attached as the side-sheet content.
429
+ * @return {?}
430
+ */
431
+ _CovalentSideSheetContainerBase.prototype.attachTemplatePortal = function (portal) {
432
+ return this._portalOutlet.attachTemplatePortal(portal);
433
+ };
434
+ /**
435
+ * Moves focus back into the side-sheet if it was moved out.
436
+ * @return {?}
437
+ */
438
+ _CovalentSideSheetContainerBase.prototype._recaptureFocus = function () {
439
+ if (!this._containsFocus()) {
440
+ this._trapFocus();
441
+ }
442
+ };
443
+ /**
444
+ * Moves the focus inside the focus trap. When autoFocus is not set to 'side-sheet', if focus
445
+ * cannot be moved then focus will go to the side-sheet container.
446
+ * @protected
447
+ * @return {?}
448
+ */
449
+ _CovalentSideSheetContainerBase.prototype._trapFocus = function () {
450
+ var _this = this;
451
+ /** @type {?} */
452
+ var element = this._elementRef.nativeElement;
453
+ if (!this._config.autoFocus) {
454
+ if (!this._containsFocus()) {
455
+ element.focus();
456
+ }
457
+ }
458
+ else {
459
+ this._focusTrap.focusInitialElementWhenReady().then(( /**
460
+ * @param {?} focusedSuccessfully
461
+ * @return {?}
462
+ */function (focusedSuccessfully) {
463
+ // If we weren't able to find a focusable element in the side-sheet, then focus the side-sheet
464
+ // container instead.
465
+ if (!focusedSuccessfully) {
466
+ _this._focusSideSheetContainer();
467
+ }
468
+ }));
469
+ }
470
+ };
471
+ /**
472
+ * Restores focus to the element that was focused before the side-sheet opened.
473
+ * @protected
474
+ * @return {?}
475
+ */
476
+ _CovalentSideSheetContainerBase.prototype._restoreFocus = function () {
477
+ /** @type {?} */
478
+ var previousElement = this._elementFocusedBeforeSideSheetWasOpened;
479
+ // We need the extra check, because IE can set the `activeElement` to null in some cases.
480
+ if (this._config.restoreFocus && previousElement && typeof previousElement.focus === 'function') {
481
+ /** @type {?} */
482
+ var activeElement = _getFocusedElementPierceShadowDom();
483
+ /** @type {?} */
484
+ var element = this._elementRef.nativeElement;
485
+ // Make sure that focus is still inside the side-sheet or is on the body (usually because a
486
+ // non-focusable element like the backdrop was clicked) before moving it. It's possible that
487
+ // the consumer moved it themselves before the animation was done, in which case we shouldn't
488
+ // do anything.
489
+ if (!activeElement ||
490
+ activeElement === this._document.body ||
491
+ activeElement === element ||
492
+ element.contains(activeElement)) {
493
+ if (this._focusMonitor) {
494
+ this._focusMonitor.focusVia(previousElement, this._closeInteractionType);
495
+ this._closeInteractionType = null;
496
+ }
497
+ else {
498
+ previousElement.focus();
499
+ }
500
+ }
501
+ }
502
+ if (this._focusTrap) {
503
+ this._focusTrap.destroy();
504
+ }
505
+ };
506
+ /**
507
+ * Sets up the focus trap.
508
+ * @private
509
+ * @return {?}
510
+ */
511
+ _CovalentSideSheetContainerBase.prototype._setupFocusTrap = function () {
512
+ this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
513
+ };
514
+ /**
515
+ * Captures the element that was focused before the side-sheet was opened.
516
+ * @private
517
+ * @return {?}
518
+ */
519
+ _CovalentSideSheetContainerBase.prototype._capturePreviouslyFocusedElement = function () {
520
+ if (this._document) {
521
+ this._elementFocusedBeforeSideSheetWasOpened = _getFocusedElementPierceShadowDom();
522
+ }
523
+ };
524
+ /**
525
+ * Focuses the side-sheet container.
526
+ * @private
527
+ * @return {?}
528
+ */
529
+ _CovalentSideSheetContainerBase.prototype._focusSideSheetContainer = function () {
530
+ // Note that there is no focus method when rendering on the server.
531
+ if (this._elementRef.nativeElement.focus) {
532
+ this._elementRef.nativeElement.focus();
533
+ }
534
+ };
535
+ /**
536
+ * Returns whether focus is inside the side-sheet.
537
+ * @private
538
+ * @return {?}
539
+ */
540
+ _CovalentSideSheetContainerBase.prototype._containsFocus = function () {
541
+ /** @type {?} */
542
+ var element = this._elementRef.nativeElement;
543
+ /** @type {?} */
544
+ var activeElement = _getFocusedElementPierceShadowDom();
545
+ return element === activeElement || element.contains(activeElement);
546
+ };
547
+ return _CovalentSideSheetContainerBase;
548
+ }(portal.BasePortalOutlet));
549
+ _CovalentSideSheetContainerBase.decorators = [
550
+ { type: core$1.Directive }
551
+ ];
552
+ /** @nocollapse */
553
+ _CovalentSideSheetContainerBase.ctorParameters = function () { return [
554
+ { type: core$1.ElementRef },
555
+ { type: a11y.FocusTrapFactory },
556
+ { type: core$1.ChangeDetectorRef },
557
+ { type: undefined, decorators: [{ type: core$1.Optional }, { type: core$1.Inject, args: [common.DOCUMENT,] }] },
558
+ { type: CovalentSideSheetConfig },
559
+ { type: a11y.FocusMonitor }
560
+ ]; };
561
+ _CovalentSideSheetContainerBase.propDecorators = {
562
+ _portalOutlet: [{ type: core$1.ViewChild, args: [portal.CdkPortalOutlet, { static: true },] }]
563
+ };
564
+ if (false) {
565
+ /**
566
+ * @type {?}
567
+ * @protected
568
+ */
569
+ _CovalentSideSheetContainerBase.prototype._document;
570
+ /**
571
+ * The portal outlet inside of this container into which the side-sheet content will be loaded.
572
+ * @type {?}
573
+ */
574
+ _CovalentSideSheetContainerBase.prototype._portalOutlet;
575
+ /**
576
+ * The class that traps and manages focus within the side-sheet.
577
+ * @type {?}
578
+ * @private
579
+ */
580
+ _CovalentSideSheetContainerBase.prototype._focusTrap;
581
+ /**
582
+ * Emits when an animation state changes.
583
+ * @type {?}
584
+ */
585
+ _CovalentSideSheetContainerBase.prototype._animationStateChanged;
586
+ /**
587
+ * Element that was focused before the side-sheet was opened. Save this to restore upon close.
588
+ * @type {?}
589
+ * @private
590
+ */
591
+ _CovalentSideSheetContainerBase.prototype._elementFocusedBeforeSideSheetWasOpened;
592
+ /**
593
+ * Type of interaction that led to the side-sheet being closed. This is used to determine
594
+ * whether the focus style will be applied when returning focus to its original location
595
+ * after the side-sheet is closed.
596
+ * @type {?}
597
+ */
598
+ _CovalentSideSheetContainerBase.prototype._closeInteractionType;
599
+ /**
600
+ * ID of the element that should be considered as the side-sheet's label.
601
+ * @type {?}
602
+ */
603
+ _CovalentSideSheetContainerBase.prototype._ariaLabelledBy;
604
+ /**
605
+ * ID for the container DOM element.
606
+ * @type {?}
607
+ */
608
+ _CovalentSideSheetContainerBase.prototype._id;
609
+ /**
610
+ * Attaches a DOM portal to the side-sheet container.
611
+ * \@param portal Portal to be attached.
612
+ * @deprecated To be turned into a method.
613
+ * @type {?}
614
+ */
615
+ _CovalentSideSheetContainerBase.prototype.attachDomPortal;
616
+ /**
617
+ * @type {?}
618
+ * @protected
619
+ */
620
+ _CovalentSideSheetContainerBase.prototype._elementRef;
621
+ /**
622
+ * @type {?}
623
+ * @protected
624
+ */
625
+ _CovalentSideSheetContainerBase.prototype._focusTrapFactory;
626
+ /**
627
+ * @type {?}
628
+ * @protected
629
+ */
630
+ _CovalentSideSheetContainerBase.prototype._changeDetectorRef;
631
+ /**
632
+ * The side-sheet configuration.
633
+ * @type {?}
634
+ */
635
+ _CovalentSideSheetContainerBase.prototype._config;
636
+ /**
637
+ * @type {?}
638
+ * @private
639
+ */
640
+ _CovalentSideSheetContainerBase.prototype._focusMonitor;
641
+ /**
642
+ * Starts the side-sheet exit animation.
643
+ * @abstract
644
+ * @return {?}
645
+ */
646
+ _CovalentSideSheetContainerBase.prototype._startExitAnimation = function () { };
647
+ }
648
+ /**
649
+ * Internal component that wraps the generated side-sheet content.
650
+ * This animation below is the only reason for duplicating most of the Material dialog code
651
+ */
652
+ var CovalentSideSheetContainer = /** @class */ (function (_super) {
653
+ __extends(CovalentSideSheetContainer, _super);
654
+ function CovalentSideSheetContainer() {
655
+ var _this = _super.apply(this, __spread(arguments)) || this;
656
+ /**
657
+ * State of the side-sheet animation.
658
+ */
659
+ _this._state = 'enter';
660
+ return _this;
661
+ }
662
+ /**
663
+ * Callback, invoked whenever an animation on the host completes.
664
+ * @param {?} __0
665
+ * @return {?}
666
+ */
667
+ CovalentSideSheetContainer.prototype._onAnimationDone = function (_a) {
668
+ var toState = _a.toState, totalTime = _a.totalTime;
669
+ if (toState === 'enter') {
670
+ this._trapFocus();
671
+ this._animationStateChanged.next({ state: 'opened', totalTime: totalTime });
672
+ }
673
+ else if (toState === 'exit') {
674
+ this._restoreFocus();
675
+ this._animationStateChanged.next({ state: 'closed', totalTime: totalTime });
676
+ }
677
+ };
678
+ /**
679
+ * Callback, invoked when an animation on the host starts.
680
+ * @param {?} __0
681
+ * @return {?}
682
+ */
683
+ CovalentSideSheetContainer.prototype._onAnimationStart = function (_a) {
684
+ var toState = _a.toState, totalTime = _a.totalTime;
685
+ if (toState === 'enter') {
686
+ this._animationStateChanged.next({ state: 'opening', totalTime: totalTime });
687
+ }
688
+ else if (toState === 'exit' || toState === 'void') {
689
+ this._animationStateChanged.next({ state: 'closing', totalTime: totalTime });
690
+ }
691
+ };
692
+ /**
693
+ * Starts the side-sheet exit animation.
694
+ * @return {?}
695
+ */
696
+ CovalentSideSheetContainer.prototype._startExitAnimation = function () {
697
+ this._state = 'exit';
698
+ this._changeDetectorRef.markForCheck();
699
+ };
700
+ return CovalentSideSheetContainer;
701
+ }(_CovalentSideSheetContainerBase));
702
+ CovalentSideSheetContainer.decorators = [
703
+ { type: core$1.Component, args: [{
704
+ selector: 'td-side-sheet-container',
705
+ template: "\n <ng-template cdkPortalOutlet></ng-template>\n ",
706
+ encapsulation: core$1.ViewEncapsulation.None,
707
+ changeDetection: core$1.ChangeDetectionStrategy.Default,
708
+ animations: [tdSideSheetAnimations.sideSheetContainer],
709
+ host: {
710
+ 'class': 'td-side-sheet-container',
711
+ 'tabindex': '-1',
712
+ 'aria-modal': 'true',
713
+ '[id]': '_id',
714
+ '[attr.role]': '_config.role',
715
+ '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
716
+ '[attr.aria-label]': '_config.ariaLabel',
717
+ '[attr.aria-describedby]': '_config.ariaDescribedBy || null',
718
+ '[@sideSheetContainer]': '_state',
719
+ '(@sideSheetContainer.start)': '_onAnimationStart($event)',
720
+ '(@sideSheetContainer.done)': '_onAnimationDone($event)',
721
+ },
722
+ 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);box-sizing:border-box;display:block;height:100%;max-height:inherit;min-height:inherit;outline:0;overflow:auto;padding:24px;width:100%}.td-side-sheet-wrapper{-ms-flex-direction:column;display:-ms-flexbox;display:flex;flex-direction:column;height:100%}.td-side-sheet-content{-ms-flex:1;-webkit-overflow-scrolling:touch;flex:1;margin:0 -24px;overflow:auto;padding:0 24px}.td-side-sheet-title{margin:-16px 0 20px}.td-side-sheet-actions,.td-side-sheet-title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.td-side-sheet-actions{-ms-flex-pack:justify;-ms-flex-wrap:wrap;box-sizing:content-box;flex-wrap:wrap;justify-content:space-between;margin:0 -16px -24px;padding:8px 0}.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}"]
723
+ }] }
724
+ ];
725
+ if (false) {
726
+ /**
727
+ * State of the side-sheet animation.
728
+ * @type {?}
729
+ */
730
+ CovalentSideSheetContainer.prototype._state;
731
+ }
732
+
733
+ // Counter for unique dialog ids.
734
+ /** @type {?} */
735
+ var uniqueId = 0;
736
+ // Create a new side sheet ref to change the id of the ref
737
+ /**
738
+ * @template T, R
739
+ */
740
+ var CovalentSideSheetRef = /** @class */ (function (_super) {
741
+ __extends(CovalentSideSheetRef, _super);
742
+ /**
743
+ * @param {?} overlayRef
744
+ * @param {?} _containerInstance
745
+ * @param {?=} id
746
+ */
747
+ function CovalentSideSheetRef(overlayRef, _containerInstance, id) {
748
+ if (id === void 0) { id = "td-side-sheet-" + uniqueId++; }
749
+ var _this = _super.call(this, overlayRef, _containerInstance, id) || this;
750
+ _this.overlayRef = overlayRef;
751
+ _this._containerInstance = _containerInstance;
752
+ _this.id = id;
753
+ return _this;
754
+ }
755
+ return CovalentSideSheetRef;
756
+ }(dialog.MatDialogRef));
757
+ if (false) {
758
+ /** @type {?} */
759
+ CovalentSideSheetRef.prototype.overlayRef;
760
+ /** @type {?} */
761
+ CovalentSideSheetRef.prototype._containerInstance;
762
+ /** @type {?} */
763
+ CovalentSideSheetRef.prototype.id;
764
+ }
765
+ /**
766
+ * @template R
767
+ * @param {?} ref
768
+ * @param {?} interactionType
769
+ * @param {?=} result
770
+ * @return {?}
771
+ */
772
+ function _closeSideSheetVia(ref, interactionType, result) {
773
+ // Some mock dialog ref instances in tests do not have the `_containerInstance` property.
774
+ // For those, we keep the behavior as is and do not deal with the interaction type.
775
+ if (ref._containerInstance !== undefined) {
776
+ ref._containerInstance._closeInteractionType = interactionType;
777
+ }
778
+ return ref.close(result);
779
+ }
780
+
781
+ /**
782
+ * @template C
783
+ */
784
+ var _CovalentSideSheetBase = /** @class */ (function () {
785
+ /**
786
+ * @param {?} _overlay
787
+ * @param {?} _injector
788
+ * @param {?} _defaultOptions
789
+ * @param {?} _parentSideSheet
790
+ * @param {?} _sideSheetRefConstructor
791
+ * @param {?} _sideSheetContainerType
792
+ * @param {?} _sideSheetDataToken
793
+ */
794
+ function _CovalentSideSheetBase(_overlay, _injector, _defaultOptions, _parentSideSheet, _sideSheetRefConstructor, _sideSheetContainerType, _sideSheetDataToken) {
795
+ this._overlay = _overlay;
796
+ this._injector = _injector;
797
+ this._defaultOptions = _defaultOptions;
798
+ this._parentSideSheet = _parentSideSheet;
799
+ this._sideSheetRefConstructor = _sideSheetRefConstructor;
800
+ this._sideSheetContainerType = _sideSheetContainerType;
801
+ this._sideSheetDataToken = _sideSheetDataToken;
802
+ this._openSideSheetsAtThisLevel = [];
803
+ this._afterAllClosedAtThisLevel = new rxjs.Subject();
804
+ this._afterOpenedAtThisLevel = new rxjs.Subject();
805
+ this.defaultSidebarConfig = {
806
+ minWidth: '400px',
807
+ maxWidth: '100vw',
808
+ };
809
+ }
810
+ Object.defineProperty(_CovalentSideSheetBase.prototype, "openSideSheets", {
811
+ /**
812
+ * Keeps track of the currently-open side-sheets.
813
+ * @return {?}
814
+ */
815
+ get: function () {
816
+ return this._parentSideSheet ? this._parentSideSheet.openSideSheets : this._openSideSheetsAtThisLevel;
817
+ },
818
+ enumerable: false,
819
+ configurable: true
820
+ });
821
+ /**
822
+ * @template T, D, R
823
+ * @param {?} componentOrTemplateRef
824
+ * @param {?=} config
825
+ * @return {?}
826
+ */
827
+ _CovalentSideSheetBase.prototype.open = function (componentOrTemplateRef, config) {
828
+ var _this = this;
829
+ config = Object.assign(Object.assign(Object.assign({}, (this._defaultOptions || new CovalentSideSheetConfig())), this.defaultSidebarConfig), config);
830
+ /** @type {?} */
831
+ var overlayRef = this._createOverlay(config);
832
+ /** @type {?} */
833
+ var sideSheetContainer = this._attachSideSheetContainer(overlayRef, config);
834
+ /** @type {?} */
835
+ var sideSheetRef = this._attachSideSheetContent(componentOrTemplateRef, sideSheetContainer, overlayRef, config);
836
+ /** @type {?} */
837
+ var prevSideSheetRef = this.openSideSheets.slice(-1)[0];
838
+ /** @type {?} */
839
+ var prevOverlayRef = prevSideSheetRef === null || prevSideSheetRef === void 0 ? void 0 : prevSideSheetRef.overlayRef;
840
+ // Animate previous side sheet to full width
841
+ if (prevOverlayRef === null || prevOverlayRef === void 0 ? void 0 : prevOverlayRef.overlayElement) {
842
+ prevOverlayRef.overlayElement.style.transition = core.AnimationDurations.COMPLEX + " " + core.AnimationCurves.DECELERATION_CURVE;
843
+ prevOverlayRef.overlayElement.style.minWidth = (( /** @type {?} */(window))).innerWidth + "px";
844
+ }
845
+ // Revert the previous side sheet config & size
846
+ sideSheetRef._containerInstance._animationStateChanged
847
+ .pipe(operators.filter(( /**
848
+ * @param {?} event
849
+ * @return {?}
850
+ */function (event) { return event.state === 'closing' && !!(prevSideSheetRef && prevOverlayRef); })), operators.take(1))
851
+ .subscribe(( /**
852
+ * @return {?}
853
+ */function () {
854
+ prevOverlayRef.overlayElement.style.transition = core.AnimationDurations.EXITING + " " + core.AnimationCurves.DECELERATION_CURVE;
855
+ prevSideSheetRef.updateSize();
856
+ }));
857
+ // Add new side sheet to open list
858
+ this.openSideSheets.push(sideSheetRef);
859
+ // Remove side sheet ref after closed
860
+ sideSheetRef
861
+ .afterClosed()
862
+ .pipe(operators.take(1))
863
+ .subscribe(( /**
864
+ * @return {?}
865
+ */function () { return _this._removeOpenSideSheet(sideSheetRef); }));
866
+ // Notify the side-sheet container that the content has been attached.
867
+ sideSheetContainer._initializeWithAttachedContent();
868
+ return sideSheetRef;
869
+ };
870
+ /**
871
+ * @return {?}
872
+ */
873
+ _CovalentSideSheetBase.prototype.ngOnDestroy = function () {
874
+ // Only close the side-sheets at this level on destroy
875
+ // since the parent service may still be active.
876
+ this._closeSideSheets(this._openSideSheetsAtThisLevel);
877
+ this._afterAllClosedAtThisLevel.complete();
878
+ this._afterOpenedAtThisLevel.complete();
879
+ // Clean up any subscriptions to side-sheet that never finished opening.
880
+ if (this._animationStateSubscriptions) {
881
+ this._animationStateSubscriptions.unsubscribe();
882
+ }
883
+ };
884
+ /**
885
+ * Closes all of the currently-open side-sheets.
886
+ * @return {?}
887
+ */
888
+ _CovalentSideSheetBase.prototype.closeAll = function () {
889
+ this._closeSideSheets(this.openSideSheets);
890
+ };
891
+ /**
892
+ * @private
893
+ * @template T
894
+ * @param {?} config
895
+ * @return {?}
896
+ */
897
+ _CovalentSideSheetBase.prototype._createOverlay = function (config) {
898
+ /** @type {?} */
899
+ var overlayConfig = new overlay.OverlayConfig({
900
+ positionStrategy: this._overlay.position().global(),
901
+ scrollStrategy: this._overlay.scrollStrategies.block(),
902
+ panelClass: config.panelClass,
903
+ hasBackdrop: config.hasBackdrop,
904
+ direction: config.direction,
905
+ minWidth: config.minWidth,
906
+ minHeight: config.minHeight,
907
+ maxWidth: config.maxWidth,
908
+ });
909
+ /** @type {?} */
910
+ var overlayRef = this._overlay.create(overlayConfig);
911
+ /** @type {?} */
912
+ var positionStrategy = ( /** @type {?} */(overlayRef.getConfig().positionStrategy));
913
+ positionStrategy.right('0px');
914
+ return overlayRef;
915
+ };
916
+ /**
917
+ * Attaches a container to a side-sheets's already-created overlay.
918
+ * @private
919
+ * @param {?} overlay Reference to the side-sheet's underlying overlay.
920
+ * @param {?} config The side-sheet configuration.
921
+ * @return {?} A promise resolving to a ComponentRef for the attached container.
922
+ */
923
+ _CovalentSideSheetBase.prototype._attachSideSheetContainer = function (overlay, config) {
924
+ /** @type {?} */
925
+ var userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
926
+ /** @type {?} */
927
+ var injector = core$1.Injector.create({
928
+ parent: userInjector || this._injector,
929
+ providers: [{ provide: CovalentSideSheetConfig, useValue: config }],
930
+ });
931
+ /** @type {?} */
932
+ var containerPortal = new portal.ComponentPortal(this._sideSheetContainerType, config.viewContainerRef, injector, config.componentFactoryResolver);
933
+ /** @type {?} */
934
+ var containerRef = overlay.attach(containerPortal);
935
+ return containerRef.instance;
936
+ };
937
+ /**
938
+ * Attaches the user-provided component to the already-created side sheet container.
939
+ * @private
940
+ * @template T, R
941
+ * @param {?} componentOrTemplateRef The type of component being loaded into the side-sheet,
942
+ * or a TemplateRef to instantiate as the content.
943
+ * @param {?} sideSheetContainer
944
+ * @param {?} overlayRef Reference to the overlay in which the side-sheet resides.
945
+ * @param {?} config The side-sheet configuration.
946
+ * @return {?} A promise resolving to the CovalentSideSheetRef that should be returned to the user.
947
+ */
948
+ _CovalentSideSheetBase.prototype._attachSideSheetContent = function (componentOrTemplateRef, sideSheetContainer, overlayRef, config) {
949
+ // Create a reference to the side-sheet we're creating in order to give the user a handle
950
+ // to modify and close it.
951
+ /** @type {?} */
952
+ var sideSheetRef = new this._sideSheetRefConstructor(overlayRef, sideSheetContainer, config.id);
953
+ if (componentOrTemplateRef instanceof core$1.TemplateRef) {
954
+ sideSheetContainer.attachTemplatePortal(new portal.TemplatePortal(componentOrTemplateRef, ( /** @type {?} */(null)), ( /** @type {?} */({
955
+ $implicit: config.data,
956
+ sideSheetRef: sideSheetRef,
957
+ }))));
958
+ }
959
+ else {
960
+ /** @type {?} */
961
+ var injector = this._createInjector(config, sideSheetRef, sideSheetContainer);
962
+ /** @type {?} */
963
+ var contentRef = sideSheetContainer.attach(new portal.ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
964
+ sideSheetRef.componentInstance = contentRef.instance;
965
+ }
966
+ sideSheetRef.updateSize(config.width, config.height);
967
+ return sideSheetRef;
968
+ };
969
+ /**
970
+ * @private
971
+ * @template T
972
+ * @param {?} config
973
+ * @param {?} sideSheetRef
974
+ * @param {?} sideSheetContainer
975
+ * @return {?}
976
+ */
977
+ _CovalentSideSheetBase.prototype._createInjector = function (config, sideSheetRef, sideSheetContainer) {
978
+ /** @type {?} */
979
+ var userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
980
+ // The side-sheet container should be provided as the side-sheet container and the side-sheet's
981
+ // content are created out of the same `ViewContainerRef` and as such, are siblings
982
+ // for injector purposes. To allow the hierarchy that is expected, the side-sheet
983
+ // container is explicitly provided in the injector.
984
+ /** @type {?} */
985
+ var providers = [
986
+ { provide: this._sideSheetContainerType, useValue: sideSheetContainer },
987
+ { provide: this._sideSheetDataToken, useValue: config.data },
988
+ { provide: this._sideSheetRefConstructor, useValue: sideSheetRef },
989
+ ];
990
+ if (config.direction &&
991
+ (!userInjector || !userInjector.get(bidi.Directionality, null, core$1.InjectFlags.Optional))) {
992
+ providers.push({
993
+ provide: bidi.Directionality,
994
+ useValue: { value: config.direction, change: rxjs.of() },
995
+ });
996
+ }
997
+ return core$1.Injector.create({ parent: userInjector || this._injector, providers: providers });
998
+ };
999
+ /**
1000
+ * Removes a side sheet from the array of open side sheets.
1001
+ * @private
1002
+ * @param {?} sideSheetRef Side Sheet to be removed.
1003
+ * @return {?}
1004
+ */
1005
+ _CovalentSideSheetBase.prototype._removeOpenSideSheet = function (sideSheetRef) {
1006
+ /** @type {?} */
1007
+ var index = this.openSideSheets.indexOf(sideSheetRef);
1008
+ if (index > -1) {
1009
+ this.openSideSheets.splice(index, 1);
1010
+ }
1011
+ };
1012
+ /**
1013
+ * Closes all of the side-sheet in an array.
1014
+ * @private
1015
+ * @param {?} sideSheets
1016
+ * @return {?}
1017
+ */
1018
+ _CovalentSideSheetBase.prototype._closeSideSheets = function (sideSheets) {
1019
+ /** @type {?} */
1020
+ var i = sideSheets.length;
1021
+ while (i--) {
1022
+ sideSheets[i].close();
1023
+ }
1024
+ };
1025
+ return _CovalentSideSheetBase;
1026
+ }());
1027
+ _CovalentSideSheetBase.decorators = [
1028
+ { type: core$1.Directive }
1029
+ ];
1030
+ /** @nocollapse */
1031
+ _CovalentSideSheetBase.ctorParameters = function () { return [
1032
+ { type: overlay.Overlay },
1033
+ { type: core$1.Injector },
1034
+ { type: undefined },
1035
+ { type: undefined },
1036
+ { type: core$1.Type },
1037
+ { type: core$1.Type },
1038
+ { type: core$1.InjectionToken }
1039
+ ]; };
1040
+ if (false) {
1041
+ /**
1042
+ * @type {?}
1043
+ * @private
1044
+ */
1045
+ _CovalentSideSheetBase.prototype._openSideSheetsAtThisLevel;
1046
+ /**
1047
+ * @type {?}
1048
+ * @private
1049
+ */
1050
+ _CovalentSideSheetBase.prototype._afterAllClosedAtThisLevel;
1051
+ /**
1052
+ * @type {?}
1053
+ * @private
1054
+ */
1055
+ _CovalentSideSheetBase.prototype._afterOpenedAtThisLevel;
1056
+ /**
1057
+ * @type {?}
1058
+ * @private
1059
+ */
1060
+ _CovalentSideSheetBase.prototype._animationStateSubscriptions;
1061
+ /**
1062
+ * @type {?}
1063
+ * @private
1064
+ */
1065
+ _CovalentSideSheetBase.prototype.defaultSidebarConfig;
1066
+ /**
1067
+ * @type {?}
1068
+ * @private
1069
+ */
1070
+ _CovalentSideSheetBase.prototype._overlay;
1071
+ /**
1072
+ * @type {?}
1073
+ * @private
1074
+ */
1075
+ _CovalentSideSheetBase.prototype._injector;
1076
+ /**
1077
+ * @type {?}
1078
+ * @private
1079
+ */
1080
+ _CovalentSideSheetBase.prototype._defaultOptions;
1081
+ /**
1082
+ * @type {?}
1083
+ * @private
1084
+ */
1085
+ _CovalentSideSheetBase.prototype._parentSideSheet;
1086
+ /**
1087
+ * @type {?}
1088
+ * @private
1089
+ */
1090
+ _CovalentSideSheetBase.prototype._sideSheetRefConstructor;
1091
+ /**
1092
+ * @type {?}
1093
+ * @private
1094
+ */
1095
+ _CovalentSideSheetBase.prototype._sideSheetContainerType;
1096
+ /**
1097
+ * @type {?}
1098
+ * @private
1099
+ */
1100
+ _CovalentSideSheetBase.prototype._sideSheetDataToken;
1101
+ }
1102
+ /**
1103
+ * Service to open Covalent Design side-sheet.
1104
+ */
1105
+ var CovalentSideSheet = /** @class */ (function (_super) {
1106
+ __extends(CovalentSideSheet, _super);
1107
+ /**
1108
+ * @param {?} overlay
1109
+ * @param {?} injector
1110
+ * @param {?} defaultOptions
1111
+ * @param {?} parentSideSheet
1112
+ */
1113
+ function CovalentSideSheet(overlay, injector, defaultOptions, parentSideSheet) {
1114
+ return _super.call(this, overlay, injector, defaultOptions, parentSideSheet, CovalentSideSheetRef, CovalentSideSheetContainer, dialog.MAT_DIALOG_DATA) || this;
1115
+ }
1116
+ return CovalentSideSheet;
1117
+ }(_CovalentSideSheetBase));
1118
+ CovalentSideSheet.decorators = [
1119
+ { type: core$1.Injectable }
1120
+ ];
1121
+ /** @nocollapse */
1122
+ CovalentSideSheet.ctorParameters = function () { return [
1123
+ { type: overlay.Overlay },
1124
+ { type: core$1.Injector },
1125
+ { type: CovalentSideSheetConfig, decorators: [{ type: core$1.Optional }, { type: core$1.Inject, args: [dialog.MAT_DIALOG_DEFAULT_OPTIONS,] }] },
1126
+ { type: CovalentSideSheet, decorators: [{ type: core$1.Optional }, { type: core$1.SkipSelf }] }
1127
+ ]; };
1128
+
1129
+ /**
1130
+ * @fileoverview added by tsickle
1131
+ * Generated from: side-sheet.content-directives.ts
1132
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1133
+ */
1134
+ /**
1135
+ * Counter used to generate unique IDs for dialog elements.
1136
+ * @type {?}
1137
+ */
1138
+ var dialogElementUid = 0;
1139
+ /**
1140
+ * Button that will close the current dialog.
1141
+ */
1142
+ var CovalentSideSheetClose = /** @class */ (function () {
1143
+ /**
1144
+ * @param {?} dialogRef
1145
+ * @param {?} _elementRef
1146
+ * @param {?} _dialog
1147
+ */
1148
+ function CovalentSideSheetClose(dialogRef, _elementRef, _dialog) {
1149
+ this.dialogRef = dialogRef;
1150
+ this._elementRef = _elementRef;
1151
+ this._dialog = _dialog;
1152
+ /**
1153
+ * Default to "button" to prevents accidental form submits.
1154
+ */
1155
+ this.type = 'button';
1156
+ }
1157
+ /**
1158
+ * @return {?}
1159
+ */
1160
+ CovalentSideSheetClose.prototype.ngOnInit = function () {
1161
+ if (!this.dialogRef) {
1162
+ // When this directive is included in a dialog via TemplateRef (rather than being
1163
+ // in a Component), the DialogRef isn't available via injection because embedded
1164
+ // views cannot be given a custom injector. Instead, we look up the DialogRef by
1165
+ // ID. This must occur in `onInit`, as the ID binding for the dialog container won't
1166
+ // be resolved at constructor time.
1167
+ this.dialogRef = ( /** @type {?} */(getClosestDialog(this._elementRef, this._dialog.openSideSheets)));
1168
+ }
1169
+ };
1170
+ /**
1171
+ * @param {?} changes
1172
+ * @return {?}
1173
+ */
1174
+ CovalentSideSheetClose.prototype.ngOnChanges = function (changes) {
1175
+ /** @type {?} */
1176
+ var proxiedChange = changes['_CovalentSideSheetClose'] || changes['_CovalentSideSheetCloseResult'];
1177
+ if (proxiedChange) {
1178
+ this.dialogResult = proxiedChange.currentValue;
1179
+ }
1180
+ };
1181
+ /**
1182
+ * @param {?} event
1183
+ * @return {?}
1184
+ */
1185
+ CovalentSideSheetClose.prototype._onButtonClick = function (event) {
1186
+ // Determinate the focus origin using the click event, because using the FocusMonitor will
1187
+ // result in incorrect origins. Most of the time, close buttons will be auto focused in the
1188
+ // dialog, and therefore clicking the button won't result in a focus change. This means that
1189
+ // the FocusMonitor won't detect any origin change, and will always output `program`.
1190
+ _closeSideSheetVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);
1191
+ };
1192
+ return CovalentSideSheetClose;
1193
+ }());
1194
+ CovalentSideSheetClose.decorators = [
1195
+ { type: core$1.Directive, args: [{
1196
+ selector: '[td-side-sheet-close], [CovalentSideSheetClose]',
1197
+ exportAs: 'CovalentSideSheetClose',
1198
+ host: {
1199
+ '(click)': '_onButtonClick($event)',
1200
+ '[attr.aria-label]': 'ariaLabel || null',
1201
+ '[attr.type]': 'type',
1202
+ },
1203
+ },] }
1204
+ ];
1205
+ /** @nocollapse */
1206
+ CovalentSideSheetClose.ctorParameters = function () { return [
1207
+ { type: CovalentSideSheetRef, decorators: [{ type: core$1.Optional }] },
1208
+ { type: core$1.ElementRef },
1209
+ { type: CovalentSideSheet }
1210
+ ]; };
1211
+ CovalentSideSheetClose.propDecorators = {
1212
+ ariaLabel: [{ type: core$1.Input, args: ['aria-label',] }],
1213
+ type: [{ type: core$1.Input }],
1214
+ dialogResult: [{ type: core$1.Input, args: ['td-side-sheet-close',] }],
1215
+ _CovalentSideSheetClose: [{ type: core$1.Input, args: ['CovalentSideSheetClose',] }]
1216
+ };
1217
+ if (false) {
1218
+ /**
1219
+ * Screenreader label for the button.
1220
+ * @type {?}
1221
+ */
1222
+ CovalentSideSheetClose.prototype.ariaLabel;
1223
+ /**
1224
+ * Default to "button" to prevents accidental form submits.
1225
+ * @type {?}
1226
+ */
1227
+ CovalentSideSheetClose.prototype.type;
1228
+ /**
1229
+ * Dialog close input.
1230
+ * @type {?}
1231
+ */
1232
+ CovalentSideSheetClose.prototype.dialogResult;
1233
+ /** @type {?} */
1234
+ CovalentSideSheetClose.prototype._CovalentSideSheetClose;
1235
+ /** @type {?} */
1236
+ CovalentSideSheetClose.prototype.dialogRef;
1237
+ /**
1238
+ * @type {?}
1239
+ * @private
1240
+ */
1241
+ CovalentSideSheetClose.prototype._elementRef;
1242
+ /**
1243
+ * @type {?}
1244
+ * @private
1245
+ */
1246
+ CovalentSideSheetClose.prototype._dialog;
1247
+ }
1248
+ /**
1249
+ * Title of a side sheet element. Stays fixed to the top of the side sheet when scrolling.
1250
+ */
1251
+ var CovalentSideSheetTitle = /** @class */ (function () {
1252
+ /**
1253
+ * @param {?} _dialogRef
1254
+ * @param {?} _elementRef
1255
+ * @param {?} _dialog
1256
+ */
1257
+ function CovalentSideSheetTitle(_dialogRef, _elementRef, _dialog) {
1258
+ this._dialogRef = _dialogRef;
1259
+ this._elementRef = _elementRef;
1260
+ this._dialog = _dialog;
1261
+ /**
1262
+ * Unique id for the dialog title. If none is supplied, it will be auto-generated.
1263
+ */
1264
+ this.id = "td-side-sheet-title-" + dialogElementUid++;
1265
+ }
1266
+ /**
1267
+ * @return {?}
1268
+ */
1269
+ CovalentSideSheetTitle.prototype.ngOnInit = function () {
1270
+ var _this = this;
1271
+ if (this._dialogRef) {
1272
+ Promise.resolve().then(( /**
1273
+ * @return {?}
1274
+ */function () {
1275
+ /** @type {?} */
1276
+ var container = _this._dialogRef._containerInstance;
1277
+ if (container && !container._ariaLabelledBy) {
1278
+ container._ariaLabelledBy = _this.id;
1279
+ }
1280
+ }));
1281
+ }
1282
+ else {
1283
+ this._dialogRef = ( /** @type {?} */(getClosestDialog(this._elementRef, this._dialog.openSideSheets)));
1284
+ }
1285
+ };
1286
+ return CovalentSideSheetTitle;
1287
+ }());
1288
+ CovalentSideSheetTitle.decorators = [
1289
+ { type: core$1.Directive, args: [{
1290
+ selector: '[td-side-sheet-title], [CovalentSideSheetTitle]',
1291
+ exportAs: 'CovalentSideSheetTitle',
1292
+ host: {
1293
+ 'class': 'td-side-sheet-title',
1294
+ '[id]': 'id',
1295
+ },
1296
+ },] }
1297
+ ];
1298
+ /** @nocollapse */
1299
+ CovalentSideSheetTitle.ctorParameters = function () { return [
1300
+ { type: CovalentSideSheetRef, decorators: [{ type: core$1.Optional }] },
1301
+ { type: core$1.ElementRef },
1302
+ { type: CovalentSideSheet }
1303
+ ]; };
1304
+ CovalentSideSheetTitle.propDecorators = {
1305
+ id: [{ type: core$1.Input }]
1306
+ };
1307
+ if (false) {
1308
+ /**
1309
+ * Unique id for the dialog title. If none is supplied, it will be auto-generated.
1310
+ * @type {?}
1311
+ */
1312
+ CovalentSideSheetTitle.prototype.id;
1313
+ /**
1314
+ * @type {?}
1315
+ * @private
1316
+ */
1317
+ CovalentSideSheetTitle.prototype._dialogRef;
1318
+ /**
1319
+ * @type {?}
1320
+ * @private
1321
+ */
1322
+ CovalentSideSheetTitle.prototype._elementRef;
1323
+ /**
1324
+ * @type {?}
1325
+ * @private
1326
+ */
1327
+ CovalentSideSheetTitle.prototype._dialog;
1328
+ }
1329
+ /**
1330
+ * Scrollable content container of a dialog.
1331
+ */
1332
+ var CovalentSideSheetContent = /** @class */ (function () {
1333
+ function CovalentSideSheetContent() {
1334
+ }
1335
+ return CovalentSideSheetContent;
1336
+ }());
1337
+ CovalentSideSheetContent.decorators = [
1338
+ { type: core$1.Directive, args: [{
1339
+ selector: "[td-side-sheet-content], td-side-sheet-content, [CovalentSideSheetContent]",
1340
+ host: { class: 'td-side-sheet-content' },
1341
+ },] }
1342
+ ];
1343
+ /**
1344
+ * Container for the bottom action buttons in a dialog.
1345
+ * Stays fixed to the bottom when scrolling.
1346
+ */
1347
+ var CovalentSideSheetActions = /** @class */ (function () {
1348
+ function CovalentSideSheetActions() {
1349
+ }
1350
+ return CovalentSideSheetActions;
1351
+ }());
1352
+ CovalentSideSheetActions.decorators = [
1353
+ { type: core$1.Directive, args: [{
1354
+ selector: "[td-side-sheet-actions], td-side-sheet-actions, [CovalentSideSheetActions]",
1355
+ host: { class: 'td-side-sheet-actions' },
1356
+ },] }
1357
+ ];
1358
+ /**
1359
+ * Container for the wrapper part of the dialog
1360
+ */
1361
+ var CovalentSideSheetWrapper = /** @class */ (function () {
1362
+ function CovalentSideSheetWrapper() {
1363
+ }
1364
+ return CovalentSideSheetWrapper;
1365
+ }());
1366
+ CovalentSideSheetWrapper.decorators = [
1367
+ { type: core$1.Directive, args: [{
1368
+ selector: "[td-side-sheet-wrapper], td-side-sheet-wrapper, [CovalentSideSheetWrapper]",
1369
+ host: { class: 'td-side-sheet-wrapper' },
1370
+ },] }
1371
+ ];
1372
+ /**
1373
+ * Finds the closest CovalentSideSheetRef to an element by looking at the DOM.
1374
+ * @param {?} element Element relative to which to look for a dialog.
1375
+ * @param {?} openDialogs References to the currently-open dialogs.
1376
+ * @return {?}
1377
+ */
1378
+ function getClosestDialog(element, openDialogs) {
1379
+ /** @type {?} */
1380
+ var parent = element.nativeElement.parentElement;
1381
+ while (parent && !parent.classList.contains('td-side-sheet-container')) {
1382
+ parent = parent.parentElement;
1383
+ }
1384
+ return parent ? openDialogs.find(( /**
1385
+ * @param {?} dialog
1386
+ * @return {?}
1387
+ */function (dialog) { return dialog.id === ( /** @type {?} */(parent)).id; })) : null;
1388
+ }
1389
+
1390
+ /**
1391
+ * @fileoverview added by tsickle
1392
+ * Generated from: side-sheet.module.ts
1393
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1394
+ */
1395
+ var CovalentSideSheetModule = /** @class */ (function () {
1396
+ function CovalentSideSheetModule() {
1397
+ }
1398
+ return CovalentSideSheetModule;
1399
+ }());
1400
+ CovalentSideSheetModule.decorators = [
1401
+ { type: core$1.NgModule, args: [{
1402
+ declarations: [
1403
+ CovalentSideSheetContainer,
1404
+ CovalentSideSheetActions,
1405
+ CovalentSideSheetClose,
1406
+ CovalentSideSheetContent,
1407
+ CovalentSideSheetTitle,
1408
+ CovalentSideSheetWrapper,
1409
+ ],
1410
+ exports: [
1411
+ CovalentSideSheetActions,
1412
+ CovalentSideSheetClose,
1413
+ CovalentSideSheetContent,
1414
+ CovalentSideSheetTitle,
1415
+ CovalentSideSheetWrapper,
1416
+ ],
1417
+ imports: [portal.PortalModule, dialog.MatDialogModule, core.MatCommonModule],
1418
+ providers: [CovalentSideSheet],
1419
+ },] }
1420
+ ];
1421
+
1422
+ /**
1423
+ * @fileoverview added by tsickle
1424
+ * Generated from: public-api.ts
1425
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1426
+ */
1427
+
1428
+ /**
1429
+ * @fileoverview added by tsickle
1430
+ * Generated from: index.ts
1431
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1432
+ */
1433
+
1434
+ /**
1435
+ * @fileoverview added by tsickle
1436
+ * Generated from: covalent-core-side-sheet.ts
1437
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1438
+ */
1439
+
1440
+ exports.CovalentSideSheet = CovalentSideSheet;
1441
+ exports.CovalentSideSheetActions = CovalentSideSheetActions;
1442
+ exports.CovalentSideSheetClose = CovalentSideSheetClose;
1443
+ exports.CovalentSideSheetConfig = CovalentSideSheetConfig;
1444
+ exports.CovalentSideSheetContent = CovalentSideSheetContent;
1445
+ exports.CovalentSideSheetModule = CovalentSideSheetModule;
1446
+ exports.CovalentSideSheetRef = CovalentSideSheetRef;
1447
+ exports.CovalentSideSheetTitle = CovalentSideSheetTitle;
1448
+ exports.CovalentSideSheetWrapper = CovalentSideSheetWrapper;
1449
+ exports._CovalentSideSheetBase = _CovalentSideSheetBase;
1450
+ exports._closeSideSheetVia = _closeSideSheetVia;
1451
+ exports.ɵa = _CovalentSideSheetContainerBase;
1452
+ exports.ɵb = CovalentSideSheetContainer;
1453
+ exports.ɵc = tdSideSheetAnimations;
1454
+
1455
+ Object.defineProperty(exports, '__esModule', { value: true });
1456
+
1457
+ })));
1458
+ //# sourceMappingURL=covalent-core-side-sheet.umd.js.map