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,296 +0,0 @@
1
- .form-input-con.text{
2
- position: relative;
3
- float: right;
4
- width: 100%;
5
- padding: 0 15px;
6
- }
7
- .form-input-con.text .form-input {
8
- position: relative;
9
- float: right;
10
- width: 100%;
11
- }
12
-
13
- .form-input-con.text .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.text.error .form-input .label {
30
- font-size: 10px;
31
- color: var(--red);
32
- }
33
- .form-input-con.text .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.text .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-radius: 5px;
50
- text-align: center;
51
- background-color: white;
52
- position: relative;
53
- z-index: 2;
54
- font-size: 11px;
55
- border: var(--border-input);
56
- }
57
-
58
- .form-input-con.text .form-input:hover .control, .form-input-con.text .form-input .control:focus {
59
- outline: none;
60
- border: var(--border-input-dark);
61
- }
62
- .form-input-con.text.error .form-input .control {
63
- border: var(--border-input-red);
64
- }
65
- .form-input-con.text.error .form-input .control, .form-input-con.text.error .form-input span.icon {
66
- color: var(--red);
67
- }
68
- .form-input-con.text.error .form-input:hover .control, .form-input-con.text.error .form-input .control:focus {
69
- border: var(--border-input-red-dark);
70
- }
71
-
72
- .form-input-con.text.without-icon .form-input .control {
73
- padding: 5px 10px;
74
- }
75
-
76
- .form-input-con.text .form-input span.icon {
77
- position: absolute;
78
- font-size: 14px;
79
- color: var(--comp);
80
- cursor: text;
81
- bottom: 0;
82
- z-index: 2;
83
- -webkit-transition: all .35s ease-in-out;
84
- transition: all .35s ease-in-out;
85
- width: 35px;
86
- text-align: center;
87
- height: 35px;
88
- line-height: 38px;
89
- left: 0;
90
- }
91
-
92
- .form-input-con.text .form-input span.clear-icon {
93
- position: absolute;
94
- font-size: 14px;
95
- color: var(--red);
96
- cursor: pointer;
97
- bottom: 0;
98
- z-index: 2;
99
- -webkit-transition: all .35s ease-in-out;
100
- transition: all .35s ease-in-out;
101
- width: 35px;
102
- text-align: center;
103
- height: 35px;
104
- line-height: 38px;
105
- right: 0;
106
- }
107
-
108
- .form-input-con.text .form-input span.icon.button {
109
- background-color: var(--base);
110
- color: white;
111
- border-radius: 5px 0 0 5px;
112
- cursor: pointer;
113
- }
114
- .form-input-con.text .form-input span.icon.button:hover {
115
- background-color: var(--base-dark);
116
- }
117
- .form-input-con.text .form-input span.icon.button.blue {
118
- background-color: var(--blue);
119
- }
120
- .form-input-con.text .form-input span.icon.button.blue:hover {
121
- background-color: var(--blue-dark);
122
- }
123
- .form-input-con.text .form-input span.icon.button.green {
124
- background-color: var(--green);
125
- }
126
- .form-input-con.text .form-input span.icon.button.green:hover {
127
- background-color: var(--green-dark);
128
- }
129
- .form-input-con.text .form-input span.icon.button.red {
130
- background-color: var(--red);
131
- }
132
- .form-input-con.text .form-input span.icon.button.red:hover {
133
- background-color: var(--red-dark);
134
- }
135
- .form-input-con.text .form-input span.icon.button.comp {
136
- background-color: var(--comp);
137
- }
138
- .form-input-con.text .form-input span.icon.button.comp:hover {
139
- background-color: var(--comp-dark);
140
- }
141
-
142
- .form-input-con.text.disabled .form-input .control, .form-input-con.text.disabled .form-input span.icon, .form-input-con.text.disabled .form-input .label {
143
- cursor: default;
144
- box-shadow: unset;
145
- opacity: 0.7;
146
- filter: blur(0.5px);
147
- -webkit-user-select: none;
148
- -moz-user-select: none;
149
- -khtml-user-select: none;
150
- -ms-user-select: none;
151
- }
152
-
153
- .form-input-con.text .form-input .progress {
154
- width: 98%;
155
- margin-right: 1%;
156
- height: 3px;
157
- line-height: 3px;
158
- background-color: var(--comp);
159
- position: absolute;
160
- bottom: 0;
161
- right: 0;
162
- border-radius: 5px;
163
- -webkit-transition: width 0.5s ease-in-out;
164
- -moz-transition: width 0.5s ease-in-out;
165
- -o-transition: width 0.5s ease-in-out;
166
- transition: width 0.5s ease-in-out;
167
- }
168
- .form-input-con.text.without-icon .form-input .control {
169
- padding: 5px 10px;
170
- }
171
- .form-input-con.text.h-50 .form-input .control {
172
- height: 50px;
173
- }
174
- .form-input-con.text.h-50 .form-input span.icon {
175
- height: 50px;
176
- line-height: 50px;
177
- }
178
-
179
- .form-input-con.text.h-45 .form-input .control {
180
- height: 45px;
181
- font-size: 17px;
182
- }
183
- .form-input-con.text.h-45 .form-input .control::-moz-placeholder, .form-input-con.text.h-45 .form-input .control::-webkit-input-placeholder {
184
- font-size: 12px;
185
- }
186
-
187
- .form-input-con.text.h-45 .form-input span.icon {
188
- height: 45px;
189
- line-height: 50px;
190
- font-size: 18px;
191
- }
192
-
193
- .form-input-con.text.h-30 .form-input .control {
194
- height: 30px;
195
- padding: 0;
196
- font-size: 10px;
197
- }
198
-
199
- .form-input-con.text.h-30 .form-input span.icon {
200
- height: 30px;
201
- width: 30px;
202
- line-height: 33px;
203
- font-size: 11px;
204
- }
205
-
206
- .form-input-con.text.h-35 {
207
- height: 35px;
208
- }
209
-
210
- .form-input-con.text.h-35 .form-input .control {
211
- height: 35px;
212
- padding: 0 35px;
213
- }
214
-
215
- .form-input-con.text.h-35 .form-input span.icon {
216
- height: 35px;
217
- line-height: 35px;
218
- }
219
-
220
- .form-input-con.text.h-25 .form-input .control {
221
- height: 25px;
222
- padding: 0;
223
- }
224
-
225
- .form-input-con.text.h-25 .form-input span.icon {
226
- height: 25px;
227
- line-height: 25px;
228
- }
229
-
230
- .form-input-con.text.h-25 .form-input .control::-moz-placeholder, .form-input-con.text.h-25 .form-input .control::-webkit-input-placeholder {
231
- font-size: 10px;
232
- font-family: VazirLight;
233
- }
234
-
235
- .form-input-con.text.table-search {
236
- width: 100%;
237
- float: right;
238
- padding: 0;
239
- }
240
- .form-input-con.text.plaque-part-item .form-input .control{
241
- border: none !important;
242
- }
243
- .form-input-con.text.plaque-part-1{
244
- width: 35px!important;
245
- padding: 0!important;
246
- float: left;
247
- }
248
- .form-input-con.text.plaque-part-1.plaque-part-m{
249
- width: 49px!important;
250
- }
251
- .form-input-con.text.plaque-part-3{
252
- width: 49px!important;
253
- padding: 0!important;
254
- float: left;
255
- }
256
- .form-input-con.text.plaque-part-3.plaque-part-m{
257
- width: 69px !important;
258
- }
259
- .form-input-con.text.plaque-part-4{
260
- margin-top: 10px;
261
- width: 31px!important;
262
- padding: 0!important;
263
- float: left;
264
- }
265
- .form-input-con.text.plaque-part-4 .form-input .control{
266
- height: 25px!important;
267
- }
268
- .form-input-con.text.plaque-part-4.plaque-part-m{
269
- display: none !important;
270
- }
271
-
272
- .form-input-con.text.bank-card-part-item{
273
- width: 25%;
274
- float: left;
275
- padding: 0 !important;
276
- }
277
- .form-input-con.text.bank-card-part-item:not(.bank-card-part-4):after{
278
- position: absolute;
279
- content: '\f068';
280
- font-family: "Font Awesome 5 Pro";
281
- font-weight: 900;
282
- width: 20px;
283
- height: 20px;
284
- line-height: 20px;
285
- top: calc(50% - 10px);
286
- right: -10px;
287
- text-align: center;
288
- font-size: 6px;
289
- }
290
- .form-input-con.text.bank-card-part-item .form-input .control{
291
- background-color: transparent !important;
292
- box-shadow: unset !important;
293
- border: unset !important;
294
- padding: 0 !important;
295
- font-size: 13px !important;
296
- }
@@ -1,13 +0,0 @@
1
- <div #inputDiv [id]="inp.name + 'Input'" [style]="inp.style" [className]="inp.class + ' form-input-con text' + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.icon == null ? ' without-icon' : '')">
2
- <div class="form-input" (click)="onFocusIn()">
3
- <div *ngIf="inp.displayLabel" class="label"><i *ngIf="inp.required" class="fas fa-star-of-life required-icon"></i>{{inp.getLabel()}}</div>
4
- <input (keydown)="onKeyDown($event)" (change)="onChange($event)" (keyup)="onKeyUp($event)" [disabled]="inp.disabled || inp.loading" [value]="getValue()" [placeholder]="inp.placeholder ? inp.l(inp.placeholder) : ''" #inputBase [type]="inp.type == type.Password ? 'password': 'text'" [name]="inp.name" class="control" autocomplete="off" [maxLength]="inp.maxLength > 0 ? inp.type == type.Number ? inp.maxLength.toString().length : inp.maxLength : 524288">
5
- <span *ngIf="inp.icon != null || inp.loading" (click)="inp.button && onClickButton()" #inputIcon [className]="(inp.button ? inp.button + ' button ' : '') + 'icon'">
6
- <i [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner ' : inp.icon + ' ')">{{inp.type === type.Sheba ? 'IR' : ''}}</i>
7
- </span>
8
- <span *ngIf="inp.withClear && inp.value" (click)="inp.clear()" class="clear-icon">
9
- <i class="fa-duotone fa-eraser"></i>
10
- </span>
11
- <div *ngIf="inp.progress != null && inp.progress.remainSecs > 0" [ngStyle]="{width: inp.progress.percent + '%'}" class="progress"></div>
12
- </div>
13
- </div>
@@ -1,185 +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-textbox',
8
- templateUrl: './form.textbox.component.html',
9
- styleUrls: ['./form.textbox.component.css']
10
- })
11
- export class FormTextboxComponent implements OnInit {
12
- @Input()
13
- inp: InputClass;
14
- cValue = '';
15
- @Output()
16
- changeIndex = new EventEmitter<string>();
17
-
18
- get type(): typeof InputType {
19
- return InputType;
20
- }
21
-
22
- navigationKeys = ['Backspace', 'Delete', 'Tab', 'Escape', 'Enter', 'Home', 'End', 'ArrowLeft', 'ArrowRight', 'Clear', 'Copy', 'Paste'];
23
- @ViewChild('inputBase') inputBase: ElementRef;
24
- @ViewChild('inputDiv') inputDiv: ElementRef;
25
- @ViewChild('inputLabel') inputLabel: ElementRef;
26
-
27
- ngOnInit(): void {
28
- this.inp.setValue = (v) => {
29
- this.inp.value = v != null ? v.toString() : '';
30
- };
31
- this.inp.focus = (changeIndex= false) => {
32
- this.onFocusIn(changeIndex);
33
- };
34
- this.inp.isValid = () => {
35
- this.inp.error = null;
36
- if (this.inp.required && !this.inp.value) {
37
- this.inp.error = InputError.Required;
38
- return false;
39
- }
40
- if (!this.inp.required && !this.inp.value) {
41
- return true;
42
- }
43
- if (this.inp.type === InputType.Mobile && !RegExp(/^(09\d{9})$/).test(this.inp.value)) {
44
- this.inp.error = InputError.Invalid;
45
- return false;
46
- }
47
- if (this.inp.type === InputType.Phone && !RegExp(/^(0\d{10})$/).test(this.inp.value)) {
48
- this.inp.error = InputError.Invalid;
49
- return false;
50
- }
51
- if (this.inp.type === InputType.Url && !RegExp(/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)$/).test(this.inp.value)) {
52
- this.inp.error = InputError.Invalid;
53
- return false;
54
- }
55
- if (this.inp.required && this.inp.type === InputType.Email && !RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(this.inp.value)) {
56
- this.inp.error = InputError.Invalid;
57
- return false;
58
- }
59
- if (this.inp.type === InputType.NationalCode && !HelperClass.nationalCodeValid(this.inp.value)) {
60
- this.inp.error = InputError.Invalid;
61
- return false;
62
- }
63
- if (this.inp.type === InputType.Sheba && !HelperClass.shebaValid(this.inp.value)) {
64
- this.inp.error = InputError.Invalid;
65
- return false;
66
- }
67
- if (this.inp.type === InputType.PostalCode && !HelperClass.postalCodeValid(this.inp.value)) {
68
- this.inp.error = InputError.Invalid;
69
- return false;
70
- }
71
- if (this.inp.type === InputType.Number || this.inp.type === InputType.Price){
72
- const v = this.inp.value.toString().replace(/,/g, '');
73
- if (!/^\d+$/.test(v)){
74
- this.inp.error = InputError.Invalid;
75
- return false;
76
- }
77
- }
78
- if (this.inp.type === InputType.Number || this.inp.type === InputType.Price){
79
- const v = parseInt(this.inp.value.replace(/,/g, ''), 10);
80
- if (this.inp.required && this.inp.minLength !== -1 && v < this.inp.minLength) {
81
- this.inp.error = InputError.MinAmount;
82
- return false;
83
- }
84
- if (this.inp.required && this.inp.maxLength !== -1 && v > this.inp.maxLength) {
85
- this.inp.error = InputError.MaxAmount;
86
- return false;
87
- }
88
- } else {
89
- if (this.inp.required && this.inp.minLength !== -1 && this.inp.minLength === this.inp.maxLength &&
90
- this.inp.value.length !== this.inp.minLength) {
91
- this.inp.error = InputError.Length;
92
- return false;
93
- }
94
- if (this.inp.required && this.inp.minLength !== -1 && this.inp.value.length < this.inp.minLength) {
95
- this.inp.error = InputError.MinLength;
96
- return false;
97
- }
98
- if (this.inp.required && this.inp.maxLength !== -1 && this.inp.value.length > this.inp.maxLength) {
99
- this.inp.error = InputError.MaxLength;
100
- return false;
101
- }
102
- }
103
- if (this.inp.match !== null && this.inp.value !== this.inp.match.value) {
104
- this.inp.error = InputError.NotMatch;
105
- return false;
106
- }
107
- return true;
108
- };
109
- this.inp.clear = () => {
110
- this.inp.error = null;
111
- this.inp.setValue(this.inp.default, false);
112
- };
113
- this.inp.data = () => {
114
- let v = this.inp.value;
115
- if (v === null){
116
- return null;
117
- }
118
- if (v && this.inp.type === InputType.Number || this.inp.type === InputType.Price){
119
- v = parseInt(v.replace(/,/g, ''), 10);
120
- }
121
- return v;
122
- };
123
- }
124
-
125
- onFocusIn(changeIndex = false): void {
126
- if (changeIndex){
127
- this.inputBase.nativeElement.select();
128
- }else{
129
- this.inputBase.nativeElement.focus();
130
- }
131
- }
132
- onChange(e): void {
133
- this.onKeyUp(e);
134
- }
135
-
136
- onKeyUp(e): void {
137
- this.inp.value = e.target.value;
138
- if (this.inp.onKeyUp) {
139
- this.inp.onKeyUp(this.inp);
140
- }
141
- if (this.inp.onChange) {
142
- if (this.cValue !== e.target.value) {
143
- this.inp.onChange(e.target.value);
144
- this.cValue = e.target.value;
145
- }
146
- }
147
- }
148
- onClickButton(): void{
149
- if (this.inp.isValid()){
150
- this.inp.onClickButton();
151
- }
152
- }
153
- onKeyDown(e): void {
154
- if (this.inp.onKeyDown) {
155
- this.inp.onKeyDown(e);
156
- }
157
- const code = e.keyCode || e.which;
158
- if (code === 9 || code === 13) {
159
- e.preventDefault();
160
- if (code === 13 && this.inp.button){
161
- this.onClickButton();
162
- }else{
163
- this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
164
- }
165
- return;
166
- }
167
- this.inp.error = null;
168
- }
169
-
170
- getValue(): string {
171
- try {
172
- if (this.inp.value && this.inp.type === InputType.Price){
173
- const v = this.inp.value.toString().replace(/,/g, '');
174
- if (/^\d+$/.test(v)){
175
- return parseInt(v, 10).toLocaleString();
176
- }
177
- return v;
178
- }
179
- return this.inp.value;
180
- }
181
- catch {
182
- return '';
183
- }
184
- }
185
- }
@@ -1,205 +0,0 @@
1
- .form-input-con.time {
2
- position: relative;
3
- float: right;
4
- width: 100%;
5
- padding: 0 15px;
6
- }
7
- .form-input-con.time .form-input {
8
- position: relative;
9
- float: right;
10
- width: 100%;
11
- }
12
- .form-input-con.time .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.time.error .form-input .label {
29
- font-size: 10px;
30
- color: var(--red);
31
- }
32
- .form-input-con.time .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.time .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.time .form-input .control:focus{
59
- border-radius: 5px 5px 5px 0;
60
- }
61
- .form-input-con.time.top .form-input .control:focus{
62
- border-radius: 0 5px 5px 5px;
63
- }
64
-
65
- .form-input-con.time .form-input:hover .control, .form-input-con.time .form-input .control:focus {
66
- border: var(--border-input-dark);
67
- outline: none;
68
- }
69
-
70
- .form-input-con.time .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.time .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.time.disabled .form-input .control, .form-input-con.time.disabled .form-input i.icon, .form-input-con.time.disabled .form-input .label {
102
- cursor: default;
103
- opacity: 0.7;
104
- filter: blur(0.5px);
105
- }
106
-
107
- .form-input-con.time.error .form-input .control, .form-input-con.time.error .form-input i.icon {
108
- color: var(--red-cc);
109
- }
110
-
111
- .form-input-con.time.error .form-input .control {
112
- border: var(--border-input-red);
113
- }
114
- .form-input-con.time.error .form-input:hover .control, .form-input-con.time.error .form-input .control:focus {
115
- border: var(--border-input-red-dark);
116
- }
117
-
118
- .form-input-con.time .form-input .options-con{
119
- position: absolute;
120
- left: 0;
121
- height: 235px;
122
- top: -200000px;
123
- background-color: white;
124
- border: var(--border-input);
125
- border-radius: 0 0 5px 5px;
126
- z-index: 4;
127
- overflow: hidden;
128
- -webkit-user-select: none;
129
- -moz-user-select: none;
130
- -khtml-user-select: none;
131
- -ms-user-select: none;
132
- }
133
- .form-input-con.time .form-input .options-con .options{
134
- float: right;
135
- width: 100px;
136
- position: relative;
137
- }
138
- .form-input-con.time .form-input .options-con .options .hours{
139
- float: left;
140
- width: 50%;
141
- height: 235px;
142
- overflow: auto;
143
- position: relative;
144
- -ms-overflow-style: none; /* IE and Edge */
145
- scrollbar-width: none; /* Firefox */
146
- }
147
- .form-input-con.time .form-input .options-con .options .rightline{
148
- position: absolute;
149
- top: 0;
150
- right: calc((100% - 1px) / 2);
151
- width: 1px;
152
- height: 235px;
153
- }
154
- .form-input-con.time .form-input .options-con .options .hours::-webkit-scrollbar {
155
- display: none;
156
- }
157
- .form-input-con.time .form-input .options-con .options .minutes{
158
- float: right;
159
- width: 50%;
160
- height: 235px;
161
- overflow: auto;
162
- -ms-overflow-style: none; /* IE and Edge */
163
- scrollbar-width: none; /* Firefox */
164
- }
165
- .form-input-con.time .form-input .options-con .options .hours::-webkit-scrollbar {
166
- display: none;
167
- }
168
- .form-input-con.time .form-input .options-con .options .hours .hour, .form-input-con.time .form-input .options-con .options .minutes .minute{
169
- float: right;
170
- width: 100%;
171
- height: 30px;
172
- line-height: 30px;
173
- text-align: center;
174
- font-size: 12px;
175
- cursor: pointer;
176
- }
177
- .form-input-con.time .form-input .options-con .options .hours .hour:hover,
178
- .form-input-con.time .form-input .options-con .options .hours .hour.active,
179
- .form-input-con.time .form-input .options-con .options .minutes .minute:hover,
180
- .form-input-con.time .form-input .options-con .options .minutes .minute.active{
181
- background-color: var(--black-33);
182
- }
183
- .form-input-con.time .form-input .control:focus + .options-con{
184
- top: 35px !important;
185
- }
186
-
187
- .form-input-con.time.top .form-input .control:focus + .options-con{
188
- border-radius: 5px 5px 0 0;
189
- bottom: 35px;
190
- top: unset!important;
191
- }
192
- .form-input-con.time.h-22 .form-input .control {
193
- height: 22px;
194
- padding: 5px;
195
- }
196
- .form-input-con.time.h-22 .form-input i.icon {
197
- display: none;
198
- }
199
- .form-input-con.time.h-22 .form-input .control:focus + .options-con{
200
- top: 22px !important;
201
- }
202
-
203
- .form-input-con.time.h-22.top .form-input .control:focus + .options-con{
204
- bottom: 22px;
205
- }