b2adminui 1.0.6 → 1.0.7

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 (782) hide show
  1. package/package.json +5 -2
  2. package/Dockerfile +0 -45
  3. package/app-config-prod.json +0 -6
  4. package/app-config.json +0 -10
  5. package/b2@1.0.0 +0 -0
  6. package/bs-config.json +0 -8
  7. package/config/helpers.js +0 -10
  8. package/config/karma-test-shim.js +0 -21
  9. package/config/karma.conf.js +0 -37
  10. package/config/webpack.common.js +0 -96
  11. package/config/webpack.dev.js +0 -24
  12. package/config/webpack.eks.js +0 -72
  13. package/config/webpack.prod.js +0 -72
  14. package/config/webpack.test.js +0 -53
  15. package/default.nginx.config +0 -60
  16. package/docker-entrypoint.sh +0 -6
  17. package/e2e-spec.ts +0 -21
  18. package/favicon.ico +0 -0
  19. package/karma.webpack.conf.js +0 -1
  20. package/npm +0 -0
  21. package/rimraf +0 -0
  22. package/src/app/app-config.ts +0 -21
  23. package/src/app/app-routing.module.ts +0 -165
  24. package/src/app/app.component.ts +0 -30
  25. package/src/app/app.module.ts +0 -72
  26. package/src/app/auth/auth.guard.ts +0 -192
  27. package/src/app/customer-management/customer-management.module.ts +0 -52
  28. package/src/app/customer-management/customer-personal-details/components/customer-personal-details.component.ts +0 -766
  29. package/src/app/customer-management/customer-personal-details/customer-personal-details.component.css +0 -4
  30. package/src/app/customer-management/customer-personal-details/customer-personal-details.component.html +0 -812
  31. package/src/app/customer-management/customer-personal-details/models/companyrisksetting.model.ts +0 -65
  32. package/src/app/customer-management/customer-profile-history-list/components/customer-profile-history-list.component.ts +0 -149
  33. package/src/app/customer-management/customer-profile-history-list/customer-profile-history-list.component.html +0 -104
  34. package/src/app/customer-management/customer-profile-history-list/models/customer-profile-history-list.model.ts +0 -33
  35. package/src/app/customer-management/customer-profile-history-list/models/index.ts +0 -1
  36. package/src/app/customer-management/customer-registration/components/customer-registration.component.ts +0 -1595
  37. package/src/app/customer-management/customer-registration/customer-registration.component.css +0 -6
  38. package/src/app/customer-management/customer-registration/customer-registration.component.html +0 -1169
  39. package/src/app/customer-management/customer-registration/models/approve-customer.model.ts +0 -5
  40. package/src/app/customer-management/customer-registration/models/index.ts +0 -1
  41. package/src/app/customer-management/customer-registration/models/wallet-registration.model.ts +0 -198
  42. package/src/app/customer-management/customer-registration-list/components/customer-registration-list.component.ts +0 -444
  43. package/src/app/customer-management/customer-registration-list/customer-registration-list.component.html +0 -354
  44. package/src/app/customer-management/customer-registration-list/models/index.ts +0 -2
  45. package/src/app/customer-management/customer-registration-list/models/wallet-list.model.ts +0 -44
  46. package/src/app/customer-management/customer-registration-list/models/wallet.model.ts +0 -13
  47. package/src/app/customer-management/manual-topup/components/manual-topup.component.ts +0 -299
  48. package/src/app/customer-management/manual-topup/manual-topup.component.html +0 -173
  49. package/src/app/customer-management/manual-topup/models/index.ts +0 -1
  50. package/src/app/customer-management/manual-topup/models/manual-topup.model.ts +0 -17
  51. package/src/app/customer-management/wallet-balance-history/components/wallet-balance-history.component.ts +0 -243
  52. package/src/app/customer-management/wallet-balance-history/models/balance-history-list.model.ts +0 -25
  53. package/src/app/customer-management/wallet-balance-history/models/balance-history.model.ts +0 -13
  54. package/src/app/customer-management/wallet-balance-history/models/index.ts +0 -3
  55. package/src/app/customer-management/wallet-balance-history/models/wallet.model.ts +0 -13
  56. package/src/app/customer-management/wallet-balance-history/wallet-balance-history.component.html +0 -182
  57. package/src/app/customer-management/wallet-history/components/wallet-history.component.ts +0 -239
  58. package/src/app/customer-management/wallet-history/models/index.ts +0 -2
  59. package/src/app/customer-management/wallet-history/models/wallet-history-list.model.ts +0 -11
  60. package/src/app/customer-management/wallet-history/models/wallet-history.model.ts +0 -10
  61. package/src/app/customer-management/wallet-history/wallet-history.component.html +0 -85
  62. package/src/app/external-change-password/components/external-change-password.component.ts +0 -71
  63. package/src/app/external-change-password/external-change-password.component.html +0 -57
  64. package/src/app/external-change-password/models/external-change-password.model.ts +0 -6
  65. package/src/app/fee-management/company/company.component.html +0 -491
  66. package/src/app/fee-management/company/components/company.component.ts +0 -472
  67. package/src/app/fee-management/company/models/company.model.ts +0 -55
  68. package/src/app/fee-management/company/models/index.ts +0 -1
  69. package/src/app/fee-management/company-wallet-profile/company-wallet-profile.component.html +0 -161
  70. package/src/app/fee-management/company-wallet-profile/components/company-wallet-profile.component.ts +0 -194
  71. package/src/app/fee-management/fee-management.module.ts +0 -51
  72. package/src/app/fee-management/menu-setup/models/menu-setup.model.ts +0 -75
  73. package/src/app/fee-management/wallet-fee-setting/components/wallet-fee-setting.component.ts +0 -337
  74. package/src/app/fee-management/wallet-fee-setting/models/index.ts +0 -7
  75. package/src/app/fee-management/wallet-fee-setting/models/transfer-fee.model.ts +0 -32
  76. package/src/app/fee-management/wallet-fee-setting/models/verify-risk-level.model.ts +0 -7
  77. package/src/app/fee-management/wallet-fee-setting/models/wallet-fee-setting.model.ts +0 -32
  78. package/src/app/fee-management/wallet-fee-setting/models/wallet-setting.model.ts +0 -17
  79. package/src/app/fee-management/wallet-fee-setting/models/wallet.model.ts +0 -28
  80. package/src/app/fee-management/wallet-fee-setting/wallet-fee-setting.component.html +0 -1226
  81. package/src/app/fee-management/wallet-profile-limit-setting/components/wallet-profile-limit-setting.component.ts +0 -284
  82. package/src/app/fee-management/wallet-profile-limit-setting/models/index.ts +0 -1
  83. package/src/app/fee-management/wallet-profile-limit-setting/models/wallet-profile-limit-setting.model.ts +0 -79
  84. package/src/app/fee-management/wallet-profile-limit-setting/wallet-profile-limit-setting.component.html +0 -1285
  85. package/src/app/fee-management/wallet-profile-setting-list/components/wallet-profile-setting-list.component.ts +0 -350
  86. package/src/app/fee-management/wallet-profile-setting-list/models/index.ts +0 -2
  87. package/src/app/fee-management/wallet-profile-setting-list/models/wallet-profile-setting-list.model.ts +0 -36
  88. package/src/app/fee-management/wallet-profile-setting-list/models/wallet-profile-setting.model.ts +0 -12
  89. package/src/app/fee-management/wallet-profile-setting-list/wallet-profile-setting-list.component.html +0 -220
  90. package/src/app/fee-management/wallet-topup/components/wallet-topup.component.ts +0 -209
  91. package/src/app/fee-management/wallet-topup/models/index.ts +0 -3
  92. package/src/app/fee-management/wallet-topup/models/wallet-topup.model.ts +0 -11
  93. package/src/app/fee-management/wallet-topup/wallet-topup.component.html +0 -97
  94. package/src/app/forgot-password/components/forgot-password.component.ts +0 -87
  95. package/src/app/forgot-password/forgot-password.component.html +0 -40
  96. package/src/app/forgot-password/models/forgot-password.model.ts +0 -5
  97. package/src/app/forgot-password/models/index.ts +0 -2
  98. package/src/app/login/components/login.component.ts +0 -199
  99. package/src/app/login/login.component.html +0 -49
  100. package/src/app/login/models/common.model.ts +0 -21
  101. package/src/app/login/models/login.model.ts +0 -5
  102. package/src/app/models/audit-log-insert.model.ts +0 -11
  103. package/src/app/models/common.model.ts +0 -56
  104. package/src/app/models/index.ts +0 -4
  105. package/src/app/models/navigation-data.model.ts +0 -24
  106. package/src/app/models/page-info-model.ts +0 -4
  107. package/src/app/models/response-model.ts +0 -5
  108. package/src/app/models/search-model.ts +0 -21
  109. package/src/app/navbar/components/navbar.component.ts +0 -288
  110. package/src/app/navbar/navbar.component.html +0 -200
  111. package/src/app/profile-setting/change-password/change-password.component.html +0 -85
  112. package/src/app/profile-setting/change-password/components/change-password.component.ts +0 -76
  113. package/src/app/profile-setting/change-password/models/change-password.model.ts +0 -5
  114. package/src/app/profile-setting/change-password/models/index.ts +0 -1
  115. package/src/app/profile-setting/profile-setting/components/profile-setting.component.ts +0 -234
  116. package/src/app/profile-setting/profile-setting/models/profile-setting.model.ts +0 -21
  117. package/src/app/profile-setting/profile-setting/profile-setting.component.html +0 -228
  118. package/src/app/profile-setting/profile-setting.module.ts +0 -22
  119. package/src/app/shared/alerts/alertOptions.ts +0 -14
  120. package/src/app/shared/alerts/alerts.ts +0 -57
  121. package/src/app/shared/common/common.ts +0 -1353
  122. package/src/app/shared/constants/constants.ts +0 -550
  123. package/src/app/shared/interceptor/https-interceptor.ts +0 -69
  124. package/src/app/shared/service/shared.service.ts +0 -287
  125. package/src/app/shared/source-of-fund/source-of-fund.ts +0 -4
  126. package/src/app/shared/transaction/transaction-type-status.ts +0 -32
  127. package/src/app/transaction-history/transaction-history.module.ts +0 -83
  128. package/src/app/transaction-history/wallet-transaction-list/components/wallet-transaction-list.component.ts +0 -500
  129. package/src/app/transaction-history/wallet-transaction-list/models/wallet-transaction-list.model.ts +0 -75
  130. package/src/app/transaction-history/wallet-transaction-list/wallet-transaction-list.component.html +0 -530
  131. package/src/app/transaction-history/wallet-transaction-list-details/components/wallet-transaction-list-details.component.ts +0 -154
  132. package/src/app/transaction-history/wallet-transaction-list-details/models/index.ts +0 -3
  133. package/src/app/transaction-history/wallet-transaction-list-details/models/wallet-transaction-list-details.model.ts +0 -39
  134. package/src/app/transaction-history/wallet-transaction-list-details/models/wallet-transaction-refund.model.ts +0 -5
  135. package/src/app/transaction-history/wallet-transaction-list-details/wallet-transaction-list-details.component.html +0 -452
  136. package/src/app/user-management/audit-log-list/audit-log-list.component.html +0 -198
  137. package/src/app/user-management/audit-log-list/components/audit-log-list.component.ts +0 -415
  138. package/src/app/user-management/audit-log-list/models/audit-log-list.model.ts +0 -38
  139. package/src/app/user-management/audit-log-list/models/audit-log.model.ts +0 -11
  140. package/src/app/user-management/audit-log-list/models/index.ts +0 -2
  141. package/src/app/user-management/system-user/components/system-user.component.ts +0 -466
  142. package/src/app/user-management/system-user/models/system-user.model.ts +0 -23
  143. package/src/app/user-management/system-user/system-user.component.html +0 -349
  144. package/src/app/user-management/system-user-list/components/system-user-list.component.ts +0 -399
  145. package/src/app/user-management/system-user-list/models/index.ts +0 -2
  146. package/src/app/user-management/system-user-list/models/system-user-list.model.ts +0 -40
  147. package/src/app/user-management/system-user-list/models/system-user.model.ts +0 -11
  148. package/src/app/user-management/system-user-list/system-user-list.component.html +0 -266
  149. package/src/app/user-management/user-group-permission/components/user-group-permission.component.ts +0 -1819
  150. package/src/app/user-management/user-group-permission/models/user-group-permission.model.ts +0 -288
  151. package/src/app/user-management/user-group-permission/user-group-permission.component.html +0 -100
  152. package/src/app/user-management/user-group-permission-list/components/user-group-permission-list.component.ts +0 -379
  153. package/src/app/user-management/user-group-permission-list/models/index.ts +0 -2
  154. package/src/app/user-management/user-group-permission-list/models/user-group-permission-list.model.ts +0 -28
  155. package/src/app/user-management/user-group-permission-list/models/user-group-permission.model.ts +0 -8
  156. package/src/app/user-management/user-group-permission-list/user-group-permission-list.component.html +0 -184
  157. package/src/app/user-management/user-management.module.ts +0 -38
  158. package/src/app/validate-change-password/components/validate-change-password.component.ts +0 -66
  159. package/src/app/validate-change-password/validate-change-password.component.html +0 -8
  160. package/src/assets/css/animate.css +0 -2848
  161. package/src/assets/css/bootstrap.css +0 -6760
  162. package/src/assets/css/bootstrap.css.map +0 -1
  163. package/src/assets/css/bootstrap.min.css +0 -6
  164. package/src/assets/css/bootstrap.min.css.map +0 -1
  165. package/src/assets/css/font.css +0 -10
  166. package/src/assets/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css +0 -251
  167. package/src/assets/css/plugins/blueimp/css/blueimp-gallery-indicator.css +0 -71
  168. package/src/assets/css/plugins/blueimp/css/blueimp-gallery-video.css +0 -87
  169. package/src/assets/css/plugins/blueimp/css/blueimp-gallery.css +0 -226
  170. package/src/assets/css/plugins/blueimp/css/blueimp-gallery.min.css +0 -1
  171. package/src/assets/css/plugins/blueimp/css/demo.css +0 -51
  172. package/src/assets/css/plugins/blueimp/img/error.png +0 -0
  173. package/src/assets/css/plugins/blueimp/img/error.svg +0 -5
  174. package/src/assets/css/plugins/blueimp/img/loading.gif +0 -0
  175. package/src/assets/css/plugins/blueimp/img/play-pause.png +0 -0
  176. package/src/assets/css/plugins/blueimp/img/play-pause.svg +0 -6
  177. package/src/assets/css/plugins/blueimp/img/video-play.png +0 -0
  178. package/src/assets/css/plugins/blueimp/img/video-play.svg +0 -5
  179. package/src/assets/css/plugins/bootstrap-datepicker/bootstrap-datepicker3.min.css +0 -9
  180. package/src/assets/css/plugins/bootstrap-markdown/bootstrap-markdown.min.css +0 -1
  181. package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.css +0 -1468
  182. package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.css.map +0 -1
  183. package/src/assets/css/plugins/bootstrap-rtl/bootstrap-rtl.min.css +0 -9
  184. package/src/assets/css/plugins/bootstrap-timepicker/bootstrap-timepicker.min.css +0 -10
  185. package/src/assets/css/plugins/bootstrapTour/bootstrap-tour.min.css +0 -22
  186. package/src/assets/css/plugins/c3/c3.min.css +0 -1
  187. package/src/assets/css/plugins/chartist/chartist.min.css +0 -773
  188. package/src/assets/css/plugins/chosen/chosen-sprite.png +0 -0
  189. package/src/assets/css/plugins/chosen/chosen-sprite@2x.png +0 -0
  190. package/src/assets/css/plugins/chosen/chosen.css +0 -429
  191. package/src/assets/css/plugins/clockpicker/clockpicker.css +0 -168
  192. package/src/assets/css/plugins/codemirror/ambiance.css +0 -77
  193. package/src/assets/css/plugins/codemirror/codemirror.css +0 -309
  194. package/src/assets/css/plugins/colorpicker/bootstrap-colorpicker.min.css +0 -9
  195. package/src/assets/css/plugins/cropper/cropper.min.css +0 -9
  196. package/src/assets/css/plugins/dataTables/datatables.min.css +0 -21
  197. package/src/assets/css/plugins/datapicker/datepicker3.css +0 -789
  198. package/src/assets/css/plugins/datatables.net/css/jquery.dataTables.css +0 -455
  199. package/src/assets/css/plugins/datatables.net/images/sort_asc.png +0 -0
  200. package/src/assets/css/plugins/datatables.net/images/sort_asc_disabled.png +0 -0
  201. package/src/assets/css/plugins/datatables.net/images/sort_both.png +0 -0
  202. package/src/assets/css/plugins/datatables.net/images/sort_desc.png +0 -0
  203. package/src/assets/css/plugins/datatables.net/images/sort_desc_disabled.png +0 -0
  204. package/src/assets/css/plugins/daterangepicker/daterangepicker-bs3.css +0 -335
  205. package/src/assets/css/plugins/dropzone/basic.css +0 -155
  206. package/src/assets/css/plugins/dropzone/dropzone.css +0 -410
  207. package/src/assets/css/plugins/footable/fonts/footable.eot +0 -0
  208. package/src/assets/css/plugins/footable/fonts/footable.svg +0 -78
  209. package/src/assets/css/plugins/footable/fonts/footable.ttf +0 -0
  210. package/src/assets/css/plugins/footable/fonts/footable.woff +0 -0
  211. package/src/assets/css/plugins/footable/footable.core.css +0 -178
  212. package/src/assets/css/plugins/fullcalendar/fullcalendar.css +0 -977
  213. package/src/assets/css/plugins/fullcalendar/fullcalendar.print.css +0 -202
  214. package/src/assets/css/plugins/iCheck/custom.css +0 -59
  215. package/src/assets/css/plugins/iCheck/green.png +0 -0
  216. package/src/assets/css/plugins/iCheck/green@2x.png +0 -0
  217. package/src/assets/css/plugins/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  218. package/src/assets/css/plugins/images/bootstrap-colorpicker/alpha.png +0 -0
  219. package/src/assets/css/plugins/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
  220. package/src/assets/css/plugins/images/bootstrap-colorpicker/hue.png +0 -0
  221. package/src/assets/css/plugins/images/bootstrap-colorpicker/saturation.png +0 -0
  222. package/src/assets/css/plugins/images/sort.png +0 -0
  223. package/src/assets/css/plugins/images/sort_asc.png +0 -0
  224. package/src/assets/css/plugins/images/sort_desc.png +0 -0
  225. package/src/assets/css/plugins/images/sprite-skin-flat.png +0 -0
  226. package/src/assets/css/plugins/images/sprite-skin-flat2.png +0 -0
  227. package/src/assets/css/plugins/images/sprite-skin-nice.png +0 -0
  228. package/src/assets/css/plugins/images/sprite-skin-simple.png +0 -0
  229. package/src/assets/css/plugins/images/spritemap.png +0 -0
  230. package/src/assets/css/plugins/images/spritemap@2x.png +0 -0
  231. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.css +0 -126
  232. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css +0 -89
  233. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinNice.css +0 -85
  234. package/src/assets/css/plugins/ionRangeSlider/ion.rangeSlider.skinSimple.css +0 -85
  235. package/src/assets/css/plugins/jQueryUI/images/animated-overlay.gif +0 -0
  236. package/src/assets/css/plugins/jQueryUI/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  237. package/src/assets/css/plugins/jQueryUI/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  238. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  239. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  240. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  241. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  242. package/src/assets/css/plugins/jQueryUI/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  243. package/src/assets/css/plugins/jQueryUI/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  244. package/src/assets/css/plugins/jQueryUI/images/ui-icons_222222_256x240.png +0 -0
  245. package/src/assets/css/plugins/jQueryUI/images/ui-icons_2e83ff_256x240.png +0 -0
  246. package/src/assets/css/plugins/jQueryUI/images/ui-icons_454545_256x240.png +0 -0
  247. package/src/assets/css/plugins/jQueryUI/images/ui-icons_888888_256x240.png +0 -0
  248. package/src/assets/css/plugins/jQueryUI/images/ui-icons_cd0a0a_256x240.png +0 -0
  249. package/src/assets/css/plugins/jQueryUI/jquery-ui-1.10.4.custom.min.css +0 -7
  250. package/src/assets/css/plugins/jQueryUI/jquery-ui.css +0 -1177
  251. package/src/assets/css/plugins/jasny/jasny-bootstrap.min.css +0 -7
  252. package/src/assets/css/plugins/jqGrid/ui.jqgrid.css +0 -171
  253. package/src/assets/css/plugins/jsTree/32px.png +0 -0
  254. package/src/assets/css/plugins/jsTree/39px.png +0 -0
  255. package/src/assets/css/plugins/jsTree/40px.png +0 -0
  256. package/src/assets/css/plugins/jsTree/style.css +0 -1050
  257. package/src/assets/css/plugins/jsTree/style.min.css +0 -1
  258. package/src/assets/css/plugins/jsTree/throbber.gif +0 -0
  259. package/src/assets/css/plugins/ladda/ladda-themeless.min.css +0 -7
  260. package/src/assets/css/plugins/ladda/ladda.min.css +0 -9
  261. package/src/assets/css/plugins/morris/morris-0.4.3.min.css +0 -2
  262. package/src/assets/css/plugins/nouslider/jquery.nouislider.css +0 -165
  263. package/src/assets/css/plugins/select2/select2.min.css +0 -1
  264. package/src/assets/css/plugins/slick/ajax-loader.gif +0 -0
  265. package/src/assets/css/plugins/slick/fonts/slick.eot +0 -0
  266. package/src/assets/css/plugins/slick/fonts/slick.svg +0 -14
  267. package/src/assets/css/plugins/slick/fonts/slick.ttf +0 -0
  268. package/src/assets/css/plugins/slick/fonts/slick.woff +0 -0
  269. package/src/assets/css/plugins/slick/slick-theme.css +0 -201
  270. package/src/assets/css/plugins/slick/slick.css +0 -119
  271. package/src/assets/css/plugins/social-buttons/social-buttons.css +0 -68
  272. package/src/assets/css/plugins/steps/jquery.steps.css +0 -380
  273. package/src/assets/css/plugins/summernote/summernote-bs3.css +0 -5970
  274. package/src/assets/css/plugins/summernote/summernote.css +0 -446
  275. package/src/assets/css/plugins/sweetalert/sweetalert.css +0 -715
  276. package/src/assets/css/plugins/switchery/switchery.css +0 -32
  277. package/src/assets/css/plugins/toastr/ng2-toastr.min.css +0 -1
  278. package/src/assets/css/plugins/toastr/toastr.min.css +0 -222
  279. package/src/assets/css/plugins/touchspin/jquery.bootstrap-touchspin.min.css +0 -10
  280. package/src/assets/css/style.css +0 -9725
  281. package/src/assets/css/style.scss +0 -1
  282. package/src/assets/font-awesome/css/font-awesome.css +0 -2337
  283. package/src/assets/font-awesome/css/font-awesome.min.css +0 -4
  284. package/src/assets/font-awesome/fonts/FontAwesome.otf +0 -0
  285. package/src/assets/font-awesome/fonts/fontawesome-webfont.eot +0 -0
  286. package/src/assets/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
  287. package/src/assets/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
  288. package/src/assets/font-awesome/fonts/fontawesome-webfont.woff +0 -0
  289. package/src/assets/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
  290. package/src/assets/font-awesome/less/animated.less +0 -34
  291. package/src/assets/font-awesome/less/bordered-pulled.less +0 -25
  292. package/src/assets/font-awesome/less/core.less +0 -12
  293. package/src/assets/font-awesome/less/fixed-width.less +0 -6
  294. package/src/assets/font-awesome/less/font-awesome.less +0 -18
  295. package/src/assets/font-awesome/less/icons.less +0 -789
  296. package/src/assets/font-awesome/less/larger.less +0 -13
  297. package/src/assets/font-awesome/less/list.less +0 -19
  298. package/src/assets/font-awesome/less/mixins.less +0 -60
  299. package/src/assets/font-awesome/less/path.less +0 -15
  300. package/src/assets/font-awesome/less/rotated-flipped.less +0 -20
  301. package/src/assets/font-awesome/less/screen-reader.less +0 -5
  302. package/src/assets/font-awesome/less/stacked.less +0 -20
  303. package/src/assets/font-awesome/less/variables.less +0 -800
  304. package/src/assets/font-awesome/scss/_animated.scss +0 -34
  305. package/src/assets/font-awesome/scss/_bordered-pulled.scss +0 -25
  306. package/src/assets/font-awesome/scss/_core.scss +0 -12
  307. package/src/assets/font-awesome/scss/_fixed-width.scss +0 -6
  308. package/src/assets/font-awesome/scss/_icons.scss +0 -789
  309. package/src/assets/font-awesome/scss/_larger.scss +0 -13
  310. package/src/assets/font-awesome/scss/_list.scss +0 -19
  311. package/src/assets/font-awesome/scss/_mixins.scss +0 -60
  312. package/src/assets/font-awesome/scss/_path.scss +0 -15
  313. package/src/assets/font-awesome/scss/_rotated-flipped.scss +0 -20
  314. package/src/assets/font-awesome/scss/_screen-reader.scss +0 -5
  315. package/src/assets/font-awesome/scss/_stacked.scss +0 -20
  316. package/src/assets/font-awesome/scss/_variables.scss +0 -800
  317. package/src/assets/font-awesome/scss/font-awesome.scss +0 -18
  318. package/src/assets/fonts/DejaVuSans-Bold.ttf +0 -0
  319. package/src/assets/fonts/DejaVuSans-Oblique.ttf +0 -0
  320. package/src/assets/fonts/DejaVuSans.ttf +0 -0
  321. package/src/assets/fonts/Garuda.ttf +0 -0
  322. package/src/assets/fonts/NotoSansThaiUI-Regular.ttf +0 -0
  323. package/src/assets/fonts/TH-Charmonman-Regular.ttf +0 -0
  324. package/src/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  325. package/src/assets/fonts/glyphicons-halflings-regular.svg +0 -288
  326. package/src/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  327. package/src/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  328. package/src/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  329. package/src/assets/fonts/kanit-v3-latin_latin-ext_thai-regular.ttf +0 -0
  330. package/src/assets/img/2c2p_169x60.png +0 -0
  331. package/src/assets/img/2c2p_169x60_black_header.png +0 -0
  332. package/src/assets/img/calendar_gray.png +0 -0
  333. package/src/assets/img/success.png +0 -0
  334. package/src/assets/img/user.png +0 -0
  335. package/src/assets/img/warning.png +0 -0
  336. package/src/assets/js/bootstrap.js +0 -2363
  337. package/src/assets/js/bootstrap.min.js +0 -7
  338. package/src/assets/js/demo/chartjs-demo.js +0 -217
  339. package/src/assets/js/demo/dashboard-demo.js +0 -117
  340. package/src/assets/js/demo/flot-demo.js +0 -308
  341. package/src/assets/js/demo/flot-demo2.js +0 -377
  342. package/src/assets/js/demo/morris-demo.js +0 -89
  343. package/src/assets/js/demo/peity-demo.js +0 -33
  344. package/src/assets/js/demo/rickshaw-demo.js +0 -103
  345. package/src/assets/js/demo/sparkline-demo.js +0 -51
  346. package/src/assets/js/inspinia.js +0 -301
  347. package/src/assets/js/jquery-2.1.1.js +0 -4
  348. package/src/assets/js/jquery-3.3.1.min.js +0 -2
  349. package/src/assets/js/jquery-ui-1.10.4.min.js +0 -7
  350. package/src/assets/js/jquery-ui.custom.min.js +0 -16
  351. package/src/assets/js/plugins/blueimp/jquery.blueimp-gallery.min.js +0 -1
  352. package/src/assets/js/plugins/bootstrap-datepicker/bootstrap-datepicker.min.js +0 -9
  353. package/src/assets/js/plugins/bootstrap-markdown/bootstrap-markdown.js +0 -1386
  354. package/src/assets/js/plugins/bootstrap-markdown/markdown.js +0 -1616
  355. package/src/assets/js/plugins/bootstrap-timepicker/bootstrap-timepicker.min.js +0 -5
  356. package/src/assets/js/plugins/bootstrapTour/bootstrap-tour.min.js +0 -22
  357. package/src/assets/js/plugins/c3/c3.min.js +0 -5
  358. package/src/assets/js/plugins/chartJs/Chart.min.js +0 -14
  359. package/src/assets/js/plugins/chartist/chartist.min.js +0 -9
  360. package/src/assets/js/plugins/chartist/chartist.min.js.map +0 -1
  361. package/src/assets/js/plugins/chosen/chosen.jquery.js +0 -1211
  362. package/src/assets/js/plugins/clipboard/clipboard.min.js +0 -7
  363. package/src/assets/js/plugins/clockpicker/clockpicker.js +0 -729
  364. package/src/assets/js/plugins/codemirror/codemirror.js +0 -7830
  365. package/src/assets/js/plugins/codemirror/mode/apl/apl.js +0 -175
  366. package/src/assets/js/plugins/codemirror/mode/apl/index.html +0 -72
  367. package/src/assets/js/plugins/codemirror/mode/asterisk/asterisk.js +0 -198
  368. package/src/assets/js/plugins/codemirror/mode/asterisk/index.html +0 -154
  369. package/src/assets/js/plugins/codemirror/mode/clike/clike.js +0 -474
  370. package/src/assets/js/plugins/codemirror/mode/clike/index.html +0 -225
  371. package/src/assets/js/plugins/codemirror/mode/clike/scala.html +0 -767
  372. package/src/assets/js/plugins/codemirror/mode/clojure/clojure.js +0 -243
  373. package/src/assets/js/plugins/codemirror/mode/clojure/index.html +0 -88
  374. package/src/assets/js/plugins/codemirror/mode/cobol/cobol.js +0 -255
  375. package/src/assets/js/plugins/codemirror/mode/cobol/index.html +0 -210
  376. package/src/assets/js/plugins/codemirror/mode/coffeescript/coffeescript.js +0 -369
  377. package/src/assets/js/plugins/codemirror/mode/coffeescript/index.html +0 -740
  378. package/src/assets/js/plugins/codemirror/mode/commonlisp/commonlisp.js +0 -120
  379. package/src/assets/js/plugins/codemirror/mode/commonlisp/index.html +0 -177
  380. package/src/assets/js/plugins/codemirror/mode/css/css.js +0 -717
  381. package/src/assets/js/plugins/codemirror/mode/css/index.html +0 -70
  382. package/src/assets/js/plugins/codemirror/mode/css/less.html +0 -152
  383. package/src/assets/js/plugins/codemirror/mode/css/less_test.js +0 -51
  384. package/src/assets/js/plugins/codemirror/mode/css/scss.html +0 -157
  385. package/src/assets/js/plugins/codemirror/mode/css/scss_test.js +0 -110
  386. package/src/assets/js/plugins/codemirror/mode/css/test.js +0 -135
  387. package/src/assets/js/plugins/codemirror/mode/cypher/cypher.js +0 -146
  388. package/src/assets/js/plugins/codemirror/mode/cypher/index.html +0 -63
  389. package/src/assets/js/plugins/codemirror/mode/d/d.js +0 -218
  390. package/src/assets/js/plugins/codemirror/mode/d/index.html +0 -273
  391. package/src/assets/js/plugins/codemirror/mode/diff/diff.js +0 -47
  392. package/src/assets/js/plugins/codemirror/mode/diff/index.html +0 -117
  393. package/src/assets/js/plugins/codemirror/mode/django/django.js +0 -67
  394. package/src/assets/js/plugins/codemirror/mode/django/index.html +0 -63
  395. package/src/assets/js/plugins/codemirror/mode/dtd/dtd.js +0 -142
  396. package/src/assets/js/plugins/codemirror/mode/dtd/index.html +0 -89
  397. package/src/assets/js/plugins/codemirror/mode/dylan/dylan.js +0 -299
  398. package/src/assets/js/plugins/codemirror/mode/dylan/index.html +0 -407
  399. package/src/assets/js/plugins/codemirror/mode/ecl/ecl.js +0 -207
  400. package/src/assets/js/plugins/codemirror/mode/ecl/index.html +0 -52
  401. package/src/assets/js/plugins/codemirror/mode/eiffel/eiffel.js +0 -162
  402. package/src/assets/js/plugins/codemirror/mode/eiffel/index.html +0 -429
  403. package/src/assets/js/plugins/codemirror/mode/erlang/erlang.js +0 -622
  404. package/src/assets/js/plugins/codemirror/mode/erlang/index.html +0 -76
  405. package/src/assets/js/plugins/codemirror/mode/fortran/fortran.js +0 -188
  406. package/src/assets/js/plugins/codemirror/mode/fortran/index.html +0 -81
  407. package/src/assets/js/plugins/codemirror/mode/gas/gas.js +0 -345
  408. package/src/assets/js/plugins/codemirror/mode/gas/index.html +0 -68
  409. package/src/assets/js/plugins/codemirror/mode/gfm/gfm.js +0 -122
  410. package/src/assets/js/plugins/codemirror/mode/gfm/index.html +0 -82
  411. package/src/assets/js/plugins/codemirror/mode/gfm/test.js +0 -164
  412. package/src/assets/js/plugins/codemirror/mode/gherkin/gherkin.js +0 -178
  413. package/src/assets/js/plugins/codemirror/mode/gherkin/index.html +0 -48
  414. package/src/assets/js/plugins/codemirror/mode/go/go.js +0 -184
  415. package/src/assets/js/plugins/codemirror/mode/go/index.html +0 -85
  416. package/src/assets/js/plugins/codemirror/mode/groovy/groovy.js +0 -226
  417. package/src/assets/js/plugins/codemirror/mode/groovy/index.html +0 -84
  418. package/src/assets/js/plugins/codemirror/mode/haml/haml.js +0 -159
  419. package/src/assets/js/plugins/codemirror/mode/haml/index.html +0 -79
  420. package/src/assets/js/plugins/codemirror/mode/haml/test.js +0 -97
  421. package/src/assets/js/plugins/codemirror/mode/haskell/haskell.js +0 -267
  422. package/src/assets/js/plugins/codemirror/mode/haskell/index.html +0 -73
  423. package/src/assets/js/plugins/codemirror/mode/haxe/haxe.js +0 -518
  424. package/src/assets/js/plugins/codemirror/mode/haxe/index.html +0 -124
  425. package/src/assets/js/plugins/codemirror/mode/htmlembedded/htmlembedded.js +0 -86
  426. package/src/assets/js/plugins/codemirror/mode/htmlembedded/index.html +0 -58
  427. package/src/assets/js/plugins/codemirror/mode/htmlmixed/htmlmixed.js +0 -121
  428. package/src/assets/js/plugins/codemirror/mode/htmlmixed/index.html +0 -85
  429. package/src/assets/js/plugins/codemirror/mode/http/http.js +0 -113
  430. package/src/assets/js/plugins/codemirror/mode/http/index.html +0 -45
  431. package/src/assets/js/plugins/codemirror/mode/index.html +0 -125
  432. package/src/assets/js/plugins/codemirror/mode/jade/index.html +0 -70
  433. package/src/assets/js/plugins/codemirror/mode/jade/jade.js +0 -590
  434. package/src/assets/js/plugins/codemirror/mode/javascript/index.html +0 -114
  435. package/src/assets/js/plugins/codemirror/mode/javascript/javascript.js +0 -684
  436. package/src/assets/js/plugins/codemirror/mode/javascript/json-ld.html +0 -72
  437. package/src/assets/js/plugins/codemirror/mode/javascript/test.js +0 -194
  438. package/src/assets/js/plugins/codemirror/mode/javascript/typescript.html +0 -61
  439. package/src/assets/js/plugins/codemirror/mode/jinja2/index.html +0 -54
  440. package/src/assets/js/plugins/codemirror/mode/jinja2/jinja2.js +0 -142
  441. package/src/assets/js/plugins/codemirror/mode/julia/index.html +0 -195
  442. package/src/assets/js/plugins/codemirror/mode/julia/julia.js +0 -301
  443. package/src/assets/js/plugins/codemirror/mode/kotlin/index.html +0 -89
  444. package/src/assets/js/plugins/codemirror/mode/kotlin/kotlin.js +0 -280
  445. package/src/assets/js/plugins/codemirror/mode/livescript/index.html +0 -459
  446. package/src/assets/js/plugins/codemirror/mode/livescript/livescript.js +0 -280
  447. package/src/assets/js/plugins/codemirror/mode/lua/index.html +0 -85
  448. package/src/assets/js/plugins/codemirror/mode/lua/lua.js +0 -159
  449. package/src/assets/js/plugins/codemirror/mode/markdown/index.html +0 -359
  450. package/src/assets/js/plugins/codemirror/mode/markdown/markdown.js +0 -758
  451. package/src/assets/js/plugins/codemirror/mode/markdown/test.js +0 -754
  452. package/src/assets/js/plugins/codemirror/mode/meta.js +0 -144
  453. package/src/assets/js/plugins/codemirror/mode/mirc/index.html +0 -160
  454. package/src/assets/js/plugins/codemirror/mode/mirc/mirc.js +0 -193
  455. package/src/assets/js/plugins/codemirror/mode/mllike/index.html +0 -179
  456. package/src/assets/js/plugins/codemirror/mode/mllike/mllike.js +0 -205
  457. package/src/assets/js/plugins/codemirror/mode/modelica/index.html +0 -67
  458. package/src/assets/js/plugins/codemirror/mode/modelica/modelica.js +0 -245
  459. package/src/assets/js/plugins/codemirror/mode/nginx/index.html +0 -181
  460. package/src/assets/js/plugins/codemirror/mode/nginx/nginx.js +0 -178
  461. package/src/assets/js/plugins/codemirror/mode/ntriples/index.html +0 -45
  462. package/src/assets/js/plugins/codemirror/mode/ntriples/ntriples.js +0 -186
  463. package/src/assets/js/plugins/codemirror/mode/octave/index.html +0 -83
  464. package/src/assets/js/plugins/codemirror/mode/octave/octave.js +0 -135
  465. package/src/assets/js/plugins/codemirror/mode/pascal/index.html +0 -61
  466. package/src/assets/js/plugins/codemirror/mode/pascal/pascal.js +0 -109
  467. package/src/assets/js/plugins/codemirror/mode/pegjs/index.html +0 -66
  468. package/src/assets/js/plugins/codemirror/mode/pegjs/pegjs.js +0 -114
  469. package/src/assets/js/plugins/codemirror/mode/perl/index.html +0 -75
  470. package/src/assets/js/plugins/codemirror/mode/perl/perl.js +0 -832
  471. package/src/assets/js/plugins/codemirror/mode/php/index.html +0 -64
  472. package/src/assets/js/plugins/codemirror/mode/php/php.js +0 -226
  473. package/src/assets/js/plugins/codemirror/mode/php/test.js +0 -154
  474. package/src/assets/js/plugins/codemirror/mode/pig/index.html +0 -55
  475. package/src/assets/js/plugins/codemirror/mode/pig/pig.js +0 -188
  476. package/src/assets/js/plugins/codemirror/mode/properties/index.html +0 -53
  477. package/src/assets/js/plugins/codemirror/mode/properties/properties.js +0 -78
  478. package/src/assets/js/plugins/codemirror/mode/puppet/index.html +0 -121
  479. package/src/assets/js/plugins/codemirror/mode/puppet/puppet.js +0 -220
  480. package/src/assets/js/plugins/codemirror/mode/python/index.html +0 -198
  481. package/src/assets/js/plugins/codemirror/mode/python/python.js +0 -359
  482. package/src/assets/js/plugins/codemirror/mode/q/index.html +0 -144
  483. package/src/assets/js/plugins/codemirror/mode/q/q.js +0 -139
  484. package/src/assets/js/plugins/codemirror/mode/r/index.html +0 -85
  485. package/src/assets/js/plugins/codemirror/mode/r/r.js +0 -162
  486. package/src/assets/js/plugins/codemirror/mode/rpm/changes/index.html +0 -66
  487. package/src/assets/js/plugins/codemirror/mode/rpm/index.html +0 -149
  488. package/src/assets/js/plugins/codemirror/mode/rpm/rpm.js +0 -101
  489. package/src/assets/js/plugins/codemirror/mode/rst/index.html +0 -535
  490. package/src/assets/js/plugins/codemirror/mode/rst/rst.js +0 -557
  491. package/src/assets/js/plugins/codemirror/mode/ruby/index.html +0 -184
  492. package/src/assets/js/plugins/codemirror/mode/ruby/ruby.js +0 -285
  493. package/src/assets/js/plugins/codemirror/mode/ruby/test.js +0 -14
  494. package/src/assets/js/plugins/codemirror/mode/rust/index.html +0 -60
  495. package/src/assets/js/plugins/codemirror/mode/rust/rust.js +0 -451
  496. package/src/assets/js/plugins/codemirror/mode/sass/index.html +0 -66
  497. package/src/assets/js/plugins/codemirror/mode/sass/sass.js +0 -327
  498. package/src/assets/js/plugins/codemirror/mode/scheme/index.html +0 -77
  499. package/src/assets/js/plugins/codemirror/mode/scheme/scheme.js +0 -248
  500. package/src/assets/js/plugins/codemirror/mode/shell/index.html +0 -66
  501. package/src/assets/js/plugins/codemirror/mode/shell/shell.js +0 -138
  502. package/src/assets/js/plugins/codemirror/mode/shell/test.js +0 -58
  503. package/src/assets/js/plugins/codemirror/mode/sieve/index.html +0 -93
  504. package/src/assets/js/plugins/codemirror/mode/sieve/sieve.js +0 -193
  505. package/src/assets/js/plugins/codemirror/mode/slim/index.html +0 -96
  506. package/src/assets/js/plugins/codemirror/mode/slim/slim.js +0 -575
  507. package/src/assets/js/plugins/codemirror/mode/slim/test.js +0 -96
  508. package/src/assets/js/plugins/codemirror/mode/smalltalk/index.html +0 -68
  509. package/src/assets/js/plugins/codemirror/mode/smalltalk/smalltalk.js +0 -168
  510. package/src/assets/js/plugins/codemirror/mode/smarty/index.html +0 -136
  511. package/src/assets/js/plugins/codemirror/mode/smarty/smarty.js +0 -221
  512. package/src/assets/js/plugins/codemirror/mode/smartymixed/index.html +0 -114
  513. package/src/assets/js/plugins/codemirror/mode/smartymixed/smartymixed.js +0 -197
  514. package/src/assets/js/plugins/codemirror/mode/solr/index.html +0 -57
  515. package/src/assets/js/plugins/codemirror/mode/solr/solr.js +0 -104
  516. package/src/assets/js/plugins/codemirror/mode/sparql/index.html +0 -53
  517. package/src/assets/js/plugins/codemirror/mode/sparql/sparql.js +0 -160
  518. package/src/assets/js/plugins/codemirror/mode/sql/index.html +0 -84
  519. package/src/assets/js/plugins/codemirror/mode/sql/sql.js +0 -393
  520. package/src/assets/js/plugins/codemirror/mode/stex/index.html +0 -110
  521. package/src/assets/js/plugins/codemirror/mode/stex/stex.js +0 -262
  522. package/src/assets/js/plugins/codemirror/mode/stex/test.js +0 -123
  523. package/src/assets/js/plugins/codemirror/mode/tcl/index.html +0 -142
  524. package/src/assets/js/plugins/codemirror/mode/tcl/tcl.js +0 -147
  525. package/src/assets/js/plugins/codemirror/mode/textile/index.html +0 -191
  526. package/src/assets/js/plugins/codemirror/mode/textile/test.js +0 -406
  527. package/src/assets/js/plugins/codemirror/mode/textile/textile.js +0 -553
  528. package/src/assets/js/plugins/codemirror/mode/tiddlywiki/index.html +0 -154
  529. package/src/assets/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.css +0 -14
  530. package/src/assets/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.js +0 -369
  531. package/src/assets/js/plugins/codemirror/mode/tiki/index.html +0 -95
  532. package/src/assets/js/plugins/codemirror/mode/tiki/tiki.css +0 -26
  533. package/src/assets/js/plugins/codemirror/mode/tiki/tiki.js +0 -323
  534. package/src/assets/js/plugins/codemirror/mode/toml/index.html +0 -73
  535. package/src/assets/js/plugins/codemirror/mode/toml/toml.js +0 -88
  536. package/src/assets/js/plugins/codemirror/mode/tornado/index.html +0 -63
  537. package/src/assets/js/plugins/codemirror/mode/tornado/tornado.js +0 -68
  538. package/src/assets/js/plugins/codemirror/mode/turtle/index.html +0 -50
  539. package/src/assets/js/plugins/codemirror/mode/turtle/turtle.js +0 -160
  540. package/src/assets/js/plugins/codemirror/mode/vb/index.html +0 -102
  541. package/src/assets/js/plugins/codemirror/mode/vb/vb.js +0 -274
  542. package/src/assets/js/plugins/codemirror/mode/vbscript/index.html +0 -55
  543. package/src/assets/js/plugins/codemirror/mode/vbscript/vbscript.js +0 -350
  544. package/src/assets/js/plugins/codemirror/mode/velocity/index.html +0 -118
  545. package/src/assets/js/plugins/codemirror/mode/velocity/velocity.js +0 -201
  546. package/src/assets/js/plugins/codemirror/mode/verilog/index.html +0 -120
  547. package/src/assets/js/plugins/codemirror/mode/verilog/test.js +0 -273
  548. package/src/assets/js/plugins/codemirror/mode/verilog/verilog.js +0 -364
  549. package/src/assets/js/plugins/codemirror/mode/xml/index.html +0 -57
  550. package/src/assets/js/plugins/codemirror/mode/xml/test.js +0 -51
  551. package/src/assets/js/plugins/codemirror/mode/xml/xml.js +0 -384
  552. package/src/assets/js/plugins/codemirror/mode/xquery/index.html +0 -210
  553. package/src/assets/js/plugins/codemirror/mode/xquery/test.js +0 -67
  554. package/src/assets/js/plugins/codemirror/mode/xquery/xquery.js +0 -447
  555. package/src/assets/js/plugins/codemirror/mode/yaml/index.html +0 -80
  556. package/src/assets/js/plugins/codemirror/mode/yaml/yaml.js +0 -112
  557. package/src/assets/js/plugins/codemirror/mode/z80/index.html +0 -52
  558. package/src/assets/js/plugins/codemirror/mode/z80/z80.js +0 -100
  559. package/src/assets/js/plugins/colorpicker/bootstrap-colorpicker.min.js +0 -1
  560. package/src/assets/js/plugins/cropper/cropper.min.js +0 -9
  561. package/src/assets/js/plugins/d3/d3.min.js +0 -5
  562. package/src/assets/js/plugins/dataTables/datatables.min.js +0 -336
  563. package/src/assets/js/plugins/datapicker/bootstrap-datepicker.js +0 -1671
  564. package/src/assets/js/plugins/datatables.net/jquery.dataTables.js +0 -15344
  565. package/src/assets/js/plugins/daterangepicker/daterangepicker.js +0 -1304
  566. package/src/assets/js/plugins/diff_match_patch/COPYING +0 -177
  567. package/src/assets/js/plugins/diff_match_patch/README.txt +0 -43
  568. package/src/assets/js/plugins/diff_match_patch/javascript/diff_match_patch.js +0 -49
  569. package/src/assets/js/plugins/dotdotdot/jquery.dotdotdot.min.js +0 -13
  570. package/src/assets/js/plugins/dropzone/dropzone.js +0 -1841
  571. package/src/assets/js/plugins/easypiechart/easypiechart.js +0 -350
  572. package/src/assets/js/plugins/easypiechart/jquery.easypiechart.js +0 -359
  573. package/src/assets/js/plugins/flot/curvedLines.js +0 -315
  574. package/src/assets/js/plugins/flot/excanvas.min.js +0 -1
  575. package/src/assets/js/plugins/flot/jquery.flot.js +0 -3168
  576. package/src/assets/js/plugins/flot/jquery.flot.pie.js +0 -820
  577. package/src/assets/js/plugins/flot/jquery.flot.resize.js +0 -59
  578. package/src/assets/js/plugins/flot/jquery.flot.spline.js +0 -212
  579. package/src/assets/js/plugins/flot/jquery.flot.symbol.js +0 -71
  580. package/src/assets/js/plugins/flot/jquery.flot.time.js +0 -432
  581. package/src/assets/js/plugins/flot/jquery.flot.tooltip.min.js +0 -12
  582. package/src/assets/js/plugins/footable/footable.all.min.js +0 -14
  583. package/src/assets/js/plugins/fullcalendar/fullcalendar.min.js +0 -8
  584. package/src/assets/js/plugins/fullcalendar/moment.min.js +0 -7
  585. package/src/assets/js/plugins/gritter/images/gritter-light.png +0 -0
  586. package/src/assets/js/plugins/gritter/images/gritter-long.png +0 -0
  587. package/src/assets/js/plugins/gritter/images/gritter.png +0 -0
  588. package/src/assets/js/plugins/gritter/images/ie-spacer.gif +0 -0
  589. package/src/assets/js/plugins/gritter/jquery.gritter.css +0 -137
  590. package/src/assets/js/plugins/gritter/jquery.gritter.min.js +0 -1
  591. package/src/assets/js/plugins/i18next/i18next.min.js +0 -7
  592. package/src/assets/js/plugins/iCheck/icheck.min.js +0 -11
  593. package/src/assets/js/plugins/idle-timer/idle-timer.min.js +0 -2
  594. package/src/assets/js/plugins/ionRangeSlider/ion.rangeSlider.min.js +0 -26
  595. package/src/assets/js/plugins/jasny/jasny-bootstrap.min.js +0 -6
  596. package/src/assets/js/plugins/jeditable/jquery.jeditable.js +0 -543
  597. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ar.js +0 -128
  598. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-bg.js +0 -134
  599. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-bg1251.js +0 -132
  600. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cat.js +0 -130
  601. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cn.js +0 -169
  602. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-cs.js +0 -130
  603. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-da.js +0 -130
  604. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-de.js +0 -173
  605. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-dk.js +0 -129
  606. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-el.js +0 -128
  607. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-en.js +0 -170
  608. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-es.js +0 -130
  609. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fa.js +0 -147
  610. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fi.js +0 -131
  611. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-fr.js +0 -128
  612. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-gl.js +0 -128
  613. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-he.js +0 -129
  614. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hr.js +0 -164
  615. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hr1250.js +0 -164
  616. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-hu.js +0 -131
  617. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-id.js +0 -170
  618. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-is.js +0 -128
  619. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-it.js +0 -1
  620. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ja.js +0 -158
  621. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-kr.js +0 -130
  622. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-lt.js +0 -130
  623. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-mne.js +0 -130
  624. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-nl.js +0 -150
  625. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-no.js +0 -1
  626. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pl.js +0 -134
  627. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pt-br.js +0 -137
  628. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-pt.js +0 -127
  629. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ro.js +0 -141
  630. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ru.js +0 -129
  631. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sk.js +0 -129
  632. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sr-latin.js +0 -130
  633. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sr.js +0 -130
  634. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-sv.js +0 -129
  635. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-th.js +0 -130
  636. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-tr.js +0 -128
  637. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-tw.js +0 -131
  638. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-ua.js +0 -129
  639. package/src/assets/js/plugins/jqGrid/i18n/grid.locale-vi.js +0 -170
  640. package/src/assets/js/plugins/jqGrid/jquery.jqGrid.min.js +0 -545
  641. package/src/assets/js/plugins/jquery-ui/i18n/jquery-ui-i18n.min.js +0 -6
  642. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-af.min.js +0 -4
  643. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar-DZ.min.js +0 -4
  644. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar.min.js +0 -4
  645. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-az.min.js +0 -4
  646. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-be.min.js +0 -4
  647. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bg.min.js +0 -4
  648. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bs.min.js +0 -4
  649. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ca.min.js +0 -4
  650. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cs.min.js +0 -4
  651. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cy-GB.min.js +0 -4
  652. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-da.min.js +0 -4
  653. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-de.min.js +0 -4
  654. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-el.min.js +0 -4
  655. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-AU.min.js +0 -4
  656. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-GB.min.js +0 -4
  657. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-NZ.min.js +0 -4
  658. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eo.min.js +0 -4
  659. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-es.min.js +0 -4
  660. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-et.min.js +0 -4
  661. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eu.min.js +0 -4
  662. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fa.min.js +0 -4
  663. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fi.min.js +0 -4
  664. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fo.min.js +0 -4
  665. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CA.min.js +0 -4
  666. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CH.min.js +0 -4
  667. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr.min.js +0 -4
  668. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-gl.min.js +0 -4
  669. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-he.min.js +0 -4
  670. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hi.min.js +0 -4
  671. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hr.min.js +0 -4
  672. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js +0 -4
  673. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hy.min.js +0 -4
  674. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-id.min.js +0 -4
  675. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-is.min.js +0 -4
  676. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-it.min.js +0 -4
  677. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ja.min.js +0 -4
  678. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ka.min.js +0 -4
  679. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-kk.min.js +0 -4
  680. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-km.min.js +0 -4
  681. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ko.min.js +0 -4
  682. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ky.min.js +0 -4
  683. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lb.min.js +0 -4
  684. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lt.min.js +0 -4
  685. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lv.min.js +0 -4
  686. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-mk.min.js +0 -4
  687. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ml.min.js +0 -4
  688. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ms.min.js +0 -4
  689. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nb.min.js +0 -4
  690. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl-BE.min.js +0 -4
  691. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl.min.js +0 -4
  692. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nn.min.js +0 -4
  693. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-no.min.js +0 -4
  694. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pl.min.js +0 -4
  695. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt-BR.min.js +0 -4
  696. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt.min.js +0 -4
  697. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-rm.min.js +0 -4
  698. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ro.min.js +0 -4
  699. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ru.min.js +0 -4
  700. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sk.min.js +0 -4
  701. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sl.min.js +0 -4
  702. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sq.min.js +0 -4
  703. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr-SR.min.js +0 -4
  704. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr.min.js +0 -4
  705. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sv.min.js +0 -4
  706. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ta.min.js +0 -4
  707. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-th.min.js +0 -4
  708. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tj.min.js +0 -4
  709. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tr.min.js +0 -4
  710. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-uk.min.js +0 -4
  711. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-vi.min.js +0 -4
  712. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-CN.min.js +0 -4
  713. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-HK.min.js +0 -4
  714. package/src/assets/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-TW.min.js +0 -4
  715. package/src/assets/js/plugins/jquery-ui/images/animated-overlay.gif +0 -0
  716. package/src/assets/js/plugins/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  717. package/src/assets/js/plugins/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  718. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  719. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  720. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  721. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  722. package/src/assets/js/plugins/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  723. package/src/assets/js/plugins/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  724. package/src/assets/js/plugins/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
  725. package/src/assets/js/plugins/jquery-ui/images/ui-icons_2e83ff_256x240.png +0 -0
  726. package/src/assets/js/plugins/jquery-ui/images/ui-icons_454545_256x240.png +0 -0
  727. package/src/assets/js/plugins/jquery-ui/images/ui-icons_888888_256x240.png +0 -0
  728. package/src/assets/js/plugins/jquery-ui/images/ui-icons_cd0a0a_256x240.png +0 -0
  729. package/src/assets/js/plugins/jquery-ui/jquery-ui.css +0 -1189
  730. package/src/assets/js/plugins/jquery-ui/jquery-ui.js +0 -15040
  731. package/src/assets/js/plugins/jquery-ui/jquery-ui.min.css +0 -4
  732. package/src/assets/js/plugins/jquery-ui/jquery-ui.min.js +0 -12
  733. package/src/assets/js/plugins/jsKnob/jquery.knob.js +0 -791
  734. package/src/assets/js/plugins/jsTree/jstree.min.js +0 -5
  735. package/src/assets/js/plugins/justified-gallery/README.md +0 -14
  736. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.css +0 -73
  737. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.js +0 -258
  738. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.min.css +0 -17
  739. package/src/assets/js/plugins/justified-gallery/jquery.justifiedgallery.min.js +0 -24
  740. package/src/assets/js/plugins/justified-gallery/loading.gif +0 -0
  741. package/src/assets/js/plugins/jvectormap/jquery-jvectormap-2.0.2.css +0 -130
  742. package/src/assets/js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js +0 -3328
  743. package/src/assets/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js +0 -1
  744. package/src/assets/js/plugins/ladda/ladda.jquery.min.js +0 -8
  745. package/src/assets/js/plugins/ladda/ladda.min.js +0 -8
  746. package/src/assets/js/plugins/ladda/spin.min.js +0 -1
  747. package/src/assets/js/plugins/masonary/masonry.pkgd.min.js +0 -9
  748. package/src/assets/js/plugins/metisMenu/jquery.metisMenu.js +0 -10
  749. package/src/assets/js/plugins/morris/morris.js +0 -1892
  750. package/src/assets/js/plugins/morris/raphael-2.1.0.min.js +0 -10
  751. package/src/assets/js/plugins/nestable/jquery.nestable.js +0 -484
  752. package/src/assets/js/plugins/nouslider/jquery.nouislider.min.js +0 -34
  753. package/src/assets/js/plugins/pace/pace.min.js +0 -2
  754. package/src/assets/js/plugins/peity/jquery.peity.min.js +0 -13
  755. package/src/assets/js/plugins/preetyTextDiff/jquery.pretty-text-diff.min.js +0 -76
  756. package/src/assets/js/plugins/rickshaw/rickshaw.min.js +0 -3
  757. package/src/assets/js/plugins/rickshaw/vendor/d3.v3.js +0 -5
  758. package/src/assets/js/plugins/select2/select2.full.min.js +0 -3
  759. package/src/assets/js/plugins/slick/slick.min.js +0 -18
  760. package/src/assets/js/plugins/slimscroll/jquery.slimscroll.js +0 -474
  761. package/src/assets/js/plugins/slimscroll/jquery.slimscroll.min.js +0 -16
  762. package/src/assets/js/plugins/sparkline/jquery.sparkline.min.js +0 -5
  763. package/src/assets/js/plugins/staps/jquery.steps.min.js +0 -6
  764. package/src/assets/js/plugins/summernote/summernote.min.js +0 -2
  765. package/src/assets/js/plugins/sweetalert/sweetalert.min.js +0 -1
  766. package/src/assets/js/plugins/switchery/switchery.js +0 -1
  767. package/src/assets/js/plugins/tinycon/tinycon.min.js +0 -8
  768. package/src/assets/js/plugins/toastr/toastr.min.js +0 -2
  769. package/src/assets/js/plugins/touchspin/jquery.bootstrap-touchspin.min.js +0 -9
  770. package/src/assets/js/plugins/validate/jquery.validate.min.js +0 -4
  771. package/src/assets/js/plugins/video/responsible-video.js +0 -21
  772. package/src/assets/js/plugins/wow/wow.min.js +0 -2
  773. package/src/environment.ts +0 -24
  774. package/src/index.html +0 -23
  775. package/src/main.ts +0 -10
  776. package/src/polyfills.ts +0 -3
  777. package/src/tsconfig.json +0 -21
  778. package/src/vendor.ts +0 -32
  779. package/tslint.json +0 -93
  780. package/types.d.ts +0 -0
  781. package/web.config +0 -34
  782. package/webpack.config.js +0 -1
