ps-toolkit-ui 0.0.210 → 0.0.211

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/karma.conf.js +32 -0
  2. package/ng-package.json +16 -0
  3. package/package.json +19 -22
  4. package/src/lib/classes/chart.class.ts +140 -0
  5. package/src/lib/classes/enum.class.ts +193 -0
  6. package/src/lib/classes/excel.class.ts +46 -0
  7. package/src/lib/classes/form.class.ts +528 -0
  8. package/src/lib/classes/helper.class.ts +283 -0
  9. package/src/lib/classes/lang.class.ts +32 -0
  10. package/src/lib/classes/login.class.ts +27 -0
  11. package/src/lib/classes/modal.class.ts +59 -0
  12. package/src/lib/classes/permission.class.ts +55 -0
  13. package/src/lib/classes/request.class.ts +255 -0
  14. package/src/lib/classes/safestyle.class.ts +4 -0
  15. package/src/lib/classes/sidebar.class.ts +20 -0
  16. package/src/lib/classes/steps.class.ts +19 -0
  17. package/src/lib/classes/string.class.ts +219 -0
  18. package/src/lib/classes/table.class.ts +228 -0
  19. package/src/lib/components/accordion/accordion.component.css +116 -0
  20. package/src/lib/components/accordion/accordion.component.html +19 -0
  21. package/src/lib/components/accordion/accordion.component.ts +41 -0
  22. package/src/lib/components/alert/alert.component.css +112 -0
  23. package/src/lib/components/alert/alert.component.html +1 -0
  24. package/src/lib/components/alert/alert.component.ts +35 -0
  25. package/src/lib/components/base.component.ts +38 -0
  26. package/src/lib/components/calendar/calendar.component.css +206 -0
  27. package/src/lib/components/calendar/calendar.component.html +36 -0
  28. package/src/lib/components/calendar/calendar.component.ts +99 -0
  29. package/src/lib/components/chart/chart.component.css +24 -0
  30. package/src/lib/components/chart/chart.component.html +6 -0
  31. package/src/lib/components/chart/chart.component.ts +14 -0
  32. package/src/lib/components/clock/clock.component.css +141 -0
  33. package/src/lib/components/clock/clock.component.html +10 -0
  34. package/src/lib/components/clock/clock.component.ts +37 -0
  35. package/src/lib/components/confirm/confirm.component.css +112 -0
  36. package/src/lib/components/confirm/confirm.component.html +1 -0
  37. package/src/lib/components/confirm/confirm.component.ts +47 -0
  38. package/src/lib/components/footer/footer.component.css +46 -0
  39. package/src/lib/components/footer/footer.component.html +9 -0
  40. package/src/lib/components/footer/footer.component.ts +18 -0
  41. package/src/lib/components/form/bank-card/form.bank-card.component.css +115 -0
  42. package/src/lib/components/form/bank-card/form.bank-card.component.html +13 -0
  43. package/src/lib/components/form/bank-card/form.bank-card.component.ts +144 -0
  44. package/src/lib/components/form/button/form.button.component.css +222 -0
  45. package/src/lib/components/form/button/form.button.component.html +16 -0
  46. package/src/lib/components/form/button/form.button.component.ts +65 -0
  47. package/src/lib/components/form/car/form.car.component.css +287 -0
  48. package/src/lib/components/form/car/form.car.component.html +11 -0
  49. package/src/lib/components/form/car/form.car.component.ts +82 -0
  50. package/src/lib/components/form/car/search/form.car.search.component.css +287 -0
  51. package/src/lib/components/form/car/search/form.car.search.component.html +15 -0
  52. package/src/lib/components/form/car/search/form.car.search.component.ts +170 -0
  53. package/src/lib/components/form/checkbox/form.checkbox.component.css +128 -0
  54. package/src/lib/components/form/checkbox/form.checkbox.component.html +8 -0
  55. package/src/lib/components/form/checkbox/form.checkbox.component.ts +64 -0
  56. package/src/lib/components/form/date/form.date.component.css +310 -0
  57. package/src/lib/components/form/date/form.date.component.html +46 -0
  58. package/src/lib/components/form/date/form.date.component.ts +247 -0
  59. package/src/lib/components/form/datetime/form.datetime.component.css +157 -0
  60. package/src/lib/components/form/datetime/form.datetime.component.html +11 -0
  61. package/src/lib/components/form/datetime/form.datetime.component.ts +98 -0
  62. package/src/lib/components/form/file/form.file.component.css +151 -0
  63. package/src/lib/components/form/file/form.file.component.html +12 -0
  64. package/src/lib/components/form/file/form.file.component.ts +130 -0
  65. package/src/lib/components/form/finger/form.finger.component.css +215 -0
  66. package/src/lib/components/form/finger/form.finger.component.html +59 -0
  67. package/src/lib/components/form/finger/form.finger.component.ts +131 -0
  68. package/src/lib/components/form/hidden/form.hidden.component.css +0 -0
  69. package/src/lib/components/form/hidden/form.hidden.component.html +0 -0
  70. package/src/lib/components/form/hidden/form.hidden.component.ts +29 -0
  71. package/src/lib/components/form/icon/form.icon.component.css +108 -0
  72. package/src/lib/components/form/icon/form.icon.component.html +14 -0
  73. package/src/lib/components/form/icon/form.icon.component.ts +73 -0
  74. package/src/lib/components/form/index/form.component.css +89 -0
  75. package/src/lib/components/form/index/form.component.html +35 -0
  76. package/src/lib/components/form/index/form.component.ts +45 -0
  77. package/src/lib/components/form/label/form.label.component.css +45 -0
  78. package/src/lib/components/form/label/form.label.component.html +2 -0
  79. package/src/lib/components/form/label/form.label.component.ts +30 -0
  80. package/src/lib/components/form/plaque/form.plaque.component.css +76 -0
  81. package/src/lib/components/form/plaque/form.plaque.component.html +10 -0
  82. package/src/lib/components/form/plaque/form.plaque.component.ts +178 -0
  83. package/src/lib/components/form/plaque/select/form.plaque.select.component.css +167 -0
  84. package/src/lib/components/form/plaque/select/form.plaque.select.component.html +19 -0
  85. package/src/lib/components/form/plaque/select/form.plaque.select.component.ts +385 -0
  86. package/src/lib/components/form/radio/form.radio.component.css +158 -0
  87. package/src/lib/components/form/radio/form.radio.component.html +16 -0
  88. package/src/lib/components/form/radio/form.radio.component.ts +78 -0
  89. package/src/lib/components/form/select/form.select.component.css +326 -0
  90. package/src/lib/components/form/select/form.select.component.html +16 -0
  91. package/src/lib/components/form/select/form.select.component.ts +358 -0
  92. package/src/lib/components/form/select/item/form.select.item.component.css +59 -0
  93. package/src/lib/components/form/select/item/form.select.item.component.html +10 -0
  94. package/src/lib/components/form/select/item/form.select.item.component.ts +40 -0
  95. package/src/lib/components/form/table/form.table.component.css +50 -0
  96. package/src/lib/components/form/table/form.table.component.html +8 -0
  97. package/src/lib/components/form/table/form.table.component.ts +94 -0
  98. package/src/lib/components/form/textarea/form.textarea.component.css +109 -0
  99. package/src/lib/components/form/textarea/form.textarea.component.html +10 -0
  100. package/src/lib/components/form/textarea/form.textarea.component.ts +76 -0
  101. package/src/lib/components/form/textbox/form.textbox.component.css +296 -0
  102. package/src/lib/components/form/textbox/form.textbox.component.html +13 -0
  103. package/src/lib/components/form/textbox/form.textbox.component.ts +185 -0
  104. package/src/lib/components/form/time/form.time.component.css +205 -0
  105. package/src/lib/components/form/time/form.time.component.html +22 -0
  106. package/src/lib/components/form/time/form.time.component.ts +139 -0
  107. package/src/lib/components/form/tree/form.tree.component.css +109 -0
  108. package/src/lib/components/form/tree/form.tree.component.html +11 -0
  109. package/src/lib/components/form/tree/form.tree.component.ts +98 -0
  110. package/src/lib/components/form/tree/item/form.tree.item.component.css +142 -0
  111. package/src/lib/components/form/tree/item/form.tree.item.component.html +9 -0
  112. package/src/lib/components/form/tree/item/form.tree.item.component.ts +49 -0
  113. package/src/lib/components/header/header.component.css +57 -0
  114. package/src/lib/components/header/header.component.html +5 -0
  115. package/src/lib/components/header/header.component.ts +28 -0
  116. package/src/lib/components/header/sub/sub.header.component.css +62 -0
  117. package/src/lib/components/header/sub/sub.header.component.html +8 -0
  118. package/src/lib/components/header/sub/sub.header.component.ts +11 -0
  119. package/src/lib/components/layout/layout.component.css +300 -0
  120. package/src/lib/components/layout/layout.component.html +20 -0
  121. package/src/lib/components/layout/layout.component.ts +21 -0
  122. package/src/lib/components/loading/loading.component.css +39 -0
  123. package/src/lib/components/loading/loading.component.html +8 -0
  124. package/src/lib/components/loading/loading.component.ts +18 -0
  125. package/src/lib/components/login/login.component.css +389 -0
  126. package/src/lib/components/login/login.component.html +27 -0
  127. package/src/lib/components/login/login.component.ts +145 -0
  128. package/src/lib/components/modal/modal.component.css +60 -0
  129. package/src/lib/components/modal/modal.component.html +12 -0
  130. package/src/lib/components/modal/modal.component.ts +23 -0
  131. package/src/lib/components/notfound/notfound.component.css +134 -0
  132. package/src/lib/components/notfound/notfound.component.html +10 -0
  133. package/src/lib/components/notfound/notfound.component.ts +25 -0
  134. package/src/lib/components/notification/notification.component.css +45 -0
  135. package/src/lib/components/notification/notification.component.html +2 -0
  136. package/src/lib/components/notification/notification.component.ts +11 -0
  137. package/src/lib/components/sidebar/item/sidebar.item.component.css +236 -0
  138. package/src/lib/components/sidebar/item/sidebar.item.component.html +16 -0
  139. package/src/lib/components/sidebar/item/sidebar.item.component.ts +54 -0
  140. package/src/lib/components/sidebar/sidebar.component.css +42 -0
  141. package/src/lib/components/sidebar/sidebar.component.html +10 -0
  142. package/src/lib/components/sidebar/sidebar.component.ts +60 -0
  143. package/src/lib/components/steps/steps.component.css +320 -0
  144. package/src/lib/components/steps/steps.component.html +18 -0
  145. package/src/lib/components/steps/steps.component.ts +44 -0
  146. package/src/lib/components/table/loading/table.loading.component.css +29 -0
  147. package/src/lib/components/table/loading/table.loading.component.html +9 -0
  148. package/src/lib/components/table/loading/table.loading.component.ts +14 -0
  149. package/src/lib/components/table/pagination/table.pagination.component.css +138 -0
  150. package/src/lib/components/table/pagination/table.pagination.component.html +9 -0
  151. package/src/lib/components/table/pagination/table.pagination.component.ts +89 -0
  152. package/src/lib/components/table/report/table.report.component.css +125 -0
  153. package/src/lib/components/table/report/table.report.component.html +19 -0
  154. package/src/lib/components/table/report/table.report.component.ts +238 -0
  155. package/src/lib/components/table/row/table.row.component.css +170 -0
  156. package/src/lib/components/table/row/table.row.component.html +21 -0
  157. package/src/lib/components/table/row/table.row.component.ts +373 -0
  158. package/src/lib/components/table/table.component.css +116 -0
  159. package/src/lib/components/table/table.component.html +62 -0
  160. package/src/lib/components/table/table.component.ts +180 -0
  161. package/src/lib/components/tooltip/tooltip.component.css +159 -0
  162. package/src/lib/components/tooltip/tooltip.component.html +1 -0
  163. package/src/lib/components/tooltip/tooltip.component.ts +15 -0
  164. package/src/lib/ps-toolkit-ui.module.ts +94 -0
  165. package/src/lib/services/config.service.ts +8 -0
  166. package/{public-api.d.ts → src/public-api.ts} +53 -48
  167. package/src/test.ts +26 -0
  168. package/tsconfig.lib.json +25 -0
  169. package/tsconfig.lib.prod.json +10 -0
  170. package/tsconfig.spec.json +17 -0
  171. package/tslint.json +17 -0
  172. package/bundles/ps-toolkit-ui.umd.js +0 -7646
  173. package/bundles/ps-toolkit-ui.umd.js.map +0 -1
  174. package/bundles/ps-toolkit-ui.umd.min.js +0 -2
  175. package/bundles/ps-toolkit-ui.umd.min.js.map +0 -1
  176. package/esm2015/lib/classes/chart.class.js +0 -140
  177. package/esm2015/lib/classes/enum.class.js +0 -187
  178. package/esm2015/lib/classes/form.class.js +0 -481
  179. package/esm2015/lib/classes/helper.class.js +0 -284
  180. package/esm2015/lib/classes/lang.class.js +0 -32
  181. package/esm2015/lib/classes/login.class.js +0 -22
  182. package/esm2015/lib/classes/modal.class.js +0 -52
  183. package/esm2015/lib/classes/permission.class.js +0 -61
  184. package/esm2015/lib/classes/request.class.js +0 -256
  185. package/esm2015/lib/classes/safestyle.class.js +0 -15
  186. package/esm2015/lib/classes/sidebar.class.js +0 -14
  187. package/esm2015/lib/classes/steps.class.js +0 -20
  188. package/esm2015/lib/classes/string.class.js +0 -220
  189. package/esm2015/lib/classes/table.class.js +0 -215
  190. package/esm2015/lib/components/accordion/accordion.component.js +0 -45
  191. package/esm2015/lib/components/alert/alert.component.js +0 -39
  192. package/esm2015/lib/components/base.component.js +0 -45
  193. package/esm2015/lib/components/calendar/calendar.component.js +0 -97
  194. package/esm2015/lib/components/chart/chart.component.js +0 -17
  195. package/esm2015/lib/components/clock/clock.component.js +0 -33
  196. package/esm2015/lib/components/confirm/confirm.component.js +0 -50
  197. package/esm2015/lib/components/footer/footer.component.js +0 -23
  198. package/esm2015/lib/components/form/bank-card/form.bank-card.component.js +0 -148
  199. package/esm2015/lib/components/form/button/form.button.component.js +0 -68
  200. package/esm2015/lib/components/form/car/form.car.component.js +0 -84
  201. package/esm2015/lib/components/form/car/search/form.car.search.component.js +0 -172
  202. package/esm2015/lib/components/form/checkbox/form.checkbox.component.js +0 -66
  203. package/esm2015/lib/components/form/date/form.date.component.js +0 -254
  204. package/esm2015/lib/components/form/datetime/form.datetime.component.js +0 -104
  205. package/esm2015/lib/components/form/file/form.file.component.js +0 -133
  206. package/esm2015/lib/components/form/finger/form.finger.component.js +0 -138
  207. package/esm2015/lib/components/form/hidden/form.hidden.component.js +0 -31
  208. package/esm2015/lib/components/form/icon/form.icon.component.js +0 -76
  209. package/esm2015/lib/components/form/index/form.component.js +0 -48
  210. package/esm2015/lib/components/form/label/form.label.component.js +0 -32
  211. package/esm2015/lib/components/form/plaque/form.plaque.component.js +0 -176
  212. package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +0 -390
  213. package/esm2015/lib/components/form/radio/form.radio.component.js +0 -79
  214. package/esm2015/lib/components/form/select/form.select.component.js +0 -374
  215. package/esm2015/lib/components/form/select/item/form.select.item.component.js +0 -43
  216. package/esm2015/lib/components/form/table/form.table.component.js +0 -98
  217. package/esm2015/lib/components/form/textarea/form.textarea.component.js +0 -78
  218. package/esm2015/lib/components/form/textbox/form.textbox.component.js +0 -186
  219. package/esm2015/lib/components/form/time/form.time.component.js +0 -145
  220. package/esm2015/lib/components/form/tree/form.tree.component.js +0 -99
  221. package/esm2015/lib/components/form/tree/item/form.tree.item.component.js +0 -48
  222. package/esm2015/lib/components/header/header.component.js +0 -33
  223. package/esm2015/lib/components/header/sub/sub.header.component.js +0 -14
  224. package/esm2015/lib/components/layout/layout.component.js +0 -25
  225. package/esm2015/lib/components/loading/loading.component.js +0 -22
  226. package/esm2015/lib/components/login/login.component.js +0 -148
  227. package/esm2015/lib/components/modal/modal.component.js +0 -25
  228. package/esm2015/lib/components/notfound/notfound.component.js +0 -29
  229. package/esm2015/lib/components/notification/notification.component.js +0 -14
  230. package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +0 -53
  231. package/esm2015/lib/components/sidebar/sidebar.component.js +0 -67
  232. package/esm2015/lib/components/steps/steps.component.js +0 -51
  233. package/esm2015/lib/components/table/loading/table.loading.component.js +0 -17
  234. package/esm2015/lib/components/table/pagination/table.pagination.component.js +0 -84
  235. package/esm2015/lib/components/table/report/table.report.component.js +0 -246
  236. package/esm2015/lib/components/table/row/table.row.component.js +0 -379
  237. package/esm2015/lib/components/table/table.component.js +0 -179
  238. package/esm2015/lib/components/tooltip/tooltip.component.js +0 -19
  239. package/esm2015/lib/ps-toolkit-ui.module.js +0 -95
  240. package/esm2015/lib/services/config.service.js +0 -14
  241. package/esm2015/ps-toolkit-ui.js +0 -20
  242. package/esm2015/public-api.js +0 -52
  243. package/fesm2015/ps-toolkit-ui.js +0 -6566
  244. package/fesm2015/ps-toolkit-ui.js.map +0 -1
  245. package/lib/classes/chart.class.d.ts +0 -11
  246. package/lib/classes/enum.class.d.ts +0 -158
  247. package/lib/classes/form.class.d.ts +0 -173
  248. package/lib/classes/helper.class.d.ts +0 -28
  249. package/lib/classes/lang.class.d.ts +0 -5
  250. package/lib/classes/login.class.d.ts +0 -17
  251. package/lib/classes/modal.class.d.ts +0 -19
  252. package/lib/classes/permission.class.d.ts +0 -31
  253. package/lib/classes/request.class.d.ts +0 -12
  254. package/lib/classes/safestyle.class.d.ts +0 -7
  255. package/lib/classes/sidebar.class.d.ts +0 -11
  256. package/lib/classes/steps.class.d.ts +0 -17
  257. package/lib/classes/string.class.d.ts +0 -218
  258. package/lib/classes/table.class.d.ts +0 -69
  259. package/lib/components/accordion/accordion.component.d.ts +0 -7
  260. package/lib/components/alert/alert.component.d.ts +0 -10
  261. package/lib/components/base.component.d.ts +0 -14
  262. package/lib/components/calendar/calendar.component.d.ts +0 -26
  263. package/lib/components/chart/chart.component.d.ts +0 -5
  264. package/lib/components/clock/clock.component.d.ts +0 -11
  265. package/lib/components/confirm/confirm.component.d.ts +0 -14
  266. package/lib/components/footer/footer.component.d.ts +0 -6
  267. package/lib/components/form/bank-card/form.bank-card.component.d.ts +0 -22
  268. package/lib/components/form/button/form.button.component.d.ts +0 -15
  269. package/lib/components/form/car/form.car.component.d.ts +0 -16
  270. package/lib/components/form/car/search/form.car.search.component.d.ts +0 -17
  271. package/lib/components/form/checkbox/form.checkbox.component.d.ts +0 -14
  272. package/lib/components/form/date/form.date.component.d.ts +0 -42
  273. package/lib/components/form/datetime/form.datetime.component.d.ts +0 -13
  274. package/lib/components/form/file/form.file.component.d.ts +0 -17
  275. package/lib/components/form/finger/form.finger.component.d.ts +0 -15
  276. package/lib/components/form/hidden/form.hidden.component.d.ts +0 -7
  277. package/lib/components/form/icon/form.icon.component.d.ts +0 -15
  278. package/lib/components/form/index/form.component.d.ts +0 -10
  279. package/lib/components/form/label/form.label.component.d.ts +0 -8
  280. package/lib/components/form/plaque/form.plaque.component.d.ts +0 -22
  281. package/lib/components/form/plaque/select/form.plaque.select.component.d.ts +0 -36
  282. package/lib/components/form/radio/form.radio.component.d.ts +0 -13
  283. package/lib/components/form/select/form.select.component.d.ts +0 -39
  284. package/lib/components/form/select/item/form.select.item.component.d.ts +0 -12
  285. package/lib/components/form/table/form.table.component.d.ts +0 -9
  286. package/lib/components/form/textarea/form.textarea.component.d.ts +0 -13
  287. package/lib/components/form/textbox/form.textbox.component.d.ts +0 -20
  288. package/lib/components/form/time/form.time.component.d.ts +0 -25
  289. package/lib/components/form/tree/form.tree.component.d.ts +0 -16
  290. package/lib/components/form/tree/item/form.tree.item.component.d.ts +0 -17
  291. package/lib/components/header/header.component.d.ts +0 -9
  292. package/lib/components/header/sub/sub.header.component.d.ts +0 -3
  293. package/lib/components/layout/layout.component.d.ts +0 -8
  294. package/lib/components/loading/loading.component.d.ts +0 -5
  295. package/lib/components/login/login.component.d.ts +0 -13
  296. package/lib/components/modal/modal.component.d.ts +0 -9
  297. package/lib/components/notfound/notfound.component.d.ts +0 -8
  298. package/lib/components/notification/notification.component.d.ts +0 -3
  299. package/lib/components/sidebar/item/sidebar.item.component.d.ts +0 -14
  300. package/lib/components/sidebar/sidebar.component.d.ts +0 -19
  301. package/lib/components/steps/steps.component.d.ts +0 -10
  302. package/lib/components/table/loading/table.loading.component.d.ts +0 -5
  303. package/lib/components/table/pagination/table.pagination.component.d.ts +0 -15
  304. package/lib/components/table/report/table.report.component.d.ts +0 -34
  305. package/lib/components/table/row/table.row.component.d.ts +0 -34
  306. package/lib/components/table/table.component.d.ts +0 -40
  307. package/lib/components/tooltip/tooltip.component.d.ts +0 -5
  308. package/lib/ps-toolkit-ui.module.d.ts +0 -4
  309. package/lib/services/config.service.d.ts +0 -6
  310. package/ps-toolkit-ui.d.ts +0 -19
  311. package/ps-toolkit-ui.metadata.json +0 -1
@@ -0,0 +1,170 @@
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
+ }
@@ -0,0 +1,128 @@
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
+ }
@@ -0,0 +1,8 @@
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>
@@ -0,0 +1,64 @@
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
+ }
@@ -0,0 +1,310 @@
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
+ }