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,47 @@
1
+ import {Component, Input, OnInit} from '@angular/core';
2
+ import {FormClass, InputClass} from '../../classes/form.class';
3
+ import {ModalClass} from '../../classes/modal.class';
4
+ import {InputType} from '../../classes/enum.class';
5
+ import {PsToolkitUiConfigService} from '../../services/config.service';
6
+ import {LangClass} from '../../classes/lang.class';
7
+
8
+ @Component({
9
+ selector: 'lib-confirm',
10
+ templateUrl: './confirm.component.html',
11
+ styleUrls: ['./confirm.component.css']
12
+ })
13
+ export class ConfirmComponent implements OnInit{
14
+ @Input()
15
+ tableId: string;
16
+ l: (k, v?) => string;
17
+ confirm: ModalClass;
18
+ confirmLabel: InputClass;
19
+ constructor(public config: PsToolkitUiConfigService){
20
+ const lang = new LangClass(config.currentLang, config.strings);
21
+ this.l = (key: string, v = null): string => {
22
+ return lang.get('Public', 'Confirm', key, v);
23
+ };
24
+ }
25
+ ngOnInit(): void {
26
+ this.confirm = new ModalClass(this.config.environment, this.l, (this.tableId ? this.tableId : '') + 'Confirm');
27
+ this.confirm.form = new FormClass(this.config.environment, this.l, 'Confirm');
28
+ this.confirmLabel = new InputClass(this.config.environment, this.l, 'Confirm', null, InputType.Label, 'f-s-16 p-h-20 p-t-10 l-h-30', 'Confirm');
29
+ this.confirm.form.inputs = [
30
+ this.confirmLabel,
31
+ ];
32
+ this.confirm.form.addButtons('Accept', 'blue', false);
33
+ }
34
+
35
+ show(l: string, url: string, data, accept: (btn: InputClass) => void): void{
36
+ this.confirmLabel.value = l;
37
+ this.confirm.form.url = url;
38
+ this.confirm.form.data = () => {
39
+ return data;
40
+ };
41
+ this.confirm.form.onSuccess = (btn) => {
42
+ this.confirm.hide();
43
+ accept(btn);
44
+ };
45
+ this.confirm.show();
46
+ }
47
+ }
@@ -0,0 +1,46 @@
1
+ #Footer{
2
+ position: fixed;
3
+ width: 100%;
4
+ line-height: 35px;
5
+ background-color: var(--base-dark);
6
+ bottom: 0;
7
+ right: 0;
8
+ color: white;
9
+ text-align: center;
10
+ z-index: 2;
11
+ font-size: 12px;
12
+ font-family: VazirBold;
13
+ }
14
+
15
+ #Footer .copyright, #Footer .creator{
16
+ float: right;
17
+ width: 50%;
18
+ }
19
+
20
+ #Footer .copyright i, #Footer .creator i, #Footer .creator a{
21
+ color: var(--comp)!important;
22
+ }
23
+
24
+
25
+ @media (max-width: 399.98px) {
26
+ #Footer .copyright, #Footer .creator{
27
+ width: 100%;
28
+ font-size: 11px;
29
+ line-height: 30px;
30
+ }
31
+ }
32
+
33
+ @media (min-width: 400px) and (max-width: 499.98px) {
34
+ #Footer .copyright, #Footer .creator{
35
+ width: 100%;
36
+ line-height: 30px;
37
+ }
38
+ }
39
+
40
+ @media (min-width: 500px) and (max-width: 599.98px) {
41
+ #Footer .copyright, #Footer .creator{
42
+ width: 100%;
43
+ line-height: 30px;
44
+ }
45
+
46
+ }
@@ -0,0 +1,9 @@
1
+ <div id="Footer">
2
+ <div class="copyright">
3
+ <i class="far fa-copyright"></i>
4
+ {{l('Copyright')}}
5
+ </div>
6
+ <div class="creator">
7
+ <i class="fas fa-heart"></i> {{l('CreatorDesc')}} <a href="http://partsilicon.ir/" target="_blank">{{l('CreatorCom')}}</a>
8
+ </div>
9
+ </div>
@@ -0,0 +1,18 @@
1
+ import {Component} from '@angular/core';
2
+ import {LangClass} from '../../classes/lang.class';
3
+ import {PsToolkitUiConfigService} from '../../services/config.service';
4
+
5
+ @Component({
6
+ selector: 'lib-footer',
7
+ templateUrl: './footer.component.html',
8
+ styleUrls: ['./footer.component.css']
9
+ })
10
+ export class FooterComponent{
11
+ l: (k, v?) => string;
12
+ constructor(public config: PsToolkitUiConfigService){
13
+ const lang = new LangClass(config.currentLang, config.strings);
14
+ this.l = (key: string, v = null): string => {
15
+ return lang.get('Public', 'Footer', key, v);
16
+ };
17
+ }
18
+ }
@@ -0,0 +1,115 @@
1
+ .form-input-con.bank-card {
2
+ position: relative;
3
+ float: right;
4
+ width: 100%;
5
+ padding: 0 15px;
6
+ }
7
+ .form-input-con.bank-card .form-input {
8
+ position: relative;
9
+ float: right;
10
+ width: 100%;
11
+ }
12
+
13
+ .form-input-con.bank-card .form-input .label {
14
+ float: right;
15
+ width: 100%;
16
+ height: 20px;
17
+ line-height: 20px;
18
+ padding: 0 10px;
19
+ font-size: 12px;
20
+ margin-bottom: 3px;
21
+ cursor: default;
22
+ -webkit-user-select: none;
23
+ -moz-user-select: none;
24
+ -khtml-user-select: none;
25
+ -ms-user-select: none;
26
+ direction: rtl;
27
+ text-align: right;
28
+ }
29
+ .form-input-con.bank-card.error .form-input .label {
30
+ font-size: 10px;
31
+ color: var(--red);
32
+ }
33
+ .form-input-con.bank-card .form-input .label .required-icon{
34
+ height: 20px;
35
+ width: 20px;
36
+ line-height: 20px;
37
+ font-size: 9px;
38
+ color: var(--red);
39
+ text-align: center;
40
+ }
41
+ .form-input-con.bank-card .form-input .control {
42
+ float: right;
43
+ width: 100%;
44
+ height: 35px;
45
+ padding: 0 35px;
46
+ border-radius: 5px;
47
+ border: var(--border-input);
48
+ background-color: white;
49
+ position: relative;
50
+ direction: ltr;
51
+ overflow: hidden;
52
+ }
53
+ .form-input-con.bank-card .form-input:hover .control, .form-input-con.bank-card .form-input .control:focus {
54
+ outline: none;
55
+ border: var(--border-input-dark);
56
+ }
57
+
58
+ .form-input-con.bank-card.error .form-input .control {
59
+ border: var(--border-input-red);
60
+ }
61
+ .form-input-con.bank-card.error .form-input .control, .form-input-con.bank-card.error .form-input span.icon {
62
+ color: var(--red);
63
+ }
64
+ .form-input-con.bank-card.error .form-input:hover .control, .form-input-con.bank-card.error .form-input .control:focus {
65
+ border: var(--border-input-red-dark);
66
+ }
67
+ .form-input-con.bank-card.without-icon .form-input .control {
68
+ padding: 5px 10px;
69
+ }
70
+
71
+ .form-input-con.bank-card .form-input i.icon {
72
+ position: absolute;
73
+ font-size: 14px;
74
+ color: var(--comp);
75
+ cursor: text;
76
+ bottom: 0;
77
+ z-index: 2;
78
+ -webkit-transition: all .35s ease-in-out;
79
+ transition: all .35s ease-in-out;
80
+ width: 35px;
81
+ text-align: center;
82
+ height: 35px;
83
+ line-height: 35px;
84
+ left: 0;
85
+ text-align: center;
86
+ }
87
+ .form-input-con.bank-card .form-input i.clear-icon {
88
+ position: absolute;
89
+ font-size: 14px;
90
+ color: var(--red);
91
+ cursor: pointer;
92
+ bottom: 0;
93
+ z-index: 3;
94
+ -webkit-transition: all .35s ease-in-out;
95
+ transition: all .35s ease-in-out;
96
+ width: 35px;
97
+ text-align: center;
98
+ height: 35px;
99
+ line-height: 38px;
100
+ right: 0;
101
+ }
102
+ .form-input-con.bank-card.disabled .form-input .control, .form-input-con.bank-card.disabled .form-input i.icon, .form-input-con.bank-card.disabled .form-input .label {
103
+ cursor: default;
104
+ box-shadow: unset;
105
+ opacity: 0.7;
106
+ filter: blur(0.5px);
107
+ -webkit-user-select: none;
108
+ -moz-user-select: none;
109
+ -khtml-user-select: none;
110
+ -ms-user-select: none;
111
+ }
112
+
113
+ .form-input-con.bank-card.without-icon .form-input .control {
114
+ padding: 5px 10px;
115
+ }
@@ -0,0 +1,13 @@
1
+ <div #inputDiv [id]="inp.name + 'Input'" [style]="inp.style" [className]="inp.class + ' form-input-con bank-card' + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.icon == null ? ' without-icon' : '')">
2
+ <div class="form-input" (click)="onFocusIn($event)">
3
+ <div (click)="part1.focus()" *ngIf="inp.displayLabel" class="label"><i *ngIf="inp.required" class="fas fa-star-of-life required-icon"></i>{{inp.getLabel()}}</div>
4
+ <div class="control">
5
+ <lib-form-textbox (changeIndex)="changeFocus('Part1', $event)" [inp]="part1"></lib-form-textbox>
6
+ <lib-form-textbox (changeIndex)="changeFocus('Part2', $event)" [inp]="part2"></lib-form-textbox>
7
+ <lib-form-textbox (changeIndex)="changeFocus('Part3', $event)" [inp]="part3"></lib-form-textbox>
8
+ <lib-form-textbox (changeIndex)="changeFocus('Part4', $event)" [inp]="part4"></lib-form-textbox>
9
+ </div>
10
+ <i *ngIf="inp.icon != null || inp.loading" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'" (click)="part1.focus()"></i>
11
+ <i *ngIf="inp.withClear && (part1.value || part2.value || part3.value || part4.value)" (click)="inp.clear()" class="fa-duotone fa-eraser clear-icon"></i>
12
+ </div>
13
+ </div>
@@ -0,0 +1,144 @@
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-bank-card',
8
+ templateUrl: './form.bank-card.component.html',
9
+ styleUrls: ['./form.bank-card.component.css']
10
+ })
11
+ export class FormBankCardComponent implements OnInit {
12
+ @Input()
13
+ inp: InputClass;
14
+ @Output()
15
+ changeIndex = new EventEmitter<string>();
16
+ cValue = '';
17
+ get type(): typeof InputType {
18
+ return InputType;
19
+ }
20
+ part1: InputClass;
21
+ part2: InputClass;
22
+ part3: InputClass;
23
+ part4: InputClass;
24
+ @ViewChild('inputPart1') inputPart1: ElementRef;
25
+ @ViewChild('inputPart2') inputPart2: ElementRef;
26
+ @ViewChild('inputPart3') inputPart3: ElementRef;
27
+ @ViewChild('inputPart4') inputPart4: ElementRef;
28
+ ngOnInit(): void {
29
+ this.part1 = new InputClass(this.inp.environment, this.inp.l, 'BankCardPart1', null, InputType.Number, 'bank-card-part-1 bank-card-part-item',
30
+ '', true, 1000, 9999);
31
+ this.part2 = new InputClass(this.inp.environment, this.inp.l, 'BankCardPart2', null, InputType.Number, 'bank-card-part-2 bank-card-part-item',
32
+ '', true, 1000, 9999);
33
+ this.part3 = new InputClass(this.inp.environment, this.inp.l, 'BankCardPart3', null, InputType.Number, 'bank-card-part-3 bank-card-part-item',
34
+ '', true, 1000, 9999);
35
+ this.part4 = new InputClass(this.inp.environment, this.inp.l, 'BankCardPart4', null, InputType.Number, 'bank-card-part-4 bank-card-part-item',
36
+ '', true, 1000, 9999);
37
+ this.part1.displayLabel = this.part2.displayLabel = this.part3.displayLabel = this.part4.displayLabel = false;
38
+ this.part1.placeholder = this.part2.placeholder = this.part3.placeholder = this.part4.placeholder = null;
39
+ this.part1.onChange = (v) => {
40
+ this.inp.error = null;
41
+ if (v.length === 4){
42
+ this.part2.focus();
43
+ }
44
+ };
45
+ this.part2.onChange = (v) => {
46
+ this.inp.error = null;
47
+ if (v.length === 4){
48
+ this.part3.focus();
49
+ }
50
+ };
51
+ this.part3.onChange = (v) => {
52
+ this.inp.error = null;
53
+ if (v.length === 4){
54
+ this.part4.focus();
55
+ }
56
+ };
57
+ this.part4.onChange = (v) => {
58
+ this.inp.error = null;
59
+ if (v.length === 4){
60
+ this.changeIndex.emit('Tab');
61
+ }
62
+ };
63
+ this.inp.setValue = (v) => {
64
+ if (v === null){
65
+ return;
66
+ }
67
+ this.part1.value = v.substr(0, 4);
68
+ this.part2.value = v.substr(4, 4);
69
+ this.part3.value = v.substr(8, 4);
70
+ this.part4.value = v.substr(12, 4);
71
+ };
72
+ this.inp.isValid = () => {
73
+ const v = this.getValue();
74
+ if (!this.inp.required && !v) {
75
+ return true;
76
+ }
77
+ if (!v) {
78
+ this.inp.error = InputError.Required;
79
+ return false;
80
+ }
81
+ if (!HelperClass.checkCartDigit(v)){
82
+ this.inp.error = InputError.Invalid;
83
+ return false;
84
+ }
85
+ return true;
86
+ };
87
+ this.inp.clear = () => {
88
+ this.inp.error = null;
89
+ this.part1.value = this.inp.default ? this.inp.default.substr(0, 4) : null;
90
+ this.part2.value = this.inp.default ? this.inp.default.substr(4, 4) : null;
91
+ this.part3.value = this.inp.default ? this.inp.default.substr(8, 4) : null;
92
+ this.part4.value = this.inp.default ? this.inp.default.substr(12, 4) : null;
93
+ };
94
+ this.inp.data = () => {
95
+ return this.getValue();
96
+ };
97
+ this.inp.focus = () => {
98
+ this.onFocusIn();
99
+ };
100
+ }
101
+ changeFocus(p, a): void{
102
+ if (p === 'Part1'){
103
+ if (a === 'Tab' || a === 'Enter'){
104
+ this.part2.focus();
105
+ } else if (a === 'ShiftTab' || a === 'ShiftEnter'){
106
+ this.changeIndex.emit('ShiftTab');
107
+ }
108
+ } else if (p === 'Part2'){
109
+ if (a === 'Tab' || a === 'Enter'){
110
+ this.part3.focus();
111
+ } else if (a === 'ShiftTab' || a === 'ShiftEnter'){
112
+ this.part1.focus();
113
+ }
114
+ } else if (p === 'Part3'){
115
+ if (a === 'Tab' || a === 'Enter'){
116
+ this.part4.focus();
117
+ } else if (a === 'ShiftTab' || a === 'ShiftEnter'){
118
+ this.part2.focus();
119
+ }
120
+ } else if (p === 'Part4'){
121
+ if (a === 'Tab' || a === 'Enter'){
122
+ this.changeIndex.emit('Tab');
123
+ } else if (a === 'ShiftTab' || a === 'ShiftEnter'){
124
+ this.part3.focus();
125
+ }
126
+ }
127
+ }
128
+ onFocusIn(e = null): void{
129
+ if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)){
130
+ this.part1.focus();
131
+ }
132
+ }
133
+ onKeyDown(e): void{
134
+ this.inp.error = null;
135
+ const code = e.keyCode || e.which;
136
+ if (code === 9) {
137
+ e.preventDefault();
138
+ this.changeIndex.emit(e.shiftKey ? 'ShiftTab' : 'Tab');
139
+ }
140
+ }
141
+ getValue(): string{
142
+ return `${this.part1.value ? this.part1.value : ''}${this.part2.value ? this.part2.value : ''}${this.part3.value ? this.part3.value : ''}${this.part4.value ? this.part4.value : ''}`;
143
+ }
144
+ }
@@ -0,0 +1,222 @@
1
+ .form-input-con.button {
2
+ position: relative;
3
+ float: right;
4
+ width: 100%;
5
+ padding: 0 15px;
6
+ -webkit-user-select: none;
7
+ -moz-user-select: none;
8
+ -khtml-user-select: none;
9
+ -ms-user-select: none;
10
+ }
11
+
12
+ .form-input-con.button .form-input {
13
+ position: relative;
14
+ float: right;
15
+ width: 100%;
16
+ cursor: pointer;
17
+ }
18
+
19
+ .form-input-con.button .form-input .input-base {
20
+ position: absolute;
21
+ width: 0;
22
+ height: 0;
23
+ opacity: 0;
24
+ cursor: pointer;
25
+ top: 50%;
26
+ right: 50%;
27
+ z-index: 1;
28
+ }
29
+
30
+ .form-input-con.button .form-input .control {
31
+ display: block;
32
+ width: 100%;
33
+ height: 35px;
34
+ font-weight: 300;
35
+ background-image: none;
36
+ border: none;
37
+ border-radius: 5px;
38
+ padding: 0 35px 0 20px;
39
+ line-height: 35px;
40
+ text-align: center;
41
+ color: white;
42
+ float: left;
43
+ background-color: var(--base);
44
+ z-index: 2;
45
+ position: relative;
46
+ }
47
+
48
+ .form-input-con.button .form-input i.icon {
49
+ font-size: 12px;
50
+ -webkit-transition: all .35s ease-in-out;
51
+ transition: all .35s ease-in-out;
52
+ width: 30px;
53
+ height: 35px;
54
+ line-height: 35px;
55
+ color: white;
56
+ text-align: center;
57
+ cursor: pointer;
58
+ float: right;
59
+ position: absolute;
60
+ top: 0;
61
+ right: 0;
62
+ }
63
+
64
+ .form-input-con.button .form-input .control:hover, .form-input-con.button .form-input .input-base:focus + .control {
65
+ background-color: var(--base-dark);
66
+ }
67
+
68
+ .form-input-con.button.red .form-input .control{
69
+ background-color: var(--red);
70
+ }
71
+
72
+ .form-input-con.button.red .form-input:hover .control, .form-input-con.button.red .form-input .input-base:focus + .control{
73
+ background-color: var(--red-dark);
74
+ }
75
+
76
+ .form-input-con.button.grey .form-input .control{
77
+ color: var(--black);
78
+ background-color: var(--black-22);
79
+ }
80
+ .form-input-con.button.grey .form-input i.icon {
81
+ color: var(--black);
82
+ }
83
+
84
+ .form-input-con.button.grey .form-input:hover .control, .form-input-con.button.grey .form-input .input-base:focus + .control{
85
+ background-color: var(--black-44);
86
+ }
87
+
88
+ .form-input-con.button.blue .form-input .control {
89
+ background-color: var(--blue);
90
+ }
91
+
92
+ .form-input-con.button.blue .form-input:hover .control, .form-input-con.button.blue .form-input .input-base:focus + .control {
93
+ background-color: var(--blue-dark);
94
+ }
95
+
96
+ .form-input-con.button.green .form-input .control {
97
+ background-color: var(--green);
98
+ }
99
+
100
+ .form-input-con.button.green .form-input:hover .control, .form-input-con.button.green .form-input .input-base:focus + .control {
101
+ background-color: var(--green-dark);
102
+ }
103
+
104
+ .form-input-con.button.comp .form-input .control {
105
+ background-color: var(--comp);
106
+ }
107
+
108
+ .form-input-con.button.comp .form-input:hover .control, .form-input-con.button.comp .form-input .input-base:focus + .control {
109
+ background-color: var(--comp-dark);
110
+ }
111
+
112
+ .form-input-con.button.yellow .form-input .control {
113
+ background-color: var(--yellow);
114
+ }
115
+
116
+ .form-input-con.button.yellow .form-input:hover .control, .form-input-con.button.yellow .form-input .input-base:focus + .control {
117
+ background-color: var(--yellow-dark);
118
+ }
119
+
120
+ .form-input-con.button.active .form-input .control {
121
+ background-color: white;
122
+ border: var(--border-input);
123
+ color: var(--black);
124
+ }
125
+
126
+ .form-input-con.button.left-icon .form-input .control {
127
+ float: right;
128
+ padding: 0 20px 0 35px;
129
+ }
130
+
131
+ .form-input-con.button.left-icon .form-input i.icon {
132
+ right: unset;
133
+ left: 0;
134
+ }
135
+
136
+ .form-input-con.button.only-icon .form-input .control{
137
+ padding: 0;
138
+ min-width: 35px;
139
+ }
140
+ .form-input-con.button.only-icon .form-input i.icon{
141
+ width: 100%;
142
+ }
143
+ .form-input-con.button.only-icon .form-input .text{
144
+ display: none;
145
+ }
146
+
147
+ .form-input-con.button.h-45 {
148
+ height: 45px;
149
+ font-size: 13px;
150
+ }
151
+
152
+ .form-input-con.button.h-45 .form-input .control, .form-input-con.button.h-45 .form-input i.icon {
153
+ height: 45px;
154
+ line-height: 45px;
155
+ }
156
+
157
+ .form-input-con.button.h-45 .form-input i.icon {
158
+ width: 35px;
159
+ font-size: 17px;
160
+ }
161
+
162
+ .form-input-con.button.h-30 {
163
+ height: 30px;
164
+ font-size: 12px;
165
+ }
166
+
167
+ .form-input-con.button.h-30 .form-input .control, .form-input-con.button.h-30 .form-input i.icon {
168
+ height: 30px;
169
+ line-height: 30px;
170
+ }
171
+
172
+ .form-input-con.button.h-30 .form-input i.icon {
173
+ max-width: 30px;
174
+ }
175
+
176
+ .form-input-con.button.h-30.only-icon .form-input .control{
177
+ padding: 0;
178
+ min-width: 30px;
179
+ }
180
+ .form-input-con.button.h-25 {
181
+ height: 25px;
182
+ font-size: 12px;
183
+ }
184
+
185
+ .form-input-con.button.h-25 .form-input .control, .form-input-con.button.h-25 .form-input i.icon {
186
+ height: 25px;
187
+ line-height: 25px;
188
+ }
189
+
190
+ .form-input-con.button.h-25 .form-input i.icon {
191
+ width: 25px;
192
+ }
193
+ .form-input-con.button.h-25.only-icon .form-input .control{
194
+ padding: 0;
195
+ min-width: 25px;
196
+ }
197
+
198
+ .form-input-con.button.h-20 {
199
+ height: 20px;
200
+ font-size: 11px;
201
+ }
202
+
203
+ .form-input-con.button.h-20 .form-input .control, .form-input-con.button.h-20 .form-input i.icon {
204
+ height: 20px;
205
+ line-height: 20px;
206
+ }
207
+
208
+ .form-input-con.button.h-20 .form-input i.icon {
209
+ width: 20px;
210
+ }
211
+
212
+ .form-input-con.button.without-icon .form-input .control {
213
+ width: 100%;
214
+ padding: 0 8px;
215
+ min-width: 25px;
216
+ }
217
+
218
+ ::ng-deep .form-input-con.button.h-25 .form-input .dot-spinner > div {
219
+ width: 3px;
220
+ height: 3px;
221
+ margin-right: 2px;
222
+ }
@@ -0,0 +1,16 @@
1
+ <div #inputDiv [id]="inp.name + 'Input'" [className]="inp.class + (inp.name == null ? ' only-icon' : (inp.icon == null ? ' without-icon' : '')) + ' form-input-con button'" [style]="inp.style">
2
+ <div *ngIf="inp.url == null" class="form-input" (click)="onClick($event)">
3
+ <input #inputBase type="button" class="input-base" (keydown)="onKeyDown($event)" (focusin)="onFocusIn()">
4
+ <div class="control">
5
+ <div *ngIf="inp.name != null" class="text" [innerHTML]="inp.loading ? (inp.loadingName ? inp.l('Loading', inp.loadingName) : inp.l('LoadingEmpty')) : inp.l(inp.name)"></div>
6
+ <i *ngIf="inp.icon != null" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
7
+ </div>
8
+ </div>
9
+ <a *ngIf="inp.url != null" [target]="inp.urlNewTab ? '_blank' : ''" [routerLink]="inp.url" class="form-input" (click)="onClick($event)">
10
+ <input #inputBase type="button" class="input-base" (keydown)="onKeyDown($event)" (focusin)="onFocusIn()">
11
+ <div class="control">
12
+ <div *ngIf="inp.name != null" class="text" [innerHTML]="inp.loading ? (inp.loadingName ? inp.l('Loading', inp.loadingName) : inp.l('LoadingEmpty')) : inp.l(inp.name)"></div>
13
+ <i *ngIf="inp.icon != null" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
14
+ </div>
15
+ </a>
16
+ </div>
@@ -0,0 +1,65 @@
1
+ import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
2
+ import * as $ from 'jquery';
3
+ import {InputClass} from '../../../classes/form.class';
4
+
5
+ @Component({
6
+ selector: 'lib-form-button',
7
+ templateUrl: './form.button.component.html',
8
+ styleUrls: ['./form.button.component.css']
9
+ })
10
+ export class FormButtonComponent implements OnInit{
11
+ @Input()
12
+ inp: InputClass;
13
+ @Output()
14
+ changeIndex = new EventEmitter<string>();
15
+ @ViewChild('inputDiv') inputDiv: ElementRef;
16
+ @ViewChild('inputBase') inputBase: ElementRef;
17
+ constructor(){
18
+ }
19
+
20
+ ngOnInit(): void {
21
+ this.inp.focus = () => {
22
+ this.onFocusIn();
23
+ };
24
+ }
25
+ onFocusIn(): void{
26
+ $(this.inputBase.nativeElement).focus();
27
+ }
28
+ onClick(e): void{
29
+ if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
30
+ this.mouseClick();
31
+ }else{
32
+ this.codeClick();
33
+ }
34
+ }
35
+ mouseClick(): void{
36
+ this.onFocusIn();
37
+ if (this.inp.modal){
38
+ this.inp.modal.show();
39
+ if (this.inp.modal.form){
40
+ this.inp.modal.form.onSuccessBase = () => {
41
+ this.inp.modal.hide();
42
+ };
43
+ }
44
+ }
45
+ if (!this.inp.loading && this.inp.onClick != null){
46
+ this.inp.onClick(this.inp);
47
+ }
48
+ }
49
+ codeClick(): void{
50
+ this.onFocusIn();
51
+ }
52
+ onKeyDown(e): void{
53
+ const code = e.keyCode || e.which;
54
+ if (code === 9) {
55
+ e.preventDefault();
56
+ this.changeIndex.emit(e.shiftKey ? 'ShiftTab' : 'Tab');
57
+ }
58
+ if (code === 13) {
59
+ e.preventDefault();
60
+ if (!this.inp.loading && this.inp.onClick != null){
61
+ this.inp.onClick(this.inp);
62
+ }
63
+ }
64
+ }
65
+ }