@covalent/core 2.0.2 → 2.1.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 (226) hide show
  1. package/breadcrumbs/covalent-core-breadcrumbs.metadata.json +1 -1
  2. package/bundles/covalent-core-breadcrumbs.umd.js +1 -1
  3. package/bundles/covalent-core-breadcrumbs.umd.min.js +1 -1
  4. package/bundles/covalent-core-breadcrumbs.umd.min.js.map +1 -1
  5. package/bundles/covalent-core-chips.umd.js +1 -1
  6. package/bundles/covalent-core-chips.umd.min.js +1 -1
  7. package/bundles/covalent-core-chips.umd.min.js.map +1 -1
  8. package/bundles/covalent-core-common.umd.js +251 -84
  9. package/bundles/covalent-core-common.umd.js.map +1 -1
  10. package/bundles/covalent-core-common.umd.min.js +1 -1
  11. package/bundles/covalent-core-common.umd.min.js.map +1 -1
  12. package/bundles/covalent-core-data-table.umd.js +4 -4
  13. package/bundles/covalent-core-data-table.umd.js.map +1 -1
  14. package/bundles/covalent-core-data-table.umd.min.js +1 -1
  15. package/bundles/covalent-core-data-table.umd.min.js.map +1 -1
  16. package/bundles/covalent-core-dialogs.umd.js +2 -2
  17. package/bundles/covalent-core-dialogs.umd.min.js +1 -1
  18. package/bundles/covalent-core-dialogs.umd.min.js.map +1 -1
  19. package/bundles/covalent-core-expansion-panel.umd.js +1 -1
  20. package/bundles/covalent-core-expansion-panel.umd.min.js +1 -1
  21. package/bundles/covalent-core-expansion-panel.umd.min.js.map +1 -1
  22. package/bundles/covalent-core-json-formatter.umd.js +1 -1
  23. package/bundles/covalent-core-json-formatter.umd.min.js +1 -1
  24. package/bundles/covalent-core-json-formatter.umd.min.js.map +1 -1
  25. package/bundles/covalent-core-layout.umd.js +8 -7
  26. package/bundles/covalent-core-layout.umd.js.map +1 -1
  27. package/bundles/covalent-core-layout.umd.min.js +1 -1
  28. package/bundles/covalent-core-layout.umd.min.js.map +1 -1
  29. package/bundles/covalent-core-loading.umd.js +1 -1
  30. package/bundles/covalent-core-loading.umd.min.js +1 -1
  31. package/bundles/covalent-core-loading.umd.min.js.map +1 -1
  32. package/bundles/covalent-core-menu.umd.js +1 -1
  33. package/bundles/covalent-core-menu.umd.min.js +1 -1
  34. package/bundles/covalent-core-menu.umd.min.js.map +1 -1
  35. package/bundles/covalent-core-message.umd.js +1 -1
  36. package/bundles/covalent-core-message.umd.min.js +1 -1
  37. package/bundles/covalent-core-message.umd.min.js.map +1 -1
  38. package/bundles/covalent-core-paging.umd.js +1 -1
  39. package/bundles/covalent-core-paging.umd.min.js +1 -1
  40. package/bundles/covalent-core-paging.umd.min.js.map +1 -1
  41. package/bundles/covalent-core-search.umd.js +5 -4
  42. package/bundles/covalent-core-search.umd.js.map +1 -1
  43. package/bundles/covalent-core-search.umd.min.js +1 -1
  44. package/bundles/covalent-core-search.umd.min.js.map +1 -1
  45. package/bundles/covalent-core-sidesheet.umd.js +137 -0
  46. package/bundles/covalent-core-sidesheet.umd.js.map +1 -0
  47. package/bundles/covalent-core-sidesheet.umd.min.js +2 -0
  48. package/bundles/covalent-core-sidesheet.umd.min.js.map +1 -0
  49. package/bundles/covalent-core-steps.umd.js +5 -5
  50. package/bundles/covalent-core-steps.umd.min.js +1 -1
  51. package/bundles/covalent-core-steps.umd.min.js.map +1 -1
  52. package/bundles/covalent-core-tab-select.umd.js +3 -2
  53. package/bundles/covalent-core-tab-select.umd.js.map +1 -1
  54. package/bundles/covalent-core-tab-select.umd.min.js +1 -1
  55. package/bundles/covalent-core-tab-select.umd.min.js.map +1 -1
  56. package/bundles/covalent-core.umd.js +220 -62
  57. package/bundles/covalent-core.umd.js.map +1 -1
  58. package/bundles/covalent-core.umd.min.js +1 -1
  59. package/bundles/covalent-core.umd.min.js.map +1 -1
  60. package/chips/covalent-core-chips.metadata.json +1 -1
  61. package/common/covalent-core-common.d.ts +4 -3
  62. package/common/covalent-core-common.metadata.json +1 -1
  63. package/common/directives/fullscreen/fullscreen.directive.d.ts +22 -0
  64. package/covalent-core.d.ts +8 -7
  65. package/covalent-core.metadata.json +1 -1
  66. package/data-table/README.md +2 -2
  67. package/data-table/covalent-core-data-table.metadata.json +1 -1
  68. package/dialogs/covalent-core-dialogs.metadata.json +1 -1
  69. package/esm2015/breadcrumbs/breadcrumb/breadcrumb.component.js +1 -1
  70. package/esm2015/chips/chips.component.js +1 -1
  71. package/esm2015/common/common.module.js +8 -26
  72. package/esm2015/common/covalent-core-common.js +5 -4
  73. package/esm2015/common/directives/fullscreen/fullscreen.directive.js +136 -0
  74. package/esm2015/covalent-core.js +9 -8
  75. package/esm2015/data-table/data-table-cell/data-table-cell.component.js +1 -1
  76. package/esm2015/data-table/data-table-column/data-table-column.component.js +1 -1
  77. package/esm2015/data-table/data-table.component.js +3 -3
  78. package/esm2015/dialogs/dialog.component.js +1 -1
  79. package/esm2015/dialogs/prompt-dialog/prompt-dialog.component.js +1 -1
  80. package/esm2015/expansion-panel/expansion-panel.component.js +1 -1
  81. package/esm2015/json-formatter/json-formatter.component.js +1 -1
  82. package/esm2015/layout/layout-card-over/layout-card-over.component.js +1 -1
  83. package/esm2015/layout/layout-manage-list/layout-manage-list.component.js +1 -1
  84. package/esm2015/layout/layout-nav/layout-nav.component.js +1 -1
  85. package/esm2015/layout/layout-nav-list/layout-nav-list.component.js +1 -1
  86. package/esm2015/layout/layout.component.js +1 -1
  87. package/esm2015/layout/navigation-drawer/navigation-drawer.component.js +12 -3
  88. package/esm2015/loading/loading.component.js +1 -1
  89. package/esm2015/menu/menu.component.js +1 -1
  90. package/esm2015/message/message.component.js +1 -1
  91. package/esm2015/paging/paging-bar.component.js +1 -1
  92. package/esm2015/search/search-box/search-box.component.js +3 -3
  93. package/esm2015/search/search-input/search-input.component.js +10 -3
  94. package/esm2015/sidesheet/covalent-core-sidesheet.js +9 -0
  95. package/esm2015/sidesheet/index.js +6 -0
  96. package/esm2015/sidesheet/public-api.js +7 -0
  97. package/esm2015/sidesheet/sidesheet.component.js +70 -0
  98. package/esm2015/sidesheet/sidesheet.module.js +33 -0
  99. package/esm2015/steps/nav/nav-step-link/nav-step-link.component.js +1 -1
  100. package/esm2015/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.js +1 -1
  101. package/esm2015/steps/step-body/step-body.component.js +1 -1
  102. package/esm2015/steps/step-header/step-header.component.js +1 -1
  103. package/esm2015/steps/steps.component.js +1 -1
  104. package/esm2015/tab-select/tab-select.component.js +4 -3
  105. package/esm5/breadcrumbs/breadcrumb/breadcrumb.component.js +1 -1
  106. package/esm5/chips/chips.component.js +1 -1
  107. package/esm5/common/common.module.js +8 -26
  108. package/esm5/common/covalent-core-common.js +5 -4
  109. package/esm5/common/directives/fullscreen/fullscreen.directive.js +184 -0
  110. package/esm5/covalent-core.js +9 -8
  111. package/esm5/data-table/data-table-cell/data-table-cell.component.js +1 -1
  112. package/esm5/data-table/data-table-column/data-table-column.component.js +1 -1
  113. package/esm5/data-table/data-table.component.js +3 -3
  114. package/esm5/dialogs/dialog.component.js +1 -1
  115. package/esm5/dialogs/prompt-dialog/prompt-dialog.component.js +1 -1
  116. package/esm5/expansion-panel/expansion-panel.component.js +1 -1
  117. package/esm5/json-formatter/json-formatter.component.js +1 -1
  118. package/esm5/layout/layout-card-over/layout-card-over.component.js +1 -1
  119. package/esm5/layout/layout-manage-list/layout-manage-list.component.js +1 -1
  120. package/esm5/layout/layout-nav/layout-nav.component.js +1 -1
  121. package/esm5/layout/layout-nav-list/layout-nav-list.component.js +1 -1
  122. package/esm5/layout/layout.component.js +1 -1
  123. package/esm5/layout/navigation-drawer/navigation-drawer.component.js +12 -3
  124. package/esm5/loading/loading.component.js +1 -1
  125. package/esm5/menu/menu.component.js +1 -1
  126. package/esm5/message/message.component.js +1 -1
  127. package/esm5/paging/paging-bar.component.js +1 -1
  128. package/esm5/search/search-box/search-box.component.js +3 -3
  129. package/esm5/search/search-input/search-input.component.js +10 -3
  130. package/esm5/sidesheet/covalent-core-sidesheet.js +9 -0
  131. package/esm5/sidesheet/index.js +6 -0
  132. package/esm5/sidesheet/public-api.js +7 -0
  133. package/esm5/sidesheet/sidesheet.component.js +88 -0
  134. package/esm5/sidesheet/sidesheet.module.js +37 -0
  135. package/esm5/steps/nav/nav-step-link/nav-step-link.component.js +1 -1
  136. package/esm5/steps/nav/nav-steps-horizontal/nav-steps-horizontal.component.js +1 -1
  137. package/esm5/steps/step-body/step-body.component.js +1 -1
  138. package/esm5/steps/step-header/step-header.component.js +1 -1
  139. package/esm5/steps/steps.component.js +1 -1
  140. package/esm5/tab-select/tab-select.component.js +4 -3
  141. package/expansion-panel/covalent-core-expansion-panel.metadata.json +1 -1
  142. package/fesm2015/covalent-core-breadcrumbs.js +1 -1
  143. package/fesm2015/covalent-core-chips.js +1 -1
  144. package/fesm2015/covalent-core-common.js +114 -26
  145. package/fesm2015/covalent-core-common.js.map +1 -1
  146. package/fesm2015/covalent-core-data-table.js +4 -4
  147. package/fesm2015/covalent-core-data-table.js.map +1 -1
  148. package/fesm2015/covalent-core-dialogs.js +2 -2
  149. package/fesm2015/covalent-core-expansion-panel.js +1 -1
  150. package/fesm2015/covalent-core-json-formatter.js +1 -1
  151. package/fesm2015/covalent-core-layout.js +8 -7
  152. package/fesm2015/covalent-core-layout.js.map +1 -1
  153. package/fesm2015/covalent-core-loading.js +1 -1
  154. package/fesm2015/covalent-core-menu.js +1 -1
  155. package/fesm2015/covalent-core-message.js +1 -1
  156. package/fesm2015/covalent-core-paging.js +1 -1
  157. package/fesm2015/covalent-core-search.js +5 -4
  158. package/fesm2015/covalent-core-search.js.map +1 -1
  159. package/fesm2015/covalent-core-sidesheet.js +110 -0
  160. package/fesm2015/covalent-core-sidesheet.js.map +1 -0
  161. package/fesm2015/covalent-core-steps.js +5 -5
  162. package/fesm2015/covalent-core-tab-select.js +3 -2
  163. package/fesm2015/covalent-core-tab-select.js.map +1 -1
  164. package/fesm2015/covalent-core.js +149 -58
  165. package/fesm2015/covalent-core.js.map +1 -1
  166. package/fesm5/covalent-core-breadcrumbs.js +1 -1
  167. package/fesm5/covalent-core-chips.js +1 -1
  168. package/fesm5/covalent-core-common.js +161 -27
  169. package/fesm5/covalent-core-common.js.map +1 -1
  170. package/fesm5/covalent-core-data-table.js +4 -4
  171. package/fesm5/covalent-core-data-table.js.map +1 -1
  172. package/fesm5/covalent-core-dialogs.js +2 -2
  173. package/fesm5/covalent-core-expansion-panel.js +1 -1
  174. package/fesm5/covalent-core-json-formatter.js +1 -1
  175. package/fesm5/covalent-core-layout.js +8 -7
  176. package/fesm5/covalent-core-layout.js.map +1 -1
  177. package/fesm5/covalent-core-loading.js +1 -1
  178. package/fesm5/covalent-core-menu.js +1 -1
  179. package/fesm5/covalent-core-message.js +1 -1
  180. package/fesm5/covalent-core-paging.js +1 -1
  181. package/fesm5/covalent-core-search.js +5 -4
  182. package/fesm5/covalent-core-search.js.map +1 -1
  183. package/fesm5/covalent-core-sidesheet.js +126 -0
  184. package/fesm5/covalent-core-sidesheet.js.map +1 -0
  185. package/fesm5/covalent-core-steps.js +5 -5
  186. package/fesm5/covalent-core-tab-select.js +3 -2
  187. package/fesm5/covalent-core-tab-select.js.map +1 -1
  188. package/fesm5/covalent-core.js +196 -59
  189. package/fesm5/covalent-core.js.map +1 -1
  190. package/json-formatter/covalent-core-json-formatter.metadata.json +1 -1
  191. package/layout/README.md +5 -2
  192. package/layout/covalent-core-layout.metadata.json +1 -1
  193. package/layout/navigation-drawer/navigation-drawer.component.d.ts +7 -0
  194. package/layout/navigation-drawer/navigation-drawer.component.scss +7 -0
  195. package/loading/covalent-core-loading.metadata.json +1 -1
  196. package/menu/covalent-core-menu.metadata.json +1 -1
  197. package/message/covalent-core-message.metadata.json +1 -1
  198. package/package.json +1 -1
  199. package/paging/covalent-core-paging.metadata.json +1 -1
  200. package/search/covalent-core-search.metadata.json +1 -1
  201. package/search/search-box/search-box.component.scss +6 -0
  202. package/search/search-input/README.md +5 -2
  203. package/search/search-input/search-input.component.d.ts +6 -0
  204. package/search/search-input/search-input.component.scss +33 -0
  205. package/sidesheet/README.md +68 -0
  206. package/sidesheet/covalent-core-sidesheet.d.ts +4 -0
  207. package/sidesheet/covalent-core-sidesheet.metadata.json +1 -0
  208. package/sidesheet/index.d.ts +1 -0
  209. package/sidesheet/package.json +13 -0
  210. package/sidesheet/public-api.d.ts +2 -0
  211. package/sidesheet/sidesheet.component.d.ts +13 -0
  212. package/sidesheet/sidesheet.component.scss +96 -0
  213. package/sidesheet/sidesheet.module.d.ts +2 -0
  214. package/steps/covalent-core-steps.metadata.json +1 -1
  215. package/tab-select/covalent-core-tab-select.metadata.json +1 -1
  216. package/tab-select/tab-select.component.scss +3 -0
  217. package/theming/prebuilt/blue-grey-deep-orange.css +89 -86
  218. package/theming/prebuilt/blue-grey-deep-orange.css.map +1 -1
  219. package/theming/prebuilt/blue-orange.css +89 -86
  220. package/theming/prebuilt/blue-orange.css.map +1 -1
  221. package/theming/prebuilt/indigo-pink.css +89 -86
  222. package/theming/prebuilt/indigo-pink.css.map +1 -1
  223. package/theming/prebuilt/orange-light-blue.css +89 -86
  224. package/theming/prebuilt/orange-light-blue.css.map +1 -1
  225. package/theming/prebuilt/teal-orange.css +89 -86
  226. package/theming/prebuilt/teal-orange.css.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["node_modules/tslib/tslib.es6.js","ng://@covalent/core/loading/loading.component.ts","ng://@covalent/core/loading/services/loading.factory.ts","ng://@covalent/core/loading/services/loading.service.ts","ng://@covalent/core/loading/directives/loading.directive.ts","ng://@covalent/core/loading/loading.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","Circular","Linear","Determinate","Indeterminate","Overlay","Replace","FullScreen","None","TD_CIRCLE_DIAMETER","TdLoadingComponent","defineProperty","prototype","this","_mode","mode","_defaultMode","_value","value","_changeDetectorRef","markForCheck","ngDoCheck","isOverlay","_hostHeight","animation","_setCircleDiameter","getHeight","isFullScreen","undefined","height","getCircleDiameter","_circleDiameter","getCircleStrokeWidth","strokeWidth","Math","abs","isCircular","type","LoadingType","isLinear","style","LoadingStyle","animationComplete","event","fromState","outAnimationCompleted","inAnimationCompleted","_animationIn","next","_animationOut","startInAnimation","asObservable","startOutAnimation","LoadingMode","diameter","floor","_elementRef","getBoundingClientRect","Component","args","selector","template","animations","tdFadeInOutAnimation","ElementRef","ChangeDetectorRef","Subject","color","TdLoadingFactory","createFullScreenComponent","options","_this","overlayRef","loadingRef","_initializeContext","loading","observable","pipe","distinctUntilChanged","subscribe","registered","_createOverlay","componentRef","attach","ComponentPortal","_mapOptions","instance","changeDetectorRef","detectChanges","subs_1","unsubscribe","destroy","detach","dispose","createOverlayComponent","viewContainerRef","templateRef","_createComponent","content","TemplatePortal","clear","insert","hostView","createReplaceComponent","context","nativeElement","elementRef","nextElementSibling","scrollHeight","contentRef","createEmbeddedView","indexOf","subs_2","state","OverlayConfig","hasBackdrop","positionStrategy","_overlay","position","global","centerHorizontally","centerVertically","create","compRef","_componentFactoryResolver","resolveComponentFactory","_injector","subject","times","Injectable","ComponentFactoryResolver","Injector","LOADING_FACTORY_PROVIDER_FACTORY","parent","componentFactoryResolver","overlay","injector","LOADING_FACTORY_PROVIDER","provide","deps","Optional","SkipSelf","useFactory","TdLoadingConfig","config","name","Error","__extends","__","constructor","tslib_1.__extends","TdLoadingDirectiveConfig","_super","call","strategy","LoadingStrategy","TdLoadingService","createComponent","directiveConfig","_context","_loadingFactory","fullscreenConfig","removeComponent","register","registers","_timeouts","_clearTimeout","setTimeout","resolve","resolves","resolveAll","setValue","clearTimeout","LOADING_PROVIDER_FACTORY","loadingFactory","LOADING_PROVIDER","TdLoadingContext","$implicit","tdLoading","TD_LOADING_NEXT_ID","TdLoadingDirective","_name","until","_loadingService","_type","stategy","_strategy","ngOnInit","_registerComponent","ngOnDestroy","_loadingRef","_viewContainerRef","_templateRef","Directive","ViewContainerRef","TemplateRef","Input","TD_LOADING","TD_LOADING_ENTRY_COMPONENTS","CovalentLoadingModule","NgModule","imports","CommonModule","MatProgressBarModule","MatProgressSpin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AKzI,KAAA,CAAC,mCAiBNyI,EAAAA,MAAKzI,KAAA,CAAC,oCAgBNyI,EAAAA,MAAKzI,KAAA,CAAC,qBAyCTyH,GAvCE,SAAAA,EAAoBW,EACAC,EACAT,GAFA1K,KAAAkL,kBAAAA,EACAlL,KAAAmL,aAAAA,EACAnL,KAAA0K,gBAAAA,EAlGZ1K,KAAAkJ,SAA6B,IAAIiB,EA8FhBnK,KAAAsD,MAAuC,cCvG5DkI,EAA0B,CAC9B3L,EACA0K,GAGIkB,EAA2C,CAC/C5L,GAGF6L,uBAACC,EAAAA,SAAQ7I,KAAA,CAAC,CACR8I,QAAS,CACPC,EAAAA,aACAC,EAAAA,qBACAC,EAAAA,yBACAC,EAAAA,cACAC,EAAAA,cAEFC,aAAc,CACZV,GAEFW,QAAS,CACPX,GAEFY,UAAW,CACTxE,EACAsC,GAEFmC,gBAAiB,CACfZ,OAKJC,GAxBA,SAAAA","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n 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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n 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);\r\n 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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Component, ViewChild, TemplateRef, ChangeDetectorRef, ChangeDetectionStrategy, ElementRef, DoCheck } from '@angular/core';\nimport { AnimationEvent } from '@angular/animations';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { Observable, Subject } from 'rxjs';\n\nexport enum LoadingType {\n Circular = 'circular',\n Linear = 'linear',\n}\n\nexport enum LoadingMode {\n Determinate = 'determinate',\n Indeterminate = 'indeterminate',\n}\n\nexport enum LoadingStrategy {\n Overlay = 'overlay',\n Replace = 'replace',\n}\n\nexport enum LoadingStyle {\n FullScreen = 'fullscreen',\n Overlay = 'overlay',\n None = 'none',\n}\n\nimport { tdFadeInOutAnimation } from '@covalent/core/common';\n\nexport const TD_CIRCLE_DIAMETER: number = 100;\n\n@Component({\n selector: 'td-loading',\n styleUrls: ['./loading.component.scss' ],\n templateUrl: './loading.component.html',\n animations: [\n tdFadeInOutAnimation,\n ],\n})\nexport class TdLoadingComponent implements DoCheck {\n\n private _animationIn: Subject<any> = new Subject<any>();\n private _animationOut: Subject<any> = new Subject<any>();\n private _mode: LoadingMode = LoadingMode.Indeterminate;\n private _defaultMode: LoadingMode = LoadingMode.Indeterminate;\n private _value: number = 0;\n private _circleDiameter: number = TD_CIRCLE_DIAMETER;\n\n /**\n * Flag for animation\n */\n animation: boolean = false;\n\n /**\n * Content injected into loading component.\n */\n content: TemplatePortal<any>;\n\n /**\n * Sets mode of [TdLoadingComponent] to LoadingMode.Determinate or LoadingMode.Indeterminate\n */\n set mode(mode: LoadingMode) {\n this._defaultMode = mode;\n }\n get mode(): LoadingMode {\n return this._mode;\n }\n\n /**\n * Sets value of [TdLoadingComponent] if mode is 'LoadingMode.Determinate'\n */\n set value(value: number) {\n this._value = value;\n // Check for changes for `OnPush` change detection\n this._changeDetectorRef.markForCheck();\n }\n get value(): number {\n return this._value;\n }\n\n style: LoadingStyle = LoadingStyle.None;\n\n /**\n * height: number\n * Sets height of [TdLoadingComponent].\n */\n height: number;\n\n /**\n * type: LoadingType\n * Sets type of [TdLoadingComponent] rendered.\n */\n type: LoadingType = LoadingType.Circular;\n\n /**\n * color: primary' | 'accent' | 'warn'\n * Sets theme color of [TdLoadingComponent] rendered.\n */\n color: 'primary' | 'accent' | 'warn' = 'primary';\n\n constructor(private _elementRef: ElementRef,\n private _changeDetectorRef: ChangeDetectorRef) {}\n\n ngDoCheck(): void {\n // When overlay is used and the host width has a value greater than 1px\n // set the circle diameter when possible incase the loading component was rendered in a hidden state\n if (this.isOverlay() && this._hostHeight() > 1) {\n if (this.animation) {\n this._setCircleDiameter();\n this._changeDetectorRef.markForCheck();\n }\n }\n }\n\n getHeight(): string {\n // Ignore height if style is `overlay` or `fullscreen`.\n // Add height if child elements have a height and style is `none`, else return default height.\n if (this.isOverlay() || this.isFullScreen()) {\n return undefined;\n } else {\n return this.height ? `${this.height}px` : '150px';\n }\n }\n\n getCircleDiameter(): number {\n return this._circleDiameter;\n }\n\n getCircleStrokeWidth(): number {\n // we calculate the stroke width by setting it as 10% of its diameter\n let strokeWidth: number = this.getCircleDiameter() / 10;\n return Math.abs(strokeWidth);\n }\n\n isCircular(): boolean {\n return this.type === LoadingType.Circular;\n }\n\n isLinear(): boolean {\n return this.type === LoadingType.Linear;\n }\n\n isFullScreen(): boolean {\n return this.style === LoadingStyle.FullScreen;\n }\n\n isOverlay(): boolean {\n return this.style === LoadingStyle.Overlay;\n }\n\n animationComplete(event: AnimationEvent): void {\n // Check to see if its \"in\" or \"out\" animation to execute the proper callback\n if (!event.fromState) {\n this.inAnimationCompleted();\n } else {\n this.outAnimationCompleted();\n }\n }\n\n inAnimationCompleted(): void {\n this._animationIn.next(undefined);\n }\n\n outAnimationCompleted(): void {\n /* little hack to reset the loader value and animation before removing it from DOM\n * else, the loader will appear with prev value when its registered again\n * and will do an animation going prev value to 0.\n */\n this.value = 0;\n // Check for changes for `OnPush` change detection\n this._changeDetectorRef.markForCheck();\n this._animationOut.next(undefined);\n }\n\n /**\n * Starts in animation and returns an observable for completition event.\n */\n startInAnimation(): Observable<any> {\n /* need to switch back to the selected mode, so we have saved it in another variable\n * and then recover it. (issue with protractor)\n */\n this._mode = this._defaultMode;\n // Set values before the animations starts\n this._setCircleDiameter();\n // Check for changes for `OnPush` change detection\n this.animation = true;\n this._changeDetectorRef.markForCheck();\n return this._animationIn.asObservable();\n }\n\n /**\n * Starts out animation and returns an observable for completition event.\n */\n startOutAnimation(): Observable<any> {\n this.animation = false;\n /* need to switch back and forth from determinate/indeterminate so the setInterval()\n * inside mat-progress-spinner stops and protractor doesnt timeout waiting to sync.\n */\n this._mode = LoadingMode.Determinate;\n // Check for changes for `OnPush` change detection\n this._changeDetectorRef.markForCheck();\n return this._animationOut.asObservable();\n }\n\n /**\n * Calculate the proper diameter for the circle and set it\n */\n private _setCircleDiameter(): void {\n // we set a default diameter of 100 since this is the default in material\n let diameter: number = TD_CIRCLE_DIAMETER;\n // if height is provided, then we take that as diameter\n if (this.height) {\n diameter = this.height;\n // else if its not provided, then we take the host height\n } else if (this.height === undefined) {\n diameter = this._hostHeight();\n }\n // if the diameter is over TD_CIRCLE_DIAMETER, we set TD_CIRCLE_DIAMETER\n if (!!diameter && diameter <= TD_CIRCLE_DIAMETER) {\n this._circleDiameter = Math.floor(diameter);\n } else {\n this._circleDiameter = TD_CIRCLE_DIAMETER;\n }\n }\n\n /**\n * Returns the host height of the loading component\n */\n private _hostHeight(): number {\n if (<HTMLElement>this._elementRef.nativeElement) {\n return (<HTMLElement>this._elementRef.nativeElement).getBoundingClientRect().height;\n }\n return 0;\n }\n}\n","import { Injectable, ComponentFactoryResolver, ChangeDetectorRef, Provider, SkipSelf, Optional, EmbeddedViewRef } from '@angular/core';\nimport { Injector, ComponentRef, ViewContainerRef, TemplateRef } from '@angular/core';\nimport { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';\nimport { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\n\nimport { Observable, Subject, Subscription } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\nimport { TdLoadingContext } from '../directives/loading.directive';\nimport { TdLoadingComponent, LoadingStyle } from '../loading.component';\nimport { ITdLoadingConfig } from './loading.service';\n\nexport interface IInternalLoadingOptions extends ITdLoadingConfig {\n height?: number;\n style?: LoadingStyle;\n}\n\nexport interface ILoadingRef {\n observable: Observable<any>;\n componentRef: ComponentRef<any>;\n subject?: Subject<any>;\n times?: number;\n}\n\n/**\n * NOTE: @internal usage only.\n */\n@Injectable()\nexport class TdLoadingFactory {\n\n constructor(private _componentFactoryResolver: ComponentFactoryResolver,\n private _overlay: Overlay,\n private _injector: Injector) {\n }\n\n /**\n * Uses material `Overlay` services to create a DOM element and attach the loading component\n * into it. Leveraging the state and configuration from it.\n *\n * Saves a reference in context to be called when registering/resolving the loading element.\n */\n public createFullScreenComponent(options: ITdLoadingConfig): ILoadingRef {\n (<IInternalLoadingOptions>options).height = undefined;\n (<IInternalLoadingOptions>options).style = LoadingStyle.FullScreen;\n let loadingRef: ILoadingRef = this._initializeContext();\n let loading: boolean = false;\n let overlayRef: OverlayRef;\n loadingRef.observable.pipe(\n distinctUntilChanged(),\n ).subscribe((registered: number) => {\n if (registered > 0 && !loading) {\n loading = true;\n overlayRef = this._createOverlay();\n loadingRef.componentRef = overlayRef.attach(new ComponentPortal(TdLoadingComponent));\n this._mapOptions(options, loadingRef.componentRef.instance);\n loadingRef.componentRef.instance.startInAnimation();\n loadingRef.componentRef.changeDetectorRef.detectChanges();\n } else if (registered <= 0 && loading) {\n loading = false;\n let subs: Subscription = loadingRef.componentRef.instance.startOutAnimation().subscribe(() => {\n subs.unsubscribe();\n loadingRef.componentRef.destroy();\n overlayRef.detach();\n overlayRef.dispose();\n });\n }\n });\n return loadingRef;\n }\n\n /**\n * Creates a loading component dynamically and attaches it into the given viewContainerRef.\n * Leverages TemplatePortals from material to inject the template inside of it so it fits\n * perfectly when overlaying it.\n *\n * Saves a reference in context to be called when registering/resolving the loading element.\n */\n public createOverlayComponent(options: ITdLoadingConfig, viewContainerRef: ViewContainerRef,\n templateRef: TemplateRef<Object>): ILoadingRef {\n (<IInternalLoadingOptions>options).height = undefined;\n (<IInternalLoadingOptions>options).style = LoadingStyle.Overlay;\n let loadingRef: ILoadingRef = this._createComponent(options);\n let loading: boolean = false;\n loadingRef.componentRef.instance.content = new TemplatePortal(templateRef, viewContainerRef);\n viewContainerRef.clear();\n viewContainerRef.insert(loadingRef.componentRef.hostView, 0);\n loadingRef.observable.pipe(\n distinctUntilChanged(),\n ).subscribe((registered: number) => {\n if (registered > 0 && !loading) {\n loading = true;\n loadingRef.componentRef.instance.startInAnimation();\n } else if (registered <= 0 && loading) {\n loading = false;\n loadingRef.componentRef.instance.startOutAnimation();\n }\n });\n return loadingRef;\n }\n\n /**\n * Creates a loading component dynamically and attaches it into the given viewContainerRef.\n * Replaces the template with the loading component depending if it was registered or resolved.\n *\n * Saves a reference in context to be called when registering/resolving the loading element.\n */\n public createReplaceComponent(options: ITdLoadingConfig, viewContainerRef: ViewContainerRef,\n templateRef: TemplateRef<Object>, context: TdLoadingContext): ILoadingRef {\n let nativeElement: HTMLElement = <HTMLElement>templateRef.elementRef.nativeElement;\n (<IInternalLoadingOptions>options).height = nativeElement.nextElementSibling ?\n nativeElement.nextElementSibling.scrollHeight : undefined;\n (<IInternalLoadingOptions>options).style = LoadingStyle.None;\n let loadingRef: ILoadingRef = this._createComponent(options);\n let loading: boolean = false;\n // passing context so when the template is attached, we can keep the reference of the variables\n let contentRef: EmbeddedViewRef<Object> = viewContainerRef.createEmbeddedView(templateRef, context);\n loadingRef.observable.pipe(\n distinctUntilChanged(),\n ).subscribe((registered: number) => {\n if (registered > 0 && !loading) {\n loading = true;\n // detach the content and attach the loader if loader is there\n let index: number = viewContainerRef.indexOf(loadingRef.componentRef.hostView);\n if (index < 0) {\n viewContainerRef.detach(viewContainerRef.indexOf(contentRef));\n viewContainerRef.insert(loadingRef.componentRef.hostView, 0);\n }\n loadingRef.componentRef.instance.startInAnimation();\n } else if (registered <= 0 && loading) {\n loading = false;\n let subs: Subscription = loadingRef.componentRef.instance.startOutAnimation().subscribe(() => {\n subs.unsubscribe();\n // detach loader and attach the content if content is there\n let index: number = viewContainerRef.indexOf(contentRef);\n if (index < 0) {\n viewContainerRef.detach(viewContainerRef.indexOf(loadingRef.componentRef.hostView));\n viewContainerRef.insert(contentRef, 0);\n }\n /**\n * Need to call \"markForCheck\" and \"detectChanges\" on attached template, so its detected by parent component when attached\n * with \"OnPush\" change detection\n */\n contentRef.detectChanges();\n contentRef.markForCheck();\n });\n }\n });\n return loadingRef;\n }\n\n /**\n * Creates a fullscreen overlay for the loading usage.\n */\n private _createOverlay(): OverlayRef {\n let state: OverlayConfig = new OverlayConfig();\n state.hasBackdrop = false;\n state.positionStrategy = this._overlay.position().global().centerHorizontally().centerVertically();\n return this._overlay.create(state);\n }\n\n /**\n * Creates a generic component dynamically waiting to be attached to a viewContainerRef.\n */\n private _createComponent(options: IInternalLoadingOptions): ILoadingRef {\n let compRef: ILoadingRef = this._initializeContext();\n compRef.componentRef = this._componentFactoryResolver\n .resolveComponentFactory(TdLoadingComponent).create(this._injector);\n this._mapOptions(options, compRef.componentRef.instance);\n return compRef;\n }\n\n /**\n * Initialize context for loading component.\n */\n private _initializeContext(): ILoadingRef {\n let subject: Subject<any> = new Subject<any>();\n return {\n observable: subject.asObservable(),\n subject: subject,\n componentRef: undefined,\n times: 0,\n };\n }\n\n /**\n * Maps configuration to the loading component instance.\n */\n private _mapOptions(options: IInternalLoadingOptions, instance: TdLoadingComponent): void {\n instance.style = options.style;\n if (options.type !== undefined) {\n instance.type = options.type;\n }\n if (options.height !== undefined) {\n instance.height = options.height;\n }\n if (options.mode !== undefined) {\n instance.mode = options.mode;\n }\n if (options.color !== undefined) {\n instance.color = options.color;\n }\n }\n}\n\nexport function LOADING_FACTORY_PROVIDER_FACTORY(\n parent: TdLoadingFactory, componentFactoryResolver: ComponentFactoryResolver, overlay: Overlay, injector: Injector): TdLoadingFactory {\n return parent || new TdLoadingFactory(componentFactoryResolver, overlay, injector);\n}\n\nexport const LOADING_FACTORY_PROVIDER: Provider = {\n // If there is already a service available, use that. Otherwise, provide a new one.\n provide: TdLoadingFactory,\n deps: [[new Optional(), new SkipSelf(), TdLoadingFactory], ComponentFactoryResolver, Overlay, Injector],\n useFactory: LOADING_FACTORY_PROVIDER_FACTORY,\n};\n","import { Injectable, Provider, SkipSelf, Optional } from '@angular/core';\nimport { ViewContainerRef, TemplateRef } from '@angular/core';\nimport { Observable, Subject, Subscription } from 'rxjs';\n\nimport { TdLoadingContext } from '../directives/loading.directive';\nimport { TdLoadingComponent, LoadingMode, LoadingStrategy, LoadingType } from '../loading.component';\nimport { TdLoadingFactory, ILoadingRef } from './loading.factory';\n\nexport interface ITdLoadingConfig {\n name: string;\n type?: LoadingType;\n mode?: LoadingMode;\n color?: 'primary' | 'accent' | 'warn';\n}\n\nexport class TdLoadingConfig implements ITdLoadingConfig {\n name: string;\n type?: LoadingType;\n mode?: LoadingMode;\n color?: 'primary' | 'accent' | 'warn';\n\n constructor(config: ITdLoadingConfig) {\n this.name = config.name;\n if (!this.name) {\n throw Error('Name is required for [TdLoading] configuration.');\n }\n this.mode = config.mode ? config.mode : LoadingMode.Indeterminate;\n this.type = config.type ? config.type : LoadingType.Circular;\n this.color = config.color ? config.color : 'primary';\n }\n}\n\nexport interface ITdLoadingDirectiveConfig extends ITdLoadingConfig {\n strategy?: LoadingStrategy;\n}\n\nexport class TdLoadingDirectiveConfig extends TdLoadingConfig implements ITdLoadingDirectiveConfig {\n name: string;\n type: LoadingType;\n mode: LoadingMode;\n strategy: LoadingStrategy;\n\n constructor(config: ITdLoadingDirectiveConfig) {\n super(config);\n this.strategy = config.strategy ? config.strategy : LoadingStrategy.Replace;\n }\n}\n\n@Injectable()\nexport class TdLoadingService {\n\n private _context: {[key: string]: ILoadingRef} = {};\n private _timeouts: {[key: string]: any} = {};\n\n constructor(private _loadingFactory: TdLoadingFactory) {\n this.create({\n name: 'td-loading-main',\n });\n }\n\n /**\n * params:\n * - config: ILoadingDirectiveConfig\n * - viewContainerRef: ViewContainerRef\n * - templateRef: TemplateRef<Object>\n *\n * Creates an replace loading mask and attaches it to the viewContainerRef.\n * Replaces the templateRef with the mask when a request is registered on it.\n *\n * NOTE: @internal usage only.\n */\n createComponent(config: ITdLoadingDirectiveConfig, viewContainerRef: ViewContainerRef,\n templateRef: TemplateRef<Object>, context: TdLoadingContext): ILoadingRef {\n let directiveConfig: TdLoadingDirectiveConfig = new TdLoadingDirectiveConfig(config);\n if (this._context[directiveConfig.name]) {\n throw Error(`Name duplication: [TdLoading] directive has a name conflict with ${directiveConfig.name}.`);\n }\n if (directiveConfig.strategy === LoadingStrategy.Overlay) {\n this._context[directiveConfig.name] = this._loadingFactory.createOverlayComponent(directiveConfig, viewContainerRef, templateRef);\n } else {\n this._context[directiveConfig.name] = this._loadingFactory.createReplaceComponent(directiveConfig, viewContainerRef, templateRef, context);\n }\n return this._context[directiveConfig.name];\n }\n\n /**\n * params:\n * - config: ITdLoadingConfig\n *\n * Creates a fullscreen loading mask and attaches it to the DOM with the given configuration.\n * Only displayed when the mask has a request registered on it.\n */\n public create(config: ITdLoadingConfig): void {\n let fullscreenConfig: TdLoadingConfig = new TdLoadingConfig(config);\n this.removeComponent(fullscreenConfig.name);\n this._context[fullscreenConfig.name] = this._loadingFactory.createFullScreenComponent(fullscreenConfig);\n }\n\n /**\n * params:\n * - name: string\n *\n * Removes `loading` component from service context.\n */\n public removeComponent(name: string): void {\n if (this._context[name]) {\n this._context[name].subject.unsubscribe();\n if (this._context[name].componentRef) {\n this._context[name].componentRef.destroy();\n }\n this._context[name] = undefined;\n delete this._context[name];\n }\n }\n\n /**\n * params:\n * - name: string\n * - registers?: number\n * returns: true if successful\n *\n * Resolves a request for the loading mask referenced by the name parameter.\n * Can optionally pass registers argument to set a number of register calls.\n *\n * If no paramemeters are used, then default main mask will be used.\n *\n * e.g. loadingService.register()\n */\n public register(name: string = 'td-loading-main', registers: number = 1): boolean {\n // try registering into the service if the loading component has been instanciated or if it exists.\n if (this._context[name]) {\n registers = registers < 1 ? 1 : registers;\n this._context[name].times += registers;\n this._context[name].subject.next(this._context[name].times);\n return true;\n } else {\n // if it doesnt exist, set a timeout so its registered after change detection happens\n // this in case \"register\" occured on the `ngOnInit` lifehook cycle.\n if (!this._timeouts[name]) {\n this._timeouts[name] = setTimeout(() => {\n this.register(name, registers);\n });\n } else {\n // if it timeout occured and still doesnt exist, it means the tiemout wasnt needed so we clear it.\n this._clearTimeout(name);\n }\n }\n return false;\n }\n\n /**\n * params:\n * - name: string\n * - resolves?: number\n * returns: true if successful\n *\n * Resolves a request for the loading mask referenced by the name parameter.\n * Can optionally pass resolves argument to set a number of resolve calls.\n *\n * If no paramemeters are used, then default main mask will be used.\n *\n * e.g. loadingService.resolve()\n */\n public resolve(name: string = 'td-loading-main', resolves: number = 1): boolean {\n // clear timeout if the loading component is \"resolved\" before its \"registered\"\n this._clearTimeout(name);\n if (this._context[name]) {\n resolves = resolves < 1 ? 1 : resolves;\n if (this._context[name].times > 0) {\n let times: number = this._context[name].times;\n times -= resolves;\n this._context[name].times = times < 0 ? 0 : times;\n }\n this._context[name].subject.next(this._context[name].times);\n return true;\n }\n return false;\n }\n\n /**\n * params:\n * - name: string\n * returns: true if successful\n *\n * Resolves all request for the loading mask referenced by the name parameter.\n *\n * If no paramemeters are used, then default main mask will be used.\n *\n * e.g. loadingService.resolveAll()\n */\n public resolveAll(name: string = 'td-loading-main'): boolean {\n // clear timeout if the loading component is \"resolved\" before its \"registered\"\n this._clearTimeout(name);\n if (this._context[name]) {\n this._context[name].times = 0;\n this._context[name].subject.next(this._context[name].times);\n return true;\n }\n return false;\n }\n\n /**\n * params:\n * - name: string\n * - value: number\n * returns: true if successful\n *\n * Set value on a loading mask referenced by the name parameter.\n * Usage only available if its mode is 'determinate' and if loading is showing.\n */\n public setValue(name: string, value: number): boolean {\n if (this._context[name]) {\n let instance: TdLoadingComponent = this._context[name].componentRef.instance;\n if (instance.mode === LoadingMode.Determinate && instance.animation) {\n instance.value = value;\n return true;\n }\n }\n return false;\n }\n\n /**\n * Clears timeout linked to the name.\n * @param name Name of the loading component to be cleared\n */\n private _clearTimeout(name: string): void {\n clearTimeout(this._timeouts[name]);\n delete this._timeouts[name];\n }\n}\n\nexport function LOADING_PROVIDER_FACTORY(\n parent: TdLoadingService, loadingFactory: TdLoadingFactory): TdLoadingService {\n return parent || new TdLoadingService(loadingFactory);\n}\n\nexport const LOADING_PROVIDER: Provider = {\n // If there is already a service available, use that. Otherwise, provide a new one.\n provide: TdLoadingService,\n deps: [[new Optional(), new SkipSelf(), TdLoadingService], TdLoadingFactory],\n useFactory: LOADING_PROVIDER_FACTORY,\n};\n","import { Directive, Input, OnInit, OnDestroy } from '@angular/core';\nimport { ViewContainerRef, TemplateRef } from '@angular/core';\n\nimport { LoadingType, LoadingMode, LoadingStrategy, TdLoadingComponent } from '../loading.component';\nimport { TdLoadingService } from '../services/loading.service';\nimport { ILoadingRef } from '../services/loading.factory';\n\n/**\n * Context class for variable reference\n */\nexport class TdLoadingContext {\n public $implicit: any = undefined;\n public tdLoading: any = undefined;\n}\n\n// Constant for generation of the id for the next component\nlet TD_LOADING_NEXT_ID: number = 0;\n\n@Directive({\n selector: '[tdLoading]',\n})\nexport class TdLoadingDirective implements OnInit, OnDestroy {\n\n private _context: TdLoadingContext = new TdLoadingContext();\n private _type: LoadingType;\n private _mode: LoadingMode;\n private _strategy: LoadingStrategy;\n private _name: string;\n private _loadingRef: ILoadingRef;\n\n /**\n * tdLoading: string\n * Name reference of the loading mask, used to register/resolve requests to the mask.\n */\n @Input('tdLoading')\n set name(name: string) {\n if (!this._name) {\n if (name) {\n this._name = name;\n }\n }\n }\n\n /**\n * tdLoadingUntil?: any\n * If its null, undefined or false it will be used to register requests to the mask.\n * Else if its any value that can be resolved as true, it will resolve the mask.\n * [name] is optional when using [until], but can still be used to register/resolve it manually.\n */\n @Input('tdLoadingUntil')\n set until(until: any) {\n if (!this._name) {\n this._name = 'td-loading-until-' + TD_LOADING_NEXT_ID++;\n }\n this._context.$implicit = this._context.tdLoading = until;\n if (!until) {\n this._loadingService.register(this._name);\n } else {\n this._loadingService.resolveAll(this._name);\n }\n }\n\n /**\n * tdLoadingType?: LoadingType or ['linear' | 'circular']\n * Sets the type of loading mask depending on value.\n * Defaults to [LoadingType.Circular | 'circular'].\n */\n @Input('tdLoadingType')\n set type(type: LoadingType) {\n switch (type) {\n case LoadingType.Linear:\n this._type = LoadingType.Linear;\n break;\n default:\n this._type = LoadingType.Circular;\n break;\n }\n }\n\n /**\n * tdLoadingMode?: LoadingMode or ['determinate' | 'indeterminate']\n * Sets the mode of loading mask depending on value.\n * Defaults to [LoadingMode.Indeterminate | 'indeterminate'].\n */\n @Input('tdLoadingMode')\n set mode(mode: LoadingMode) {\n switch (mode) {\n case LoadingMode.Determinate:\n this._mode = LoadingMode.Determinate;\n break;\n default:\n this._mode = LoadingMode.Indeterminate;\n break;\n }\n }\n\n /**\n * tdLoadingStrategy?: LoadingStrategy or ['replace' | 'overlay']\n * Sets the strategy of loading mask depending on value.\n * Defaults to [LoadingMode.Replace | 'replace'].\n */\n @Input('tdLoadingStrategy')\n set strategy(stategy: LoadingStrategy) {\n switch (stategy) {\n case LoadingStrategy.Overlay:\n this._strategy = LoadingStrategy.Overlay;\n break;\n default:\n this._strategy = LoadingStrategy.Replace;\n break;\n }\n }\n\n /**\n * tdLoadingColor?: \"primary\" | \"accent\" | \"warn\"\n * Sets the theme color of the loading component. Defaults to \"primary\"\n */\n @Input('tdLoadingColor') color: 'primary' | 'accent' | 'warn' = 'primary';\n\n constructor(private _viewContainerRef: ViewContainerRef,\n private _templateRef: TemplateRef<TdLoadingContext>,\n private _loadingService: TdLoadingService) {}\n\n /**\n * Registers component in the DOM, so it will be available when calling resolve/register.\n */\n ngOnInit(): void {\n this._registerComponent();\n }\n\n /**\n * Remove component when directive is destroyed.\n */\n ngOnDestroy(): void {\n this._loadingService.removeComponent(this._name);\n this._loadingRef = undefined;\n }\n\n /**\n * Creates [TdLoadingComponent] and attaches it to this directive's [ViewContainerRef].\n * Passes this directive's [TemplateRef] to modify DOM depending on loading `strategy`.\n */\n private _registerComponent(): void {\n if (!this._name) {\n throw new Error('Name is needed to register loading directive');\n }\n // Check if `TdLoadingComponent` has been created before trying to add one again.\n // There is a weird edge case when using `[routerLinkActive]` that calls the `ngOnInit` twice in a row\n if (!this._loadingRef) {\n this._loadingRef = this._loadingService.createComponent({\n name: this._name,\n type: this._type,\n mode: this._mode,\n color: this.color,\n strategy: this._strategy,\n }, this._viewContainerRef, this._templateRef, this._context);\n }\n }\n}\n","import { Type } from '@angular/core';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { TdLoadingService, LOADING_PROVIDER } from './services/loading.service';\nimport { TdLoadingFactory, LOADING_FACTORY_PROVIDER } from './services/loading.factory';\nimport { TdLoadingDirective } from './directives/loading.directive';\nimport { TdLoadingComponent } from './loading.component';\n\nconst TD_LOADING: Type<any>[] = [\n TdLoadingComponent,\n TdLoadingDirective,\n];\n\nconst TD_LOADING_ENTRY_COMPONENTS: Type<any>[] = [\n TdLoadingComponent,\n];\n\n@NgModule({\n imports: [\n CommonModule,\n MatProgressBarModule,\n MatProgressSpinnerModule,\n OverlayModule,\n PortalModule,\n ],\n declarations: [\n TD_LOADING,\n ],\n exports: [\n TD_LOADING,\n ],\n providers: [\n LOADING_FACTORY_PROVIDER,\n LOADING_PROVIDER,\n ],\n entryComponents: [\n TD_LOADING_ENTRY_COMPONENTS,\n ],\n})\nexport class CovalentLoadingModule {\n\n}\n"]}