@@ -1,1892 +0,0 @@
1
- /* @license
2
- morris.js v0.5.0
3
- Copyright 2014 Olly Smith All rights reserved.
4
- Licensed under the BSD-2-Clause License.
5
- */
6
-
7
-
8
- (function() {
9
- var $, Morris, minutesSpecHelper, secondsSpecHelper,
10
- __slice = [].slice,
11
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
12
- __hasProp = {}.hasOwnProperty,
13
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
14
- __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
15
-
16
- Morris = window.Morris = {};
17
-
18
- $ = jQuery;
19
-
20
- Morris.EventEmitter = (function() {
21
- function EventEmitter() {}
22
-
23
- EventEmitter.prototype.on = function(name, handler) {
24
- if (this.handlers == null) {
25
- this.handlers = {};
26
- }
27
- if (this.handlers[name] == null) {
28
- this.handlers[name] = [];
29
- }
30
- this.handlers[name].push(handler);
31
- return this;
32
- };
33
-
34
- EventEmitter.prototype.fire = function() {
35
- var args, handler, name, _i, _len, _ref, _results;
36
- name = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
37
- if ((this.handlers != null) && (this.handlers[name] != null)) {
38
- _ref = this.handlers[name];
39
- _results = [];
40
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
41
- handler = _ref[_i];
42
- _results.push(handler.apply(null, args));
43
- }
44
- return _results;
45
- }
46
- };
47
-
48
- return EventEmitter;
49
-
50
- })();
51
-
52
- Morris.commas = function(num) {
53
- var absnum, intnum, ret, strabsnum;
54
- if (num != null) {
55
- ret = num < 0 ? "-" : "";
56
- absnum = Math.abs(num);
57
- intnum = Math.floor(absnum).toFixed(0);
58
- ret += intnum.replace(/(?=(?:\d{3})+$)(?!^)/g, ',');
59
- strabsnum = absnum.toString();
60
- if (strabsnum.length > intnum.length) {
61
- ret += strabsnum.slice(intnum.length);
62
- }
63
- return ret;
64
- } else {
65
- return '-';
66
- }
67
- };
68
-
69
- Morris.pad2 = function(number) {
70
- return (number < 10 ? '0' : '') + number;
71
- };
72
-
73
- Morris.Grid = (function(_super) {
74
- __extends(Grid, _super);
75
-
76
- function Grid(options) {
77
- this.resizeHandler = __bind(this.resizeHandler, this);
78
- var _this = this;
79
- if (typeof options.element === 'string') {
80
- this.el = $(document.getElementById(options.element));
81
- } else {
82
- this.el = $(options.element);
83
- }
84
- if ((this.el == null) || this.el.length === 0) {
85
- throw new Error("Graph container element not found");
86
- }
87
- if (this.el.css('position') === 'static') {
88
- this.el.css('position', 'relative');
89
- }
90
- this.options = $.extend({}, this.gridDefaults, this.defaults || {}, options);
91
- if (typeof this.options.units === 'string') {
92
- this.options.postUnits = options.units;
93
- }
94
- this.raphael = new Raphael(this.el[0]);
95
- this.elementWidth = null;
96
- this.elementHeight = null;
97
- this.dirty = false;
98
- this.selectFrom = null;
99
- if (this.init) {
100
- this.init();
101
- }
102
- this.setData(this.options.data);
103
- this.el.bind('mousemove', function(evt) {
104
- var left, offset, right, width, x;
105
- offset = _this.el.offset();
106
- x = evt.pageX - offset.left;
107
- if (_this.selectFrom) {
108
- left = _this.data[_this.hitTest(Math.min(x, _this.selectFrom))]._x;
109
- right = _this.data[_this.hitTest(Math.max(x, _this.selectFrom))]._x;
110
- width = right - left;
111
- return _this.selectionRect.attr({
112
- x: left,
113
- width: width
114
- });
115
- } else {
116
- return _this.fire('hovermove', x, evt.pageY - offset.top);
117
- }
118
- });
119
- this.el.bind('mouseleave', function(evt) {
120
- if (_this.selectFrom) {
121
- _this.selectionRect.hide();
122
- _this.selectFrom = null;
123
- }
124
- return _this.fire('hoverout');
125
- });
126
- this.el.bind('touchstart touchmove touchend', function(evt) {
127
- var offset, touch;
128
- touch = evt.originalEvent.touches[0] || evt.originalEvent.changedTouches[0];
129
- offset = _this.el.offset();
130
- return _this.fire('hovermove', touch.pageX - offset.left, touch.pageY - offset.top);
131
- });
132
- this.el.bind('click', function(evt) {
133
- var offset;
134
- offset = _this.el.offset();
135
- return _this.fire('gridclick', evt.pageX - offset.left, evt.pageY - offset.top);
136
- });
137
- if (this.options.rangeSelect) {
138
- this.selectionRect = this.raphael.rect(0, 0, 0, this.el.innerHeight()).attr({
139
- fill: this.options.rangeSelectColor,
140
- stroke: false
141
- }).toBack().hide();
142
- this.el.bind('mousedown', function(evt) {
143
- var offset;
144
- offset = _this.el.offset();
145
- return _this.startRange(evt.pageX - offset.left);
146
- });
147
- this.el.bind('mouseup', function(evt) {
148
- var offset;
149
- offset = _this.el.offset();
150
- _this.endRange(evt.pageX - offset.left);
151
- return _this.fire('hovermove', evt.pageX - offset.left, evt.pageY - offset.top);
152
- });
153
- }
154
- if (this.options.resize) {
155
- $(window).bind('resize', function(evt) {
156
- if (_this.timeoutId != null) {
157
- window.clearTimeout(_this.timeoutId);
158
- }
159
- return _this.timeoutId = window.setTimeout(_this.resizeHandler, 100);
160
- });
161
- }
162
- this.el.css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)');
163
- if (this.postInit) {
164
- this.postInit();
165
- }
166
- }
167
-
168
- Grid.prototype.gridDefaults = {
169
- dateFormat: null,
170
- axes: true,
171
- grid: true,
172
- gridLineColor: '#aaa',
173
- gridStrokeWidth: 0.5,
174
- gridTextColor: '#888',
175
- gridTextSize: 12,
176
- gridTextFamily: 'sans-serif',
177
- gridTextWeight: 'normal',
178
- hideHover: false,
179
- yLabelFormat: null,
180
- xLabelAngle: 0,
181
- numLines: 5,
182
- padding: 25,
183
- parseTime: true,
184
- postUnits: '',
185
- preUnits: '',
186
- ymax: 'auto',
187
- ymin: 'auto 0',
188
- goals: [],
189
- goalStrokeWidth: 1.0,
190
- goalLineColors: ['#666633', '#999966', '#cc6666', '#663333'],
191
- events: [],
192
- eventStrokeWidth: 1.0,
193
- eventLineColors: ['#005a04', '#ccffbb', '#3a5f0b', '#005502'],
194
- rangeSelect: null,
195
- rangeSelectColor: '#eef',
196
- resize: false
197
- };
198
-
199
- Grid.prototype.setData = function(data, redraw) {
200
- var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval, _ref;
201
- if (redraw == null) {
202
- redraw = true;
203
- }
204
- this.options.data = data;
205
- if ((data == null) || data.length === 0) {
206
- this.data = [];
207
- this.raphael.clear();
208
- if (this.hover != null) {
209
- this.hover.hide();
210
- }
211
- return;
212
- }
213
- ymax = this.cumulative ? 0 : null;
214
- ymin = this.cumulative ? 0 : null;
215
- if (this.options.goals.length > 0) {
216
- minGoal = Math.min.apply(Math, this.options.goals);
217
- maxGoal = Math.max.apply(Math, this.options.goals);
218
- ymin = ymin != null ? Math.min(ymin, minGoal) : minGoal;
219
- ymax = ymax != null ? Math.max(ymax, maxGoal) : maxGoal;
220
- }
221
- this.data = (function() {
222
- var _i, _len, _results;
223
- _results = [];
224
- for (index = _i = 0, _len = data.length; _i < _len; index = ++_i) {
225
- row = data[index];
226
- ret = {
227
- src: row
228
- };
229
- ret.label = row[this.options.xkey];
230
- if (this.options.parseTime) {
231
- ret.x = Morris.parseDate(ret.label);
232
- if (this.options.dateFormat) {
233
- ret.label = this.options.dateFormat(ret.x);
234
- } else if (typeof ret.label === 'number') {
235
- ret.label = new Date(ret.label).toString();
236
- }
237
- } else {
238
- ret.x = index;
239
- if (this.options.xLabelFormat) {
240
- ret.label = this.options.xLabelFormat(ret);
241
- }
242
- }
243
- total = 0;
244
- ret.y = (function() {
245
- var _j, _len1, _ref, _results1;
246
- _ref = this.options.ykeys;
247
- _results1 = [];
248
- for (idx = _j = 0, _len1 = _ref.length; _j < _len1; idx = ++_j) {
249
- ykey = _ref[idx];
250
- yval = row[ykey];
251
- if (typeof yval === 'string') {
252
- yval = parseFloat(yval);
253
- }
254
- if ((yval != null) && typeof yval !== 'number') {
255
- yval = null;
256
- }
257
- if (yval != null) {
258
- if (this.cumulative) {
259
- total += yval;
260
- } else {
261
- if (ymax != null) {
262
- ymax = Math.max(yval, ymax);
263
- ymin = Math.min(yval, ymin);
264
- } else {
265
- ymax = ymin = yval;
266
- }
267
- }
268
- }
269
- if (this.cumulative && (total != null)) {
270
- ymax = Math.max(total, ymax);
271
- ymin = Math.min(total, ymin);
272
- }
273
- _results1.push(yval);
274
- }
275
- return _results1;
276
- }).call(this);
277
- _results.push(ret);
278
- }
279
- return _results;
280
- }).call(this);
281
- if (this.options.parseTime) {
282
- this.data = this.data.sort(function(a, b) {
283
- return (a.x > b.x) - (b.x > a.x);
284
- });
285
- }
286
- this.xmin = this.data[0].x;
287
- this.xmax = this.data[this.data.length - 1].x;
288
- this.events = [];
289
- if (this.options.events.length > 0) {
290
- if (this.options.parseTime) {
291
- this.events = (function() {
292
- var _i, _len, _ref, _results;
293
- _ref = this.options.events;
294
- _results = [];
295
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
296
- e = _ref[_i];
297
- _results.push(Morris.parseDate(e));
298
- }
299
- return _results;
300
- }).call(this);
301
- } else {
302
- this.events = this.options.events;
303
- }
304
- this.xmax = Math.max(this.xmax, Math.max.apply(Math, this.events));
305
- this.xmin = Math.min(this.xmin, Math.min.apply(Math, this.events));
306
- }
307
- if (this.xmin === this.xmax) {
308
- this.xmin -= 1;
309
- this.xmax += 1;
310
- }
311
- this.ymin = this.yboundary('min', ymin);
312
- this.ymax = this.yboundary('max', ymax);
313
- if (this.ymin === this.ymax) {
314
- if (ymin) {
315
- this.ymin -= 1;
316
- }
317
- this.ymax += 1;
318
- }
319
- if (((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'y') || this.options.grid === true) {
320
- if (this.options.ymax === this.gridDefaults.ymax && this.options.ymin === this.gridDefaults.ymin) {
321
- this.grid = this.autoGridLines(this.ymin, this.ymax, this.options.numLines);
322
- this.ymin = Math.min(this.ymin, this.grid[0]);
323
- this.ymax = Math.max(this.ymax, this.grid[this.grid.length - 1]);
324
- } else {
325
- step = (this.ymax - this.ymin) / (this.options.numLines - 1);
326
- this.grid = (function() {
327
- var _i, _ref1, _ref2, _results;
328
- _results = [];
329
- for (y = _i = _ref1 = this.ymin, _ref2 = this.ymax; step > 0 ? _i <= _ref2 : _i >= _ref2; y = _i += step) {
330
- _results.push(y);
331
- }
332
- return _results;
333
- }).call(this);
334
- }
335
- }
336
- this.dirty = true;
337
- if (redraw) {
338
- return this.redraw();
339
- }
340
- };
341
-
342
- Grid.prototype.yboundary = function(boundaryType, currentValue) {
343
- var boundaryOption, suggestedValue;
344
- boundaryOption = this.options["y" + boundaryType];
345
- if (typeof boundaryOption === 'string') {
346
- if (boundaryOption.slice(0, 4) === 'auto') {
347
- if (boundaryOption.length > 5) {
348
- suggestedValue = parseInt(boundaryOption.slice(5), 10);
349
- if (currentValue == null) {
350
- return suggestedValue;
351
- }
352
- return Math[boundaryType](currentValue, suggestedValue);
353
- } else {
354
- if (currentValue != null) {
355
- return currentValue;
356
- } else {
357
- return 0;
358
- }
359
- }
360
- } else {
361
- return parseInt(boundaryOption, 10);
362
- }
363
- } else {
364
- return boundaryOption;
365
- }
366
- };
367
-
368
- Grid.prototype.autoGridLines = function(ymin, ymax, nlines) {
369
- var gmax, gmin, grid, smag, span, step, unit, y, ymag;
370
- span = ymax - ymin;
371
- ymag = Math.floor(Math.log(span) / Math.log(10));
372
- unit = Math.pow(10, ymag);
373
- gmin = Math.floor(ymin / unit) * unit;
374
- gmax = Math.ceil(ymax / unit) * unit;
375
- step = (gmax - gmin) / (nlines - 1);
376
- if (unit === 1 && step > 1 && Math.ceil(step) !== step) {
377
- step = Math.ceil(step);
378
- gmax = gmin + step * (nlines - 1);
379
- }
380
- if (gmin < 0 && gmax > 0) {
381
- gmin = Math.floor(ymin / step) * step;
382
- gmax = Math.ceil(ymax / step) * step;
383
- }
384
- if (step < 1) {
385
- smag = Math.floor(Math.log(step) / Math.log(10));
386
- grid = (function() {
387
- var _i, _results;
388
- _results = [];
389
- for (y = _i = gmin; step > 0 ? _i <= gmax : _i >= gmax; y = _i += step) {
390
- _results.push(parseFloat(y.toFixed(1 - smag)));
391
- }
392
- return _results;
393
- })();
394
- } else {
395
- grid = (function() {
396
- var _i, _results;
397
- _results = [];
398
- for (y = _i = gmin; step > 0 ? _i <= gmax : _i >= gmax; y = _i += step) {
399
- _results.push(y);
400
- }
401
- return _results;
402
- })();
403
- }
404
- return grid;
405
- };
406
-
407
- Grid.prototype._calc = function() {
408
- var bottomOffsets, gridLine, h, i, w, yLabelWidths, _ref, _ref1;
409
- w = this.el.width();
410
- h = this.el.height();
411
- if (this.elementWidth !== w || this.elementHeight !== h || this.dirty) {
412
- this.elementWidth = w;
413
- this.elementHeight = h;
414
- this.dirty = false;
415
- this.left = this.options.padding;
416
- this.right = this.elementWidth - this.options.padding;
417
- this.top = this.options.padding;
418
- this.bottom = this.elementHeight - this.options.padding;
419
- if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'y') {
420
- yLabelWidths = (function() {
421
- var _i, _len, _ref1, _results;
422
- _ref1 = this.grid;
423
- _results = [];
424
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
425
- gridLine = _ref1[_i];
426
- _results.push(this.measureText(this.yAxisFormat(gridLine)).width);
427
- }
428
- return _results;
429
- }).call(this);
430
- this.left += Math.max.apply(Math, yLabelWidths);
431
- }
432
- if ((_ref1 = this.options.axes) === true || _ref1 === 'both' || _ref1 === 'x') {
433
- bottomOffsets = (function() {
434
- var _i, _ref2, _results;
435
- _results = [];
436
- for (i = _i = 0, _ref2 = this.data.length; 0 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 0 <= _ref2 ? ++_i : --_i) {
437
- _results.push(this.measureText(this.data[i].text, -this.options.xLabelAngle).height);
438
- }
439
- return _results;
440
- }).call(this);
441
- this.bottom -= Math.max.apply(Math, bottomOffsets);
442
- }
443
- this.width = Math.max(1, this.right - this.left);
444
- this.height = Math.max(1, this.bottom - this.top);
445
- this.dx = this.width / (this.xmax - this.xmin);
446
- this.dy = this.height / (this.ymax - this.ymin);
447
- if (this.calc) {
448
- return this.calc();
449
- }
450
- }
451
- };
452
-
453
- Grid.prototype.transY = function(y) {
454
- return this.bottom - (y - this.ymin) * this.dy;
455
- };
456
-
457
- Grid.prototype.transX = function(x) {
458
- if (this.data.length === 1) {
459
- return (this.left + this.right) / 2;
460
- } else {
461
- return this.left + (x - this.xmin) * this.dx;
462
- }
463
- };
464
-
465
- Grid.prototype.redraw = function() {
466
- this.raphael.clear();
467
- this._calc();
468
- this.drawGrid();
469
- this.drawGoals();
470
- this.drawEvents();
471
- if (this.draw) {
472
- return this.draw();
473
- }
474
- };
475
-
476
- Grid.prototype.measureText = function(text, angle) {
477
- var ret, tt;
478
- if (angle == null) {
479
- angle = 0;
480
- }
481
- tt = this.raphael.text(100, 100, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).rotate(angle);
482
- ret = tt.getBBox();
483
- tt.remove();
484
- return ret;
485
- };
486
-
487
- Grid.prototype.yAxisFormat = function(label) {
488
- return this.yLabelFormat(label);
489
- };
490
-
491
- Grid.prototype.yLabelFormat = function(label) {
492
- if (typeof this.options.yLabelFormat === 'function') {
493
- return this.options.yLabelFormat(label);
494
- } else {
495
- return "" + this.options.preUnits + (Morris.commas(label)) + this.options.postUnits;
496
- }
497
- };
498
-
499
- Grid.prototype.drawGrid = function() {
500
- var lineY, y, _i, _len, _ref, _ref1, _ref2, _results;
501
- if (this.options.grid === false && ((_ref = this.options.axes) !== true && _ref !== 'both' && _ref !== 'y')) {
502
- return;
503
- }
504
- _ref1 = this.grid;
505
- _results = [];
506
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
507
- lineY = _ref1[_i];
508
- y = this.transY(lineY);
509
- if ((_ref2 = this.options.axes) === true || _ref2 === 'both' || _ref2 === 'y') {
510
- this.drawYAxisLabel(this.left - this.options.padding / 2, y, this.yAxisFormat(lineY));
511
- }
512
- if (this.options.grid) {
513
- _results.push(this.drawGridLine("M" + this.left + "," + y + "H" + (this.left + this.width)));
514
- } else {
515
- _results.push(void 0);
516
- }
517
- }
518
- return _results;
519
- };
520
-
521
- Grid.prototype.drawGoals = function() {
522
- var color, goal, i, _i, _len, _ref, _results;
523
- _ref = this.options.goals;
524
- _results = [];
525
- for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
526
- goal = _ref[i];
527
- color = this.options.goalLineColors[i % this.options.goalLineColors.length];
528
- _results.push(this.drawGoal(goal, color));
529
- }
530
- return _results;
531
- };
532
-
533
- Grid.prototype.drawEvents = function() {
534
- var color, event, i, _i, _len, _ref, _results;
535
- _ref = this.events;
536
- _results = [];
537
- for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
538
- event = _ref[i];
539
- color = this.options.eventLineColors[i % this.options.eventLineColors.length];
540
- _results.push(this.drawEvent(event, color));
541
- }
542
- return _results;
543
- };
544
-
545
- Grid.prototype.drawGoal = function(goal, color) {
546
- return this.raphael.path("M" + this.left + "," + (this.transY(goal)) + "H" + this.right).attr('stroke', color).attr('stroke-width', this.options.goalStrokeWidth);
547
- };
548
-
549
- Grid.prototype.drawEvent = function(event, color) {
550
- return this.raphael.path("M" + (this.transX(event)) + "," + this.bottom + "V" + this.top).attr('stroke', color).attr('stroke-width', this.options.eventStrokeWidth);
551
- };
552
-
553
- Grid.prototype.drawYAxisLabel = function(xPos, yPos, text) {
554
- return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor).attr('text-anchor', 'end');
555
- };
556
-
557
- Grid.prototype.drawGridLine = function(path) {
558
- return this.raphael.path(path).attr('stroke', this.options.gridLineColor).attr('stroke-width', this.options.gridStrokeWidth);
559
- };
560
-
561
- Grid.prototype.startRange = function(x) {
562
- this.hover.hide();
563
- this.selectFrom = x;
564
- return this.selectionRect.attr({
565
- x: x,
566
- width: 0
567
- }).show();
568
- };
569
-
570
- Grid.prototype.endRange = function(x) {
571
- var end, start;
572
- if (this.selectFrom) {
573
- start = Math.min(this.selectFrom, x);
574
- end = Math.max(this.selectFrom, x);
575
- this.options.rangeSelect.call(this.el, {
576
- start: this.data[this.hitTest(start)].x,
577
- end: this.data[this.hitTest(end)].x
578
- });
579
- return this.selectFrom = null;
580
- }
581
- };
582
-
583
- Grid.prototype.resizeHandler = function() {
584
- this.timeoutId = null;
585
- this.raphael.setSize(this.el.width(), this.el.height());
586
- return this.redraw();
587
- };
588
-
589
- return Grid;
590
-
591
- })(Morris.EventEmitter);
592
-
593
- Morris.parseDate = function(date) {
594
- var isecs, m, msecs, n, o, offsetmins, p, q, r, ret, secs;
595
- if (typeof date === 'number') {
596
- return date;
597
- }
598
- m = date.match(/^(\d+) Q(\d)$/);
599
- n = date.match(/^(\d+)-(\d+)$/);
600
- o = date.match(/^(\d+)-(\d+)-(\d+)$/);
601
- p = date.match(/^(\d+) W(\d+)$/);
602
- q = date.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/);
603
- r = date.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/);
604
- if (m) {
605
- return new Date(parseInt(m[1], 10), parseInt(m[2], 10) * 3 - 1, 1).getTime();
606
- } else if (n) {
607
- return new Date(parseInt(n[1], 10), parseInt(n[2], 10) - 1, 1).getTime();
608
- } else if (o) {
609
- return new Date(parseInt(o[1], 10), parseInt(o[2], 10) - 1, parseInt(o[3], 10)).getTime();
610
- } else if (p) {
611
- ret = new Date(parseInt(p[1], 10), 0, 1);
612
- if (ret.getDay() !== 4) {
613
- ret.setMonth(0, 1 + ((4 - ret.getDay()) + 7) % 7);
614
- }
615
- return ret.getTime() + parseInt(p[2], 10) * 604800000;
616
- } else if (q) {
617
- if (!q[6]) {
618
- return new Date(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10)).getTime();
619
- } else {
620
- offsetmins = 0;
621
- if (q[6] !== 'Z') {
622
- offsetmins = parseInt(q[8], 10) * 60 + parseInt(q[9], 10);
623
- if (q[7] === '+') {
624
- offsetmins = 0 - offsetmins;
625
- }
626
- }
627
- return Date.UTC(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10) + offsetmins);
628
- }
629
- } else if (r) {
630
- secs = parseFloat(r[6]);
631
- isecs = Math.floor(secs);
632
- msecs = Math.round((secs - isecs) * 1000);
633
- if (!r[8]) {
634
- return new Date(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10), isecs, msecs).getTime();
635
- } else {
636
- offsetmins = 0;
637
- if (r[8] !== 'Z') {
638
- offsetmins = parseInt(r[10], 10) * 60 + parseInt(r[11], 10);
639
- if (r[9] === '+') {
640
- offsetmins = 0 - offsetmins;
641
- }
642
- }
643
- return Date.UTC(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10) + offsetmins, isecs, msecs);
644
- }
645
- } else {
646
- return new Date(parseInt(date, 10), 0, 1).getTime();
647
- }
648
- };
649
-
650
- Morris.Hover = (function() {
651
- Hover.defaults = {
652
- "class": 'morris-hover morris-default-style'
653
- };
654
-
655
- function Hover(options) {
656
- if (options == null) {
657
- options = {};
658
- }
659
- this.options = $.extend({}, Morris.Hover.defaults, options);
660
- this.el = $("<div class='" + this.options["class"] + "'></div>");
661
- this.el.hide();
662
- this.options.parent.append(this.el);
663
- }
664
-
665
- Hover.prototype.update = function(html, x, y) {
666
- if (!html) {
667
- return this.hide();
668
- } else {
669
- this.html(html);
670
- this.show();
671
- return this.moveTo(x, y);
672
- }
673
- };
674
-
675
- Hover.prototype.html = function(content) {
676
- return this.el.html(content);
677
- };
678
-
679
- Hover.prototype.moveTo = function(x, y) {
680
- var hoverHeight, hoverWidth, left, parentHeight, parentWidth, top;
681
- parentWidth = this.options.parent.innerWidth();
682
- parentHeight = this.options.parent.innerHeight();
683
- hoverWidth = this.el.outerWidth();
684
- hoverHeight = this.el.outerHeight();
685
- left = Math.min(Math.max(0, x - hoverWidth / 2), parentWidth - hoverWidth);
686
- if (y != null) {
687
- top = y - hoverHeight - 10;
688
- if (top < 0) {
689
- top = y + 10;
690
- if (top + hoverHeight > parentHeight) {
691
- top = parentHeight / 2 - hoverHeight / 2;
692
- }
693
- }
694
- } else {
695
- top = parentHeight / 2 - hoverHeight / 2;
696
- }
697
- return this.el.css({
698
- left: left + "px",
699
- top: parseInt(top) + "px"
700
- });
701
- };
702
-
703
- Hover.prototype.show = function() {
704
- return this.el.show();
705
- };
706
-
707
- Hover.prototype.hide = function() {
708
- return this.el.hide();
709
- };
710
-
711
- return Hover;
712
-
713
- })();
714
-
715
- Morris.Line = (function(_super) {
716
- __extends(Line, _super);
717
-
718
- function Line(options) {
719
- this.hilight = __bind(this.hilight, this);
720
- this.onHoverOut = __bind(this.onHoverOut, this);
721
- this.onHoverMove = __bind(this.onHoverMove, this);
722
- this.onGridClick = __bind(this.onGridClick, this);
723
- if (!(this instanceof Morris.Line)) {
724
- return new Morris.Line(options);
725
- }
726
- Line.__super__.constructor.call(this, options);
727
- }
728
-
729
- Line.prototype.init = function() {
730
- if (this.options.hideHover !== 'always') {
731
- this.hover = new Morris.Hover({
732
- parent: this.el
733
- });
734
- this.on('hovermove', this.onHoverMove);
735
- this.on('hoverout', this.onHoverOut);
736
- return this.on('gridclick', this.onGridClick);
737
- }
738
- };
739
-
740
- Line.prototype.defaults = {
741
- lineWidth: 3,
742
- pointSize: 4,
743
- lineColors: ['#0b62a4', '#7A92A3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'],
744
- pointStrokeWidths: [1],
745
- pointStrokeColors: ['#ffffff'],
746
- pointFillColors: [],
747
- smooth: true,
748
- xLabels: 'auto',
749
- xLabelFormat: null,
750
- xLabelMargin: 24,
751
- hideHover: false
752
- };
753
-
754
- Line.prototype.calc = function() {
755
- this.calcPoints();
756
- return this.generatePaths();
757
- };
758
-
759
- Line.prototype.calcPoints = function() {
760
- var row, y, _i, _len, _ref, _results;
761
- _ref = this.data;
762
- _results = [];
763
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
764
- row = _ref[_i];
765
- row._x = this.transX(row.x);
766
- row._y = (function() {
767
- var _j, _len1, _ref1, _results1;
768
- _ref1 = row.y;
769
- _results1 = [];
770
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
771
- y = _ref1[_j];
772
- if (y != null) {
773
- _results1.push(this.transY(y));
774
- } else {
775
- _results1.push(y);
776
- }
777
- }
778
- return _results1;
779
- }).call(this);
780
- _results.push(row._ymax = Math.min.apply(Math, [this.bottom].concat((function() {
781
- var _j, _len1, _ref1, _results1;
782
- _ref1 = row._y;
783
- _results1 = [];
784
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
785
- y = _ref1[_j];
786
- if (y != null) {
787
- _results1.push(y);
788
- }
789
- }
790
- return _results1;
791
- })())));
792
- }
793
- return _results;
794
- };
795
-
796
- Line.prototype.hitTest = function(x) {
797
- var index, r, _i, _len, _ref;
798
- if (this.data.length === 0) {
799
- return null;
800
- }
801
- _ref = this.data.slice(1);
802
- for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) {
803
- r = _ref[index];
804
- if (x < (r._x + this.data[index]._x) / 2) {
805
- break;
806
- }
807
- }
808
- return index;
809
- };
810
-
811
- Line.prototype.onGridClick = function(x, y) {
812
- var index;
813
- index = this.hitTest(x);
814
- return this.fire('click', index, this.data[index].src, x, y);
815
- };
816
-
817
- Line.prototype.onHoverMove = function(x, y) {
818
- var index;
819
- index = this.hitTest(x);
820
- return this.displayHoverForRow(index);
821
- };
822
-
823
- Line.prototype.onHoverOut = function() {
824
- if (this.options.hideHover !== false) {
825
- return this.displayHoverForRow(null);
826
- }
827
- };
828
-
829
- Line.prototype.displayHoverForRow = function(index) {
830
- var _ref;
831
- if (index != null) {
832
- (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(index));
833
- return this.hilight(index);
834
- } else {
835
- this.hover.hide();
836
- return this.hilight();
837
- }
838
- };
839
-
840
- Line.prototype.hoverContentForRow = function(index) {
841
- var content, j, row, y, _i, _len, _ref;
842
- row = this.data[index];
843
- content = "<div class='morris-hover-row-label'>" + row.label + "</div>";
844
- _ref = row.y;
845
- for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
846
- y = _ref[j];
847
- content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y)) + "\n</div>";
848
- }
849
- if (typeof this.options.hoverCallback === 'function') {
850
- content = this.options.hoverCallback(index, this.options, content, row.src);
851
- }
852
- return [content, row._x, row._ymax];
853
- };
854
-
855
- Line.prototype.generatePaths = function() {
856
- var coords, i, r, smooth;
857
- return this.paths = (function() {
858
- var _i, _ref, _ref1, _results;
859
- _results = [];
860
- for (i = _i = 0, _ref = this.options.ykeys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
861
- smooth = typeof this.options.smooth === "boolean" ? this.options.smooth : (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
862
- coords = (function() {
863
- var _j, _len, _ref2, _results1;
864
- _ref2 = this.data;
865
- _results1 = [];
866
- for (_j = 0, _len = _ref2.length; _j < _len; _j++) {
867
- r = _ref2[_j];
868
- if (r._y[i] !== void 0) {
869
- _results1.push({
870
- x: r._x,
871
- y: r._y[i]
872
- });
873
- }
874
- }
875
- return _results1;
876
- }).call(this);
877
- if (coords.length > 1) {
878
- _results.push(Morris.Line.createPath(coords, smooth, this.bottom));
879
- } else {
880
- _results.push(null);
881
- }
882
- }
883
- return _results;
884
- }).call(this);
885
- };
886
-
887
- Line.prototype.draw = function() {
888
- var _ref;
889
- if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
890
- this.drawXAxis();
891
- }
892
- this.drawSeries();
893
- if (this.options.hideHover === false) {
894
- return this.displayHoverForRow(this.data.length - 1);
895
- }
896
- };
897
-
898
- Line.prototype.drawXAxis = function() {
899
- var drawLabel, l, labels, prevAngleMargin, prevLabelMargin, row, ypos, _i, _len, _results,
900
- _this = this;
901
- ypos = this.bottom + this.options.padding / 2;
902
- prevLabelMargin = null;
903
- prevAngleMargin = null;
904
- drawLabel = function(labelText, xpos) {
905
- var label, labelBox, margin, offset, textBox;
906
- label = _this.drawXAxisLabel(_this.transX(xpos), ypos, labelText);
907
- textBox = label.getBBox();
908
- label.transform("r" + (-_this.options.xLabelAngle));
909
- labelBox = label.getBBox();
910
- label.transform("t0," + (labelBox.height / 2) + "...");
911
- if (_this.options.xLabelAngle !== 0) {
912
- offset = -0.5 * textBox.width * Math.cos(_this.options.xLabelAngle * Math.PI / 180.0);
913
- label.transform("t" + offset + ",0...");
914
- }
915
- labelBox = label.getBBox();
916
- if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
917
- if (_this.options.xLabelAngle !== 0) {
918
- margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0);
919
- prevAngleMargin = labelBox.x - margin;
920
- }
921
- return prevLabelMargin = labelBox.x - _this.options.xLabelMargin;
922
- } else {
923
- return label.remove();
924
- }
925
- };
926
- if (this.options.parseTime) {
927
- if (this.data.length === 1 && this.options.xLabels === 'auto') {
928
- labels = [[this.data[0].label, this.data[0].x]];
929
- } else {
930
- labels = Morris.labelSeries(this.xmin, this.xmax, this.width, this.options.xLabels, this.options.xLabelFormat);
931
- }
932
- } else {
933
- labels = (function() {
934
- var _i, _len, _ref, _results;
935
- _ref = this.data;
936
- _results = [];
937
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
938
- row = _ref[_i];
939
- _results.push([row.label, row.x]);
940
- }
941
- return _results;
942
- }).call(this);
943
- }
944
- labels.reverse();
945
- _results = [];
946
- for (_i = 0, _len = labels.length; _i < _len; _i++) {
947
- l = labels[_i];
948
- _results.push(drawLabel(l[0], l[1]));
949
- }
950
- return _results;
951
- };
952
-
953
- Line.prototype.drawSeries = function() {
954
- var i, _i, _j, _ref, _ref1, _results;
955
- this.seriesPoints = [];
956
- for (i = _i = _ref = this.options.ykeys.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; i = _ref <= 0 ? ++_i : --_i) {
957
- this._drawLineFor(i);
958
- }
959
- _results = [];
960
- for (i = _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; i = _ref1 <= 0 ? ++_j : --_j) {
961
- _results.push(this._drawPointFor(i));
962
- }
963
- return _results;
964
- };
965
-
966
- Line.prototype._drawPointFor = function(index) {
967
- var circle, row, _i, _len, _ref, _results;
968
- this.seriesPoints[index] = [];
969
- _ref = this.data;
970
- _results = [];
971
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
972
- row = _ref[_i];
973
- circle = null;
974
- if (row._y[index] != null) {
975
- circle = this.drawLinePoint(row._x, row._y[index], this.colorFor(row, index, 'point'), index);
976
- }
977
- _results.push(this.seriesPoints[index].push(circle));
978
- }
979
- return _results;
980
- };
981
-
982
- Line.prototype._drawLineFor = function(index) {
983
- var path;
984
- path = this.paths[index];
985
- if (path !== null) {
986
- return this.drawLinePath(path, this.colorFor(null, index, 'line'), index);
987
- }
988
- };
989
-
990
- Line.createPath = function(coords, smooth, bottom) {
991
- var coord, g, grads, i, ix, lg, path, prevCoord, x1, x2, y1, y2, _i, _len;
992
- path = "";
993
- if (smooth) {
994
- grads = Morris.Line.gradients(coords);
995
- }
996
- prevCoord = {
997
- y: null
998
- };
999
- for (i = _i = 0, _len = coords.length; _i < _len; i = ++_i) {
1000
- coord = coords[i];
1001
- if (coord.y != null) {
1002
- if (prevCoord.y != null) {
1003
- if (smooth) {
1004
- g = grads[i];
1005
- lg = grads[i - 1];
1006
- ix = (coord.x - prevCoord.x) / 4;
1007
- x1 = prevCoord.x + ix;
1008
- y1 = Math.min(bottom, prevCoord.y + ix * lg);
1009
- x2 = coord.x - ix;
1010
- y2 = Math.min(bottom, coord.y - ix * g);
1011
- path += "C" + x1 + "," + y1 + "," + x2 + "," + y2 + "," + coord.x + "," + coord.y;
1012
- } else {
1013
- path += "L" + coord.x + "," + coord.y;
1014
- }
1015
- } else {
1016
- if (!smooth || (grads[i] != null)) {
1017
- path += "M" + coord.x + "," + coord.y;
1018
- }
1019
- }
1020
- }
1021
- prevCoord = coord;
1022
- }
1023
- return path;
1024
- };
1025
-
1026
- Line.gradients = function(coords) {
1027
- var coord, grad, i, nextCoord, prevCoord, _i, _len, _results;
1028
- grad = function(a, b) {
1029
- return (a.y - b.y) / (a.x - b.x);
1030
- };
1031
- _results = [];
1032
- for (i = _i = 0, _len = coords.length; _i < _len; i = ++_i) {
1033
- coord = coords[i];
1034
- if (coord.y != null) {
1035
- nextCoord = coords[i + 1] || {
1036
- y: null
1037
- };
1038
- prevCoord = coords[i - 1] || {
1039
- y: null
1040
- };
1041
- if ((prevCoord.y != null) && (nextCoord.y != null)) {
1042
- _results.push(grad(prevCoord, nextCoord));
1043
- } else if (prevCoord.y != null) {
1044
- _results.push(grad(prevCoord, coord));
1045
- } else if (nextCoord.y != null) {
1046
- _results.push(grad(coord, nextCoord));
1047
- } else {
1048
- _results.push(null);
1049
- }
1050
- } else {
1051
- _results.push(null);
1052
- }
1053
- }
1054
- return _results;
1055
- };
1056
-
1057
- Line.prototype.hilight = function(index) {
1058
- var i, _i, _j, _ref, _ref1;
1059
- if (this.prevHilight !== null && this.prevHilight !== index) {
1060
- for (i = _i = 0, _ref = this.seriesPoints.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
1061
- if (this.seriesPoints[i][this.prevHilight]) {
1062
- this.seriesPoints[i][this.prevHilight].animate(this.pointShrinkSeries(i));
1063
- }
1064
- }
1065
- }
1066
- if (index !== null && this.prevHilight !== index) {
1067
- for (i = _j = 0, _ref1 = this.seriesPoints.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {
1068
- if (this.seriesPoints[i][index]) {
1069
- this.seriesPoints[i][index].animate(this.pointGrowSeries(i));
1070
- }
1071
- }
1072
- }
1073
- return this.prevHilight = index;
1074
- };
1075
-
1076
- Line.prototype.colorFor = function(row, sidx, type) {
1077
- if (typeof this.options.lineColors === 'function') {
1078
- return this.options.lineColors.call(this, row, sidx, type);
1079
- } else if (type === 'point') {
1080
- return this.options.pointFillColors[sidx % this.options.pointFillColors.length] || this.options.lineColors[sidx % this.options.lineColors.length];
1081
- } else {
1082
- return this.options.lineColors[sidx % this.options.lineColors.length];
1083
- }
1084
- };
1085
-
1086
- Line.prototype.drawXAxisLabel = function(xPos, yPos, text) {
1087
- return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
1088
- };
1089
-
1090
- Line.prototype.drawLinePath = function(path, lineColor, lineIndex) {
1091
- return this.raphael.path(path).attr('stroke', lineColor).attr('stroke-width', this.lineWidthForSeries(lineIndex));
1092
- };
1093
-
1094
- Line.prototype.drawLinePoint = function(xPos, yPos, pointColor, lineIndex) {
1095
- return this.raphael.circle(xPos, yPos, this.pointSizeForSeries(lineIndex)).attr('fill', pointColor).attr('stroke-width', this.pointStrokeWidthForSeries(lineIndex)).attr('stroke', this.pointStrokeColorForSeries(lineIndex));
1096
- };
1097
-
1098
- Line.prototype.pointStrokeWidthForSeries = function(index) {
1099
- return this.options.pointStrokeWidths[index % this.options.pointStrokeWidths.length];
1100
- };
1101
-
1102
- Line.prototype.pointStrokeColorForSeries = function(index) {
1103
- return this.options.pointStrokeColors[index % this.options.pointStrokeColors.length];
1104
- };
1105
-
1106
- Line.prototype.lineWidthForSeries = function(index) {
1107
- if (this.options.lineWidth instanceof Array) {
1108
- return this.options.lineWidth[index % this.options.lineWidth.length];
1109
- } else {
1110
- return this.options.lineWidth;
1111
- }
1112
- };
1113
-
1114
- Line.prototype.pointSizeForSeries = function(index) {
1115
- if (this.options.pointSize instanceof Array) {
1116
- return this.options.pointSize[index % this.options.pointSize.length];
1117
- } else {
1118
- return this.options.pointSize;
1119
- }
1120
- };
1121
-
1122
- Line.prototype.pointGrowSeries = function(index) {
1123
- return Raphael.animation({
1124
- r: this.pointSizeForSeries(index) + 3
1125
- }, 25, 'linear');
1126
- };
1127
-
1128
- Line.prototype.pointShrinkSeries = function(index) {
1129
- return Raphael.animation({
1130
- r: this.pointSizeForSeries(index)
1131
- }, 25, 'linear');
1132
- };
1133
-
1134
- return Line;
1135
-
1136
- })(Morris.Grid);
1137
-
1138
- Morris.labelSeries = function(dmin, dmax, pxwidth, specName, xLabelFormat) {
1139
- var d, d0, ddensity, name, ret, s, spec, t, _i, _len, _ref;
1140
- ddensity = 200 * (dmax - dmin) / pxwidth;
1141
- d0 = new Date(dmin);
1142
- spec = Morris.LABEL_SPECS[specName];
1143
- if (spec === void 0) {
1144
- _ref = Morris.AUTO_LABEL_ORDER;
1145
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1146
- name = _ref[_i];
1147
- s = Morris.LABEL_SPECS[name];
1148
- if (ddensity >= s.span) {
1149
- spec = s;
1150
- break;
1151
- }
1152
- }
1153
- }
1154
- if (spec === void 0) {
1155
- spec = Morris.LABEL_SPECS["second"];
1156
- }
1157
- if (xLabelFormat) {
1158
- spec = $.extend({}, spec, {
1159
- fmt: xLabelFormat
1160
- });
1161
- }
1162
- d = spec.start(d0);
1163
- ret = [];
1164
- while ((t = d.getTime()) <= dmax) {
1165
- if (t >= dmin) {
1166
- ret.push([spec.fmt(d), t]);
1167
- }
1168
- spec.incr(d);
1169
- }
1170
- return ret;
1171
- };
1172
-
1173
- minutesSpecHelper = function(interval) {
1174
- return {
1175
- span: interval * 60 * 1000,
1176
- start: function(d) {
1177
- return new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours());
1178
- },
1179
- fmt: function(d) {
1180
- return "" + (Morris.pad2(d.getHours())) + ":" + (Morris.pad2(d.getMinutes()));
1181
- },
1182
- incr: function(d) {
1183
- return d.setUTCMinutes(d.getUTCMinutes() + interval);
1184
- }
1185
- };
1186
- };
1187
-
1188
- secondsSpecHelper = function(interval) {
1189
- return {
1190
- span: interval * 1000,
1191
- start: function(d) {
1192
- return new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes());
1193
- },
1194
- fmt: function(d) {
1195
- return "" + (Morris.pad2(d.getHours())) + ":" + (Morris.pad2(d.getMinutes())) + ":" + (Morris.pad2(d.getSeconds()));
1196
- },
1197
- incr: function(d) {
1198
- return d.setUTCSeconds(d.getUTCSeconds() + interval);
1199
- }
1200
- };
1201
- };
1202
-
1203
- Morris.LABEL_SPECS = {
1204
- "decade": {
1205
- span: 172800000000,
1206
- start: function(d) {
1207
- return new Date(d.getFullYear() - d.getFullYear() % 10, 0, 1);
1208
- },
1209
- fmt: function(d) {
1210
- return "" + (d.getFullYear());
1211
- },
1212
- incr: function(d) {
1213
- return d.setFullYear(d.getFullYear() + 10);
1214
- }
1215
- },
1216
- "year": {
1217
- span: 17280000000,
1218
- start: function(d) {
1219
- return new Date(d.getFullYear(), 0, 1);
1220
- },
1221
- fmt: function(d) {
1222
- return "" + (d.getFullYear());
1223
- },
1224
- incr: function(d) {
1225
- return d.setFullYear(d.getFullYear() + 1);
1226
- }
1227
- },
1228
- "month": {
1229
- span: 2419200000,
1230
- start: function(d) {
1231
- return new Date(d.getFullYear(), d.getMonth(), 1);
1232
- },
1233
- fmt: function(d) {
1234
- return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1));
1235
- },
1236
- incr: function(d) {
1237
- return d.setMonth(d.getMonth() + 1);
1238
- }
1239
- },
1240
- "week": {
1241
- span: 604800000,
1242
- start: function(d) {
1243
- return new Date(d.getFullYear(), d.getMonth(), d.getDate());
1244
- },
1245
- fmt: function(d) {
1246
- return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1)) + "-" + (Morris.pad2(d.getDate()));
1247
- },
1248
- incr: function(d) {
1249
- return d.setDate(d.getDate() + 7);
1250
- }
1251
- },
1252
- "day": {
1253
- span: 86400000,
1254
- start: function(d) {
1255
- return new Date(d.getFullYear(), d.getMonth(), d.getDate());
1256
- },
1257
- fmt: function(d) {
1258
- return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1)) + "-" + (Morris.pad2(d.getDate()));
1259
- },
1260
- incr: function(d) {
1261
- return d.setDate(d.getDate() + 1);
1262
- }
1263
- },
1264
- "hour": minutesSpecHelper(60),
1265
- "30min": minutesSpecHelper(30),
1266
- "15min": minutesSpecHelper(15),
1267
- "10min": minutesSpecHelper(10),
1268
- "5min": minutesSpecHelper(5),
1269
- "minute": minutesSpecHelper(1),
1270
- "30sec": secondsSpecHelper(30),
1271
- "15sec": secondsSpecHelper(15),
1272
- "10sec": secondsSpecHelper(10),
1273
- "5sec": secondsSpecHelper(5),
1274
- "second": secondsSpecHelper(1)
1275
- };
1276
-
1277
- Morris.AUTO_LABEL_ORDER = ["decade", "year", "month", "week", "day", "hour", "30min", "15min", "10min", "5min", "minute", "30sec", "15sec", "10sec", "5sec", "second"];
1278
-
1279
- Morris.Area = (function(_super) {
1280
- var areaDefaults;
1281
-
1282
- __extends(Area, _super);
1283
-
1284
- areaDefaults = {
1285
- fillOpacity: 'auto',
1286
- behaveLikeLine: false
1287
- };
1288
-
1289
- function Area(options) {
1290
- var areaOptions;
1291
- if (!(this instanceof Morris.Area)) {
1292
- return new Morris.Area(options);
1293
- }
1294
- areaOptions = $.extend({}, areaDefaults, options);
1295
- this.cumulative = !areaOptions.behaveLikeLine;
1296
- if (areaOptions.fillOpacity === 'auto') {
1297
- areaOptions.fillOpacity = areaOptions.behaveLikeLine ? .8 : 1;
1298
- }
1299
- Area.__super__.constructor.call(this, areaOptions);
1300
- }
1301
-
1302
- Area.prototype.calcPoints = function() {
1303
- var row, total, y, _i, _len, _ref, _results;
1304
- _ref = this.data;
1305
- _results = [];
1306
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1307
- row = _ref[_i];
1308
- row._x = this.transX(row.x);
1309
- total = 0;
1310
- row._y = (function() {
1311
- var _j, _len1, _ref1, _results1;
1312
- _ref1 = row.y;
1313
- _results1 = [];
1314
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
1315
- y = _ref1[_j];
1316
- if (this.options.behaveLikeLine) {
1317
- _results1.push(this.transY(y));
1318
- } else {
1319
- total += y || 0;
1320
- _results1.push(this.transY(total));
1321
- }
1322
- }
1323
- return _results1;
1324
- }).call(this);
1325
- _results.push(row._ymax = Math.max.apply(Math, row._y));
1326
- }
1327
- return _results;
1328
- };
1329
-
1330
- Area.prototype.drawSeries = function() {
1331
- var i, range, _i, _j, _k, _len, _ref, _ref1, _results, _results1, _results2;
1332
- this.seriesPoints = [];
1333
- if (this.options.behaveLikeLine) {
1334
- range = (function() {
1335
- _results = [];
1336
- for (var _i = 0, _ref = this.options.ykeys.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); }
1337
- return _results;
1338
- }).apply(this);
1339
- } else {
1340
- range = (function() {
1341
- _results1 = [];
1342
- for (var _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; _ref1 <= 0 ? _j++ : _j--){ _results1.push(_j); }
1343
- return _results1;
1344
- }).apply(this);
1345
- }
1346
- _results2 = [];
1347
- for (_k = 0, _len = range.length; _k < _len; _k++) {
1348
- i = range[_k];
1349
- this._drawFillFor(i);
1350
- this._drawLineFor(i);
1351
- _results2.push(this._drawPointFor(i));
1352
- }
1353
- return _results2;
1354
- };
1355
-
1356
- Area.prototype._drawFillFor = function(index) {
1357
- var path;
1358
- path = this.paths[index];
1359
- if (path !== null) {
1360
- path = path + ("L" + (this.transX(this.xmax)) + "," + this.bottom + "L" + (this.transX(this.xmin)) + "," + this.bottom + "Z");
1361
- return this.drawFilledPath(path, this.fillForSeries(index));
1362
- }
1363
- };
1364
-
1365
- Area.prototype.fillForSeries = function(i) {
1366
- var color;
1367
- color = Raphael.rgb2hsl(this.colorFor(this.data[i], i, 'line'));
1368
- return Raphael.hsl(color.h, this.options.behaveLikeLine ? color.s * 0.9 : color.s * 0.75, Math.min(0.98, this.options.behaveLikeLine ? color.l * 1.2 : color.l * 1.25));
1369
- };
1370
-
1371
- Area.prototype.drawFilledPath = function(path, fill) {
1372
- return this.raphael.path(path).attr('fill', fill).attr('fill-opacity', this.options.fillOpacity).attr('stroke', 'none');
1373
- };
1374
-
1375
- return Area;
1376
-
1377
- })(Morris.Line);
1378
-
1379
- Morris.Bar = (function(_super) {
1380
- __extends(Bar, _super);
1381
-
1382
- function Bar(options) {
1383
- this.onHoverOut = __bind(this.onHoverOut, this);
1384
- this.onHoverMove = __bind(this.onHoverMove, this);
1385
- this.onGridClick = __bind(this.onGridClick, this);
1386
- if (!(this instanceof Morris.Bar)) {
1387
- return new Morris.Bar(options);
1388
- }
1389
- Bar.__super__.constructor.call(this, $.extend({}, options, {
1390
- parseTime: false
1391
- }));
1392
- }
1393
-
1394
- Bar.prototype.init = function() {
1395
- this.cumulative = this.options.stacked;
1396
- if (this.options.hideHover !== 'always') {
1397
- this.hover = new Morris.Hover({
1398
- parent: this.el
1399
- });
1400
- this.on('hovermove', this.onHoverMove);
1401
- this.on('hoverout', this.onHoverOut);
1402
- return this.on('gridclick', this.onGridClick);
1403
- }
1404
- };
1405
-
1406
- Bar.prototype.defaults = {
1407
- barSizeRatio: 0.75,
1408
- barGap: 3,
1409
- barColors: ['#0b62a4', '#7a92a3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'],
1410
- barOpacity: 1.0,
1411
- barRadius: [0, 0, 0, 0],
1412
- xLabelMargin: 50
1413
- };
1414
-
1415
- Bar.prototype.calc = function() {
1416
- var _ref;
1417
- this.calcBars();
1418
- if (this.options.hideHover === false) {
1419
- return (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(this.data.length - 1));
1420
- }
1421
- };
1422
-
1423
- Bar.prototype.calcBars = function() {
1424
- var idx, row, y, _i, _len, _ref, _results;
1425
- _ref = this.data;
1426
- _results = [];
1427
- for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) {
1428
- row = _ref[idx];
1429
- row._x = this.left + this.width * (idx + 0.5) / this.data.length;
1430
- _results.push(row._y = (function() {
1431
- var _j, _len1, _ref1, _results1;
1432
- _ref1 = row.y;
1433
- _results1 = [];
1434
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
1435
- y = _ref1[_j];
1436
- if (y != null) {
1437
- _results1.push(this.transY(y));
1438
- } else {
1439
- _results1.push(null);
1440
- }
1441
- }
1442
- return _results1;
1443
- }).call(this));
1444
- }
1445
- return _results;
1446
- };
1447
-
1448
- Bar.prototype.draw = function() {
1449
- var _ref;
1450
- if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
1451
- this.drawXAxis();
1452
- }
1453
- return this.drawSeries();
1454
- };
1455
-
1456
- Bar.prototype.drawXAxis = function() {
1457
- var i, label, labelBox, margin, offset, prevAngleMargin, prevLabelMargin, row, textBox, ypos, _i, _ref, _results;
1458
- ypos = this.bottom + (this.options.xAxisLabelTopPadding || this.options.padding / 2);
1459
- prevLabelMargin = null;
1460
- prevAngleMargin = null;
1461
- _results = [];
1462
- for (i = _i = 0, _ref = this.data.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
1463
- row = this.data[this.data.length - 1 - i];
1464
- label = this.drawXAxisLabel(row._x, ypos, row.label);
1465
- textBox = label.getBBox();
1466
- label.transform("r" + (-this.options.xLabelAngle));
1467
- labelBox = label.getBBox();
1468
- label.transform("t0," + (labelBox.height / 2) + "...");
1469
- if (this.options.xLabelAngle !== 0) {
1470
- offset = -0.5 * textBox.width * Math.cos(this.options.xLabelAngle * Math.PI / 180.0);
1471
- label.transform("t" + offset + ",0...");
1472
- }
1473
- if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
1474
- if (this.options.xLabelAngle !== 0) {
1475
- margin = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180.0);
1476
- prevAngleMargin = labelBox.x - margin;
1477
- }
1478
- _results.push(prevLabelMargin = labelBox.x - this.options.xLabelMargin);
1479
- } else {
1480
- _results.push(label.remove());
1481
- }
1482
- }
1483
- return _results;
1484
- };
1485
-
1486
- Bar.prototype.drawSeries = function() {
1487
- var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, spaceLeft, top, ypos, zeroPos;
1488
- groupWidth = this.width / this.options.data.length;
1489
- numBars = this.options.stacked ? 1 : this.options.ykeys.length;
1490
- barWidth = (groupWidth * this.options.barSizeRatio - this.options.barGap * (numBars - 1)) / numBars;
1491
- if (this.options.barSize) {
1492
- barWidth = Math.min(barWidth, this.options.barSize);
1493
- }
1494
- spaceLeft = groupWidth - barWidth * numBars - this.options.barGap * (numBars - 1);
1495
- leftPadding = spaceLeft / 2;
1496
- zeroPos = this.ymin <= 0 && this.ymax >= 0 ? this.transY(0) : null;
1497
- return this.bars = (function() {
1498
- var _i, _len, _ref, _results;
1499
- _ref = this.data;
1500
- _results = [];
1501
- for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) {
1502
- row = _ref[idx];
1503
- lastTop = 0;
1504
- _results.push((function() {
1505
- var _j, _len1, _ref1, _results1;
1506
- _ref1 = row._y;
1507
- _results1 = [];
1508
- for (sidx = _j = 0, _len1 = _ref1.length; _j < _len1; sidx = ++_j) {
1509
- ypos = _ref1[sidx];
1510
- if (ypos !== null) {
1511
- if (zeroPos) {
1512
- top = Math.min(ypos, zeroPos);
1513
- bottom = Math.max(ypos, zeroPos);
1514
- } else {
1515
- top = ypos;
1516
- bottom = this.bottom;
1517
- }
1518
- left = this.left + idx * groupWidth + leftPadding;
1519
- if (!this.options.stacked) {
1520
- left += sidx * (barWidth + this.options.barGap);
1521
- }
1522
- size = bottom - top;
1523
- if (this.options.verticalGridCondition && this.options.verticalGridCondition(row.x)) {
1524
- this.drawBar(this.left + idx * groupWidth, this.top, groupWidth, Math.abs(this.top - this.bottom), this.options.verticalGridColor, this.options.verticalGridOpacity, this.options.barRadius);
1525
- }
1526
- if (this.options.stacked) {
1527
- top -= lastTop;
1528
- }
1529
- this.drawBar(left, top, barWidth, size, this.colorFor(row, sidx, 'bar'), this.options.barOpacity, this.options.barRadius);
1530
- _results1.push(lastTop += size);
1531
- } else {
1532
- _results1.push(null);
1533
- }
1534
- }
1535
- return _results1;
1536
- }).call(this));
1537
- }
1538
- return _results;
1539
- }).call(this);
1540
- };
1541
-
1542
- Bar.prototype.colorFor = function(row, sidx, type) {
1543
- var r, s;
1544
- if (typeof this.options.barColors === 'function') {
1545
- r = {
1546
- x: row.x,
1547
- y: row.y[sidx],
1548
- label: row.label
1549
- };
1550
- s = {
1551
- index: sidx,
1552
- key: this.options.ykeys[sidx],
1553
- label: this.options.labels[sidx]
1554
- };
1555
- return this.options.barColors.call(this, r, s, type);
1556
- } else {
1557
- return this.options.barColors[sidx % this.options.barColors.length];
1558
- }
1559
- };
1560
-
1561
- Bar.prototype.hitTest = function(x) {
1562
- if (this.data.length === 0) {
1563
- return null;
1564
- }
1565
- x = Math.max(Math.min(x, this.right), this.left);
1566
- return Math.min(this.data.length - 1, Math.floor((x - this.left) / (this.width / this.data.length)));
1567
- };
1568
-
1569
- Bar.prototype.onGridClick = function(x, y) {
1570
- var index;
1571
- index = this.hitTest(x);
1572
- return this.fire('click', index, this.data[index].src, x, y);
1573
- };
1574
-
1575
- Bar.prototype.onHoverMove = function(x, y) {
1576
- var index, _ref;
1577
- index = this.hitTest(x);
1578
- return (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(index));
1579
- };
1580
-
1581
- Bar.prototype.onHoverOut = function() {
1582
- if (this.options.hideHover !== false) {
1583
- return this.hover.hide();
1584
- }
1585
- };
1586
-
1587
- Bar.prototype.hoverContentForRow = function(index) {
1588
- var content, j, row, x, y, _i, _len, _ref;
1589
- row = this.data[index];
1590
- content = "<div class='morris-hover-row-label'>" + row.label + "</div>";
1591
- _ref = row.y;
1592
- for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
1593
- y = _ref[j];
1594
- content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y)) + "\n</div>";
1595
- }
1596
- if (typeof this.options.hoverCallback === 'function') {
1597
- content = this.options.hoverCallback(index, this.options, content, row.src);
1598
- }
1599
- x = this.left + (index + 0.5) * this.width / this.data.length;
1600
- return [content, x];
1601
- };
1602
-
1603
- Bar.prototype.drawXAxisLabel = function(xPos, yPos, text) {
1604
- var label;
1605
- return label = this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
1606
- };
1607
-
1608
- Bar.prototype.drawBar = function(xPos, yPos, width, height, barColor, opacity, radiusArray) {
1609
- var maxRadius, path;
1610
- maxRadius = Math.max.apply(Math, radiusArray);
1611
- if (maxRadius === 0 || maxRadius > height) {
1612
- path = this.raphael.rect(xPos, yPos, width, height);
1613
- } else {
1614
- path = this.raphael.path(this.roundedRect(xPos, yPos, width, height, radiusArray));
1615
- }
1616
- return path.attr('fill', barColor).attr('fill-opacity', opacity).attr('stroke', 'none');
1617
- };
1618
-
1619
- Bar.prototype.roundedRect = function(x, y, w, h, r) {
1620
- if (r == null) {
1621
- r = [0, 0, 0, 0];
1622
- }
1623
- return ["M", x, r[0] + y, "Q", x, y, x + r[0], y, "L", x + w - r[1], y, "Q", x + w, y, x + w, y + r[1], "L", x + w, y + h - r[2], "Q", x + w, y + h, x + w - r[2], y + h, "L", x + r[3], y + h, "Q", x, y + h, x, y + h - r[3], "Z"];
1624
- };
1625
-
1626
- return Bar;
1627
-
1628
- })(Morris.Grid);
1629
-
1630
- Morris.Donut = (function(_super) {
1631
- __extends(Donut, _super);
1632
-
1633
- Donut.prototype.defaults = {
1634
- colors: ['#0B62A4', '#3980B5', '#679DC6', '#95BBD7', '#B0CCE1', '#095791', '#095085', '#083E67', '#052C48', '#042135'],
1635
- backgroundColor: '#FFFFFF',
1636
- labelColor: '#000000',
1637
- formatter: Morris.commas,
1638
- resize: false
1639
- };
1640
-
1641
- function Donut(options) {
1642
- this.resizeHandler = __bind(this.resizeHandler, this);
1643
- this.select = __bind(this.select, this);
1644
- this.click = __bind(this.click, this);
1645
- var _this = this;
1646
- if (!(this instanceof Morris.Donut)) {
1647
- return new Morris.Donut(options);
1648
- }
1649
- this.options = $.extend({}, this.defaults, options);
1650
- if (typeof options.element === 'string') {
1651
- this.el = $(document.getElementById(options.element));
1652
- } else {
1653
- this.el = $(options.element);
1654
- }
1655
- if (this.el === null || this.el.length === 0) {
1656
- throw new Error("Graph placeholder not found.");
1657
- }
1658
- if (options.data === void 0 || options.data.length === 0) {
1659
- return;
1660
- }
1661
- this.raphael = new Raphael(this.el[0]);
1662
- if (this.options.resize) {
1663
- $(window).bind('resize', function(evt) {
1664
- if (_this.timeoutId != null) {
1665
- window.clearTimeout(_this.timeoutId);
1666
- }
1667
- return _this.timeoutId = window.setTimeout(_this.resizeHandler, 100);
1668
- });
1669
- }
1670
- this.setData(options.data);
1671
- }
1672
-
1673
- Donut.prototype.redraw = function() {
1674
- var C, cx, cy, i, idx, last, max_value, min, next, seg, total, value, w, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
1675
- this.raphael.clear();
1676
- cx = this.el.width() / 2;
1677
- cy = this.el.height() / 2;
1678
- w = (Math.min(cx, cy) - 10) / 3;
1679
- total = 0;
1680
- _ref = this.values;
1681
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1682
- value = _ref[_i];
1683
- total += value;
1684
- }
1685
- min = 5 / (2 * w);
1686
- C = 1.9999 * Math.PI - min * this.data.length;
1687
- last = 0;
1688
- idx = 0;
1689
- this.segments = [];
1690
- _ref1 = this.values;
1691
- for (i = _j = 0, _len1 = _ref1.length; _j < _len1; i = ++_j) {
1692
- value = _ref1[i];
1693
- next = last + min + C * (value / total);
1694
- seg = new Morris.DonutSegment(cx, cy, w * 2, w, last, next, this.data[i].color || this.options.colors[idx % this.options.colors.length], this.options.backgroundColor, idx, this.raphael);
1695
- seg.render();
1696
- this.segments.push(seg);
1697
- seg.on('hover', this.select);
1698
- seg.on('click', this.click);
1699
- last = next;
1700
- idx += 1;
1701
- }
1702
- this.text1 = this.drawEmptyDonutLabel(cx, cy - 10, this.options.labelColor, 15, 800);
1703
- this.text2 = this.drawEmptyDonutLabel(cx, cy + 10, this.options.labelColor, 14);
1704
- max_value = Math.max.apply(Math, this.values);
1705
- idx = 0;
1706
- _ref2 = this.values;
1707
- _results = [];
1708
- for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
1709
- value = _ref2[_k];
1710
- if (value === max_value) {
1711
- this.select(idx);
1712
- break;
1713
- }
1714
- _results.push(idx += 1);
1715
- }
1716
- return _results;
1717
- };
1718
-
1719
- Donut.prototype.setData = function(data) {
1720
- var row;
1721
- this.data = data;
1722
- this.values = (function() {
1723
- var _i, _len, _ref, _results;
1724
- _ref = this.data;
1725
- _results = [];
1726
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1727
- row = _ref[_i];
1728
- _results.push(parseFloat(row.value));
1729
- }
1730
- return _results;
1731
- }).call(this);
1732
- return this.redraw();
1733
- };
1734
-
1735
- Donut.prototype.click = function(idx) {
1736
- return this.fire('click', idx, this.data[idx]);
1737
- };
1738
-
1739
- Donut.prototype.select = function(idx) {
1740
- var row, s, segment, _i, _len, _ref;
1741
- _ref = this.segments;
1742
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1743
- s = _ref[_i];
1744
- s.deselect();
1745
- }
1746
- segment = this.segments[idx];
1747
- segment.select();
1748
- row = this.data[idx];
1749
- return this.setLabels(row.label, this.options.formatter(row.value, row));
1750
- };
1751
-
1752
- Donut.prototype.setLabels = function(label1, label2) {
1753
- var inner, maxHeightBottom, maxHeightTop, maxWidth, text1bbox, text1scale, text2bbox, text2scale;
1754
- inner = (Math.min(this.el.width() / 2, this.el.height() / 2) - 10) * 2 / 3;
1755
- maxWidth = 1.8 * inner;
1756
- maxHeightTop = inner / 2;
1757
- maxHeightBottom = inner / 3;
1758
- this.text1.attr({
1759
- text: label1,
1760
- transform: ''
1761
- });
1762
- text1bbox = this.text1.getBBox();
1763
- text1scale = Math.min(maxWidth / text1bbox.width, maxHeightTop / text1bbox.height);
1764
- this.text1.attr({
1765
- transform: "S" + text1scale + "," + text1scale + "," + (text1bbox.x + text1bbox.width / 2) + "," + (text1bbox.y + text1bbox.height)
1766
- });
1767
- this.text2.attr({
1768
- text: label2,
1769
- transform: ''
1770
- });
1771
- text2bbox = this.text2.getBBox();
1772
- text2scale = Math.min(maxWidth / text2bbox.width, maxHeightBottom / text2bbox.height);
1773
- return this.text2.attr({
1774
- transform: "S" + text2scale + "," + text2scale + "," + (text2bbox.x + text2bbox.width / 2) + "," + text2bbox.y
1775
- });
1776
- };
1777
-
1778
- Donut.prototype.drawEmptyDonutLabel = function(xPos, yPos, color, fontSize, fontWeight) {
1779
- var text;
1780
- text = this.raphael.text(xPos, yPos, '').attr('font-size', fontSize).attr('fill', color);
1781
- if (fontWeight != null) {
1782
- text.attr('font-weight', fontWeight);
1783
- }
1784
- return text;
1785
- };
1786
-
1787
- Donut.prototype.resizeHandler = function() {
1788
- this.timeoutId = null;
1789
- this.raphael.setSize(this.el.width(), this.el.height());
1790
- return this.redraw();
1791
- };
1792
-
1793
- return Donut;
1794
-
1795
- })(Morris.EventEmitter);
1796
-
1797
- Morris.DonutSegment = (function(_super) {
1798
- __extends(DonutSegment, _super);
1799
-
1800
- function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
1801
- this.cx = cx;
1802
- this.cy = cy;
1803
- this.inner = inner;
1804
- this.outer = outer;
1805
- this.color = color;
1806
- this.backgroundColor = backgroundColor;
1807
- this.index = index;
1808
- this.raphael = raphael;
1809
- this.deselect = __bind(this.deselect, this);
1810
- this.select = __bind(this.select, this);
1811
- this.sin_p0 = Math.sin(p0);
1812
- this.cos_p0 = Math.cos(p0);
1813
- this.sin_p1 = Math.sin(p1);
1814
- this.cos_p1 = Math.cos(p1);
1815
- this.is_long = (p1 - p0) > Math.PI ? 1 : 0;
1816
- this.path = this.calcSegment(this.inner + 3, this.inner + this.outer - 5);
1817
- this.selectedPath = this.calcSegment(this.inner + 3, this.inner + this.outer);
1818
- this.hilight = this.calcArc(this.inner);
1819
- }
1820
-
1821
- DonutSegment.prototype.calcArcPoints = function(r) {
1822
- return [this.cx + r * this.sin_p0, this.cy + r * this.cos_p0, this.cx + r * this.sin_p1, this.cy + r * this.cos_p1];
1823
- };
1824
-
1825
- DonutSegment.prototype.calcSegment = function(r1, r2) {
1826
- var ix0, ix1, iy0, iy1, ox0, ox1, oy0, oy1, _ref, _ref1;
1827
- _ref = this.calcArcPoints(r1), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
1828
- _ref1 = this.calcArcPoints(r2), ox0 = _ref1[0], oy0 = _ref1[1], ox1 = _ref1[2], oy1 = _ref1[3];
1829
- return ("M" + ix0 + "," + iy0) + ("A" + r1 + "," + r1 + ",0," + this.is_long + ",0," + ix1 + "," + iy1) + ("L" + ox1 + "," + oy1) + ("A" + r2 + "," + r2 + ",0," + this.is_long + ",1," + ox0 + "," + oy0) + "Z";
1830
- };
1831
-
1832
- DonutSegment.prototype.calcArc = function(r) {
1833
- var ix0, ix1, iy0, iy1, _ref;
1834
- _ref = this.calcArcPoints(r), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
1835
- return ("M" + ix0 + "," + iy0) + ("A" + r + "," + r + ",0," + this.is_long + ",0," + ix1 + "," + iy1);
1836
- };
1837
-
1838
- DonutSegment.prototype.render = function() {
1839
- var _this = this;
1840
- this.arc = this.drawDonutArc(this.hilight, this.color);
1841
- return this.seg = this.drawDonutSegment(this.path, this.color, this.backgroundColor, function() {
1842
- return _this.fire('hover', _this.index);
1843
- }, function() {
1844
- return _this.fire('click', _this.index);
1845
- });
1846
- };
1847
-
1848
- DonutSegment.prototype.drawDonutArc = function(path, color) {
1849
- return this.raphael.path(path).attr({
1850
- stroke: color,
1851
- 'stroke-width': 2,
1852
- opacity: 0
1853
- });
1854
- };
1855
-
1856
- DonutSegment.prototype.drawDonutSegment = function(path, fillColor, strokeColor, hoverFunction, clickFunction) {
1857
- return this.raphael.path(path).attr({
1858
- fill: fillColor,
1859
- stroke: strokeColor,
1860
- 'stroke-width': 3
1861
- }).hover(hoverFunction).click(clickFunction);
1862
- };
1863
-
1864
- DonutSegment.prototype.select = function() {
1865
- if (!this.selected) {
1866
- this.seg.animate({
1867
- path: this.selectedPath
1868
- }, 150, '<>');
1869
- this.arc.animate({
1870
- opacity: 1
1871
- }, 150, '<>');
1872
- return this.selected = true;
1873
- }
1874
- };
1875
-
1876
- DonutSegment.prototype.deselect = function() {
1877
- if (this.selected) {
1878
- this.seg.animate({
1879
- path: this.path
1880
- }, 150, '<>');
1881
- this.arc.animate({
1882
- opacity: 0
1883
- }, 150, '<>');
1884
- return this.selected = false;
1885
- }
1886
- };
1887
-
1888
- return DonutSegment;
1889
-
1890
- })(Morris.EventEmitter);
1891
-
1892
- }).call(this);