ps-toolkit-ui 0.0.211 → 0.0.212

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 (311) hide show
  1. package/bundles/ps-toolkit-ui.umd.js +7812 -0
  2. package/bundles/ps-toolkit-ui.umd.js.map +1 -0
  3. package/bundles/ps-toolkit-ui.umd.min.js +2 -0
  4. package/bundles/ps-toolkit-ui.umd.min.js.map +1 -0
  5. package/esm2015/lib/classes/chart.class.js +140 -0
  6. package/esm2015/lib/classes/enum.class.js +187 -0
  7. package/esm2015/lib/classes/form.class.js +481 -0
  8. package/esm2015/lib/classes/helper.class.js +284 -0
  9. package/esm2015/lib/classes/lang.class.js +32 -0
  10. package/esm2015/lib/classes/login.class.js +22 -0
  11. package/esm2015/lib/classes/modal.class.js +52 -0
  12. package/esm2015/lib/classes/permission.class.js +61 -0
  13. package/esm2015/lib/classes/request.class.js +256 -0
  14. package/esm2015/lib/classes/safestyle.class.js +15 -0
  15. package/esm2015/lib/classes/sidebar.class.js +14 -0
  16. package/esm2015/lib/classes/steps.class.js +20 -0
  17. package/esm2015/lib/classes/string.class.js +220 -0
  18. package/esm2015/lib/classes/table.class.js +215 -0
  19. package/esm2015/lib/components/accordion/accordion.component.js +45 -0
  20. package/esm2015/lib/components/alert/alert.component.js +39 -0
  21. package/esm2015/lib/components/base.component.js +45 -0
  22. package/esm2015/lib/components/calendar/calendar.component.js +97 -0
  23. package/esm2015/lib/components/chart/chart.component.js +17 -0
  24. package/esm2015/lib/components/clock/clock.component.js +33 -0
  25. package/esm2015/lib/components/confirm/confirm.component.js +50 -0
  26. package/esm2015/lib/components/footer/footer.component.js +23 -0
  27. package/esm2015/lib/components/form/bank-card/form.bank-card.component.js +148 -0
  28. package/esm2015/lib/components/form/button/form.button.component.js +68 -0
  29. package/esm2015/lib/components/form/car/form.car.component.js +84 -0
  30. package/esm2015/lib/components/form/car/search/form.car.search.component.js +172 -0
  31. package/esm2015/lib/components/form/checkbox/form.checkbox.component.js +66 -0
  32. package/esm2015/lib/components/form/date/form.date.component.js +254 -0
  33. package/esm2015/lib/components/form/datetime/form.datetime.component.js +104 -0
  34. package/esm2015/lib/components/form/file/form.file.component.js +133 -0
  35. package/esm2015/lib/components/form/finger/form.finger.component.js +138 -0
  36. package/esm2015/lib/components/form/hidden/form.hidden.component.js +31 -0
  37. package/esm2015/lib/components/form/icon/form.icon.component.js +76 -0
  38. package/esm2015/lib/components/form/index/form.component.js +48 -0
  39. package/esm2015/lib/components/form/label/form.label.component.js +32 -0
  40. package/esm2015/lib/components/form/plaque/form.plaque.component.js +176 -0
  41. package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +390 -0
  42. package/esm2015/lib/components/form/radio/form.radio.component.js +79 -0
  43. package/esm2015/lib/components/form/select/form.select.component.js +374 -0
  44. package/esm2015/lib/components/form/select/item/form.select.item.component.js +43 -0
  45. package/esm2015/lib/components/form/table/form.table.component.js +98 -0
  46. package/esm2015/lib/components/form/textarea/form.textarea.component.js +78 -0
  47. package/esm2015/lib/components/form/textbox/form.textbox.component.js +186 -0
  48. package/esm2015/lib/components/form/time/form.time.component.js +145 -0
  49. package/esm2015/lib/components/form/tree/form.tree.component.js +99 -0
  50. package/esm2015/lib/components/form/tree/item/form.tree.item.component.js +48 -0
  51. package/esm2015/lib/components/header/header.component.js +33 -0
  52. package/esm2015/lib/components/header/sub/sub.header.component.js +14 -0
  53. package/esm2015/lib/components/layout/layout.component.js +25 -0
  54. package/esm2015/lib/components/loading/loading.component.js +22 -0
  55. package/esm2015/lib/components/login/login.component.js +148 -0
  56. package/esm2015/lib/components/modal/modal.component.js +25 -0
  57. package/esm2015/lib/components/notfound/notfound.component.js +29 -0
  58. package/esm2015/lib/components/notification/notification.component.js +14 -0
  59. package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +53 -0
  60. package/esm2015/lib/components/sidebar/sidebar.component.js +67 -0
  61. package/esm2015/lib/components/steps/steps.component.js +51 -0
  62. package/esm2015/lib/components/table/loading/table.loading.component.js +17 -0
  63. package/esm2015/lib/components/table/pagination/table.pagination.component.js +84 -0
  64. package/esm2015/lib/components/table/report/table.report.component.js +246 -0
  65. package/esm2015/lib/components/table/row/table.row.component.js +379 -0
  66. package/esm2015/lib/components/table/table.component.js +179 -0
  67. package/esm2015/lib/components/tooltip/tooltip.component.js +19 -0
  68. package/esm2015/lib/ps-toolkit-ui.module.js +95 -0
  69. package/esm2015/lib/services/config.service.js +14 -0
  70. package/esm2015/ps-toolkit-ui.js +20 -0
  71. package/esm2015/public-api.js +53 -0
  72. package/fesm2015/ps-toolkit-ui.js +6706 -0
  73. package/fesm2015/ps-toolkit-ui.js.map +1 -0
  74. package/lib/classes/chart.class.d.ts +11 -0
  75. package/lib/classes/enum.class.d.ts +158 -0
  76. package/lib/classes/form.class.d.ts +173 -0
  77. package/lib/classes/helper.class.d.ts +28 -0
  78. package/lib/classes/lang.class.d.ts +5 -0
  79. package/lib/classes/login.class.d.ts +17 -0
  80. package/lib/classes/modal.class.d.ts +19 -0
  81. package/lib/classes/permission.class.d.ts +31 -0
  82. package/lib/classes/request.class.d.ts +12 -0
  83. package/lib/classes/safestyle.class.d.ts +7 -0
  84. package/lib/classes/sidebar.class.d.ts +11 -0
  85. package/lib/classes/steps.class.d.ts +17 -0
  86. package/lib/classes/string.class.d.ts +218 -0
  87. package/lib/classes/table.class.d.ts +69 -0
  88. package/lib/components/accordion/accordion.component.d.ts +7 -0
  89. package/lib/components/alert/alert.component.d.ts +10 -0
  90. package/lib/components/base.component.d.ts +14 -0
  91. package/lib/components/calendar/calendar.component.d.ts +26 -0
  92. package/lib/components/chart/chart.component.d.ts +5 -0
  93. package/lib/components/clock/clock.component.d.ts +11 -0
  94. package/lib/components/confirm/confirm.component.d.ts +14 -0
  95. package/lib/components/footer/footer.component.d.ts +6 -0
  96. package/lib/components/form/bank-card/form.bank-card.component.d.ts +22 -0
  97. package/lib/components/form/button/form.button.component.d.ts +15 -0
  98. package/lib/components/form/car/form.car.component.d.ts +16 -0
  99. package/lib/components/form/car/search/form.car.search.component.d.ts +17 -0
  100. package/lib/components/form/checkbox/form.checkbox.component.d.ts +14 -0
  101. package/lib/components/form/date/form.date.component.d.ts +42 -0
  102. package/lib/components/form/datetime/form.datetime.component.d.ts +13 -0
  103. package/lib/components/form/file/form.file.component.d.ts +17 -0
  104. package/lib/components/form/finger/form.finger.component.d.ts +15 -0
  105. package/lib/components/form/hidden/form.hidden.component.d.ts +7 -0
  106. package/lib/components/form/icon/form.icon.component.d.ts +15 -0
  107. package/lib/components/form/index/form.component.d.ts +10 -0
  108. package/lib/components/form/label/form.label.component.d.ts +8 -0
  109. package/lib/components/form/plaque/form.plaque.component.d.ts +22 -0
  110. package/lib/components/form/plaque/select/form.plaque.select.component.d.ts +36 -0
  111. package/lib/components/form/radio/form.radio.component.d.ts +13 -0
  112. package/lib/components/form/select/form.select.component.d.ts +39 -0
  113. package/lib/components/form/select/item/form.select.item.component.d.ts +12 -0
  114. package/lib/components/form/table/form.table.component.d.ts +9 -0
  115. package/lib/components/form/textarea/form.textarea.component.d.ts +13 -0
  116. package/lib/components/form/textbox/form.textbox.component.d.ts +20 -0
  117. package/lib/components/form/time/form.time.component.d.ts +25 -0
  118. package/lib/components/form/tree/form.tree.component.d.ts +16 -0
  119. package/lib/components/form/tree/item/form.tree.item.component.d.ts +17 -0
  120. package/lib/components/header/header.component.d.ts +9 -0
  121. package/lib/components/header/sub/sub.header.component.d.ts +3 -0
  122. package/lib/components/layout/layout.component.d.ts +8 -0
  123. package/lib/components/loading/loading.component.d.ts +5 -0
  124. package/lib/components/login/login.component.d.ts +13 -0
  125. package/lib/components/modal/modal.component.d.ts +9 -0
  126. package/lib/components/notfound/notfound.component.d.ts +8 -0
  127. package/lib/components/notification/notification.component.d.ts +3 -0
  128. package/lib/components/sidebar/item/sidebar.item.component.d.ts +14 -0
  129. package/lib/components/sidebar/sidebar.component.d.ts +19 -0
  130. package/lib/components/steps/steps.component.d.ts +10 -0
  131. package/lib/components/table/loading/table.loading.component.d.ts +5 -0
  132. package/lib/components/table/pagination/table.pagination.component.d.ts +15 -0
  133. package/lib/components/table/report/table.report.component.d.ts +34 -0
  134. package/lib/components/table/row/table.row.component.d.ts +34 -0
  135. package/lib/components/table/table.component.d.ts +40 -0
  136. package/lib/components/tooltip/tooltip.component.d.ts +5 -0
  137. package/lib/ps-toolkit-ui.module.d.ts +4 -0
  138. package/lib/services/config.service.d.ts +6 -0
  139. package/package.json +23 -19
  140. package/ps-toolkit-ui.d.ts +19 -0
  141. package/ps-toolkit-ui.metadata.json +1 -0
  142. package/{src/public-api.ts → public-api.d.ts} +49 -53
  143. package/karma.conf.js +0 -32
  144. package/ng-package.json +0 -16
  145. package/src/lib/classes/chart.class.ts +0 -140
  146. package/src/lib/classes/enum.class.ts +0 -193
  147. package/src/lib/classes/excel.class.ts +0 -46
  148. package/src/lib/classes/form.class.ts +0 -528
  149. package/src/lib/classes/helper.class.ts +0 -283
  150. package/src/lib/classes/lang.class.ts +0 -32
  151. package/src/lib/classes/login.class.ts +0 -27
  152. package/src/lib/classes/modal.class.ts +0 -59
  153. package/src/lib/classes/permission.class.ts +0 -55
  154. package/src/lib/classes/request.class.ts +0 -255
  155. package/src/lib/classes/safestyle.class.ts +0 -4
  156. package/src/lib/classes/sidebar.class.ts +0 -20
  157. package/src/lib/classes/steps.class.ts +0 -19
  158. package/src/lib/classes/string.class.ts +0 -219
  159. package/src/lib/classes/table.class.ts +0 -228
  160. package/src/lib/components/accordion/accordion.component.css +0 -116
  161. package/src/lib/components/accordion/accordion.component.html +0 -19
  162. package/src/lib/components/accordion/accordion.component.ts +0 -41
  163. package/src/lib/components/alert/alert.component.css +0 -112
  164. package/src/lib/components/alert/alert.component.html +0 -1
  165. package/src/lib/components/alert/alert.component.ts +0 -35
  166. package/src/lib/components/base.component.ts +0 -38
  167. package/src/lib/components/calendar/calendar.component.css +0 -206
  168. package/src/lib/components/calendar/calendar.component.html +0 -36
  169. package/src/lib/components/calendar/calendar.component.ts +0 -99
  170. package/src/lib/components/chart/chart.component.css +0 -24
  171. package/src/lib/components/chart/chart.component.html +0 -6
  172. package/src/lib/components/chart/chart.component.ts +0 -14
  173. package/src/lib/components/clock/clock.component.css +0 -141
  174. package/src/lib/components/clock/clock.component.html +0 -10
  175. package/src/lib/components/clock/clock.component.ts +0 -37
  176. package/src/lib/components/confirm/confirm.component.css +0 -112
  177. package/src/lib/components/confirm/confirm.component.html +0 -1
  178. package/src/lib/components/confirm/confirm.component.ts +0 -47
  179. package/src/lib/components/footer/footer.component.css +0 -46
  180. package/src/lib/components/footer/footer.component.html +0 -9
  181. package/src/lib/components/footer/footer.component.ts +0 -18
  182. package/src/lib/components/form/bank-card/form.bank-card.component.css +0 -115
  183. package/src/lib/components/form/bank-card/form.bank-card.component.html +0 -13
  184. package/src/lib/components/form/bank-card/form.bank-card.component.ts +0 -144
  185. package/src/lib/components/form/button/form.button.component.css +0 -222
  186. package/src/lib/components/form/button/form.button.component.html +0 -16
  187. package/src/lib/components/form/button/form.button.component.ts +0 -65
  188. package/src/lib/components/form/car/form.car.component.css +0 -287
  189. package/src/lib/components/form/car/form.car.component.html +0 -11
  190. package/src/lib/components/form/car/form.car.component.ts +0 -82
  191. package/src/lib/components/form/car/search/form.car.search.component.css +0 -287
  192. package/src/lib/components/form/car/search/form.car.search.component.html +0 -15
  193. package/src/lib/components/form/car/search/form.car.search.component.ts +0 -170
  194. package/src/lib/components/form/checkbox/form.checkbox.component.css +0 -128
  195. package/src/lib/components/form/checkbox/form.checkbox.component.html +0 -8
  196. package/src/lib/components/form/checkbox/form.checkbox.component.ts +0 -64
  197. package/src/lib/components/form/date/form.date.component.css +0 -310
  198. package/src/lib/components/form/date/form.date.component.html +0 -46
  199. package/src/lib/components/form/date/form.date.component.ts +0 -247
  200. package/src/lib/components/form/datetime/form.datetime.component.css +0 -157
  201. package/src/lib/components/form/datetime/form.datetime.component.html +0 -11
  202. package/src/lib/components/form/datetime/form.datetime.component.ts +0 -98
  203. package/src/lib/components/form/file/form.file.component.css +0 -151
  204. package/src/lib/components/form/file/form.file.component.html +0 -12
  205. package/src/lib/components/form/file/form.file.component.ts +0 -130
  206. package/src/lib/components/form/finger/form.finger.component.css +0 -215
  207. package/src/lib/components/form/finger/form.finger.component.html +0 -59
  208. package/src/lib/components/form/finger/form.finger.component.ts +0 -131
  209. package/src/lib/components/form/hidden/form.hidden.component.css +0 -0
  210. package/src/lib/components/form/hidden/form.hidden.component.html +0 -0
  211. package/src/lib/components/form/hidden/form.hidden.component.ts +0 -29
  212. package/src/lib/components/form/icon/form.icon.component.css +0 -108
  213. package/src/lib/components/form/icon/form.icon.component.html +0 -14
  214. package/src/lib/components/form/icon/form.icon.component.ts +0 -73
  215. package/src/lib/components/form/index/form.component.css +0 -89
  216. package/src/lib/components/form/index/form.component.html +0 -35
  217. package/src/lib/components/form/index/form.component.ts +0 -45
  218. package/src/lib/components/form/label/form.label.component.css +0 -45
  219. package/src/lib/components/form/label/form.label.component.html +0 -2
  220. package/src/lib/components/form/label/form.label.component.ts +0 -30
  221. package/src/lib/components/form/plaque/form.plaque.component.css +0 -76
  222. package/src/lib/components/form/plaque/form.plaque.component.html +0 -10
  223. package/src/lib/components/form/plaque/form.plaque.component.ts +0 -178
  224. package/src/lib/components/form/plaque/select/form.plaque.select.component.css +0 -167
  225. package/src/lib/components/form/plaque/select/form.plaque.select.component.html +0 -19
  226. package/src/lib/components/form/plaque/select/form.plaque.select.component.ts +0 -385
  227. package/src/lib/components/form/radio/form.radio.component.css +0 -158
  228. package/src/lib/components/form/radio/form.radio.component.html +0 -16
  229. package/src/lib/components/form/radio/form.radio.component.ts +0 -78
  230. package/src/lib/components/form/select/form.select.component.css +0 -326
  231. package/src/lib/components/form/select/form.select.component.html +0 -16
  232. package/src/lib/components/form/select/form.select.component.ts +0 -358
  233. package/src/lib/components/form/select/item/form.select.item.component.css +0 -59
  234. package/src/lib/components/form/select/item/form.select.item.component.html +0 -10
  235. package/src/lib/components/form/select/item/form.select.item.component.ts +0 -40
  236. package/src/lib/components/form/table/form.table.component.css +0 -50
  237. package/src/lib/components/form/table/form.table.component.html +0 -8
  238. package/src/lib/components/form/table/form.table.component.ts +0 -94
  239. package/src/lib/components/form/textarea/form.textarea.component.css +0 -109
  240. package/src/lib/components/form/textarea/form.textarea.component.html +0 -10
  241. package/src/lib/components/form/textarea/form.textarea.component.ts +0 -76
  242. package/src/lib/components/form/textbox/form.textbox.component.css +0 -296
  243. package/src/lib/components/form/textbox/form.textbox.component.html +0 -13
  244. package/src/lib/components/form/textbox/form.textbox.component.ts +0 -185
  245. package/src/lib/components/form/time/form.time.component.css +0 -205
  246. package/src/lib/components/form/time/form.time.component.html +0 -22
  247. package/src/lib/components/form/time/form.time.component.ts +0 -139
  248. package/src/lib/components/form/tree/form.tree.component.css +0 -109
  249. package/src/lib/components/form/tree/form.tree.component.html +0 -11
  250. package/src/lib/components/form/tree/form.tree.component.ts +0 -98
  251. package/src/lib/components/form/tree/item/form.tree.item.component.css +0 -142
  252. package/src/lib/components/form/tree/item/form.tree.item.component.html +0 -9
  253. package/src/lib/components/form/tree/item/form.tree.item.component.ts +0 -49
  254. package/src/lib/components/header/header.component.css +0 -57
  255. package/src/lib/components/header/header.component.html +0 -5
  256. package/src/lib/components/header/header.component.ts +0 -28
  257. package/src/lib/components/header/sub/sub.header.component.css +0 -62
  258. package/src/lib/components/header/sub/sub.header.component.html +0 -8
  259. package/src/lib/components/header/sub/sub.header.component.ts +0 -11
  260. package/src/lib/components/layout/layout.component.css +0 -300
  261. package/src/lib/components/layout/layout.component.html +0 -20
  262. package/src/lib/components/layout/layout.component.ts +0 -21
  263. package/src/lib/components/loading/loading.component.css +0 -39
  264. package/src/lib/components/loading/loading.component.html +0 -8
  265. package/src/lib/components/loading/loading.component.ts +0 -18
  266. package/src/lib/components/login/login.component.css +0 -389
  267. package/src/lib/components/login/login.component.html +0 -27
  268. package/src/lib/components/login/login.component.ts +0 -145
  269. package/src/lib/components/modal/modal.component.css +0 -60
  270. package/src/lib/components/modal/modal.component.html +0 -12
  271. package/src/lib/components/modal/modal.component.ts +0 -23
  272. package/src/lib/components/notfound/notfound.component.css +0 -134
  273. package/src/lib/components/notfound/notfound.component.html +0 -10
  274. package/src/lib/components/notfound/notfound.component.ts +0 -25
  275. package/src/lib/components/notification/notification.component.css +0 -45
  276. package/src/lib/components/notification/notification.component.html +0 -2
  277. package/src/lib/components/notification/notification.component.ts +0 -11
  278. package/src/lib/components/sidebar/item/sidebar.item.component.css +0 -236
  279. package/src/lib/components/sidebar/item/sidebar.item.component.html +0 -16
  280. package/src/lib/components/sidebar/item/sidebar.item.component.ts +0 -54
  281. package/src/lib/components/sidebar/sidebar.component.css +0 -42
  282. package/src/lib/components/sidebar/sidebar.component.html +0 -10
  283. package/src/lib/components/sidebar/sidebar.component.ts +0 -60
  284. package/src/lib/components/steps/steps.component.css +0 -320
  285. package/src/lib/components/steps/steps.component.html +0 -18
  286. package/src/lib/components/steps/steps.component.ts +0 -44
  287. package/src/lib/components/table/loading/table.loading.component.css +0 -29
  288. package/src/lib/components/table/loading/table.loading.component.html +0 -9
  289. package/src/lib/components/table/loading/table.loading.component.ts +0 -14
  290. package/src/lib/components/table/pagination/table.pagination.component.css +0 -138
  291. package/src/lib/components/table/pagination/table.pagination.component.html +0 -9
  292. package/src/lib/components/table/pagination/table.pagination.component.ts +0 -89
  293. package/src/lib/components/table/report/table.report.component.css +0 -125
  294. package/src/lib/components/table/report/table.report.component.html +0 -19
  295. package/src/lib/components/table/report/table.report.component.ts +0 -238
  296. package/src/lib/components/table/row/table.row.component.css +0 -170
  297. package/src/lib/components/table/row/table.row.component.html +0 -21
  298. package/src/lib/components/table/row/table.row.component.ts +0 -373
  299. package/src/lib/components/table/table.component.css +0 -116
  300. package/src/lib/components/table/table.component.html +0 -62
  301. package/src/lib/components/table/table.component.ts +0 -180
  302. package/src/lib/components/tooltip/tooltip.component.css +0 -159
  303. package/src/lib/components/tooltip/tooltip.component.html +0 -1
  304. package/src/lib/components/tooltip/tooltip.component.ts +0 -15
  305. package/src/lib/ps-toolkit-ui.module.ts +0 -94
  306. package/src/lib/services/config.service.ts +0 -8
  307. package/src/test.ts +0 -26
  308. package/tsconfig.lib.json +0 -25
  309. package/tsconfig.lib.prod.json +0 -10
  310. package/tsconfig.spec.json +0 -17
  311. package/tslint.json +0 -17
