@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,453 +0,0 @@
1
- import { Directive, TemplateRef, ViewContainerRef, EventEmitter, Component, ChangeDetectionStrategy, ElementRef, Renderer2, ChangeDetectorRef, Input, Output, ViewChildren, ContentChild, HostListener, NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { TemplatePortalDirective } from '@angular/cdk/portal';
4
- import { DomSanitizer } from '@angular/platform-browser';
5
- import { Subject } from 'rxjs';
6
- import { debounceTime } from 'rxjs/operators';
7
-
8
- /**
9
- * @fileoverview added by tsickle
10
- * Generated from: virtual-scroll-row.directive.ts
11
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
12
- */
13
- class TdVirtualScrollRowDirective extends TemplatePortalDirective {
14
- /**
15
- * @param {?} templateRef
16
- * @param {?} viewContainerRef
17
- */
18
- constructor(templateRef, viewContainerRef) {
19
- super(templateRef, viewContainerRef);
20
- }
21
- }
22
- TdVirtualScrollRowDirective.decorators = [
23
- { type: Directive, args: [{ selector: '[tdVirtualScrollRow]' },] }
24
- ];
25
- /** @nocollapse */
26
- TdVirtualScrollRowDirective.ctorParameters = () => [
27
- { type: TemplateRef },
28
- { type: ViewContainerRef }
29
- ];
30
-
31
- /**
32
- * @fileoverview added by tsickle
33
- * Generated from: virtual-scroll-container.component.ts
34
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
35
- */
36
- /** @type {?} */
37
- const TD_VIRTUAL_OFFSET = 2;
38
- /** @type {?} */
39
- const SCROLL_DEBOUNCE = 200;
40
- /**
41
- * @record
42
- */
43
- function ITdVirtualScrollBottomEvent() { }
44
- if (false) {
45
- /** @type {?} */
46
- ITdVirtualScrollBottomEvent.prototype.lastRow;
47
- /** @type {?} */
48
- ITdVirtualScrollBottomEvent.prototype.lastIndex;
49
- }
50
- class TdVirtualScrollContainerComponent {
51
- /**
52
- * @param {?} _elementRef
53
- * @param {?} _domSanitizer
54
- * @param {?} _renderer
55
- * @param {?} _changeDetectorRef
56
- */
57
- constructor(_elementRef, _domSanitizer, _renderer, _changeDetectorRef) {
58
- this._elementRef = _elementRef;
59
- this._domSanitizer = _domSanitizer;
60
- this._renderer = _renderer;
61
- this._changeDetectorRef = _changeDetectorRef;
62
- this._subs = [];
63
- this._bottom = new Subject();
64
- this._initialized = false;
65
- this._totalHeight = 0;
66
- this._hostHeight = 0;
67
- this._scrollVerticalOffset = 0;
68
- this._fromRow = 0;
69
- this._toRow = 0;
70
- /**
71
- * bottom: function
72
- * Method to be executed when user scrolled to the last item of the list.
73
- * An [ITdVirtualScrollBottomEvent] event is emitted
74
- */
75
- this.bottom = new EventEmitter();
76
- /**
77
- * trackBy?: TrackByFunction
78
- * This accepts the same trackBy function [ngFor] does.
79
- * https://angular.io/api/core/TrackByFunction
80
- */
81
- this.trackBy = (/**
82
- * @param {?} index
83
- * @param {?} item
84
- * @return {?}
85
- */
86
- (index, item) => {
87
- return item;
88
- });
89
- }
90
- /**
91
- * data: any[]
92
- * List of items to virtually iterate on.
93
- * @param {?} data
94
- * @return {?}
95
- */
96
- set data(data) {
97
- this._data = data;
98
- if (this._initialized) {
99
- this._calculateVirtualRows();
100
- }
101
- this._changeDetectorRef.markForCheck();
102
- }
103
- /**
104
- * @return {?}
105
- */
106
- get data() {
107
- return this._data;
108
- }
109
- /**
110
- * @return {?}
111
- */
112
- get virtualData() {
113
- return this._virtualData;
114
- }
115
- /**
116
- * @return {?}
117
- */
118
- get rowHeight() {
119
- if (this._rows && this._rows.toArray()[0]) {
120
- return this._rows.toArray()[0].nativeElement.getBoundingClientRect().height;
121
- }
122
- return 0;
123
- }
124
- /**
125
- * @return {?}
126
- */
127
- get totalHeight() {
128
- return this._totalHeight;
129
- }
130
- /**
131
- * @return {?}
132
- */
133
- get fromRow() {
134
- return this._fromRow;
135
- }
136
- /**
137
- * @return {?}
138
- */
139
- get toRow() {
140
- return this._toRow;
141
- }
142
- /**
143
- * @return {?}
144
- */
145
- get offsetTransform() {
146
- return this._offsetTransform;
147
- }
148
- /**
149
- * @return {?}
150
- */
151
- ngAfterViewInit() {
152
- this._subs.push(this._rows.changes.subscribe((/**
153
- * @return {?}
154
- */
155
- () => {
156
- this._calculateVirtualRows();
157
- })));
158
- this._initialized = true;
159
- this._calculateVirtualRows();
160
- this._subs.push(this._bottom.pipe(debounceTime(SCROLL_DEBOUNCE)).subscribe((/**
161
- * @return {?}
162
- */
163
- () => {
164
- this.bottom.emit({
165
- lastRow: this._data[this._data.length - 1],
166
- lastIndex: this.toRow,
167
- });
168
- })));
169
- }
170
- /**
171
- * @return {?}
172
- */
173
- ngAfterViewChecked() {
174
- /** @type {?} */
175
- const newHostHeight = this._elementRef.nativeElement.getBoundingClientRect().height;
176
- if (this._hostHeight !== newHostHeight) {
177
- this._hostHeight = newHostHeight;
178
- if (this._initialized) {
179
- this._calculateVirtualRows();
180
- }
181
- }
182
- }
183
- /**
184
- * @return {?}
185
- */
186
- ngOnDestroy() {
187
- if (this._subs) {
188
- this._subs.forEach((/**
189
- * @param {?} sub
190
- * @return {?}
191
- */
192
- (sub) => {
193
- sub.unsubscribe();
194
- }));
195
- }
196
- }
197
- /**
198
- * @param {?} event
199
- * @return {?}
200
- */
201
- handleScroll(event) {
202
- /** @type {?} */
203
- const element = (/** @type {?} */ (event.target));
204
- if (element) {
205
- /** @type {?} */
206
- const verticalScroll = element.scrollTop;
207
- if (this._scrollVerticalOffset !== verticalScroll) {
208
- this._scrollVerticalOffset = verticalScroll;
209
- if (this._initialized) {
210
- this._calculateVirtualRows();
211
- }
212
- }
213
- if (this._initialized && this._data.length * this.rowHeight - (verticalScroll + this._hostHeight) === 0) {
214
- // check to see if bottom was hit to throw the bottom event
215
- this._bottom.next();
216
- }
217
- }
218
- }
219
- /**
220
- * Method to refresh and recalculate the virtual rows
221
- * e.g. after changing the [data] content
222
- * @return {?}
223
- */
224
- refresh() {
225
- this._calculateVirtualRows();
226
- }
227
- /**
228
- * Method to scroll to a specific row of the list.
229
- * @param {?} row
230
- * @return {?}
231
- */
232
- scrollTo(row) {
233
- this._elementRef.nativeElement.scrollTop = row * this.rowHeight;
234
- this._changeDetectorRef.markForCheck();
235
- }
236
- /**
237
- * Method to scroll to the start of the list.
238
- * @return {?}
239
- */
240
- scrollToStart() {
241
- this.scrollTo(0);
242
- this._changeDetectorRef.markForCheck();
243
- }
244
- /**
245
- * Method to scroll to the end of the list.
246
- * @return {?}
247
- */
248
- scrollToEnd() {
249
- this.scrollTo(this.totalHeight / this.rowHeight);
250
- this._changeDetectorRef.markForCheck();
251
- }
252
- /**
253
- * @private
254
- * @return {?}
255
- */
256
- _calculateVirtualRows() {
257
- if (this._data) {
258
- this._totalHeight = this._data.length * this.rowHeight;
259
- /** @type {?} */
260
- const fromRow = Math.floor(this._scrollVerticalOffset / this.rowHeight) - TD_VIRTUAL_OFFSET;
261
- this._fromRow = fromRow > 0 ? fromRow : 0;
262
- /** @type {?} */
263
- const range = Math.floor(this._hostHeight / this.rowHeight) + TD_VIRTUAL_OFFSET * 2;
264
- /** @type {?} */
265
- let toRow = range + this.fromRow;
266
- if (isFinite(toRow) && toRow > this._data.length) {
267
- toRow = this._data.length;
268
- }
269
- else if (!isFinite(toRow)) {
270
- toRow = TD_VIRTUAL_OFFSET;
271
- }
272
- this._toRow = toRow;
273
- }
274
- else {
275
- this._totalHeight = 0;
276
- this._fromRow = 0;
277
- this._toRow = 0;
278
- }
279
- /** @type {?} */
280
- let offset = 0;
281
- if (this._scrollVerticalOffset > TD_VIRTUAL_OFFSET * this.rowHeight) {
282
- offset = this.fromRow * this.rowHeight;
283
- }
284
- this._offsetTransform = this._domSanitizer.bypassSecurityTrustStyle('translateY(' + (offset - this.totalHeight) + 'px)');
285
- if (this._data) {
286
- this._virtualData = this.data.slice(this.fromRow, this.toRow);
287
- }
288
- // mark for check at the end of the queue so we are sure
289
- // that the changes will be marked
290
- Promise.resolve().then((/**
291
- * @return {?}
292
- */
293
- () => {
294
- this._changeDetectorRef.markForCheck();
295
- }));
296
- }
297
- }
298
- TdVirtualScrollContainerComponent.decorators = [
299
- { type: Component, args: [{
300
- selector: 'td-virtual-scroll-container',
301
- template: "<div [style.height.px]=\"totalHeight\"></div>\n<div [style.transform]=\"offsetTransform\" [style.position]=\"'absolute'\" [style.width.%]=\"100\">\n <ng-template let-row let-index=\"index\" ngFor [ngForOf]=\"virtualData\" [ngForTrackBy]=\"trackBy\">\n <div #rowElement [style.width.%]=\"100\">\n <ng-template\n *ngIf=\"_rowTemplate\"\n [ngTemplateOutlet]=\"_rowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{\n row: row,\n index: fromRow + index,\n first: fromRow + index === 0,\n last: fromRow + index === data.length - 1,\n odd: (fromRow + index + 1) % 2 === 1,\n even: (fromRow + index + 1) % 2 === 0\n }\"\n ></ng-template>\n </div>\n </ng-template>\n</div>\n",
302
- changeDetection: ChangeDetectionStrategy.OnPush,
303
- styles: [":host{display:block;height:100%;overflow:auto;position:relative;width:100%}"]
304
- }] }
305
- ];
306
- /** @nocollapse */
307
- TdVirtualScrollContainerComponent.ctorParameters = () => [
308
- { type: ElementRef },
309
- { type: DomSanitizer },
310
- { type: Renderer2 },
311
- { type: ChangeDetectorRef }
312
- ];
313
- TdVirtualScrollContainerComponent.propDecorators = {
314
- data: [{ type: Input, args: ['data',] }],
315
- bottom: [{ type: Output }],
316
- _rows: [{ type: ViewChildren, args: ['rowElement',] }],
317
- _rowTemplate: [{ type: ContentChild, args: [TdVirtualScrollRowDirective,] }],
318
- trackBy: [{ type: Input }],
319
- handleScroll: [{ type: HostListener, args: ['scroll', ['$event'],] }]
320
- };
321
- if (false) {
322
- /**
323
- * @type {?}
324
- * @private
325
- */
326
- TdVirtualScrollContainerComponent.prototype._subs;
327
- /**
328
- * @type {?}
329
- * @private
330
- */
331
- TdVirtualScrollContainerComponent.prototype._bottom;
332
- /**
333
- * @type {?}
334
- * @private
335
- */
336
- TdVirtualScrollContainerComponent.prototype._initialized;
337
- /**
338
- * @type {?}
339
- * @private
340
- */
341
- TdVirtualScrollContainerComponent.prototype._totalHeight;
342
- /**
343
- * @type {?}
344
- * @private
345
- */
346
- TdVirtualScrollContainerComponent.prototype._hostHeight;
347
- /**
348
- * @type {?}
349
- * @private
350
- */
351
- TdVirtualScrollContainerComponent.prototype._scrollVerticalOffset;
352
- /**
353
- * @type {?}
354
- * @private
355
- */
356
- TdVirtualScrollContainerComponent.prototype._offsetTransform;
357
- /**
358
- * @type {?}
359
- * @private
360
- */
361
- TdVirtualScrollContainerComponent.prototype._fromRow;
362
- /**
363
- * @type {?}
364
- * @private
365
- */
366
- TdVirtualScrollContainerComponent.prototype._toRow;
367
- /**
368
- * @type {?}
369
- * @private
370
- */
371
- TdVirtualScrollContainerComponent.prototype._data;
372
- /**
373
- * @type {?}
374
- * @private
375
- */
376
- TdVirtualScrollContainerComponent.prototype._virtualData;
377
- /**
378
- * bottom: function
379
- * Method to be executed when user scrolled to the last item of the list.
380
- * An [ITdVirtualScrollBottomEvent] event is emitted
381
- * @type {?}
382
- */
383
- TdVirtualScrollContainerComponent.prototype.bottom;
384
- /** @type {?} */
385
- TdVirtualScrollContainerComponent.prototype._rows;
386
- /** @type {?} */
387
- TdVirtualScrollContainerComponent.prototype._rowTemplate;
388
- /**
389
- * trackBy?: TrackByFunction
390
- * This accepts the same trackBy function [ngFor] does.
391
- * https://angular.io/api/core/TrackByFunction
392
- * @type {?}
393
- */
394
- TdVirtualScrollContainerComponent.prototype.trackBy;
395
- /**
396
- * @type {?}
397
- * @private
398
- */
399
- TdVirtualScrollContainerComponent.prototype._elementRef;
400
- /**
401
- * @type {?}
402
- * @private
403
- */
404
- TdVirtualScrollContainerComponent.prototype._domSanitizer;
405
- /**
406
- * @type {?}
407
- * @private
408
- */
409
- TdVirtualScrollContainerComponent.prototype._renderer;
410
- /**
411
- * @type {?}
412
- * @private
413
- */
414
- TdVirtualScrollContainerComponent.prototype._changeDetectorRef;
415
- }
416
-
417
- /**
418
- * @fileoverview added by tsickle
419
- * Generated from: virtual-scroll.module.ts
420
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
421
- */
422
- /** @type {?} */
423
- const TD_VIRTUAL_SCROLL = [TdVirtualScrollRowDirective, TdVirtualScrollContainerComponent];
424
- class CovalentVirtualScrollModule {
425
- }
426
- CovalentVirtualScrollModule.decorators = [
427
- { type: NgModule, args: [{
428
- imports: [CommonModule],
429
- declarations: [TD_VIRTUAL_SCROLL],
430
- exports: [TD_VIRTUAL_SCROLL],
431
- },] }
432
- ];
433
-
434
- /**
435
- * @fileoverview added by tsickle
436
- * Generated from: public-api.ts
437
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
438
- */
439
-
440
- /**
441
- * @fileoverview added by tsickle
442
- * Generated from: index.ts
443
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
444
- */
445
-
446
- /**
447
- * @fileoverview added by tsickle
448
- * Generated from: covalent-core-virtual-scroll.ts
449
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
450
- */
451
-
452
- export { CovalentVirtualScrollModule, TdVirtualScrollContainerComponent, TdVirtualScrollRowDirective };
453
- //# sourceMappingURL=covalent-core-virtual-scroll.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"covalent-core-virtual-scroll.js","sources":["../../../../src/platform/core/virtual-scroll/virtual-scroll-row.directive.ts","../../../../src/platform/core/virtual-scroll/virtual-scroll-container.component.ts","../../../../src/platform/core/virtual-scroll/virtual-scroll.module.ts"],"sourcesContent":["import { Directive, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { TemplatePortalDirective } from '@angular/cdk/portal';\n\n@Directive({ selector: '[tdVirtualScrollRow]' })\nexport class TdVirtualScrollRowDirective extends TemplatePortalDirective {\n constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\n","import {\n Component,\n Directive,\n Input,\n Output,\n EventEmitter,\n ContentChild,\n AfterViewInit,\n ViewChild,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n QueryList,\n ViewChildren,\n ElementRef,\n HostListener,\n Renderer2,\n AfterViewChecked,\n OnDestroy,\n TrackByFunction,\n} from '@angular/core';\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser';\n\nimport { Subscription, Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\nimport { TdVirtualScrollRowDirective } from './virtual-scroll-row.directive';\n\nconst TD_VIRTUAL_OFFSET: number = 2;\nconst SCROLL_DEBOUNCE: number = 200;\n\nexport interface ITdVirtualScrollBottomEvent {\n lastRow: any;\n lastIndex: number;\n}\n\n@Component({\n selector: 'td-virtual-scroll-container',\n styleUrls: ['./virtual-scroll-container.component.scss'],\n templateUrl: './virtual-scroll-container.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdVirtualScrollContainerComponent implements AfterViewInit, AfterViewChecked, OnDestroy {\n private _subs: Subscription[] = [];\n private _bottom: Subject<any> = new Subject();\n private _initialized: boolean = false;\n\n private _totalHeight: number = 0;\n private _hostHeight: number = 0;\n private _scrollVerticalOffset: number = 0;\n private _offsetTransform: SafeStyle;\n\n private _fromRow: number = 0;\n private _toRow: number = 0;\n\n private _data: any[];\n private _virtualData: any[];\n\n /**\n * data: any[]\n * List of items to virtually iterate on.\n */\n @Input('data')\n set data(data: any[]) {\n this._data = data;\n if (this._initialized) {\n this._calculateVirtualRows();\n }\n this._changeDetectorRef.markForCheck();\n }\n get data(): any[] {\n return this._data;\n }\n\n get virtualData(): any[] {\n return this._virtualData;\n }\n\n /**\n * bottom: function\n * Method to be executed when user scrolled to the last item of the list.\n * An [ITdVirtualScrollBottomEvent] event is emitted\n */\n @Output() bottom: EventEmitter<ITdVirtualScrollBottomEvent> = new EventEmitter<ITdVirtualScrollBottomEvent>();\n\n @ViewChildren('rowElement') _rows: QueryList<ElementRef>;\n\n @ContentChild(TdVirtualScrollRowDirective) _rowTemplate: TdVirtualScrollRowDirective;\n\n get rowHeight(): number {\n if (this._rows && this._rows.toArray()[0]) {\n return this._rows.toArray()[0].nativeElement.getBoundingClientRect().height;\n }\n return 0;\n }\n\n get totalHeight(): number {\n return this._totalHeight;\n }\n\n get fromRow(): number {\n return this._fromRow;\n }\n\n get toRow(): number {\n return this._toRow;\n }\n\n get offsetTransform(): SafeStyle {\n return this._offsetTransform;\n }\n\n constructor(\n private _elementRef: ElementRef,\n private _domSanitizer: DomSanitizer,\n private _renderer: Renderer2,\n private _changeDetectorRef: ChangeDetectorRef,\n ) {}\n\n ngAfterViewInit(): void {\n this._subs.push(\n this._rows.changes.subscribe(() => {\n this._calculateVirtualRows();\n }),\n );\n this._initialized = true;\n this._calculateVirtualRows();\n\n this._subs.push(\n this._bottom.pipe(debounceTime(SCROLL_DEBOUNCE)).subscribe(() => {\n this.bottom.emit({\n lastRow: this._data[this._data.length - 1],\n lastIndex: this.toRow,\n });\n }),\n );\n }\n\n ngAfterViewChecked(): void {\n const newHostHeight: number = this._elementRef.nativeElement.getBoundingClientRect().height;\n if (this._hostHeight !== newHostHeight) {\n this._hostHeight = newHostHeight;\n if (this._initialized) {\n this._calculateVirtualRows();\n }\n }\n }\n\n ngOnDestroy(): void {\n if (this._subs) {\n this._subs.forEach((sub: Subscription) => {\n sub.unsubscribe();\n });\n }\n }\n\n /**\n * trackBy?: TrackByFunction\n * This accepts the same trackBy function [ngFor] does.\n * https://angular.io/api/core/TrackByFunction\n */\n @Input() trackBy: TrackByFunction<any> = (index: number, item: any) => {\n return item;\n };\n\n @HostListener('scroll', ['$event'])\n handleScroll(event: Event): void {\n const element: HTMLElement = <HTMLElement>event.target;\n if (element) {\n const verticalScroll: number = element.scrollTop;\n if (this._scrollVerticalOffset !== verticalScroll) {\n this._scrollVerticalOffset = verticalScroll;\n if (this._initialized) {\n this._calculateVirtualRows();\n }\n }\n if (this._initialized && this._data.length * this.rowHeight - (verticalScroll + this._hostHeight) === 0) {\n // check to see if bottom was hit to throw the bottom event\n this._bottom.next();\n }\n }\n }\n\n /**\n * Method to refresh and recalculate the virtual rows\n * e.g. after changing the [data] content\n */\n refresh(): void {\n this._calculateVirtualRows();\n }\n\n /**\n * Method to scroll to a specific row of the list.\n */\n scrollTo(row: number): void {\n this._elementRef.nativeElement.scrollTop = row * this.rowHeight;\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Method to scroll to the start of the list.\n */\n scrollToStart(): void {\n this.scrollTo(0);\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Method to scroll to the end of the list.\n */\n scrollToEnd(): void {\n this.scrollTo(this.totalHeight / this.rowHeight);\n this._changeDetectorRef.markForCheck();\n }\n\n private _calculateVirtualRows(): void {\n if (this._data) {\n this._totalHeight = this._data.length * this.rowHeight;\n const fromRow: number = Math.floor(this._scrollVerticalOffset / this.rowHeight) - TD_VIRTUAL_OFFSET;\n this._fromRow = fromRow > 0 ? fromRow : 0;\n const range: number = Math.floor(this._hostHeight / this.rowHeight) + TD_VIRTUAL_OFFSET * 2;\n let toRow: number = range + this.fromRow;\n if (isFinite(toRow) && toRow > this._data.length) {\n toRow = this._data.length;\n } else if (!isFinite(toRow)) {\n toRow = TD_VIRTUAL_OFFSET;\n }\n this._toRow = toRow;\n } else {\n this._totalHeight = 0;\n this._fromRow = 0;\n this._toRow = 0;\n }\n\n let offset: number = 0;\n if (this._scrollVerticalOffset > TD_VIRTUAL_OFFSET * this.rowHeight) {\n offset = this.fromRow * this.rowHeight;\n }\n\n this._offsetTransform = this._domSanitizer.bypassSecurityTrustStyle(\n 'translateY(' + (offset - this.totalHeight) + 'px)',\n );\n if (this._data) {\n this._virtualData = this.data.slice(this.fromRow, this.toRow);\n }\n\n // mark for check at the end of the queue so we are sure\n // that the changes will be marked\n Promise.resolve().then(() => {\n this._changeDetectorRef.markForCheck();\n });\n }\n}\n","import { NgModule, Type } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { TdVirtualScrollRowDirective } from './virtual-scroll-row.directive';\nimport { TdVirtualScrollContainerComponent } from './virtual-scroll-container.component';\n\nconst TD_VIRTUAL_SCROLL: Type<any>[] = [TdVirtualScrollRowDirective, TdVirtualScrollContainerComponent];\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TD_VIRTUAL_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;IAEzD,yDAAqF;;;;;;;IA0ErF,oDAEE;;;;;IAlDA,wDAA+B;;;;;IAC/B,0DAAmC;;;;;IACnC,sDAA4B;;;;;IAC5B,+DAA6C;;;;;;;;;MC7G3C,iBAAiB,GAAgB,CAAC,2BAA2B,EAAE,iCAAiC,CAAC;MAO1F,2BAA2B;;;YALvC,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,iBAAiB,CAAC;gBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;aAC7B;;;;;;;;;;;;;;;;;;;;;;;"}
package/loading/README.md DELETED
@@ -1,180 +0,0 @@
1
- # tdLoading
2
-
3
- Simply add the `tdLoading` attribute with a [name] value to the element you want to mask.
4
-
5
- Dont forget to add the asterisk syntax before the `tdLoading` directive if its not used in a `<ng-template>` element. More ingo on the asterisk (*) syntax [here](https://angular.io/guide/structural-directives#asterisk)
6
-
7
- ## API Summary
8
-
9
- #### Inputs
10
-
11
- + tdLoading: string
12
- + Name reference of the loading mask, used to register/resolve requests to the mask.
13
- + tdLoadingType?: LoadingType or ["linear" | "circular"]
14
- + Sets the type of loading mask depending on value.
15
- + Defaults to [LoadingType.Circular | "circular"]
16
- + tdLoadingMode?: LoadingMode or ["determinate" | "indeterminate"]
17
- + Sets the mode of loading mask depending on value.
18
- + Defaults to [LoadingMode.Indeterminate | "indeterminate"].
19
- + tdLoadingStrategy?: LoadingStrategy or ["replace" | "overlay"]
20
- + Sets the strategy of loading mask depending on value.
21
- + Defaults to [LoadingMode.Replace | "replace"]
22
- + tdLoadingColor?: "primary" | "accent" | "warn"
23
- + Sets the theme color of the loading component.
24
- + Defaults to "primary"
25
- + tdLoadingUntil?: any
26
- + If its null, undefined or false it will be used to register requests to the mask.
27
- + Else if its any value that can be resolved as true, it will resolve the mask.
28
- + [name] is optional when using [until], but can still be used to register/resolve it manually.
29
-
30
- # tdLoadingService
31
-
32
- This service is designed to be a factory of loading masks and serves as a facade for their usage.
33
-
34
- Simply add this service as a provider to be able to use it in a component.
35
-
36
- TdLoadingService.create() method receives as parameter an object that implements the [ITdLoadingConfig] interface.
37
-
38
- ```typescript
39
- interface ITdLoadingConfig {
40
- name: string;
41
- type?: LoadingType;
42
- mode?: LoadingMode;
43
- color?: 'primary' | 'accent' | 'warn';
44
- }
45
- ```
46
-
47
- ## API Summary
48
-
49
- #### Methods
50
-
51
- + register: function(name?: string, registers: number = 1)
52
- + Registers a request for the loading mask referenced by the name parameter.
53
- + Can optionally pass registers argument to set a number of register calls.
54
- + If no paramemeters are used, then default main mask will be used
55
- + resolve: function(name?: string, resolves: number = 1)
56
- + Resolves a request for the loading mask referenced by the name parameter.
57
- + Can optionally pass resolves argument to set a number of resolve calls.
58
- + If no paramemeters are used, then default main mask will be used.
59
- + resolveAll: function(name?: string)
60
- + Resolves all requests for the loading mask referenced by the name parameter.
61
- + If no paramemeters are used, then default main mask will be used.
62
- + setValue: function(name: string, value: number)
63
- + Set value on a loading mask referenced by the name parameter.
64
- + Usage only available if its mode is 'determinate'.
65
- + create: function(options: ITdLoadingConfig
66
- + Creates a fullscreen loading mask and attaches it to the DOM with the given configuration.
67
- + Only displayed when the mask has a request registered on it.
68
-
69
- ## Setup
70
-
71
- Import the [CovalentLoadingModule] in your NgModule:
72
-
73
- ```typescript
74
- import { CovalentLoadingModule } from '@covalent/core/loading';
75
- @NgModule({
76
- imports: [
77
- CovalentLoadingModule,
78
- ...
79
- ],
80
- ...
81
- })
82
- export class MyModule {}
83
- ```
84
-
85
- ## Usage
86
-
87
- Example for (*) syntax:
88
-
89
- ```html
90
- <div *tdLoading="'stringName'; type:'circular'; mode:'indeterminate'; strategy:'replace'; color:'primary'">
91
- ...
92
- </div>
93
- ```
94
-
95
- ```typescript
96
- import { TdLoadingService } from '@covalent/core/loading';
97
- ...
98
- })
99
- export class Demo {
100
- constructor(private _loadingService: TdLoadingService) {
101
- ...
102
- }
103
-
104
- registerLoading(): void {
105
- this._loadingService.register('stringName');
106
- }
107
-
108
- resolveLoading(): void {
109
- this._loadingService.resolve('stringName');
110
- }
111
- }
112
- ```
113
-
114
- Exmaple for (*) until async syntax:
115
-
116
- ```html
117
- <div *tdLoading="let item until observable | async; type:'circular'; color:'primary'">
118
- {{item}}
119
- </div>
120
- ```
121
-
122
- Example for `<ng-template>` syntax:
123
-
124
- ```html
125
- <ng-template tdLoading="stringName" tdLoadingType="circular" tdLoadingMode="indeterminate" tdLoadingStrategy="replace" tdLoadingColor="primary">
126
- ...
127
- </ng-template>
128
- ```
129
-
130
- ```typescript
131
- import { TdLoadingService } from '@covalent/core/loading';
132
- ...
133
- })
134
- export class Demo {
135
- constructor(private _loadingService: TdLoadingService) {
136
- ...
137
- }
138
-
139
- registerLoading(): void {
140
- this._loadingService.register('stringName');
141
- }
142
-
143
- resolveLoading(): void {
144
- this._loadingService.resolve('stringName');
145
- }
146
- }
147
- ```
148
-
149
- Example for `<ng-template>` until syntax:
150
-
151
- ```html
152
- <ng-template tdLoading [tdLoadingUntil]="boolean">
153
- ...
154
- </ng-template>
155
- ```
156
-
157
- Example creating a global mask with the `tdLoadingService`:
158
-
159
- ```typescript
160
- import { TdLoadingService, LoadingType, LoadingMode } from '@covalent/core/loading';
161
- ...
162
- export class Demo {
163
- constructor(private _loadingService: TdLoadingService) {
164
- this._loadingService.create({
165
- name: 'stringName',
166
- type: LoadingType.Circular,
167
- mode: LoadingMode.Indeterminate,
168
- color: 'accent',
169
- });
170
- }
171
-
172
- registerLoading(): void {
173
- this._loadingService.register('stringName');
174
- }
175
-
176
- resolveLoading(): void {
177
- this._loadingService.resolve('stringName'); // or this._loadingService.resolveAll('stringName');
178
- }
179
- }
180
- ```
@@ -1,10 +0,0 @@
1
- @import '../common/styles/theme-functions';
2
-
3
- @mixin td-loading-theme($theme) {
4
- $background: map-get($theme, background);
5
- .td-loading-wrapper {
6
- &.td-overlay .td-loading {
7
- background: rgba(mat-color($background, dialog), 0.8);
8
- }
9
- }
10
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';