1
+ {"version":3,"sources":["node_modules/tslib/tslib.es6.js","ng://@covalent/core/loading/loading.component.ts","ng://@covalent/core/loading/services/loading.factory.ts","ng://@covalent/core/loading/services/loading.service.ts","ng://@covalent/core/loading/directives/loading.directive.ts","ng://@covalent/core/loading/loading.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","Circular","Linear","Determinate","Indeterminate","Overlay","Replace","FullScreen","None","TD_CIRCLE_DIAMETER","TdLoadingComponent","defineProperty","prototype","this","_mode","mode","_defaultMode","_value","value","_changeDetectorRef","markForCheck","ngDoCheck","isOverlay","_hostHeight","animation","_setCircleDiameter","getHeight","isFullScreen","undefined","height","getCircleDiameter","_circleDiameter","getCircleStrokeWidth","strokeWidth","Math","abs","isCircular","type","LoadingType","isLinear","style","LoadingStyle","animationComplete","event","fromState","outAnimationCompleted","inAnimationCompleted","_animationIn","next","_animationOut","startInAnimation","asObservable","startOutAnimation","LoadingMode","diameter","floor","_elementRef","getBoundingClientRect","Component","args","selector","template","animations","tdFadeInOutAnimation","ElementRef","ChangeDetectorRef","Subject","color","TdLoadingFactory","createFullScreenComponent","options","_this","overlayRef","loadingRef","_initializeContext","loading","observable","pipe","distinctUntilChanged","subscribe","registered","_createOverlay","componentRef","attach","ComponentPortal","_mapOptions","instance","changeDetectorRef","detectChanges","subs_1","unsubscribe","destroy","detach","dispose","createOverlayComponent","viewContainerRef","templateRef","_createComponent","content","TemplatePortal","clear","insert","hostView","createReplaceComponent","context","nativeElement","elementRef","nextElementSibling","scrollHeight","contentRef","createEmbeddedView","indexOf","subs_2","state","OverlayConfig","hasBackdrop","positionStrategy","_overlay","position","global","centerHorizontally","centerVertically","create","compRef","_componentFactoryResolver","resolveComponentFactory","_injector","subject","times","Injectable","ComponentFactoryResolver","Injector","LOADING_FACTORY_PROVIDER_FACTORY","parent","componentFactoryResolver","overlay","injector","LOADING_FACTORY_PROVIDER","provide","deps","Optional","SkipSelf","useFactory","TdLoadingConfig","config","name","Error","__extends","__","constructor","tslib_1.__extends","TdLoadingDirectiveConfig","_super","call","strategy","LoadingStrategy","TdLoadingService","createComponent","directiveConfig","_context","_loadingFactory","fullscreenConfig","removeComponent","register","registers","_timeouts","_clearTimeout","setTimeout","resolve","resolves","resolveAll","setValue","clearTimeout","LOADING_PROVIDER_FACTORY","loadingFactory","LOADING_PROVIDER","TdLoadingContext","$implicit","tdLoading","TD_LOADING_NEXT_ID","TdLoadingDirective","_name","until","_loadingService","_type","stategy","_strategy","ngOnInit","_registerComponent","ngOnDestroy","_loadingRef","_viewContainerRef","_templateRef","Directive","ViewContainerRef","TemplateRef","Input","TD_LOADING","TD_LOADING_ENTRY_COMPONENTS","CovalentLoadingModule","NgModule","imports","CommonModule","MatProgressBarModule","MatProgressSpinnerModule","OverlayModule","PortalModule","declarations","exports","providers","entryComponents"],"mappings":"o7BAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,WCd1BO,SAAW,WACXC,OAAS,aAITC,YAAc,cACdC,cAAgB,oBAIhBC,QAAU,UACVC,QAAU,cAIVC,WAAa,aACbF,QAAU,UACVG,KAAO,QAKIC,EAA6B,IAE1CC,GA8BEf,OAAAgB,eAAID,EAAAE,UAAA,OAAI,KAGR,WACE,OAAOC,KAAKC,WAJd,SAASC,GACPF,KAAKG,aAAeD,mCAStBpB,OAAAgB,eAAID,EAAAE,UAAA,QAAK,KAKT,WACE,OAAOC,KAAKI,YANd,SAAUC,GACRL,KAAKI,OAASC,EAEdL,KAAKM,mBAAmBC,gDA6B1BV,EAAAE,UAAAS,UAAA,WAGMR,KAAKS,aAAoC,EAArBT,KAAKU,eACvBV,KAAKW,YACPX,KAAKY,qBACLZ,KAAKM,mBAAmBC,iBAK9BV,EAAAE,UAAAc,UAAA,WAGE,OAAIb,KAAKS,aAAeT,KAAKc,eACpBC,UAEAf,KAAKgB,OAAYhB,KAAKgB,OAAM,KAAO,SAI9CnB,EAAAE,UAAAkB,kBAAA,WACE,OAAOjB,KAAKkB,iBAGdrB,EAAAE,UAAAoB,qBAAA,eAEMC,EAAsBpB,KAAKiB,oBAAsB,GACrD,OAAOI,KAAKC,IAAIF,IAGlBvB,EAAAE,UAAAwB,WAAA,WACE,OAAOvB,KAAKwB,OAASC,EAAYrC,UAGnCS,EAAAE,UAAA2B,SAAA,WACE,OAAO1B,KAAKwB,OAASC,EAAYpC,QAGnCQ,EAAAE,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,KAAA,CAAC,+BAiBNyI,EAAAA,MAAKzI,KAAA,CAAC,mCAiBNyI,EAAAA,MAAKzI,KAAA,CAAC,oCAgBNyI,EAAAA,MAAKzI,KAAA,CAAC,qBAyCTyH,GAvCE,SAAAA,EAAoBW,EACAC,EACAT,GAFA1K,KAAAkL,kBAAAA,EACAlL,KAAAmL,aAAAA,EACAnL,KAAA0K,gBAAAA,EAlGZ1K,KAAAkJ,SAA6B,IAAIiB,EA8FhBnK,KAAAsD,MAAuC,cCvG5DkI,EAA0B,CAC9B3L,EACA0K,GAGIkB,EAA2C,CAC/C5L,GAGF6L,uBAACC,EAAAA,SAAQ7I,KAAA,CAAC,CACR8I,QAAS,CACPC,EAAAA,aACAC,EAAAA,qBACAC,EAAAA,yBACAC,EAAAA,cACAC,EAAAA,cAEFC,aAAc,CACZV,GAEFW,QAAS,CACPX,GAEFY,UAAW,CACTxE,EACAsC,GAEFmC,gBAAiB,CACfZ,OAKJC,GAxBA,SAAAA","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n 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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n 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);\r\n 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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Component, ViewChild, TemplateRef, ChangeDetectorRef, ChangeDetectionStrategy, ElementRef, DoCheck } from '@angular/core';\nimport { AnimationEvent } from '@angular/animations';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { Observable, Subject } from 'rxjs';\n\nexport enum LoadingType {\n Circular = 'circular',\n Linear = 'linear',\n}\n\nexport enum LoadingMode {\n Determinate = 'determinate',\n Indeterminate = 'indeterminate',\n}\n\nexport enum LoadingStrategy {\n Overlay = 'overlay',\n Replace = 'replace',\n}\n\nexport enum LoadingStyle {\n FullScreen = 'fullscreen',\n Overlay = 'overlay',\n None = 'none',\n}\n\nimport { tdFadeInOutAnimation } from '@covalent/core/common';\n\nexport const TD_CIRCLE_DIAMETER: number = 100;\n\n@Component({\n selector: 'td-loading',\n styleUrls: ['./loading.component.scss' ],\n templateUrl: './loading.component.html',\n animations: [\n tdFadeInOutAnimation,\n ],\n})\nexport class TdLoadingComponent implements DoCheck {\n\n private _animationIn: Subject<any> = new Subject<any>();\n private _animationOut: Subject<any> = new Subject<any>();\n private _mode: LoadingMode = LoadingMode.Indeterminate;\n private _defaultMode: LoadingMode = LoadingMode.Indeterminate;\n private _value: number = 0;\n private _circleDiameter: number = TD_CIRCLE_DIAMETER;\n\n /**\n * Flag for animation\n */\n animation: boolean = false;\n\n /**\n * Content injected into loading component.\n */\n content: TemplatePortal<any>;\n\n /**\n * Sets mode of [TdLoadingComponent] to LoadingMode.Determinate or LoadingMode.Indeterminate\n */\n set mode(mode: LoadingMode) {\n this._defaultMode = mode;\n }\n get mode(): LoadingMode {\n return this._mode;\n }\n\n /**\n * Sets value of [TdLoadingComponent] if mode is 'LoadingMode.Determinate'\n */\n set value(value: number) {\n this._value = value;\n // Check for changes for `OnPush` change detection\n this._changeDetectorRef.markForCheck();\n }\n get value(): number {\n return this._value;\n }\n\n style: LoadingStyle = LoadingStyle.None;\n\n /**\n * height: number\n * Sets height of [TdLoadingComponent].\n */\n height: number;\n\n /**\n * type: LoadingType\n * Sets type of [TdLoadingComponent] rendered.\n */\n type: LoadingType = LoadingType.Circular;\n\n /**\n * color: primary' | 'accent' | 'warn'\n * Sets theme color of [TdLoadingComponent] rendered.\n */\n color: 'primary' | 'accent' | 'warn' = 'primary';\n\n constructor(private _elementRef: ElementRef,\n private _changeDetectorRef: ChangeDetectorRef) {}\n\n ngDoCheck(): void {\n // When overlay is used and the host width has a value greater than 1px\n // set the circle diameter when possible incase the loading component was rendered in a hidden state\n if (this.isOverlay() && this._hostHeight() > 1) {\n if (this.animation) {\n this._setCircleDiameter();\n this._changeDetectorRef.markForCheck();\n }\n }\n }\n\n getHeight(): string {\n // Ignore height if style is `overlay` or `fullscreen`.\n // Add height if child elements have a height and style is `none`, else return default height.\n if (this.isOverlay() || this.isFullScreen()) {\n return undefined;\n } else {\n return this.height ? `${this.height}px` : '150px';\n }\n }\n\n getCircleDiameter(): number {\n return this._circleDiameter;\n }\n\n getCircleStrokeWidth(): number {\n // we calculate the stroke width by setting it as 10% of its diameter\n let strokeWidth: number = this.getCircleDiameter() / 10;\n return Math.abs(strokeWidth);\n }\n\n isCircular(): boolean {\n return this.type === LoadingType.Circular;\n }\n\n isLinear(): boolean {\n return this.type === LoadingType.Linear;\n }\n\n isFullScreen(): boolean {\n return this.style === LoadingStyle.FullScreen;\n }\n\n isOverlay(): boolean {\n return this.style === LoadingStyle.Overlay;\n }\n\n animationComplete(event: AnimationEvent): void {\n // Check to see if its \"in\" or \"out\" animation to execute the proper callback\n if (!event.fromState) {\n this.inAnimationCompleted();\n } else {\n this.outAnimationCompleted();\n }\n }\n\n inAnimationCompleted(): void {\n this._animationIn.next(undefined);\n }\n\n outAnimationCompleted(): void {\n /* little hack to reset the loader value and animation before removing it from DOM\n * else, the loader will appear with prev value when its registered again\n * and will do an animation going prev value to 0.\n */\n this.value = 0;\n // Check for changes for `OnPush` change detection\n this._changeDetectorRef.markForCheck();\n this._animationOut.next(undefined);\n }\n\n /**\n * Starts in animation and returns an observable for completition event.\n */\n startInAnimation(): Observable<any> {\n /* need to switch back to the selected mode, so we have saved it in another variable\n * and then recover it. (issue with protractor)\n */\n this._mode = this._defaultMode;\n // Set values before the animations starts\n this._setCircleDiameter();\n // Check for changes for `OnPush` change detection\n this.animation = true;\n this._changeDetectorRef.markForCheck();\n return this._animationIn.asObservable();\n }\n\n /**\n * Starts out animation and returns an observable for completition event.\n */\n startOutAnimation(): Observable<any> {\n this.animation = false;\n /* need to switch back and forth from determinate/indeterminate so the setInterval()\n * inside mat-progress-spinner stops and protractor doesnt timeout waiting to sync.\n */\n this._mode = LoadingMode.Determinate;\n // Check for changes for `OnPush` change detection\n this._changeDetectorRef.markForCheck();\n return this._animationOut.asObservable();\n }\n\n /**\n * Calculate the proper diameter for the circle and set it\n */\n private _setCircleDiameter(): void {\n // we set a default diameter of 100 since this is the default in material\n let diameter: number = TD_CIRCLE_DIAMETER;\n // if height is provided, then we take that as diameter\n if (this.height) {\n diameter = this.height;\n // else if its not provided, then we take the host height\n } else if (this.height === undefined) {\n diameter = this._hostHeight();\n }\n // if the diameter is over TD_CIRCLE_DIAMETER, we set TD_CIRCLE_DIAMETER\n if (!!diameter && diameter <= TD_CIRCLE_DIAMETER) {\n this._circleDiameter = Math.floor(diameter);\n } else {\n this._circleDiameter = TD_CIRCLE_DIAMETER;\n }\n }\n\n /**\n * Returns the host height of the loading component\n */\n private _hostHeight(): number {\n if (<HTMLElement>this._elementRef.nativeElement) {\n return (<HTMLElement>this._elementRef.nativeElement).getBoundingClientRect().height;\n }\n return 0;\n }\n}\n","import { Injectable, ComponentFactoryResolver, ChangeDetectorRef, Provider, SkipSelf, Optional, EmbeddedViewRef } from '@angular/core';\nimport { Injector, ComponentRef, ViewContainerRef, TemplateRef } from '@angular/core';\nimport { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';\nimport { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\n\nimport { Observable, Subject, Subscription } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\nimport { TdLoadingContext } from '../directives/loading.directive';\nimport { TdLoadingComponent, LoadingStyle } from '../loading.component';\nimport { ITdLoadingConfig } from './loading.service';\n\nexport interface IInternalLoadingOptions extends ITdLoadingConfig {\n height?: number;\n style?: LoadingStyle;\n}\n\nexport interface ILoadingRef {\n observable: Observable<any>;\n componentRef: ComponentRef<any>;\n subject?: Subject<any>;\n times?: number;\n}\n\n/**\n * NOTE: @internal usage only.\n */\n@Injectable()\nexport class TdLoadingFactory {\n\n constructor(private _componentFactoryResolver: ComponentFactoryResolver,\n private _overlay: Overlay,\n private _injector: Injector) {\n }\n\n /**\n * Uses material `Overlay` services to create a DOM element and attach the loading component\n * into it. Leveraging the state and configuration from it.\n *\n * Saves a reference in context to be called when registering/resolving the loading element.\n */\n public createFullScreenComponent(options: ITdLoadingConfig): ILoadingRef {\n (<IInternalLoadingOptions>options).height = undefined;\n (<IInternalLoadingOptions>options).style = LoadingStyle.FullScreen;\n let loadingRef: ILoadingRef = this._initializeContext();\n let loading: boolean = false;\n let overlayRef: OverlayRef;\n loadingRef.observable.pipe(\n distinctUntilChanged(),\n ).subscribe((registered: number) => {\n if (registered > 0 && !loading) {\n loading = true;\n overlayRef = this._createOverlay();\n loadingRef.componentRef = overlayRef.attach(new ComponentPortal(TdLoadingComponent));\n this._mapOptions(options, loadingRef.componentRef.instance);\n loadingRef.componentRef.instance.startInAnimation();\n loadingRef.componentRef.changeDetectorRef.detectChanges();\n } else if (registered <= 0 && loading) {\n loading = false;\n let subs: Subscription = loadingRef.componentRef.instance.startOutAnimation().subscribe(() => {\n subs.unsubscribe();\n loadingRef.componentRef.destroy();\n overlayRef.detach();\n overlayRef.dispose();\n });\n }\n });\n return loadingRef;\n }\n\n /**\n * Creates a loading component dynamically and attaches it into the given viewContainerRef.\n * Leverages TemplatePortals from material to inject the template inside of it so it fits\n * perfectly when overlaying it.\n *\n * Saves a reference in context to be called when registering/resolving the loading element.\n */\n public createOverlayComponent(options: ITdLoadingConfig, viewContainerRef: ViewContainerRef,\n templateRef: TemplateRef<Object>): ILoadingRef {\n (<IInternalLoadingOptions>options).height = undefined;\n (<IInternalLoadingOptions>options).style = LoadingStyle.Overlay;\n let loadingRef: ILoadingRef = this._createComponent(options);\n let loading: boolean = false;\n loadingRef.componentRef.instance.content = new TemplatePortal(templateRef, viewContainerRef);\n viewContainerRef.clear();\n viewContainerRef.insert(loadingRef.componentRef.hostView, 0);\n loadingRef.observable.pipe(\n distinctUntilChanged(),\n ).subscribe((registered: number) => {\n if (registered > 0 && !loading) {\n loading = true;\n loadingRef.componentRef.instance.startInAnimation();\n } else if (registered <= 0 && loading) {\n loading = false;\n loadingRef.componentRef.instance.startOutAnimation();\n }\n });\n return loadingRef;\n }\n\n /**\n * Creates a loading component dynamically and attaches it into the given viewContainerRef.\n * Replaces the template with the loading component depending if it was registered or resolved.\n *\n * Saves a reference in context to be called when registering/resolving the loading element.\n */\n public createReplaceComponent(options: ITdLoadingConfig, viewContainerRef: ViewContainerRef,\n templateRef: TemplateRef<Object>, context: TdLoadingContext): ILoadingRef {\n let nativeElement: HTMLElement = <HTMLElement>templateRef.elementRef.nativeElement;\n (<IInternalLoadingOptions>options).height = nativeElement.nextElementSibling ?\n nativeElement.nextElementSibling.scrollHeight : undefined;\n (<IInternalLoadingOptions>options).style = LoadingStyle.None;\n let loadingRef: ILoadingRef = this._createComponent(options);\n let loading: boolean = false;\n // passing context so when the template is attached, we can keep the reference of the variables\n let contentRef: EmbeddedViewRef<Object> = viewContainerRef.createEmbeddedView(templateRef, context);\n loadingRef.observable.pipe(\n distinctUntilChanged(),\n ).subscribe((registered: number) => {\n if (registered > 0 && !loading) {\n loading = true;\n // detach the content and attach the loader if loader is there\n let index: number = viewContainerRef.indexOf(loadingRef.componentRef.hostView);\n if (index < 0) {\n viewContainerRef.detach(viewContainerRef.indexOf(contentRef));\n viewContainerRef.insert(loadingRef.componentRef.hostView, 0);\n }\n loadingRef.componentRef.instance.startInAnimation();\n } else if (registered <= 0 && loading) {\n loading = false;\n let subs: Subscription = loadingRef.componentRef.instance.startOutAnimation().subscribe(() => {\n subs.unsubscribe();\n // detach loader and attach the content if content is there\n let index: number = viewContainerRef.indexOf(contentRef);\n if (index < 0) {\n viewContainerRef.detach(viewContainerRef.indexOf(loadingRef.componentRef.hostView));\n viewContainerRef.insert(contentRef, 0);\n }\n /**\n * Need to call \"markForCheck\" and \"detectChanges\" on attached template, so its detected by parent component when attached\n * with \"OnPush\" change detection\n */\n contentRef.detectChanges();\n contentRef.markForCheck();\n });\n }\n });\n return loadingRef;\n }\n\n /**\n * Creates a fullscreen overlay for the loading usage.\n */\n private _createOverlay(): OverlayRef {\n let state: OverlayConfig = new OverlayConfig();\n state.hasBackdrop = false;\n state.positionStrategy = this._overlay.position().global().centerHorizontally().centerVertically();\n return this._overlay.create(state);\n }\n\n /**\n * Creates a generic component dynamically waiting to be attached to a viewContainerRef.\n */\n private _createComponent(options: IInternalLoadingOptions): ILoadingRef {\n let compRef: ILoadingRef = this._initializeContext();\n compRef.componentRef = this._componentFactoryResolver\n .resolveComponentFactory(TdLoadingComponent).create(this._injector);\n this._mapOptions(options, compRef.componentRef.instance);\n return compRef;\n }\n\n /**\n * Initialize context for loading component.\n */\n private _initializeContext(): ILoadingRef {\n let subject: Subject<any> = new Subject<any>();\n return {\n observable: subject.asObservable(),\n subject: subject,\n componentRef: undefined,\n times: 0,\n };\n }\n\n /**\n * Maps configuration to the loading component instance.\n */\n private _mapOptions(options: IInternalLoadingOptions, instance: TdLoadingComponent): void {\n instance.style = options.style;\n if (options.type !== undefined) {\n instance.type = options.type;\n }\n if (options.height !== undefined) {\n instance.height = options.height;\n }\n if (options.mode !== undefined) {\n instance.mode = options.mode;\n }\n if (options.color !== undefined) {\n instance.color = options.color;\n }\n }\n}\n\nexport function LOADING_FACTORY_PROVIDER_FACTORY(\n parent: TdLoadingFactory, componentFactoryResolver: ComponentFactoryResolver, overlay: Overlay, injector: Injector): TdLoadingFactory {\n return parent || new TdLoadingFactory(componentFactoryResolver, overlay, injector);\n}\n\nexport const LOADING_FACTORY_PROVIDER: Provider = {\n // If there is already a service available, use that. Otherwise, provide a new one.\n provide: TdLoadingFactory,\n deps: [[new Optional(), new SkipSelf(), TdLoadingFactory], ComponentFactoryResolver, Overlay, Injector],\n useFactory: LOADING_FACTORY_PROVIDER_FACTORY,\n};\n","import { Injectable, Provider, SkipSelf, Optional } from '@angular/core';\nimport { ViewContainerRef, TemplateRef } from '@angular/core';\nimport { Observable, Subject, Subscription } from 'rxjs';\n\nimport { TdLoadingContext } from '../directives/loading.directive';\nimport { TdLoadingComponent, LoadingMode, LoadingStrategy, LoadingType } from '../loading.component';\nimport { TdLoadingFactory, ILoadingRef } from './loading.factory';\n\nexport interface ITdLoadingConfig {\n name: string;\n type?: LoadingType;\n mode?: LoadingMode;\n color?: 'primary' | 'accent' | 'warn';\n}\n\nexport class TdLoadingConfig implements ITdLoadingConfig {\n name: string;\n type?: LoadingType;\n mode?: LoadingMode;\n color?: 'primary' | 'accent' | 'warn';\n\n constructor(config: ITdLoadingConfig) {\n this.name = config.name;\n if (!this.name) {\n throw Error('Name is required for [TdLoading] configuration.');\n }\n this.mode = config.mode ? config.mode : LoadingMode.Indeterminate;\n this.type = config.type ? config.type : LoadingType.Circular;\n this.color = config.color ? config.color : 'primary';\n }\n}\n\nexport interface ITdLoadingDirectiveConfig extends ITdLoadingConfig {\n strategy?: LoadingStrategy;\n}\n\nexport class TdLoadingDirectiveConfig extends TdLoadingConfig implements ITdLoadingDirectiveConfig {\n name: string;\n type: LoadingType;\n mode: LoadingMode;\n strategy: LoadingStrategy;\n\n constructor(config: ITdLoadingDirectiveConfig) {\n super(config);\n this.strategy = config.strategy ? config.strategy : LoadingStrategy.Replace;\n }\n}\n\n@Injectable()\nexport class TdLoadingService {\n\n private _context: {[key: string]: ILoadingRef} = {};\n private _timeouts: {[key: string]: any} = {};\n\n constructor(private _loadingFactory: TdLoadingFactory) {\n this.create({\n name: 'td-loading-main',\n });\n }\n\n /**\n * params:\n * - config: ILoadingDirectiveConfig\n * - viewContainerRef: ViewContainerRef\n * - templateRef: TemplateRef<Object>\n *\n * Creates an replace loading mask and attaches it to the viewContainerRef.\n * Replaces the templateRef with the mask when a request is registered on it.\n *\n * NOTE: @internal usage only.\n */\n createComponent(config: ITdLoadingDirectiveConfig, viewContainerRef: ViewContainerRef,\n templateRef: TemplateRef<Object>, context: TdLoadingContext): ILoadingRef {\n let directiveConfig: TdLoadingDirectiveConfig = new TdLoadingDirectiveConfig(config);\n if (this._context[directiveConfig.name]) {\n throw Error(`Name duplication: [TdLoading] directive has a name conflict with ${directiveConfig.name}.`);\n }\n if (directiveConfig.strategy === LoadingStrategy.Overlay) {\n this._context[directiveConfig.name] = this._loadingFactory.createOverlayComponent(directiveConfig, viewContainerRef, templateRef);\n } else {\n this._context[directiveConfig.name] = this._loadingFactory.createReplaceComponent(directiveConfig, viewContainerRef, templateRef, context);\n }\n return this._context[directiveConfig.name];\n }\n\n /**\n * params:\n * - config: ITdLoadingConfig\n *\n * Creates a fullscreen loading mask and attaches it to the DOM with the given configuration.\n * Only displayed when the mask has a request registered on it.\n */\n public create(config: ITdLoadingConfig): void {\n let fullscreenConfig: TdLoadingConfig = new TdLoadingConfig(config);\n this.removeComponent(fullscreenConfig.name);\n this._context[fullscreenConfig.name] = this._loadingFactory.createFullScreenComponent(fullscreenConfig);\n }\n\n /**\n * params:\n * - name: string\n *\n * Removes `loading` component from service context.\n */\n public removeComponent(name: string): void {\n if (this._context[name]) {\n this._context[name].subject.unsubscribe();\n if (this._context[name].componentRef) {\n this._context[name].componentRef.destroy();\n }\n this._context[name] = undefined;\n delete this._context[name];\n }\n }\n\n /**\n * params:\n * - name: string\n * - registers?: number\n * returns: true if successful\n *\n * Resolves a request for the loading mask referenced by the name parameter.\n * Can optionally pass registers argument to set a number of register calls.\n *\n * If no paramemeters are used, then default main mask will be used.\n *\n * e.g. loadingService.register()\n */\n public register(name: string = 'td-loading-main', registers: number = 1): boolean {\n // try registering into the service if the loading component has been instanciated or if it exists.\n if (this._context[name]) {\n registers = registers < 1 ? 1 : registers;\n this._context[name].times += registers;\n this._context[name].subject.next(this._context[name].times);\n return true;\n } else {\n // if it doesnt exist, set a timeout so its registered after change detection happens\n // this in case \"register\" occured on the `ngOnInit` lifehook cycle.\n if (!this._timeouts[name]) {\n this._timeouts[name] = setTimeout(() => {\n this.register(name, registers);\n });\n } else {\n // if it timeout occured and still doesnt exist, it means the tiemout wasnt needed so we clear it.\n this._clearTimeout(name);\n }\n }\n return false;\n }\n\n /**\n * params:\n * - name: string\n * - resolves?: number\n * returns: true if successful\n *\n * Resolves a request for the loading mask referenced by the name parameter.\n * Can optionally pass resolves argument to set a number of resolve calls.\n *\n * If no paramemeters are used, then default main mask will be used.\n *\n * e.g. loadingService.resolve()\n */\n public resolve(name: string = 'td-loading-main', resolves: number = 1): boolean {\n // clear timeout if the loading component is \"resolved\" before its \"registered\"\n this._clearTimeout(name);\n if (this._context[name]) {\n resolves = resolves < 1 ? 1 : resolves;\n if (this._context[name].times > 0) {\n let times: number = this._context[name].times;\n times -= resolves;\n this._context[name].times = times < 0 ? 0 : times;\n }\n this._context[name].subject.next(this._context[name].times);\n return true;\n }\n return false;\n }\n\n /**\n * params:\n * - name: string\n * returns: true if successful\n *\n * Resolves all request for the loading mask referenced by the name parameter.\n *\n * If no paramemeters are used, then default main mask will be used.\n *\n * e.g. loadingService.resolveAll()\n */\n public resolveAll(name: string = 'td-loading-main'): boolean {\n // clear timeout if the loading component is \"resolved\" before its \"registered\"\n this._clearTimeout(name);\n if (this._context[name]) {\n this._context[name].times = 0;\n this._context[name].subject.next(this._context[name].times);\n return true;\n }\n return false;\n }\n\n /**\n * params:\n * - name: string\n * - value: number\n * returns: true if successful\n *\n * Set value on a loading mask referenced by the name parameter.\n * Usage only available if its mode is 'determinate' and if loading is showing.\n */\n public setValue(name: string, value: number): boolean {\n if (this._context[name]) {\n let instance: TdLoadingComponent = this._context[name].componentRef.instance;\n if (instance.mode === LoadingMode.Determinate && instance.animation) {\n instance.value = value;\n return true;\n }\n }\n return false;\n }\n\n /**\n * Clears timeout linked to the name.\n * @param name Name of the loading component to be cleared\n */\n private _clearTimeout(name: string): void {\n clearTimeout(this._timeouts[name]);\n delete this._timeouts[name];\n }\n}\n\nexport function LOADING_PROVIDER_FACTORY(\n parent: TdLoadingService, loadingFactory: TdLoadingFactory): TdLoadingService {\n return parent || new TdLoadingService(loadingFactory);\n}\n\nexport const LOADING_PROVIDER: Provider = {\n // If there is already a service available, use that. Otherwise, provide a new one.\n provide: TdLoadingService,\n deps: [[new Optional(), new SkipSelf(), TdLoadingService], TdLoadingFactory],\n useFactory: LOADING_PROVIDER_FACTORY,\n};\n","import { Directive, Input, OnInit, OnDestroy } from '@angular/core';\nimport { ViewContainerRef, TemplateRef } from '@angular/core';\n\nimport { LoadingType, LoadingMode, LoadingStrategy, TdLoadingComponent } from '../loading.component';\nimport { TdLoadingService } from '../services/loading.service';\nimport { ILoadingRef } from '../services/loading.factory';\n\n/**\n * Context class for variable reference\n */\nexport class TdLoadingContext {\n public $implicit: any = undefined;\n public tdLoading: any = undefined;\n}\n\n// Constant for generation of the id for the next component\nlet TD_LOADING_NEXT_ID: number = 0;\n\n@Directive({\n selector: '[tdLoading]',\n})\nexport class TdLoadingDirective implements OnInit, OnDestroy {\n\n private _context: TdLoadingContext = new TdLoadingContext();\n private _type: LoadingType;\n private _mode: LoadingMode;\n private _strategy: LoadingStrategy;\n private _name: string;\n private _loadingRef: ILoadingRef;\n\n /**\n * tdLoading: string\n * Name reference of the loading mask, used to register/resolve requests to the mask.\n */\n @Input('tdLoading')\n set name(name: string) {\n if (!this._name) {\n if (name) {\n this._name = name;\n }\n }\n }\n\n /**\n * tdLoadingUntil?: any\n * If its null, undefined or false it will be used to register requests to the mask.\n * Else if its any value that can be resolved as true, it will resolve the mask.\n * [name] is optional when using [until], but can still be used to register/resolve it manually.\n */\n @Input('tdLoadingUntil')\n set until(until: any) {\n if (!this._name) {\n this._name = 'td-loading-until-' + TD_LOADING_NEXT_ID++;\n }\n this._context.$implicit = this._context.tdLoading = until;\n if (!until) {\n this._loadingService.register(this._name);\n } else {\n this._loadingService.resolveAll(this._name);\n }\n }\n\n /**\n * tdLoadingType?: LoadingType or ['linear' | 'circular']\n * Sets the type of loading mask depending on value.\n * Defaults to [LoadingType.Circular | 'circular'].\n */\n @Input('tdLoadingType')\n set type(type: LoadingType) {\n switch (type) {\n case LoadingType.Linear:\n this._type = LoadingType.Linear;\n break;\n default:\n this._type = LoadingType.Circular;\n break;\n }\n }\n\n /**\n * tdLoadingMode?: LoadingMode or ['determinate' | 'indeterminate']\n * Sets the mode of loading mask depending on value.\n * Defaults to [LoadingMode.Indeterminate | 'indeterminate'].\n */\n @Input('tdLoadingMode')\n set mode(mode: LoadingMode) {\n switch (mode) {\n case LoadingMode.Determinate:\n this._mode = LoadingMode.Determinate;\n break;\n default:\n this._mode = LoadingMode.Indeterminate;\n break;\n }\n }\n\n /**\n * tdLoadingStrategy?: LoadingStrategy or ['replace' | 'overlay']\n * Sets the strategy of loading mask depending on value.\n * Defaults to [LoadingMode.Replace | 'replace'].\n */\n @Input('tdLoadingStrategy')\n set strategy(stategy: LoadingStrategy) {\n switch (stategy) {\n case LoadingStrategy.Overlay:\n this._strategy = LoadingStrategy.Overlay;\n break;\n default:\n this._strategy = LoadingStrategy.Replace;\n break;\n }\n }\n\n /**\n * tdLoadingColor?: \"primary\" | \"accent\" | \"warn\"\n * Sets the theme color of the loading component. Defaults to \"primary\"\n */\n @Input('tdLoadingColor') color: 'primary' | 'accent' | 'warn' = 'primary';\n\n constructor(private _viewContainerRef: ViewContainerRef,\n private _templateRef: TemplateRef<TdLoadingContext>,\n private _loadingService: TdLoadingService) {}\n\n /**\n * Registers component in the DOM, so it will be available when calling resolve/register.\n */\n ngOnInit(): void {\n this._registerComponent();\n }\n\n /**\n * Remove component when directive is destroyed.\n */\n ngOnDestroy(): void {\n this._loadingService.removeComponent(this._name);\n this._loadingRef = undefined;\n }\n\n /**\n * Creates [TdLoadingComponent] and attaches it to this directive's [ViewContainerRef].\n * Passes this directive's [TemplateRef] to modify DOM depending on loading `strategy`.\n */\n private _registerComponent(): void {\n if (!this._name) {\n throw new Error('Name is needed to register loading directive');\n }\n // Check if `TdLoadingComponent` has been created before trying to add one again.\n // There is a weird edge case when using `[routerLinkActive]` that calls the `ngOnInit` twice in a row\n if (!this._loadingRef) {\n this._loadingRef = this._loadingService.createComponent({\n name: this._name,\n type: this._type,\n mode: this._mode,\n color: this.color,\n strategy: this._strategy,\n }, this._viewContainerRef, this._templateRef, this._context);\n }\n }\n}\n","import { Type } from '@angular/core';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { TdLoadingService, LOADING_PROVIDER } from './services/loading.service';\nimport { TdLoadingFactory, LOADING_FACTORY_PROVIDER } from './services/loading.factory';\nimport { TdLoadingDirective } from './directives/loading.directive';\nimport { TdLoadingComponent } from './loading.component';\n\nconst TD_LOADING: Type<any>[] = [\n TdLoadingComponent,\n TdLoadingDirective,\n];\n\nconst TD_LOADING_ENTRY_COMPONENTS: Type<any>[] = [\n TdLoadingComponent,\n];\n\n@NgModule({\n imports: [\n CommonModule,\n MatProgressBarModule,\n MatProgressSpinnerModule,\n OverlayModule,\n PortalModule,\n ],\n declarations: [\n TD_LOADING,\n ],\n exports: [\n TD_LOADING,\n ],\n providers: [\n LOADING_FACTORY_PROVIDER,\n LOADING_PROVIDER,\n ],\n entryComponents: [\n TD_LOADING_ENTRY_COMPONENTS,\n ],\n})\nexport class CovalentLoadingModule {\n\n}\n"]}
@@ -15,7 +15,7 @@
15
15
  { type: core.Component, args: [{
16
16
  selector: 'td-menu',
17
17
  template: "<ng-content select=\"[td-menu-header]\"></ng-content>\n<mat-divider></mat-divider>\n<div class=\"td-menu-content\">\n <ng-content></ng-content>\n</div>\n<mat-divider></mat-divider>\n<ng-content select=\"[td-menu-footer]\"></ng-content>",
18
- styles: [":host{margin-top:-8px;margin-bottom:-8px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host ::ng-deep [td-menu-header]{padding:8px;text-align:center}:host ::ng-deep mat-list a[mat-list-item].mat-2-line,:host ::ng-deep mat-list mat-list-item.mat-2-line,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line{height:auto}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content{height:auto;padding:8px}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text{padding-right:0}[dir=rtl] :host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text{padding-left:0;padding-right:16px}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine]{margin-top:4px}.td-menu-content{max-height:calc(50vh);overflow-y:auto}"]
18
+ styles: [":host{margin-top:-8px;margin-bottom:-8px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}:host ::ng-deep [td-menu-header]{padding:8px;text-align:center}:host ::ng-deep mat-list a[mat-list-item].mat-2-line,:host ::ng-deep mat-list mat-list-item.mat-2-line,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line{height:auto}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content{height:auto;padding:8px}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text{padding-right:0}[dir=rtl] :host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text{padding-left:0;padding-right:16px}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine]{margin-top:4px}.td-menu-content{max-height:calc(50vh);overflow-y:auto}"]
19
19
  }] }
