@covalent/core 3.1.2 → 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 (317) hide show
  1. package/bundles/covalent-core-user-profile.umd.js +1 -9
  2. package/bundles/covalent-core-user-profile.umd.js.map +1 -1
  3. package/bundles/covalent-core-user-profile.umd.min.js.map +1 -1
  4. package/esm2015/user-profile/user-profile.module.js +3 -11
  5. package/fesm2015/covalent-core-user-profile.js +1 -9
  6. package/fesm2015/covalent-core-user-profile.js.map +1 -1
  7. package/package.json +1 -1
  8. package/schematics/components.js +1 -14
  9. package/schematics/components.js.map +1 -1
  10. package/theming/_all-theme.scss +0 -14
  11. package/theming/prebuilt/blue-grey-deep-orange.css +0 -248
  12. package/theming/prebuilt/blue-grey-deep-orange.css.map +1 -1
  13. package/theming/prebuilt/blue-orange.css +0 -248
  14. package/theming/prebuilt/blue-orange.css.map +1 -1
  15. package/theming/prebuilt/indigo-pink.css +0 -248
  16. package/theming/prebuilt/indigo-pink.css.map +1 -1
  17. package/theming/prebuilt/orange-light-blue.css +0 -248
  18. package/theming/prebuilt/orange-light-blue.css.map +1 -1
  19. package/theming/prebuilt/teal-orange.css +0 -248
  20. package/theming/prebuilt/teal-orange.css.map +1 -1
  21. package/typography/_all-typography.scss +0 -10
  22. package/user-profile/covalent-core-user-profile.metadata.json +1 -1
  23. package/bundles/covalent-core-chips.umd.js +0 -1507
  24. package/bundles/covalent-core-chips.umd.js.map +0 -1
  25. package/bundles/covalent-core-chips.umd.min.js +0 -16
  26. package/bundles/covalent-core-chips.umd.min.js.map +0 -1
  27. package/bundles/covalent-core-data-table.umd.js +0 -2756
  28. package/bundles/covalent-core-data-table.umd.js.map +0 -1
  29. package/bundles/covalent-core-data-table.umd.min.js +0 -16
  30. package/bundles/covalent-core-data-table.umd.min.js.map +0 -1
  31. package/bundles/covalent-core-expansion-panel.umd.js +0 -853
  32. package/bundles/covalent-core-expansion-panel.umd.js.map +0 -1
  33. package/bundles/covalent-core-expansion-panel.umd.min.js +0 -16
  34. package/bundles/covalent-core-expansion-panel.umd.min.js.map +0 -1
  35. package/bundles/covalent-core-loading.umd.js +0 -1534
  36. package/bundles/covalent-core-loading.umd.js.map +0 -1
  37. package/bundles/covalent-core-loading.umd.min.js +0 -16
  38. package/bundles/covalent-core-loading.umd.min.js.map +0 -1
  39. package/bundles/covalent-core-media.umd.js +0 -749
  40. package/bundles/covalent-core-media.umd.js.map +0 -1
  41. package/bundles/covalent-core-media.umd.min.js +0 -16
  42. package/bundles/covalent-core-media.umd.min.js.map +0 -1
  43. package/bundles/covalent-core-nav-links.umd.js +0 -197
  44. package/bundles/covalent-core-nav-links.umd.js.map +0 -1
  45. package/bundles/covalent-core-nav-links.umd.min.js +0 -2
  46. package/bundles/covalent-core-nav-links.umd.min.js.map +0 -1
  47. package/bundles/covalent-core-notifications.umd.js +0 -275
  48. package/bundles/covalent-core-notifications.umd.js.map +0 -1
  49. package/bundles/covalent-core-notifications.umd.min.js +0 -2
  50. package/bundles/covalent-core-notifications.umd.min.js.map +0 -1
  51. package/bundles/covalent-core-paging.umd.js +0 -491
  52. package/bundles/covalent-core-paging.umd.js.map +0 -1
  53. package/bundles/covalent-core-paging.umd.min.js +0 -2
  54. package/bundles/covalent-core-paging.umd.min.js.map +0 -1
  55. package/bundles/covalent-core-sidesheet.umd.js +0 -145
  56. package/bundles/covalent-core-sidesheet.umd.js.map +0 -1
  57. package/bundles/covalent-core-sidesheet.umd.min.js +0 -2
  58. package/bundles/covalent-core-sidesheet.umd.min.js.map +0 -1
  59. package/bundles/covalent-core-steps.umd.js +0 -1756
  60. package/bundles/covalent-core-steps.umd.js.map +0 -1
  61. package/bundles/covalent-core-steps.umd.min.js +0 -16
  62. package/bundles/covalent-core-steps.umd.min.js.map +0 -1
  63. package/bundles/covalent-core-tab-select.umd.js +0 -732
  64. package/bundles/covalent-core-tab-select.umd.js.map +0 -1
  65. package/bundles/covalent-core-tab-select.umd.min.js +0 -16
  66. package/bundles/covalent-core-tab-select.umd.min.js.map +0 -1
  67. package/bundles/covalent-core-virtual-scroll.umd.js +0 -785
  68. package/bundles/covalent-core-virtual-scroll.umd.js.map +0 -1
  69. package/bundles/covalent-core-virtual-scroll.umd.min.js +0 -16
  70. package/bundles/covalent-core-virtual-scroll.umd.min.js.map +0 -1
  71. package/chips/README.md +0 -99
  72. package/chips/_chips-theme.scss +0 -87
  73. package/chips/chips.component.d.ts +0 -287
  74. package/chips/chips.component.scss +0 -147
  75. package/chips/chips.module.d.ts +0 -2
  76. package/chips/covalent-core-chips.d.ts +0 -4
  77. package/chips/covalent-core-chips.metadata.json +0 -1
  78. package/chips/index.d.ts +0 -1
  79. package/chips/package.json +0 -11
  80. package/chips/public-api.d.ts +0 -2
  81. package/data-table/README.md +0 -134
  82. package/data-table/_data-table-theme.scss +0 -115
  83. package/data-table/covalent-core-data-table.d.ts +0 -4
  84. package/data-table/covalent-core-data-table.metadata.json +0 -1
  85. package/data-table/data-table-cell/data-table-cell.component.d.ts +0 -22
  86. package/data-table/data-table-cell/data-table-cell.component.scss +0 -58
  87. package/data-table/data-table-column/data-table-column.component.d.ts +0 -63
  88. package/data-table/data-table-column/data-table-column.component.scss +0 -80
  89. package/data-table/data-table-row/data-table-row.component.d.ts +0 -20
  90. package/data-table/data-table-row/data-table-row.component.scss +0 -12
  91. package/data-table/data-table-table/data-table-table.component.d.ts +0 -6
  92. package/data-table/data-table-table/data-table-table.component.scss +0 -7
  93. package/data-table/data-table.component.d.ts +0 -356
  94. package/data-table/data-table.component.scss +0 -93
  95. package/data-table/data-table.module.d.ts +0 -2
  96. package/data-table/directives/data-table-template.directive.d.ts +0 -6
  97. package/data-table/index.d.ts +0 -1
  98. package/data-table/package.json +0 -11
  99. package/data-table/public-api.d.ts +0 -8
  100. package/data-table/services/data-table.service.d.ts +0 -31
  101. package/esm2015/chips/chips.component.js +0 -1115
  102. package/esm2015/chips/chips.module.js +0 -23
  103. package/esm2015/chips/covalent-core-chips.js +0 -10
  104. package/esm2015/chips/index.js +0 -7
  105. package/esm2015/chips/public-api.js +0 -8
  106. package/esm2015/data-table/covalent-core-data-table.js +0 -10
  107. package/esm2015/data-table/data-table-cell/data-table-cell.component.js +0 -88
  108. package/esm2015/data-table/data-table-column/data-table-column.component.js +0 -218
  109. package/esm2015/data-table/data-table-row/data-table-row.component.js +0 -132
  110. package/esm2015/data-table/data-table-table/data-table-table.component.js +0 -43
  111. package/esm2015/data-table/data-table.component.js +0 -1640
  112. package/esm2015/data-table/data-table.module.js +0 -39
  113. package/esm2015/data-table/directives/data-table-template.directive.js +0 -32
  114. package/esm2015/data-table/index.js +0 -7
  115. package/esm2015/data-table/public-api.js +0 -14
  116. package/esm2015/data-table/services/data-table.service.js +0 -116
  117. package/esm2015/expansion-panel/covalent-core-expansion-panel.js +0 -10
  118. package/esm2015/expansion-panel/expansion-panel-group.component.js +0 -212
  119. package/esm2015/expansion-panel/expansion-panel.component.js +0 -272
  120. package/esm2015/expansion-panel/expansion-panel.module.js +0 -31
  121. package/esm2015/expansion-panel/index.js +0 -7
  122. package/esm2015/expansion-panel/public-api.js +0 -9
  123. package/esm2015/loading/covalent-core-loading.js +0 -10
  124. package/esm2015/loading/directives/loading.directive.js +0 -231
  125. package/esm2015/loading/index.js +0 -7
  126. package/esm2015/loading/loading.component.js +0 -302
  127. package/esm2015/loading/loading.module.js +0 -30
  128. package/esm2015/loading/public-api.js +0 -11
  129. package/esm2015/loading/services/loading.factory.js +0 -297
  130. package/esm2015/loading/services/loading.service.js +0 -319
  131. package/esm2015/media/covalent-core-media.js +0 -10
  132. package/esm2015/media/directives/media-toggle.directive.js +0 -207
  133. package/esm2015/media/index.js +0 -7
  134. package/esm2015/media/media.module.js +0 -20
  135. package/esm2015/media/public-api.js +0 -9
  136. package/esm2015/media/services/media.service.js +0 -169
  137. package/esm2015/nav-links/covalent-core-nav-links.js +0 -10
  138. package/esm2015/nav-links/index.js +0 -7
  139. package/esm2015/nav-links/nav-links.component.js +0 -138
  140. package/esm2015/nav-links/nav-links.module.js +0 -37
  141. package/esm2015/nav-links/public-api.js +0 -8
  142. package/esm2015/notifications/covalent-core-notifications.js +0 -10
  143. package/esm2015/notifications/index.js +0 -7
  144. package/esm2015/notifications/notification-count.component.js +0 -191
  145. package/esm2015/notifications/notifications.module.js +0 -20
  146. package/esm2015/notifications/public-api.js +0 -8
  147. package/esm2015/paging/covalent-core-paging.js +0 -10
  148. package/esm2015/paging/index.js +0 -7
  149. package/esm2015/paging/paging-bar.component.js +0 -412
  150. package/esm2015/paging/paging.module.js +0 -20
  151. package/esm2015/paging/public-api.js +0 -8
  152. package/esm2015/sidesheet/covalent-core-sidesheet.js +0 -10
  153. package/esm2015/sidesheet/index.js +0 -7
  154. package/esm2015/sidesheet/public-api.js +0 -8
  155. package/esm2015/sidesheet/sidesheet.component.js +0 -72
  156. package/esm2015/sidesheet/sidesheet.module.js +0 -27
  157. package/esm2015/steps/covalent-core-steps.js +0 -10
  158. package/esm2015/steps/index.js +0 -7
  159. package/esm2015/steps/nav/nav-step-link/nav-step-link.component.js +0 -144
  160. package/esm2015/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.js +0 -371
  161. package/esm2015/steps/nav/nav-steps-vertical/nav-steps-vertical.component.js +0 -130
  162. package/esm2015/steps/public-api.js +0 -14
  163. package/esm2015/steps/step-body/step-body.component.js +0 -83
  164. package/esm2015/steps/step-header/step-header.component.js +0 -79
  165. package/esm2015/steps/step.component.js +0 -312
  166. package/esm2015/steps/steps.component.js +0 -234
  167. package/esm2015/steps/steps.module.js +0 -44
  168. package/esm2015/tab-select/covalent-core-tab-select.js +0 -10
  169. package/esm2015/tab-select/index.js +0 -7
  170. package/esm2015/tab-select/public-api.js +0 -9
  171. package/esm2015/tab-select/tab-option.component.js +0 -82
  172. package/esm2015/tab-select/tab-select.component.js +0 -291
  173. package/esm2015/tab-select/tab-select.module.js +0 -31
  174. package/esm2015/virtual-scroll/covalent-core-virtual-scroll.js +0 -10
  175. package/esm2015/virtual-scroll/index.js +0 -7
  176. package/esm2015/virtual-scroll/public-api.js +0 -9
  177. package/esm2015/virtual-scroll/virtual-scroll-container.component.js +0 -391
  178. package/esm2015/virtual-scroll/virtual-scroll-row.directive.js +0 -25
  179. package/esm2015/virtual-scroll/virtual-scroll.module.js +0 -21
  180. package/expansion-panel/README.md +0 -116
  181. package/expansion-panel/_expansion-panel-theme.scss +0 -80
  182. package/expansion-panel/covalent-core-expansion-panel.d.ts +0 -4
  183. package/expansion-panel/covalent-core-expansion-panel.metadata.json +0 -1
  184. package/expansion-panel/expansion-panel-group.component.d.ts +0 -31
  185. package/expansion-panel/expansion-panel-group.component.scss +0 -0
  186. package/expansion-panel/expansion-panel.component.d.ts +0 -82
  187. package/expansion-panel/expansion-panel.component.scss +0 -50
  188. package/expansion-panel/expansion-panel.module.d.ts +0 -2
  189. package/expansion-panel/index.d.ts +0 -1
  190. package/expansion-panel/package.json +0 -11
  191. package/expansion-panel/public-api.d.ts +0 -3
  192. package/fesm2015/covalent-core-chips.js +0 -1151
  193. package/fesm2015/covalent-core-chips.js.map +0 -1
  194. package/fesm2015/covalent-core-data-table.js +0 -2309
  195. package/fesm2015/covalent-core-data-table.js.map +0 -1
  196. package/fesm2015/covalent-core-expansion-panel.js +0 -528
  197. package/fesm2015/covalent-core-expansion-panel.js.map +0 -1
  198. package/fesm2015/covalent-core-loading.js +0 -1179
  199. package/fesm2015/covalent-core-loading.js.map +0 -1
  200. package/fesm2015/covalent-core-media.js +0 -411
  201. package/fesm2015/covalent-core-media.js.map +0 -1
  202. package/fesm2015/covalent-core-nav-links.js +0 -193
  203. package/fesm2015/covalent-core-nav-links.js.map +0 -1
  204. package/fesm2015/covalent-core-notifications.js +0 -228
  205. package/fesm2015/covalent-core-notifications.js.map +0 -1
  206. package/fesm2015/covalent-core-paging.js +0 -451
  207. package/fesm2015/covalent-core-paging.js.map +0 -1
  208. package/fesm2015/covalent-core-sidesheet.js +0 -118
  209. package/fesm2015/covalent-core-sidesheet.js.map +0 -1
  210. package/fesm2015/covalent-core-steps.js +0 -1384
  211. package/fesm2015/covalent-core-steps.js.map +0 -1
  212. package/fesm2015/covalent-core-tab-select.js +0 -416
  213. package/fesm2015/covalent-core-tab-select.js.map +0 -1
  214. package/fesm2015/covalent-core-virtual-scroll.js +0 -453
  215. package/fesm2015/covalent-core-virtual-scroll.js.map +0 -1
  216. package/loading/README.md +0 -180
  217. package/loading/_loading-theme.scss +0 -10
  218. package/loading/covalent-core-loading.d.ts +0 -4
  219. package/loading/covalent-core-loading.metadata.json +0 -1
  220. package/loading/directives/loading.directive.d.ts +0 -71
  221. package/loading/index.d.ts +0 -1
  222. package/loading/loading.component.d.ts +0 -87
  223. package/loading/loading.component.scss +0 -42
  224. package/loading/loading.module.d.ts +0 -2
  225. package/loading/package.json +0 -11
  226. package/loading/public-api.d.ts +0 -5
  227. package/loading/services/loading.factory.d.ts +0 -66
  228. package/loading/services/loading.service.d.ts +0 -118
  229. package/media/covalent-core-media.d.ts +0 -4
  230. package/media/covalent-core-media.metadata.json +0 -1
  231. package/media/directives/media-toggle.directive.d.ts +0 -42
  232. package/media/index.d.ts +0 -1
  233. package/media/media.module.d.ts +0 -2
  234. package/media/package.json +0 -11
  235. package/media/public-api.d.ts +0 -3
  236. package/media/services/media.service.d.ts +0 -31
  237. package/nav-links/README.md +0 -1
  238. package/nav-links/covalent-core-nav-links.d.ts +0 -4
  239. package/nav-links/covalent-core-nav-links.metadata.json +0 -1
  240. package/nav-links/index.d.ts +0 -1
  241. package/nav-links/nav-links.component.d.ts +0 -51
  242. package/nav-links/nav-links.component.scss +0 -15
  243. package/nav-links/nav-links.module.d.ts +0 -2
  244. package/nav-links/package.json +0 -11
  245. package/nav-links/public-api.d.ts +0 -2
  246. package/notifications/README.md +0 -69
  247. package/notifications/_notification-count-theme.scss +0 -27
  248. package/notifications/covalent-core-notifications.d.ts +0 -4
  249. package/notifications/covalent-core-notifications.metadata.json +0 -1
  250. package/notifications/index.d.ts +0 -1
  251. package/notifications/notification-count.component.d.ts +0 -74
  252. package/notifications/notification-count.component.scss +0 -90
  253. package/notifications/notifications.module.d.ts +0 -2
  254. package/notifications/package.json +0 -11
  255. package/notifications/public-api.d.ts +0 -2
  256. package/paging/README.md +0 -141
  257. package/paging/_paging-bar-theme.scss +0 -26
  258. package/paging/covalent-core-paging.d.ts +0 -4
  259. package/paging/covalent-core-paging.metadata.json +0 -1
  260. package/paging/index.d.ts +0 -1
  261. package/paging/package.json +0 -11
  262. package/paging/paging-bar.component.d.ts +0 -115
  263. package/paging/paging-bar.component.scss +0 -23
  264. package/paging/paging.module.d.ts +0 -2
  265. package/paging/public-api.d.ts +0 -2
  266. package/sidesheet/README.md +0 -68
  267. package/sidesheet/covalent-core-sidesheet.d.ts +0 -4
  268. package/sidesheet/covalent-core-sidesheet.metadata.json +0 -1
  269. package/sidesheet/index.d.ts +0 -1
  270. package/sidesheet/package.json +0 -11
  271. package/sidesheet/public-api.d.ts +0 -2
  272. package/sidesheet/sidesheet.component.d.ts +0 -13
  273. package/sidesheet/sidesheet.component.scss +0 -101
  274. package/sidesheet/sidesheet.module.d.ts +0 -2
  275. package/steps/README.md +0 -159
  276. package/steps/_steps-theme.scss +0 -108
  277. package/steps/covalent-core-steps.d.ts +0 -4
  278. package/steps/covalent-core-steps.metadata.json +0 -1
  279. package/steps/index.d.ts +0 -1
  280. package/steps/nav/README.md +0 -90
  281. package/steps/nav/nav-step-link/nav-step-link.component.d.ts +0 -42
  282. package/steps/nav/nav-step-link/nav-step-link.component.scss +0 -17
  283. package/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.d.ts +0 -79
  284. package/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.scss +0 -83
  285. package/steps/nav/nav-steps-vertical/nav-steps-vertical.component.d.ts +0 -18
  286. package/steps/nav/nav-steps-vertical/nav-steps-vertical.component.scss +0 -18
  287. package/steps/package.json +0 -11
  288. package/steps/public-api.d.ts +0 -8
  289. package/steps/step-body/step-body.component.d.ts +0 -25
  290. package/steps/step-body/step-body.component.scss +0 -29
  291. package/steps/step-header/step-header.component.d.ts +0 -35
  292. package/steps/step-header/step-header.component.scss +0 -90
  293. package/steps/step.component.d.ts +0 -97
  294. package/steps/steps.component.d.ts +0 -60
  295. package/steps/steps.component.scss +0 -55
  296. package/steps/steps.module.d.ts +0 -2
  297. package/tab-select/README.md +0 -93
  298. package/tab-select/covalent-core-tab-select.d.ts +0 -4
  299. package/tab-select/covalent-core-tab-select.metadata.json +0 -1
  300. package/tab-select/index.d.ts +0 -1
  301. package/tab-select/package.json +0 -11
  302. package/tab-select/public-api.d.ts +0 -3
  303. package/tab-select/tab-option.component.d.ts +0 -20
  304. package/tab-select/tab-option.component.scss +0 -0
  305. package/tab-select/tab-select.component.d.ts +0 -62
  306. package/tab-select/tab-select.component.scss +0 -3
  307. package/tab-select/tab-select.module.d.ts +0 -2
  308. package/virtual-scroll/README.md +0 -68
  309. package/virtual-scroll/covalent-core-virtual-scroll.d.ts +0 -4
  310. package/virtual-scroll/covalent-core-virtual-scroll.metadata.json +0 -1
  311. package/virtual-scroll/index.d.ts +0 -1
  312. package/virtual-scroll/package.json +0 -11
  313. package/virtual-scroll/public-api.d.ts +0 -3
  314. package/virtual-scroll/virtual-scroll-container.component.d.ts +0 -73
  315. package/virtual-scroll/virtual-scroll-container.component.scss +0 -7
  316. package/virtual-scroll/virtual-scroll-row.directive.d.ts +0 -5
  317. package/virtual-scroll/virtual-scroll.module.d.ts +0 -2
