tin-spa 2.13.15 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/README.md +2 -2
  2. package/__ivy_ngcc__/fesm2015/tin-spa.js +6813 -0
  3. package/__ivy_ngcc__/fesm2015/tin-spa.js.map +1 -0
  4. package/bundles/tin-spa.umd.js +3867 -0
  5. package/bundles/tin-spa.umd.js.map +1 -0
  6. package/bundles/tin-spa.umd.min.js +16 -0
  7. package/bundles/tin-spa.umd.min.js.map +1 -0
  8. package/esm2015/lib/classes/Classes.js +241 -0
  9. package/esm2015/lib/components/activity/activity.component.js +26 -0
  10. package/esm2015/lib/components/attach/attach.component.js +107 -0
  11. package/esm2015/lib/components/change-password/change-password.component.js +91 -0
  12. package/esm2015/lib/components/check/check.component.js +63 -0
  13. package/esm2015/lib/components/chips/chips.component.js +67 -0
  14. package/esm2015/lib/components/create-account/create-account.component.js +78 -0
  15. package/esm2015/lib/components/date/date.component.js +45 -0
  16. package/esm2015/lib/components/datetime/datetime.component.js +44 -0
  17. package/esm2015/lib/components/html/html.component.js +97 -0
  18. package/esm2015/lib/components/label/label.component.js +29 -0
  19. package/esm2015/lib/components/loader/loader.component.js +30 -0
  20. package/esm2015/lib/components/login/login.component.js +122 -0
  21. package/esm2015/lib/components/logs/logs.component.js +43 -0
  22. package/esm2015/lib/components/message/messageDialog.component.js +31 -0
  23. package/esm2015/lib/components/money/money.component.js +50 -0
  24. package/esm2015/lib/components/nav-menu/nav-menu.component.js +51 -0
  25. package/esm2015/lib/components/option/option.component.js +62 -0
  26. package/esm2015/lib/components/profile/profile.component.js +108 -0
  27. package/esm2015/lib/components/profiles/profiles.component.js +16 -0
  28. package/esm2015/lib/components/recover-account/recover-account.component.js +52 -0
  29. package/esm2015/lib/components/roles/addRoleDialog.component.js +59 -0
  30. package/esm2015/lib/components/roles/editRoleDialog.component.js +57 -0
  31. package/esm2015/lib/components/roles/roles.component.js +131 -0
  32. package/esm2015/lib/components/roles/viewRoleDialog.component.js +38 -0
  33. package/esm2015/lib/components/select/select.component.js +73 -0
  34. package/esm2015/lib/components/settings/settings.component.js +63 -0
  35. package/esm2015/lib/components/signup/signup.component.js +56 -0
  36. package/esm2015/lib/components/steps/steps.component.js +98 -0
  37. package/esm2015/lib/components/table/table.component.js +109 -0
  38. package/esm2015/lib/components/text/text.component.js +165 -0
  39. package/esm2015/lib/components/tiles/tiles.component.js +41 -0
  40. package/esm2015/lib/components/timeout/timeout.component.js +90 -0
  41. package/esm2015/lib/components/tin-spa.component.js +19 -0
  42. package/esm2015/lib/components/users/addUserDialog.component.js +53 -0
  43. package/esm2015/lib/components/users/editUserDialog.component.js +96 -0
  44. package/esm2015/lib/components/users/users.component.js +130 -0
  45. package/esm2015/lib/components/viewer/viewer.component.js +67 -0
  46. package/esm2015/lib/components/viewer/viewerDialog.component.js +76 -0
  47. package/esm2015/lib/dnd.directive.js +51 -0
  48. package/esm2015/lib/modules/spa-admin.module.js +67 -0
  49. package/esm2015/lib/modules/spa-index.module.js +33 -0
  50. package/esm2015/lib/modules/spa-mat.module.js +53 -0
  51. package/esm2015/lib/modules/spa-user.module.js +31 -0
  52. package/esm2015/lib/services/auth.service.js +153 -0
  53. package/esm2015/lib/services/data.service.js +78 -0
  54. package/esm2015/lib/services/export.service.js +29 -0
  55. package/esm2015/lib/services/loader-interceptor.service.js +77 -0
  56. package/esm2015/lib/services/loader.service.js +17 -0
  57. package/esm2015/lib/services/log.service.js +76 -0
  58. package/esm2015/lib/services/message.service.js +58 -0
  59. package/esm2015/lib/services/storage.service.js +42 -0
  60. package/esm2015/lib/services/tin-spa.service.js +14 -0
  61. package/esm2015/lib/tin-spa.module.js +91 -0
  62. package/esm2015/public-api.js +58 -0
  63. package/esm2015/tin-spa.js +9 -0
  64. package/esm5/lib/classes/Classes.js +298 -0
  65. package/esm5/lib/components/activity/activity.component.js +27 -0
  66. package/esm5/lib/components/attach/attach.component.js +119 -0
  67. package/esm5/lib/components/change-password/change-password.component.js +93 -0
  68. package/esm5/lib/components/check/check.component.js +64 -0
  69. package/esm5/lib/components/chips/chips.component.js +69 -0
  70. package/esm5/lib/components/create-account/create-account.component.js +80 -0
  71. package/esm5/lib/components/date/date.component.js +46 -0
  72. package/esm5/lib/components/datetime/datetime.component.js +45 -0
  73. package/esm5/lib/components/html/html.component.js +98 -0
  74. package/esm5/lib/components/label/label.component.js +30 -0
  75. package/esm5/lib/components/loader/loader.component.js +32 -0
  76. package/esm5/lib/components/login/login.component.js +125 -0
  77. package/esm5/lib/components/logs/logs.component.js +45 -0
  78. package/esm5/lib/components/message/messageDialog.component.js +32 -0
  79. package/esm5/lib/components/money/money.component.js +51 -0
  80. package/esm5/lib/components/nav-menu/nav-menu.component.js +53 -0
  81. package/esm5/lib/components/option/option.component.js +63 -0
  82. package/esm5/lib/components/profile/profile.component.js +112 -0
  83. package/esm5/lib/components/profiles/profiles.component.js +18 -0
  84. package/esm5/lib/components/recover-account/recover-account.component.js +54 -0
  85. package/esm5/lib/components/roles/addRoleDialog.component.js +61 -0
  86. package/esm5/lib/components/roles/editRoleDialog.component.js +59 -0
  87. package/esm5/lib/components/roles/roles.component.js +138 -0
  88. package/esm5/lib/components/roles/viewRoleDialog.component.js +39 -0
  89. package/esm5/lib/components/select/select.component.js +75 -0
  90. package/esm5/lib/components/settings/settings.component.js +66 -0
  91. package/esm5/lib/components/signup/signup.component.js +58 -0
  92. package/esm5/lib/components/steps/steps.component.js +110 -0
  93. package/esm5/lib/components/table/table.component.js +111 -0
  94. package/esm5/lib/components/text/text.component.js +168 -0
  95. package/esm5/lib/components/tiles/tiles.component.js +42 -0
  96. package/esm5/lib/components/timeout/timeout.component.js +92 -0
  97. package/esm5/lib/components/tin-spa.component.js +17 -0
  98. package/esm5/lib/components/users/addUserDialog.component.js +55 -0
  99. package/esm5/lib/components/users/editUserDialog.component.js +99 -0
  100. package/esm5/lib/components/users/users.component.js +135 -0
  101. package/esm5/lib/components/viewer/viewer.component.js +68 -0
  102. package/esm5/lib/components/viewer/viewerDialog.component.js +77 -0
  103. package/esm5/lib/dnd.directive.js +52 -0
  104. package/esm5/lib/modules/spa-admin.module.js +70 -0
  105. package/esm5/lib/modules/spa-index.module.js +36 -0
  106. package/esm5/lib/modules/spa-mat.module.js +56 -0
  107. package/esm5/lib/modules/spa-user.module.js +34 -0
  108. package/esm5/lib/services/auth.service.js +155 -0
  109. package/esm5/lib/services/data.service.js +79 -0
  110. package/esm5/lib/services/export.service.js +30 -0
  111. package/esm5/lib/services/loader-interceptor.service.js +79 -0
  112. package/esm5/lib/services/loader.service.js +18 -0
  113. package/esm5/lib/services/log.service.js +112 -0
  114. package/esm5/lib/services/message.service.js +59 -0
  115. package/esm5/lib/services/storage.service.js +74 -0
  116. package/esm5/lib/services/tin-spa.service.js +16 -0
  117. package/esm5/lib/tin-spa.module.js +94 -0
  118. package/esm5/public-api.js +58 -0
  119. package/esm5/tin-spa.js +9 -0
  120. package/fesm2015/tin-spa.js +3398 -0
  121. package/fesm2015/tin-spa.js.map +1 -0
  122. package/fesm5/tin-spa.js +3623 -0
  123. package/fesm5/tin-spa.js.map +1 -0
  124. package/lib/classes/Classes.d.ts +216 -375
  125. package/lib/components/activity/activity.component.d.ts +5 -3
  126. package/lib/components/activity/activity.component.d.ts.__ivy_ngcc_bak +8 -0
  127. package/lib/components/attach/attach.component.d.ts +30 -16
  128. package/lib/components/attach/attach.component.d.ts.__ivy_ngcc_bak +39 -0
  129. package/lib/components/change-password/change-password.component.d.ts +25 -0
  130. package/lib/components/change-password/change-password.component.d.ts.__ivy_ngcc_bak +20 -0
  131. package/lib/components/check/check.component.d.ts +6 -9
  132. package/lib/components/check/check.component.d.ts.__ivy_ngcc_bak +16 -0
  133. package/lib/components/chips/chips.component.d.ts +5 -3
  134. package/lib/components/chips/chips.component.d.ts.__ivy_ngcc_bak +15 -0
  135. package/lib/components/create-account/create-account.component.d.ts +30 -0
  136. package/lib/components/create-account/create-account.component.d.ts.__ivy_ngcc_bak +25 -0
  137. package/lib/components/date/date.component.d.ts +15 -26
  138. package/lib/components/date/date.component.d.ts.__ivy_ngcc_bak +13 -0
  139. package/lib/components/datetime/datetime.component.d.ts +5 -7
  140. package/lib/components/datetime/datetime.component.d.ts.__ivy_ngcc_bak +12 -0
  141. package/lib/components/html/html.component.d.ts +13 -12
  142. package/lib/components/html/html.component.d.ts.__ivy_ngcc_bak +12 -0
  143. package/lib/components/label/label.component.d.ts +5 -5
  144. package/lib/components/label/label.component.d.ts.__ivy_ngcc_bak +8 -0
  145. package/lib/components/loader/loader.component.d.ts +5 -3
  146. package/lib/components/loader/loader.component.d.ts.__ivy_ngcc_bak +9 -0
  147. package/lib/components/login/login.component.d.ts +34 -0
  148. package/lib/components/login/login.component.d.ts.__ivy_ngcc_bak +29 -0
  149. package/lib/components/logs/logs.component.d.ts +22 -0
  150. package/lib/components/logs/logs.component.d.ts.__ivy_ngcc_bak +17 -0
  151. package/lib/components/message/messageDialog.component.d.ts +5 -3
  152. package/lib/components/message/messageDialog.component.d.ts.__ivy_ngcc_bak +12 -0
  153. package/lib/components/money/money.component.d.ts +8 -29
  154. package/lib/components/money/money.component.d.ts.__ivy_ngcc_bak +14 -0
  155. package/lib/components/nav-menu/nav-menu.component.d.ts +7 -23
  156. package/lib/components/nav-menu/nav-menu.component.d.ts.__ivy_ngcc_bak +17 -0
  157. package/lib/components/option/option.component.d.ts +6 -16
  158. package/lib/components/option/option.component.d.ts.__ivy_ngcc_bak +17 -0
  159. package/lib/components/profile/profile.component.d.ts +35 -0
  160. package/lib/components/profile/profile.component.d.ts.__ivy_ngcc_bak +30 -0
  161. package/lib/components/profiles/profiles.component.d.ts +10 -0
  162. package/lib/components/profiles/profiles.component.d.ts.__ivy_ngcc_bak +5 -0
  163. package/lib/components/recover-account/recover-account.component.d.ts +20 -0
  164. package/lib/components/recover-account/recover-account.component.d.ts.__ivy_ngcc_bak +15 -0
  165. package/lib/components/roles/addRoleDialog.component.d.ts +24 -0
  166. package/lib/components/roles/addRoleDialog.component.d.ts.__ivy_ngcc_bak +19 -0
  167. package/lib/components/roles/editRoleDialog.component.d.ts +24 -0
  168. package/lib/components/roles/editRoleDialog.component.d.ts.__ivy_ngcc_bak +19 -0
  169. package/lib/components/roles/roles.component.d.ts +34 -0
  170. package/lib/components/roles/roles.component.d.ts.__ivy_ngcc_bak +29 -0
  171. package/lib/components/roles/viewRoleDialog.component.d.ts +20 -0
  172. package/lib/components/roles/viewRoleDialog.component.d.ts.__ivy_ngcc_bak +15 -0
  173. package/lib/components/select/select.component.d.ts +23 -21
  174. package/lib/components/select/select.component.d.ts.__ivy_ngcc_bak +20 -0
  175. package/lib/components/settings/settings.component.d.ts +21 -0
  176. package/lib/{pages/settings/settings.component.d.ts → components/settings/settings.component.d.ts.__ivy_ngcc_bak} +2 -5
  177. package/lib/components/signup/signup.component.d.ts +25 -0
  178. package/lib/{pages/signup/signup.component.d.ts → components/signup/signup.component.d.ts.__ivy_ngcc_bak} +4 -7
  179. package/lib/components/steps/steps.component.d.ts +13 -20
  180. package/lib/components/steps/steps.component.d.ts.__ivy_ngcc_bak +15 -0
  181. package/lib/components/table/table.component.d.ts +24 -85
  182. package/lib/components/table/table.component.d.ts.__ivy_ngcc_bak +25 -0
  183. package/lib/components/text/text.component.d.ts +17 -38
  184. package/lib/components/text/text.component.d.ts.__ivy_ngcc_bak +37 -0
  185. package/lib/components/tiles/tiles.component.d.ts +10 -22
  186. package/lib/components/tiles/tiles.component.d.ts.__ivy_ngcc_bak +11 -0
  187. package/lib/components/timeout/timeout.component.d.ts +26 -0
  188. package/lib/components/timeout/timeout.component.d.ts.__ivy_ngcc_bak +21 -0
  189. package/lib/components/tin-spa.component.d.ts +9 -4
  190. package/lib/components/tin-spa.component.d.ts.__ivy_ngcc_bak +5 -0
  191. package/lib/components/users/addUserDialog.component.d.ts +21 -0
  192. package/lib/components/users/addUserDialog.component.d.ts.__ivy_ngcc_bak +16 -0
  193. package/lib/components/users/editUserDialog.component.d.ts +32 -0
  194. package/lib/components/users/editUserDialog.component.d.ts.__ivy_ngcc_bak +27 -0
  195. package/lib/components/users/users.component.d.ts +40 -0
  196. package/lib/components/users/users.component.d.ts.__ivy_ngcc_bak +35 -0
  197. package/lib/components/viewer/viewer.component.d.ts +8 -12
  198. package/lib/components/viewer/viewer.component.d.ts.__ivy_ngcc_bak +16 -0
  199. package/lib/components/viewer/viewerDialog.component.d.ts +8 -8
  200. package/lib/components/viewer/viewerDialog.component.d.ts.__ivy_ngcc_bak +19 -0
  201. package/lib/dnd.directive.d.ts +13 -0
  202. package/lib/dnd.directive.d.ts.__ivy_ngcc_bak +8 -0
  203. package/lib/modules/spa-admin.module.d.ts +19 -13
  204. package/lib/modules/spa-admin.module.d.ts.__ivy_ngcc_bak +2 -0
  205. package/lib/modules/spa-index.module.d.ts +11 -11
  206. package/lib/modules/spa-index.module.d.ts.__ivy_ngcc_bak +2 -0
  207. package/lib/modules/spa-mat.module.d.ts +32 -36
  208. package/lib/modules/spa-mat.module.d.ts.__ivy_ngcc_bak +2 -0
  209. package/lib/modules/spa-user.module.d.ts +10 -9
  210. package/lib/modules/spa-user.module.d.ts.__ivy_ngcc_bak +2 -0
  211. package/lib/services/auth.service.d.ts +15 -27
  212. package/lib/services/auth.service.d.ts.__ivy_ngcc_bak +45 -0
  213. package/lib/services/data.service.d.ts +27 -0
  214. package/lib/services/data.service.d.ts.__ivy_ngcc_bak +23 -0
  215. package/lib/services/export.service.d.ts +8 -3
  216. package/lib/services/export.service.d.ts.__ivy_ngcc_bak +7 -0
  217. package/lib/services/loader-interceptor.service.d.ts +6 -5
  218. package/lib/services/loader-interceptor.service.d.ts.__ivy_ngcc_bak +18 -0
  219. package/lib/services/loader.service.d.ts +4 -3
  220. package/lib/services/loader.service.d.ts.__ivy_ngcc_bak +5 -0
  221. package/lib/services/log.service.d.ts +5 -4
  222. package/lib/services/log.service.d.ts.__ivy_ngcc_bak +16 -0
  223. package/lib/services/message.service.d.ts +5 -5
  224. package/lib/services/message.service.d.ts.__ivy_ngcc_bak +12 -0
  225. package/lib/services/storage.service.d.ts +4 -3
  226. package/lib/services/storage.service.d.ts.__ivy_ngcc_bak +7 -0
  227. package/lib/services/tin-spa.service.d.ts +4 -3
  228. package/lib/services/tin-spa.service.d.ts.__ivy_ngcc_bak +3 -0
  229. package/lib/tin-spa.module.d.ts +35 -84
  230. package/lib/tin-spa.module.d.ts.__ivy_ngcc_bak +2 -0
  231. package/package.json +23 -23
  232. package/public-api.d.ts +21 -50
  233. package/tin-spa.d.ts +10 -0
  234. package/tin-spa.d.ts.__ivy_ngcc_bak +8 -0
  235. package/tin-spa.metadata.json +1 -0
  236. package/esm2020/lib/classes/Classes.mjs +0 -112
  237. package/esm2020/lib/classes/LibClasses.mjs +0 -180
  238. package/esm2020/lib/classes/TinCore.mjs +0 -568
  239. package/esm2020/lib/components/activity/activity.component.mjs +0 -24
  240. package/esm2020/lib/components/alert/alert.component.mjs +0 -43
  241. package/esm2020/lib/components/attach/attach.component.mjs +0 -102
  242. package/esm2020/lib/components/capsules/capsules.component.mjs +0 -63
  243. package/esm2020/lib/components/cards/cards.component.mjs +0 -103
  244. package/esm2020/lib/components/check/check.component.mjs +0 -67
  245. package/esm2020/lib/components/chips/chips.component.mjs +0 -58
  246. package/esm2020/lib/components/date/date.component.mjs +0 -103
  247. package/esm2020/lib/components/datetime/datetime.component.mjs +0 -55
  248. package/esm2020/lib/components/email/email.component.mjs +0 -133
  249. package/esm2020/lib/components/filter/filter.component.mjs +0 -58
  250. package/esm2020/lib/components/form/form.component.mjs +0 -296
  251. package/esm2020/lib/components/html/html.component.mjs +0 -34
  252. package/esm2020/lib/components/label/label.component.mjs +0 -31
  253. package/esm2020/lib/components/list-dialog/list-dialog.component.mjs +0 -68
  254. package/esm2020/lib/components/loader/loader.component.mjs +0 -25
  255. package/esm2020/lib/components/message/messageDialog.component.mjs +0 -33
  256. package/esm2020/lib/components/money/currency-input-mask.directive.mjs +0 -185
  257. package/esm2020/lib/components/money/currency-input-mask.module.mjs +0 -28
  258. package/esm2020/lib/components/money/money.component.mjs +0 -137
  259. package/esm2020/lib/components/multi-select/multi-select.component.mjs +0 -165
  260. package/esm2020/lib/components/multi-text/multi-text.component.mjs +0 -208
  261. package/esm2020/lib/components/nav-menu/nav-menu.component.mjs +0 -88
  262. package/esm2020/lib/components/notes/notes.component.mjs +0 -62
  263. package/esm2020/lib/components/number/number.component.mjs +0 -131
  264. package/esm2020/lib/components/option/option.component.mjs +0 -92
  265. package/esm2020/lib/components/page/page.component.mjs +0 -101
  266. package/esm2020/lib/components/search/search.component.mjs +0 -36
  267. package/esm2020/lib/components/select/select.component.mjs +0 -75
  268. package/esm2020/lib/components/select-bitwise/select-bitwise.component.mjs +0 -87
  269. package/esm2020/lib/components/select-common/select-common.component.mjs +0 -206
  270. package/esm2020/lib/components/select-internal/select-internal.component.mjs +0 -75
  271. package/esm2020/lib/components/select-lite/select-lite.component.mjs +0 -18
  272. package/esm2020/lib/components/statuses/statuses.component.mjs +0 -44
  273. package/esm2020/lib/components/steps/steps.component.mjs +0 -112
  274. package/esm2020/lib/components/suffix/suffix.component.mjs +0 -70
  275. package/esm2020/lib/components/table/detailsDialog.component.mjs +0 -406
  276. package/esm2020/lib/components/table/table.component.mjs +0 -440
  277. package/esm2020/lib/components/table-action/table-action.component.mjs +0 -80
  278. package/esm2020/lib/components/table-header/table-header.component.mjs +0 -148
  279. package/esm2020/lib/components/table-internal/detailsDialog-internal.component.mjs +0 -406
  280. package/esm2020/lib/components/table-internal/table-internal.component.mjs +0 -441
  281. package/esm2020/lib/components/table-lite/detailsDialog-lite.component.mjs +0 -404
  282. package/esm2020/lib/components/table-lite/table-lite.component.mjs +0 -441
  283. package/esm2020/lib/components/table-row/table-row.component.mjs +0 -93
  284. package/esm2020/lib/components/tabs/tabs.component.mjs +0 -74
  285. package/esm2020/lib/components/text/text.component.mjs +0 -255
  286. package/esm2020/lib/components/tiles/tiles.component.mjs +0 -99
  287. package/esm2020/lib/components/tin-spa.component.mjs +0 -19
  288. package/esm2020/lib/components/viewer/viewer.component.mjs +0 -83
  289. package/esm2020/lib/components/viewer/viewerDialog.component.mjs +0 -95
  290. package/esm2020/lib/modules/admin/admin-routing.module.mjs +0 -71
  291. package/esm2020/lib/modules/admin/admin.module.mjs +0 -26
  292. package/esm2020/lib/modules/index/index-routing.module.mjs +0 -27
  293. package/esm2020/lib/modules/index/index.module.mjs +0 -26
  294. package/esm2020/lib/modules/spa-admin.module.mjs +0 -71
  295. package/esm2020/lib/modules/spa-index.module.mjs +0 -54
  296. package/esm2020/lib/modules/spa-mat.module.mjs +0 -84
  297. package/esm2020/lib/modules/spa-user.module.mjs +0 -47
  298. package/esm2020/lib/modules/user/user-routing.module.mjs +0 -23
  299. package/esm2020/lib/modules/user/user.module.mjs +0 -26
  300. package/esm2020/lib/pages/accounts/accountDialog.component.mjs +0 -56
  301. package/esm2020/lib/pages/accounts/accounts.component.mjs +0 -70
  302. package/esm2020/lib/pages/app-models/app-models.component.mjs +0 -56
  303. package/esm2020/lib/pages/approvals/approvals.component.mjs +0 -19
  304. package/esm2020/lib/pages/approvals-config/approvals-config.component.mjs +0 -165
  305. package/esm2020/lib/pages/bug/bug.component.mjs +0 -14
  306. package/esm2020/lib/pages/change-password/change-password.component.mjs +0 -92
  307. package/esm2020/lib/pages/create-account/create-account.component.mjs +0 -110
  308. package/esm2020/lib/pages/customers/customers.component.mjs +0 -21
  309. package/esm2020/lib/pages/departments/departments.component.mjs +0 -22
  310. package/esm2020/lib/pages/employees/employees.component.mjs +0 -20
  311. package/esm2020/lib/pages/grades/grades.component.mjs +0 -14
  312. package/esm2020/lib/pages/inventory/inventory.component.mjs +0 -99
  313. package/esm2020/lib/pages/inventory/quantityDialog.component.mjs +0 -53
  314. package/esm2020/lib/pages/invitations-table/invitations-table.component.mjs +0 -71
  315. package/esm2020/lib/pages/login/login.component.mjs +0 -166
  316. package/esm2020/lib/pages/logs/logs.component.mjs +0 -42
  317. package/esm2020/lib/pages/membership/membership.component.mjs +0 -44
  318. package/esm2020/lib/pages/notifications/notifications.component.mjs +0 -90
  319. package/esm2020/lib/pages/notifications-config/notifications-config.component.mjs +0 -113
  320. package/esm2020/lib/pages/plans/plans.component.mjs +0 -44
  321. package/esm2020/lib/pages/positions/positions.component.mjs +0 -21
  322. package/esm2020/lib/pages/profile/profile.component.mjs +0 -94
  323. package/esm2020/lib/pages/recover-account/recover-account.component.mjs +0 -46
  324. package/esm2020/lib/pages/roles/addRoleDialog.component.mjs +0 -60
  325. package/esm2020/lib/pages/roles/roles.component.mjs +0 -151
  326. package/esm2020/lib/pages/settings/settings.component.mjs +0 -54
  327. package/esm2020/lib/pages/signup/signup.component.mjs +0 -50
  328. package/esm2020/lib/pages/suppliers/suppliers.component.mjs +0 -22
  329. package/esm2020/lib/pages/tasks/tasks.component.mjs +0 -86
  330. package/esm2020/lib/pages/tenant-settings/tenant-settings.component.mjs +0 -228
  331. package/esm2020/lib/pages/tenants/tenants.component.mjs +0 -47
  332. package/esm2020/lib/pages/transactions/transactDialog.component.mjs +0 -80
  333. package/esm2020/lib/pages/transactions/transactions.component.mjs +0 -101
  334. package/esm2020/lib/pages/users/users.component.mjs +0 -167
  335. package/esm2020/lib/pages/welcome/welcome.component.mjs +0 -86
  336. package/esm2020/lib/pipes/camelToWords.pipe.mjs +0 -17
  337. package/esm2020/lib/select-context.directive.mjs +0 -23
  338. package/esm2020/lib/services/auth.service.mjs +0 -175
  339. package/esm2020/lib/services/button.service.mjs +0 -162
  340. package/esm2020/lib/services/condition.service.mjs +0 -32
  341. package/esm2020/lib/services/csv.service.mjs +0 -49
  342. package/esm2020/lib/services/datalib.service.mjs +0 -860
  343. package/esm2020/lib/services/dialog.service.mjs +0 -125
  344. package/esm2020/lib/services/export.service.mjs +0 -16
  345. package/esm2020/lib/services/http.service.mjs +0 -79
  346. package/esm2020/lib/services/loader-interceptor.service.mjs +0 -86
  347. package/esm2020/lib/services/loader.service.mjs +0 -17
  348. package/esm2020/lib/services/log.service.mjs +0 -77
  349. package/esm2020/lib/services/message.service.mjs +0 -59
  350. package/esm2020/lib/services/notifications.service.mjs +0 -33
  351. package/esm2020/lib/services/storage.service.mjs +0 -34
  352. package/esm2020/lib/services/table-config.service.mjs +0 -78
  353. package/esm2020/lib/services/tin-spa.service.mjs +0 -14
  354. package/esm2020/lib/tin-spa.module.mjs +0 -225
  355. package/esm2020/public-api.mjs +0 -90
  356. package/esm2020/tin-spa.mjs +0 -5
  357. package/fesm2015/tin-spa.mjs +0 -11736
  358. package/fesm2015/tin-spa.mjs.map +0 -1
  359. package/fesm2020/tin-spa.mjs +0 -11738
  360. package/fesm2020/tin-spa.mjs.map +0 -1
  361. package/index.d.ts +0 -5
  362. package/lib/classes/LibClasses.d.ts +0 -173
  363. package/lib/classes/TinCore.d.ts +0 -59
  364. package/lib/components/alert/alert.component.d.ts +0 -15
  365. package/lib/components/capsules/capsules.component.d.ts +0 -26
  366. package/lib/components/cards/cards.component.d.ts +0 -39
  367. package/lib/components/email/email.component.d.ts +0 -40
  368. package/lib/components/filter/filter.component.d.ts +0 -20
  369. package/lib/components/form/form.component.d.ts +0 -47
  370. package/lib/components/list-dialog/list-dialog.component.d.ts +0 -23
  371. package/lib/components/money/currency-input-mask.directive.d.ts +0 -41
  372. package/lib/components/money/currency-input-mask.module.d.ts +0 -9
  373. package/lib/components/multi-select/multi-select.component.d.ts +0 -47
  374. package/lib/components/multi-text/multi-text.component.d.ts +0 -56
  375. package/lib/components/notes/notes.component.d.ts +0 -19
  376. package/lib/components/number/number.component.d.ts +0 -41
  377. package/lib/components/page/page.component.d.ts +0 -38
  378. package/lib/components/search/search.component.d.ts +0 -15
  379. package/lib/components/select-bitwise/select-bitwise.component.d.ts +0 -31
  380. package/lib/components/select-common/select-common.component.d.ts +0 -53
  381. package/lib/components/select-internal/select-internal.component.d.ts +0 -23
  382. package/lib/components/select-lite/select-lite.component.d.ts +0 -8
  383. package/lib/components/statuses/statuses.component.d.ts +0 -12
  384. package/lib/components/suffix/suffix.component.d.ts +0 -23
  385. package/lib/components/table/detailsDialog.component.d.ts +0 -86
  386. package/lib/components/table-action/table-action.component.d.ts +0 -25
  387. package/lib/components/table-header/table-header.component.d.ts +0 -46
  388. package/lib/components/table-internal/detailsDialog-internal.component.d.ts +0 -86
  389. package/lib/components/table-internal/table-internal.component.d.ts +0 -91
  390. package/lib/components/table-lite/detailsDialog-lite.component.d.ts +0 -86
  391. package/lib/components/table-lite/table-lite.component.d.ts +0 -91
  392. package/lib/components/table-row/table-row.component.d.ts +0 -31
  393. package/lib/components/tabs/tabs.component.d.ts +0 -32
  394. package/lib/modules/admin/admin-routing.module.d.ts +0 -7
  395. package/lib/modules/admin/admin.module.d.ts +0 -9
  396. package/lib/modules/index/index-routing.module.d.ts +0 -7
  397. package/lib/modules/index/index.module.d.ts +0 -9
  398. package/lib/modules/user/user-routing.module.d.ts +0 -7
  399. package/lib/modules/user/user.module.d.ts +0 -9
  400. package/lib/pages/accounts/accountDialog.component.d.ts +0 -27
  401. package/lib/pages/accounts/accounts.component.d.ts +0 -25
  402. package/lib/pages/app-models/app-models.component.d.ts +0 -15
  403. package/lib/pages/approvals/approvals.component.d.ts +0 -10
  404. package/lib/pages/approvals-config/approvals-config.component.d.ts +0 -24
  405. package/lib/pages/bug/bug.component.d.ts +0 -8
  406. package/lib/pages/change-password/change-password.component.d.ts +0 -27
  407. package/lib/pages/create-account/create-account.component.d.ts +0 -34
  408. package/lib/pages/customers/customers.component.d.ts +0 -12
  409. package/lib/pages/departments/departments.component.d.ts +0 -14
  410. package/lib/pages/employees/employees.component.d.ts +0 -12
  411. package/lib/pages/grades/grades.component.d.ts +0 -8
  412. package/lib/pages/inventory/inventory.component.d.ts +0 -25
  413. package/lib/pages/inventory/quantityDialog.component.d.ts +0 -23
  414. package/lib/pages/invitations-table/invitations-table.component.d.ts +0 -19
  415. package/lib/pages/login/login.component.d.ts +0 -46
  416. package/lib/pages/logs/logs.component.d.ts +0 -14
  417. package/lib/pages/membership/membership.component.d.ts +0 -13
  418. package/lib/pages/notifications/notifications.component.d.ts +0 -16
  419. package/lib/pages/notifications-config/notifications-config.component.d.ts +0 -17
  420. package/lib/pages/plans/plans.component.d.ts +0 -13
  421. package/lib/pages/positions/positions.component.d.ts +0 -12
  422. package/lib/pages/profile/profile.component.d.ts +0 -35
  423. package/lib/pages/recover-account/recover-account.component.d.ts +0 -18
  424. package/lib/pages/roles/addRoleDialog.component.d.ts +0 -24
  425. package/lib/pages/roles/roles.component.d.ts +0 -42
  426. package/lib/pages/suppliers/suppliers.component.d.ts +0 -14
  427. package/lib/pages/tasks/tasks.component.d.ts +0 -27
  428. package/lib/pages/tenant-settings/tenant-settings.component.d.ts +0 -47
  429. package/lib/pages/tenants/tenants.component.d.ts +0 -17
  430. package/lib/pages/transactions/transactDialog.component.d.ts +0 -26
  431. package/lib/pages/transactions/transactions.component.d.ts +0 -31
  432. package/lib/pages/users/users.component.d.ts +0 -28
  433. package/lib/pages/welcome/welcome.component.d.ts +0 -25
  434. package/lib/pipes/camelToWords.pipe.d.ts +0 -7
  435. package/lib/select-context.directive.d.ts +0 -10
  436. package/lib/services/button.service.d.ts +0 -30
  437. package/lib/services/condition.service.d.ts +0 -10
  438. package/lib/services/csv.service.d.ts +0 -10
  439. package/lib/services/datalib.service.d.ts +0 -125
  440. package/lib/services/dialog.service.d.ts +0 -20
  441. package/lib/services/http.service.d.ts +0 -22
  442. package/lib/services/notifications.service.d.ts +0 -12
  443. package/lib/services/table-config.service.d.ts +0 -17