20
20
  ];
21
21
  return TdMenuComponent;
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/material/menu"),require("@angular/material/divider"),require("@angular/core")):"function"==typeof define&&define.amd?define("@covalent/core/menu",["exports","@angular/common","@angular/material/menu","@angular/material/divider","@angular/core"],e):e((t.covalent=t.covalent||{},t.covalent.core=t.covalent.core||{},t.covalent.core.menu={}),t.ng.common,t.ng.material.menu,t.ng.material.divider,t.ng.core)}(this,function(t,e,i,n,m){"use strict";var a=(l.decorators=[{type:m.Component,args:[{selector:"td-menu",template:'<ng-content select="[td-menu-header]"></ng-content>\n<mat-divider></mat-divider>\n<div class="td-menu-content">\n <ng-content></ng-content>\n</div>\n<mat-divider></mat-divider>\n<ng-content select="[td-menu-footer]"></ng-content>',styles:[":host{margin-top:-8px;margin-bottom:-8px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host ::ng-deep [td-menu-header]{padding:8px;text-align:center}:host ::ng-deep mat-list a[mat-list-item].mat-2-line,:host ::ng-deep mat-list mat-list-item.mat-2-line,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line{height:auto}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content{height:auto;padding:8px}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text{padding-right:0}[dir=rtl] :host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text{padding-left:0;padding-right:16px}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine]{margin-top:4px}.td-menu-content{max-height:calc(50vh);overflow-y:auto}"]}]}],l);function l(){}var s=[a],o=(d.decorators=[{type:m.NgModule,args:[{imports:[e.CommonModule,i.MatMenuModule,n.MatDividerModule],declarations:[s],exports:[s]}]}],d);function d(){}t.CovalentMenuModule=o,t.TdMenuComponent=a,Object.defineProperty(t,"__esModule",{value:!0})});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/material/menu"),require("@angular/material/divider"),require("@angular/core")):"function"==typeof define&&define.amd?define("@covalent/core/menu",["exports","@angular/common","@angular/material/menu","@angular/material/divider","@angular/core"],e):e((t.covalent=t.covalent||{},t.covalent.core=t.covalent.core||{},t.covalent.core.menu={}),t.ng.common,t.ng.material.menu,t.ng.material.divider,t.ng.core)}(this,function(t,e,i,n,m){"use strict";var a=(l.decorators=[{type:m.Component,args:[{selector:"td-menu",template:'<ng-content select="[td-menu-header]"></ng-content>\n<mat-divider></mat-divider>\n<div class="td-menu-content">\n <ng-content></ng-content>\n</div>\n<mat-divider></mat-divider>\n<ng-content select="[td-menu-footer]"></ng-content>',styles:[":host{margin-top:-8px;margin-bottom:-8px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}:host ::ng-deep [td-menu-header]{padding:8px;text-align:center}:host ::ng-deep mat-list a[mat-list-item].mat-2-line,:host ::ng-deep mat-list mat-list-item.mat-2-line,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line{height:auto}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content{height:auto;padding:8px}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text{padding-right:0}[dir=rtl] :host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content .mat-list-text,[dir=rtl] :host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content .mat-list-text{padding-left:0;padding-right:16px}:host ::ng-deep mat-list a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-list[dense] mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list[dense] a[mat-list-item].mat-2-line .mat-list-item-content [matLine]+[matLine],:host ::ng-deep mat-nav-list[dense] mat-list-item.mat-2-line .mat-list-item-content [matLine]+[matLine]{margin-top:4px}.td-menu-content{max-height:calc(50vh);overflow-y:auto}"]}]}],l);function l(){}var s=[a],o=(d.decorators=[{type:m.NgModule,args:[{imports:[e.CommonModule,i.MatMenuModule,n.MatDividerModule],declarations:[s],exports:[s]}]}],d);function d(){}t.CovalentMenuModule=o,t.TdMenuComponent=a,Object.defineProperty(t,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=covalent-core-menu.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ng://@covalent/core/menu/menu.component.ts","ng://@covalent/core/menu/menu.module.ts"],"names":["TdMenuComponent","Component","args","selector","template","TD_MENU","CovalentMenuModule","NgModule","imports","CommonModule","MatMenuModule","MatDividerModule","declarations","exports"],"mappings":"ojBAAA,IAAAA,uBAECC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,UACVC,SAAA,4gIAKFJ,GAPA,SAAAA,SCOMK,EAAuB,CAC3BL,GAGFM,uBAACC,EAAAA,SAAQL,KAAA,CAAC,CACRM,QAAS,CACPC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,kBAEFC,aAAc,CACZP,GAEFQ,QAAS,CACPR,OAKJC,GAfA,SAAAA","sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'td-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.scss'],\n})\nexport class TdMenuComponent {\n\n}\n","import { Type } from '@angular/core';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatDividerModule } from '@angular/material/divider';\n\nimport { TdMenuComponent } from './menu.component';\n\nconst TD_MENU: Type<any>[] = [\n TdMenuComponent,\n];\n\n@NgModule({\n imports: [\n CommonModule,\n MatMenuModule,\n MatDividerModule,\n ],\n declarations: [\n TD_MENU,\n ],\n exports: [\n TD_MENU,\n ],\n})\nexport class CovalentMenuModule {\n\n}\n"]}
1
+ {"version":3,"sources":["ng://@covalent/core/menu/menu.component.ts","ng://@covalent/core/menu/menu.module.ts"],"names":["TdMenuComponent","Component","args","selector","template","TD_MENU","CovalentMenuModule","NgModule","imports","CommonModule","MatMenuModule","MatDividerModule","declarations","exports"],"mappings":"ojBAAA,IAAAA,uBAECC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,UACVC,SAAA,unIAKFJ,GAPA,SAAAA,SCOMK,EAAuB,CAC3BL,GAGFM,uBAACC,EAAAA,SAAQL,KAAA,CAAC,CACRM,QAAS,CACPC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,kBAEFC,aAAc,CACZP,GAEFQ,QAAS,CACPR,OAKJC,GAfA,SAAAA","sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'td-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.scss'],\n})\nexport class TdMenuComponent {\n\n}\n","import { Type } from '@angular/core';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatDividerModule } from '@angular/material/divider';\n\nimport { TdMenuComponent } from './menu.component';\n\nconst TD_MENU: Type<any>[] = [\n TdMenuComponent,\n];\n\n@NgModule({\n imports: [\n CommonModule,\n MatMenuModule,\n MatDividerModule,\n ],\n declarations: [\n TD_MENU,\n ],\n exports: [\n TD_MENU,\n ],\n})\nexport class CovalentMenuModule {\n\n}\n"]}
@@ -295,7 +295,7 @@
295
295
  animations: [
296
296
  common$1.tdCollapseAnimation,
297
297
  ],
298
- styles: [":host{display:block}:host .td-message-wrapper{padding:8px 16px;min-height:52px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%;-ms-flex-pack:start;justify-content:flex-start}:host .td-message-wrapper .td-message-labels{-ms-flex:1;flex:1}.td-message-icon{margin-right:16px}::ng-deep [dir=rtl] .td-message-icon{margin-left:16px;margin-right:0}"]
298
+ styles: [":host{display:block}:host .td-message-wrapper{padding:8px 16px;min-height:52px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}:host .td-message-wrapper .td-message-labels{-webkit-box-flex:1;-ms-flex:1;flex:1}.td-message-icon{margin-right:16px}::ng-deep [dir=rtl] .td-message-icon{margin-left:16px;margin-right:0}"]
299
299
  }] }