@@ -1,1507 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/common'), require('@angular/material/input'), require('@angular/material/icon'), require('@angular/material/autocomplete'), require('@angular/material/chips'), require('@angular/cdk/portal'), require('@angular/cdk/coercion'), require('@angular/cdk/keycodes'), require('@angular/material/core'), require('rxjs'), require('rxjs/operators'), require('@covalent/core/common')) :
3
- typeof define === 'function' && define.amd ? define('@covalent/core/chips', ['exports', '@angular/core', '@angular/forms', '@angular/common', '@angular/material/input', '@angular/material/icon', '@angular/material/autocomplete', '@angular/material/chips', '@angular/cdk/portal', '@angular/cdk/coercion', '@angular/cdk/keycodes', '@angular/material/core', 'rxjs', 'rxjs/operators', '@covalent/core/common'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.covalent = global.covalent || {}, global.covalent.core = global.covalent.core || {}, global.covalent.core.chips = {}), global.ng.core, global.ng.forms, global.ng.common, global.ng.material.input, global.ng.material.icon, global.ng.material.autocomplete, global.ng.material.chips, global.ng.cdk.portal, global.ng.cdk.coercion, global.ng.cdk.keycodes, global.ng.material.core, global.rxjs, global.rxjs.operators, global.covalent.core.common));
5
- }(this, (function (exports, core, forms, common$1, input, icon, autocomplete, chips, portal, coercion, keycodes, core$1, rxjs, operators, common) { '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
- var TdChipDirective = /** @class */ (function (_super) {
309
- __extends(TdChipDirective, _super);
310
- /**
311
- * @param {?} templateRef
312
- * @param {?} viewContainerRef
313
- */
314
- function TdChipDirective(templateRef, viewContainerRef) {
315
- return _super.call(this, templateRef, viewContainerRef) || this;
316
- }
317
- return TdChipDirective;
318
- }(portal.TemplatePortalDirective));
319
- TdChipDirective.decorators = [
320
- { type: core.Directive, args: [{
321
- selector: '[td-chip]ng-template',
322
- },] }
323
- ];
324
- /** @nocollapse */
325
- TdChipDirective.ctorParameters = function () { return [
326
- { type: core.TemplateRef },
327
- { type: core.ViewContainerRef }
328
- ]; };
329
- var TdAutocompleteOptionDirective = /** @class */ (function (_super) {
330
- __extends(TdAutocompleteOptionDirective, _super);
331
- /**
332
- * @param {?} templateRef
333
- * @param {?} viewContainerRef
334
- */
335
- function TdAutocompleteOptionDirective(templateRef, viewContainerRef) {
336
- return _super.call(this, templateRef, viewContainerRef) || this;
337
- }
338
- return TdAutocompleteOptionDirective;
339
- }(portal.TemplatePortalDirective));
340
- TdAutocompleteOptionDirective.decorators = [
341
- { type: core.Directive, args: [{
342
- selector: '[td-autocomplete-option]ng-template',
343
- },] }
344
- ];
345
- /** @nocollapse */
346
- TdAutocompleteOptionDirective.ctorParameters = function () { return [
347
- { type: core.TemplateRef },
348
- { type: core.ViewContainerRef }
349
- ]; };
350
- var TdChipsBase = /** @class */ (function () {
351
- /**
352
- * @param {?} _changeDetectorRef
353
- */
354
- function TdChipsBase(_changeDetectorRef) {
355
- this._changeDetectorRef = _changeDetectorRef;
356
- }
357
- return TdChipsBase;
358
- }());
359
- if (false) {
360
- /** @type {?} */
361
- TdChipsBase.prototype._changeDetectorRef;
362
- }
363
- /* tslint:disable-next-line */
364
- /** @type {?} */
365
- var _TdChipsMixinBase = common.mixinControlValueAccessor(common.mixinDisabled(TdChipsBase), []);
366
- var TdChipsComponent = /** @class */ (function (_super) {
367
- __extends(TdChipsComponent, _super);
368
- /**
369
- * @param {?} _elementRef
370
- * @param {?} _renderer
371
- * @param {?} _document
372
- * @param {?} _changeDetectorRef
373
- */
374
- function TdChipsComponent(_elementRef, _renderer, _document, _changeDetectorRef) {
375
- var _this = _super.call(this, _changeDetectorRef) || this;
376
- _this._elementRef = _elementRef;
377
- _this._renderer = _renderer;
378
- _this._document = _document;
379
- _this._outsideClickSubs = rxjs.Subscription.EMPTY;
380
- _this._inputValueChangesSubs = rxjs.Subscription.EMPTY;
381
- _this._isMousedown = false;
382
- _this._length = 0;
383
- _this._stacked = false;
384
- _this._requireMatch = false;
385
- _this._color = 'primary';
386
- _this._inputPosition = 'after';
387
- _this._chipAddition = true;
388
- _this._chipRemoval = true;
389
- _this._focused = false;
390
- _this._required = false;
391
- _this._tabIndex = 0;
392
- _this._touchendDebounce = 100;
393
- _this._internalClick = false;
394
- _this._internalActivateOption = false;
395
- /**
396
- * FormControl for the matInput element.
397
- */
398
- _this.inputControl = new forms.FormControl();
399
- /**
400
- * debounce?: number
401
- * Debounce timeout between keypresses. Defaults to 200.
402
- */
403
- _this.debounce = 200;
404
- /**
405
- * add?: function
406
- * Method to be executed when a chip is added.
407
- * Sends chip value as event.
408
- */
409
- _this.add = new core.EventEmitter();
410
- /**
411
- * remove?: function
412
- * Method to be executed when a chip is removed.
413
- * Sends chip value as event.
414
- */
415
- _this.remove = new core.EventEmitter();
416
- /**
417
- * inputChange?: function
418
- * Method to be executed when the value in the autocomplete input changes.
419
- * Sends string value as event.
420
- */
421
- _this.inputChange = new core.EventEmitter();
422
- /**
423
- * chipFocus?: function
424
- * Method to be executed when a chip is focused.
425
- * Sends chip value as event.
426
- */
427
- _this.chipFocus = new core.EventEmitter();
428
- /**
429
- * blur?: function
430
- * Method to be executed when a chip is blurred.
431
- * Sends chip value as event.
432
- */
433
- _this.chipBlur = new core.EventEmitter();
434
- /**
435
- * compareWith? function
436
- * Function used to check whether a chip value already exists.
437
- * Defaults to strict equality comparison ===
438
- */
439
- _this.compareWith = ( /**
440
- * @param {?} o1
441
- * @param {?} o2
442
- * @return {?}
443
- */function (o1, o2) {
444
- return o1 === o2;
445
- });
446
- _this._renderer.addClass(_this._elementRef.nativeElement, 'mat-' + _this._color);
447
- return _this;
448
- }
449
- Object.defineProperty(TdChipsComponent.prototype, "focused", {
450
- /**
451
- * Flag that is true when autocomplete is focused.
452
- * @return {?}
453
- */
454
- get: function () {
455
- return this._focused;
456
- },
457
- enumerable: false,
458
- configurable: true
459
- });
460
- Object.defineProperty(TdChipsComponent.prototype, "items", {
461
- /**
462
- * @return {?}
463
- */
464
- get: function () {
465
- return this._items;
466
- },
467
- /**
468
- * items?: any[]
469
- * Renders the `mat-autocomplete` with the provided list to display as options.
470
- * @param {?} items
471
- * @return {?}
472
- */
473
- set: function (items) {
474
- this._items = items;
475
- this._setFirstOptionActive();
476
- this._changeDetectorRef.markForCheck();
477
- },
478
- enumerable: false,
479
- configurable: true
480
- });
481
- Object.defineProperty(TdChipsComponent.prototype, "stacked", {
482
- /**
483
- * @return {?}
484
- */
485
- get: function () {
486
- return this._stacked;
487
- },
488
- /**
489
- * stacked?: boolean
490
- * Set stacked or horizontal chips depending on value.
491
- * Defaults to false.
492
- * @param {?} stacked
493
- * @return {?}
494
- */
495
- set: function (stacked) {
496
- this._stacked = coercion.coerceBooleanProperty(stacked);
497
- },
498
- enumerable: false,
499
- configurable: true
500
- });
501
- Object.defineProperty(TdChipsComponent.prototype, "inputPosition", {
502
- /**
503
- * @return {?}
504
- */
505
- get: function () {
506
- return this._inputPosition;
507
- },
508
- /**
509
- * inputPosition?: 'before' | 'after'
510
- * Set input position before or after the chips.
511
- * Defaults to 'after'.
512
- * @param {?} inputPosition
513
- * @return {?}
514
- */
515
- set: function (inputPosition) {
516
- this._inputPosition = inputPosition;
517
- },
518
- enumerable: false,
519
- configurable: true
520
- });
521
- Object.defineProperty(TdChipsComponent.prototype, "requireMatch", {
522
- /**
523
- * @return {?}
524
- */
525
- get: function () {
526
- return this._requireMatch;
527
- },
528
- /**
529
- * requireMatch?: boolean
530
- * Blocks custom inputs and only allows selections from the autocomplete list.
531
- * @param {?} requireMatch
532
- * @return {?}
533
- */
534
- set: function (requireMatch) {
535
- this._requireMatch = coercion.coerceBooleanProperty(requireMatch);
536
- },
537
- enumerable: false,
538
- configurable: true
539
- });
540
- Object.defineProperty(TdChipsComponent.prototype, "required", {
541
- /**
542
- * @return {?}
543
- */
544
- get: function () {
545
- return this._required;
546
- },
547
- /**
548
- * required?: boolean
549
- * Value is set to true if at least one chip is needed
550
- * Defaults to false
551
- * @param {?} required
552
- * @return {?}
553
- */
554
- set: function (required) {
555
- this._required = coercion.coerceBooleanProperty(required);
556
- },
557
- enumerable: false,
558
- configurable: true
559
- });
560
- Object.defineProperty(TdChipsComponent.prototype, "chipAddition", {
561
- /**
562
- * @return {?}
563
- */
564
- get: function () {
565
- return this._chipAddition;
566
- },
567
- /**
568
- * chipAddition?: boolean
569
- * Disables the ability to add chips. When setting disabled as true, this will be overriden.
570
- * Defaults to true.
571
- * @param {?} chipAddition
572
- * @return {?}
573
- */
574
- set: function (chipAddition) {
575
- this._chipAddition = chipAddition;
576
- this._toggleInput();
577
- },
578
- enumerable: false,
579
- configurable: true
580
- });
581
- Object.defineProperty(TdChipsComponent.prototype, "canAddChip", {
582
- /**
583
- * Checks if not in disabled state and if chipAddition is set to 'true'
584
- * States if a chip can be added and if the input is available
585
- * @return {?}
586
- */
587
- get: function () {
588
- return this.chipAddition && !this.disabled;
589
- },
590
- enumerable: false,
591
- configurable: true
592
- });
593
- Object.defineProperty(TdChipsComponent.prototype, "chipRemoval", {
594
- /**
595
- * @return {?}
596
- */
597
- get: function () {
598
- return this._chipRemoval;
599
- },
600
- /**
601
- * chipRemoval?: boolean
602
- * Disables the ability to remove chips. If it doesn't exist chip remmoval defaults to true.
603
- * When setting disabled as true, this will be overriden to false.
604
- * @param {?} chipRemoval
605
- * @return {?}
606
- */
607
- set: function (chipRemoval) {
608
- this._chipRemoval = chipRemoval;
609
- },
610
- enumerable: false,
611
- configurable: true
612
- });
613
- Object.defineProperty(TdChipsComponent.prototype, "canRemoveChip", {
614
- /**
615
- * Checks if not in disabled state and if chipRemoval is set to 'true'
616
- * States if a chip can be removed
617
- * @return {?}
618
- */
619
- get: function () {
620
- return this.chipRemoval && !this.disabled;
621
- },
622
- enumerable: false,
623
- configurable: true
624
- });
625
- Object.defineProperty(TdChipsComponent.prototype, "displayPlaceHolder", {
626
- /**
627
- * returns the display placeholder
628
- * @return {?}
629
- */
630
- get: function () {
631
- if (!this.canAddChip) {
632
- return '';
633
- }
634
- return this._required ? this.placeholder + " *" : this.placeholder;
635
- },
636
- enumerable: false,
637
- configurable: true
638
- });
639
- Object.defineProperty(TdChipsComponent.prototype, "color", {
640
- /**
641
- * @return {?}
642
- */
643
- get: function () {
644
- return this._color;
645
- },
646
- /**
647
- * color?: 'primary' | 'accent' | 'warn'
648
- * Sets the color for the input and focus/selected state of the chips.
649
- * Defaults to 'primary'
650
- * @param {?} color
651
- * @return {?}
652
- */
653
- set: function (color) {
654
- if (color) {
655
- this._renderer.removeClass(this._elementRef.nativeElement, 'mat-' + this._color);
656
- this._color = color;
657
- this._renderer.addClass(this._elementRef.nativeElement, 'mat-' + this._color);
658
- }
659
- },
660
- enumerable: false,
661
- configurable: true
662
- });
663
- Object.defineProperty(TdChipsComponent.prototype, "tabIndex", {
664
- /**
665
- * Hostbinding to set the a11y of the TdChipsComponent depending on its state
666
- * @return {?}
667
- */
668
- get: function () {
669
- return this.disabled ? -1 : this._tabIndex;
670
- },
671
- enumerable: false,
672
- configurable: true
673
- });
674
- /**
675
- * Listens to host focus event to act on it
676
- * @param {?} event
677
- * @return {?}
678
- */
679
- TdChipsComponent.prototype.focusListener = function (event) {
680
- // should only focus if its not via mousedown to prevent clashing with autocomplete
681
- if (!this._isMousedown) {
682
- this.focus();
683
- }
684
- event.preventDefault();
685
- };
686
- /**
687
- * Listens to host mousedown event to act on it
688
- * @param {?} event
689
- * @return {?}
690
- */
691
- TdChipsComponent.prototype.mousedownListener = function (event) {
692
- var _this = this;
693
- // sets a flag to know if there was a mousedown and then it returns it back to false
694
- this._isMousedown = true;
695
- rxjs.timer()
696
- .toPromise()
697
- .then(( /**
698
- * @return {?}
699
- */function () {
700
- _this._isMousedown = false;
701
- }));
702
- };
703
- /**
704
- * If clicking on :host or `td-chips-wrapper`, then we stop the click propagation so the autocomplete
705
- * doesnt close automatically.
706
- * @param {?} event
707
- * @return {?}
708
- */
709
- TdChipsComponent.prototype.clickListener = function (event) {
710
- /** @type {?} */
711
- var clickTarget = ( /** @type {?} */(event.target));
712
- if (clickTarget === this._elementRef.nativeElement || clickTarget.className.indexOf('td-chips-wrapper') > -1) {
713
- this.focus();
714
- event.preventDefault();
715
- event.stopPropagation();
716
- }
717
- };
718
- /**
719
- * Listens to host keydown event to act on it depending on the keypress
720
- * @param {?} event
721
- * @return {?}
722
- */
723
- TdChipsComponent.prototype.keydownListener = function (event) {
724
- var _this = this;
725
- switch (event.keyCode) {
726
- case keycodes.TAB:
727
- // if tabing out, then unfocus the component
728
- rxjs.timer()
729
- .toPromise()
730
- .then(( /**
731
- * @return {?}
732
- */function () {
733
- _this.removeFocusedState();
734
- }));
735
- break;
736
- case keycodes.ESCAPE:
737
- if (this._inputChild.focused) {
738
- this._nativeInput.nativeElement.blur();
739
- this.removeFocusedState();
740
- this._closeAutocomplete();
741
- }
742
- else {
743
- this.focus();
744
- }
745
- break;
746
- default:
747
- // default
748
- }
749
- };
750
- /**
751
- * @return {?}
752
- */
753
- TdChipsComponent.prototype.ngOnInit = function () {
754
- var _this = this;
755
- this._inputValueChangesSubs = this.inputControl.valueChanges
756
- .pipe(operators.debounceTime(this.debounce))
757
- .subscribe(( /**
758
- * @param {?} value
759
- * @return {?}
760
- */function (value) {
761
- _this.inputChange.emit(value ? value : '');
762
- }));
763
- this._changeDetectorRef.markForCheck();
764
- };
765
- /**
766
- * @return {?}
767
- */
768
- TdChipsComponent.prototype.ngAfterViewInit = function () {
769
- this._watchOutsideClick();
770
- this._changeDetectorRef.markForCheck();
771
- };
772
- /**
773
- * @return {?}
774
- */
775
- TdChipsComponent.prototype.ngDoCheck = function () {
776
- // Throw onChange event only if array changes size.
777
- if (this.value && this.value.length !== this._length) {
778
- this._length = this.value.length;
779
- this.onChange(this.value);
780
- }
781
- };
782
- /**
783
- * @return {?}
784
- */
785
- TdChipsComponent.prototype.ngOnDestroy = function () {
786
- this._outsideClickSubs.unsubscribe();
787
- this._inputValueChangesSubs.unsubscribe();
788
- };
789
- /**
790
- * @return {?}
791
- */
792
- TdChipsComponent.prototype._setInternalClick = function () {
793
- this._internalClick = true;
794
- };
795
- /**
796
- * Method executed when the disabled value changes
797
- * @param {?} v
798
- * @return {?}
799
- */
800
- TdChipsComponent.prototype.onDisabledChange = function (v) {
801
- this._toggleInput();
802
- };
803
- /**
804
- * Method that is executed when trying to create a new chip from the autocomplete.
805
- * It check if [requireMatch] is enabled, and tries to add the first active option
806
- * else if just adds the value thats on the input
807
- * returns 'true' if successful, 'false' if it fails.
808
- * @return {?}
809
- */
810
- TdChipsComponent.prototype._handleAddChip = function () {
811
- /** @type {?} */
812
- var value;
813
- if (this.requireMatch) {
814
- /** @type {?} */
815
- var selectedOptions = this._options.toArray().filter(( /**
816
- * @param {?} option
817
- * @return {?}
818
- */function (option) {
819
- return option.active;
820
- }));
821
- if (selectedOptions.length > 0) {
822
- value = selectedOptions[0].value;
823
- selectedOptions[0].setInactiveStyles();
824
- }
825
- if (!value) {
826
- return false;
827
- }
828
- }
829
- else {
830
- // if there is a selection, then use that
831
- // else use the input value as chip
832
- if (this._autocompleteTrigger.activeOption) {
833
- value = this._autocompleteTrigger.activeOption.value;
834
- this._autocompleteTrigger.activeOption.setInactiveStyles();
835
- }
836
- else {
837
- value = this._inputChild.value;
838
- if (value.trim() === '') {
839
- return false;
840
- }
841
- }
842
- }
843
- return this.addChip(value);
844
- };
845
- /**
846
- * Method thats exectuted when trying to add a value as chip
847
- * returns 'true' if successful, 'false' if it fails.
848
- * @param {?} value
849
- * @return {?}
850
- */
851
- TdChipsComponent.prototype.addChip = function (value) {
852
- var _this = this;
853
- /**
854
- * add a debounce ms delay when reopening the autocomplete to give it time
855
- * to rerender the next list and at the correct spot
856
- */
857
- this._closeAutocomplete();
858
- rxjs.timer(this.debounce)
859
- .toPromise()
860
- .then(( /**
861
- * @return {?}
862
- */function () {
863
- _this.setFocusedState();
864
- _this._setFirstOptionActive();
865
- _this._openAutocomplete();
866
- }));
867
- this.inputControl.setValue('');
868
- // check if value is already part of the model
869
- if (this.value.findIndex(( /**
870
- * @param {?} item
871
- * @return {?}
872
- */function (item) { return _this.compareWith(item, value); })) > -1) {
873
- return false;
874
- }
875
- this.value.push(value);
876
- this.add.emit(value);
877
- this.onChange(this.value);
878
- this._changeDetectorRef.markForCheck();
879
- return true;
880
- };
881
- /**
882
- * Method that is executed when trying to remove a chip.
883
- * returns 'true' if successful, 'false' if it fails.
884
- * @param {?} index
885
- * @return {?}
886
- */
887
- TdChipsComponent.prototype.removeChip = function (index) {
888
- /** @type {?} */
889
- var removedValues = this.value.splice(index, 1);
890
- if (removedValues.length === 0) {
891
- return false;
892
- }
893
- /**
894
- * Checks if deleting last single chip, to focus input afterwards
895
- * Else check if its not the last chip of the list to focus the next one.
896
- */
897
- if (index === this._totalChips - 1 && index === 0) {
898
- this._inputChild.focus();
899
- }
900
- else if (index < this._totalChips - 1) {
901
- this._focusChip(index + 1);
902
- }
903
- else if (index > 0) {
904
- this._focusChip(index - 1);
905
- }
906
- this.remove.emit(removedValues[0]);
907
- this.onChange(this.value);
908
- this.inputControl.setValue('');
909
- this._changeDetectorRef.markForCheck();
910
- return true;
911
- };
912
- /**
913
- * Sets blur of chip and sends out event
914
- * @param {?} event
915
- * @param {?} value
916
- * @return {?}
917
- */
918
- TdChipsComponent.prototype._handleChipBlur = function (event, value) {
919
- this.chipBlur.emit(value);
920
- };
921
- /**
922
- * Sets focus of chip and sends out event
923
- * @param {?} event
924
- * @param {?} value
925
- * @return {?}
926
- */
927
- TdChipsComponent.prototype._handleChipFocus = function (event, value) {
928
- this.setFocusedState();
929
- this.chipFocus.emit(value);
930
- };
931
- /**
932
- * @return {?}
933
- */
934
- TdChipsComponent.prototype._handleFocus = function () {
935
- this.setFocusedState();
936
- this._setFirstOptionActive();
937
- return true;
938
- };
939
- /**
940
- * Sets focus state of the component
941
- * @return {?}
942
- */
943
- TdChipsComponent.prototype.setFocusedState = function () {
944
- if (!this.disabled) {
945
- this._focused = true;
946
- this._tabIndex = -1;
947
- this._changeDetectorRef.markForCheck();
948
- }
949
- };
950
- /**
951
- * Removes focus state of the component
952
- * @return {?}
953
- */
954
- TdChipsComponent.prototype.removeFocusedState = function () {
955
- this._focused = false;
956
- this._tabIndex = 0;
957
- this._changeDetectorRef.markForCheck();
958
- };
959
- /**
960
- * Programmatically focus the input or first chip. Since its the component entry point
961
- * depending if a user can add or remove chips
962
- * @return {?}
963
- */
964
- TdChipsComponent.prototype.focus = function () {
965
- if (this.canAddChip) {
966
- this._inputChild.focus();
967
- }
968
- else if (!this.disabled) {
969
- this._focusFirstChip();
970
- }
971
- };
972
- /**
973
- * Passes relevant input key presses.
974
- * @param {?} event
975
- * @return {?}
976
- */
977
- TdChipsComponent.prototype._inputKeydown = function (event) {
978
- switch (event.keyCode) {
979
- case keycodes.UP_ARROW:
980
- /**
981
- * Since the first item is highlighted on [requireMatch], we need to inactivate it
982
- * when pressing the up key
983
- */
984
- if (this.requireMatch) {
985
- /** @type {?} */
986
- var length = this._options.length;
987
- if (length > 1 && this._options.toArray()[0].active && this._internalActivateOption) {
988
- this._options.toArray()[0].setInactiveStyles();
989
- this._internalActivateOption = false;
990
- // prevent default window scrolling
991
- event.preventDefault();
992
- }
993
- }
994
- break;
995
- case keycodes.LEFT_ARROW:
996
- case keycodes.DELETE:
997
- case keycodes.BACKSPACE:
998
- this._closeAutocomplete();
999
- /** Check to see if input is empty when pressing left arrow to move to the last chip */
1000
- if (!this._inputChild.value) {
1001
- this._focusLastChip();
1002
- // prevent default window scrolling
1003
- event.preventDefault();
1004
- }
1005
- break;
1006
- case keycodes.RIGHT_ARROW:
1007
- this._closeAutocomplete();
1008
- /** Check to see if input is empty when pressing right arrow to move to the first chip */
1009
- if (!this._inputChild.value) {
1010
- this._focusFirstChip();
1011
- // prevent default window scrolling
1012
- event.preventDefault();
1013
- }
1014
- break;
1015
- default:
1016
- // default
1017
- }
1018
- };
1019
- /**
1020
- * Passes relevant chip key presses.
1021
- * @param {?} event
1022
- * @param {?} index
1023
- * @return {?}
1024
- */
1025
- TdChipsComponent.prototype._chipKeydown = function (event, index) {
1026
- switch (event.keyCode) {
1027
- case keycodes.DELETE:
1028
- case keycodes.BACKSPACE:
1029
- /** Check to see if we can delete a chip */
1030
- if (this.canRemoveChip) {
1031
- this.removeChip(index);
1032
- }
1033
- break;
1034
- case keycodes.UP_ARROW:
1035
- case keycodes.LEFT_ARROW:
1036
- /**
1037
- * Check to see if left/down arrow was pressed while focusing the first chip to focus input next
1038
- * Also check if input should be focused
1039
- */
1040
- if (index === 0) {
1041
- // only try to target input if pressing left
1042
- if (this.canAddChip && event.keyCode === keycodes.LEFT_ARROW) {
1043
- this._inputChild.focus();
1044
- }
1045
- else {
1046
- this._focusLastChip();
1047
- }
1048
- }
1049
- else if (index > 0) {
1050
- this._focusChip(index - 1);
1051
- }
1052
- // prevent default window scrolling
1053
- event.preventDefault();
1054
- break;
1055
- case keycodes.DOWN_ARROW:
1056
- case keycodes.RIGHT_ARROW:
1057
- /**
1058
- * Check to see if right/up arrow was pressed while focusing the last chip to focus input next
1059
- * Also check if input should be focused
1060
- */
1061
- if (index === this._totalChips - 1) {
1062
- // only try to target input if pressing right
1063
- if (this.canAddChip && event.keyCode === keycodes.RIGHT_ARROW) {
1064
- this._inputChild.focus();
1065
- }
1066
- else {
1067
- this._focusFirstChip();
1068
- }
1069
- }
1070
- else if (index < this._totalChips - 1) {
1071
- this._focusChip(index + 1);
1072
- }
1073
- // prevent default window scrolling
1074
- event.preventDefault();
1075
- break;
1076
- default:
1077
- // default
1078
- }
1079
- };
1080
- /**
1081
- * Method to remove from display the value added from the autocomplete since it goes directly as chip.
1082
- * @return {?}
1083
- */
1084
- TdChipsComponent.prototype._removeInputDisplay = function () {
1085
- return '';
1086
- };
1087
- /**
1088
- * Method to open the autocomplete manually if its not already opened
1089
- * @return {?}
1090
- */
1091
- TdChipsComponent.prototype._openAutocomplete = function () {
1092
- if (!this._autocompleteTrigger.panelOpen) {
1093
- this._autocompleteTrigger.openPanel();
1094
- this._changeDetectorRef.markForCheck();
1095
- }
1096
- };
1097
- /**
1098
- * Method to close the autocomplete manually if its not already closed
1099
- * @return {?}
1100
- */
1101
- TdChipsComponent.prototype._closeAutocomplete = function () {
1102
- if (this._autocompleteTrigger.panelOpen) {
1103
- this._autocompleteTrigger.closePanel();
1104
- this._changeDetectorRef.markForCheck();
1105
- }
1106
- };
1107
- Object.defineProperty(TdChipsComponent.prototype, "_totalChips", {
1108
- /**
1109
- * Get total of chips
1110
- * @return {?}
1111
- */
1112
- get: function () {
1113
- /** @type {?} */
1114
- var chips = this._chipsChildren.toArray();
1115
- return chips.length;
1116
- },
1117
- enumerable: false,
1118
- configurable: true
1119
- });
1120
- /**
1121
- * Method to focus a desired chip by index
1122
- * @private
1123
- * @param {?} index
1124
- * @return {?}
1125
- */
1126
- TdChipsComponent.prototype._focusChip = function (index) {
1127
- /** check to see if index exists in the array before focusing */
1128
- if (index > -1 && this._totalChips > index) {
1129
- this._chipsChildren.toArray()[index].focus();
1130
- }
1131
- };
1132
- /**
1133
- * Method to focus first chip
1134
- * @private
1135
- * @return {?}
1136
- */
1137
- TdChipsComponent.prototype._focusFirstChip = function () {
1138
- this._focusChip(0);
1139
- };
1140
- /**
1141
- * Method to focus last chip
1142
- * @private
1143
- * @return {?}
1144
- */
1145
- TdChipsComponent.prototype._focusLastChip = function () {
1146
- this._focusChip(this._totalChips - 1);
1147
- };
1148
- /**
1149
- * Method to toggle the disable state of input
1150
- * Checks if not in disabled state and if chipAddition is set to 'true'
1151
- * @private
1152
- * @return {?}
1153
- */
1154
- TdChipsComponent.prototype._toggleInput = function () {
1155
- if (this.canAddChip) {
1156
- this.inputControl.enable();
1157
- }
1158
- else {
1159
- this.inputControl.disable();
1160
- }
1161
- this._changeDetectorRef.markForCheck();
1162
- };
1163
- /**
1164
- * Sets first option as active to let the user know which one will be added when pressing enter
1165
- * Only if [requireMatch] has been set
1166
- * @private
1167
- * @return {?}
1168
- */
1169
- TdChipsComponent.prototype._setFirstOptionActive = function () {
1170
- var _this = this;
1171
- if (this.requireMatch) {
1172
- // need to use a timer here to wait until the autocomplete has been opened (end of queue)
1173
- rxjs.timer()
1174
- .toPromise()
1175
- .then(( /**
1176
- * @return {?}
1177
- */function () {
1178
- if (_this.focused && _this._options && _this._options.length > 0) {
1179
- // clean up of previously active options
1180
- _this._options.toArray().forEach(( /**
1181
- * @param {?} option
1182
- * @return {?}
1183
- */function (option) {
1184
- option.setInactiveStyles();
1185
- }));
1186
- // set the first one as active
1187
- _this._options.toArray()[0].setActiveStyles();
1188
- _this._internalActivateOption = true;
1189
- _this._changeDetectorRef.markForCheck();
1190
- }
1191
- }));
1192
- }
1193
- };
1194
- /**
1195
- * Watches clicks outside of the component to remove the focus
1196
- * The autocomplete panel is considered inside the component so we
1197
- * need to use a flag to find out when its clicked.
1198
- * @private
1199
- * @return {?}
1200
- */
1201
- TdChipsComponent.prototype._watchOutsideClick = function () {
1202
- var _this = this;
1203
- if (this._document) {
1204
- this._outsideClickSubs = rxjs.merge(rxjs.fromEvent(this._document, 'click'), rxjs.fromEvent(this._document, 'touchend'))
1205
- .pipe(operators.debounceTime(this._touchendDebounce), operators.filter(( /**
1206
- * @param {?} event
1207
- * @return {?}
1208
- */function (event) {
1209
- /** @type {?} */
1210
- var clickTarget = ( /** @type {?} */(event.target));
1211
- setTimeout(( /**
1212
- * @return {?}
1213
- */function () {
1214
- _this._internalClick = false;
1215
- }));
1216
- return (_this.focused &&
1217
- clickTarget !== _this._elementRef.nativeElement &&
1218
- !_this._elementRef.nativeElement.contains(clickTarget) &&
1219
- !_this._internalClick);
1220
- })))
1221
- .subscribe(( /**
1222
- * @return {?}
1223
- */function () {
1224
- if (_this.focused) {
1225
- _this._autocompleteTrigger.closePanel();
1226
- _this.removeFocusedState();
1227
- _this.onTouched();
1228
- _this._changeDetectorRef.markForCheck();
1229
- }
1230
- }));
1231
- }
1232
- return undefined;
1233
- };
1234
- return TdChipsComponent;
1235
- }(_TdChipsMixinBase));
1236
- TdChipsComponent.decorators = [
1237
- { type: core.Component, args: [{
1238
- providers: [
1239
- {
1240
- provide: forms.NG_VALUE_ACCESSOR,
1241
- useExisting: core.forwardRef(( /**
1242
- * @return {?}
1243
- */function () { return TdChipsComponent; })),
1244
- multi: true,
1245
- },
1246
- ],
1247
- selector: 'td-chips',
1248
- inputs: ['disabled', 'value'],
1249
- template: "<div\n class=\"td-chips-wrapper\"\n [class.td-chips-stacked]=\"stacked\"\n [class.td-chips-input-before-position]=\"inputPosition === 'before'\"\n>\n <ng-template let-chip let-first=\"first\" let-index=\"index\" ngFor [ngForOf]=\"value\">\n <mat-basic-chip\n [class.td-chip-disabled]=\"disabled\"\n [class.td-chip-after-pad]=\"!canRemoveChip\"\n [disableRipple]=\"true\"\n [color]=\"color\"\n (keydown)=\"_chipKeydown($event, index)\"\n (blur)=\"_handleChipBlur($event, chip)\"\n (focus)=\"_handleChipFocus($event, chip)\"\n >\n <div class=\"td-chip\" [class.td-chip-stacked]=\"stacked\">\n <span class=\"td-chip-content\">\n <span *ngIf=\"!_chipTemplate?.templateRef\">{{ chip }}</span>\n <ng-template\n *ngIf=\"_chipTemplate?.templateRef\"\n [ngTemplateOutlet]=\"_chipTemplate?.templateRef\"\n [ngTemplateOutletContext]=\"{ chip: chip }\"\n ></ng-template>\n </span>\n <mat-icon *ngIf=\"canRemoveChip\" class=\"td-chip-removal\" (click)=\"_internalClick = removeChip(index)\">\n cancel\n </mat-icon>\n </div>\n </mat-basic-chip>\n </ng-template>\n <mat-form-field\n floatLabel=\"never\"\n class=\"td-chips-form-field\"\n [style.width.px]=\"canAddChip ? null : 0\"\n [style.height.px]=\"canAddChip ? null : 0\"\n [color]=\"color\"\n >\n <input\n matInput\n #input\n [tabIndex]=\"-1\"\n [matAutocomplete]=\"autocomplete\"\n [formControl]=\"inputControl\"\n [placeholder]=\"displayPlaceHolder\"\n (keydown)=\"_inputKeydown($event)\"\n (keyup.enter)=\"_handleAddChip()\"\n (focus)=\"_handleFocus()\"\n />\n </mat-form-field>\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [displayWith]=\"_removeInputDisplay\"\n (optionSelected)=\"addChip($event.option.value)\"\n >\n <ng-template let-item let-first=\"first\" ngFor [ngForOf]=\"items\">\n <mat-option (click)=\"_setInternalClick()\" [value]=\"item\">\n <span *ngIf=\"!_autocompleteOptionTemplate?.templateRef\">{{ item }}</span>\n <ng-template\n *ngIf=\"_autocompleteOptionTemplate?.templateRef\"\n [ngTemplateOutlet]=\"_autocompleteOptionTemplate?.templateRef\"\n [ngTemplateOutletContext]=\"{ option: item }\"\n ></ng-template>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n</div>\n<div *ngIf=\"chipAddition\" class=\"mat-form-field-underline\" [class.mat-disabled]=\"disabled\">\n <span class=\"mat-form-field-ripple\" [class.mat-focused]=\"focused\"></span>\n</div>\n<ng-content></ng-content>\n",
1250
- changeDetection: core.ChangeDetectionStrategy.OnPush,
1251
- styles: [":host{display:block;min-height:48px;padding:0 5px}:host .td-chips-wrapper{-ms-flex-align:start;-ms-flex-direction:row;-ms-flex-wrap:wrap;align-items:flex-start;display:-ms-flexbox;display:flex;flex-direction:row;flex-wrap:wrap;min-height:42px}:host .td-chips-wrapper.td-chips-stacked .mat-basic-chip,:host .td-chips-wrapper.td-chips-stacked .td-chips-form-field{width:100%}:host .td-chips-wrapper.td-chips-input-before-position .td-chips-form-field{-ms-flex-order:-1;order:-1}:host .td-chip,:host .td-chip>.td-chip-content{-ms-flex-align:center;-ms-flex-direction:row;-ms-flex-line-pack:center;-ms-flex-pack:start;align-content:center;align-items:center;box-sizing:border-box;display:-ms-flexbox;display:flex;flex-direction:row;justify-content:flex-start;max-width:100%;min-width:0}:host .td-chip.td-chip-stacked,:host .td-chip>.td-chip-content.td-chip-stacked{-ms-flex-pack:justify;justify-content:space-between}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:2px}:host ::ng-deep .mat-basic-chip{border-radius:16px;box-sizing:border-box;cursor:default;display:inline-block;margin:8px 8px 0 0;max-width:100%;position:relative}html[dir=rtl] :host ::ng-deep .mat-basic-chip{margin:8px 0 0 8px;unicode-bidi:embed}body[dir=rtl] :host ::ng-deep .mat-basic-chip{margin:8px 0 0 8px;unicode-bidi:embed}[dir=rtl] :host ::ng-deep .mat-basic-chip{margin:8px 0 0 8px;unicode-bidi:embed}:host ::ng-deep .mat-basic-chip bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip .td-chip{font-size:13px;line-height:32px;min-height:32px;padding:0 0 0 12px}html[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip{padding:0 12px 0 0;unicode-bidi:embed}body[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip{padding:0 12px 0 0;unicode-bidi:embed}[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip{padding:0 12px 0 0;unicode-bidi:embed}:host ::ng-deep .mat-basic-chip .td-chip bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip .td-chip bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar]{-ms-flex:0 0 auto;-ms-flex-align:center;-ms-flex-order:-20;-ms-flex-pack:center;align-items:center;border-radius:50%;box-sizing:border-box;display:inline-block;flex:0 0 auto;height:32px;justify-content:center;margin:0 8px 0 -12px;order:-20;text-align:center;width:32px}html[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar]{margin:0 -12px 0 8px;unicode-bidi:embed}body[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar]{margin:0 -12px 0 8px;unicode-bidi:embed}[dir=rtl] :host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar]{margin:0 -12px 0 8px;unicode-bidi:embed}:host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar] bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip .td-chip [td-chip-avatar] bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip.td-chip-after-pad{padding:0 12px 0 0}html[dir=rtl] :host ::ng-deep .mat-basic-chip.td-chip-after-pad{padding:0 0 0 12px;unicode-bidi:embed}body[dir=rtl] :host ::ng-deep .mat-basic-chip.td-chip-after-pad{padding:0 0 0 12px;unicode-bidi:embed}[dir=rtl] :host ::ng-deep .mat-basic-chip.td-chip-after-pad{padding:0 0 0 12px;unicode-bidi:embed}:host ::ng-deep .mat-basic-chip.td-chip-after-pad bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip.td-chip-after-pad bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}:host ::ng-deep .mat-basic-chip mat-icon.td-chip-removal{font-size:21px;line-height:22px;margin:0 4px}:host ::ng-deep .mat-basic-chip mat-icon.td-chip-removal:hover{cursor:pointer}:host ::ng-deep .td-chips-stacked .mat-basic-chip{margin:4px 0}:host ::ng-deep .td-chips-stacked .mat-basic-chip:first-of-type{margin:8px 0 4px}:host ::ng-deep .td-chips-stacked .mat-basic-chip:last-of-type{margin:4px 0 8px}:host .mat-form-field-underline{bottom:0;height:1px;position:relative;width:100%}:host .mat-form-field-underline.mat-disabled{background-color:rgba(0,0,0,0);background-position:0;bottom:-4px}:host .mat-form-field-underline .mat-form-field-ripple{-ms-transform:scaleX(.5);-ms-transform-origin:50%;height:2px;opacity:0;position:absolute;top:0;transform:scaleX(.5);transform-origin:50%;transition:background-color .3s cubic-bezier(.55,0,.55,.2);visibility:hidden;width:100%}:host .mat-form-field-underline .mat-form-field-ripple.mat-focused,:host.ng-invalid .mat-form-field-underline .mat-form-field-ripple{-ms-transform:scaleX(1);opacity:1;transform:scaleX(1);transition:transform .15s linear,background-color .3s cubic-bezier(.55,0,.55,.2);visibility:visible}:host ::ng-deep mat-form-field .mat-form-field-underline{display:none}"]
1252
- }] }
1253
- ];
1254
- /** @nocollapse */
1255
- TdChipsComponent.ctorParameters = function () { return [
1256
- { type: core.ElementRef },
1257
- { type: core.Renderer2 },
1258
- { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [common$1.DOCUMENT,] }] },
1259
- { type: core.ChangeDetectorRef }
1260
- ]; };
1261
- TdChipsComponent.propDecorators = {
1262
- _nativeInput: [{ type: core.ViewChild, args: ['input', { static: true },] }],
1263
- _inputChild: [{ type: core.ViewChild, args: [input.MatInput, { static: true },] }],
1264
- _autocompleteTrigger: [{ type: core.ViewChild, args: [autocomplete.MatAutocompleteTrigger, { static: true },] }],
1265
- _chipsChildren: [{ type: core.ViewChildren, args: [chips.MatChip,] }],
1266
- _chipTemplate: [{ type: core.ContentChild, args: [TdChipDirective,] }],
1267
- _autocompleteOptionTemplate: [{ type: core.ContentChild, args: [TdAutocompleteOptionDirective,] }],
1268
- _options: [{ type: core.ViewChildren, args: [core$1.MatOption,] }],
1269
- items: [{ type: core.Input, args: ['items',] }],
1270
- stacked: [{ type: core.Input, args: ['stacked',] }],
1271
- inputPosition: [{ type: core.Input, args: ['inputPosition',] }],
1272
- requireMatch: [{ type: core.Input, args: ['requireMatch',] }],
1273
- required: [{ type: core.Input, args: ['required',] }],
1274
- chipAddition: [{ type: core.Input, args: ['chipAddition',] }],
1275
- chipRemoval: [{ type: core.Input, args: ['chipRemoval',] }],
1276
- placeholder: [{ type: core.Input }],
1277
- debounce: [{ type: core.Input }],
1278
- color: [{ type: core.Input, args: ['color',] }],
1279
- add: [{ type: core.Output }],
1280
- remove: [{ type: core.Output }],
1281
- inputChange: [{ type: core.Output }],
1282
- chipFocus: [{ type: core.Output }],
1283
- chipBlur: [{ type: core.Output }],
1284
- tabIndex: [{ type: core.HostBinding, args: ['attr.tabindex',] }],
1285
- compareWith: [{ type: core.Input }],
1286
- focusListener: [{ type: core.HostListener, args: ['focus', ['$event'],] }],
1287
- mousedownListener: [{ type: core.HostListener, args: ['mousedown', ['$event'],] }],
1288
- clickListener: [{ type: core.HostListener, args: ['click', ['$event'],] }],
1289
- keydownListener: [{ type: core.HostListener, args: ['keydown', ['$event'],] }]
1290
- };
1291
- if (false) {
1292
- /**
1293
- * @type {?}
1294
- * @private
1295
- */
1296
- TdChipsComponent.prototype._outsideClickSubs;
1297
- /**
1298
- * @type {?}
1299
- * @private
1300
- */
1301
- TdChipsComponent.prototype._inputValueChangesSubs;
1302
- /**
1303
- * @type {?}
1304
- * @private
1305
- */
1306
- TdChipsComponent.prototype._isMousedown;
1307
- /**
1308
- * @type {?}
1309
- * @private
1310
- */
1311
- TdChipsComponent.prototype._items;
1312
- /**
1313
- * @type {?}
1314
- * @private
1315
- */
1316
- TdChipsComponent.prototype._length;
1317
- /**
1318
- * @type {?}
1319
- * @private
1320
- */
1321
- TdChipsComponent.prototype._stacked;
1322
- /**
1323
- * @type {?}
1324
- * @private
1325
- */
1326
- TdChipsComponent.prototype._requireMatch;
1327
- /**
1328
- * @type {?}
1329
- * @private
1330
- */
1331
- TdChipsComponent.prototype._color;
1332
- /**
1333
- * @type {?}
1334
- * @private
1335
- */
1336
- TdChipsComponent.prototype._inputPosition;
1337
- /**
1338
- * @type {?}
1339
- * @private
1340
- */
1341
- TdChipsComponent.prototype._chipAddition;
1342
- /**
1343
- * @type {?}
1344
- * @private
1345
- */
1346
- TdChipsComponent.prototype._chipRemoval;
1347
- /**
1348
- * @type {?}
1349
- * @private
1350
- */
1351
- TdChipsComponent.prototype._focused;
1352
- /**
1353
- * @type {?}
1354
- * @private
1355
- */
1356
- TdChipsComponent.prototype._required;
1357
- /**
1358
- * @type {?}
1359
- * @private
1360
- */
1361
- TdChipsComponent.prototype._tabIndex;
1362
- /**
1363
- * @type {?}
1364
- * @private
1365
- */
1366
- TdChipsComponent.prototype._touchendDebounce;
1367
- /** @type {?} */
1368
- TdChipsComponent.prototype._internalClick;
1369
- /** @type {?} */
1370
- TdChipsComponent.prototype._internalActivateOption;
1371
- /** @type {?} */
1372
- TdChipsComponent.prototype._nativeInput;
1373
- /** @type {?} */
1374
- TdChipsComponent.prototype._inputChild;
1375
- /** @type {?} */
1376
- TdChipsComponent.prototype._autocompleteTrigger;
1377
- /** @type {?} */
1378
- TdChipsComponent.prototype._chipsChildren;
1379
- /** @type {?} */
1380
- TdChipsComponent.prototype._chipTemplate;
1381
- /** @type {?} */
1382
- TdChipsComponent.prototype._autocompleteOptionTemplate;
1383
- /** @type {?} */
1384
- TdChipsComponent.prototype._options;
1385
- /**
1386
- * FormControl for the matInput element.
1387
- * @type {?}
1388
- */
1389
- TdChipsComponent.prototype.inputControl;
1390
- /**
1391
- * placeholder?: string
1392
- * Placeholder for the autocomplete input.
1393
- * @type {?}
1394
- */
1395
- TdChipsComponent.prototype.placeholder;
1396
- /**
1397
- * debounce?: number
1398
- * Debounce timeout between keypresses. Defaults to 200.
1399
- * @type {?}
1400
- */
1401
- TdChipsComponent.prototype.debounce;
1402
- /**
1403
- * add?: function
1404
- * Method to be executed when a chip is added.
1405
- * Sends chip value as event.
1406
- * @type {?}
1407
- */
1408
- TdChipsComponent.prototype.add;
1409
- /**
1410
- * remove?: function
1411
- * Method to be executed when a chip is removed.
1412
- * Sends chip value as event.
1413
- * @type {?}
1414
- */
1415
- TdChipsComponent.prototype.remove;
1416
- /**
1417
- * inputChange?: function
1418
- * Method to be executed when the value in the autocomplete input changes.
1419
- * Sends string value as event.
1420
- * @type {?}
1421
- */
1422
- TdChipsComponent.prototype.inputChange;
1423
- /**
1424
- * chipFocus?: function
1425
- * Method to be executed when a chip is focused.
1426
- * Sends chip value as event.
1427
- * @type {?}
1428
- */
1429
- TdChipsComponent.prototype.chipFocus;
1430
- /**
1431
- * blur?: function
1432
- * Method to be executed when a chip is blurred.
1433
- * Sends chip value as event.
1434
- * @type {?}
1435
- */
1436
- TdChipsComponent.prototype.chipBlur;
1437
- /**
1438
- * compareWith? function
1439
- * Function used to check whether a chip value already exists.
1440
- * Defaults to strict equality comparison ===
1441
- * @type {?}
1442
- */
1443
- TdChipsComponent.prototype.compareWith;
1444
- /**
1445
- * @type {?}
1446
- * @private
1447
- */
1448
- TdChipsComponent.prototype._elementRef;
1449
- /**
1450
- * @type {?}
1451
- * @private
1452
- */
1453
- TdChipsComponent.prototype._renderer;
1454
- /**
1455
- * @type {?}
1456
- * @private
1457
- */
1458
- TdChipsComponent.prototype._document;
1459
- }
1460
-
1461
- /**
1462
- * @fileoverview added by tsickle
1463
- * Generated from: chips.module.ts
1464
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1465
- */
1466
- var CovalentChipsModule = /** @class */ (function () {
1467
- function CovalentChipsModule() {
1468
- }
1469
- return CovalentChipsModule;
1470
- }());
1471
- CovalentChipsModule.decorators = [
1472
- { type: core.NgModule, args: [{
1473
- imports: [forms.ReactiveFormsModule, common$1.CommonModule, input.MatInputModule, icon.MatIconModule, chips.MatChipsModule, autocomplete.MatAutocompleteModule],
1474
- declarations: [TdChipsComponent, TdChipDirective, TdAutocompleteOptionDirective],
1475
- exports: [TdChipsComponent, TdChipDirective, TdAutocompleteOptionDirective],
1476
- },] }
1477
- ];
1478
-
1479
- /**
1480
- * @fileoverview added by tsickle
1481
- * Generated from: public-api.ts
1482
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1483
- */
1484
-
1485
- /**
1486
- * @fileoverview added by tsickle
1487
- * Generated from: index.ts
1488
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1489
- */
1490
-
1491
- /**
1492
- * @fileoverview added by tsickle
1493
- * Generated from: covalent-core-chips.ts
1494
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1495
- */
1496
-
1497
- exports.CovalentChipsModule = CovalentChipsModule;
1498
- exports.TdAutocompleteOptionDirective = TdAutocompleteOptionDirective;
1499
- exports.TdChipDirective = TdChipDirective;
1500
- exports.TdChipsBase = TdChipsBase;
1501
- exports.TdChipsComponent = TdChipsComponent;
1502
- exports._TdChipsMixinBase = _TdChipsMixinBase;
1503
-
1504
- Object.defineProperty(exports, '__esModule', { value: true });
1505
-
1506
- })));
1507
- //# sourceMappingURL=covalent-core-chips.umd.js.map