@@ -1,170 +0,0 @@
1
- import {Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, ViewChild} from '@angular/core';
2
- import {InputClass} from '../../../../classes/form.class';
3
- import {InputError, InputType} from '../../../../classes/enum.class';
4
- import {HelperClass} from '../../../../classes/helper.class';
5
-
6
- @Component({
7
- selector: 'lib-form-car-search',
8
- templateUrl: './form.car.search.component.html',
9
- styleUrls: ['./form.car.search.component.css']
10
- })
11
- export class FormCarSearchComponent implements OnInit {
12
- @Input()
13
- inp: InputClass;
14
- @Output()
15
- changeIndex = new EventEmitter<string>();
16
- type = 'Car';
17
- car: InputClass;
18
- motor: InputClass;
19
- driver: InputClass;
20
- fingerprint: InputClass;
21
- wsAuth = null;
22
- @ViewChild('inputDiv') inputDiv: ElementRef;
23
- constructor(){
24
- }
25
- ngOnInit(): void {
26
- this.car = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item',
27
- 'fa-user', InputType.SelectAutoCompletePlaque);
28
- this.motor = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item',
29
- 'fa-motorcycle', InputType.SelectAutoCompletePlaqueM);
30
- this.driver = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item',
31
- null, InputType.SelectAutoComplete);
32
- this.driver.placeholder = this.inp.l('DriverName');
33
- this.fingerprint = new InputClass(this.inp.environment, this.inp.l, this.inp.name + 'Item', null, InputType.Select);
34
- this.car.displayLabel = this.motor.displayLabel = this.driver.displayLabel = this.fingerprint.displayLabel = false;
35
- this.car.url = this.motor.url = this.driver.url = this.inp.url.replace('_{}', '_' + this.type);
36
- this.car.onChange = () => {
37
- this.changeIndex.emit('Tab');
38
- if (this.inp.onChange){
39
- this.inp.onChange(this.car.data());
40
- }
41
- };
42
- this.motor.onChange = () => {
43
- this.changeIndex.emit('Tab');
44
- if (this.inp.onChange){
45
- this.inp.onChange(this.motor.data());
46
- }
47
- };
48
- this.driver.onChange = () => {
49
- this.changeIndex.emit('Tab');
50
- if (this.inp.onChange){
51
- this.inp.onChange(this.driver.data());
52
- }
53
- };
54
- this.fingerprint.onChange = () => {
55
- this.changeIndex.emit('Tab');
56
- if (this.inp.onChange){
57
- this.inp.onChange(this.fingerprint.data());
58
- }
59
- };
60
- this.fingerprint.disabled = true;
61
- this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
62
- this.inp.setValue = (v) => {
63
- if (v != null){
64
- if (v.Search && v.Search.split('_').length === 2){
65
- this.type = 'Motor';
66
- setTimeout(() => {
67
- this.motor.setValue(v.Value, false);
68
- this.motor.setSearch(v.Search);
69
- });
70
- } else if (v.Search && v.Search.split('_').length === 4){
71
- this.type = 'Car';
72
- setTimeout(() => {
73
- this.car.setValue(v.Value, false);
74
- this.car.setSearch(v.Search);
75
- });
76
- }
77
- }
78
- };
79
- this.inp.focus = () => {
80
- this.onFocusIn();
81
- };
82
- this.inp.isValid = () => {
83
- this.inp.error = null;
84
- if (this.inp.required && this.type === 'Car' && !this.car.isValid()) {
85
- this.inp.error = InputError.Required;
86
- return false;
87
- }
88
- if (this.inp.required && this.type === 'Motor' && !this.motor.isValid()) {
89
- this.inp.error = InputError.Required;
90
- return false;
91
- }
92
- if (this.inp.required && this.type === 'Driver' && !this.driver.isValid()) {
93
- this.inp.error = InputError.Required;
94
- return false;
95
- }
96
- if (this.inp.required && this.type === 'Fingerprint' && !this.fingerprint.isValid()) {
97
- this.inp.error = InputError.Required;
98
- return false;
99
- }
100
- return true;
101
- };
102
- this.inp.clear = () => {
103
- this.inp.error = null;
104
- this.inp.setValue(null, false);
105
- this.type = 'Car';
106
- this.car.clear();
107
- this.motor.clear();
108
- this.driver.clear();
109
- this.fingerprint.clear();
110
- };
111
- this.inp.data = () => {
112
- return this.type === 'Car' ? this.car.data() :
113
- this.type === 'Motor' ? this.motor.data() :
114
- this.type === 'Driver' ? this.driver.data() :
115
- this.type === 'Fingerprint' ? this.fingerprint.data() : null;
116
- };
117
- }
118
- changeType(t: string): void {
119
- this.type = t;
120
- if (t === 'Fingerprint'){
121
- this.fingerprint.loading = true;
122
- this.fingerprint.placeholder = this.inp.l('LoadingText', 'Waiting');
123
- this.fingerprint.value = null;
124
- this.fingerprint.search = null;
125
- this.wsAuth = new WebSocket('ws://localhost:7890/Auth');
126
- this.wsAuth.onopen = () => {
127
- };
128
-
129
- this.wsAuth.onmessage = (evt) => {
130
- if (this.wsAuth != null){
131
- this.wsAuth.close();
132
- }
133
- if (evt.data === 'Notfound'){
134
- HelperClass.addNotification(this.inp.l('NotfoundTitle'));
135
- this.fingerprint.placeholder = this.inp.l('NotfoundTitle');
136
- this.fingerprint.value = null;
137
- this.fingerprint.search = null;
138
- this.fingerprint.loading = false;
139
- } else if (evt.data.startsWith('Error')){
140
- HelperClass.addNotification(evt.data);
141
- this.fingerprint.placeholder = this.inp.l('NotfoundTitle');
142
- this.fingerprint.value = null;
143
- this.fingerprint.search = null;
144
- this.fingerprint.loading = false;
145
- } else {
146
- const user = JSON.parse(evt.data);
147
- this.fingerprint.value = user.Id;
148
- this.fingerprint.search = user.Name;
149
- this.fingerprint.loading = false;
150
- }
151
- this.wsAuth.close();
152
- this.wsAuth = null;
153
- };
154
- this.wsAuth.onclose = () => {
155
- };
156
- }
157
- this.car.url = this.motor.url = this.driver.url = this.inp.url.replace('_{}', '_' + this.type);
158
- }
159
- onFocusIn(): void {
160
- if (this.type === 'Car'){
161
- this.car.focus();
162
- } else if (this.type === 'Motor'){
163
- this.motor.focus();
164
- } else if (this.type === 'Driver'){
165
- this.driver.focus();
166
- } else if (this.type === 'Fingerprint'){
167
- this.fingerprint.focus();
168
- }
169
- }
170
- }
@@ -1,128 +0,0 @@
1
- .form-input-con.checkbox{
2
- float: right;
3
- width: 100%;
4
- padding: 0 15px;
5
- position: relative;
6
- }
7
- .form-input-con.checkbox .form-input{
8
- float: right;
9
- width: 100%;
10
- position: relative;
11
- }
12
- .form-input-con.checkbox .form-input .label {
13
- float: right;
14
- width: 100%;
15
- height: 20px;
16
- line-height: 20px;
17
- padding: 0 10px;
18
- font-size: 12px;
19
- margin-bottom: 3px;
20
- cursor: default;
21
- -webkit-user-select: none;
22
- -moz-user-select: none;
23
- -khtml-user-select: none;
24
- -ms-user-select: none;
25
- direction: rtl;
26
- text-align: right;
27
- }
28
- .form-input-con.checkbox .form-input .control {
29
- float: right;
30
- width: 100%;
31
- border-radius: 5px;
32
- text-align: center;
33
- height: 35px;
34
- line-height: 35px;
35
- font-size: 11px;
36
- padding: 0 35px;
37
- cursor: pointer;
38
- -webkit-user-select: none;
39
- -moz-user-select: none;
40
- -khtml-user-select: none;
41
- -ms-user-select: none;
42
- z-index: 2;
43
- position: relative;
44
- background-color: white;
45
- border: var(--border-input);
46
- }
47
- .form-input-con.checkbox .form-input .control:after {
48
- content: "\f0c8";
49
- position: absolute;
50
- font-family: "Font Awesome 5 Pro";
51
- font-weight: normal;
52
- width: 35px;
53
- height: 35px;
54
- line-height: 32px;
55
- right: 0;
56
- top: 0;
57
- font-size: 17px;
58
- }
59
-
60
- .form-input-con.checkbox .form-input .control:hover, .form-input-con.checkbox .form-input .check:focus + .control{
61
- outline: none;
62
- border: var(--border-input-dark);
63
- }
64
-
65
- .form-input-con.checkbox.error .form-input .control {
66
- border: var(--border-input-red);
67
- }
68
- .form-input-con.checkbox.error .form-input .control, .form-input-con.checkbox.error .form-input span.icon {
69
- color: var(--red);
70
- }
71
-
72
- .form-input-con.checkbox .form-input .check {
73
- position: absolute;
74
- width: 0;
75
- height: 0;
76
- opacity: 0;
77
- cursor: pointer;
78
- top: 50%;
79
- right: 50%;
80
- z-index: 1;
81
- }
82
-
83
- .form-input-con.checkbox .form-input .check:checked + .control:after {
84
- content: "\f14a";
85
- color: var(--green);
86
- font-weight: 900;
87
- animation: pop 180ms ease-in;
88
- }
89
-
90
- .form-input-con.checkbox .form-input i.icon {
91
- position: absolute;
92
- font-size: 13px;
93
- color: var(--comp);
94
- cursor: pointer;
95
- bottom: 0;
96
- z-index: 2;
97
- -webkit-transition: all .35s ease-in-out;
98
- transition: all .35s ease-in-out;
99
- width: 35px;
100
- text-align: center;
101
- height: 35px;
102
- line-height: 35px;
103
- left: 0;
104
- }
105
- .form-input-con.checkbox.without-icon .form-input .control{
106
- padding: 0 0 0 35px;
107
- }
108
- .form-input-con.checkbox.h-30 .form-input .control {
109
- height: 30px;
110
- line-height: 28px;
111
- padding: 0 30px;
112
- font-size: 10px;
113
- }
114
- .form-input-con.checkbox.h-30 .form-input .control:after {
115
- width: 30px;
116
- height: 30px;
117
- line-height: 28px;
118
- font-size: 14px;
119
- }
120
- .form-input-con.checkbox.h-30 .form-input i.icon {
121
- width: 30px;
122
- height: 30px;
123
- line-height: 30px;
124
- font-size: 11px;
125
- }
126
- .form-input-con.checkbox.h-30.without-icon .form-input .control{
127
- padding: 0 0 0 30px;
128
- }
@@ -1,8 +0,0 @@
1
- <div #inputDiv [id]="inp.name + 'Input'" [style]="inp.style" [className]="inp.class + ' form-input-con checkbox' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + (inp.icon == null ? ' without-icon' : '')">
2
- <div class="form-input" (click)="onFocusIn()">
3
- <div *ngIf="inp.displayLabel" class="label"></div>
4
- <input (keydown)="onKeyDown($event)" (change)="onChange()" [disabled]="inp.disabled" [(ngModel)]="inp.value" #inputBase type="checkbox" [name]="inp.name" class="check">
5
- <div (click)="onClick()" class="control">{{inp.l(inp.name)}}</div>
6
- <i *ngIf="inp.icon != null || inp.loading" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
7
- </div>
8
- </div>
@@ -1,64 +0,0 @@
1
- import {Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, ViewChild} from '@angular/core';
2
- import {InputClass} from '../../../classes/form.class';
3
- import {InputError} from '../../../classes/enum.class';
4
-
5
- @Component({
6
- selector: 'lib-form-checkbox',
7
- templateUrl: './form.checkbox.component.html',
8
- styleUrls: ['./form.checkbox.component.css']
9
- })
10
- export class FormCheckboxComponent implements OnInit{
11
- @Input()
12
- inp: InputClass;
13
- @Output()
14
- changeIndex = new EventEmitter<string>();
15
- @ViewChild('inputBase') inputBase: ElementRef;
16
- @ViewChild('inputDiv') inputDiv: ElementRef;
17
- constructor(){
18
- }
19
-
20
- ngOnInit(): void {
21
- this.inp.clear = () => {
22
- this.inp.error = null;
23
- this.inp.value = this.inp.default;
24
- };
25
- this.inp.isValid = () => {
26
- this.inp.error = null;
27
- if (this.inp.required && !this.inp.value) {
28
- this.inp.error = InputError.Required;
29
- return false;
30
- }
31
- return true;
32
- };
33
- this.inp.data = () => {
34
- return this.inp.value;
35
- };
36
- this.inp.setValue = (v) => {
37
- this.inp.value = v;
38
- };
39
- this.inp.focus = () => {
40
- this.onFocusIn();
41
- };
42
- }
43
- onFocusIn(): void{
44
- this.inp.error = null;
45
- this.inputBase.nativeElement.focus();
46
- }
47
- onClick(): void{
48
- this.inputBase.nativeElement.click();
49
- }
50
- onChange(): void{
51
- if (this.inp.onChange){
52
- setTimeout(() => {
53
- this.inp.onChange(this.inp);
54
- }, 1);
55
- }
56
- }
57
- onKeyDown(e): void{
58
- const code = e.keyCode || e.which;
59
- if (code === 9 || code === 13) {
60
- e.preventDefault();
61
- this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
62
- }
63
- }
64
- }
@@ -1,310 +0,0 @@
1
- .form-input-con.date {
2
- position: relative;
3
- float: right;
4
- width: 100%;
5
- padding: 0 15px;
6
- }
7
- .form-input-con.date .form-input {
8
- position: relative;
9
- float: right;
10
- width: 100%;
11
- }
12
- .form-input-con.date .form-input .label {
13
- float: right;
14
- width: 100%;
15
- height: 20px;
16
- line-height: 20px;
17
- padding: 0 10px;
18
- font-size: 12px;
19
- margin-bottom: 3px;
20
- cursor: default;
21
- -webkit-user-select: none;
22
- -moz-user-select: none;
23
- -khtml-user-select: none;
24
- -ms-user-select: none;
25
- direction: rtl;
26
- text-align: right;
27
- }
28
- .form-input-con.date.error .form-input .label {
29
- font-size: 10px;
30
- color: var(--red);
31
- }
32
- .form-input-con.date .form-input .label .required-icon{
33
- height: 20px;
34
- width: 20px;
35
- line-height: 20px;
36
- font-size: 9px;
37
- color: var(--red);
38
- text-align: center;
39
- }
40
-
41
- .form-input-con.date .form-input .control {
42
- display: block;
43
- width: 100%;
44
- height: 35px;
45
- padding: 5px 35px;
46
- font-family: Vazir;
47
- color: var(--black);
48
- background-image: none;
49
- border: none;
50
- border-radius: 5px;
51
- text-align: center;
52
- background-color: white;
53
- position: relative;
54
- z-index: 2;
55
- font-size: 11px;
56
- border: var(--border-input);
57
- }
58
- .form-input-con.date .form-input .control:focus{
59
- border-radius: 5px 5px 5px 0;
60
- }
61
- .form-input-con.date.top .form-input .control:focus{
62
- border-radius: 0 5px 5px 5px;
63
- }
64
-
65
- .form-input-con.date .form-input:hover .control, .form-input-con.date .form-input .control:focus {
66
- border: var(--border-input-dark);
67
- outline: none;
68
- }
69
-
70
- .form-input-con.date .form-input i.icon {
71
- position: absolute;
72
- font-size: 13px;
73
- color: var(--comp);
74
- cursor: text;
75
- bottom: 0;
76
- z-index: 3;
77
- -webkit-transition: all .35s ease-in-out;
78
- transition: all .35s ease-in-out;
79
- width: 35px;
80
- text-align: center;
81
- height: 35px;
82
- line-height: 35px;
83
- left: 0;
84
- }
85
- .form-input-con.date .form-input i.clear-icon {
86
- position: absolute;
87
- font-size: 14px;
88
- color: var(--red);
89
- cursor: pointer;
90
- bottom: 0;
91
- z-index: 3;
92
- -webkit-transition: all .35s ease-in-out;
93
- transition: all .35s ease-in-out;
94
- width: 35px;
95
- text-align: center;
96
- height: 35px;
97
- line-height: 38px;
98
- right: 0;
99
- }
100
-
101
- .form-input-con.date.disabled .form-input .control, .form-input-con.date.disabled .form-input i.icon, .form-input-con.date.disabled .form-input .label {
102
- cursor: default;
103
- opacity: 0.7;
104
- filter: blur(0.5px);
105
- }
106
-
107
- .form-input-con.date.error .form-input .control, .form-input-con.date.error .form-input i.icon {
108
- color: var(--red-cc);
109
- }
110
-
111
- .form-input-con.date.error .form-input .control {
112
- border: var(--border-input-red);
113
- }
114
- .form-input-con.date.error .form-input:hover .control, .form-input-con.date.error .form-input .control:focus {
115
- border: var(--border-input-red-dark);
116
- }
117
-
118
- .form-input-con.date .form-input .calendar{
119
- position: absolute;
120
- width: 200px;
121
- height: 235px;
122
- left: 0;
123
- top: -200000px;
124
- background-color: white;
125
- border: var(--border-input);
126
- border-radius: 0 0 5px 5px;
127
- overflow: hidden;
128
- -webkit-user-select: none;
129
- -moz-user-select: none;
130
- -khtml-user-select: none;
131
- -ms-user-select: none;
132
- z-index: 102;
133
- color: var(--black);
134
- }
135
- .form-input-con.date .form-input .control:focus + .calendar{
136
- top: 35px !important;
137
- }
138
-
139
- .form-input-con.date.top .form-input .control:focus + .calendar{
140
- border-radius: 5px 5px 0 0;
141
- bottom: 35px;
142
- top: unset!important;
143
- }
144
- .form-input-con.date .form-input .days-con{
145
- float: right;
146
- width: 100%;
147
- }
148
- .form-input-con.date .form-input .calendar .header{
149
- float: right;
150
- width: 100%;
151
- background: var(--black-33);
152
- }
153
- .form-input-con.date .form-input .calendar .header .previous-month, .form-input-con.date .form-input .calendar .header .next-month{
154
- float: right;
155
- width: 30px;
156
- height: 30px;
157
- line-height: 30px;
158
- cursor: pointer;
159
- font-size: 15px;
160
- text-align: center;
161
- }
162
- .form-input-con.date .form-input .calendar .header .previous-month:hover, .form-input-con.date .form-input .calendar .header .next-month:hover{
163
- background: var(--black-33);
164
- }
165
- .form-input-con.date .form-input .calendar .header .title{
166
- float: right;
167
- width: calc(100% - 60px);
168
- height: 30px;
169
- line-height: 30px;
170
- font-size: 12px;
171
- text-align: center;
172
- font-family: VazirBold;
173
- }
174
- .form-input-con.date .form-input .calendar .header .header-item{
175
- float: right;
176
- height: 20px;
177
- line-height: 20px;
178
- margin-top: 5px;
179
- margin-right: 5px;
180
- text-align: center;
181
- background-color: white;
182
- border: var(--border-input);
183
- border-radius: 5px;
184
- cursor: pointer;
185
- }
186
- .form-input-con.date .form-input .calendar .header .header-item:hover{
187
- background-color: var(--base-11);
188
- }
189
- .form-input-con.date .form-input .calendar .header .header-item.year{
190
- width: calc(40% - 10px);
191
- }
192
- .form-input-con.date .form-input .calendar .header .header-item.month{
193
- width: calc(60% - 10px);
194
- }
195
- .form-input-con.date .form-input .calendar .days-con .day-names{
196
- float: right;
197
- width: 100%;
198
- font-size: 12px;
199
- text-align: center;
200
- font-family: VazirLight;
201
- position: relative;
202
- }
203
- .form-input-con.date .form-input .calendar .days-con .day-names .item{
204
- float: right;
205
- width: calc(100% / 7);
206
- height: 25px;
207
- line-height: 25px;
208
- font-size: 12px;
209
- text-align: center;
210
- }
211
- .form-input-con.date .form-input .calendar .days-con .days{
212
- float: right;
213
- width: 100%;
214
- font-size: 12px;
215
- text-align: center;
216
- }
217
- .form-input-con.date .form-input .calendar .days-con .days .item{
218
- float: right;
219
- width: calc(100% / 7);
220
- height: 30px;
221
- line-height: 30px;
222
- font-size: 11px;
223
- text-align: center;
224
- cursor: pointer;
225
- }
226
- .form-input-con.date .form-input .calendar .days-con .days .item.not-in-month{
227
- cursor: default;
228
- opacity: 0.5;
229
- }
230
- .form-input-con.date .form-input .calendar .days-con .days .item:hover{
231
- background-color: var(--black-33);
232
- }
233
- .form-input-con.date .form-input .calendar .days-con .days .item.not-in-month:hover{
234
- background-color: unset;
235
- }
236
- .form-input-con.date .form-input .calendar .days-con .days .item.today{
237
- background-color: var(--black-33);
238
- }
239
- .form-input-con.date .form-input .calendar .days-con .days .item.selected{
240
- background-color: var(--comp);
241
- color: white;
242
- }
243
- .form-input-con.date .form-input .calendar .days-con .days .item.today.not-in-month:hover{
244
- background-color: var(--black-33);
245
- }
246
-
247
- .form-input-con.date .form-input .calendar .months-con{
248
- float: right;
249
- width: 100%;
250
- }
251
-
252
- .form-input-con.date .form-input .calendar .months-con .month{
253
- float: right;
254
- width: calc(100% / 3);
255
- height: calc(205px / 4);
256
- line-height: calc(205px / 4);
257
- font-size: 11px;
258
- text-align: center;
259
- cursor: pointer;
260
- }
261
- .form-input-con.date .form-input .calendar .months-con .month:hover{
262
- background-color: var(--black-33);
263
- }
264
-
265
- .form-input-con.date .form-input .calendar .months-con .month.selected{
266
- background-color: var(--black-33);
267
- }
268
-
269
-
270
- .form-input-con.date .form-input .calendar .years-con{
271
- float: right;
272
- width: 100%;
273
- }
274
-
275
- .form-input-con.date .form-input .calendar .years-con .year{
276
- float: right;
277
- width: calc(100% / 4);
278
- height: calc(205px / 5);
279
- line-height: calc(205px / 5);
280
- font-size: 11px;
281
- text-align: center;
282
- cursor: pointer;
283
- }
284
- .form-input-con.date .form-input .calendar .years-con .year:hover{
285
- background-color: var(--black-33);
286
- }
287
-
288
- .form-input-con.date .form-input .calendar .years-con .year.selected{
289
- background-color: var(--black-33);
290
- }
291
-
292
- .form-input-con.date.table-search {
293
- width: 100%;
294
- float: right;
295
- padding: 0;
296
- }
297
- .form-input-con.date.h-25 .form-input .control {
298
- height: 25px;
299
- padding: 5px;
300
- }
301
- .form-input-con.date.h-25 .form-input i.icon {
302
- display: none;
303
- }
304
- .form-input-con.date.h-25 .form-input .control:focus + .calendar{
305
- top: 25px !important;
306
- }
307
-
308
- .form-input-con.date.top.h-25 .form-input .control:focus + .calendar{
309
- bottom: 25px;
310
- }