300
300
  ];
301
301
  /** @nocollapse */
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/material/icon"),require("@angular/core"),require("@covalent/core/common")):"function"==typeof define&&define.amd?define("@covalent/core/message",["exports","@angular/common","@angular/material/icon","@angular/core","@covalent/core/common"],t):t((e.covalent=e.covalent||{},e.covalent.core=e.covalent.core||{},e.covalent.core.message={}),e.ng.common,e.ng.material.icon,e.ng.core,e.covalent.core.common)}(this,function(e,t,n,i,o){"use strict";var a=(r.decorators=[{type:i.Directive,args:[{selector:"[tdMessageContainer]"}]}],r.ctorParameters=function(){return[{type:i.ViewContainerRef}]},r);function r(e){this.viewContainer=e}var s=(Object.defineProperty(l.prototype,"collapsedAnimation",{get:function(){return{value:!this._opened,duration:100}},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hidden",{get:function(){return this._hidden?"none":undefined},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"color",{get:function(){return this._color},set:function(e){this._renderer.removeClass(this._elementRef.nativeElement,"mat-"+this._color),this._renderer.removeClass(this._elementRef.nativeElement,"bgc-"+this._color+"-100"),this._renderer.removeClass(this._elementRef.nativeElement,"tc-"+this._color+"-700"),"primary"===e||"accent"===e||"warn"===e?this._renderer.addClass(this._elementRef.nativeElement,"mat-"+e):(this._renderer.addClass(this._elementRef.nativeElement,"bgc-"+e+"-100"),this._renderer.addClass(this._elementRef.nativeElement,"tc-"+e+"-700")),this._color=e,this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"opened",{get:function(){return this._opened},set:function(e){this._initialized?e?this.open():this.close():this._opened=e},enumerable:!0,configurable:!0}),l.prototype.animationDoneListener=function(){this._opened||(this._hidden=!0,this._detach()),this._animating=!1,this._changeDetectorRef.markForCheck()},l.prototype.ngAfterViewInit=function(){var e=this;Promise.resolve(undefined).then(function(){e._opened&&e._attach(),e._initialized=!0})},l.prototype.open=function(){this._opened||this._animating||(this._opened=!0,this._attach(),this._startAnimationState())},l.prototype.close=function(){this._opened&&!this._animating&&(this._opened=!1,this._startAnimationState())},l.prototype.toggle=function(){this._opened?this.close():this.open()},l.prototype._startAnimationState=function(){this._animating=!0,this._hidden=!1,this._changeDetectorRef.markForCheck()},l.prototype._attach=function(){this._childElement.viewContainer.createEmbeddedView(this._template),this._changeDetectorRef.markForCheck()},l.prototype._detach=function(){this._childElement.viewContainer.clear(),this._changeDetectorRef.markForCheck()},l.decorators=[{type:i.Component,args:[{selector:"td-message",template:'<div tdMessageContainer></div>\n<ng-template>\n <div class="td-message-wrapper">\n <mat-icon class="td-message-icon">{{icon}}</mat-icon>\n <div class="td-message-labels">\n <div *ngIf="label" class="td-message-label">{{label}}</div>\n <div *ngIf="sublabel" class="td-message-sublabel">{{sublabel}}</div>\n </div>\n <ng-content select="[td-message-actions]"></ng-content>\n </div>\n</ng-template>',animations:[o.tdCollapseAnimation],styles:[":host{display:block}:host .td-message-wrapper{padding:8px 16px;min-height:52px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%;-ms-flex-pack:start;justify-content:flex-start}:host .td-message-wrapper .td-message-labels{-ms-flex:1;flex:1}.td-message-icon{margin-right:16px}::ng-deep [dir=rtl] .td-message-icon{margin-left:16px;margin-right:0}"]}]}],l.ctorParameters=function(){return[{type:i.Renderer2},{type:i.ChangeDetectorRef},{type:i.ElementRef}]},l.propDecorators={_childElement:[{type:i.ViewChild,args:[a]}],_template:[{type:i.ViewChild,args:[i.TemplateRef]}],collapsedAnimation:[{type:i.HostBinding,args:["@tdCollapse"]}],hidden:[{type:i.HostBinding,args:["style.display"]}],label:[{type:i.Input,args:["label"]}],sublabel:[{type:i.Input,args:["sublabel"]}],icon:[{type:i.Input,args:["icon"]}],color:[{type:i.Input,args:["color"]}],opened:[{type:i.Input,args:["opened"]}],animationDoneListener:[{type:i.HostListener,args:["@tdCollapse.done"]}]},l);function l(e,t,n){this._renderer=e,this._changeDetectorRef=t,this._elementRef=n,this._opened=!0,this._hidden=!1,this._animating=!1,this._initialized=!1,this.icon="info_outline",this._renderer.addClass(this._elementRef.nativeElement,"td-message")}var c=[s,a],d=(p.decorators=[{type:i.NgModule,args:[{imports:[t.CommonModule,n.MatIconModule],declarations:[c],exports:[c]}]}],p);function p(){}e.CovalentMessageModule=d,e.TdMessageContainerDirective=a,e.TdMessageComponent=s,Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/material/icon"),require("@angular/core"),require("@covalent/core/common")):"function"==typeof define&&define.amd?define("@covalent/core/message",["exports","@angular/common","@angular/material/icon","@angular/core","@covalent/core/common"],t):t((e.covalent=e.covalent||{},e.covalent.core=e.covalent.core||{},e.covalent.core.message={}),e.ng.common,e.ng.material.icon,e.ng.core,e.covalent.core.common)}(this,function(e,t,n,i,o){"use strict";var a=(r.decorators=[{type:i.Directive,args:[{selector:"[tdMessageContainer]"}]}],r.ctorParameters=function(){return[{type:i.ViewContainerRef}]},r);function r(e){this.viewContainer=e}var s=(Object.defineProperty(l.prototype,"collapsedAnimation",{get:function(){return{value:!this._opened,duration:100}},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hidden",{get:function(){return this._hidden?"none":undefined},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"color",{get:function(){return this._color},set:function(e){this._renderer.removeClass(this._elementRef.nativeElement,"mat-"+this._color),this._renderer.removeClass(this._elementRef.nativeElement,"bgc-"+this._color+"-100"),this._renderer.removeClass(this._elementRef.nativeElement,"tc-"+this._color+"-700"),"primary"===e||"accent"===e||"warn"===e?this._renderer.addClass(this._elementRef.nativeElement,"mat-"+e):(this._renderer.addClass(this._elementRef.nativeElement,"bgc-"+e+"-100"),this._renderer.addClass(this._elementRef.nativeElement,"tc-"+e+"-700")),this._color=e,this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"opened",{get:function(){return this._opened},set:function(e){this._initialized?e?this.open():this.close():this._opened=e},enumerable:!0,configurable:!0}),l.prototype.animationDoneListener=function(){this._opened||(this._hidden=!0,this._detach()),this._animating=!1,this._changeDetectorRef.markForCheck()},l.prototype.ngAfterViewInit=function(){var e=this;Promise.resolve(undefined).then(function(){e._opened&&e._attach(),e._initialized=!0})},l.prototype.open=function(){this._opened||this._animating||(this._opened=!0,this._attach(),this._startAnimationState())},l.prototype.close=function(){this._opened&&!this._animating&&(this._opened=!1,this._startAnimationState())},l.prototype.toggle=function(){this._opened?this.close():this.open()},l.prototype._startAnimationState=function(){this._animating=!0,this._hidden=!1,this._changeDetectorRef.markForCheck()},l.prototype._attach=function(){this._childElement.viewContainer.createEmbeddedView(this._template),this._changeDetectorRef.markForCheck()},l.prototype._detach=function(){this._childElement.viewContainer.clear(),this._changeDetectorRef.markForCheck()},l.decorators=[{type:i.Component,args:[{selector:"td-message",template:'<div tdMessageContainer></div>\n<ng-template>\n <div class="td-message-wrapper">\n <mat-icon class="td-message-icon">{{icon}}</mat-icon>\n <div class="td-message-labels">\n <div *ngIf="label" class="td-message-label">{{label}}</div>\n <div *ngIf="sublabel" class="td-message-sublabel">{{sublabel}}</div>\n </div>\n <ng-content select="[td-message-actions]"></ng-content>\n </div>\n</ng-template>',animations:[o.tdCollapseAnimation],styles:[":host{display:block}:host .td-message-wrapper{padding:8px 16px;min-height:52px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}:host .td-message-wrapper .td-message-labels{-webkit-box-flex:1;-ms-flex:1;flex:1}.td-message-icon{margin-right:16px}::ng-deep [dir=rtl] .td-message-icon{margin-left:16px;margin-right:0}"]}]}],l.ctorParameters=function(){return[{type:i.Renderer2},{type:i.ChangeDetectorRef},{type:i.ElementRef}]},l.propDecorators={_childElement:[{type:i.ViewChild,args:[a]}],_template:[{type:i.ViewChild,args:[i.TemplateRef]}],collapsedAnimation:[{type:i.HostBinding,args:["@tdCollapse"]}],hidden:[{type:i.HostBinding,args:["style.display"]}],label:[{type:i.Input,args:["label"]}],sublabel:[{type:i.Input,args:["sublabel"]}],icon:[{type:i.Input,args:["icon"]}],color:[{type:i.Input,args:["color"]}],opened:[{type:i.Input,args:["opened"]}],animationDoneListener:[{type:i.HostListener,args:["@tdCollapse.done"]}]},l);function l(e,t,n){this._renderer=e,this._changeDetectorRef=t,this._elementRef=n,this._opened=!0,this._hidden=!1,this._animating=!1,this._initialized=!1,this.icon="info_outline",this._renderer.addClass(this._elementRef.nativeElement,"td-message")}var c=[s,a],d=(p.decorators=[{type:i.NgModule,args:[{imports:[t.CommonModule,n.MatIconModule],declarations:[c],exports:[c]}]}],p);function p(){}e.CovalentMessageModule=d,e.TdMessageContainerDirective=a,e.TdMessageComponent=s,Object.defineProperty(e,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=covalent-core-message.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ng://@covalent/core/message/message.component.ts","ng://@covalent/core/message/message.module.ts"],"names":["TdMessageContainerDirective","Directive","args","selector","ViewContainerRef","viewContainer","this","Object","defineProperty","TdMessageComponent","prototype","value","_opened","duration","_hidden","undefined","_color","color","_renderer","removeClass","_elementRef","nativeElement","addClass","_changeDetectorRef","markForCheck","opened","_initialized","open","close","animationDoneListener","_detach","_animating","ngAfterViewInit","_this","Promise","resolve","then","_attach","_startAnimationState","toggle","_childElement","createEmbeddedView","_template","clear","Component","template","animations","tdCollapseAnimation","Renderer2","ChangeDetectorRef","ElementRef","ViewChild","TemplateRef","HostBinding","Input","HostListener","icon","TD_MESSAGE","CovalentMessageModule","NgModule","imports","CommonModule","MatIconModule","declarations","exports"],"mappings":"mjBAAA,IAAAA,uBAKCC,EAAAA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,EACAjB,KAAAc,YAAAA,EA9FZd,KAAAM,SAAmB,EACnBN,KAAAQ,SAAmB,EACnBR,KAAAyB,YAAsB,EACtBzB,KAAAoB,cAAwB,EAyCjBpB,KAAAkD,KAAe,eAmD5BlD,KAAKY,UAAUI,SAAShB,KAAKc,YAAYC,cAAe,kBC9GtDoC,EAA0B,CAC9BhD,EACAT,GAGF0D,uBAACC,EAAAA,SAAQzD,KAAA,CAAC,CACR0D,QAAS,CACPC,EAAAA,aACAC,EAAAA,eAEFC,aAAc,CACZN,GAEFO,QAAS,CACPP,OAKJC,GAdA,SAAAA","sourcesContent":["import { Component, Directive, Input, Renderer2, ElementRef, AfterViewInit, ViewContainerRef, TemplateRef, ViewChild,\n HostBinding, HostListener, ChangeDetectorRef } from '@angular/core';\n\nimport { tdCollapseAnimation } from '@covalent/core/common';\n\n@Directive({\n selector: '[tdMessageContainer]',\n})\nexport class TdMessageContainerDirective {\n constructor(public viewContainer: ViewContainerRef) { }\n}\n\n@Component({\n selector: 'td-message',\n templateUrl: './message.component.html',\n styleUrls: ['./message.component.scss'],\n animations: [\n tdCollapseAnimation,\n ],\n})\nexport class TdMessageComponent implements AfterViewInit {\n\n private _color: string;\n private _opened: boolean = true;\n private _hidden: boolean = false;\n private _animating: boolean = false;\n private _initialized: boolean = false;\n\n @ViewChild(TdMessageContainerDirective) _childElement: TdMessageContainerDirective;\n @ViewChild(TemplateRef) _template: TemplateRef<any>;\n\n /**\n * Binding host to tdCollapse animation\n */\n @HostBinding('@tdCollapse')\n get collapsedAnimation(): any {\n return { value: !this._opened, duration: 100 };\n }\n\n /**\n * Binding host to display style when hidden\n */\n @HostBinding('style.display')\n get hidden(): string {\n return this._hidden ? 'none' : undefined;\n }\n\n /**\n * label: string\n *\n * Sets the label of the message.\n */\n @Input('label') label: string;\n\n /**\n * sublabel?: string\n *\n * Sets the sublabel of the message.\n */\n @Input('sublabel') sublabel: string;\n\n /**\n * icon?: string\n *\n * The icon to be displayed before the title.\n * Defaults to `info_outline` icon\n */\n @Input('icon') icon: string = 'info_outline';\n\n /**\n * color?: primary | accent | warn\n *\n * Sets the color of the message.\n * Can also use any material color: purple | light-blue, etc.\n */\n @Input('color')\n set color(color: string) {\n this._renderer.removeClass(this._elementRef.nativeElement, 'mat-' + this._color);\n this._renderer.removeClass(this._elementRef.nativeElement, 'bgc-' + this._color + '-100');\n this._renderer.removeClass(this._elementRef.nativeElement, 'tc-' + this._color + '-700');\n if (color === 'primary' || color === 'accent' || color === 'warn') {\n this._renderer.addClass(this._elementRef.nativeElement, 'mat-' + color);\n } else {\n this._renderer.addClass(this._elementRef.nativeElement, 'bgc-' + color + '-100');\n this._renderer.addClass(this._elementRef.nativeElement, 'tc-' + color + '-700');\n }\n this._color = color;\n this._changeDetectorRef.markForCheck();\n }\n get color(): string {\n return this._color;\n }\n\n /**\n * opened?: boolean\n *\n * Shows or hiddes the message depending on its value.\n * Defaults to 'true'.\n */\n @Input('opened')\n set opened(opened: boolean) {\n if (this._initialized) {\n if (opened) {\n this.open();\n } else {\n this.close();\n }\n } else {\n this._opened = opened;\n }\n }\n get opened(): boolean {\n return this._opened;\n }\n\n constructor(private _renderer: Renderer2,\n private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef) {\n this._renderer.addClass(this._elementRef.nativeElement, 'td-message');\n }\n\n /**\n * Detach element when close animation is finished to set animating state to false\n * hidden state to true and detach element from DOM\n */\n @HostListener('@tdCollapse.done')\n animationDoneListener(): void {\n if (!this._opened) {\n this._hidden = true;\n this._detach();\n }\n this._animating = false;\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Initializes the component and attaches the content.\n */\n ngAfterViewInit(): void {\n Promise.resolve(undefined).then(() => {\n if (this._opened) {\n this._attach();\n }\n this._initialized = true;\n });\n }\n\n /**\n * Renders the message on screen\n * Validates if there is an animation currently and if its already opened\n */\n open(): void {\n if (!this._opened && !this._animating) {\n this._opened = true;\n this._attach();\n this._startAnimationState();\n }\n }\n\n /**\n * Removes the message content from screen.\n * Validates if there is an animation currently and if its already closed\n */\n close(): void {\n if (this._opened && !this._animating) {\n this._opened = false;\n this._startAnimationState();\n }\n }\n\n /**\n * Toggles between open and close depending on state.\n */\n toggle(): void {\n if (this._opened) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * Method to set the state before starting an animation\n */\n private _startAnimationState(): void {\n this._animating = true;\n this._hidden = false;\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Method to attach template to DOM\n */\n private _attach(): void {\n this._childElement.viewContainer.createEmbeddedView(this._template);\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Method to detach template from DOM\n */\n private _detach(): void {\n this._childElement.viewContainer.clear();\n this._changeDetectorRef.markForCheck();\n }\n}\n","import { Type } from '@angular/core';\nimport { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { TdMessageComponent, TdMessageContainerDirective } from './message.component';\n\nconst TD_MESSAGE: Type<any>[] = [\n TdMessageComponent,\n TdMessageContainerDirective,\n];\n\n@NgModule({\n imports: [\n CommonModule,\n MatIconModule,\n ],\n declarations: [\n TD_MESSAGE,\n ],\n exports: [\n TD_MESSAGE,\n ],\n})\nexport class CovalentMessageModule {\n\n}\n"]}
1
+ {"version":3,"sources":["ng://@covalent/core/message/message.component.ts","ng://@covalent/core/message/message.module.ts"],"names":["TdMessageContainerDirective","Directive","args","selector","ViewContainerRef","viewContainer","this","Object","defineProperty","TdMessageComponent","prototype","value","_opened","duration","_hidden","undefined","_color","color","_renderer","removeClass","_elementRef","nativeElement","addClass","_changeDetectorRef","markForCheck","opened","_initialized","open","close","animationDoneListener","_detach","_animating","ngAfterViewInit","_this","Promise","resolve","then","_attach","_startAnimationState","toggle","_childElement","createEmbeddedView","_template","clear","Component","template","animations","tdCollapseAnimation","Renderer2","ChangeDetectorRef","ElementRef","ViewChild","TemplateRef","HostBinding","Input","HostListener","icon","TD_MESSAGE","CovalentMessageModule","NgModule","imports","C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oBS,EACAK,EACAH,GAFAd,KAAAY,UAAAA,EACAZ,KAAAiB,mBAAAA,EACAjB,KAAAc,YAAAA,EA9FZd,KAAAM,SAAmB,EACnBN,KAAAQ,SAAmB,EACnBR,KAAAyB,YAAsB,EACtBzB,KAAAoB,cAAwB,EAyCjBpB,KAAAkD,KAAe,eAmD5BlD,KAAKY,UAAUI,SAAShB,KAAKc,YAAYC,cAAe,kBC9GtDoC,EAA0B,CAC9BhD,EACAT,GAGF0D,uBAACC,EAAAA,SAAQzD,KAAA,CAAC,CACR0D,QAAS,CACPC,EAAAA,aACAC,EAAAA,eAEFC,aAAc,CACZN,GAEFO,QAAS,CACPP,OAKJC,GAdA,SAAAA","sourcesContent":["import { Component, Directive, Input, Renderer2, ElementRef, AfterViewInit, ViewContainerRef, TemplateRef, ViewChild,\n HostBinding, HostListener, ChangeDetectorRef } from '@angular/core';\n\nimport { tdCollapseAnimation } from '@covalent/core/common';\n\n@Directive({\n selector: '[tdMessageContainer]',\n})\nexport class TdMessageContainerDirective {\n constructor(public viewContainer: ViewContainerRef) { }\n}\n\n@Component({\n selector: 'td-message',\n templateUrl: './message.component.html',\n styleUrls: ['./message.component.scss'],\n animations: [\n tdCollapseAnimation,\n ],\n})\nexport class TdMessageComponent implements AfterViewInit {\n\n private _color: string;\n private _opened: boolean = true;\n private _hidden: boolean = false;\n private _animating: boolean = false;\n private _initialized: boolean = false;\n\n @ViewChild(TdMessageContainerDirective) _childElement: TdMessageContainerDirective;\n @ViewChild(TemplateRef) _template: TemplateRef<any>;\n\n /**\n * Binding host to tdCollapse animation\n */\n @HostBinding('@tdCollapse')\n get collapsedAnimation(): any {\n return { value: !this._opened, duration: 100 };\n }\n\n /**\n * Binding host to display style when hidden\n */\n @HostBinding('style.display')\n get hidden(): string {\n return this._hidden ? 'none' : undefined;\n }\n\n /**\n * label: string\n *\n * Sets the label of the message.\n */\n @Input('label') label: string;\n\n /**\n * sublabel?: string\n *\n * Sets the sublabel of the message.\n */\n @Input('sublabel') sublabel: string;\n\n /**\n * icon?: string\n *\n * The icon to be displayed before the title.\n * Defaults to `info_outline` icon\n */\n @Input('icon') icon: string = 'info_outline';\n\n /**\n * color?: primary | accent | warn\n *\n * Sets the color of the message.\n * Can also use any material color: purple | light-blue, etc.\n */\n @Input('color')\n set color(color: string) {\n this._renderer.removeClass(this._elementRef.nativeElement, 'mat-' + this._color);\n this._renderer.removeClass(this._elementRef.nativeElement, 'bgc-' + this._color + '-100');\n this._renderer.removeClass(this._elementRef.nativeElement, 'tc-' + this._color + '-700');\n if (color === 'primary' || color === 'accent' || color === 'warn') {\n this._renderer.addClass(this._elementRef.nativeElement, 'mat-' + color);\n } else {\n this._renderer.addClass(this._elementRef.nativeElement, 'bgc-' + color + '-100');\n this._renderer.addClass(this._elementRef.nativeElement, 'tc-' + color + '-700');\n }\n this._color = color;\n this._changeDetectorRef.markForCheck();\n }\n get color(): string {\n return this._color;\n }\n\n /**\n * opened?: boolean\n *\n * Shows or hiddes the message depending on its value.\n * Defaults to 'true'.\n */\n @Input('opened')\n set opened(opened: boolean) {\n if (this._initialized) {\n if (opened) {\n this.open();\n } else {\n this.close();\n }\n } else {\n this._opened = opened;\n }\n }\n get opened(): boolean {\n return this._opened;\n }\n\n constructor(private _renderer: Renderer2,\n private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef) {\n this._renderer.addClass(this._elementRef.nativeElement, 'td-message');\n }\n\n /**\n * Detach element when close animation is finished to set animating state to false\n * hidden state to true and detach element from DOM\n */\n @HostListener('@tdCollapse.done')\n animationDoneListener(): void {\n if (!this._opened) {\n this._hidden = true;\n this._detach();\n }\n this._animating = false;\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Initializes the component and attaches the content.\n */\n ngAfterViewInit(): void {\n Promise.resolve(undefined).then(() => {\n if (this._opened) {\n this._attach();\n }\n this._initialized = true;\n });\n }\n\n /**\n * Renders the message on screen\n * Validates if there is an animation currently and if its already opened\n */\n open(): void {\n if (!this._opened && !this._animating) {\n this._opened = true;\n this._attach();\n this._startAnimationState();\n }\n }\n\n /**\n * Removes the message content from screen.\n * Validates if there is an animation currently and if its already closed\n */\n close(): void {\n if (this._opened && !this._animating) {\n this._opened = false;\n this._startAnimationState();\n }\n }\n\n /**\n * Toggles between open and close depending on state.\n */\n toggle(): void {\n if (this._opened) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * Method to set the state before starting an animation\n */\n private _startAnimationState(): void {\n this._animating = true;\n this._hidden = false;\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Method to attach template to DOM\n */\n private _attach(): void {\n this._childElement.viewContainer.createEmbeddedView(this._template);\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Method to detach template from DOM\n */\n private _detach(): void {\n this._childElement.viewContainer.clear();\n this._changeDetectorRef.markForCheck();\n }\n}\n","import { Type } from '@angular/core';\nimport { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { TdMessageComponent, TdMessageContainerDirective } from './message.component';\n\nconst TD_MESSAGE: Type<any>[] = [\n TdMessageComponent,\n TdMessageContainerDirective,\n];\n\n@NgModule({\n imports: [\n CommonModule,\n MatIconModule,\n ],\n declarations: [\n TD_MESSAGE,\n ],\n exports: [\n TD_MESSAGE,\n ],\n})\nexport class CovalentMessageModule {\n\n}\n"]}
@@ -406,7 +406,7 @@
406
406
  changeDetection: core.ChangeDetectionStrategy.OnPush,
407
407
  selector: 'td-paging-bar',
408
408
  template: "<div class=\"td-paging-bar\" (change)=\"$event.stopPropagation()\" >\n <ng-content></ng-content>\n <div class=\"td-paging-bar-navigation\">\n <button mat-icon-button class=\"td-paging-bar-first-page\" type=\"button\" *ngIf=\"firstLast\" [disabled]=\"isMinPage()\" (click)=\"firstPage()\">\n <mat-icon>{{ isRTL ? 'skip_next' : 'skip_previous' }}</mat-icon>\n </button>\n <button mat-icon-button class=\"td-paging-bar-prev-page\" type=\"button\" [disabled]=\"isMinPage()\" (click)=\"prevPage()\">\n <mat-icon>{{ isRTL ? 'navigate_next' : 'navigate_before' }}</mat-icon>\n </button>\n <ng-template *ngIf=\"pageLinkCount > 0\" let-link let-index=\"index\" ngFor [ngForOf]=\"pageLinks\">\n <button class=\"td-paging-bar-link-page\" mat-icon-button type=\"button\" [color]=\"page === link ? 'accent' : ''\" (click)=\"navigateToPage(link)\">{{link}}</button>\n </ng-template>\n <button mat-icon-button class=\"td-paging-bar-next-page\" type=\"button\" [disabled]=\"isMaxPage()\" (click)=\"nextPage()\">\n <mat-icon>{{ isRTL ? 'navigate_before' : 'navigate_next' }}</mat-icon>\n </button>\n <button mat-icon-button class=\"td-paging-bar-last-page\" type=\"button\" *ngIf=\"firstLast\" [disabled]=\"isMaxPage()\" (click)=\"lastPage()\">\n <mat-icon>{{ isRTL ? 'skip_previous' : 'skip_next' }}</mat-icon>\n </button>\n </div>\n</div>",
409
- styles: [":host{display:block}:host .td-paging-bar{height:48px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%;-ms-flex-pack:end;justify-content:flex-end}:host .td-paging-bar ::ng-deep>*{margin:0 10px}:host .td-paging-bar [mat-icon-button]{font-size:12px;font-weight:400}"]
409
+ styles: [":host{display:block}:host .td-paging-bar{height:48px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}:host .td-paging-bar ::ng-deep>*{margin:0 10px}:host .td-paging-bar [mat-icon-button]{font-size:12px;font-weight:400}"]
410
410
  }] }
411
411
  ];