@@ -0,0 +1,3867 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/snack-bar'), require('@angular/material/dialog'), require('rxjs'), require('rxjs/operators'), require('file-saver'), require('xlsx'), require('tin-core'), require('@angular/router'), require('@angular/common'), require('@angular/material/autocomplete'), require('@angular/material/badge'), require('@angular/material/button'), require('@angular/material/card'), require('@angular/material/checkbox'), require('@angular/material/chips'), require('@angular/material/core'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/material/input'), require('@angular/material/list'), require('@angular/material/menu'), require('@angular/material/paginator'), require('@angular/material/progress-spinner'), require('@angular/material/radio'), require('@angular/material/select'), require('@angular/material/slider'), require('@angular/material/sort'), require('@angular/material/stepper'), require('@angular/material/table'), require('@angular/material/tabs'), require('@angular/material/tooltip'), require('@angular/forms'), require('@angular/common/http'), require('@ng-idle/keepalive'), require('angular2-moment'), require('ngx-doc-viewer'), require('@ng-idle/core'), require('@kolkov/angular-editor'), require('@angular/cdk/stepper')) :
3
+ typeof define === 'function' && define.amd ? define('tin-spa', ['exports', '@angular/core', '@angular/material/snack-bar', '@angular/material/dialog', 'rxjs', 'rxjs/operators', 'file-saver', 'xlsx', 'tin-core', '@angular/router', '@angular/common', '@angular/material/autocomplete', '@angular/material/badge', '@angular/material/button', '@angular/material/card', '@angular/material/checkbox', '@angular/material/chips', '@angular/material/core', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/icon', '@angular/material/input', '@angular/material/list', '@angular/material/menu', '@angular/material/paginator', '@angular/material/progress-spinner', '@angular/material/radio', '@angular/material/select', '@angular/material/slider', '@angular/material/sort', '@angular/material/stepper', '@angular/material/table', '@angular/material/tabs', '@angular/material/tooltip', '@angular/forms', '@angular/common/http', '@ng-idle/keepalive', 'angular2-moment', 'ngx-doc-viewer', '@ng-idle/core', '@kolkov/angular-editor', '@angular/cdk/stepper'], factory) :
4
+ (global = global || self, factory(global['tin-spa'] = {}, global.ng.core, global.ng.material.snackBar, global.ng.material.dialog, global.rxjs, global.rxjs.operators, global.fileSaver, global.xlsx, global.tinCore, global.ng.router, global.ng.common, global.ng.material.autocomplete, global.ng.material.badge, global.ng.material.button, global.ng.material.card, global.ng.material.checkbox, global.ng.material.chips, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.icon, global.ng.material.input, global.ng.material.list, global.ng.material.menu, global.ng.material.paginator, global.ng.material.progressSpinner, global.ng.material.radio, global.ng.material.select, global.ng.material.slider, global.ng.material.sort, global.ng.material.stepper, global.ng.material.table, global.ng.material.tabs, global.ng.material.tooltip, global.ng.forms, global.ng.common.http, global.keepalive, global.angular2Moment, global.ngxDocViewer, global.core$2, global.angularEditor, global.ng.cdk.stepper));
5
+ }(this, (function (exports, core, snackBar, dialog, rxjs, operators, fileSaver, xlsx, tinCore, router, common, autocomplete, badge, button, card, checkbox, chips, core$1, datepicker, formField, icon, input, list, menu, paginator, progressSpinner, radio, select, slider, sort, stepper, table, tabs, tooltip, forms, http, keepalive, angular2Moment, ngxDocViewer, core$2, angularEditor, stepper$1) { 'use strict';
6
+
7
+ /*! *****************************************************************************
8
+ Copyright (c) Microsoft Corporation. All rights reserved.
9
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
10
+ this file except in compliance with the License. You may obtain a copy of the
11
+ License at http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16
+ MERCHANTABLITY OR NON-INFRINGEMENT.
17
+
18
+ See the Apache Version 2.0 License for specific language governing permissions
19
+ and limitations under the License.
20
+ ***************************************************************************** */
21
+ /* global Reflect, Promise */
22
+
23
+ var extendStatics = function(d, b) {
24
+ extendStatics = Object.setPrototypeOf ||
25
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27
+ return extendStatics(d, b);
28
+ };
29
+
30
+ function __extends(d, b) {
31
+ extendStatics(d, b);
32
+ function __() { this.constructor = d; }
33
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
+ }
35
+
36
+ var __assign = function() {
37
+ __assign = Object.assign || function __assign(t) {
38
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
39
+ s = arguments[i];
40
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41
+ }
42
+ return t;
43
+ };
44
+ return __assign.apply(this, arguments);
45
+ };
46
+
47
+ function __rest(s, e) {
48
+ var t = {};
49
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
+ t[p] = s[p];
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
+ t[p[i]] = s[p[i]];
55
+ }
56
+ return t;
57
+ }
58
+
59
+ function __decorate(decorators, target, key, desc) {
60
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
64
+ }
65
+
66
+ function __param(paramIndex, decorator) {
67
+ return function (target, key) { decorator(target, key, paramIndex); }
68
+ }
69
+
70
+ function __metadata(metadataKey, metadataValue) {
71
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72
+ }
73
+
74
+ function __awaiter(thisArg, _arguments, P, generator) {
75
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
76
+ return new (P || (P = Promise))(function (resolve, reject) {
77
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
78
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
79
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
80
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
81
+ });
82
+ }
83
+
84
+ function __generator(thisArg, body) {
85
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
86
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
87
+ function verb(n) { return function (v) { return step([n, v]); }; }
88
+ function step(op) {
89
+ if (f) throw new TypeError("Generator is already executing.");
90
+ while (_) try {
91
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
92
+ if (y = 0, t) op = [op[0] & 2, t.value];
93
+ switch (op[0]) {
94
+ case 0: case 1: t = op; break;
95
+ case 4: _.label++; return { value: op[1], done: false };
96
+ case 5: _.label++; y = op[1]; op = [0]; continue;
97
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
98
+ default:
99
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
100
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
101
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
102
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
103
+ if (t[2]) _.ops.pop();
104
+ _.trys.pop(); continue;
105
+ }
106
+ op = body.call(thisArg, _);
107
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
108
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
109
+ }
110
+ }
111
+
112
+ function __exportStar(m, exports) {
113
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
114
+ }
115
+
116
+ function __values(o) {
117
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
118
+ if (m) return m.call(o);
119
+ if (o && typeof o.length === "number") return {
120
+ next: function () {
121
+ if (o && i >= o.length) o = void 0;
122
+ return { value: o && o[i++], done: !o };
123
+ }
124
+ };
125
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
126
+ }
127
+
128
+ function __read(o, n) {
129
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
130
+ if (!m) return o;
131
+ var i = m.call(o), r, ar = [], e;
132
+ try {
133
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
134
+ }
135
+ catch (error) { e = { error: error }; }
136
+ finally {
137
+ try {
138
+ if (r && !r.done && (m = i["return"])) m.call(i);
139
+ }
140
+ finally { if (e) throw e.error; }
141
+ }
142
+ return ar;
143
+ }
144
+
145
+ function __spread() {
146
+ for (var ar = [], i = 0; i < arguments.length; i++)
147
+ ar = ar.concat(__read(arguments[i]));
148
+ return ar;
149
+ }
150
+
151
+ function __spreadArrays() {
152
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
153
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
154
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
155
+ r[k] = a[j];
156
+ return r;
157
+ };
158
+
159
+ function __await(v) {
160
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
161
+ }
162
+
163
+ function __asyncGenerator(thisArg, _arguments, generator) {
164
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
165
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
166
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
167
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
168
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
169
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
170
+ function fulfill(value) { resume("next", value); }
171
+ function reject(value) { resume("throw", value); }
172
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
173
+ }
174
+
175
+ function __asyncDelegator(o) {
176
+ var i, p;
177
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
178
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
179
+ }
180
+
181
+ function __asyncValues(o) {
182
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
183
+ var m = o[Symbol.asyncIterator], i;
184
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
185
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
186
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
187
+ }
188
+
189
+ function __makeTemplateObject(cooked, raw) {
190
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
191
+ return cooked;
192
+ };
193
+
194
+ function __importStar(mod) {
195
+ if (mod && mod.__esModule) return mod;
196
+ var result = {};
197
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
198
+ result.default = mod;
199
+ return result;
200
+ }
201
+
202
+ function __importDefault(mod) {
203
+ return (mod && mod.__esModule) ? mod : { default: mod };
204
+ }
205
+
206
+ function __classPrivateFieldGet(receiver, privateMap) {
207
+ if (!privateMap.has(receiver)) {
208
+ throw new TypeError("attempted to get private field on non-instance");
209
+ }
210
+ return privateMap.get(receiver);
211
+ }
212
+
213
+ function __classPrivateFieldSet(receiver, privateMap, value) {
214
+ if (!privateMap.has(receiver)) {
215
+ throw new TypeError("attempted to set private field on non-instance");
216
+ }
217
+ privateMap.set(receiver, value);
218
+ return value;
219
+ }
220
+
221
+ var TinSpaService = /** @class */ (function () {
222
+ function TinSpaService() {
223
+ }
224
+ TinSpaService.ɵprov = core.ɵɵdefineInjectable({ factory: function TinSpaService_Factory() { return new TinSpaService(); }, token: TinSpaService, providedIn: "root" });
225
+ TinSpaService = __decorate([
226
+ core.Injectable({
227
+ providedIn: 'root'
228
+ })
229
+ ], TinSpaService);
230
+ return TinSpaService;
231
+ }());
232
+
233
+ var StorageService = /** @class */ (function () {
234
+ function StorageService() {
235
+ }
236
+ // Store the value
237
+ StorageService.prototype.store = function (storageKey, value) {
238
+ return __awaiter(this, void 0, void 0, function () {
239
+ var encryptedValue;
240
+ return __generator(this, function (_a) {
241
+ switch (_a.label) {
242
+ case 0:
243
+ encryptedValue = btoa(escape(JSON.stringify(value)));
244
+ // const encryptedValue = JSON.stringify(value);
245
+ return [4 /*yield*/, localStorage.setItem(storageKey, encryptedValue)];
246
+ case 1:
247
+ // const encryptedValue = JSON.stringify(value);
248
+ _a.sent();
249
+ return [2 /*return*/];
250
+ }
251
+ });
252
+ });
253
+ };
254
+ // Get the value
255
+ StorageService.prototype.get = function (storageKey) {
256
+ return __awaiter(this, void 0, void 0, function () {
257
+ var ret;
258
+ return __generator(this, function (_a) {
259
+ switch (_a.label) {
260
+ case 0: return [4 /*yield*/, localStorage.getItem(storageKey)];
261
+ case 1:
262
+ ret = _a.sent();
263
+ return [2 /*return*/, JSON.parse(unescape(atob(ret)))];
264
+ }
265
+ });
266
+ });
267
+ };
268
+ // Remove
269
+ StorageService.prototype.removeStorageItem = function (storageKey) {
270
+ return __awaiter(this, void 0, void 0, function () {
271
+ return __generator(this, function (_a) {
272
+ switch (_a.label) {
273
+ case 0: return [4 /*yield*/, localStorage.removeItem(storageKey)];
274
+ case 1:
275
+ _a.sent();
276
+ return [2 /*return*/];
277
+ }
278
+ });
279
+ });
280
+ };
281
+ // Clear storage
282
+ StorageService.prototype.clear = function () {
283
+ return __awaiter(this, void 0, void 0, function () {
284
+ return __generator(this, function (_a) {
285
+ switch (_a.label) {
286
+ case 0: return [4 /*yield*/, localStorage.clear()];
287
+ case 1:
288
+ _a.sent();
289
+ return [2 /*return*/];
290
+ }
291
+ });
292
+ });
293
+ };
294
+ StorageService.ɵprov = core.ɵɵdefineInjectable({ factory: function StorageService_Factory() { return new StorageService(); }, token: StorageService, providedIn: "root" });
295
+ StorageService = __decorate([
296
+ core.Injectable({
297
+ providedIn: 'root'
298
+ })
299
+ ], StorageService);
300
+ return StorageService;
301
+ }());
302
+
303
+ var messageDialog = /** @class */ (function () {
304
+ function messageDialog(dialogRef, data) {
305
+ this.dialogRef = dialogRef;
306
+ this.data = data;
307
+ }
308
+ messageDialog.prototype.ngOnInit = function () {
309
+ this.messageType = this.data.type;
310
+ this._messageSubject = this.data.subject;
311
+ this._messageDetails = this.data.details;
312
+ };
313
+ messageDialog.prototype.response = function (resp) {
314
+ this.dialogRef.close(resp);
315
+ };
316
+ messageDialog.ctorParameters = function () { return [
317
+ { type: dialog.MatDialogRef },
318
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
319
+ ]; };
320
+ messageDialog = __decorate([
321
+ core.Component({
322
+ selector: 'lib-app-message',
323
+ template: "\r\n <h2 mat-dialog-title>\r\n\r\n <mat-label *ngIf=\"messageType=='confirm'\">Confirm</mat-label>\r\n <mat-label *ngIf=\"messageType=='info'\">Information</mat-label>\r\n <mat-label *ngIf=\"messageType=='error'\">Error</mat-label>\r\n\r\n </h2>\r\n\r\n <mat-dialog-content class=\"mat-typography\">\r\n\r\n\r\n <!-- Confirm -->\r\n <p *ngIf=\"messageType=='confirm'\">{{_messageDetails}}</p>\r\n\r\n\r\n <!-- Information -->\r\n <div *ngIf=\"messageType=='info'\">\r\n\r\n <h3>{{_messageSubject}}</h3>\r\n <mat-label>{{_messageDetails}}</mat-label>\r\n\r\n </div>\r\n\r\n\r\n <!-- Error -->\r\n <div *ngIf=\"messageType=='error'\">\r\n\r\n <mat-label>{{_messageDetails}}</mat-label>\r\n\r\n </div>\r\n\r\n\r\n </mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n\r\n <button id=\"btnYes\" mat-stroked-button *ngIf=\"messageType=='confirm'\" (click)=\"response('yes')\" cdkFocusInitial>Yes</button>\r\n\r\n <button id=\"btnNo\" mat-stroked-button *ngIf=\"messageType=='confirm'\" (click)=\"response('no')\" >No</button>\r\n\r\n <button id=\"btnOK\" mat-stroked-button *ngIf=\"messageType=='info' || messageType=='error'\" (click)=\"response('ok')\" cdkFocusInitial>OK</button>\r\n\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n"
324
+ }),
325
+ __param(1, core.Inject(dialog.MAT_DIALOG_DATA))
326
+ ], messageDialog);
327
+ return messageDialog;
328
+ }());
329
+ ;
330
+
331
+ var MessageService = /** @class */ (function () {
332
+ function MessageService(snackBar, dialog) {
333
+ this.snackBar = snackBar;
334
+ this.dialog = dialog;
335
+ }
336
+ MessageService.prototype.toast = function (msg) {
337
+ this.snackBar.open(msg, "OK", { duration: 5000 });
338
+ };
339
+ MessageService.prototype.info = function (subject, details) {
340
+ var type = "info";
341
+ var dialogRef = this.dialog.open(messageDialog, {
342
+ width: "600px",
343
+ data: { type: type, subject: subject, details: details },
344
+ });
345
+ };
346
+ MessageService.prototype.error = function (details) {
347
+ var type = "error";
348
+ var subject;
349
+ var dialogRef = this.dialog.open(messageDialog, {
350
+ width: "600px",
351
+ data: { type: type, subject: subject, details: details },
352
+ });
353
+ };
354
+ MessageService.prototype.confirm = function (msg) {
355
+ var type = "confirm";
356
+ var subject = "";
357
+ var details = msg;
358
+ var dialogRef = this.dialog.open(messageDialog, {
359
+ width: "400px",
360
+ data: { type: type, subject: subject, details: details },
361
+ });
362
+ return dialogRef.afterClosed().pipe(operators.mergeMap(function (result) {
363
+ return rxjs.of(result);
364
+ }));
365
+ };
366
+ MessageService.ctorParameters = function () { return [
367
+ { type: snackBar.MatSnackBar },
368
+ { type: dialog.MatDialog }
369
+ ]; };
370
+ MessageService.ɵprov = core.ɵɵdefineInjectable({ factory: function MessageService_Factory() { return new MessageService(core.ɵɵinject(snackBar.MatSnackBar), core.ɵɵinject(dialog.MatDialog)); }, token: MessageService, providedIn: "root" });
371
+ MessageService = __decorate([
372
+ core.Injectable({
373
+ providedIn: "root",
374
+ })
375
+ ], MessageService);
376
+ return MessageService;
377
+ }());
378
+
379
+ var ExportService = /** @class */ (function () {
380
+ function ExportService() {
381
+ this.fileType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
382
+ this.fileExtension = '.xlsx';
383
+ }
384
+ ExportService.prototype.exportExcel = function (jsonData, fileName) {
385
+ var ws = xlsx.utils.json_to_sheet(jsonData);
386
+ var wb = { Sheets: { 'data': ws }, SheetNames: ['data'] };
387
+ var excelBuffer = xlsx.write(wb, { bookType: 'xlsx', type: 'array' });
388
+ this.saveExcelFile(excelBuffer, fileName);
389
+ };
390
+ ExportService.prototype.saveExcelFile = function (buffer, fileName) {
391
+ var data = new Blob([buffer], { type: this.fileType });
392
+ fileSaver.saveAs(data, fileName + this.fileExtension);
393
+ };
394
+ ExportService.ɵprov = core.ɵɵdefineInjectable({ factory: function ExportService_Factory() { return new ExportService(); }, token: ExportService, providedIn: "root" });
395
+ ExportService = __decorate([
396
+ core.Injectable({
397
+ providedIn: 'root'
398
+ })
399
+ ], ExportService);
400
+ return ExportService;
401
+ }());
402
+
403
+
404
+ (function (LogLevel) {
405
+ LogLevel[LogLevel["All"] = 0] = "All";
406
+ LogLevel[LogLevel["Debug"] = 1] = "Debug";
407
+ LogLevel[LogLevel["Info"] = 2] = "Info";
408
+ LogLevel[LogLevel["Warn"] = 3] = "Warn";
409
+ LogLevel[LogLevel["Error"] = 4] = "Error";
410
+ LogLevel[LogLevel["Fatal"] = 5] = "Fatal";
411
+ LogLevel[LogLevel["Off"] = 6] = "Off";
412
+ })(exports.LogLevel || (exports.LogLevel = {}));
413
+ var Tile = /** @class */ (function () {
414
+ function Tile() {
415
+ }
416
+ return Tile;
417
+ }());
418
+ var Step = /** @class */ (function () {
419
+ function Step() {
420
+ }
421
+ return Step;
422
+ }());
423
+ var TableConfig = /** @class */ (function () {
424
+ function TableConfig() {
425
+ this.enableFilter = false;
426
+ this.create = new TableCreate();
427
+ this.greyout = new Condition();
428
+ }
429
+ return TableConfig;
430
+ }());
431
+ var TableCreate = /** @class */ (function () {
432
+ function TableCreate() {
433
+ }
434
+ return TableCreate;
435
+ }());
436
+ var TableColumn = /** @class */ (function () {
437
+ function TableColumn() {
438
+ this.name = "default";
439
+ this.display = "default";
440
+ this.type = exports.TableColumnType.String;
441
+ }
442
+ return TableColumn;
443
+ }());
444
+
445
+ (function (TableColumnType) {
446
+ TableColumnType[TableColumnType["String"] = 0] = "String";
447
+ TableColumnType[TableColumnType["Date"] = 1] = "Date";
448
+ TableColumnType[TableColumnType["DateTime"] = 2] = "DateTime";
449
+ TableColumnType[TableColumnType["Image"] = 3] = "Image";
450
+ TableColumnType[TableColumnType["Icon"] = 4] = "Icon";
451
+ TableColumnType[TableColumnType["TextIcon"] = 5] = "TextIcon";
452
+ TableColumnType[TableColumnType["Chip"] = 6] = "Chip";
453
+ })(exports.TableColumnType || (exports.TableColumnType = {}));
454
+ var Condition = /** @class */ (function () {
455
+ function Condition() {
456
+ this.field = "";
457
+ this.operator = exports.Operator.Equal;
458
+ this.value = "";
459
+ }
460
+ return Condition;
461
+ }());
462
+
463
+ (function (Operator) {
464
+ Operator[Operator["Equal"] = 0] = "Equal";
465
+ Operator[Operator["Less"] = 1] = "Less";
466
+ Operator[Operator["Greater"] = 2] = "Greater";
467
+ Operator[Operator["NotEqual"] = 3] = "NotEqual";
468
+ })(exports.Operator || (exports.Operator = {}));
469
+ var Color = /** @class */ (function (_super) {
470
+ __extends(Color, _super);
471
+ function Color() {
472
+ return _super !== null && _super.apply(this, arguments) || this;
473
+ }
474
+ return Color;
475
+ }(Condition));
476
+ var Icon = /** @class */ (function (_super) {
477
+ __extends(Icon, _super);
478
+ function Icon() {
479
+ return _super !== null && _super.apply(this, arguments) || this;
480
+ }
481
+ return Icon;
482
+ }(Condition));
483
+ var TableAction = /** @class */ (function () {
484
+ function TableAction() {
485
+ }
486
+ return TableAction;
487
+ }());
488
+ var ActionResponse = /** @class */ (function () {
489
+ function ActionResponse() {
490
+ }
491
+ return ActionResponse;
492
+ }());
493
+ var loginConfig = /** @class */ (function () {
494
+ function loginConfig() {
495
+ this.appName = "";
496
+ this.selfService = false;
497
+ this.logo = "";
498
+ this.logoSize = "normal";
499
+ }
500
+ return loginConfig;
501
+ }());
502
+ var AppConfig = /** @class */ (function () {
503
+ function AppConfig() {
504
+ this.appName = "App Name";
505
+ this.logo = "";
506
+ this.ADAuth = true;
507
+ this.localAuth = true;
508
+ this.employees = false;
509
+ this.approvals = false;
510
+ }
511
+ return AppConfig;
512
+ }());
513
+ var CapItem = /** @class */ (function () {
514
+ function CapItem() {
515
+ this.name = "";
516
+ this.display = "New Cap Item";
517
+ this.enabled = false;
518
+ this.type = "";
519
+ this.newLine = false;
520
+ this.showMenu = true;
521
+ this.ignoreSubsDisplay = false;
522
+ this.link = "";
523
+ this.icon = "navigate_next";
524
+ }
525
+ return CapItem;
526
+ }());
527
+ var Role = /** @class */ (function () {
528
+ function Role() {
529
+ this.roleID = "";
530
+ this.roleName = "New Role";
531
+ this.cap1 = false;
532
+ this.cap2 = false;
533
+ this.cap3 = false;
534
+ this.cap4 = false;
535
+ this.cap5 = false;
536
+ this.cap6 = false;
537
+ this.cap7 = false;
538
+ this.cap8 = false;
539
+ this.cap9 = false;
540
+ this.cap10 = false;
541
+ this.cap11 = false;
542
+ this.cap12 = false;
543
+ this.cap13 = false;
544
+ this.cap14 = false;
545
+ this.cap15 = false;
546
+ this.cap16 = false;
547
+ this.cap17 = false;
548
+ this.cap18 = false;
549
+ this.cap19 = false;
550
+ this.cap20 = false;
551
+ this.cap21 = false;
552
+ this.cap22 = false;
553
+ this.cap23 = false;
554
+ this.cap24 = false;
555
+ this.cap25 = false;
556
+ this.cap26 = false;
557
+ this.cap27 = false;
558
+ this.cap28 = false;
559
+ this.cap29 = false;
560
+ this.cap30 = false;
561
+ this.cap31 = false;
562
+ this.cap32 = false;
563
+ this.cap33 = false;
564
+ this.cap34 = false;
565
+ this.cap35 = false;
566
+ this.cap36 = false;
567
+ this.cap37 = false;
568
+ this.cap38 = false;
569
+ this.cap39 = false;
570
+ this.cap40 = false;
571
+ this.cap41 = false;
572
+ this.cap42 = false;
573
+ this.cap43 = false;
574
+ this.cap44 = false;
575
+ this.cap45 = false;
576
+ this.cap46 = false;
577
+ this.cap47 = false;
578
+ this.cap48 = false;
579
+ this.cap49 = false;
580
+ this.cap50 = false;
581
+ this.cap51 = false;
582
+ this.cap52 = false;
583
+ this.cap53 = false;
584
+ this.cap54 = false;
585
+ this.cap55 = false;
586
+ this.cap56 = false;
587
+ this.cap57 = false;
588
+ this.cap58 = false;
589
+ this.cap59 = false;
590
+ this.cap60 = false;
591
+ this.cap61 = false;
592
+ this.cap62 = false;
593
+ this.cap63 = false;
594
+ this.cap64 = false;
595
+ this.cap65 = false;
596
+ this.cap66 = false;
597
+ this.cap67 = false;
598
+ this.cap68 = false;
599
+ this.cap69 = false;
600
+ this.cap70 = false;
601
+ this.cap71 = false;
602
+ this.cap72 = false;
603
+ this.cap73 = false;
604
+ this.cap74 = false;
605
+ this.cap75 = false;
606
+ this.cap76 = false;
607
+ this.cap77 = false;
608
+ this.cap78 = false;
609
+ this.cap79 = false;
610
+ this.cap80 = false;
611
+ this.cap81 = false;
612
+ this.cap82 = false;
613
+ this.cap83 = false;
614
+ this.cap84 = false;
615
+ this.cap85 = false;
616
+ this.cap86 = false;
617
+ this.cap87 = false;
618
+ this.cap88 = false;
619
+ this.cap89 = false;
620
+ this.cap90 = false;
621
+ this.cap91 = false;
622
+ this.cap92 = false;
623
+ this.cap93 = false;
624
+ this.cap94 = false;
625
+ this.cap95 = false;
626
+ this.cap96 = false;
627
+ this.cap97 = false;
628
+ this.cap98 = false;
629
+ this.cap99 = false;
630
+ this.cap100 = false;
631
+ }
632
+ return Role;
633
+ }());
634
+ var Account = /** @class */ (function () {
635
+ function Account() {
636
+ }
637
+ return Account;
638
+ }());
639
+ var User = /** @class */ (function () {
640
+ function User() {
641
+ this.userID = "";
642
+ this.password = "";
643
+ this.tries = "0";
644
+ this.locked = "0";
645
+ this.logged = "0";
646
+ this.disabled = "0";
647
+ this.changepassword = "0";
648
+ this.dateCreated = tinCore.Core.nowDate();
649
+ this.dateUpdated = tinCore.Core.nowDate();
650
+ this.token = "";
651
+ this.dateExpire = tinCore.Core.nowDate();
652
+ this.tokenExpire = tinCore.Core.nowDate();
653
+ this.authType = "";
654
+ }
655
+ return User;
656
+ }());
657
+ var ChangeUserPassword = /** @class */ (function () {
658
+ function ChangeUserPassword() {
659
+ this.userID = "";
660
+ this.currentPassword = "";
661
+ this.newPassword = "";
662
+ this.confirmPassword = "";
663
+ }
664
+ return ChangeUserPassword;
665
+ }());
666
+ var Profile = /** @class */ (function () {
667
+ function Profile() {
668
+ this.profileID = "";
669
+ this.userID = "";
670
+ this.roleID = "1";
671
+ this.firstName = "";
672
+ this.lastName = "";
673
+ this.email = "";
674
+ this.empID = "";
675
+ this.arID = "0";
676
+ this.authType = "";
677
+ }
678
+ return Profile;
679
+ }());
680
+
681
+ var LogService = /** @class */ (function () {
682
+ function LogService() {
683
+ this.level = exports.LogLevel.All;
684
+ this.logToConsole = true;
685
+ this.logToApi = false;
686
+ }
687
+ LogService.prototype.debug = function (msg) {
688
+ var optionalParams = [];
689
+ for (var _i = 1; _i < arguments.length; _i++) {
690
+ optionalParams[_i - 1] = arguments[_i];
691
+ }
692
+ this.writeToLog(msg, exports.LogLevel.Debug, optionalParams);
693
+ };
694
+ LogService.prototype.info = function (msg) {
695
+ var optionalParams = [];
696
+ for (var _i = 1; _i < arguments.length; _i++) {
697
+ optionalParams[_i - 1] = arguments[_i];
698
+ }
699
+ this.writeToLog(msg, exports.LogLevel.Info, optionalParams);
700
+ };
701
+ LogService.prototype.warn = function (msg) {
702
+ var optionalParams = [];
703
+ for (var _i = 1; _i < arguments.length; _i++) {
704
+ optionalParams[_i - 1] = arguments[_i];
705
+ }
706
+ this.writeToLog(msg, exports.LogLevel.Warn, optionalParams);
707
+ };
708
+ LogService.prototype.error = function (msg) {
709
+ var optionalParams = [];
710
+ for (var _i = 1; _i < arguments.length; _i++) {
711
+ optionalParams[_i - 1] = arguments[_i];
712
+ }
713
+ this.writeToLog(msg, exports.LogLevel.Error, optionalParams);
714
+ };
715
+ LogService.prototype.fatal = function (msg) {
716
+ var optionalParams = [];
717
+ for (var _i = 1; _i < arguments.length; _i++) {
718
+ optionalParams[_i - 1] = arguments[_i];
719
+ }
720
+ this.writeToLog(msg, exports.LogLevel.Fatal, optionalParams);
721
+ };
722
+ LogService.prototype.log = function (msg) {
723
+ var optionalParams = [];
724
+ for (var _i = 1; _i < arguments.length; _i++) {
725
+ optionalParams[_i - 1] = arguments[_i];
726
+ }
727
+ this.writeToLog(msg, exports.LogLevel.All, optionalParams);
728
+ };
729
+ LogService.prototype.writeToLog = function (msg, level, params) {
730
+ if (this.shouldLog(level)) {
731
+ // Build log string
732
+ var value = tinCore.Core.getFormatedDate(Date(), false).replace("T", " ");
733
+ // value += " - Type: " + LogLevel[this.level];
734
+ value += " - Message: " + msg;
735
+ if (params.length) {
736
+ value += " - Extra Info: " + this.formatParams(params);
737
+ }
738
+ // Log the value
739
+ if (this.logToConsole) {
740
+ console.log(value);
741
+ }
742
+ if (this.logToApi) {
743
+ //Call API post
744
+ }
745
+ }
746
+ };
747
+ LogService.prototype.formatParams = function (params) {
748
+ var e_1, _a;
749
+ var ret = params.join(",");
750
+ // Is there at least one object in the array?
751
+ if (params.some(function (p) { return typeof p == "object"; })) {
752
+ ret = "";
753
+ try {
754
+ // Build comma-delimited string
755
+ for (var params_1 = __values(params), params_1_1 = params_1.next(); !params_1_1.done; params_1_1 = params_1.next()) {
756
+ var item = params_1_1.value;
757
+ ret += JSON.stringify(item) + ",";
758
+ }
759
+ }
760
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
761
+ finally {
762
+ try {
763
+ if (params_1_1 && !params_1_1.done && (_a = params_1.return)) _a.call(params_1);
764
+ }
765
+ finally { if (e_1) throw e_1.error; }
766
+ }
767
+ }
768
+ return ret;
769
+ };
770
+ LogService.prototype.shouldLog = function (level) {
771
+ var ret = false;
772
+ if ((level >= this.level && level !== exports.LogLevel.Off) ||
773
+ this.level === exports.LogLevel.All) {
774
+ ret = true;
775
+ }
776
+ return ret;
777
+ };
778
+ LogService.ɵprov = core.ɵɵdefineInjectable({ factory: function LogService_Factory() { return new LogService(); }, token: LogService, providedIn: "root" });
779
+ LogService = __decorate([
780
+ core.Injectable({
781
+ providedIn: "root",
782
+ })
783
+ ], LogService);
784
+ return LogService;
785
+ }());
786
+
787
+ // import { Constants } from "tin-core";
788
+ var AuthService = /** @class */ (function () {
789
+ function AuthService(storage, router, httpService, messageService, logService) {
790
+ this.storage = storage;
791
+ this.router = router;
792
+ this.httpService = httpService;
793
+ this.messageService = messageService;
794
+ this.logService = logService;
795
+ //Logged in
796
+ this.loggedin = false;
797
+ this.loggedinSource = new rxjs.BehaviorSubject(this.loggedin);
798
+ this.loggedinObserv = this.loggedinSource.asObservable();
799
+ //Token
800
+ this.token = "";
801
+ this.tokenSource = new rxjs.BehaviorSubject(this.token);
802
+ this.tokenObserv = this.tokenSource.asObservable();
803
+ //TokenExpire
804
+ this.tokenExpire = "";
805
+ this.tokenExpireSource = new rxjs.BehaviorSubject(this.tokenExpire);
806
+ this.tokenExpireObserv = this.tokenExpireSource.asObservable();
807
+ //Current User
808
+ this.currentUser = "tnyagato";
809
+ this.currentUserSource = new rxjs.BehaviorSubject(this.currentUser);
810
+ this.currentUserObserv = this.currentUserSource.asObservable();
811
+ //Line Manager
812
+ this.islineManager = false;
813
+ this.isLineManagerSource = new rxjs.BehaviorSubject(this.islineManager);
814
+ this.isLineManagerObserv = this.isLineManagerSource.asObservable();
815
+ //Roles
816
+ this.currentRole = new Role;
817
+ this.currentRoleSource = new rxjs.BehaviorSubject(this.currentRole);
818
+ this.myRoleObserv = this.currentRoleSource.asObservable();
819
+ //Logged in FirstName
820
+ this.loggedUserSource = new rxjs.BehaviorSubject("tnyagato");
821
+ this.loggedUserFullName = this.loggedUserSource.asObservable();
822
+ }
823
+ AuthService.prototype.updateloggedin = function (loggedin) {
824
+ this.loggedinSource.next(loggedin);
825
+ this.loggedin = loggedin;
826
+ };
827
+ AuthService.prototype.updateToken = function (newToken) {
828
+ this.tokenSource.next(newToken);
829
+ };
830
+ AuthService.prototype.updateTokenExpire = function (newTokenExpire) {
831
+ this.tokenExpireSource.next(newTokenExpire);
832
+ };
833
+ AuthService.prototype.updateCurrentUser = function (newUser) {
834
+ this.currentUserSource.next(newUser.toLocaleLowerCase());
835
+ this.currentUser = newUser.toLocaleLowerCase();
836
+ };
837
+ AuthService.prototype.updateIsLineManager = function (manager) {
838
+ this.isLineManagerSource.next(manager);
839
+ };
840
+ AuthService.prototype.updateRole = function (role) {
841
+ this.currentRoleSource.next(role);
842
+ };
843
+ AuthService.prototype.updateLoggedUserFullName = function (username) {
844
+ this.loggedUserSource.next(username);
845
+ };
846
+ //Authorisation
847
+ AuthService.prototype.isAuthorised = function (capName) {
848
+ if (!this.currentRoleSource.value[capName]) {
849
+ // this.logService.info(`authorise: ${this.currentRoleSource.value.roleName} not authorised for ${capName}`);
850
+ this.router.navigate(["home"]);
851
+ this.messageService.toast("Unauthorised: " + capName);
852
+ return false;
853
+ }
854
+ else {
855
+ return true;
856
+ }
857
+ };
858
+ AuthService.prototype.isValidToken = function () {
859
+ var tokenExpire = new Date(this.tokenExpireSource.value);
860
+ var nowDate = new Date();
861
+ var valid = tokenExpire > nowDate;
862
+ if (!valid) {
863
+ this.router.navigate(["login"]);
864
+ this.messageService.toast("Expired Session");
865
+ }
866
+ return valid;
867
+ };
868
+ AuthService.prototype.canActivate = function () {
869
+ var _this = this;
870
+ if (this.loggedin && this.isValidToken()) {
871
+ // this.logService.info("authentication: logged in");
872
+ return true;
873
+ }
874
+ if (localStorage.getItem(tinCore.Constants.AUTH_USER) === null) {
875
+ // this.logService.info("authentication: not logged and no cache");
876
+ this.updateloggedin(false);
877
+ this.router.navigate(["login"]);
878
+ return false;
879
+ }
880
+ else {
881
+ // this.logService.info("authentication: not logged but allowed login");
882
+ this.updateloggedin(true);
883
+ this.storage.get(tinCore.Constants.AUTH_USER).then(function (resp) {
884
+ _this.updateCurrentUser(resp);
885
+ // console.log("user: " + resp);
886
+ });
887
+ this.storage.get(tinCore.Constants.AUTH_NAME).then(function (resp) {
888
+ _this.updateLoggedUserFullName(resp);
889
+ // console.log("name: " + resp);
890
+ });
891
+ this.storage.get(tinCore.Constants.AUTH_ROLES).then(function (resp) {
892
+ var ret = JSON.parse(resp);
893
+ _this.updateRole(ret);
894
+ // console.log("role: " + ret.roleName);
895
+ });
896
+ this.storage.get(tinCore.Constants.AUTH_TOKEN).then(function (resp) {
897
+ _this.updateToken(resp);
898
+ // console.log("token: " + resp);
899
+ });
900
+ this.storage.get(tinCore.Constants.AUTH_TOKEN_EXPIRE).then(function (resp) {
901
+ _this.updateTokenExpire(resp);
902
+ _this.isValidToken();
903
+ });
904
+ return true;
905
+ }
906
+ };
907
+ AuthService.ctorParameters = function () { return [
908
+ { type: StorageService },
909
+ { type: router.Router },
910
+ { type: tinCore.HttpService },
911
+ { type: MessageService },
912
+ { type: LogService }
913
+ ]; };
914
+ AuthService.ɵprov = core.ɵɵdefineInjectable({ factory: function AuthService_Factory() { return new AuthService(core.ɵɵinject(StorageService), core.ɵɵinject(router.Router), core.ɵɵinject(tinCore.HttpService), core.ɵɵinject(MessageService), core.ɵɵinject(LogService)); }, token: AuthService, providedIn: "root" });
915
+ AuthService = __decorate([
916
+ core.Injectable({
917
+ providedIn: 'root'
918
+ })
919
+ ], AuthService);
920
+ return AuthService;
921
+ }());
922
+
923
+ var DataService = /** @class */ (function () {
924
+ function DataService(httpService) {
925
+ // httpService.apiUrl = "http://localhost:20503/";
926
+ // httpService.apiUrl = "http://localhost/basic/";
927
+ this.httpService = httpService;
928
+ this.capUsers = new CapItem;
929
+ // public appConfig = new AppConfig; ///test
930
+ this.tmpProfileUserID = "";
931
+ this.capUsers.name = "cap3";
932
+ this.capUsers.display = "Users";
933
+ this.capUsers.link = "home/admin/users";
934
+ }
935
+ //Users
936
+ DataService.prototype.GetUser = function (by, val) {
937
+ return this.httpService.Get("Basic/GetUser?by=" + by + "&val=" + val);
938
+ };
939
+ DataService.prototype.UpdateUser = function (user, action) {
940
+ return this.httpService.Post("Basic/UpdateUser?action=" + action, user);
941
+ };
942
+ DataService.prototype.login = function (u) {
943
+ return this.httpService.Post("Basic/login", u);
944
+ };
945
+ DataService.prototype.changePassword = function (u) {
946
+ return this.httpService.Post("Basic/ChangePassword", u);
947
+ };
948
+ DataService.prototype.changePasswordAdmin = function (u) {
949
+ return this.httpService.Post("Basic/ChangePasswordAdmin", u);
950
+ };
951
+ DataService.prototype.SelfReset = function (u) {
952
+ return this.httpService.Post("Basic/SelfReset", u);
953
+ };
954
+ //Roles
955
+ DataService.prototype.UpdateRole = function (role, action) {
956
+ return this.httpService.Post("Basic/UpdateRole?action=" + action, role);
957
+ };
958
+ DataService.prototype.GetRole = function (by, val) {
959
+ return this.httpService.Get("Basic/GetRole?by=" + by + "&val=" + val);
960
+ };
961
+ //Account
962
+ DataService.prototype.UpdateAccount = function (account, action) {
963
+ return this.httpService.Post("Basic/UpdateAccount?action=" + action, account);
964
+ };
965
+ //Profile
966
+ DataService.prototype.GetProfile = function (by, val) {
967
+ return this.httpService.Get("Basic/GetProfile?by=" + by + "&val=" + val);
968
+ };
969
+ DataService.prototype.UpdateProfile = function (profile, action) {
970
+ return this.httpService.Post("Basic/UpdateProfile?action=" + action, profile);
971
+ };
972
+ //Logs
973
+ DataService.prototype.GetLog = function (by, val) {
974
+ return this.httpService.Get("Basic/GetLog?by=" + by + "&val=" + val);
975
+ };
976
+ //Settings
977
+ DataService.prototype.GetSetting = function (by, val) {
978
+ return this.httpService.Get("Basic/GetSetting?by=" + by + "&val=" + val);
979
+ };
980
+ DataService.prototype.UpdateSetting = function (setting, action) {
981
+ return this.httpService.Post("Basic/UpdateSetting?action=" + action, setting);
982
+ };
983
+ DataService.ctorParameters = function () { return [
984
+ { type: tinCore.HttpService }
985
+ ]; };
986
+ DataService.ɵprov = core.ɵɵdefineInjectable({ factory: function DataService_Factory() { return new DataService(core.ɵɵinject(tinCore.HttpService)); }, token: DataService, providedIn: "root" });
987
+ DataService = __decorate([
988
+ core.Injectable({
989
+ providedIn: 'root'
990
+ })
991
+ ], DataService);
992
+ return DataService;
993
+ }());
994
+
995
+ var LoaderService = /** @class */ (function () {
996
+ function LoaderService() {
997
+ this.isLoading = new rxjs.BehaviorSubject(false);
998
+ }
999
+ LoaderService.ɵprov = core.ɵɵdefineInjectable({ factory: function LoaderService_Factory() { return new LoaderService(); }, token: LoaderService, providedIn: "root" });
1000
+ LoaderService = __decorate([
1001
+ core.Injectable({
1002
+ providedIn: 'root'
1003
+ })
1004
+ ], LoaderService);
1005
+ return LoaderService;
1006
+ }());
1007
+
1008
+ var LoaderComponent = /** @class */ (function () {
1009
+ function LoaderComponent(loaderService) {
1010
+ var _this = this;
1011
+ this.loaderService = loaderService;
1012
+ this.logo = "";
1013
+ this.loaderService.isLoading.subscribe(function (v) {
1014
+ // console.log(v);
1015
+ _this.loading = v;
1016
+ });
1017
+ }
1018
+ LoaderComponent.prototype.ngOnInit = function () {
1019
+ };
1020
+ LoaderComponent.ctorParameters = function () { return [
1021
+ { type: LoaderService }
1022
+ ]; };
1023
+ __decorate([
1024
+ core.Input()
1025
+ ], LoaderComponent.prototype, "logo", void 0);
1026
+ LoaderComponent = __decorate([
1027
+ core.Component({
1028
+ selector: 'spa-loader',
1029
+ template: "<div class=\"progress-loader\" style=\"z-index: 9999;\" [hidden]=\"!loading\">\r\n <div class=\"loading-spinner\">\r\n\r\n <img *ngIf=\"logo==''\" style=\"width: 100px;\"\r\n src=\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==\"\r\n\r\n >\r\n\r\n <img *ngIf=\"logo!=''\" [src]=\"logo\" style=\"width: 100px;\" />\r\n\r\n\r\n <span id=\"loadingMessage\" class=\"loading-message\">Please wait...</span>\r\n </div>\r\n</div>\r\n",
1030
+ styles: [".loading-spinner{background-color:#0000001f;position:absolute;width:100%;top:0;left:0;height:100vh;align-items:center;justify-content:center;display:-ms-grid;display:grid}.loading-spinner img{-ms-grid-row-align:end;align-self:end}.loading-message{text-align:center;-ms-grid-row-align:start;align-self:start}"]
1031
+ })
1032
+ ], LoaderComponent);
1033
+ return LoaderComponent;
1034
+ }());
1035
+
1036
+ var ɵ0 = { disableClose: true, hasBackdrop: true };
1037
+ var SpaMatModule = /** @class */ (function () {
1038
+ function SpaMatModule() {
1039
+ }
1040
+ SpaMatModule = __decorate([
1041
+ core.NgModule({
1042
+ declarations: [],
1043
+ imports: [],
1044
+ exports: [
1045
+ common.CommonModule, forms.FormsModule, forms.ReactiveFormsModule,
1046
+ menu.MatMenuModule, slider.MatSliderModule, table.MatTableModule, paginator.MatPaginatorModule,
1047
+ checkbox.MatCheckboxModule, badge.MatBadgeModule, button.MatButtonModule, icon.MatIconModule, dialog.MatDialogModule, snackBar.MatSnackBarModule,
1048
+ tabs.MatTabsModule, formField.MatFormFieldModule, input.MatInputModule, card.MatCardModule, chips.MatChipsModule, select.MatSelectModule,
1049
+ core$1.MatNativeDateModule, progressSpinner.MatProgressSpinnerModule, list.MatListModule, autocomplete.MatAutocompleteModule, tooltip.MatTooltipModule, sort.MatSortModule,
1050
+ datepicker.MatDatepickerModule, stepper.MatStepperModule, radio.MatRadioModule,
1051
+ ],
1052
+ providers: [
1053
+ { provide: dialog.MAT_DIALOG_DEFAULT_OPTIONS, useValue: ɵ0 },
1054
+ { provide: core$1.MAT_DATE_LOCALE, useValue: "en-GB" },
1055
+ ]
1056
+ })
1057
+ ], SpaMatModule);
1058
+ return SpaMatModule;
1059
+ }());
1060
+
1061
+ var LoaderInterceptor = /** @class */ (function () {
1062
+ function LoaderInterceptor(loaderService, messageService, authService, router, logService) {
1063
+ this.loaderService = loaderService;
1064
+ this.messageService = messageService;
1065
+ this.authService = authService;
1066
+ this.router = router;
1067
+ this.logService = logService;
1068
+ this.requests = [];
1069
+ }
1070
+ LoaderInterceptor.prototype.removeRequest = function (req) {
1071
+ var i = this.requests.indexOf(req);
1072
+ if (i >= 0) {
1073
+ this.requests.splice(i, 1);
1074
+ }
1075
+ this.loaderService.isLoading.next(this.requests.length > 0);
1076
+ };
1077
+ LoaderInterceptor.prototype.intercept = function (request, next) {
1078
+ var _this = this;
1079
+ var requestClone = request.clone({
1080
+ setHeaders: {
1081
+ Authorization: "Basic " + btoa(this.authService.currentUser + ":" + this.authService.tokenSource.value)
1082
+ // Authorization: "Basic " + btoa(this.authService.currentUser + ":" + "j5Toszfr@ys")
1083
+ }
1084
+ });
1085
+ this.requests.push(requestClone);
1086
+ if (this.requests.length > 1) {
1087
+ this.logService.info("Multiple connections detected > " + this.requests.length);
1088
+ }
1089
+ // this.logService.info("Executed > " + requestClone.url)
1090
+ this.loaderService.isLoading.next(true);
1091
+ return rxjs.Observable.create(function (observer) {
1092
+ var subscription = next.handle(requestClone)
1093
+ .subscribe(function (event) {
1094
+ if (event instanceof http.HttpResponse) {
1095
+ _this.removeRequest(requestClone);
1096
+ observer.next(event);
1097
+ }
1098
+ }, function (err) {
1099
+ _this.messageService.toast('error: ' + err.statusText);
1100
+ _this.removeRequest(requestClone);
1101
+ observer.error(err);
1102
+ if (err.status === 401) {
1103
+ //request is unathorised
1104
+ _this.router.navigate(["login"]);
1105
+ }
1106
+ }, function () {
1107
+ _this.removeRequest(requestClone);
1108
+ observer.complete();
1109
+ });
1110
+ // remove request from queue when cancelled
1111
+ return function () {
1112
+ _this.removeRequest(requestClone);
1113
+ subscription.unsubscribe();
1114
+ };
1115
+ });
1116
+ };
1117
+ LoaderInterceptor.ctorParameters = function () { return [
1118
+ { type: LoaderService },
1119
+ { type: MessageService },
1120
+ { type: AuthService },
1121
+ { type: router.Router },
1122
+ { type: LogService }
1123
+ ]; };
1124
+ LoaderInterceptor = __decorate([
1125
+ core.Injectable()
1126
+ ], LoaderInterceptor);
1127
+ return LoaderInterceptor;
1128
+ }());
1129
+
1130
+ var TinSpaComponent = /** @class */ (function () {
1131
+ function TinSpaComponent() {
1132
+ }
1133
+ TinSpaComponent.prototype.ngOnInit = function () {
1134
+ };
1135
+ TinSpaComponent = __decorate([
1136
+ core.Component({
1137
+ selector: 'lib-tin-spa',
1138
+ template: "\n <p>\n tin-spa works!\n </p>\n "
1139
+ })
1140
+ ], TinSpaComponent);
1141
+ return TinSpaComponent;
1142
+ }());
1143
+
1144
+ var NavMenuComponent = /** @class */ (function () {
1145
+ function NavMenuComponent(router, authService) {
1146
+ this.router = router;
1147
+ this.authService = authService;
1148
+ this.isExpanded = false;
1149
+ this.appConfig = new AppConfig();
1150
+ }
1151
+ NavMenuComponent.prototype.ngOnInit = function () {
1152
+ var _this = this;
1153
+ this.authService.loggedUserFullName.subscribe(function (user) { return _this.loggedUserFullName = user; });
1154
+ this.authService.myRoleObserv.subscribe(function (rol) { return _this.myRole = rol; });
1155
+ this.authService.loggedinObserv.subscribe(function (obj) { return _this.loggedin = obj; });
1156
+ };
1157
+ NavMenuComponent.prototype.collapse = function () {
1158
+ this.isExpanded = false;
1159
+ };
1160
+ NavMenuComponent.prototype.toggle = function () {
1161
+ this.isExpanded = !this.isExpanded;
1162
+ };
1163
+ // logoff() {
1164
+ // // this.authService.updateloggedin(false);
1165
+ // // this.authService.updateRole(new Role());
1166
+ // this.router.navigate(["login"]);
1167
+ // // this.storageService.clear();
1168
+ // }
1169
+ NavMenuComponent.prototype.redirectTo = function (link) {
1170
+ if (link != "") {
1171
+ this.router.navigate([link]);
1172
+ }
1173
+ };
1174
+ NavMenuComponent.ctorParameters = function () { return [
1175
+ { type: router.Router },
1176
+ { type: AuthService }
1177
+ ]; };
1178
+ __decorate([
1179
+ core.Input()
1180
+ ], NavMenuComponent.prototype, "appConfig", void 0);
1181
+ NavMenuComponent = __decorate([
1182
+ core.Component({
1183
+ selector: 'spa-nav-menu',
1184
+ template: "<header *ngIf=\"loggedin\">\r\n <nav class=\"toolbar navbar navbar-expand-sm navbar-toggleable-sm navbar-light border-bottom box-shadow mb-3 \" style=\"padding-right: 10px;\">\r\n <div class=\"container-fluid\" style=\"padding-right: 0px;\">\r\n <!--<a class=\"navbar-brand\" [routerLink]=\"['/']\">Orbit</a>-->\r\n\r\n <img *ngIf=\"appConfig.logo!=''\" [src]=\"appConfig.logo\" style=\"height: 50px; margin-right: 2em\" />\r\n\r\n\r\n <div style=\"font-size: 20px;\">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n\r\n <button class=\"navbar-toggler\"\r\n type=\"button\"\r\n data-toggle=\"collapse\"\r\n data-target=\".navbar-collapse\"\r\n aria-label=\"Toggle navigation\"\r\n [attr.aria-expanded]=\"isExpanded\"\r\n (click)=\"toggle()\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n\r\n <div *ngIf=\"myRole\" class=\"navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse stack-top\" style=\"margin-right: 0px;\" [ngClass]=\"{ show: isExpanded }\" >\r\n\r\n <button mat-icon-button (click)=\"redirectTo('login')\"> <mat-icon>logout</mat-icon> </button>\r\n\r\n <button id=\"btnUser\" mat-button [matMenuTriggerFor]=\"profileMenu\" style=\"margin-left:2em\"><mat-icon>account_circle</mat-icon> &nbsp;{{loggedUserFullName}}</button>\r\n\r\n <mat-menu #profileMenu=\"matMenu\">\r\n <button id=\"btnProfile\" mat-menu-item (click)=\"redirectTo('home/user/profile')\" >Profile</button>\r\n <button id=\"btnLogOff\" mat-menu-item (click)=\"redirectTo('login')\">Log Off</button>\r\n </mat-menu>\r\n\r\n <div *ngFor=\"let item of appConfig.capItems\">\r\n\r\n <!-- Menu Item -->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && !item.capSubItems && item.showMenu\" mat-button (click)=\"redirectTo(item.link)\">{{item.display}}</button>\r\n\r\n <!-- Menu Item with Sub items ignored -->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && item.capSubItems && item.showMenu && item.ignoreSubsDisplay\" mat-button (click)=\"redirectTo(item.link)\">{{item.display}}</button>\r\n\r\n <!-- Menu Item with Sub items to display-->\r\n <button id=\"btnMenu\" *ngIf=\"myRole[item.name] && item.capSubItems && item.showMenu && !item.ignoreSubsDisplay\" mat-button [matMenuTriggerFor]=\"adminMenu\">{{item.display}}</button>\r\n\r\n\r\n <!-- Sub Menu Items -->\r\n <mat-menu #adminMenu=\"matMenu\">\r\n\r\n <div *ngFor=\"let subItem of item.capSubItems\">\r\n\r\n <button *ngIf=\"myRole[subItem.name] && subItem.showMenu\" mat-menu-item (click)=\"redirectTo(subItem.link)\">{{subItem.display}}</button>\r\n\r\n </div>\r\n\r\n </mat-menu>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </nav>\r\n</header>\r\n",
1185
+ styles: ["a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}html{font-size:14px}@media (min-width:768px){html{font-size:16px}}.box-shadow{box-shadow:0 .25rem .75rem rgba(0,0,0,.05)}.toolbar{height:60px;display:flex;align-items:center;background-color:#03a;color:#fff;font-weight:600}.stack-top{z-index:9;margin:20px}"]
1186
+ })
1187
+ ], NavMenuComponent);
1188
+ return NavMenuComponent;
1189
+ }());
1190
+
1191
+ var TimeoutComponent = /** @class */ (function () {
1192
+ function TimeoutComponent(idle, keepalive, authService, router) {
1193
+ var _this = this;
1194
+ this.idle = idle;
1195
+ this.keepalive = keepalive;
1196
+ this.authService = authService;
1197
+ this.router = router;
1198
+ this.loggedin = false;
1199
+ this.idleState = 'Not started.';
1200
+ this.timedOut = false;
1201
+ this.lastPing = null;
1202
+ this.isWarning = false;
1203
+ this.authService.loggedinObserv.subscribe(function (obj) {
1204
+ _this.loggedin = obj;
1205
+ // if (this.loggedin){
1206
+ // this.startWatch();
1207
+ // }else{
1208
+ // this.stopWatch();
1209
+ // }
1210
+ });
1211
+ // sets an idle timeout of 5 seconds, for testing purposes.
1212
+ idle.setIdle(900);
1213
+ // sets a timeout period of 5 seconds. after 10 seconds of inactivity, the user will be considered timed out.
1214
+ idle.setTimeout(10);
1215
+ // sets the default interrupts, in this case, things like clicks, scrolls, touches to the document
1216
+ idle.setInterrupts(core$2.DEFAULT_INTERRUPTSOURCES);
1217
+ idle.onIdleStart.subscribe(function () {
1218
+ _this.idleState = 'You\'ve gone idle!';
1219
+ });
1220
+ idle.onIdleEnd.subscribe(function () {
1221
+ _this.idleState = 'No longer idle.';
1222
+ _this.isWarning = false;
1223
+ });
1224
+ idle.onTimeoutWarning.subscribe(function (countdown) {
1225
+ _this.idleState = 'You will be signed out in ' + countdown + ' seconds!';
1226
+ if (_this.loggedin) {
1227
+ _this.isWarning = true;
1228
+ }
1229
+ });
1230
+ idle.onTimeout.subscribe(function () {
1231
+ _this.idleState = 'Timed out!';
1232
+ _this.timedOut = true;
1233
+ //action
1234
+ _this.stopWatch();
1235
+ });
1236
+ // sets the ping interval to 15 seconds
1237
+ keepalive.interval(15);
1238
+ keepalive.onPing.subscribe(function () {
1239
+ _this.lastPing = new Date();
1240
+ });
1241
+ this.startWatch();
1242
+ }
1243
+ TimeoutComponent.prototype.ngOnInit = function () {
1244
+ };
1245
+ TimeoutComponent.prototype.startWatch = function () {
1246
+ this.idle.watch();
1247
+ this.idleState = 'Started.';
1248
+ this.timedOut = false;
1249
+ this.isWarning = false;
1250
+ };
1251
+ TimeoutComponent.prototype.stopWatch = function () {
1252
+ this.idle.stop();
1253
+ this.isWarning = false;
1254
+ this.router.navigate(['login']);
1255
+ };
1256
+ TimeoutComponent.prototype.using = function () {
1257
+ //remove message and continue
1258
+ this.isWarning = false;
1259
+ };
1260
+ TimeoutComponent.ctorParameters = function () { return [
1261
+ { type: core$2.Idle },
1262
+ { type: keepalive.Keepalive },
1263
+ { type: AuthService },
1264
+ { type: router.Router }
1265
+ ]; };
1266
+ TimeoutComponent = __decorate([
1267
+ core.Component({
1268
+ selector: 'spa-timeout',
1269
+ template: "\r\n<div class=\"loading-spinner\" [hidden]=\"!isWarning\" >\r\n\r\n <div style=\"width: 500px; text-align: center;\">\r\n\r\n\r\n\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <img style=\"width: 100px;\"\r\n src=\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==\">\r\n </div>\r\n </div>\r\n\r\n <mat-card class=\"mat-elevation-z3\" >\r\n\r\n <mat-card-header>\r\n\r\n <h5>Are you still there ?</h5>\r\n\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n <br>\r\n <span>{{idleState}}</span>\r\n\r\n <br>\r\n\r\n </mat-card-content>\r\n\r\n <mat-card-actions>\r\n\r\n <div class=\"row justify-content-around\">\r\n\r\n <div class=\"col-2\">\r\n <button style=\"width: 100px;\" mat-stroked-button color=\"primary\" (click)=\"using()\">Yes</button>\r\n </div>\r\n\r\n <div class=\"col-4\">\r\n <button style=\"width: 100px;\" mat-stroked-button color=\"primary\" (click)=\"stopWatch()\">No</button>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n\r\n</div>\r\n\r\n</div>\r\n",
1270
+ styles: [".loading-spinner{background-color:#0000001f;position:absolute;width:100%;top:0;left:0;height:100vh;align-items:center;justify-content:center;display:-ms-grid;display:grid}.loading-spinner img{-ms-grid-row-align:end;align-self:end}.loading-message{text-align:center;-ms-grid-row-align:start;align-self:start}"]
1271
+ })
1272
+ ], TimeoutComponent);
1273
+ return TimeoutComponent;
1274
+ }());
1275
+
1276
+ var TableComponent = /** @class */ (function () {
1277
+ function TableComponent() {
1278
+ this.dataChange = new core.EventEmitter();
1279
+ this.buttonClick = new core.EventEmitter();
1280
+ this.loadClick = new core.EventEmitter();
1281
+ this.createClick = new core.EventEmitter();
1282
+ this.colType = exports.TableColumnType;
1283
+ this.op = exports.Operator;
1284
+ this.displayedColumns = [];
1285
+ this._filterText = "";
1286
+ }
1287
+ TableComponent.prototype.ngOnInit = function () {
1288
+ var _this = this;
1289
+ // console.log("Init")
1290
+ this.config.columns.forEach(function (element) {
1291
+ _this.displayedColumns.push(element.name);
1292
+ });
1293
+ this.displayedColumns.push("Action");
1294
+ this.styleString = "width: " + 50 * this.config.actions.length + "px";
1295
+ };
1296
+ TableComponent.prototype.ngOnChanges = function () {
1297
+ // console.log("OnChange")
1298
+ this.data = new table.MatTableDataSource(this.data);
1299
+ this.data.paginator = this.tablePaginator;
1300
+ this.applyFilter(this._filterText);
1301
+ };
1302
+ TableComponent.prototype.applyFilter = function (filterValue) {
1303
+ this.data.filter = filterValue.trim().toLowerCase();
1304
+ };
1305
+ TableComponent.prototype.do = function (name, item) {
1306
+ var resp = new ActionResponse();
1307
+ resp.name = name;
1308
+ resp.value = item;
1309
+ this.buttonClick.emit(resp);
1310
+ };
1311
+ TableComponent.prototype.create = function () {
1312
+ this.createClick.emit();
1313
+ };
1314
+ TableComponent.prototype.load = function () {
1315
+ this.loadClick.emit();
1316
+ };
1317
+ TableComponent.prototype.test = function (a, op, b) {
1318
+ if (op == exports.Operator.Equal) {
1319
+ if (a == b) {
1320
+ return true;
1321
+ }
1322
+ else {
1323
+ return false;
1324
+ }
1325
+ }
1326
+ if (op == exports.Operator.Greater) {
1327
+ if (a > b) {
1328
+ return true;
1329
+ }
1330
+ else {
1331
+ return false;
1332
+ }
1333
+ }
1334
+ if (op == exports.Operator.Less) {
1335
+ if (a < b) {
1336
+ return true;
1337
+ }
1338
+ else {
1339
+ return false;
1340
+ }
1341
+ }
1342
+ if (op == exports.Operator.NotEqual) {
1343
+ if (a != b) {
1344
+ return true;
1345
+ }
1346
+ else {
1347
+ return false;
1348
+ }
1349
+ }
1350
+ };
1351
+ __decorate([
1352
+ core.Input()
1353
+ ], TableComponent.prototype, "config", void 0);
1354
+ __decorate([
1355
+ core.Input()
1356
+ ], TableComponent.prototype, "data", void 0);
1357
+ __decorate([
1358
+ core.Output()
1359
+ ], TableComponent.prototype, "dataChange", void 0);
1360
+ __decorate([
1361
+ core.Output()
1362
+ ], TableComponent.prototype, "buttonClick", void 0);
1363
+ __decorate([
1364
+ core.Output()
1365
+ ], TableComponent.prototype, "loadClick", void 0);
1366
+ __decorate([
1367
+ core.Output()
1368
+ ], TableComponent.prototype, "createClick", void 0);
1369
+ __decorate([
1370
+ core.ViewChild('tablePaginator')
1371
+ ], TableComponent.prototype, "tablePaginator", void 0);
1372
+ TableComponent = __decorate([
1373
+ core.Component({
1374
+ selector: 'spa-table',
1375
+ template: "<div >\r\n\r\n<div *ngIf=\"config.create.enabled || config.enableFilter\" class=\"row justify-content-between\" style=\"padding-bottom: 10px\">\r\n <div class=\"col\">\r\n<button *ngIf=\"config.create\" [disabled]=\"!config.create.enabled\" mat-raised-button color=\"primary\" (click)=\"create()\">{{config.create.display}}</button>\r\n</div>\r\n <div *ngIf=\"config.enableFilter\" class=\"col d-flex justify-content-end\">\r\n<mat-form-field style=\"font-size:12px;margin-right: 5px;\">\r\n<mat-label>Filter</mat-label>\r\n<input matInput [(ngModel)]=\"_filterText\" (keyup)=\"applyFilter($event.target.value)\" placeholder=\"Enter Filter text\" autocomplete=\"off\">\r\n</mat-form-field>\r\n<button mat-mini-fab color=\"primary\" (click)=\"load()\" style=\"margin-top:5px\" matTooltip=\"refresh data\" matTooltipPosition=\"right\"><mat-icon class=\"refreshIcon\">refresh</mat-icon></button>\r\n</div>\r\n</div>\r\n\r\n<div class=\"mat-elevation-z8\" *ngIf=\"data\">\r\n\r\n <table mat-table [dataSource]=\"data\">\r\n\r\n <ng-container *ngFor=\"let col of config.columns; let i = index\"\r\n\r\n [matColumnDef]=\"col.name\">\r\n <th mat-header-cell *matHeaderCellDef> {{col.display}} </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n\r\n <!-- String -->\r\n <div *ngIf=\"(col.type==colType.String || col.type == null) && col.color == null\"> {{row[col.name]}}</div>\r\n\r\n <div [ngStyle]=\"{'color':col.color.name}\"\r\n *ngIf=\"(col.type==colType.String || col.type == null) && col.color != null && test(row[col.color.field], col.color.operator, col.color.value )\" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n <div\r\n *ngIf=\"(col.type==colType.String || col.type == null) && col.color != null && !test(row[col.color.field], col.color.operator, col.color.value )\" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n <!-- <div [ngStyle]=\"{'color':col.color.name}\"\r\n *ngIf=\"(col.type==colType.String || col.type == null) && col.color != null &&\r\n col.color.operator==op.Equal && row[col.color.field]==col.color.value\" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n <div [ngStyle]=\"{'color':col.color.name}\"\r\n *ngIf=\"(col.type==colType.String || col.type == null) && col.color != null &&\r\n col.color.operator==op.Greater && row[col.color.field]>col.color.value\" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n <div [ngStyle]=\"{'color':col.color.name}\"\r\n *ngIf=\"(col.type==colType.String || col.type == null) && col.color != null &&\r\n col.color.operator==op.Less && row[col.color.field]<col.color.value\" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n <div [ngStyle]=\"{'color':col.color.name}\"\r\n *ngIf=\"(col.type==colType.String || col.type == null) && col.color != null &&\r\n col.color.operator==op.NotEqual && row[col.color.field]!=col.color.value\" >\r\n {{row[col.name]}}\r\n </div> -->\r\n\r\n\r\n <!-- Date -->\r\n <div *ngIf=\"col.type==colType.Date\"> {{row[col.name] | date:'dd/MM/yyyy'}}</div>\r\n\r\n\r\n <!-- DateTime -->\r\n <div *ngIf=\"col.type==colType.DateTime\"> {{row[col.name] | date:'dd/MM/yyyy HH:mm'}}</div>\r\n\r\n\r\n <ng-container *ngFor=\"let icon of col.icons;\">\r\n <!-- <mat-icon *ngIf=\"col.type==colType.Icon && icon.operator==op.Equal && row[icon.field]==icon.value\"\r\n [ngStyle]=\"{'color':icon.color}\"\r\n [matTooltip]=\"icon.hint\" matTooltipPosition=\"above\">\r\n {{icon.name}}\r\n </mat-icon>\r\n\r\n <mat-icon *ngIf=\"col.type==colType.Icon && icon.operator==op.Greater && row[icon.field]>icon.value\"\r\n [ngStyle]=\"{'color':icon.color}\"\r\n [matTooltip]=\"icon.hint\" matTooltipPosition=\"above\">\r\n {{icon.name}}\r\n </mat-icon>\r\n\r\n <mat-icon *ngIf=\"col.type==colType.Icon && icon.operator==op.Less && row[icon.field]<icon.value\"\r\n [ngStyle]=\"{'color':icon.color}\"\r\n [matTooltip]=\"icon.hint\" matTooltipPosition=\"above\">\r\n {{icon.name}}\r\n </mat-icon>\r\n <mat-icon *ngIf=\"col.type==colType.Icon && icon.operator==op.NotEqual && row[icon.field]!=icon.value\"\r\n [ngStyle]=\"{'color':icon.color}\"\r\n [matTooltip]=\"icon.hint\" matTooltipPosition=\"above\">\r\n {{icon.name}}\r\n </mat-icon> -->\r\n\r\n <mat-icon *ngIf=\"col.type==colType.Icon && test(row[icon.field],icon.operator,icon.value)\"\r\n [ngStyle]=\"{'color':icon.color}\"\r\n [matTooltip]=\"icon.hint\" matTooltipPosition=\"above\">\r\n {{icon.name}}\r\n </mat-icon>\r\n\r\n </ng-container>\r\n\r\n </td>\r\n\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <ng-container matColumnDef=\"Action\">\r\n\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef=\"let row\" [style]=\"styleString+';padding-right: 0px;'\">\r\n\r\n <ng-container *ngFor=\"let act of config.actions\">\r\n\r\n <button *ngIf=\" (act.disappear && (row[act.disappear.field] != act.disappear.value)) || !act.disappear\" mat-mini-fab\r\n\r\n [disabled]=\"(act.disable && (row[act.disable.field] == act.disable.value))\"\r\n [color]=\"act.color==null? 'primary' : act.color\"\r\n [matTooltip]=\"act.hint\" matTooltipPosition=\"above\"\r\n (click)=\"do(act.name,row)\" style=\"margin-right:5px\">\r\n <mat-icon>{{act.icon}}</mat-icon>\r\n\r\n </button>\r\n\r\n </ng-container>\r\n\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': row[config.greyout.field]==config.greyout.value}\"></tr>\r\n\r\n </table>\r\n</div>\r\n<mat-paginator #tablePaginator [pageSizeOptions]=\"[10, 50, 100]\" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n",
1376
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.make-gray{background-color:#d3d3d3}"]
1377
+ })
1378
+ ], TableComponent);
1379
+ return TableComponent;
1380
+ }());
1381
+
1382
+ var TilesComponent = /** @class */ (function () {
1383
+ function TilesComponent() {
1384
+ this.clickable = false;
1385
+ this.tileClick = new core.EventEmitter();
1386
+ this.selected = "";
1387
+ }
1388
+ TilesComponent.prototype.ngOnInit = function () {
1389
+ };
1390
+ TilesComponent.prototype.clicked = function (v) {
1391
+ if (!this.clickable)
1392
+ return;
1393
+ if (this.selected == v.tileName) {
1394
+ this.tileClick.emit("");
1395
+ this.selected = "";
1396
+ }
1397
+ else {
1398
+ this.tileClick.emit(v.tileName);
1399
+ this.selected = v.tileName;
1400
+ }
1401
+ };
1402
+ __decorate([
1403
+ core.Input()
1404
+ ], TilesComponent.prototype, "tiles", void 0);
1405
+ __decorate([
1406
+ core.Input()
1407
+ ], TilesComponent.prototype, "clickable", void 0);
1408
+ __decorate([
1409
+ core.Output()
1410
+ ], TilesComponent.prototype, "tileClick", void 0);
1411
+ TilesComponent = __decorate([
1412
+ core.Component({
1413
+ selector: 'spa-tiles',
1414
+ template: " <div class=\"row align-items-center\">\r\n\r\n <!-- <div class=\"col\" *ngFor=\"let row of tiles\" >\r\n\r\n <mat-card *ngIf=\"row.visible\">\r\n <div class=\"row d-flex justify-content-center\">\r\n\r\n <mat-label style=\"font-size:30px;font-weight:bold\" [ngStyle]=\"{'color':row.tileColor}\">{{row.tileValue}}</mat-label>\r\n\r\n </div>\r\n\r\n <div class=\"row d-flex justify-content-center\">\r\n\r\n <mat-label [ngStyle]=\"{'color':row.selected == true ? 'darkorange' : 'black' }\" style=\"font-size:12px;padding-left:5px;padding-right:5px\">{{row.tileName}}</mat-label>\r\n <mat-icon style=\"font-size: 17px; color:steelblue;\">info</mat-icon>\r\n\r\n </div>\r\n </mat-card>\r\n\r\n </div> -->\r\n\r\n <ng-container *ngFor=\"let row of tiles\">\r\n\r\n <mat-card class=\"col\" style=\"margin-left: 10px;margin-right: 10px\" *ngIf=\"row.visible\" (click)=\"clicked(row)\">\r\n\r\n <div class=\"row d-flex justify-content-center\">\r\n\r\n <mat-label style=\"font-weight:bold\" [ngStyle]=\"{'color':row.tileColor,'font-size':row.tileName == selected ? '35px' : '30px' }\">{{row.tileValue}}</mat-label>\r\n\r\n </div>\r\n\r\n <div class=\"row d-flex justify-content-center row align-items-center\">\r\n\r\n <mat-label [ngStyle]=\"{'font-size':row.tileName == selected ? '18px' : '12px' }\" style=\"padding-left:5px;padding-right:5px\">{{row.tileName}}</mat-label>\r\n <mat-icon [matTooltip]=\"row.info\" matTooltipPosition=\"above\" [ngStyle]=\"{'font-size':row.tileName == selected ? '20px' : '17px' }\" style=\" color:steelblue;\">info</mat-icon>\r\n\r\n </div>\r\n\r\n </mat-card>\r\n\r\n\r\n </ng-container>\r\n\r\n </div>\r\n",
1415
+ styles: [""]
1416
+ })
1417
+ ], TilesComponent);
1418
+ return TilesComponent;
1419
+ }());
1420
+
1421
+ var DateComponent = /** @class */ (function () {
1422
+ function DateComponent() {
1423
+ this.date = new forms.FormControl(new Date());
1424
+ this.display = "";
1425
+ this.readonly = false;
1426
+ this.currentYear = new Date().getFullYear();
1427
+ this.min = new forms.FormControl(new Date(this.currentYear - 50, 0, 1));
1428
+ this.max = new forms.FormControl(new Date(this.currentYear + 50, 0, 1));
1429
+ }
1430
+ DateComponent.prototype.ngOnInit = function () {
1431
+ };
1432
+ // @Output() dateChange = new EventEmitter();
1433
+ // minDate: Date = new Date(this.currentYear, 2, 2);
1434
+ // maxDate: Date = new Date(this.currentYear, 2, 10);
1435
+ DateComponent.prototype.onChangeEvent = function (d) {
1436
+ // this.dateChange.emit(d);
1437
+ };
1438
+ __decorate([
1439
+ core.Input()
1440
+ ], DateComponent.prototype, "date", void 0);
1441
+ __decorate([
1442
+ core.Input()
1443
+ ], DateComponent.prototype, "display", void 0);
1444
+ __decorate([
1445
+ core.Input()
1446
+ ], DateComponent.prototype, "readonly", void 0);
1447
+ __decorate([
1448
+ core.Input()
1449
+ ], DateComponent.prototype, "min", void 0);
1450
+ __decorate([
1451
+ core.Input()
1452
+ ], DateComponent.prototype, "max", void 0);
1453
+ DateComponent = __decorate([
1454
+ core.Component({
1455
+ selector: 'spa-date',
1456
+ template: "\r\n<mat-form-field style=\"width:150px;margin-right:20px\">\r\n<input [formControl]=\"date\" [min]=\"min.value\" [max]=\"max.value\" matInput [matDatepicker]=\"picker_date\" [placeholder]=\"display\" [readonly]=\"true\" [disabled]=\"readonly\">\r\n<mat-datepicker-toggle matSuffix [for]=\"picker_date\"></mat-datepicker-toggle>\r\n<mat-datepicker #picker_date></mat-datepicker>\r\n</mat-form-field>\r\n",
1457
+ styles: [""]
1458
+ })
1459
+ ], DateComponent);
1460
+ return DateComponent;
1461
+ }());
1462
+
1463
+ var TextComponent = /** @class */ (function () {
1464
+ function TextComponent() {
1465
+ // options: FormGroup;
1466
+ this.hideRequiredControl = new forms.FormControl(true);
1467
+ this.readonly = false;
1468
+ this.hint = "";
1469
+ this.display = "";
1470
+ this.placeholder = "";
1471
+ this.value = "";
1472
+ this.valueChange = new core.EventEmitter();
1473
+ this.format = "text";
1474
+ this.leave = new core.EventEmitter();
1475
+ this.enterPress = new core.EventEmitter();
1476
+ this.rows = "";
1477
+ this.width = "100%";
1478
+ //Autocomplete items
1479
+ this.options = [];
1480
+ this.optionValue = "";
1481
+ this.optionDisplay = "";
1482
+ this.myControl = new forms.FormControl();
1483
+ //validations
1484
+ this.required = true;
1485
+ this.min = 0;
1486
+ this.max = 9000000000000000; //Math.max
1487
+ this.regex = ""; //"[a-zA-Z ]*" //"/\S+@\S+\.\S+/";
1488
+ this.control = new forms.FormControl(this.value, [forms.Validators.required, forms.Validators.minLength(this.min), forms.Validators.maxLength(this.max), forms.Validators.pattern(this.regex)]);
1489
+ }
1490
+ TextComponent.prototype.ngOnInit = function () {
1491
+ if (this.options.length > 0) {
1492
+ this.initFilter();
1493
+ }
1494
+ if (this.placeholder == "") {
1495
+ this.placeholder = this.display;
1496
+ }
1497
+ };
1498
+ TextComponent.prototype.ngAfterViewInit = function () {
1499
+ if (this.readonly) {
1500
+ this.control.setValidators(null);
1501
+ this.control.updateValueAndValidity();
1502
+ }
1503
+ if (!this.required && !this.readonly) {
1504
+ this.control.setValidators([forms.Validators.minLength(this.min), forms.Validators.maxLength(this.max), forms.Validators.pattern(this.regex)]);
1505
+ this.control.updateValueAndValidity();
1506
+ }
1507
+ };
1508
+ TextComponent.prototype.initFilter = function () {
1509
+ var _this = this;
1510
+ this.filteredOptions = this.myControl.valueChanges.pipe(operators.startWith(""), operators.map(function (value) { return _this._filter(value); }));
1511
+ };
1512
+ TextComponent.prototype._filter = function (value) {
1513
+ var _this = this;
1514
+ var filterValue = value.toLowerCase();
1515
+ return this.options.filter(function (option) { return option["" + _this.optionDisplay].toLowerCase().includes(filterValue); });
1516
+ };
1517
+ TextComponent.prototype.changed = function () {
1518
+ // console.log("value: " + this.value)
1519
+ // console.log("cont: " + this.myControl.value)
1520
+ // if (this.options.length > 0) {
1521
+ // this.value = this.myControl.value;
1522
+ // }
1523
+ this.valueChange.emit(this.value);
1524
+ };
1525
+ TextComponent.prototype.changed2 = function () {
1526
+ // console.log("value: " + this.value)
1527
+ // console.log("cont: " + this.myControl.value)
1528
+ // if (this.options.length > 0) {
1529
+ // this.value = this.myControl.value;
1530
+ // }
1531
+ this.valueChange.emit(this.myControl.value);
1532
+ };
1533
+ TextComponent.prototype.leaved = function () {
1534
+ this.leave.emit();
1535
+ };
1536
+ TextComponent.prototype.enterPressed = function () {
1537
+ this.enterPress.emit();
1538
+ };
1539
+ TextComponent.prototype.validate = function () {
1540
+ if ((this.required || this.min > 0) && this.control.hasError('required')) {
1541
+ return "Required";
1542
+ }
1543
+ if (this.control.hasError('minlength')) {
1544
+ return "Minimun length is " + this.min;
1545
+ }
1546
+ if (this.control.hasError('maxlength')) {
1547
+ return "Maximum length is " + this.max;
1548
+ }
1549
+ if (this.control.hasError('pattern')) {
1550
+ return "Invalid Input";
1551
+ }
1552
+ // if (this.regex != ""){
1553
+ // let r = new RegExp(this.regex, "g");
1554
+ // if (!r.test(this.value)){
1555
+ // this.valid = false;
1556
+ // this.errorMessage = "Invalid input";
1557
+ // return this.errorMessage;
1558
+ // }
1559
+ // }
1560
+ return "";
1561
+ };
1562
+ __decorate([
1563
+ core.Input()
1564
+ ], TextComponent.prototype, "readonly", void 0);
1565
+ __decorate([
1566
+ core.Input()
1567
+ ], TextComponent.prototype, "hint", void 0);
1568
+ __decorate([
1569
+ core.Input()
1570
+ ], TextComponent.prototype, "display", void 0);
1571
+ __decorate([
1572
+ core.Input()
1573
+ ], TextComponent.prototype, "placeholder", void 0);
1574
+ __decorate([
1575
+ core.Input()
1576
+ ], TextComponent.prototype, "value", void 0);
1577
+ __decorate([
1578
+ core.Output()
1579
+ ], TextComponent.prototype, "valueChange", void 0);
1580
+ __decorate([
1581
+ core.Input()
1582
+ ], TextComponent.prototype, "format", void 0);
1583
+ __decorate([
1584
+ core.Output()
1585
+ ], TextComponent.prototype, "leave", void 0);
1586
+ __decorate([
1587
+ core.Output()
1588
+ ], TextComponent.prototype, "enterPress", void 0);
1589
+ __decorate([
1590
+ core.Input()
1591
+ ], TextComponent.prototype, "rows", void 0);
1592
+ __decorate([
1593
+ core.Input()
1594
+ ], TextComponent.prototype, "width", void 0);
1595
+ __decorate([
1596
+ core.Input()
1597
+ ], TextComponent.prototype, "options", void 0);
1598
+ __decorate([
1599
+ core.Input()
1600
+ ], TextComponent.prototype, "optionValue", void 0);
1601
+ __decorate([
1602
+ core.Input()
1603
+ ], TextComponent.prototype, "optionDisplay", void 0);
1604
+ __decorate([
1605
+ core.Input()
1606
+ ], TextComponent.prototype, "required", void 0);
1607
+ __decorate([
1608
+ core.Input()
1609
+ ], TextComponent.prototype, "min", void 0);
1610
+ __decorate([
1611
+ core.Input()
1612
+ ], TextComponent.prototype, "max", void 0);
1613
+ __decorate([
1614
+ core.Input()
1615
+ ], TextComponent.prototype, "regex", void 0);
1616
+ TextComponent = __decorate([
1617
+ core.Component({
1618
+ selector: 'spa-text',
1619
+ template: "<mat-form-field *ngIf=\"rows == '' && options.length==0\" hideRequiredMarker=\"true\" [hintLabel]=\"hint\" style=\"padding-right: 20px;\" [ngStyle]=\"{'width':width}\" >\r\n<mat-label *ngIf=\"format=='text'\">{{display}}</mat-label>\r\n<mat-label *ngIf=\"format=='date'\">{{display | date:'dd/MM/yyyy'}}</mat-label>\r\n<!-- <mat-label *ngIf=\"format=='datetime'\">{{display | date:'dd/MM/yyyy HH:mm'}}</mat-label> -->\r\n<input matInput autocomplete=\"off\" [(ngModel)]=\"value\" (change)=\"changed()\" (blur)=\"leaved()\" (keyup.enter)=\"enterPressed()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\"/>\r\n<mat-error *ngIf=\"control.invalid\">{{validate()}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n<!-- TextArea copy - Only change input to textarea and change ngif to not -->\r\n\r\n<mat-form-field *ngIf=\"rows != '' && options.length==0\" hideRequiredMarker=\"true\" [hintLabel]=\"hint\" style=\"padding-right: 20px;\" [ngStyle]=\"{'width':width}\">\r\n<mat-label>{{display}}</mat-label>\r\n<textarea matInput autocomplete=\"off\" [rows]=\"rows\" [(ngModel)]=\"value\" (change)=\"changed()\" (keyup.enter)=\"enterPressed()\" [placeholder]=\"placeholder\" [formControl]=\"control\" [required]=\"required\" [readonly]=\"readonly\"></textarea>\r\n<mat-error *ngIf=\"control.invalid\">{{validate()}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n\r\n<!-- Work in progress cant bind to value -->\r\n\r\n <!-- <mat-form-field *ngIf=\"options.length !=0\" hideRequiredMarker=\"true\" [hintLabel]=\"hint\" style=\"padding-right: 20px;\" [ngStyle]=\"{'width':width}\">\r\n <input type=\"text\" autocomplete=\"off\" [placeholder]=\"display\" (change)=\"changed2()\" matInput [formControl]=\"myControl\" [matAutocomplete]=\"auto\" [readonly]=\"readonly\">\r\n <mat-autocomplete #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let row of filteredOptions | async\" [value]=\"row[optionValue]\">\r\n {{row[optionDisplay]}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n</mat-form-field> -->\r\n\r\n",
1620
+ styles: [""]
1621
+ })
1622
+ ], TextComponent);
1623
+ return TextComponent;
1624
+ }());
1625
+
1626
+ //-------------------------------------------EDIT
1627
+ var viewerDialog = /** @class */ (function () {
1628
+ function viewerDialog(httpService, data) {
1629
+ this.httpService = httpService;
1630
+ this.data = data;
1631
+ this.isProcessing = false;
1632
+ this.fileNames = new Array();
1633
+ this.currIndex = 0;
1634
+ this.currentFileUrl = "";
1635
+ this.imageDoc = false;
1636
+ }
1637
+ viewerDialog.prototype.ngOnInit = function () {
1638
+ this.fileNames = this.data.fileNames;
1639
+ this.path = this.data.path;
1640
+ this.fileName = this.data.fileName;
1641
+ this.currIndex = this.data.fileNames.indexOf(this.fileName);
1642
+ this.setURL();
1643
+ };
1644
+ viewerDialog.prototype.previous = function () {
1645
+ if (this.fileNames.length == 0) {
1646
+ return;
1647
+ }
1648
+ if (this.currIndex - 1 >= 0) {
1649
+ this.currIndex = this.currIndex - 1;
1650
+ }
1651
+ else if (this.currIndex == 0) {
1652
+ this.currIndex = this.fileNames.length - 1;
1653
+ }
1654
+ this.setURL();
1655
+ };
1656
+ viewerDialog.prototype.next = function () {
1657
+ if (this.fileNames.length == 0) {
1658
+ return;
1659
+ }
1660
+ if (this.currIndex + 1 < this.fileNames.length) {
1661
+ this.currIndex = this.currIndex + 1;
1662
+ }
1663
+ else if (this.currIndex + 1 > this.fileNames.length - 1) {
1664
+ this.currIndex = 0;
1665
+ }
1666
+ this.setURL();
1667
+ };
1668
+ viewerDialog.prototype.setURL = function () {
1669
+ // this.currentFileUrl = this.httpService.apiUrl.replace("/api/", "/files/") + '' + "/" + this.files[this.currIndex];
1670
+ this.currentFileUrl = "" + this.httpService.apiUrl.replace("/api/", "/") + this.path.replace("//", "/") + "/" + this.fileNames[this.currIndex];
1671
+ if (this.currentFileUrl.toLocaleLowerCase().endsWith(".pdf") || this.currentFileUrl.toLocaleLowerCase().endsWith(".jpg") || this.currentFileUrl.toLocaleLowerCase().endsWith(".jpeg")) {
1672
+ this.imageDoc = true;
1673
+ }
1674
+ else {
1675
+ this.imageDoc = false;
1676
+ window.open(this.currentFileUrl, '_blank');
1677
+ }
1678
+ };
1679
+ viewerDialog.prototype.change = function (fileName) {
1680
+ this.currIndex = this.fileNames.indexOf(fileName);
1681
+ this.setURL();
1682
+ };
1683
+ viewerDialog.ctorParameters = function () { return [
1684
+ { type: tinCore.HttpService },
1685
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
1686
+ ]; };
1687
+ viewerDialog = __decorate([
1688
+ core.Component({
1689
+ selector: 'app-editRequest',
1690
+ template: "\r\n\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n <div class=\"row\">\r\n\r\n <div class=\"col\">\r\n <ngx-doc-viewer *ngIf=\"imageDoc\"\r\n [url]=\"currentFileUrl\"\r\n viewer=\"url\"\r\n style=\"width:100%;height:60vh;\">\r\n </ngx-doc-viewer>\r\n\r\n <div *ngIf=\"!imageDoc\" class=\"d-flex justify-content-center row align-items-center\" style=\"height:60vh;\">\r\n\r\n This file type will be downloaded\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"col-3\">\r\n <spa-chips [chips]=\"fileNames\" display=\"Documents\" icon=\"description\" (click)=\"change($event)\"></spa-chips>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n<button mat-button [disabled]=\"currIndex == 0\" (click)=\"previous()\" cdkFocusInitial>Previous</button>\r\n<button mat-button [disabled]=\"currIndex+1 == fileNames.length\" (click)=\"next()\" cdkFocusInitial>Next</button>\r\n<button mat-button mat-dialog-close>Cancel</button>\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n",
1691
+ styles: [".truncate-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.align-end{justify-content:flex-end}.fx-spacer{flex:1 1 auto}"]
1692
+ }),
1693
+ __param(1, core.Inject(dialog.MAT_DIALOG_DATA))
1694
+ ], viewerDialog);
1695
+ return viewerDialog;
1696
+ }());
1697
+
1698
+ var ViewerComponent = /** @class */ (function () {
1699
+ function ViewerComponent(dialog) {
1700
+ this.dialog = dialog;
1701
+ this.dir = "";
1702
+ this.folderName = "";
1703
+ this.fileNames = new Array();
1704
+ this.removable = false;
1705
+ this.remove = new core.EventEmitter();
1706
+ this.display = "Documents";
1707
+ this.title = "Documents";
1708
+ }
1709
+ ViewerComponent.prototype.ngOnInit = function () {
1710
+ // console.log(`${this.dir}/${this.folderName}`)
1711
+ };
1712
+ // fileList: string[];
1713
+ ViewerComponent.prototype.viewDocs = function (fileName) {
1714
+ if (typeof fileName != 'string') {
1715
+ return;
1716
+ }
1717
+ // console.log("opening doc: " + fileName)
1718
+ var dialogRef = this.dialog.open(viewerDialog, {
1719
+ minWidth: '1500px',
1720
+ maxWidth: '80vw',
1721
+ data: { fileNames: this.fileNames, fileName: fileName, path: this.dir + "/" + this.folderName }
1722
+ });
1723
+ };
1724
+ ViewerComponent.prototype.removed = function (i) {
1725
+ this.remove.emit(i);
1726
+ };
1727
+ ViewerComponent.ctorParameters = function () { return [
1728
+ { type: dialog.MatDialog }
1729
+ ]; };
1730
+ __decorate([
1731
+ core.Input()
1732
+ ], ViewerComponent.prototype, "dir", void 0);
1733
+ __decorate([
1734
+ core.Input()
1735
+ ], ViewerComponent.prototype, "folderName", void 0);
1736
+ __decorate([
1737
+ core.Input()
1738
+ ], ViewerComponent.prototype, "fileNames", void 0);
1739
+ __decorate([
1740
+ core.Input()
1741
+ ], ViewerComponent.prototype, "removable", void 0);
1742
+ __decorate([
1743
+ core.Output()
1744
+ ], ViewerComponent.prototype, "remove", void 0);
1745
+ __decorate([
1746
+ core.Input()
1747
+ ], ViewerComponent.prototype, "display", void 0);
1748
+ __decorate([
1749
+ core.Input()
1750
+ ], ViewerComponent.prototype, "title", void 0);
1751
+ ViewerComponent = __decorate([
1752
+ core.Component({
1753
+ selector: 'spa-viewer',
1754
+ template: "<div class=\"tin-input-row mt-3\" *ngIf=\"title != ''\">\r\n <mat-label style=\"font-size: 20px; font-weight: 300\" > {{title}}</mat-label >\r\n</div>\r\n\r\n<spa-chips [chips]=\"fileNames\" [title]=\"title\" [removable]=\"removable\" icon=\"description\" (click)=\"viewDocs($event)\" (remove)=\"removed($event)\"></spa-chips>\r\n\r\n\r\n\r\n<div *ngIf=\"!fileNames\" class=\"d-flex justify-content-center row align-items-center\" style=\"max-height:200px\">\r\n\r\n No {{title.toLowerCase()}}\r\n\r\n</div>\r\n",
1755
+ styles: [".truncate-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.align-end{justify-content:flex-end}.fx-spacer{flex:1 1 auto}"]
1756
+ })
1757
+ ], ViewerComponent);
1758
+ return ViewerComponent;
1759
+ }());
1760
+
1761
+ var SelectComponent = /** @class */ (function () {
1762
+ function SelectComponent() {
1763
+ this.width = "100%";
1764
+ this.readonly = false;
1765
+ this.readonlyMode = "";
1766
+ this.hint = "";
1767
+ this.display = "";
1768
+ this.value = "";
1769
+ this.optionValue = "";
1770
+ this.optionDisplay = "";
1771
+ this.optionDisplayExtra = "";
1772
+ this.valueChange = new core.EventEmitter();
1773
+ }
1774
+ SelectComponent.prototype.ngOnInit = function () {
1775
+ // this.displayValue = this.options.filter((m) => m.optionValue == this.value)
1776
+ // console.log(this.displayValue)
1777
+ // this.displayValue = this.value
1778
+ };
1779
+ SelectComponent.prototype.ngOnChanges = function () {
1780
+ var _this = this;
1781
+ if (this.readonlyMode != "" && this.options.length > 0) {
1782
+ this.displayValue = this.options.filter(function (m) { return m["" + _this.optionValue] == _this.value; })[0]["" + this.optionDisplay];
1783
+ }
1784
+ };
1785
+ SelectComponent.prototype.changed = function () {
1786
+ this.valueChange.emit(this.value);
1787
+ };
1788
+ SelectComponent.prototype.selectChanged = function () {
1789
+ };
1790
+ __decorate([
1791
+ core.Input()
1792
+ ], SelectComponent.prototype, "width", void 0);
1793
+ __decorate([
1794
+ core.Input()
1795
+ ], SelectComponent.prototype, "readonly", void 0);
1796
+ __decorate([
1797
+ core.Input()
1798
+ ], SelectComponent.prototype, "readonlyMode", void 0);
1799
+ __decorate([
1800
+ core.Input()
1801
+ ], SelectComponent.prototype, "hint", void 0);
1802
+ __decorate([
1803
+ core.Input()
1804
+ ], SelectComponent.prototype, "display", void 0);
1805
+ __decorate([
1806
+ core.Input()
1807
+ ], SelectComponent.prototype, "value", void 0);
1808
+ __decorate([
1809
+ core.Input()
1810
+ ], SelectComponent.prototype, "options", void 0);
1811
+ __decorate([
1812
+ core.Input()
1813
+ ], SelectComponent.prototype, "optionValue", void 0);
1814
+ __decorate([
1815
+ core.Input()
1816
+ ], SelectComponent.prototype, "optionDisplay", void 0);
1817
+ __decorate([
1818
+ core.Input()
1819
+ ], SelectComponent.prototype, "optionDisplayExtra", void 0);
1820
+ __decorate([
1821
+ core.Output()
1822
+ ], SelectComponent.prototype, "valueChange", void 0);
1823
+ SelectComponent = __decorate([
1824
+ core.Component({
1825
+ selector: 'spa-select',
1826
+ template: "\r\n\r\n\r\n<mat-form-field *ngIf=\"readonlyMode==''\" style=\"padding-right: 20px;\" [ngStyle]=\"{'width':width}\">\r\n <mat-label>{{display}}</mat-label>\r\n <mat-select [(value)]=\"value\" (selectionChange)=\"changed()\" [disabled]=\"readonly\">\r\n <mat-option *ngFor=\"let row of options\" [value]=\"row[optionValue]\">\r\n {{row[optionDisplay]}} <label *ngIf=\"optionDisplayExtra!='' && row[optionDisplayExtra] && row[optionDisplayExtra] != ''\">({{row[optionDisplayExtra]}})</label>\r\n </mat-option>\r\n </mat-select>\r\n <mat-hint *ngIf=\"hint!=''\">{{hint}}</mat-hint>\r\n</mat-form-field>\r\n\r\n<!-- ReadOnlyModes original, text, label -->\r\n<!-- <spa-text *ngIf=\"readonlyMode=='text' && readonly\" [display]=\"display\" [(value)]=\"displayValue\" [readonly]=\"true\" ></spa-text> -->\r\n",
1827
+ styles: [""]
1828
+ })
1829
+ ], SelectComponent);
1830
+ return SelectComponent;
1831
+ }());
1832
+
1833
+ var CheckComponent = /** @class */ (function () {
1834
+ function CheckComponent() {
1835
+ this.readonly = false;
1836
+ this.display = "";
1837
+ this.value = false;
1838
+ this.valueChange = new core.EventEmitter();
1839
+ this.click = new core.EventEmitter();
1840
+ this.check = new core.EventEmitter();
1841
+ this.uncheck = new core.EventEmitter();
1842
+ }
1843
+ CheckComponent.prototype.ngOnInit = function () {
1844
+ };
1845
+ CheckComponent.prototype.changed = function () {
1846
+ this.valueChange.emit(this.value);
1847
+ };
1848
+ CheckComponent.prototype.clicked = function () {
1849
+ this.click.emit();
1850
+ if (!this.value) {
1851
+ this.checked();
1852
+ }
1853
+ else {
1854
+ this.unchecked();
1855
+ }
1856
+ };
1857
+ CheckComponent.prototype.checked = function () {
1858
+ this.check.emit();
1859
+ };
1860
+ CheckComponent.prototype.unchecked = function () {
1861
+ this.uncheck.emit();
1862
+ };
1863
+ __decorate([
1864
+ core.Input()
1865
+ ], CheckComponent.prototype, "readonly", void 0);
1866
+ __decorate([
1867
+ core.Input()
1868
+ ], CheckComponent.prototype, "display", void 0);
1869
+ __decorate([
1870
+ core.Input()
1871
+ ], CheckComponent.prototype, "value", void 0);
1872
+ __decorate([
1873
+ core.Output()
1874
+ ], CheckComponent.prototype, "valueChange", void 0);
1875
+ __decorate([
1876
+ core.Output()
1877
+ ], CheckComponent.prototype, "click", void 0);
1878
+ __decorate([
1879
+ core.Output()
1880
+ ], CheckComponent.prototype, "check", void 0);
1881
+ __decorate([
1882
+ core.Output()
1883
+ ], CheckComponent.prototype, "uncheck", void 0);
1884
+ CheckComponent = __decorate([
1885
+ core.Component({
1886
+ selector: 'spa-check',
1887
+ template: " <mat-checkbox color=\"primary\" style=\"margin-right:50px; font-size:14px\" [(ngModel)]=\"value\" (change)=\"changed()\" (click)=\"clicked()\" [disabled]=\"readonly\">{{display}}</mat-checkbox>\r\n",
1888
+ styles: [""]
1889
+ })
1890
+ ], CheckComponent);
1891
+ return CheckComponent;
1892
+ }());
1893
+
1894
+ var AttachComponent = /** @class */ (function () {
1895
+ function AttachComponent() {
1896
+ this.message = "Drag and drop files here";
1897
+ this.files = [];
1898
+ this.filesChange = new core.EventEmitter();
1899
+ this.upload = new core.EventEmitter();
1900
+ this.enableUpload = false;
1901
+ }
1902
+ AttachComponent.prototype.ngOnInit = function () {
1903
+ };
1904
+ /**
1905
+ * on file drop handler
1906
+ */
1907
+ AttachComponent.prototype.onFileDropped = function ($event) {
1908
+ this.prepareFilesList($event);
1909
+ };
1910
+ /**
1911
+ * handle file from browsing
1912
+ */
1913
+ AttachComponent.prototype.fileBrowseHandler = function (files) {
1914
+ this.prepareFilesList(files);
1915
+ };
1916
+ /**
1917
+ * Delete file from files list
1918
+ * @param index (File index)
1919
+ */
1920
+ AttachComponent.prototype.deleteFile = function (index) {
1921
+ this.files.splice(index, 1);
1922
+ };
1923
+ /**
1924
+ * Simulate the upload process
1925
+ */
1926
+ // uploadFilesSimulator(index: number) {
1927
+ // setTimeout(() => {
1928
+ // if (index === this.files.length) {
1929
+ // return;
1930
+ // } else {
1931
+ // const progressInterval = setInterval(() => {
1932
+ // if (this.files[index].progress === 100) {
1933
+ // clearInterval(progressInterval);
1934
+ // this.uploadFilesSimulator(index + 1);
1935
+ // } else {
1936
+ // this.files[index].progress += 5;
1937
+ // }
1938
+ // }, 200);
1939
+ // }
1940
+ // }, 1000);
1941
+ // }
1942
+ /**
1943
+ * Convert Files list to normal array list
1944
+ * @param files (Files List)
1945
+ */
1946
+ AttachComponent.prototype.prepareFilesList = function (files) {
1947
+ var e_1, _a;
1948
+ try {
1949
+ for (var files_1 = __values(files), files_1_1 = files_1.next(); !files_1_1.done; files_1_1 = files_1.next()) {
1950
+ var item = files_1_1.value;
1951
+ item.progress = 0;
1952
+ this.files.push(item);
1953
+ }
1954
+ }
1955
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1956
+ finally {
1957
+ try {
1958
+ if (files_1_1 && !files_1_1.done && (_a = files_1.return)) _a.call(files_1);
1959
+ }
1960
+ finally { if (e_1) throw e_1.error; }
1961
+ }
1962
+ // this.uploadFilesSimulator(0);
1963
+ };
1964
+ /**
1965
+ * format bytes
1966
+ * @param bytes (File size in bytes)
1967
+ * @param decimals (Decimals point)
1968
+ */
1969
+ AttachComponent.prototype.formatBytes = function (bytes, decimals) {
1970
+ if (bytes === 0) {
1971
+ return '0 Bytes';
1972
+ }
1973
+ var k = 1024;
1974
+ var dm = decimals <= 0 ? 0 : decimals || 2;
1975
+ var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
1976
+ var i = Math.floor(Math.log(bytes) / Math.log(k));
1977
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
1978
+ };
1979
+ AttachComponent.prototype.uploaded = function () {
1980
+ this.upload.emit();
1981
+ };
1982
+ AttachComponent.prototype.filesChanged = function () {
1983
+ this.filesChange.emit(this.files);
1984
+ };
1985
+ __decorate([
1986
+ core.Input()
1987
+ ], AttachComponent.prototype, "message", void 0);
1988
+ __decorate([
1989
+ core.Input()
1990
+ ], AttachComponent.prototype, "files", void 0);
1991
+ __decorate([
1992
+ core.Output()
1993
+ ], AttachComponent.prototype, "filesChange", void 0);
1994
+ __decorate([
1995
+ core.Output()
1996
+ ], AttachComponent.prototype, "upload", void 0);
1997
+ __decorate([
1998
+ core.Input()
1999
+ ], AttachComponent.prototype, "enableUpload", void 0);
2000
+ AttachComponent = __decorate([
2001
+ core.Component({
2002
+ selector: 'spa-attach',
2003
+ template: "<div class=\"tin-input-row\" style=\"width: 100%;\">\r\n\r\n <div class=\"col\">\r\n <div class=\"container\" appDnd (fileDropped)=\"onFileDropped($event)\">\r\n <input type=\"file\" #fileDropRef id=\"fileDropRef\" multiple (change)=\"fileBrowseHandler($event.target.files)\" />\r\n <h4>{{message}}</h4>\r\n <h4>or</h4>\r\n <label for=\"fileDropRef\">Click to Browse</label>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <div class=\"files-list \">\r\n <div class=\"single-file \" style=\"width: 100%;\" *ngFor=\"let file of files; let i = index\">\r\n\r\n <div class=\"tin-input-row info\" >\r\n <h4 class=\"name\">\r\n {{ file?.name }}\r\n </h4>\r\n <p class=\"size\">\r\n {{ formatBytes(file?.size, 2) }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"delete\" (click)=\"deleteFile(i)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"18\" viewBox=\"0 0 14 18\">\r\n <path fill=\"#B1B1B1\" fill-rule=\"nonzero\"\r\n d=\"M1 16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v10zm3.17-7.83a.996.996 0 0 1 1.41 0L7 9.59l1.42-1.42a.996.996 0 1 1 1.41 1.41L8.41 11l1.42 1.42a.996.996 0 1 1-1.41 1.41L7 12.41l-1.42 1.42a.996.996 0 1 1-1.41-1.41L5.59 11 4.17 9.58a.996.996 0 0 1 0-1.41zM10.5 1L9.79.29C9.61.11 9.35 0 9.09 0H4.91c-.26 0-.52.11-.7.29L3.5 1H1c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"files.length > 0 && enableUpload\" class=\"tin-input-row d-flex justify-content-center\" style=\"width: 100%;\" >\r\n <button mat-button color=\"primary\" (click)=\"uploaded()\" matTooltip=\"Upload New Documents\" matTooltipPosition=\"above\" ><mat-icon>file_upload</mat-icon> Upload</button>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n",
2004
+ styles: [".container{width:100%;height:200px;padding:2rem;text-align:center;border:2px dashed #2a7b94;position:relative;margin:0 auto}.container input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;top:0;left:0}.container label{color:#fff;width:183px;height:44px;border-radius:21.5px;background-color:#db202f;padding:8px 16px}.container h3{font-size:20px;font-weight:600;color:#38424c}.fileover{-webkit-animation:1s infinite shake;animation:1s infinite shake}.files-list{margin-top:1.5rem}.files-list .single-file{display:flex;padding:.5rem;justify-content:space-between;align-items:center;border:1px dashed #1c824d;margin-bottom:1rem;margin-right:1rem;display:flex;flex-grow:1}.files-list .single-file .delete{display:flex;margin-left:.5rem;cursor:pointer;align-self:flex-end}.files-list .single-file .name{font-size:14px;font-weight:500;color:#353f4a;margin:0}.files-list .single-file .size{font-size:12px;font-weight:500;color:#a4a4a4;margin:0 0 0 1rem}.files-list .single-file .info{width:100%}@-webkit-keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px,0) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}100%{transform:translate(1px,-2px) rotate(-1deg)}}@keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px,0) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}100%{transform:translate(1px,-2px) rotate(-1deg)}}"]
2005
+ })
2006
+ ], AttachComponent);
2007
+ return AttachComponent;
2008
+ }());
2009
+
2010
+ var DatetimeComponent = /** @class */ (function () {
2011
+ function DatetimeComponent() {
2012
+ this.display = "";
2013
+ this.value = "";
2014
+ this.valueChange = new core.EventEmitter();
2015
+ this.readonly = false;
2016
+ this.min = "01 jan 1900";
2017
+ this.max = "31 dec 9999";
2018
+ }
2019
+ DatetimeComponent.prototype.ngOnInit = function () {
2020
+ };
2021
+ DatetimeComponent.prototype.changed = function () {
2022
+ this.valueChange.emit(this.value);
2023
+ };
2024
+ __decorate([
2025
+ core.Input()
2026
+ ], DatetimeComponent.prototype, "display", void 0);
2027
+ __decorate([
2028
+ core.Input()
2029
+ ], DatetimeComponent.prototype, "value", void 0);
2030
+ __decorate([
2031
+ core.Output()
2032
+ ], DatetimeComponent.prototype, "valueChange", void 0);
2033
+ __decorate([
2034
+ core.Input()
2035
+ ], DatetimeComponent.prototype, "readonly", void 0);
2036
+ __decorate([
2037
+ core.Input()
2038
+ ], DatetimeComponent.prototype, "min", void 0);
2039
+ __decorate([
2040
+ core.Input()
2041
+ ], DatetimeComponent.prototype, "max", void 0);
2042
+ DatetimeComponent = __decorate([
2043
+ core.Component({
2044
+ selector: 'spa-datetime',
2045
+ template: "<mat-form-field style=\"width:150px;margin-right:20px\">\r\n<mat-label>{{display}}</mat-label>\r\n<input matInput autocomplete=\"off\" type=\"datetime-local\" [(ngModel)]=\"value\" [min]=\"min\" [max]=\"max\" (change)=\"changed()\" [placeholder]=\"display\" [readonly]=\"readonly\" />\r\n</mat-form-field>\r\n",
2046
+ styles: [""]
2047
+ })
2048
+ ], DatetimeComponent);
2049
+ return DatetimeComponent;
2050
+ }());
2051
+
2052
+ var MoneyComponent = /** @class */ (function () {
2053
+ function MoneyComponent() {
2054
+ this.readonly = false;
2055
+ this.display = "";
2056
+ this.value = "";
2057
+ this.valueChange = new core.EventEmitter();
2058
+ this.width = "100%";
2059
+ this.hint = "";
2060
+ this.currency = "$";
2061
+ }
2062
+ MoneyComponent.prototype.ngOnInit = function () {
2063
+ };
2064
+ MoneyComponent.prototype.ngOnChanges = function () {
2065
+ };
2066
+ MoneyComponent.prototype.changed = function () {
2067
+ this.valueChange.emit(this.value);
2068
+ };
2069
+ __decorate([
2070
+ core.Input()
2071
+ ], MoneyComponent.prototype, "readonly", void 0);
2072
+ __decorate([
2073
+ core.Input()
2074
+ ], MoneyComponent.prototype, "display", void 0);
2075
+ __decorate([
2076
+ core.Input()
2077
+ ], MoneyComponent.prototype, "value", void 0);
2078
+ __decorate([
2079
+ core.Output()
2080
+ ], MoneyComponent.prototype, "valueChange", void 0);
2081
+ __decorate([
2082
+ core.Input()
2083
+ ], MoneyComponent.prototype, "width", void 0);
2084
+ __decorate([
2085
+ core.Input()
2086
+ ], MoneyComponent.prototype, "hint", void 0);
2087
+ __decorate([
2088
+ core.Input()
2089
+ ], MoneyComponent.prototype, "currency", void 0);
2090
+ MoneyComponent = __decorate([
2091
+ core.Component({
2092
+ selector: 'spa-money',
2093
+ template: "\r\n<div class=\"tin-input-row\">\r\n\r\n<Label>{{currency}}</Label>\r\n<mat-form-field [hintLabel]=\"hint\" style=\"padding-right: 20px;\" [ngStyle]=\"{'width':width}\" >\r\n <mat-label>{{display}}</mat-label>\r\n <!-- <span>$</span> -->\r\n <input matInput class=\"example-right-align\" autocomplete=\"off\" type=\"number\" min=\"0.00\" step=\"0.01\" [(ngModel)]=\"value \" [placeholder]=\"display\" (change)=\"changed()\" [readonly]=\"readonly\" />\r\n<!-- <span matTextSuffix>.00</span> -->\r\n</mat-form-field>\r\n</div>\r\n\r\n\r\n\r\n\r\n",
2094
+ styles: ["input.example-right-align{-moz-appearance:textfield}.example-right-align{text-align:right}input.example-right-align::-webkit-inner-spin-button,input.example-right-align::-webkit-outer-spin-button{display:none}.curr{background-color:red}"]
2095
+ })
2096
+ ], MoneyComponent);
2097
+ return MoneyComponent;
2098
+ }());
2099
+
2100
+ var DndDirective = /** @class */ (function () {
2101
+ function DndDirective() {
2102
+ this.fileDropped = new core.EventEmitter();
2103
+ }
2104
+ // Dragover listener
2105
+ DndDirective.prototype.onDragOver = function (evt) {
2106
+ evt.preventDefault();
2107
+ evt.stopPropagation();
2108
+ this.fileOver = true;
2109
+ };
2110
+ // Dragleave listener
2111
+ DndDirective.prototype.onDragLeave = function (evt) {
2112
+ evt.preventDefault();
2113
+ evt.stopPropagation();
2114
+ this.fileOver = false;
2115
+ };
2116
+ // Drop listener
2117
+ DndDirective.prototype.ondrop = function (evt) {
2118
+ evt.preventDefault();
2119
+ evt.stopPropagation();
2120
+ this.fileOver = false;
2121
+ var files = evt.dataTransfer.files;
2122
+ if (files.length > 0) {
2123
+ this.fileDropped.emit(files);
2124
+ }
2125
+ };
2126
+ __decorate([
2127
+ core.HostBinding('class.fileover')
2128
+ ], DndDirective.prototype, "fileOver", void 0);
2129
+ __decorate([
2130
+ core.Output()
2131
+ ], DndDirective.prototype, "fileDropped", void 0);
2132
+ __decorate([
2133
+ core.HostListener('dragover', ['$event'])
2134
+ ], DndDirective.prototype, "onDragOver", null);
2135
+ __decorate([
2136
+ core.HostListener('dragleave', ['$event'])
2137
+ ], DndDirective.prototype, "onDragLeave", null);
2138
+ __decorate([
2139
+ core.HostListener('drop', ['$event'])
2140
+ ], DndDirective.prototype, "ondrop", null);
2141
+ DndDirective = __decorate([
2142
+ core.Directive({
2143
+ selector: '[appDnd]'
2144
+ })
2145
+ ], DndDirective);
2146
+ return DndDirective;
2147
+ }());
2148
+
2149
+ var ChipsComponent = /** @class */ (function () {
2150
+ function ChipsComponent(messageService) {
2151
+ this.messageService = messageService;
2152
+ this.icon = "";
2153
+ this.removable = false;
2154
+ this.addable = false;
2155
+ // @Output() chipClick = new EventEmitter();
2156
+ this.click = new core.EventEmitter();
2157
+ this.remove = new core.EventEmitter();
2158
+ }
2159
+ ChipsComponent.prototype.ngOnInit = function () {
2160
+ };
2161
+ ChipsComponent.prototype.clicked = function (chip) {
2162
+ console.log("Clicked chip: " + chip);
2163
+ if (typeof chip != 'string') {
2164
+ return;
2165
+ }
2166
+ if (chip) {
2167
+ this.click.emit(chip);
2168
+ }
2169
+ };
2170
+ ChipsComponent.prototype.removed = function (chip) {
2171
+ // const index = this.chips.indexOf(chip);
2172
+ var _this = this;
2173
+ // if (index >= 0) {
2174
+ // this.chips.splice(index, 1);
2175
+ // }
2176
+ this.messageService.confirm("Remove " + chip + " ?").subscribe(function (result) {
2177
+ if (result == "yes") {
2178
+ _this.remove.emit(chip);
2179
+ }
2180
+ ;
2181
+ });
2182
+ };
2183
+ ChipsComponent.ctorParameters = function () { return [
2184
+ { type: MessageService }
2185
+ ]; };
2186
+ __decorate([
2187
+ core.Input()
2188
+ ], ChipsComponent.prototype, "icon", void 0);
2189
+ __decorate([
2190
+ core.Input()
2191
+ ], ChipsComponent.prototype, "removable", void 0);
2192
+ __decorate([
2193
+ core.Input()
2194
+ ], ChipsComponent.prototype, "addable", void 0);
2195
+ __decorate([
2196
+ core.Input()
2197
+ ], ChipsComponent.prototype, "chips", void 0);
2198
+ __decorate([
2199
+ core.Output()
2200
+ ], ChipsComponent.prototype, "click", void 0);
2201
+ __decorate([
2202
+ core.Output()
2203
+ ], ChipsComponent.prototype, "remove", void 0);
2204
+ ChipsComponent = __decorate([
2205
+ core.Component({
2206
+ selector: 'spa-chips',
2207
+ template: "\r\n\r\n\r\n<div class=\"row mt-1\" style=\"margin-left: 1em;\">\r\n <mat-chip-list #chipList >\r\n <mat-chip *ngFor=\"let chip of chips let i = index\" selectable [removable]=\"removable\" style=\"font-size: 12px;\" [ngStyle]=\"{'padding-right': removable ? '5px':'12px'}\" (click)=\"clicked(chip)\" >\r\n <mat-icon *ngIf=\"icon != ''\" color=\"primary\" style=\"font-size: 22px;\">{{icon}}</mat-icon>\r\n\r\n {{chip}}\r\n\r\n <mat-icon *ngIf=\"removable\" style=\"font-size: 20px; margin-left: 5px;margin-top: 3px;margin-right: 0px; color: grey;\" (click)=\"removed(chip)\">cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n</div>\r\n\r\n\r\n",
2208
+ styles: [""]
2209
+ })
2210
+ ], ChipsComponent);
2211
+ return ChipsComponent;
2212
+ }());
2213
+
2214
+ var ActivityComponent = /** @class */ (function () {
2215
+ function ActivityComponent() {
2216
+ this.notes = new Array();
2217
+ this.notesMessage = "Empty";
2218
+ this.title = "Notes";
2219
+ }
2220
+ ActivityComponent.prototype.ngOnInit = function () {
2221
+ };
2222
+ __decorate([
2223
+ core.Input()
2224
+ ], ActivityComponent.prototype, "notes", void 0);
2225
+ __decorate([
2226
+ core.Input()
2227
+ ], ActivityComponent.prototype, "title", void 0);
2228
+ ActivityComponent = __decorate([
2229
+ core.Component({
2230
+ selector: 'spa-activity',
2231
+ template: "\r\n <div class=\"tin-input-row mt-3\" *ngIf=\"title != ''\">\r\n <mat-label style=\"font-size: 20px; font-weight: 300\" > {{title}}</mat-label >\r\n </div>\r\n\r\n <ul *ngIf=\"notes && notes.length>0\" class=\"list-group list-group-flush\" style=\"max-height:350px; margin-left:5px\">\r\n\r\n <li *ngFor=\"let note of notes\" class=\"list-group-item list-group-item-action flex-column align-items-start\">\r\n <div class=\"d-flex w-100 justify-content-between\">\r\n <div class=\"mb-0\">{{note.createdByName}}</div>\r\n <!-- <small class=\"text-muted\">{{note.expr1}} ago</small> -->\r\n </div>\r\n\r\n <small>{{note.details}} (<em>{{note.createdDate | date: 'dd MMM yyyy HH:mm'}}</em>) </small>\r\n </li>\r\n\r\n\r\n </ul>\r\n\r\n <div *ngIf=\"notes && notes.length==0\" class=\"d-flex justify-content-center row align-items-center\" style=\"max-height:200px\">\r\n\r\n No {{title.toLowerCase()}}\r\n\r\n </div>\r\n",
2232
+ styles: [""]
2233
+ })
2234
+ ], ActivityComponent);
2235
+ return ActivityComponent;
2236
+ }());
2237
+
2238
+ var HtmlComponent = /** @class */ (function () {
2239
+ function HtmlComponent() {
2240
+ this.value = "";
2241
+ this.valueChange = new core.EventEmitter();
2242
+ this.readonly = false;
2243
+ this.config = {
2244
+ editable: true,
2245
+ spellcheck: true,
2246
+ height: 'auto',
2247
+ minHeight: '5rem',
2248
+ placeholder: 'Enter text here...',
2249
+ translate: 'no',
2250
+ defaultParagraphSeparator: '',
2251
+ defaultFontName: 'Arial',
2252
+ toolbarHiddenButtons: [
2253
+ [
2254
+ 'bold',
2255
+ 'italic',
2256
+ 'underline',
2257
+ 'strikeThrough',
2258
+ 'subscript',
2259
+ 'superscript',
2260
+ 'justifyLeft',
2261
+ 'justifyCenter',
2262
+ 'justifyRight',
2263
+ 'justifyFull',
2264
+ 'indent',
2265
+ 'outdent',
2266
+ 'insertUnorderedList',
2267
+ 'insertOrderedList',
2268
+ 'heading',
2269
+ 'fontName'
2270
+ ],
2271
+ [
2272
+ 'fontSize',
2273
+ 'textColor',
2274
+ 'backgroundColor',
2275
+ 'customClasses',
2276
+ 'link',
2277
+ 'unlink',
2278
+ 'insertImage',
2279
+ 'insertVideo',
2280
+ 'insertHorizontalRule',
2281
+ 'removeFormat',
2282
+ 'toggleEditorMode'
2283
+ ]
2284
+ ],
2285
+ customClasses: [
2286
+ {
2287
+ name: "quote",
2288
+ class: "quote",
2289
+ },
2290
+ {
2291
+ name: 'redText',
2292
+ class: 'redText'
2293
+ },
2294
+ {
2295
+ name: "titleText",
2296
+ class: "titleText",
2297
+ tag: "h1",
2298
+ },
2299
+ ]
2300
+ };
2301
+ }
2302
+ HtmlComponent.prototype.ngOnInit = function () {
2303
+ };
2304
+ HtmlComponent.prototype.changed = function () {
2305
+ this.valueChange.emit(this.value);
2306
+ };
2307
+ HtmlComponent.prototype.ngOnChanges = function () {
2308
+ // console.log("OnChange")
2309
+ this.config.editable = !this.readonly;
2310
+ };
2311
+ __decorate([
2312
+ core.Input()
2313
+ ], HtmlComponent.prototype, "value", void 0);
2314
+ __decorate([
2315
+ core.Output()
2316
+ ], HtmlComponent.prototype, "valueChange", void 0);
2317
+ __decorate([
2318
+ core.Input()
2319
+ ], HtmlComponent.prototype, "readonly", void 0);
2320
+ __decorate([
2321
+ core.Input()
2322
+ ], HtmlComponent.prototype, "config", void 0);
2323
+ HtmlComponent = __decorate([
2324
+ core.Component({
2325
+ selector: 'spa-html',
2326
+ template: "<angular-editor [(ngModel)]=\"value\" [config]=\"config\" (ngModelChange)=\"changed()\" ></angular-editor>\r\n",
2327
+ styles: [""]
2328
+ })
2329
+ ], HtmlComponent);
2330
+ return HtmlComponent;
2331
+ }());
2332
+
2333
+ var OptionComponent = /** @class */ (function () {
2334
+ function OptionComponent() {
2335
+ this.optionValue = "";
2336
+ this.optionDisplay = "";
2337
+ this.readonly = false;
2338
+ this.value = "";
2339
+ this.display = "";
2340
+ this.show = false;
2341
+ this.valueChange = new core.EventEmitter();
2342
+ this.enterPress = new core.EventEmitter();
2343
+ }
2344
+ OptionComponent.prototype.ngOnInit = function () {
2345
+ };
2346
+ OptionComponent.prototype.changed = function () {
2347
+ this.valueChange.emit(this.value);
2348
+ };
2349
+ OptionComponent.prototype.enterPressed = function () {
2350
+ this.valueChange.emit();
2351
+ };
2352
+ OptionComponent.prototype.resetValue = function () {
2353
+ this.value = "";
2354
+ this.changed();
2355
+ };
2356
+ __decorate([
2357
+ core.Input()
2358
+ ], OptionComponent.prototype, "options", void 0);
2359
+ __decorate([
2360
+ core.Input()
2361
+ ], OptionComponent.prototype, "optionValue", void 0);
2362
+ __decorate([
2363
+ core.Input()
2364
+ ], OptionComponent.prototype, "optionDisplay", void 0);
2365
+ __decorate([
2366
+ core.Input()
2367
+ ], OptionComponent.prototype, "readonly", void 0);
2368
+ __decorate([
2369
+ core.Input()
2370
+ ], OptionComponent.prototype, "value", void 0);
2371
+ __decorate([
2372
+ core.Input()
2373
+ ], OptionComponent.prototype, "display", void 0);
2374
+ __decorate([
2375
+ core.Input()
2376
+ ], OptionComponent.prototype, "show", void 0);
2377
+ __decorate([
2378
+ core.Output()
2379
+ ], OptionComponent.prototype, "valueChange", void 0);
2380
+ __decorate([
2381
+ core.Output()
2382
+ ], OptionComponent.prototype, "enterPress", void 0);
2383
+ OptionComponent = __decorate([
2384
+ core.Component({
2385
+ selector: 'spa-option',
2386
+ template: "\r\n<mat-checkbox color=\"primary\" style=\"margin-right:5px\" [(ngModel)]=\"show\" (change)=\"resetValue()\" labelPosition=\"after\">{{display}}</mat-checkbox>\r\n\r\n<mat-form-field style=\"margin-right:10px;width: 0px;\" >\r\n<input matInput />\r\n</mat-form-field>\r\n\r\n<mat-form-field style=\"margin-right:30px\" *ngIf=\"show && !options\">\r\n<input matInput [(ngModel)]=\"value\" width=\"100\" (change)=\"changed()\" (keyup.enter)=\"changed()\" [placeholder]=\"'Enter ' + display\" autocomplete=\"off\" />\r\n</mat-form-field>\r\n\r\n\r\n<mat-form-field style=\"margin-right: 20px;\" width=\"100\" *ngIf=\"show && options\">\r\n <mat-label>{{display}}</mat-label>\r\n <mat-select [(value)]=\"value\" (selectionChange)=\"changed()\" [disabled]=\"readonly\" >\r\n <mat-option *ngFor=\"let row of options\" [value]=\"row[optionValue]\">\r\n {{row[optionDisplay]}}\r\n </mat-option>\r\n </mat-select>\r\n</mat-form-field>\r\n\r\n<!-- <spa-text *ngIf=\"show\" style=\"margin-right:30px\" [display]=\"'Enter ' + display\" (enterPress)=\"enterPressed()\" (valueChange)=\"changed($event.target.value)\" width=\"100\" [required]=\"false\" [(value)]=\"value\" ></spa-text> -->\r\n\r\n",
2387
+ styles: [""]
2388
+ })
2389
+ ], OptionComponent);
2390
+ return OptionComponent;
2391
+ }());
2392
+
2393
+ var LabelComponent = /** @class */ (function () {
2394
+ function LabelComponent() {
2395
+ this.display = "";
2396
+ this.value = "";
2397
+ this.format = "text";
2398
+ }
2399
+ LabelComponent.prototype.ngOnInit = function () {
2400
+ };
2401
+ __decorate([
2402
+ core.Input()
2403
+ ], LabelComponent.prototype, "display", void 0);
2404
+ __decorate([
2405
+ core.Input()
2406
+ ], LabelComponent.prototype, "value", void 0);
2407
+ __decorate([
2408
+ core.Input()
2409
+ ], LabelComponent.prototype, "format", void 0);
2410
+ LabelComponent = __decorate([
2411
+ core.Component({
2412
+ selector: 'spa-label',
2413
+ template: "<div *ngIf=\"format=='text'\">\r\n <label style=\"font-weight: 500\" >{{display}}: </label> &nbsp; <label>{{value}} </label> &nbsp;\r\n</div>\r\n\r\n<div *ngIf=\"format=='date'\">\r\n <label style=\"font-weight: 500\" >{{display}}: </label> &nbsp; <label>{{value | date:'dd/MM/yyyy'}} </label> &nbsp;\r\n</div>\r\n\r\n<div *ngIf=\"format=='datetime'\">\r\n <label style=\"font-weight: 500\" >{{display}}: </label> &nbsp; <label>{{value | date:'dd/MM/yyyy HH:mm'}} </label> &nbsp;\r\n</div>\r\n\r\n<div *ngIf=\"format=='money'\">\r\n <label style=\"font-weight: 500\" >{{display}}: </label> &nbsp; <label>{{value | currency:'USD':''}} </label> &nbsp;\r\n</div>\r\n",
2414
+ styles: [""]
2415
+ })
2416
+ ], LabelComponent);
2417
+ return LabelComponent;
2418
+ }());
2419
+
2420
+ var ɵ0$1 = { displayDefaultIndicatorType: false };
2421
+ var StepsComponent = /** @class */ (function () {
2422
+ function StepsComponent() {
2423
+ this.value = "";
2424
+ }
2425
+ StepsComponent.prototype.ngOnInit = function () {
2426
+ };
2427
+ StepsComponent.prototype.ngAfterViewInit = function () {
2428
+ };
2429
+ StepsComponent.prototype.ngOnChanges = function () {
2430
+ // console.log("OnChange")
2431
+ this.pushSteps();
2432
+ };
2433
+ StepsComponent.prototype.setStepper = function () {
2434
+ if (this.value == "")
2435
+ return;
2436
+ // console.log(this.value)
2437
+ // this.stepper.disableRipple = true;
2438
+ this.stepper.selectedIndex = 0;
2439
+ switch (this.value) {
2440
+ case "Draft":
2441
+ this.stepper.selectedIndex = 0;
2442
+ break;
2443
+ case "Head Approval":
2444
+ this.pushStepper(1);
2445
+ break;
2446
+ case "CE Approval":
2447
+ this.pushStepper(2);
2448
+ break;
2449
+ case "Booking":
2450
+ this.pushStepper(3);
2451
+ break;
2452
+ case "BTA Approval":
2453
+ this.pushStepper(4);
2454
+ break;
2455
+ case "Travel":
2456
+ this.pushStepper(5);
2457
+ break;
2458
+ case "BTR Approval":
2459
+ this.pushStepper(6);
2460
+ break;
2461
+ case "Travel Closure":
2462
+ this.pushStepper(7);
2463
+ break;
2464
+ }
2465
+ };
2466
+ StepsComponent.prototype.pushStepper = function (count) {
2467
+ for (var index = 0; index < count + 1; index++) {
2468
+ // const element = array[index];
2469
+ this.stepper.selectedIndex = index;
2470
+ // console.log("pushed")
2471
+ }
2472
+ };
2473
+ StepsComponent.prototype.pushSteps = function () {
2474
+ var e_1, _a;
2475
+ if (this.steps.length == 0)
2476
+ return;
2477
+ if (this.value == "")
2478
+ return;
2479
+ this.stepper.selectedIndex = 0;
2480
+ var i = 0;
2481
+ try {
2482
+ for (var _b = __values(this.steps), _c = _b.next(); !_c.done; _c = _b.next()) {
2483
+ var step = _c.value;
2484
+ if (step.name != this.value) {
2485
+ this.stepper.selectedIndex = i;
2486
+ i++;
2487
+ }
2488
+ else {
2489
+ this.stepper.selectedIndex = i;
2490
+ // console.log("Stopped")
2491
+ break;
2492
+ }
2493
+ }
2494
+ }
2495
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2496
+ finally {
2497
+ try {
2498
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2499
+ }
2500
+ finally { if (e_1) throw e_1.error; }
2501
+ }
2502
+ };
2503
+ __decorate([
2504
+ core.ViewChild('stepper')
2505
+ ], StepsComponent.prototype, "stepper", void 0);
2506
+ __decorate([
2507
+ core.Input()
2508
+ ], StepsComponent.prototype, "value", void 0);
2509
+ __decorate([
2510
+ core.Input()
2511
+ ], StepsComponent.prototype, "steps", void 0);
2512
+ StepsComponent = __decorate([
2513
+ core.Component({
2514
+ selector: 'spa-steps',
2515
+ template: "\r\n\r\n\r\n<!-- <mat-horizontal-stepper class=\"test\" labelPosition=\"bottom\" #stepper>\r\n <mat-step [editable]=\"false\" label=\"Draft\"> </mat-step>\r\n <mat-step [editable]=\"false\" label=\"Head Approval\" > </mat-step>\r\n <mat-step [editable]=\"false\" label=\"CE Approval\"> </mat-step>\r\n <mat-step [editable]=\"false\" label=\"Booking\" state=\"booking\"> </mat-step>\r\n <mat-step [editable]=\"false\" label=\"BTA Approval\"> </mat-step>\r\n <mat-step [editable]=\"false\" label=\"Travel\"> </mat-step>\r\n <mat-step [editable]=\"false\" label=\"BTR Approval\"> </mat-step>\r\n <mat-step [editable]=\"false\" label=\"Closure\"> </mat-step>\r\n <ng-template matStepperIcon=\"booking\"> <mat-icon>forum</mat-icon> </ng-template>\r\n</mat-horizontal-stepper> -->\r\n\r\n<mat-horizontal-stepper class=\"transparent\" labelPosition=\"bottom\" #stepper>\r\n\r\n <mat-step *ngFor=\"let row of steps\"\r\n [editable]=\"false\" [label]=\"row.name\">\r\n </mat-step>\r\n\r\n <!-- <ng-template *ngFor=\"let row of steps\"\r\n [matStepperIcon]=\"row.name\"> <mat-icon>{{row.icon}}</mat-icon>\r\n </ng-template> -->\r\n\r\n <!-- <ng-template matStepperIcon=\"booking\">\r\n <mat-icon>call_end</mat-icon>\r\n </ng-template> -->\r\n\r\n <!-- <ng-template ngFor let-xb [ngForOf]=\"steps\" matStepperIcon=\"Booking\"> <mat-icon>forum</mat-icon>\r\n\r\n </ng-template> -->\r\n\r\n</mat-horizontal-stepper>\r\n",
2516
+ providers: [{
2517
+ provide: stepper$1.STEPPER_GLOBAL_OPTIONS, useValue: ɵ0$1
2518
+ }],
2519
+ styles: [".transparent{background-color:rgba(0,0,0,0)}:host ::ng-deep.mat-step-header{padding:5px!important}:host ::ng-deep.mat-stepper-horizontal-line{min-width:5px!important}:host ::ng-deep .mat-horizontal-content-container{padding:0!important}:host ::ng-deep .mat-horizontal-stepper-header{pointer-events:none!important}"]
2520
+ })
2521
+ ], StepsComponent);
2522
+ return StepsComponent;
2523
+ }());
2524
+
2525
+ var TinSpaModule = /** @class */ (function () {
2526
+ function TinSpaModule() {
2527
+ }
2528
+ TinSpaModule = __decorate([
2529
+ core.NgModule({
2530
+ declarations: [DndDirective, TinSpaComponent, messageDialog, NavMenuComponent, LoaderComponent,
2531
+ TimeoutComponent, TableComponent, TilesComponent, DateComponent, TextComponent,
2532
+ ViewerComponent, SelectComponent, CheckComponent, AttachComponent, DatetimeComponent,
2533
+ MoneyComponent,
2534
+ ChipsComponent,
2535
+ ActivityComponent, viewerDialog, HtmlComponent, OptionComponent, LabelComponent, StepsComponent],
2536
+ entryComponents: [messageDialog],
2537
+ imports: [
2538
+ forms.ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: "never" }),
2539
+ common.CommonModule,
2540
+ forms.FormsModule,
2541
+ forms.ReactiveFormsModule,
2542
+ SpaMatModule,
2543
+ angular2Moment.MomentModule,
2544
+ ngxDocViewer.NgxDocViewerModule,
2545
+ angularEditor.AngularEditorModule,
2546
+ keepalive.NgIdleKeepaliveModule.forRoot()
2547
+ ],
2548
+ exports: [
2549
+ common.CommonModule,
2550
+ forms.FormsModule,
2551
+ SpaMatModule,
2552
+ TinSpaComponent,
2553
+ messageDialog,
2554
+ NavMenuComponent,
2555
+ LoaderComponent,
2556
+ TimeoutComponent,
2557
+ TableComponent,
2558
+ TilesComponent,
2559
+ DateComponent,
2560
+ ViewerComponent,
2561
+ SelectComponent,
2562
+ TextComponent,
2563
+ DatetimeComponent,
2564
+ CheckComponent,
2565
+ AttachComponent,
2566
+ MoneyComponent,
2567
+ ChipsComponent,
2568
+ ActivityComponent,
2569
+ HtmlComponent,
2570
+ OptionComponent,
2571
+ LabelComponent,
2572
+ StepsComponent
2573
+ ],
2574
+ providers: [
2575
+ { provide: http.HTTP_INTERCEPTORS, useClass: LoaderInterceptor, multi: true },
2576
+ { provide: common.LocationStrategy, useClass: common.HashLocationStrategy }
2577
+ ],
2578
+ })
2579
+ ], TinSpaModule);
2580
+ return TinSpaModule;
2581
+ }());
2582
+
2583
+ var LoginComponent = /** @class */ (function () {
2584
+ function LoginComponent(httpService, storageService, router, messageService, dataService, authService, logService) {
2585
+ this.httpService = httpService;
2586
+ this.storageService = storageService;
2587
+ this.router = router;
2588
+ this.messageService = messageService;
2589
+ this.dataService = dataService;
2590
+ this.authService = authService;
2591
+ this.logService = logService;
2592
+ this.user = new User();
2593
+ this.hide = true;
2594
+ this.isProcessing = false;
2595
+ this.appConfig = new AppConfig();
2596
+ }
2597
+ LoginComponent.prototype.ngOnInit = function () {
2598
+ this.authService.updateloggedin(false);
2599
+ this.authService.updateRole(null);
2600
+ this.storageService.clear();
2601
+ };
2602
+ LoginComponent.prototype.signup = function () {
2603
+ this.router.navigate(["signup"]);
2604
+ };
2605
+ LoginComponent.prototype.recoverAccount = function () {
2606
+ this.router.navigate(["recover-account"]);
2607
+ };
2608
+ LoginComponent.prototype.login = function () {
2609
+ var _this = this;
2610
+ if (this.user.userID == "" || this.user.password == "") {
2611
+ this.messageService.toast("Please enter your credentials");
2612
+ return;
2613
+ }
2614
+ this.logService.info("logging in");
2615
+ this.isProcessing = true;
2616
+ this.dataService.login(this.user).subscribe(function (apiResponse) {
2617
+ _this.isProcessing = false;
2618
+ if (apiResponse.message == "success") {
2619
+ if (apiResponse.ds.dtUser[0]["authType"] == 'local' && !_this.appConfig.localAuth) {
2620
+ _this.messageService.toast("Contact Admin: Authentication Type error");
2621
+ return;
2622
+ }
2623
+ if (apiResponse.ds.dtUser[0]["authType"] == 'AD' && !_this.appConfig.ADAuth) {
2624
+ _this.messageService.toast("Contact Admin: Authentication Type error");
2625
+ return;
2626
+ }
2627
+ _this.authService.updateloggedin(true);
2628
+ _this.authService.updateToken(apiResponse.ds.dtUser[0]["token"]);
2629
+ _this.storageService.store(tinCore.Constants.AUTH_TOKEN, apiResponse.ds.dtUser[0]["token"]);
2630
+ _this.authService.updateTokenExpire(apiResponse.ds.dtUser[0]["tokenExpire"]);
2631
+ _this.storageService.store(tinCore.Constants.AUTH_TOKEN_EXPIRE, apiResponse.ds.dtUser[0]["tokenExpire"]);
2632
+ _this.authService.updateCurrentUser(_this.user.userID);
2633
+ _this.storageService.store(tinCore.Constants.AUTH_USER, _this.user.userID);
2634
+ _this.authService.updateLoggedUserFullName(apiResponse.ds.dtProfile[0]["firstName"]);
2635
+ _this.storageService.store(tinCore.Constants.AUTH_NAME, apiResponse.ds.dtProfile[0]["firstName"]);
2636
+ _this.authService.updateRole(apiResponse.ds.dtRole[0]);
2637
+ _this.storageService.store(tinCore.Constants.AUTH_ROLES, JSON.stringify(apiResponse.ds.dtRole[0]));
2638
+ // this.setRole(apiResponse.dt[0]["accessLevel"]);
2639
+ // this.setRole("1");
2640
+ if (apiResponse.ds.dtUser[0]["changePassword"] == "0") {
2641
+ _this.router.navigate(["home"]);
2642
+ // this.messageService.toast("Welcome");
2643
+ _this.logService.info("logged in");
2644
+ }
2645
+ else {
2646
+ _this.router.navigate(["home/user/change-password"]);
2647
+ }
2648
+ }
2649
+ else {
2650
+ _this.messageService.toast("Error: " + apiResponse.message);
2651
+ _this.user.password = "";
2652
+ }
2653
+ }, function (error) {
2654
+ _this.isProcessing = false;
2655
+ _this.messageService.toast(_this.httpService.Error(error));
2656
+ });
2657
+ };
2658
+ LoginComponent.prototype.setRole = function (roleID) {
2659
+ var _this = this;
2660
+ this.dataService
2661
+ .GetRole("id", roleID)
2662
+ .subscribe(function (apiResponse) {
2663
+ _this.authService.updateRole(apiResponse.dt[0]);
2664
+ _this.storageService.store(tinCore.Constants.AUTH_ROLES, JSON.stringify(apiResponse.dt[0]));
2665
+ });
2666
+ };
2667
+ LoginComponent.ctorParameters = function () { return [
2668
+ { type: tinCore.HttpService },
2669
+ { type: StorageService },
2670
+ { type: router.Router },
2671
+ { type: MessageService },
2672
+ { type: DataService },
2673
+ { type: AuthService },
2674
+ { type: LogService }
2675
+ ]; };
2676
+ __decorate([
2677
+ core.Input()
2678
+ ], LoginComponent.prototype, "config", void 0);
2679
+ __decorate([
2680
+ core.Input()
2681
+ ], LoginComponent.prototype, "appConfig", void 0);
2682
+ LoginComponent = __decorate([
2683
+ core.Component({
2684
+ selector: "spa-login",
2685
+ template: "\r\n <div class=\"tin-bg-login login-page\">\r\n\r\n\r\n <div *ngIf=\"config.logo!=''\" class=\"d-flex justify-content-center row align-items-center\" style=\"margin-top:3em;margin-bottom:1em\">\r\n\r\n <img *ngIf=\"config.logoSize=='normal'\" [src]=\"config.logo\" style=\"height:100px;margin-right:3em;margin-left:3em\" />\r\n <img *ngIf=\"config.logoSize=='medium'\" [src]=\"config.logo\" style=\"height:150px;margin-right:3em;margin-left:3em\" />\r\n <img *ngIf=\"config.logoSize=='large'\" [src]=\"config.logo\" style=\"height:250px;margin-right:3em;margin-left:3em\" />\r\n\r\n </div>\r\n\r\n\r\n <div *ngIf=\"config.logo ==''\" style=\"margin-top:2em\">\r\n <!-- Add margin top when there is no logo -->\r\n </div>\r\n\r\n\r\n <div class=\"d-flex justify-content-center row align-items-center\" style=\"margin-top:3em\">\r\n\r\n\r\n <div class=\"d-none d-sm-block\">\r\n\r\n </div>\r\n\r\n <div style=\"margin-left:1em\">\r\n\r\n\r\n\r\n <mat-card class=\"mat-elevation-z3\" style=\"width:400px; \">\r\n\r\n <mat-card-header>\r\n <mat-card-title>{{config.appName}}</mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n\r\n <div class=\"tin-input mt-2\">\r\n\r\n <mat-form-field style=\"width: 100%;\">\r\n <mat-label>Username</mat-label>\r\n <input id=\"txtUserID\" matInput #parentInput placeholder=\"Enter Username\" [(ngModel)]=\"user.userID\" autocomplete=\"off\" autofocus>\r\n </mat-form-field>\r\n\r\n <mat-form-field >\r\n <mat-label>Password</mat-label>\r\n <input id=\"txtPassword\" matInput [type]=\"hide ? 'password' : 'text'\" (keyup.enter)=\"login()\" [(ngModel)]=\"user.password\" autocomplete=\"off\" >\r\n <button mat-icon-button matSuffix (click)=\"hide = !hide\" [attr.aria-label]=\"'Hide password'\" [attr.aria-pressed]=\"hide\">\r\n <mat-icon style=\"font-size: 18px;\">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <div class=\"row \">\r\n\r\n <div class=\"col d-flex justify-content-center\">\r\n\r\n <button id=\"btnLogin\" mat-raised-button [disabled]=\"isProcessing\" style=\"width: 100px;\" (click)=\"login()\" color=\"primary\">Login</button>\r\n </div>\r\n\r\n <div class=\"col d-flex justify-content-center\" *ngIf=\"config.selfService\">\r\n <button id=\"btnSignup\" mat-stroked-button color=\"primary\" style=\"width: 100px;\" (click)=\"signup()\">Signup</button>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n <div *ngIf=\"config.selfService\">\r\n <br />\r\n <a mat-button id=\"lnkRecover\" style=\"margin-left: 1em\" (click)=\"recoverAccount()\">Forgot your password ?</a>\r\n </div>\r\n\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n",
2686
+ styles: [".login-page{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto}.tin-bg-login{background-image:url(~/assets/login-bg.jpg);background-size:100%}"]
2687
+ })
2688
+ ], LoginComponent);
2689
+ return LoginComponent;
2690
+ }());
2691
+
2692
+ var SignupComponent = /** @class */ (function () {
2693
+ function SignupComponent(httpService, messageService, dataService, authService) {
2694
+ this.httpService = httpService;
2695
+ this.messageService = messageService;
2696
+ this.dataService = dataService;
2697
+ this.authService = authService;
2698
+ this.isProcessing = false;
2699
+ this.user = new User();
2700
+ this.profile = new Profile();
2701
+ this.account = new Account();
2702
+ }
2703
+ SignupComponent.prototype.ngOnInit = function () {
2704
+ this.account.user = this.user;
2705
+ this.account.profile = this.profile;
2706
+ };
2707
+ SignupComponent.prototype.create = function () {
2708
+ var _this = this;
2709
+ this.profile.userID = this.user.userID;
2710
+ this.isProcessing = true;
2711
+ this.dataService.UpdateAccount(this.account, "add").subscribe(function (apiResponse) {
2712
+ _this.isProcessing = false;
2713
+ if (apiResponse.message == "success") {
2714
+ _this.messageService.toast("Account Created");
2715
+ _this.user = new User();
2716
+ _this.profile = new Profile();
2717
+ }
2718
+ else {
2719
+ _this.messageService.toast("Error: " + apiResponse.message);
2720
+ }
2721
+ }, function (error) {
2722
+ _this.isProcessing = false;
2723
+ _this.messageService.toast(_this.httpService.Error(error));
2724
+ });
2725
+ };
2726
+ SignupComponent.ctorParameters = function () { return [
2727
+ { type: tinCore.HttpService },
2728
+ { type: MessageService },
2729
+ { type: DataService },
2730
+ { type: AuthService }
2731
+ ]; };
2732
+ SignupComponent = __decorate([
2733
+ core.Component({
2734
+ selector: 'spa-signup',
2735
+ template: "\r\n<h4 style=\"margin-top: 1em;\">Signup</h4>\r\n\r\n<hr/>\r\nComplete the form below.\r\n\r\n<div class=\"d-flex justify-content-center row align-items-center\">\r\n\r\n <div class=\"tin-input\" style=\"font-size:14px; width: 50%;\">\r\n\r\n\r\n <div class=\"tin-input-row\">\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>FirstName</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"account.profile.firstName\" placeholder=\"Enter FirstName\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>LastName</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"profile.lastName\" placeholder=\"Enter LastName\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class=\"tin-input-row mt-3\">\r\n\r\n <div class=\"col-6\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>UserID</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"user.userID\" placeholder=\"Enter UserID\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class=\"tin-input-row\">\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>Password</mat-label>\r\n <input matInput autocomplete=\"off\" type=\"password\" [(ngModel)]=\"user.password\" placeholder=\"Enter Password\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>Confirm Password</mat-label>\r\n <input matInput autocomplete=\"off\" type=\"password\" [(ngModel)]=\"confirmPassword\" placeholder=\"Enter Confirm Password\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n <div class=\"tin-input-row mt-3\">\r\n <button mat-raised-button color=\"primary\" (click)=\"create()\" cdkFocusInitial>Create</button>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n</div>\r\n\r\n",
2736
+ styles: [""]
2737
+ })
2738
+ ], SignupComponent);
2739
+ return SignupComponent;
2740
+ }());
2741
+
2742
+ var RecoverAccountComponent = /** @class */ (function () {
2743
+ function RecoverAccountComponent(location, dataService, authService, messageService) {
2744
+ this.location = location;
2745
+ this.dataService = dataService;
2746
+ this.authService = authService;
2747
+ this.messageService = messageService;
2748
+ this.userID = "";
2749
+ }
2750
+ RecoverAccountComponent.prototype.ngOnInit = function () {
2751
+ };
2752
+ RecoverAccountComponent.prototype.recover = function () {
2753
+ var _this = this;
2754
+ if (this.userID == "") {
2755
+ this.messageService.toast("Please enter your userID");
2756
+ return;
2757
+ }
2758
+ else {
2759
+ var u = new User();
2760
+ u.userID = this.userID;
2761
+ this.dataService.SelfReset(u).subscribe(function (apiResponse) {
2762
+ if (apiResponse.message == "success") {
2763
+ _this.messageService.toast("The password has been sent to your email");
2764
+ _this.location.back();
2765
+ }
2766
+ else {
2767
+ _this.messageService.toast("Error: " + apiResponse.message);
2768
+ }
2769
+ });
2770
+ }
2771
+ };
2772
+ RecoverAccountComponent.ctorParameters = function () { return [
2773
+ { type: common.Location },
2774
+ { type: DataService },
2775
+ { type: AuthService },
2776
+ { type: MessageService }
2777
+ ]; };
2778
+ RecoverAccountComponent = __decorate([
2779
+ core.Component({
2780
+ selector: 'spa-recover-account',
2781
+ template: "<h4 style=\"margin-top: 1em;\">Recover Account</h4>\r\n\r\n<hr/>\r\nSubmit your UserID and we will send you details to your registered email address.\r\n\r\n<div class=\"mt-3\" >\r\n\r\n\r\n <div class=\"tin-input \" style=\"font-size:14px;\">\r\n\r\n\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>UserID</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"userID\" placeholder=\"Enter UserID\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"col mt-3\">\r\n\r\n <button mat-raised-button color=\"primary\" (click)=\"recover()\" cdkFocusInitial>Submit</button>\r\n </div>\r\n\r\n </div>\r\n\r\n</div>\r\n",
2782
+ styles: [""]
2783
+ })
2784
+ ], RecoverAccountComponent);
2785
+ return RecoverAccountComponent;
2786
+ }());
2787
+
2788
+ var SpaIndexModule = /** @class */ (function () {
2789
+ function SpaIndexModule() {
2790
+ }
2791
+ SpaIndexModule = __decorate([
2792
+ core.NgModule({
2793
+ declarations: [LoginComponent, SignupComponent, RecoverAccountComponent],
2794
+ entryComponents: [],
2795
+ imports: [
2796
+ forms.ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: "never" }),
2797
+ common.CommonModule,
2798
+ forms.FormsModule,
2799
+ forms.ReactiveFormsModule,
2800
+ SpaMatModule,
2801
+ ],
2802
+ exports: [
2803
+ common.CommonModule,
2804
+ forms.FormsModule,
2805
+ SpaMatModule,
2806
+ LoginComponent,
2807
+ SignupComponent,
2808
+ RecoverAccountComponent,
2809
+ ],
2810
+ })
2811
+ ], SpaIndexModule);
2812
+ return SpaIndexModule;
2813
+ }());
2814
+
2815
+ var ChangePasswordComponent = /** @class */ (function () {
2816
+ function ChangePasswordComponent(location, httpService, messageService, dataService, authService) {
2817
+ this.location = location;
2818
+ this.httpService = httpService;
2819
+ this.messageService = messageService;
2820
+ this.dataService = dataService;
2821
+ this.authService = authService;
2822
+ this.isProcessing = false;
2823
+ this.changePassword = new ChangeUserPassword();
2824
+ }
2825
+ ChangePasswordComponent.prototype.ngOnInit = function () {
2826
+ this.myRole = this.authService.currentRoleSource.value;
2827
+ if (this.dataService.tmpProfileUserID == "") {
2828
+ this.changePassword.userID = this.authService.currentUser;
2829
+ }
2830
+ else {
2831
+ this.changePassword.userID = this.dataService.tmpProfileUserID;
2832
+ this.dataService.tmpProfileUserID = "";
2833
+ }
2834
+ // console.log(this.myRole)
2835
+ };
2836
+ ChangePasswordComponent.prototype.change = function () {
2837
+ var _this = this;
2838
+ if (!this.myRole[this.dataService.capUsers.name]) {
2839
+ if (this.changePassword.currentPassword == "") {
2840
+ this.messageService.toast("Please enter current Password");
2841
+ return;
2842
+ }
2843
+ }
2844
+ if (this.changePassword.newPassword == "") {
2845
+ this.messageService.toast("Please enter new Password");
2846
+ return;
2847
+ }
2848
+ if (this.changePassword.confirmPassword == "") {
2849
+ this.messageService.toast("Please confirm new Password");
2850
+ return;
2851
+ }
2852
+ if (this.changePassword.confirmPassword != this.changePassword.newPassword) {
2853
+ this.messageService.toast("Passwords do not match");
2854
+ return;
2855
+ }
2856
+ this.isProcessing = true;
2857
+ if (this.myRole[this.dataService.capUsers.name]) {
2858
+ this.dataService.changePasswordAdmin(this.changePassword).subscribe(function (apiResponse) {
2859
+ _this.isProcessing = false;
2860
+ if (apiResponse.message == "success") {
2861
+ _this.messageService.toast("Password Changed");
2862
+ _this.location.back();
2863
+ }
2864
+ else {
2865
+ _this.messageService.toast("Error: " + apiResponse.message);
2866
+ }
2867
+ });
2868
+ }
2869
+ else {
2870
+ this.dataService.changePassword(this.changePassword).subscribe(function (apiResponse) {
2871
+ _this.isProcessing = false;
2872
+ if (apiResponse.message == "success") {
2873
+ _this.messageService.toast("Password Changed");
2874
+ _this.location.back();
2875
+ }
2876
+ else {
2877
+ _this.messageService.toast("Error: " + apiResponse.message);
2878
+ }
2879
+ });
2880
+ }
2881
+ };
2882
+ ChangePasswordComponent.ctorParameters = function () { return [
2883
+ { type: common.Location },
2884
+ { type: tinCore.HttpService },
2885
+ { type: MessageService },
2886
+ { type: DataService },
2887
+ { type: AuthService }
2888
+ ]; };
2889
+ ChangePasswordComponent = __decorate([
2890
+ core.Component({
2891
+ selector: 'spa-change-password',
2892
+ template: "<h4>Change Password</h4>\r\n<hr>\r\n\r\n<div class=\"container\">\r\n\r\n <div class=\"d-flex justify-content-center row align-items-center\" >\r\n\r\n <div class=\"col\">\r\n\r\n <div class=\"tin-input \" style=\"font-size:14px;\">\r\n\r\n <div class=\"col\" *ngIf=\"changePassword.userID!=''\">\r\n\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>User ID</mat-label>\r\n <input id=\"txtUserID\" matInput autocomplete=\"off\" [(ngModel)]=\"changePassword.userID\" readonly/>\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class=\"col\" *ngIf=\"!myRole[dataService.capUsers.name]\">\r\n\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>Current Password</mat-label>\r\n <input id=\"txtPassword\" matInput autocomplete=\"off\" type=\"password\" [(ngModel)]=\"changePassword.currentPassword\" placeholder=\"Enter Current Password\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>New Password</mat-label>\r\n <input id=\"txtNewPassword\" matInput autocomplete=\"off\" type=\"password\" [(ngModel)]=\"changePassword.newPassword\" placeholder=\"Enter New Password\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>Confirm Password</mat-label>\r\n <input id=\"txtConfirmPassword\" matInput autocomplete=\"off\" type=\"password\" [(ngModel)]=\"changePassword.confirmPassword\" placeholder=\"Enter Confirm Password\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class=\"col mt-3\">\r\n\r\n <button id=\"btnChange\" mat-raised-button color=\"primary\" (click)=\"change()\" cdkFocusInitial>Change</button>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"col\">\r\n\r\n <div class=\"alert alert-info\" style=\"font-size: 14px;\" role=\"alert\">\r\n *Please consider these requirements for your new password. <br><br>\r\n\r\n At least 8 characters<br>\r\n At least 1 uppercase letter (A-Z)<br>\r\n At least 2 lowercase letters (a-z)<br>\r\n At least 1 digit (0-9)<br>\r\n At least 1 special character (~`! \u2026)<br>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n</div>\r\n\r\n",
2893
+ styles: [""]
2894
+ })
2895
+ ], ChangePasswordComponent);
2896
+ return ChangePasswordComponent;
2897
+ }());
2898
+
2899
+ var ProfileComponent = /** @class */ (function () {
2900
+ function ProfileComponent(dataService, messageService, httpService, router, authService) {
2901
+ this.dataService = dataService;
2902
+ this.messageService = messageService;
2903
+ this.httpService = httpService;
2904
+ this.router = router;
2905
+ this.authService = authService;
2906
+ this.appConfig = new AppConfig();
2907
+ this.selfProfile = false;
2908
+ this.profile = new Profile();
2909
+ }
2910
+ ProfileComponent.prototype.ngOnInit = function () {
2911
+ this.myRole = this.authService.currentRoleSource.value;
2912
+ // this.loadRoles();
2913
+ if (this.dataService.tmpProfileUserID == "") {
2914
+ this.loadProfile(this.authService.currentUser);
2915
+ }
2916
+ else {
2917
+ this.loadProfile(this.dataService.tmpProfileUserID);
2918
+ this.dataService.tmpProfileUserID = "";
2919
+ }
2920
+ // console.log(this.myRole);
2921
+ };
2922
+ ProfileComponent.prototype.loadProfile = function (userID) {
2923
+ var _this = this;
2924
+ var action = "all";
2925
+ if (this.appConfig.approvals && this.appConfig.employees) {
2926
+ action = "set";
2927
+ }
2928
+ if (this.appConfig.approvals && !this.appConfig.employees) {
2929
+ action = "setapp";
2930
+ }
2931
+ if (!this.appConfig.approvals && this.appConfig.employees) {
2932
+ action = "setemp";
2933
+ }
2934
+ this.dataService.GetProfile(action, userID).subscribe(function (apiResponse) {
2935
+ _this.profile = apiResponse.ds.dtProfiles[0];
2936
+ if (_this.profile.userID.toLocaleLowerCase() == _this.authService.currentUser.toLocaleLowerCase()) {
2937
+ _this.selfProfile = true;
2938
+ }
2939
+ //get more details
2940
+ _this.roles = apiResponse.ds.dtRoles;
2941
+ _this.approvalRoles = apiResponse.ds.dtApprovalRoles;
2942
+ _this.employees = apiResponse.ds.dtEmployees;
2943
+ }, function (error) {
2944
+ _this.isProcessing = false;
2945
+ _this.messageService.toast(_this.httpService.Error(error));
2946
+ });
2947
+ };
2948
+ ProfileComponent.prototype.loadRoles = function () {
2949
+ var _this = this;
2950
+ this.dataService.GetRole("all", "").subscribe(function (apiResponse) {
2951
+ _this.roles = apiResponse.dt;
2952
+ }, function (error) {
2953
+ _this.isProcessing = false;
2954
+ _this.messageService.toast(_this.httpService.Error(error));
2955
+ });
2956
+ };
2957
+ ProfileComponent.prototype.changePassword = function () {
2958
+ this.dataService.tmpProfileUserID = this.profile.userID;
2959
+ this.router.navigate(["home/user/change-password"]);
2960
+ };
2961
+ ProfileComponent.prototype.gotoUsers = function () {
2962
+ this.router.navigate(["home/admin/users"]);
2963
+ };
2964
+ ProfileComponent.prototype.update = function () {
2965
+ };
2966
+ ProfileComponent.prototype.updateProfile = function () {
2967
+ var _this = this;
2968
+ this.isProcessing = true;
2969
+ this.dataService.UpdateProfile(this.profile, "edit").subscribe(function (apiResponse) {
2970
+ _this.isProcessing = false;
2971
+ if (apiResponse.message == "success") {
2972
+ _this.messageService.toast("Profile Updated");
2973
+ }
2974
+ else {
2975
+ _this.messageService.toast("Error: " + apiResponse.message);
2976
+ }
2977
+ }, function (error) {
2978
+ _this.messageService.toast("Connection failed ");
2979
+ _this.isProcessing = false;
2980
+ });
2981
+ };
2982
+ ProfileComponent.ctorParameters = function () { return [
2983
+ { type: DataService },
2984
+ { type: MessageService },
2985
+ { type: tinCore.HttpService },
2986
+ { type: router.Router },
2987
+ { type: AuthService }
2988
+ ]; };
2989
+ __decorate([
2990
+ core.Input()
2991
+ ], ProfileComponent.prototype, "appConfig", void 0);
2992
+ ProfileComponent = __decorate([
2993
+ core.Component({
2994
+ selector: 'spa-profile',
2995
+ template: "\r\n\r\n<div class=\"container\">\r\n\r\n <div class=\"row mt-3\" style=\"font-size:14px;\">\r\n\r\n\r\n <div class=\"col-2 mt-3 \">\r\n\r\n <div class=\"tin-input\">\r\n\r\n\r\n <div class=\"col\">\r\n <mat-icon style=\"font-size: 70px;\">account_circle</mat-icon>\r\n <!-- <img style=\"height: 40px\"> -->\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-label id=\"lblUserID\" style=\"font-size: 14px;\">{{profile.userID}}</mat-label>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n <div class=\"col-8 mt-3\">\r\n\r\n <div class=\"tin-input\" style=\"width: 70%;\">\r\n\r\n <div class=\"tin-input-row\">\r\n\r\n\r\n <div class=\"col\">\r\n <mat-form-field style=\"width:200px\">\r\n <mat-label>FirstName</mat-label>\r\n <input id=\"txtFirstName\" matInput autocomplete=\"off\" [(ngModel)]=\"profile.firstName\" placeholder=\"Enter FirstName\" [readOnly]=\"selfProfile\"/>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field style=\"width:200px\">\r\n <mat-label>LastName</mat-label>\r\n <input id=\"txtLastName\" matInput autocomplete=\"off\" [(ngModel)]=\"profile.lastName\" placeholder=\"Enter LastName \" [readOnly]=\"selfProfile\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>Authentication</mat-label>\r\n <input id=\"txtAuth\" matInput autocomplete=\"off\" [(ngModel)]=\"profile.authType\" placeholder=\"Authentication\" readonly/>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>Email</mat-label>\r\n <input id=\"txtEmail\" matInput autocomplete=\"off\" [(ngModel)]=\"profile.email\" placeholder=\"Enter Email\" [readOnly]=\"selfProfile\"/>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>Role</mat-label>\r\n <mat-select id=\"cboRole\" [(value)]=\"profile.roleID\" [disabled]=\"selfProfile\">\r\n <mat-option *ngFor=\"let row of roles\" [value]=\"row.roleID\">\r\n {{row.roleName}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\" *ngIf=\"appConfig.approvals\">\r\n\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>Approval Role</mat-label>\r\n <mat-select id=\"cboApprovalRole\" [(value)]=\"profile.arID\" [disabled]=\"selfProfile\">\r\n <mat-option *ngFor=\"let row of approvalRoles\" [value]=\"row.arID\">\r\n {{row.arName}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class=\"col\" *ngIf=\"appConfig.employees\">\r\n\r\n <mat-form-field style=\"width:300px\">\r\n <mat-label>Employee Profile</mat-label>\r\n <mat-select id=\"cboEmployee\" [(value)]=\"profile.empID\" [disabled]=\"selfProfile\">\r\n <mat-option *ngFor=\"let row of employees\" [value]=\"row.empID\">\r\n {{row.firstName}} {{row.lastName}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"tin-input-row mt-2\">\r\n <button id=\"btnUpdate\" mat-raised-button color=\"primary\" *ngIf=\"!selfProfile\" [disabled]=\"isProcessing\" (click)=\"updateProfile()\" >Update Profile</button>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class=\"col-2 mt-4\">\r\n\r\n <a mat-button id=\"lnkUserManager\" style=\"margin-left: 1em\" *ngIf=\"!selfProfile\" (click)=\"gotoUsers()\" >User Manager</a>\r\n <a mat-button id=\"lnkChangePassword\" style=\"margin-left: 1em\" *ngIf=\"(selfProfile || myRole[dataService.capUsers.name]) && profile.authType=='local'\" (click)=\"changePassword()\" >Change Password</a>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n\r\n\r\n",
2996
+ styles: [""]
2997
+ })
2998
+ ], ProfileComponent);
2999
+ return ProfileComponent;
3000
+ }());
3001
+
3002
+ var SpaUserModule = /** @class */ (function () {
3003
+ function SpaUserModule() {
3004
+ }
3005
+ SpaUserModule = __decorate([
3006
+ core.NgModule({
3007
+ declarations: [ChangePasswordComponent, ProfileComponent],
3008
+ entryComponents: [],
3009
+ imports: [
3010
+ forms.ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: "never" }),
3011
+ common.CommonModule,
3012
+ forms.FormsModule,
3013
+ forms.ReactiveFormsModule,
3014
+ SpaMatModule,
3015
+ ],
3016
+ exports: [
3017
+ common.CommonModule,
3018
+ forms.FormsModule,
3019
+ SpaMatModule,
3020
+ ChangePasswordComponent,
3021
+ ProfileComponent,
3022
+ ],
3023
+ })
3024
+ ], SpaUserModule);
3025
+ return SpaUserModule;
3026
+ }());
3027
+
3028
+ var SettingsComponent = /** @class */ (function () {
3029
+ function SettingsComponent(dataService, messageService) {
3030
+ this.dataService = dataService;
3031
+ this.messageService = messageService;
3032
+ this._filterText = "";
3033
+ this.isProcessing = false;
3034
+ }
3035
+ SettingsComponent.prototype.ngOnInit = function () {
3036
+ this.loadSettings();
3037
+ };
3038
+ SettingsComponent.prototype.applyFilter = function (filterValue) {
3039
+ this.settings.filter = filterValue.trim().toLowerCase();
3040
+ };
3041
+ SettingsComponent.prototype.loadSettings = function () {
3042
+ var _this = this;
3043
+ this.dataService.GetSetting("all", "").subscribe(function (apiResponse) {
3044
+ _this.settings = apiResponse.dt;
3045
+ // this.applyFilter(this._filterText);
3046
+ });
3047
+ };
3048
+ SettingsComponent.prototype.updateSetting = function (setting) {
3049
+ var _this = this;
3050
+ this.isProcessing = true;
3051
+ this.dataService.UpdateSetting(setting, "edit").subscribe(function (apiResponse) {
3052
+ _this.isProcessing = false;
3053
+ if (apiResponse.message == "success") {
3054
+ _this.messageService.toast("Setting " + setting.sName + " Updated");
3055
+ _this.loadSettings();
3056
+ }
3057
+ else {
3058
+ _this.messageService.toast("Error: " + apiResponse.message);
3059
+ }
3060
+ });
3061
+ };
3062
+ ;
3063
+ SettingsComponent.prototype.addSetting = function () {
3064
+ // const dialogRef = this.dialog.open(addRoleDialog, {
3065
+ // width: "1100px",
3066
+ // data: "",
3067
+ // });
3068
+ // dialogRef.afterClosed().subscribe((result) => {
3069
+ // if (result == "success") {
3070
+ // this.loadRoles();
3071
+ // }
3072
+ // });
3073
+ this.messageService.toast("Feature not Available");
3074
+ };
3075
+ SettingsComponent.ctorParameters = function () { return [
3076
+ { type: DataService },
3077
+ { type: MessageService }
3078
+ ]; };
3079
+ SettingsComponent = __decorate([
3080
+ core.Component({
3081
+ selector: 'spa-settings',
3082
+ template: "<h4>Settings</h4>\r\n<hr>\r\n\r\n<div class=\"container\">\r\n\r\n\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px;padding-left:10px\">\r\n <div class=\"col-2\">\r\n <button mat-raised-button (click)=\"addSetting()\">New Setting</button>\r\n </div>\r\n <div class=\"col-2\">\r\n\r\n <button mat-raised-button (click)=\"loadSettings()\">Refresh</button>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"row mt-1 mb-1\" style=\"margin-left:10px\" *ngFor=\"let setting of settings\">\r\n\r\n <mat-form-field style=\"width: 500px; font-size: 14px;\">\r\n <mat-label>{{setting.sName}}</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"setting.sValue\" >\r\n </mat-form-field>\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"updateSetting(setting)\" style=\"margin-right:150px;\"><mat-icon>done_all</mat-icon></button>\r\n\r\n <mat-label style=\"font-size: small;\">Last Updated by {{setting.updatedBy}} on {{setting.dateUpdated | date: 'dd MMM yy HH:mm'}}</mat-label>\r\n\r\n </div>\r\n\r\n\r\n</div>\r\n\r\n",
3083
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}"]
3084
+ })
3085
+ ], SettingsComponent);
3086
+ return SettingsComponent;
3087
+ }());
3088
+
3089
+ var LogsComponent = /** @class */ (function () {
3090
+ function LogsComponent(authService, dataService) {
3091
+ this.authService = authService;
3092
+ this.dataService = dataService;
3093
+ this.isProcessing = false;
3094
+ this._filterText = "";
3095
+ this.displayedColumns = ["dateLogged", "userID", "fullName", "source", "details"];
3096
+ }
3097
+ LogsComponent.prototype.ngOnInit = function () {
3098
+ this.loadLogs();
3099
+ };
3100
+ LogsComponent.prototype.loadLogs = function () {
3101
+ var _this = this;
3102
+ this.dataService.GetLog("all", "").subscribe(function (apiResponse) {
3103
+ _this.logs = new table.MatTableDataSource(apiResponse.dt);
3104
+ _this.logs.paginator = _this.logsPaginator;
3105
+ _this.applyFilter(_this._filterText);
3106
+ });
3107
+ };
3108
+ LogsComponent.prototype.applyFilter = function (filterValue) {
3109
+ this.logs.filter = filterValue.trim().toLowerCase();
3110
+ };
3111
+ LogsComponent.ctorParameters = function () { return [
3112
+ { type: AuthService },
3113
+ { type: DataService }
3114
+ ]; };
3115
+ __decorate([
3116
+ core.ViewChild("logsPaginator")
3117
+ ], LogsComponent.prototype, "logsPaginator", void 0);
3118
+ LogsComponent = __decorate([
3119
+ core.Component({
3120
+ selector: 'spa-logs',
3121
+ template: "<h4>Logs</h4>\r\n<hr />\r\n\r\n<div class=\"container-fluid\">\r\n\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px\">\r\n <div class=\"col-2\">\r\n\r\n <!-- <mat-form-field>\r\n <input matInput [(ngModel)]=\"_filterText\" (keyup)=\"applyFilter($event.target.value) \" placeholder=\"Filter\" autocomplete=\"off\">\r\n </mat-form-field> -->\r\n\r\n </div>\r\n <div class=\"col-3\">\r\n <mat-form-field style=\"font-size:12px\">\r\n <mat-label>Filter</mat-label>\r\n <input id=\"txtFilter\" matInput [(ngModel)]=\"_filterText\" (keyup)=\"applyFilter($event.target.value)\" placeholder=\"Enter Filter text\" autocomplete=\"off\">\r\n </mat-form-field>\r\n <button id=\"btnFilter\" mat-mini-fab color=\"primary\" (click)=\"loadLogs()\" style=\"margin-right:3em;margin-top:5px\"><mat-icon class=\"refreshIcon\">refresh</mat-icon></button>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <p *ngIf=\"!logs\"><em>Loading...</em></p>\r\n\r\n\r\n <div class=\"mat-elevation-z8\" *ngIf=\"logs\">\r\n\r\n <table id=\"tblTable\" mat-table [dataSource]=\"logs\">\r\n\r\n\r\n <ng-container matColumnDef=\"userID\">\r\n <th mat-header-cell *matHeaderCellDef> User ID </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.userID}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"dateLogged\">\r\n <th mat-header-cell *matHeaderCellDef class=\"datetime\"> Date Logged </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.dateLogged | date: 'dd MMM yy HH:mm:ss'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"source\">\r\n <th mat-header-cell *matHeaderCellDef> Source </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.source}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"details\">\r\n <th mat-header-cell *matHeaderCellDef> Details </th>\r\n <td mat-cell *matCellDef=\"let log\"> {{log.details}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"fullName\">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.firstName}} {{user.lastName}} </td>\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #logsPaginator [pageSizeOptions]=\"[50, 100, 200]\" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n",
3122
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]
3123
+ })
3124
+ ], LogsComponent);
3125
+ return LogsComponent;
3126
+ }());
3127
+
3128
+ var UsersComponent = /** @class */ (function () {
3129
+ function UsersComponent(httpService, router, authService, dataService, dialog, messageService) {
3130
+ this.httpService = httpService;
3131
+ this.router = router;
3132
+ this.authService = authService;
3133
+ this.dataService = dataService;
3134
+ this.dialog = dialog;
3135
+ this.messageService = messageService;
3136
+ this.isProcessing = false;
3137
+ this._filterText = "";
3138
+ // public myResponse;
3139
+ this.displayedColumns = ["userID", "fullName", "roleName", "locked", "dateCreated", "Action"];
3140
+ }
3141
+ UsersComponent.prototype.ngOnInit = function () {
3142
+ this.UpdateData();
3143
+ };
3144
+ UsersComponent.prototype.UpdateData = function () {
3145
+ var _this = this;
3146
+ this.dataService.GetUser("all", "").subscribe(function (apiResponse) {
3147
+ //this.myData = apiResponse;
3148
+ _this.users = new table.MatTableDataSource(apiResponse.dt);
3149
+ _this.users.paginator = _this.usersPaginator;
3150
+ _this.applyFilter(_this._filterText);
3151
+ }, function (error) {
3152
+ _this.isProcessing = false;
3153
+ _this.messageService.toast(_this.httpService.Error(error));
3154
+ });
3155
+ };
3156
+ UsersComponent.prototype.applyFilter = function (filterValue) {
3157
+ this.users.filter = filterValue.trim().toLowerCase();
3158
+ };
3159
+ UsersComponent.prototype.createAccount = function () {
3160
+ this.router.navigate(["home/admin/create-account"]);
3161
+ };
3162
+ UsersComponent.prototype.viewProfile = function (user) {
3163
+ this.dataService.tmpProfileUserID = user.userID;
3164
+ this.router.navigate(["home/user/profile"]);
3165
+ };
3166
+ UsersComponent.prototype.lock = function (u) {
3167
+ u.locked = "1";
3168
+ this.updateUser(u);
3169
+ };
3170
+ UsersComponent.prototype.unlock = function (u) {
3171
+ u.locked = "0";
3172
+ u.tries = "0";
3173
+ this.updateUser(u);
3174
+ };
3175
+ UsersComponent.prototype.enable = function (u) {
3176
+ u.disabled = "0";
3177
+ this.updateUser(u);
3178
+ };
3179
+ UsersComponent.prototype.disable = function (u) {
3180
+ u.disabled = "1";
3181
+ this.updateUser(u);
3182
+ };
3183
+ UsersComponent.prototype.recover = function (u) {
3184
+ var _this = this;
3185
+ this.dataService.SelfReset(u).subscribe(function (apiResponse) {
3186
+ if (apiResponse.message == "success") {
3187
+ _this.messageService.toast("The password has been sent on email");
3188
+ }
3189
+ else {
3190
+ _this.messageService.toast("Error: " + apiResponse.message);
3191
+ }
3192
+ });
3193
+ };
3194
+ UsersComponent.prototype.updateUser = function (user) {
3195
+ var _this = this;
3196
+ this.isProcessing = true;
3197
+ this.dataService.UpdateUser(user, "edit").subscribe(function (apiResponse) {
3198
+ _this.isProcessing = false;
3199
+ if (apiResponse.message == "success") {
3200
+ _this.messageService.toast("User Updated");
3201
+ _this.UpdateData();
3202
+ }
3203
+ else {
3204
+ _this.messageService.toast("Error: " + apiResponse.message);
3205
+ }
3206
+ }, function (error) {
3207
+ _this.messageService.toast("Connection failed ");
3208
+ _this.isProcessing = false;
3209
+ });
3210
+ };
3211
+ UsersComponent.prototype.deleteUser = function (user) {
3212
+ var _this = this;
3213
+ this.messageService.confirm("Delete " + user.userID + " ?").subscribe(function (result) {
3214
+ if (result == "yes") {
3215
+ _this.isProcessing = true;
3216
+ _this.dataService.UpdateUser(user, "delete").subscribe(function (apiResponse) {
3217
+ _this.isProcessing = false;
3218
+ if (apiResponse.message == "success") {
3219
+ _this.messageService.toast("User Deleted");
3220
+ _this.UpdateData();
3221
+ }
3222
+ else {
3223
+ _this.messageService.toast("Error: " + apiResponse.message);
3224
+ }
3225
+ }, function (error) {
3226
+ _this.messageService.toast("Connection failed ");
3227
+ _this.isProcessing = false;
3228
+ });
3229
+ }
3230
+ });
3231
+ };
3232
+ UsersComponent.ctorParameters = function () { return [
3233
+ { type: tinCore.HttpService },
3234
+ { type: router.Router },
3235
+ { type: AuthService },
3236
+ { type: DataService },
3237
+ { type: dialog.MatDialog },
3238
+ { type: MessageService }
3239
+ ]; };
3240
+ __decorate([
3241
+ core.ViewChild("usersPaginator")
3242
+ ], UsersComponent.prototype, "usersPaginator", void 0);
3243
+ UsersComponent = __decorate([
3244
+ core.Component({
3245
+ selector: "spa-users",
3246
+ template: "\r\n<h4>Users</h4>\r\n<hr />\r\n\r\n<div class=\"container\">\r\n\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px\">\r\n <div class=\"col-2\">\r\n <button id=\"btnCreateAccount\" mat-raised-button color=\"primary\" (click)=\"createAccount()\">Create Account</button>\r\n\r\n\r\n </div>\r\n <div class=\"col-3\">\r\n <mat-form-field style=\"font-size:12px\">\r\n <mat-label>Filter</mat-label>\r\n <input id=\"txtFilter\" matInput [(ngModel)]=\"_filterText\" (keyup)=\"applyFilter($event.target.value)\" placeholder=\"Enter Filter text\" autocomplete=\"off\">\r\n </mat-form-field>\r\n <button id=\"btnFilter\" mat-mini-fab color=\"primary\" (click)=\"UpdateData()\" style=\"margin-right:3em;margin-top:5px\" matTooltip=\"refresh data\" matTooltipPosition=\"right\"><mat-icon class=\"refreshIcon\">refresh</mat-icon></button>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <p *ngIf=\"!users\"><em>Loading...</em></p>\r\n\r\n\r\n <div class=\"mat-elevation-z8\" *ngIf=\"users\">\r\n\r\n <table id=\"tblTable\" mat-table [dataSource]=\"users\">\r\n\r\n <ng-container matColumnDef=\"userID\">\r\n <th mat-header-cell *matHeaderCellDef> UserID </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.userID}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"locked\">\r\n <th mat-header-cell *matHeaderCellDef> Locked </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.locked}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"fullName\">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.firstName}} {{user.lastName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"roleName\">\r\n <th mat-header-cell *matHeaderCellDef> Role </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.roleName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"disabled\">\r\n <th mat-header-cell *matHeaderCellDef> Disabled </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.disabled}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"dateCreated\">\r\n <th mat-header-cell *matHeaderCellDef> Created </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.dateCreated | date: 'dd MMM yy'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"dateUpdated\">\r\n <th mat-header-cell *matHeaderCellDef> Updated </th>\r\n <td mat-cell *matCellDef=\"let user\"> {{user.dateUpdated | date: 'dd MMM yy'}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"Action\">\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef=\"let user\" style=\"width: 250px;\">\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"viewProfile(user)\" style=\"margin-right:30px\" matTooltip=\"View Profile\" matTooltipPosition=\"above\"> <mat-icon>account_circle</mat-icon></button>\r\n\r\n <button *ngIf=\"user.locked=='0'\" mat-mini-fab color=\"warn\" (click)=\"lock(user)\" style=\"margin-right:10px\" matTooltip=\"Lock\" matTooltipPosition=\"above\"> <mat-icon>lock</mat-icon></button>\r\n <button *ngIf=\"user.locked=='1'\" mat-mini-fab (click)=\"unlock(user)\" style=\"margin-right:10px; background-color: green;\" matTooltip=\"Unlock\" matTooltipPosition=\"above\"> <mat-icon >lock_open</mat-icon></button>\r\n\r\n <button *ngIf=\"user.disabled=='0'\" mat-mini-fab color=\"warn\" (click)=\"disable(user)\" style=\"margin-right:10px\" matTooltip=\"Disable\" matTooltipPosition=\"above\"> <mat-icon>block</mat-icon></button>\r\n <button *ngIf=\"user.disabled=='1'\" mat-mini-fab (click)=\"enable(user)\" style=\"margin-right:10px; background-color: green\" matTooltip=\"Enable\" matTooltipPosition=\"above\"> <mat-icon>done</mat-icon></button>\r\n\r\n <button mat-mini-fab color=\"warn\" (click)=\"deleteUser(user)\" style=\"margin-right:10px\" matTooltip=\"Delete\" matTooltipPosition=\"above\"> <mat-icon>delete</mat-icon></button>\r\n <!-- <button mat-mini-fab color=\"primary\" (click)=\"recover(user)\" style=\"margin-right:10px\" matTooltip=\"Reset Password\" matTooltipPosition=\"above\"> <mat-icon>vpn_key</mat-icon></button> -->\r\n\r\n\r\n\r\n </td>\r\n </ng-container>\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"{'make-gray': row.disabled =='1'}\"></tr>\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #usersPaginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\r\n</div>\r\n",
3247
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.make-gray{background-color:#d3d3d3}"]
3248
+ })
3249
+ ], UsersComponent);
3250
+ return UsersComponent;
3251
+ }());
3252
+
3253
+ var AddUserDialog = /** @class */ (function () {
3254
+ function AddUserDialog(dataserv, messageService, dialogRef) {
3255
+ this.dataserv = dataserv;
3256
+ this.messageService = messageService;
3257
+ this.dialogRef = dialogRef;
3258
+ this.currentCount = 0;
3259
+ this.user = new User();
3260
+ this.isProcessing = false;
3261
+ }
3262
+ AddUserDialog.prototype.ngOnInit = function () {
3263
+ };
3264
+ AddUserDialog.prototype.Signup = function () {
3265
+ // if (Core.emailIsValid(this.user.email)) {
3266
+ // this.messageService.toast("Invalid Email");
3267
+ // return;
3268
+ // }
3269
+ var _this = this;
3270
+ this.user.dateCreated = tinCore.Core.getFormatedDate(tinCore.Core.nowDate());
3271
+ this.user.dateUpdated = tinCore.Core.getFormatedDate(tinCore.Core.nowDate());
3272
+ this.user.dateExpire = tinCore.Core.getFormatedDate(tinCore.Core.nowDate());
3273
+ this.isProcessing = true;
3274
+ this.dataserv.UpdateUser(this.user, "add").subscribe(function (apiResponse) {
3275
+ _this.isProcessing = false;
3276
+ if (apiResponse.message == "success") {
3277
+ _this.messageService.toast("User Added");
3278
+ _this.dialogRef.close("success");
3279
+ }
3280
+ else {
3281
+ _this.messageService.toast("Error: " + apiResponse.message);
3282
+ }
3283
+ });
3284
+ };
3285
+ AddUserDialog.ctorParameters = function () { return [
3286
+ { type: DataService },
3287
+ { type: MessageService },
3288
+ { type: dialog.MatDialogRef }
3289
+ ]; };
3290
+ AddUserDialog = __decorate([
3291
+ core.Component({
3292
+ selector: "spa-add-user",
3293
+ template: "<h2 mat-dialog-title>Add User</h2>\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n\r\n\r\n\r\n <div class=\"tin-input \" style=\"font-size:12px\">\r\n\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>Username</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"user.userID\" placeholder=\"Enter Username\">\r\n </mat-form-field>\r\n\r\n\r\n\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>Password</mat-label>\r\n <input matInput autocomplete=\"off\" type=\"password\" [(ngModel)]=\"user.password\" placeholder=\"Enter Password\">\r\n </mat-form-field>\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]=\"isProcessing\" (click)=\"Signup()\" cdkFocusInitial>Submit</button>\r\n <button mat-button mat-dialog-close>Cancel</button>\r\n</mat-dialog-actions>\r\n",
3294
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.make-gray{background-color:#d3d3d3}"]
3295
+ })
3296
+ ], AddUserDialog);
3297
+ return AddUserDialog;
3298
+ }());
3299
+
3300
+ var EditUserDialog = /** @class */ (function () {
3301
+ function EditUserDialog(dataserv, messageService, dialogRef, data) {
3302
+ this.dataserv = dataserv;
3303
+ this.messageService = messageService;
3304
+ this.dialogRef = dialogRef;
3305
+ this.data = data;
3306
+ this.user = new User();
3307
+ this.isProcessing = false;
3308
+ this.myUser = new User();
3309
+ }
3310
+ EditUserDialog.prototype.ngOnInit = function () {
3311
+ // this.loadDepartments();
3312
+ // this.loadRoles();
3313
+ // this.loadLineManagers();
3314
+ this.user = this.data;
3315
+ };
3316
+ EditUserDialog.prototype.unlock = function () {
3317
+ this.user.locked = "0";
3318
+ };
3319
+ EditUserDialog.prototype.lock = function () {
3320
+ this.user.locked = "1";
3321
+ };
3322
+ EditUserDialog.prototype.enable = function () {
3323
+ this.user.disabled = "0";
3324
+ };
3325
+ EditUserDialog.prototype.disable = function () {
3326
+ this.user.disabled = "1";
3327
+ };
3328
+ // loadDepartments() {
3329
+ // this.dataserv.GetDepartment("all", "").subscribe((myApiResponse) => {
3330
+ // this.departments = myApiResponse;
3331
+ // });
3332
+ // }
3333
+ // loadLineManagers() {
3334
+ // this.dataserv.GetLineManagers().subscribe((apiResponse: ApiResponse) => {
3335
+ // this.lineManagers = apiResponse.dt;
3336
+ // });
3337
+ // }
3338
+ // loadRoles() {
3339
+ // this.dataserv.GetRole("all", "").subscribe((apiResponse: ApiResponse) => {
3340
+ // this.roles = apiResponse.dt;
3341
+ // });
3342
+ // }
3343
+ EditUserDialog.prototype.Update = function () {
3344
+ var _this = this;
3345
+ this.isProcessing = true;
3346
+ this.dataserv.UpdateUser(this.user, "edit").subscribe(function (apiResponse) {
3347
+ _this.isProcessing = false;
3348
+ if (apiResponse.message == "success") {
3349
+ _this.messageService.toast("User Updated");
3350
+ _this.dialogRef.close("success");
3351
+ }
3352
+ else {
3353
+ _this.messageService.toast("Error: " + apiResponse.message);
3354
+ }
3355
+ }, function (error) {
3356
+ _this.messageService.toast("Connection failed ");
3357
+ _this.isProcessing = false;
3358
+ });
3359
+ };
3360
+ EditUserDialog.prototype.DeleteUser = function () {
3361
+ var _this = this;
3362
+ this.isProcessing = true;
3363
+ this.dataserv.UpdateUser(this.user, "delete").subscribe(function (myData) {
3364
+ _this.isProcessing = false;
3365
+ _this.myData = myData;
3366
+ _this.myResponse = _this.myData.message;
3367
+ if (_this.myResponse == "success") {
3368
+ _this.messageService.toast(_this.user.userID + " Deleted");
3369
+ _this.dialogRef.close("success");
3370
+ }
3371
+ else {
3372
+ }
3373
+ });
3374
+ };
3375
+ EditUserDialog.ctorParameters = function () { return [
3376
+ { type: DataService },
3377
+ { type: MessageService },
3378
+ { type: dialog.MatDialogRef },
3379
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
3380
+ ]; };
3381
+ EditUserDialog = __decorate([
3382
+ core.Component({
3383
+ selector: "spa-edit-user",
3384
+ template: "<h2 mat-dialog-title>User Details</h2>\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n\r\n\r\n <div class=\"tin-input\" style=\"font-size:14px\">\r\n\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"user.userID\" placeholder=\"Enter Username\" readonly>\r\n </mat-form-field>\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]=\"isProcessing\" (click)=\"Update()\" cdkFocusInitial>Update</button>\r\n <!--<button mat-button [disabled]=\"isProcessing\" (click)=\"DeleteUser()\">Delete</button>-->\r\n <button mat-button mat-dialog-close>Cancel</button>\r\n</mat-dialog-actions>\r\n",
3385
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.make-gray{background-color:#d3d3d3}"]
3386
+ }),
3387
+ __param(3, core.Inject(dialog.MAT_DIALOG_DATA))
3388
+ ], EditUserDialog);
3389
+ return EditUserDialog;
3390
+ }());
3391
+
3392
+ var viewRoleDialog = /** @class */ (function () {
3393
+ function viewRoleDialog(messageService, dataserv, authserv, dialogRef, data) {
3394
+ this.messageService = messageService;
3395
+ this.dataserv = dataserv;
3396
+ this.authserv = authserv;
3397
+ this.dialogRef = dialogRef;
3398
+ this.data = data;
3399
+ }
3400
+ viewRoleDialog.prototype.ngOnInit = function () {
3401
+ };
3402
+ viewRoleDialog.prototype.submit = function () {
3403
+ };
3404
+ ;
3405
+ viewRoleDialog.ctorParameters = function () { return [
3406
+ { type: MessageService },
3407
+ { type: DataService },
3408
+ { type: AuthService },
3409
+ { type: dialog.MatDialogRef },
3410
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
3411
+ ]; };
3412
+ viewRoleDialog = __decorate([
3413
+ core.Component({
3414
+ selector: 'app-viewRole',
3415
+ template: "",
3416
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]
3417
+ }),
3418
+ __param(4, core.Inject(dialog.MAT_DIALOG_DATA))
3419
+ ], viewRoleDialog);
3420
+ return viewRoleDialog;
3421
+ }());
3422
+ ;
3423
+
3424
+ var addRoleDialog = /** @class */ (function () {
3425
+ function addRoleDialog(messageService, dataService, authService, dialogRef, data) {
3426
+ this.messageService = messageService;
3427
+ this.dataService = dataService;
3428
+ this.authService = authService;
3429
+ this.dialogRef = dialogRef;
3430
+ this.data = data;
3431
+ this.role = new Role();
3432
+ }
3433
+ addRoleDialog.prototype.ngOnInit = function () {
3434
+ this.capItems = this.data;
3435
+ };
3436
+ addRoleDialog.prototype.submit = function () {
3437
+ var _this = this;
3438
+ if (this.role.roleName == "New Role" || this.role.roleName == "") {
3439
+ this.messageService.toast("Please enter Role Name");
3440
+ return;
3441
+ }
3442
+ this.isProcessing = true;
3443
+ this.dataService.UpdateRole(this.role, "add").subscribe(function (apiResponse) {
3444
+ _this.isProcessing = false;
3445
+ if (apiResponse.message == "success") {
3446
+ _this.messageService.toast("Role Added");
3447
+ _this.dialogRef.close("success");
3448
+ }
3449
+ else {
3450
+ _this.messageService.toast("Error: " + apiResponse.message);
3451
+ }
3452
+ }, function (error) {
3453
+ _this.messageService.toast("Connection failed");
3454
+ _this.isProcessing = false;
3455
+ });
3456
+ };
3457
+ ;
3458
+ addRoleDialog.ctorParameters = function () { return [
3459
+ { type: MessageService },
3460
+ { type: DataService },
3461
+ { type: AuthService },
3462
+ { type: dialog.MatDialogRef },
3463
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
3464
+ ]; };
3465
+ addRoleDialog = __decorate([
3466
+ core.Component({
3467
+ selector: 'app-addRole',
3468
+ template: "<mat-form-field>\r\n <mat-label>Role Name</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"role.roleName\" placeholder=\"Enter Role Name\" />\r\n</mat-form-field>\r\n\r\n<mat-dialog-content class=\"mat-typography\">\r\n\r\n <div class=\"row\" >\r\n\r\n <!-- <div class=\" col-4\">\r\n\r\n <div class=\"row\">\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:14px\" [(ngModel)]=\"role.cap1\">Admin</mat-checkbox>\r\n </div>\r\n\r\n </div> -->\r\n\r\n <div class=\"row\" style=\"margin-left: 2em;margin-right: 2em;\">\r\n\r\n <div class=\"row\" style=\"margin-left: 2em;\" *ngFor=\"let capItem of capItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px; width: 200px;\" [(ngModel)]=\"role[capItem.name]\">{{capItem.display}}</mat-checkbox>\r\n\r\n <div *ngFor=\"let capSubItem of capItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px; width: 200px;\" [(ngModel)]=\"role[capSubItem.name]\">{{capSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]=\"isProcessing\" (click)=\"submit()\" cdkFocusInitial>Submit</button>\r\n <button mat-button mat-dialog-close=\"success\">Cancel</button>\r\n</mat-dialog-actions>\r\n",
3469
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]
3470
+ }),
3471
+ __param(4, core.Inject(dialog.MAT_DIALOG_DATA))
3472
+ ], addRoleDialog);
3473
+ return addRoleDialog;
3474
+ }());
3475
+ ;
3476
+
3477
+ var editRoleDialog = /** @class */ (function () {
3478
+ function editRoleDialog(messageService, dataserv, authserv, dialogRef, data) {
3479
+ this.messageService = messageService;
3480
+ this.dataserv = dataserv;
3481
+ this.authserv = authserv;
3482
+ this.dialogRef = dialogRef;
3483
+ this.data = data;
3484
+ this.role = new Role;
3485
+ this.isLoadComplete = false;
3486
+ }
3487
+ editRoleDialog.prototype.ngOnInit = function () {
3488
+ this.role = this.data;
3489
+ this.isLoadComplete = true;
3490
+ };
3491
+ editRoleDialog.prototype.submit = function () {
3492
+ var _this = this;
3493
+ this.isProcessing = true;
3494
+ this.dataserv.UpdateRole(this.role, "edit").subscribe(function (apiResponse) {
3495
+ _this.isProcessing = false;
3496
+ if (apiResponse.message == "success") {
3497
+ _this.messageService.toast("Role Updated");
3498
+ _this.dialogRef.close("success");
3499
+ }
3500
+ else {
3501
+ _this.messageService.toast("Error: " + apiResponse.message);
3502
+ }
3503
+ }, function (error) {
3504
+ _this.messageService.toast("Connection failed ");
3505
+ _this.isProcessing = false;
3506
+ });
3507
+ };
3508
+ ;
3509
+ editRoleDialog.ctorParameters = function () { return [
3510
+ { type: MessageService },
3511
+ { type: DataService },
3512
+ { type: AuthService },
3513
+ { type: dialog.MatDialogRef },
3514
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
3515
+ ]; };
3516
+ editRoleDialog = __decorate([
3517
+ core.Component({
3518
+ selector: 'app-editRole',
3519
+ template: "\r\n <mat-form-field>\r\n <mat-label>Role Name</mat-label>\r\n <input matInput autocomplete=\"off\" [(ngModel)]=\"role.roleName\" placeholder=\"Enter Role Name\" />\r\n </mat-form-field>\r\n <mat-dialog-content class=\"mat-typography\">\r\n\r\n <div class=\"row\" style=\"margin-left:2em\">\r\n\r\n\r\n\r\n <div class=\" col-4\">\r\n\r\n <div class=\"row\">\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:18px\" [(ngModel)]=\"role.cap1\">Admin</mat-checkbox>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px\" [(ngModel)]=\"role.cap1\">Users</mat-checkbox>\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px\" [(ngModel)]=\"role.cap1\">Overview</mat-checkbox>\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px\" [(ngModel)]=\"role.cap1\">Search</mat-checkbox>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\" col-4\">\r\n\r\n <div class=\"row\">\r\n <mat-label style=\"margin-right:20px;font-size:18px\">Requests</mat-label>\r\n </div>\r\n\r\n <div class=\"row\">\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px\" [(ngModel)]=\"role.cap1\">Budget</mat-checkbox>\r\n\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px\" [(ngModel)]=\"role.cap1\">Procurement</mat-checkbox>\r\n <mat-checkbox color=\"primary\" style=\"margin-right:20px; font-size:12px\" [(ngModel)]=\"role.cap1\">Payment</mat-checkbox>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n </mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]=\"isProcessing\" (click)=\"submit()\" cdkFocusInitial>Submit</button>\r\n <button mat-button mat-dialog-close>Cancel</button>\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n",
3520
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]
3521
+ }),
3522
+ __param(4, core.Inject(dialog.MAT_DIALOG_DATA))
3523
+ ], editRoleDialog);
3524
+ return editRoleDialog;
3525
+ }());
3526
+ ;
3527
+
3528
+ var RolesComponent = /** @class */ (function () {
3529
+ function RolesComponent(httpService, router, authService, dataService, dialog, messageService) {
3530
+ this.httpService = httpService;
3531
+ this.router = router;
3532
+ this.authService = authService;
3533
+ this.dataService = dataService;
3534
+ this.dialog = dialog;
3535
+ this.messageService = messageService;
3536
+ this.isProcessing = false;
3537
+ this.appConfig = new AppConfig();
3538
+ }
3539
+ RolesComponent.prototype.ngOnInit = function () {
3540
+ this.loadRoles();
3541
+ };
3542
+ // _filterText = "";
3543
+ // applyFilter(filterValue: string) {
3544
+ // this.roles.filter = filterValue.trim().toLowerCase();
3545
+ // }
3546
+ RolesComponent.prototype.loadRoles = function () {
3547
+ var _this = this;
3548
+ this.dataService.GetRole("all", "").subscribe(function (apiResponse) {
3549
+ _this.roles = apiResponse.dt;
3550
+ }, function (error) {
3551
+ _this.isProcessing = false;
3552
+ _this.messageService.toast(_this.httpService.Error(error));
3553
+ });
3554
+ };
3555
+ RolesComponent.prototype.refresh = function () {
3556
+ this.loadRoles();
3557
+ };
3558
+ RolesComponent.prototype.addRole = function () {
3559
+ var _this = this;
3560
+ var dialogRef = this.dialog.open(addRoleDialog, {
3561
+ width: "1100px",
3562
+ data: this.appConfig.capItems,
3563
+ });
3564
+ dialogRef.afterClosed().subscribe(function (result) {
3565
+ if (result == "success") {
3566
+ _this.loadRoles();
3567
+ }
3568
+ });
3569
+ };
3570
+ RolesComponent.prototype.viewRole = function (role) {
3571
+ var _this = this;
3572
+ var dialogRef = this.dialog.open(viewRoleDialog, {
3573
+ width: "1100px",
3574
+ data: role,
3575
+ });
3576
+ dialogRef.afterClosed().subscribe(function (result) {
3577
+ if (result == "success") {
3578
+ _this.loadRoles();
3579
+ }
3580
+ });
3581
+ };
3582
+ RolesComponent.prototype.editRole = function (role) {
3583
+ var _this = this;
3584
+ var dialogRef = this.dialog.open(editRoleDialog, {
3585
+ width: "1100px",
3586
+ data: role,
3587
+ });
3588
+ dialogRef.afterClosed().subscribe(function (result) {
3589
+ if (result == "success") {
3590
+ _this.loadRoles();
3591
+ }
3592
+ });
3593
+ };
3594
+ RolesComponent.prototype.updateRole = function (role) {
3595
+ var _this = this;
3596
+ this.messageService.confirm("UPDATE " + role.roleName + " ?").subscribe(function (result) {
3597
+ if (result == "yes") {
3598
+ _this.dataService
3599
+ .UpdateRole(role, "edit")
3600
+ .subscribe(function (apiResponse) {
3601
+ if (apiResponse.message == "success") {
3602
+ _this.messageService.toast("Role Updated");
3603
+ _this.loadRoles();
3604
+ }
3605
+ else {
3606
+ _this.messageService.toast("Error: " + apiResponse.message);
3607
+ }
3608
+ });
3609
+ }
3610
+ });
3611
+ };
3612
+ ;
3613
+ RolesComponent.prototype.deleteRole = function (role) {
3614
+ var _this = this;
3615
+ this.messageService.confirm("DELETE " + role.roleName + " ?").subscribe(function (result) {
3616
+ if (result == "yes") {
3617
+ _this.dataService
3618
+ .UpdateRole(role, "delete")
3619
+ .subscribe(function (apiResponse) {
3620
+ if (apiResponse.message == "success") {
3621
+ _this.messageService.toast("Role Deleted");
3622
+ _this.loadRoles();
3623
+ }
3624
+ else {
3625
+ _this.messageService.toast("Error: " + apiResponse.message);
3626
+ }
3627
+ });
3628
+ }
3629
+ });
3630
+ };
3631
+ RolesComponent.ctorParameters = function () { return [
3632
+ { type: tinCore.HttpService },
3633
+ { type: router.Router },
3634
+ { type: AuthService },
3635
+ { type: DataService },
3636
+ { type: dialog.MatDialog },
3637
+ { type: MessageService }
3638
+ ]; };
3639
+ __decorate([
3640
+ core.Input()
3641
+ ], RolesComponent.prototype, "appConfig", void 0);
3642
+ RolesComponent = __decorate([
3643
+ core.Component({
3644
+ selector: "spa-roles",
3645
+ template: "<h4> Roles </h4>\r\n<hr />\r\n\r\n<div class=\"container mb-5\">\r\n\r\n <div class=\"row justify-content-between\" style=\"padding-bottom: 10px;padding-left:10px\">\r\n <div class=\"col-2\">\r\n\r\n <button id=\"btnNewRole\" mat-raised-button color=\"primary\" (click)=\"addRole()\">New Role</button>\r\n </div>\r\n <div class=\"col-1\">\r\n\r\n <button id=\"btnRefresh\" mat-mini-fab color=\"primary\" (click)=\"refresh()\" style=\"margin-right:1em;margin-top:5px\" matTooltip=\"refresh data\" matTooltipPosition=\"right\"><mat-icon class=\"refreshIcon\">refresh</mat-icon></button>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\" style=\"margin-left:10px\" *ngFor=\"let role of roles\">\r\n\r\n <mat-card class=\"mat-elevation-z8\" style=\"width:100%;padding-left:2em\">\r\n\r\n <h4>{{role.roleName}}</h4>\r\n <hr />\r\n\r\n <div class=\"row\" style=\"margin-left: 2em;\">\r\n\r\n\r\n <div class=\"row\" style=\"margin-right:20px;\" *ngFor=\"let capItem of appConfig.capItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\" font-size:12px; width: 200px;\" [(ngModel)]=\"role[capItem.name]\">{{capItem.display}}</mat-checkbox>\r\n\r\n <div class=\"row\" style=\"margin-right:20px;margin-left: 0px; \" *ngFor=\"let capSubItem of capItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\" font-size:12px; width: 200px;\" [(ngModel)]=\"role[capSubItem.name]\">{{capSubItem.display}}</mat-checkbox>\r\n\r\n <div class=\"row\" style=\"margin-right:20px;margin-left: 0px;\" *ngFor=\"let capSubSubItem of capSubItem.capSubItems\">\r\n\r\n <mat-checkbox color=\"primary\" style=\"font-size:12px; width: 200px;\" [(ngModel)]=\"role[capSubSubItem.name]\">{{capSubSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <button mat-mini-fab color=\"primary\" (click)=\"updateRole(role)\" style=\"margin-right:10px;\">\r\n <mat-icon>done_all</mat-icon>\r\n </button>\r\n\r\n <!-- <button mat-mini-fab color=\"warn\" (click)=\"editRole(role)\" style=\"margin-right:10px\">\r\n <mat-icon>edit</mat-icon>\r\n </button> -->\r\n\r\n <button mat-mini-fab color=\"warn\" (click)=\"deleteRole(role)\" style=\"margin-right:10px\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n </div>\r\n\r\n\r\n</div>\r\n\r\n",
3646
+ styles: [".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]
3647
+ })
3648
+ ], RolesComponent);
3649
+ return RolesComponent;
3650
+ }());
3651
+
3652
+ var ProfilesComponent = /** @class */ (function () {
3653
+ function ProfilesComponent() {
3654
+ }
3655
+ ProfilesComponent.prototype.ngOnInit = function () {
3656
+ };
3657
+ ProfilesComponent = __decorate([
3658
+ core.Component({
3659
+ selector: 'spa-profiles',
3660
+ template: "<h6></h6>\r\n<hr>\r\n",
3661
+ styles: [""]
3662
+ })
3663
+ ], ProfilesComponent);
3664
+ return ProfilesComponent;
3665
+ }());
3666
+
3667
+ var CreateAccountComponent = /** @class */ (function () {
3668
+ function CreateAccountComponent(httpService, messageService, dataService, authService, router) {
3669
+ this.httpService = httpService;
3670
+ this.messageService = messageService;
3671
+ this.dataService = dataService;
3672
+ this.authService = authService;
3673
+ this.router = router;
3674
+ this.appConfig = new AppConfig();
3675
+ this.isProcessing = false;
3676
+ this.user = new User();
3677
+ this.profile = new Profile();
3678
+ this.account = new Account();
3679
+ this.openProfile = true;
3680
+ }
3681
+ CreateAccountComponent.prototype.ngOnInit = function () {
3682
+ };
3683
+ CreateAccountComponent.prototype.create = function () {
3684
+ var _this = this;
3685
+ if (this.user.authType == "") {
3686
+ this.messageService.toast("Choose Authentication Type");
3687
+ return;
3688
+ }
3689
+ this.account.user = this.user;
3690
+ this.account.profile = this.profile;
3691
+ this.profile.userID = this.user.userID;
3692
+ this.isProcessing = true;
3693
+ this.dataService.UpdateAccount(this.account, "add").subscribe(function (apiResponse) {
3694
+ _this.isProcessing = false;
3695
+ if (apiResponse.message == "success") {
3696
+ _this.messageService.toast("Account Created");
3697
+ if (_this.openProfile) {
3698
+ _this.viewProfile(_this.user);
3699
+ }
3700
+ else {
3701
+ _this.user = new User();
3702
+ _this.profile = new Profile();
3703
+ _this.confirmPassword = "";
3704
+ }
3705
+ }
3706
+ else {
3707
+ _this.messageService.toast("Error: " + apiResponse.message);
3708
+ }
3709
+ }, function (error) {
3710
+ _this.isProcessing = false;
3711
+ _this.messageService.toast(_this.httpService.Error(error));
3712
+ });
3713
+ };
3714
+ CreateAccountComponent.prototype.viewProfile = function (user) {
3715
+ this.dataService.tmpProfileUserID = user.userID;
3716
+ this.router.navigate(["home/user/profile"]);
3717
+ };
3718
+ CreateAccountComponent.ctorParameters = function () { return [
3719
+ { type: tinCore.HttpService },
3720
+ { type: MessageService },
3721
+ { type: DataService },
3722
+ { type: AuthService },
3723
+ { type: router.Router }
3724
+ ]; };
3725
+ __decorate([
3726
+ core.Input()
3727
+ ], CreateAccountComponent.prototype, "appConfig", void 0);
3728
+ CreateAccountComponent = __decorate([
3729
+ core.Component({
3730
+ selector: 'spa-create-account',
3731
+ template: "<h4>Create Account</h4>\r\n\r\n<hr/>\r\n\r\n<div class=\"container\">\r\n\r\n <div class=\"tin-input\" style=\"font-size:14px; width: 50%;\">\r\n\r\n\r\n <div class=\"tin-input-row\">\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>FirstName</mat-label>\r\n <input id=\"txtFirstName\" matInput autocomplete=\"off\" [(ngModel)]=\"profile.firstName\" placeholder=\"Enter FirstName\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>LastName</mat-label>\r\n <input id=\"txtLastName\" matInput autocomplete=\"off\" [(ngModel)]=\"profile.lastName\" placeholder=\"Enter LastName\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class=\"tin-input-row mt-3\">\r\n\r\n <div class=\"col-6\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>UserID</mat-label>\r\n <input id=\"txtUserID\" matInput autocomplete=\"off\" [(ngModel)]=\"user.userID\" placeholder=\"Enter UserID\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-6\">\r\n\r\n <mat-form-field style=\"width:300px\">\r\n <mat-select id=\"cboAuth\" [(value)]=\"user.authType\">\r\n <mat-option *ngIf=\"appConfig.localAuth\" value=\"local\">Local Authentication</mat-option>\r\n <mat-option *ngIf=\"appConfig.ADAuth\" value=\"AD\">AD Authentication</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n <div class=\"tin-input-row\" *ngIf=\"user.authType=='local'\">\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>Password</mat-label>\r\n <input id=\"txtPassword\" matInput autocomplete=\"off\" type=\"password\" [(ngModel)]=\"user.password\" placeholder=\"Enter Password\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class=\"col\">\r\n\r\n <mat-form-field style=\"width:100%\">\r\n <mat-label>Confirm Password</mat-label>\r\n <input id=\"txtConfirmPassword\" matInput autocomplete=\"off\" type=\"password\" [(ngModel)]=\"confirmPassword\" placeholder=\"Enter Confirm Password\" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <div class=\"tin-input-row mt-3\" style=\"margin-left: 1em;\">\r\n\r\n <mat-checkbox id=\"cbkOpenAfter\" color=\"primary\" style=\"margin-right:100px; font-size:12px\" [(ngModel)]=\"openProfile\">Open profile after creation</mat-checkbox>\r\n\r\n </div>\r\n\r\n <div class=\"tin-input-row mt-3\">\r\n <button id=\"btnCreate\" [disabled]=\"user.authType ==''\" mat-raised-button color=\"primary\" (click)=\"create()\" cdkFocusInitial>Create</button>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n</div>\r\n\r\n",
3732
+ styles: [""]
3733
+ })
3734
+ ], CreateAccountComponent);
3735
+ return CreateAccountComponent;
3736
+ }());
3737
+
3738
+ var SpaAdminModule = /** @class */ (function () {
3739
+ function SpaAdminModule() {
3740
+ }
3741
+ SpaAdminModule = __decorate([
3742
+ core.NgModule({
3743
+ declarations: [
3744
+ UsersComponent,
3745
+ AddUserDialog,
3746
+ EditUserDialog,
3747
+ RolesComponent,
3748
+ addRoleDialog,
3749
+ editRoleDialog,
3750
+ viewRoleDialog,
3751
+ ProfilesComponent,
3752
+ CreateAccountComponent,
3753
+ LogsComponent,
3754
+ SettingsComponent
3755
+ ],
3756
+ entryComponents: [
3757
+ AddUserDialog,
3758
+ EditUserDialog,
3759
+ addRoleDialog,
3760
+ editRoleDialog,
3761
+ viewRoleDialog,
3762
+ ],
3763
+ imports: [
3764
+ forms.ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: "never" }),
3765
+ common.CommonModule,
3766
+ forms.FormsModule,
3767
+ forms.ReactiveFormsModule,
3768
+ SpaMatModule,
3769
+ ],
3770
+ exports: [
3771
+ common.CommonModule,
3772
+ forms.FormsModule,
3773
+ SpaMatModule,
3774
+ UsersComponent,
3775
+ AddUserDialog,
3776
+ EditUserDialog,
3777
+ RolesComponent,
3778
+ addRoleDialog,
3779
+ editRoleDialog,
3780
+ viewRoleDialog,
3781
+ ProfilesComponent,
3782
+ CreateAccountComponent,
3783
+ LogsComponent,
3784
+ SettingsComponent
3785
+ ],
3786
+ })
3787
+ ], SpaAdminModule);
3788
+ return SpaAdminModule;
3789
+ }());
3790
+
3791
+ exports.Account = Account;
3792
+ exports.ActionResponse = ActionResponse;
3793
+ exports.ActivityComponent = ActivityComponent;
3794
+ exports.AddUserDialog = AddUserDialog;
3795
+ exports.AppConfig = AppConfig;
3796
+ exports.AttachComponent = AttachComponent;
3797
+ exports.AuthService = AuthService;
3798
+ exports.CapItem = CapItem;
3799
+ exports.ChangePasswordComponent = ChangePasswordComponent;
3800
+ exports.ChangeUserPassword = ChangeUserPassword;
3801
+ exports.CheckComponent = CheckComponent;
3802
+ exports.ChipsComponent = ChipsComponent;
3803
+ exports.Color = Color;
3804
+ exports.Condition = Condition;
3805
+ exports.CreateAccountComponent = CreateAccountComponent;
3806
+ exports.DataService = DataService;
3807
+ exports.DateComponent = DateComponent;
3808
+ exports.DatetimeComponent = DatetimeComponent;
3809
+ exports.EditUserDialog = EditUserDialog;
3810
+ exports.ExportService = ExportService;
3811
+ exports.HtmlComponent = HtmlComponent;
3812
+ exports.Icon = Icon;
3813
+ exports.LabelComponent = LabelComponent;
3814
+ exports.LoaderComponent = LoaderComponent;
3815
+ exports.LogService = LogService;
3816
+ exports.LoginComponent = LoginComponent;
3817
+ exports.LogsComponent = LogsComponent;
3818
+ exports.MessageService = MessageService;
3819
+ exports.MoneyComponent = MoneyComponent;
3820
+ exports.NavMenuComponent = NavMenuComponent;
3821
+ exports.OptionComponent = OptionComponent;
3822
+ exports.Profile = Profile;
3823
+ exports.ProfileComponent = ProfileComponent;
3824
+ exports.ProfilesComponent = ProfilesComponent;
3825
+ exports.RecoverAccountComponent = RecoverAccountComponent;
3826
+ exports.Role = Role;
3827
+ exports.RolesComponent = RolesComponent;
3828
+ exports.SelectComponent = SelectComponent;
3829
+ exports.SettingsComponent = SettingsComponent;
3830
+ exports.SignupComponent = SignupComponent;
3831
+ exports.SpaAdminModule = SpaAdminModule;
3832
+ exports.SpaIndexModule = SpaIndexModule;
3833
+ exports.SpaMatModule = SpaMatModule;
3834
+ exports.SpaUserModule = SpaUserModule;
3835
+ exports.Step = Step;
3836
+ exports.StepsComponent = StepsComponent;
3837
+ exports.StorageService = StorageService;
3838
+ exports.TableAction = TableAction;
3839
+ exports.TableColumn = TableColumn;
3840
+ exports.TableComponent = TableComponent;
3841
+ exports.TableConfig = TableConfig;
3842
+ exports.TableCreate = TableCreate;
3843
+ exports.TextComponent = TextComponent;
3844
+ exports.Tile = Tile;
3845
+ exports.TilesComponent = TilesComponent;
3846
+ exports.TimeoutComponent = TimeoutComponent;
3847
+ exports.TinSpaComponent = TinSpaComponent;
3848
+ exports.TinSpaModule = TinSpaModule;
3849
+ exports.TinSpaService = TinSpaService;
3850
+ exports.User = User;
3851
+ exports.UsersComponent = UsersComponent;
3852
+ exports.ViewerComponent = ViewerComponent;
3853
+ exports.addRoleDialog = addRoleDialog;
3854
+ exports.editRoleDialog = editRoleDialog;
3855
+ exports.loginConfig = loginConfig;
3856
+ exports.messageDialog = messageDialog;
3857
+ exports.viewRoleDialog = viewRoleDialog;
3858
+ exports.ɵ0 = ɵ0;
3859
+ exports.ɵa = DndDirective;
3860
+ exports.ɵb = LoaderService;
3861
+ exports.ɵc = viewerDialog;
3862
+ exports.ɵd = LoaderInterceptor;
3863
+
3864
+ Object.defineProperty(exports, '__esModule', { value: true });
3865
+
3866
+ })));
3867
+ //# sourceMappingURL=tin-spa.umd.js.map