412
412
  /** @nocollapse */
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/material/icon"),require("@angular/material/button"),require("@angular/core"),require("@angular/cdk/coercion"),require("@angular/cdk/bidi")):"function"==typeof define&&define.amd?define("@covalent/core/paging",["exports","@angular/common","@angular/material/icon","@angular/material/button","@angular/core","@angular/cdk/coercion","@angular/cdk/bidi"],e):e((t.covalent=t.covalent||{},t.covalent.core=t.covalent.core||{},t.covalent.core.paging={}),t.ng.common,t.ng.material.icon,t.ng.material.button,t.ng.core,t.ng.cdk.coercion,t.ng.cdk.bidi)}(this,function(t,e,i,n,a,o,r){"use strict";var g=(Object.defineProperty(s.prototype,"pageLinkCount",{get:function(){return this._pageLinkCount},set:function(t){this._pageLinkCount=o.coerceNumberProperty(t),this._calculatePageLinks(),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"pageSize",{get:function(){return this._pageSize},set:function(t){this._pageSize=o.coerceNumberProperty(t),this._page=1,this._initialized&&this._handleOnChange(),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"total",{get:function(){return this._total},set:function(t){this._total=o.coerceNumberProperty(t),this._calculateRows(),this._calculatePageLinks(),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"pageLinks",{get:function(){return this._pageLinks},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"range",{get:function(){return(this._toRow?this._fromRow:0)+"-"+this._toRow},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"maxPage",{get:function(){return Math.ceil(this._total/this._pageSize)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isRTL",{get:function(){return!!this._dir&&"rtl"===this._dir.dir},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){this._page=o.coerceNumberProperty(this.initialPage),this._calculateRows(),this._calculatePageLinks(),this._initialized=!0,this._changeDetectorRef.markForCheck()},s.prototype.navigateToPage=function(t){return(1===t||1<=t&&t<=this.maxPage)&&(this._page=o.coerceNumberProperty(Math.floor(t)),this._handleOnChange(),!0)},s.prototype.firstPage=function(){return this.navigateToPage(1)},s.prototype.prevPage=function(){return this.navigateToPage(this._page-1)},s.prototype.nextPage=function(){return this.navigateToPage(this._page+1)},s.prototype.lastPage=function(){return this.navigateToPage(this.maxPage)},s.prototype.isMinPage=function(){return this._page<=1},s.prototype.isMaxPage=function(){return this._page>=this.maxPage},s.prototype._calculateRows=function(){var t=this._pageSize*this._page;this._fromRow=this._pageSize*(this._page-1)+1,this._toRow=this._total>t?t:this._total},s.prototype._calculatePageLinks=function(){this.isMaxPage()&&(this._hitEnd=!0,this._hitStart=!1),this.isMinPage()&&(this._hitEnd=!1,this._hitStart=!0);var t=this.pageLinkCount;this.pageLinkCount>this.maxPage&&(t=this.maxPage),this._pageLinks=[];for(var e=Math.floor(t/2),i=0;i<t;i++)t%2==0&&this.page+e>this.maxPage||t%2!=0&&this.page+e>=this.maxPage?this._pageLinks[i]=this.maxPage-(t-(i+1)):(2<t||t<=2&&this._hitEnd)&&0<this.page-e?this._pageLinks[i]=this.page-e+i:this.page-e<=0?this._pageLinks[i]=i+1:this._pageLinks[i]=this.page+i},s.prototype._handleOnChange=function(){this._calculateRows(),this._calculatePageLinks();var t={page:this._page,maxPage:this.maxPage,pageSize:this._pageSize,total:this._total,fromRow:this._fromRow,toRow:this._toRow};this._changeDetectorRef.markForCheck(),this.onChange.emit(t)},s.decorators=[{type:a.Component,args:[{changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"td-paging-bar",template:'<div class="td-paging-bar" (change)="$event.stopPropagation()" >\n <ng-content></ng-content>\n <div class="td-paging-bar-navigation">\n <button mat-icon-button class="td-paging-bar-first-page" type="button" *ngIf="firstLast" [disabled]="isMinPage()" (click)="firstPage()">\n <mat-icon>{{ isRTL ? \'skip_next\' : \'skip_previous\' }}</mat-icon>\n </button>\n <button mat-icon-button class="td-paging-bar-prev-page" type="button" [disabled]="isMinPage()" (click)="prevPage()">\n <mat-icon>{{ isRTL ? \'navigate_next\' : \'navigate_before\' }}</mat-icon>\n </button>\n <ng-template *ngIf="pageLinkCount > 0" let-link let-index="index" ngFor [ngForOf]="pageLinks">\n <button class="td-paging-bar-link-page" mat-icon-button type="button" [color]="page === link ? \'accent\' : \'\'" (click)="navigateToPage(link)">{{link}}</button>\n </ng-template>\n <button mat-icon-button class="td-paging-bar-next-page" type="button" [disabled]="isMaxPage()" (click)="nextPage()">\n <mat-icon>{{ isRTL ? \'navigate_before\' : \'navigate_next\' }}</mat-icon>\n </button>\n <button mat-icon-button class="td-paging-bar-last-page" type="button" *ngIf="firstLast" [disabled]="isMaxPage()" (click)="lastPage()">\n <mat-icon>{{ isRTL ? \'skip_previous\' : \'skip_next\' }}</mat-icon>\n </button>\n </div>\n</div>',styles:[":host{display:block}:host .td-paging-bar{height:48px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%;-ms-flex-pack:end;justify-content:flex-end}:host .td-paging-bar ::ng-deep>*{margin:0 10px}:host .td-paging-bar [mat-icon-button]{font-size:12px;font-weight:400}"]}]}],s.ctorParameters=function(){return[{type:r.Dir,decorators:[{type:a.Optional}]},{type:a.ChangeDetectorRef}]},s.propDecorators={firstLast:[{type:a.Input,args:["firstLast"]}],initialPage:[{type:a.Input,args:["initialPage"]}],pageLinkCount:[{type:a.Input,args:["pageLinkCount"]}],pageSize:[{type:a.Input,args:["pageSize"]}],total:[{type:a.Input,args:["total"]}],onChange:[{type:a.Output,args:["change"]}]},s);function s(t,e){this._dir=t,this._changeDetectorRef=e,this._pageSize=50,this._total=0,this._page=1,this._fromRow=1,this._toRow=1,this._initialized=!1,this._pageLinks=[],this._pageLinkCount=0,this._hitEnd=!1,this._hitStart=!1,this.firstLast=!0,this.initialPage=1,this.onChange=new a.EventEmitter}var c=(p.decorators=[{type:a.NgModule,args:[{imports:[e.CommonModule,i.MatIconModule,n.MatButtonModule],declarations:[g],exports:[g]}]}],p);function p(){}t.CovalentPagingModule=c,t.TdPagingBarComponent=g,Object.defineProperty(t,"__esModule",{value:!0})});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/material/icon"),require("@angular/material/button"),require("@angular/core"),require("@angular/cdk/coercion"),require("@angular/cdk/bidi")):"function"==typeof define&&define.amd?define("@covalent/core/paging",["exports","@angular/common","@angular/material/icon","@angular/material/button","@angular/core","@angular/cdk/coercion","@angular/cdk/bidi"],e):e((t.covalent=t.covalent||{},t.covalent.core=t.covalent.core||{},t.covalent.core.paging={}),t.ng.common,t.ng.material.icon,t.ng.material.button,t.ng.core,t.ng.cdk.coercion,t.ng.cdk.bidi)}(this,function(t,e,i,n,a,o,r){"use strict";var g=(Object.defineProperty(s.prototype,"pageLinkCount",{get:function(){return this._pageLinkCount},set:function(t){this._pageLinkCount=o.coerceNumberProperty(t),this._calculatePageLinks(),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"pageSize",{get:function(){return this._pageSize},set:function(t){this._pageSize=o.coerceNumberProperty(t),this._page=1,this._initialized&&this._handleOnChange(),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"total",{get:function(){return this._total},set:function(t){this._total=o.coerceNumberProperty(t),this._calculateRows(),this._calculatePageLinks(),this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"pageLinks",{get:function(){return this._pageLinks},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"range",{get:function(){return(this._toRow?this._fromRow:0)+"-"+this._toRow},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"page",{get:function(){return this._page},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"maxPage",{get:function(){return Math.ceil(this._total/this._pageSize)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isRTL",{get:function(){return!!this._dir&&"rtl"===this._dir.dir},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){this._page=o.coerceNumberProperty(this.initialPage),this._calculateRows(),this._calculatePageLinks(),this._initialized=!0,this._changeDetectorRef.markForCheck()},s.prototype.navigateToPage=function(t){return(1===t||1<=t&&t<=this.maxPage)&&(this._page=o.coerceNumberProperty(Math.floor(t)),this._handleOnChange(),!0)},s.prototype.firstPage=function(){return this.navigateToPage(1)},s.prototype.prevPage=function(){return this.navigateToPage(this._page-1)},s.prototype.nextPage=function(){return this.navigateToPage(this._page+1)},s.prototype.lastPage=function(){return this.navigateToPage(this.maxPage)},s.prototype.isMinPage=function(){return this._page<=1},s.prototype.isMaxPage=function(){return this._page>=this.maxPage},s.prototype._calculateRows=function(){var t=this._pageSize*this._page;this._fromRow=this._pageSize*(this._page-1)+1,this._toRow=this._total>t?t:this._total},s.prototype._calculatePageLinks=function(){this.isMaxPage()&&(this._hitEnd=!0,this._hitStart=!1),this.isMinPage()&&(this._hitEnd=!1,this._hitStart=!0);var t=this.pageLinkCount;this.pageLinkCount>this.maxPage&&(t=this.maxPage),this._pageLinks=[];for(var e=Math.floor(t/2),i=0;i<t;i++)t%2==0&&this.page+e>this.maxPage||t%2!=0&&this.page+e>=this.maxPage?this._pageLinks[i]=this.maxPage-(t-(i+1)):(2<t||t<=2&&this._hitEnd)&&0<this.page-e?this._pageLinks[i]=this.page-e+i:this.page-e<=0?this._pageLinks[i]=i+1:this._pageLinks[i]=this.page+i},s.prototype._handleOnChange=function(){this._calculateRows(),this._calculatePageLinks();var t={page:this._page,maxPage:this.maxPage,pageSize:this._pageSize,total:this._total,fromRow:this._fromRow,toRow:this._toRow};this._changeDetectorRef.markForCheck(),this.onChange.emit(t)},s.decorators=[{type:a.Component,args:[{changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"td-paging-bar",template:'<div class="td-paging-bar" (change)="$event.stopPropagation()" >\n <ng-content></ng-content>\n <div class="td-paging-bar-navigation">\n <button mat-icon-button class="td-paging-bar-first-page" type="button" *ngIf="firstLast" [disabled]="isMinPage()" (click)="firstPage()">\n <mat-icon>{{ isRTL ? \'skip_next\' : \'skip_previous\' }}</mat-icon>\n </button>\n <button mat-icon-button class="td-paging-bar-prev-page" type="button" [disabled]="isMinPage()" (click)="prevPage()">\n <mat-icon>{{ isRTL ? \'navigate_next\' : \'navigate_before\' }}</mat-icon>\n </button>\n <ng-template *ngIf="pageLinkCount > 0" let-link let-index="index" ngFor [ngForOf]="pageLinks">\n <button class="td-paging-bar-link-page" mat-icon-button type="button" [color]="page === link ? \'accent\' : \'\'" (click)="navigateToPage(link)">{{link}}</button>\n </ng-template>\n <button mat-icon-button class="td-paging-bar-next-page" type="button" [disabled]="isMaxPage()" (click)="nextPage()">\n <mat-icon>{{ isRTL ? \'navigate_before\' : \'navigate_next\' }}</mat-icon>\n </button>\n <button mat-icon-button class="td-paging-bar-last-page" type="button" *ngIf="firstLast" [disabled]="isMaxPage()" (click)="lastPage()">\n <mat-icon>{{ isRTL ? \'skip_previous\' : \'skip_next\' }}</mat-icon>\n </button>\n </div>\n</div>',styles:[":host{display:block}:host .td-paging-bar{height:48px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}:host .td-paging-bar ::ng-deep>*{margin:0 10px}:host .td-paging-bar [mat-icon-button]{font-size:12px;font-weight:400}"]}]}],s.ctorParameters=function(){return[{type:r.Dir,decorators:[{type:a.Optional}]},{type:a.ChangeDetectorRef}]},s.propDecorators={firstLast:[{type:a.Input,args:["firstLast"]}],initialPage:[{type:a.Input,args:["initialPage"]}],pageLinkCount:[{type:a.Input,args:["pageLinkCount"]}],pageSize:[{type:a.Input,args:["pageSize"]}],total:[{type:a.Input,args:["total"]}],onChange:[{type:a.Output,args:["change"]}]},s);function s(t,e){this._dir=t,this._changeDetectorRef=e,this._pageSize=50,this._total=0,this._page=1,this._fromRow=1,this._toRow=1,this._initialized=!1,this._pageLinks=[],this._pageLinkCount=0,this._hitEnd=!1,this._hitStart=!1,this.firstLast=!0,this.initialPage=1,this.onChange=new a.EventEmitter}var c=(p.decorators=[{type:a.NgModule,args:[{imports:[e.CommonModule,i.MatIconModule,n.MatButtonModule],declarations:[g],exports:[g]}]}],p);function p(){}t.CovalentPagingModule=c,t.TdPagingBarComponent=g,Object.defineProperty(t,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=covalent-core-paging.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ng://@covalent/core/paging/paging-bar.component.ts","ng://@covalent/core/paging/paging.module.ts"],"names":["TdPagingBarComponent","Object","defineProperty","prototype","this","_pageLinkCount","pageLinkCount","coerceNumberProperty","_calculatePageLinks","_changeDetectorRef","markForCheck","_pageSize","pageSize","_page","_initialized","_handleOnChange","_total","total","_calculateRows","_pageLinks","_toRow","_fromRow","Math","ceil","_dir","dir","ngOnInit","initialPage","navigateToPage","page","maxPage","floor","firstPage","prevPage","nextPage","lastPage","isMinPage","isMaxPage","top","_hitEnd","_hitStart","actualPageLinkCount","middlePageLinks","x","event","fromRow","toRow","onChange","emit","Component","args","changeDetection","ChangeDetectionStrategy","OnPush","selector","template","Dir","decorators","type","Optional","ChangeDetectorRef","Input","Output","firstLast","EventEmitter","CovalentPagingModule","NgModule","imports","CommonModule","MatIconModule","MatButtonModule","declarations","exports"],"mappings":"msBAAA,IAAAA,GAkDEC,OAAAC,eACIF,EAAAG,UAAA,gBAAa,KAKjB,WACE,OAAOC,KAAKC,oBAPd,SACkBC,GAChBF,KAAKC,eAAiBE,EAAAA,qBAAqBD,GAC3CF,KAAKI,sBACLJ,KAAKK,mBAAmBC,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EFwE,QAAS,CACPxE,OAKJiE,GAfA,SAAAA","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, Optional, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Dir } from '@angular/cdk/bidi';\n\nexport interface IPageChangeEvent {\n page: number;\n maxPage: number;\n pageSize: number;\n total: number;\n fromRow: number;\n toRow: number;\n}\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'td-paging-bar',\n templateUrl: './paging-bar.component.html',\n styleUrls: ['./paging-bar.component.scss' ],\n})\nexport class TdPagingBarComponent implements OnInit {\n\n private _pageSize: number = 50;\n private _total: number = 0;\n private _page: number = 1;\n private _fromRow: number = 1;\n private _toRow: number = 1;\n private _initialized: boolean = false;\n private _pageLinks: number[] = [];\n private _pageLinkCount: number = 0;\n // special case when 2 pageLinks, detect when hit end of pages so can lead in correct direction\n private _hitEnd: boolean = false;\n // special case when 2 pageLinks, detect when hit start of pages so can lead in correct direction\n private _hitStart: boolean = false;\n\n /**\n * firstLast?: boolean\n * Shows or hides the first and last page buttons of the paging bar. Defaults to 'false'\n */\n @Input('firstLast') firstLast: boolean = true;\n\n /**\n * initialPage?: number\n * Sets starting page for the paging bar. Defaults to '1'\n */\n @Input('initialPage') initialPage: number = 1;\n\n /**\n * pageLinkCount?: number\n * Amount of page navigation links for the paging bar. Defaults to '0'\n */\n @Input('pageLinkCount')\n set pageLinkCount(pageLinkCount: number) {\n this._pageLinkCount = coerceNumberProperty(pageLinkCount);\n this._calculatePageLinks();\n this._changeDetectorRef.markForCheck();\n }\n get pageLinkCount(): number {\n return this._pageLinkCount;\n }\n\n /**\n * pageSize?: number\n * Selected page size for the pagination. Defaults 50.\n */\n @Input('pageSize')\n set pageSize(pageSize: number) {\n this._pageSize = coerceNumberProperty(pageSize);\n this._page = 1;\n if (this._initialized) {\n this._handleOnChange();\n }\n this._changeDetectorRef.markForCheck();\n }\n get pageSize(): number {\n return this._pageSize;\n }\n\n /**\n * total: number\n * Total rows for the pagination.\n */\n @Input('total')\n set total(total: number) {\n this._total = coerceNumberProperty(total);\n this._calculateRows();\n this._calculatePageLinks();\n this._changeDetectorRef.markForCheck();\n }\n get total(): number {\n return this._total;\n }\n\n /**\n * pageLinks: number[]\n * Returns the pageLinks in an array\n */\n get pageLinks(): number[] {\n return this._pageLinks;\n }\n\n /**\n * range: string\n * Returns the range of the rows.\n */\n get range(): string {\n return `${!this._toRow ? 0 : this._fromRow}-${this._toRow}`;\n }\n\n /**\n * page: number\n * Returns the current page.\n */\n get page(): number {\n return this._page;\n }\n\n /**\n * page: number\n * Returns the max page for the current pageSize and total.\n */\n get maxPage(): number {\n return Math.ceil(this._total / this._pageSize);\n }\n\n /**\n * change?: function\n * Method to be executed when page size changes or any button is clicked in the paging bar.\n * Emits an [IPageChangeEvent] implemented object.\n */\n @Output('change') onChange: EventEmitter<IPageChangeEvent> = new EventEmitter<IPageChangeEvent>();\n\n get isRTL(): boolean {\n if (this._dir) {\n return this._dir.dir === 'rtl';\n }\n return false;\n }\n\n constructor(@Optional() private _dir: Dir,\n private _changeDetectorRef: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n this._page = coerceNumberProperty(this.initialPage);\n this._calculateRows();\n this._calculatePageLinks();\n this._initialized = true;\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * navigateToPage?: function\n * Navigates to a specific valid page. Returns 'true' if page is valid, else 'false'.\n */\n navigateToPage(page: number): boolean {\n if (page === 1 || (page >= 1 && page <= this.maxPage)) {\n this._page = coerceNumberProperty(Math.floor(page));\n this._handleOnChange();\n return true;\n }\n return false;\n }\n\n /**\n * firstPage?: function\n * Navigates to the first page. Returns 'true' if page is valid, else 'false'.\n */\n firstPage(): boolean {\n return this.navigateToPage(1);\n }\n\n /**\n * prevPage?: function\n * Navigates to the previous page. Returns 'true' if page is valid, else 'false'.\n */\n prevPage(): boolean {\n return this.navigateToPage(this._page - 1);\n }\n\n /**\n * nextPage?: function\n * Navigates to the next page. Returns 'true' if page is valid, else 'false'.\n */\n nextPage(): boolean {\n return this.navigateToPage(this._page + 1);\n }\n\n /**\n * lastPage?: function\n * Navigates to the last page. Returns 'true' if page is valid, else 'false'.\n */\n lastPage(): boolean {\n return this.navigateToPage(this.maxPage);\n }\n\n isMinPage(): boolean {\n return this._page <= 1;\n }\n\n isMaxPage(): boolean {\n return this._page >= this.maxPage;\n }\n\n private _calculateRows(): void {\n let top: number = (this._pageSize * this._page);\n this._fromRow = (this._pageSize * (this._page - 1)) + 1;\n this._toRow = this._total > top ? top : this._total;\n }\n\n /**\n * _calculatePageLinks?: function\n * Calculates the page links that should be shown to the user based on the current state of the paginator\n */\n private _calculatePageLinks(): void {\n // special case when 2 pageLinks, detect when hit end of pages so can lead in correct direction\n if (this.isMaxPage()) {\n this._hitEnd = true;\n this._hitStart = false;\n }\n // special case when 2 pageLinks, detect when hit start of pages so can lead in correct direction\n if (this.isMinPage()) {\n this._hitEnd = false;\n this._hitStart = true;\n }\n // If the pageLinkCount goes above max possible pages based on perpage setting then reset it to maxPage\n let actualPageLinkCount: number = this.pageLinkCount;\n if (this.pageLinkCount > this.maxPage) {\n actualPageLinkCount = this.maxPage;\n }\n // reset the pageLinks array\n this._pageLinks = [];\n // fill in the array with the pageLinks based on the current selected page\n let middlePageLinks: number = Math.floor(actualPageLinkCount / 2);\n for (let x: number = 0; x < actualPageLinkCount; x++) {\n // don't go past the maxPage in the pageLinks\n // have to handle even and odd pageLinkCounts differently so can still lead to the next numbers\n if ((actualPageLinkCount % 2 === 0 && (this.page + middlePageLinks > this.maxPage)) ||\n (actualPageLinkCount % 2 !== 0 && (this.page + middlePageLinks >= this.maxPage))) {\n this._pageLinks[x] = this.maxPage - (actualPageLinkCount - (x + 1));\n // if the selected page is after the middle then set that page as middle and get the correct balance on left and right\n // special handling when there are only 2 pageLinks to just drop to next if block so can lead to next numbers when moving to right\n // when moving to the left then go into this block\n } else if ((actualPageLinkCount > 2 || actualPageLinkCount <= 2 && this._hitEnd) && (this.page - middlePageLinks) > 0) {\n this._pageLinks[x] = (this.page - middlePageLinks) + x;\n // if the selected page is before the middle then set the pages based on the x index leading up to and after selected page\n } else if ((this.page - middlePageLinks) <= 0) {\n this._pageLinks[x] = x + 1;\n // other wise just set the array in order starting from the selected page\n } else {\n this._pageLinks[x] = this.page + x;\n }\n }\n }\n\n private _handleOnChange(): void {\n this._calculateRows();\n this._calculatePageLinks();\n let event: IPageChangeEvent = {\n page: this._page,\n maxPage: this.maxPage,\n pageSize: this._pageSize,\n total: this._total,\n fromRow: this._fromRow,\n toRow: this._toRow,\n };\n this._changeDetectorRef.markForCheck();\n this.onChange.emit(event);\n }\n\n}\n","import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\n\nimport { TdPagingBarComponent } from './paging-bar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n ],\n declarations: [\n TdPagingBarComponent,\n ],\n exports: [\n TdPagingBarComponent,\n ],\n})\nexport class CovalentPagingModule {\n\n}\n"]}
1
+ {"version":3,"sources":["ng://@covalent/core/paging/paging-bar.component.ts","ng://@covalent/core/paging/paging.module.ts"],"names":["TdPagingBarComponent","Object","defineProperty","prototype","this","_pageLinkCount","pageLinkCount","coerceNumberProperty","_calculatePageLinks","_changeDetectorRef","markForCheck","_pageSize","pageSize","_page","_initialized","_handleOnChange","_total","total","_calculateRows","_pageLinks","_toRow","_fromRow","Math","ceil","_dir","dir","ngOnInit","initialPage","navigateToPage","page","maxPage","floor","firstPage","prevPage","nextPage","lastPage","isMinPage","isMaxPage","top","_hitEnd","_hitStart","actualPageLinkCount","middlePageLinks","x","event","fromRow","toRow","onChange","emit","Component","args","changeDetection","ChangeDetectionStrategy","OnPush","selector","template","Dir","decorators","type","Optional","ChangeDetectorRef","Input","Output","firstLast","EventEmitter","CovalentPagingModule","NgModule","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AAqB,EAMTpC,KAAA2D,WAAqB,EAMnB3D,KAAAuB,YAAsB,EAqF1BvB,KAAA2C,SAA2C,IAAIiB,EAAAA,aCjInE,IAAAC,uBASCC,EAAAA,SAAQhB,KAAA,CAAC,CACRiB,QAAS,CACPC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,iBAEFC,aAAc,CACZvE,GAEFwE,QAAS,CACPxE,OAKJiE,GAfA,SAAAA","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, Optional, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { Dir } from '@angular/cdk/bidi';\n\nexport interface IPageChangeEvent {\n page: number;\n maxPage: number;\n pageSize: number;\n total: number;\n fromRow: number;\n toRow: number;\n}\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'td-paging-bar',\n templateUrl: './paging-bar.component.html',\n styleUrls: ['./paging-bar.component.scss' ],\n})\nexport class TdPagingBarComponent implements OnInit {\n\n private _pageSize: number = 50;\n private _total: number = 0;\n private _page: number = 1;\n private _fromRow: number = 1;\n private _toRow: number = 1;\n private _initialized: boolean = false;\n private _pageLinks: number[] = [];\n private _pageLinkCount: number = 0;\n // special case when 2 pageLinks, detect when hit end of pages so can lead in correct direction\n private _hitEnd: boolean = false;\n // special case when 2 pageLinks, detect when hit start of pages so can lead in correct direction\n private _hitStart: boolean = false;\n\n /**\n * firstLast?: boolean\n * Shows or hides the first and last page buttons of the paging bar. Defaults to 'false'\n */\n @Input('firstLast') firstLast: boolean = true;\n\n /**\n * initialPage?: number\n * Sets starting page for the paging bar. Defaults to '1'\n */\n @Input('initialPage') initialPage: number = 1;\n\n /**\n * pageLinkCount?: number\n * Amount of page navigation links for the paging bar. Defaults to '0'\n */\n @Input('pageLinkCount')\n set pageLinkCount(pageLinkCount: number) {\n this._pageLinkCount = coerceNumberProperty(pageLinkCount);\n this._calculatePageLinks();\n this._changeDetectorRef.markForCheck();\n }\n get pageLinkCount(): number {\n return this._pageLinkCount;\n }\n\n /**\n * pageSize?: number\n * Selected page size for the pagination. Defaults 50.\n */\n @Input('pageSize')\n set pageSize(pageSize: number) {\n this._pageSize = coerceNumberProperty(pageSize);\n this._page = 1;\n if (this._initialized) {\n this._handleOnChange();\n }\n this._changeDetectorRef.markForCheck();\n }\n get pageSize(): number {\n return this._pageSize;\n }\n\n /**\n * total: number\n * Total rows for the pagination.\n */\n @Input('total')\n set total(total: number) {\n this._total = coerceNumberProperty(total);\n this._calculateRows();\n this._calculatePageLinks();\n this._changeDetectorRef.markForCheck();\n }\n get total(): number {\n return this._total;\n }\n\n /**\n * pageLinks: number[]\n * Returns the pageLinks in an array\n */\n get pageLinks(): number[] {\n return this._pageLinks;\n }\n\n /**\n * range: string\n * Returns the range of the rows.\n */\n get range(): string {\n return `${!this._toRow ? 0 : this._fromRow}-${this._toRow}`;\n }\n\n /**\n * page: number\n * Returns the current page.\n */\n get page(): number {\n return this._page;\n }\n\n /**\n * page: number\n * Returns the max page for the current pageSize and total.\n */\n get maxPage(): number {\n return Math.ceil(this._total / this._pageSize);\n }\n\n /**\n * change?: function\n * Method to be executed when page size changes or any button is clicked in the paging bar.\n * Emits an [IPageChangeEvent] implemented object.\n */\n @Output('change') onChange: EventEmitter<IPageChangeEvent> = new EventEmitter<IPageChangeEvent>();\n\n get isRTL(): boolean {\n if (this._dir) {\n return this._dir.dir === 'rtl';\n }\n return false;\n }\n\n constructor(@Optional() private _dir: Dir,\n private _changeDetectorRef: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n this._page = coerceNumberProperty(this.initialPage);\n this._calculateRows();\n this._calculatePageLinks();\n this._initialized = true;\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * navigateToPage?: function\n * Navigates to a specific valid page. Returns 'true' if page is valid, else 'false'.\n */\n navigateToPage(page: number): boolean {\n if (page === 1 || (page >= 1 && page <= this.maxPage)) {\n this._page = coerceNumberProperty(Math.floor(page));\n this._handleOnChange();\n return true;\n }\n return false;\n }\n\n /**\n * firstPage?: function\n * Navigates to the first page. Returns 'true' if page is valid, else 'false'.\n */\n firstPage(): boolean {\n return this.navigateToPage(1);\n }\n\n /**\n * prevPage?: function\n * Navigates to the previous page. Returns 'true' if page is valid, else 'false'.\n */\n prevPage(): boolean {\n return this.navigateToPage(this._page - 1);\n }\n\n /**\n * nextPage?: function\n * Navigates to the next page. Returns 'true' if page is valid, else 'false'.\n */\n nextPage(): boolean {\n return this.navigateToPage(this._page + 1);\n }\n\n /**\n * lastPage?: function\n * Navigates to the last page. Returns 'true' if page is valid, else 'false'.\n */\n lastPage(): boolean {\n return this.navigateToPage(this.maxPage);\n }\n\n isMinPage(): boolean {\n return this._page <= 1;\n }\n\n isMaxPage(): boolean {\n return this._page >= this.maxPage;\n }\n\n private _calculateRows(): void {\n let top: number = (this._pageSize * this._page);\n this._fromRow = (this._pageSize * (this._page - 1)) + 1;\n this._toRow = this._total > top ? top : this._total;\n }\n\n /**\n * _calculatePageLinks?: function\n * Calculates the page links that should be shown to the user based on the current state of the paginator\n */\n private _calculatePageLinks(): void {\n // special case when 2 pageLinks, detect when hit end of pages so can lead in correct direction\n if (this.isMaxPage()) {\n this._hitEnd = true;\n this._hitStart = false;\n }\n // special case when 2 pageLinks, detect when hit start of pages so can lead in correct direction\n if (this.isMinPage()) {\n this._hitEnd = false;\n this._hitStart = true;\n }\n // If the pageLinkCount goes above max possible pages based on perpage setting then reset it to maxPage\n let actualPageLinkCount: number = this.pageLinkCount;\n if (this.pageLinkCount > this.maxPage) {\n actualPageLinkCount = this.maxPage;\n }\n // reset the pageLinks array\n this._pageLinks = [];\n // fill in the array with the pageLinks based on the current selected page\n let middlePageLinks: number = Math.floor(actualPageLinkCount / 2);\n for (let x: number = 0; x < actualPageLinkCount; x++) {\n // don't go past the maxPage in the pageLinks\n // have to handle even and odd pageLinkCounts differently so can still lead to the next numbers\n if ((actualPageLinkCount % 2 === 0 && (this.page + middlePageLinks > this.maxPage)) ||\n (actualPageLinkCount % 2 !== 0 && (this.page + middlePageLinks >= this.maxPage))) {\n this._pageLinks[x] = this.maxPage - (actualPageLinkCount - (x + 1));\n // if the selected page is after the middle then set that page as middle and get the correct balance on left and right\n // special handling when there are only 2 pageLinks to just drop to next if block so can lead to next numbers when moving to right\n // when moving to the left then go into this block\n } else if ((actualPageLinkCount > 2 || actualPageLinkCount <= 2 && this._hitEnd) && (this.page - middlePageLinks) > 0) {\n this._pageLinks[x] = (this.page - middlePageLinks) + x;\n // if the selected page is before the middle then set the pages based on the x index leading up to and after selected page\n } else if ((this.page - middlePageLinks) <= 0) {\n this._pageLinks[x] = x + 1;\n // other wise just set the array in order starting from the selected page\n } else {\n this._pageLinks[x] = this.page + x;\n }\n }\n }\n\n private _handleOnChange(): void {\n this._calculateRows();\n this._calculatePageLinks();\n let event: IPageChangeEvent = {\n page: this._page,\n maxPage: this.maxPage,\n pageSize: this._pageSize,\n total: this._total,\n fromRow: this._fromRow,\n toRow: this._toRow,\n };\n this._changeDetectorRef.markForCheck();\n this.onChange.emit(event);\n }\n\n}\n","import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\n\nimport { TdPagingBarComponent } from './paging-bar.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n ],\n declarations: [\n TdPagingBarComponent,\n ],\n exports: [\n TdPagingBarComponent,\n ],\n})\nexport class CovalentPagingModule {\n\n}\n"]}