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,326 +0,0 @@
1
- .form-input-con.select {
2
- position: relative;
3
- float: right;
4
- width: 100%;
5
- padding: 0 15px;
6
- font-size: 12px;
7
- -webkit-user-select: none;
8
- -moz-user-select: none;
9
- -khtml-user-select: none;
10
- -ms-user-select: none;
11
- }
12
- .form-input-con.select.plaque {
13
- width: 185px!important;
14
- }
15
-
16
- .form-input-con.select > .form-input{
17
- float: right;
18
- width: 100%;
19
- position: relative;
20
- }
21
- .form-input-con.select > .form-input > .label {
22
- float: right;
23
- width: 100%;
24
- height: 20px;
25
- line-height: 20px;
26
- padding: 0 10px;
27
- font-size: 12px;
28
- margin-bottom: 3px;
29
- cursor: default;
30
- -webkit-user-select: none;
31
- -moz-user-select: none;
32
- -khtml-user-select: none;
33
- -ms-user-select: none;
34
- direction: rtl;
35
- text-align: right;
36
- }
37
- .form-input-con.select.error > .form-input > .label {
38
- font-size: 10px;
39
- color: var(--red);
40
- }
41
- .form-input-con.select > .form-input > .label .required-icon{
42
- height: 20px;
43
- width: 20px;
44
- line-height: 20px;
45
- font-size: 9px;
46
- color: var(--red);
47
- text-align: center;
48
- }
49
- .form-input-con.select > .form-input .without-search {
50
- position: absolute;
51
- width: 100%;
52
- height: 100%;
53
- top: 0;
54
- right: 0;
55
- z-index: 3;
56
- cursor: pointer;
57
- }
58
- .form-input-con.select > .form-input .control {
59
- display: block;
60
- width: 100%;
61
- height: 35px;
62
- padding: 5px 35px;
63
- font-family: Vazir;
64
- color: var(--black);
65
- background-image: none;
66
- border-radius: 5px;
67
- text-align: center;
68
- background-color: white;
69
- font-size: 11px;
70
- border: var(--border-input);
71
- }
72
-
73
- .form-input-con.select > .form-input:hover .control, .form-input-con.select > .form-input .control:focus {
74
- outline: none;
75
- border: 1px solid var(--black-88);
76
- }
77
-
78
- .form-input-con.select > .form-input .control:focus {
79
- border-radius: 5px 5px 0 0;
80
- outline: none;
81
- }
82
- .form-input-con.select.error > .form-input .control {
83
- border: var(--border-input-red);
84
- }
85
-
86
- .form-input-con.select.error > .form-input .control, .form-input-con.select.error > .form-input i.icon {
87
- color: var(--red);
88
- }
89
- .form-input-con.select.error > .form-input:hover .control, .form-input-con.select.error > .form-input .control:focus {
90
- border: var(--border-input-red-dark);
91
- }
92
-
93
- .form-input-con.select.top > .form-input .control:focus {
94
- border-radius: 0 0 5px 5px;
95
- outline: none;
96
- }
97
-
98
- .form-input-con.select > .form-input i.icon {
99
- position: absolute;
100
- width: 35px;
101
- font-size: 15px;
102
- color: var(--comp);
103
- text-align: center;
104
- height: 35px;
105
- line-height: 35px;
106
- left: 0;
107
- bottom: 0;
108
- z-index: 1;
109
- }
110
- .form-input-con.select > .form-input i.clear-icon {
111
- position: absolute;
112
- width: 35px;
113
- font-size: 15px;
114
- color: var(--red);
115
- cursor: pointer;
116
- text-align: center;
117
- height: 35px;
118
- line-height: 35px;
119
- right: 0;
120
- bottom: 0;
121
- z-index: 1;
122
- }
123
-
124
- .form-input-con.select > .form-input .options {
125
- position: absolute;
126
- width: 100%;
127
- background-color: white;
128
- border-radius: 0 0 5px 5px;
129
- top: -200000px;
130
- right: 0;
131
- z-index: 5;
132
- overflow: hidden;
133
- cursor: pointer;
134
- border: var(--border-input);
135
- }
136
- .form-input-con.select > .form-input .control:focus + .options {
137
- top: 35px !important;
138
- }
139
-
140
- .form-input-con.select.top > .form-input .control:focus + .options {
141
- border-radius: 5px 5px 0 0;
142
- bottom: 35px;
143
- top: unset !important;
144
- }
145
-
146
- .form-input-con.select > .form-input .options .items {
147
- float: right;
148
- width: 100%;
149
- max-height: 200px;
150
- overflow-y: auto;
151
- scroll-behavior: smooth;
152
- }
153
-
154
- .form-input-con.select > .form-input .options .option {
155
- float: right;
156
- width: 100%;
157
- height: 35px;
158
- line-height: 35px;
159
- text-align: center;
160
- font-size: 11px;
161
- border-radius: 0;
162
- }
163
- .form-input-con.select .tags {
164
- float: right;
165
- width: 100%;
166
- }
167
- .form-input-con.select .tags .tag-con{
168
- float: right;
169
- width: auto;
170
- padding: 5px;
171
- }
172
- .form-input-con.select .tags .tag-con .tag{
173
- float: right;
174
- width: auto;
175
- position: relative;
176
- background-color: var(--base);
177
- color: white;
178
- height: 25px;
179
- line-height: 25px;
180
- font-size: 12px;
181
- border-radius: 5px;
182
- overflow: hidden;
183
- }
184
- .form-input-con.select .tags .tag-con .tag > .label{
185
- float: right;
186
- width: auto;
187
- padding: 0 5px 0 10px;
188
- }
189
- .form-input-con.select .tags .tag-con .tag > .delete{
190
- float: right;
191
- width: 25px;
192
- text-align: center;
193
- line-height: 25px;
194
- cursor: pointer;
195
- }
196
- .form-input-con.select .tags .tag-con .tag > .delete:hover{
197
- background-color: var(--base-dark);
198
- }
199
- .form-input-con.select.h-50 > .form-input .control {
200
- height: 50px;
201
- line-height: 50px;
202
- }
203
-
204
- .form-input-con.select.h-50 > .form-input .control:focus + .options {
205
- top: 50px !important;
206
- }
207
-
208
- .form-input-con.select.h-50.top > .form-input .options {
209
- top: unset !important;
210
- bottom: 50px;
211
- }
212
- .form-input-con.select.h-25, .form-input-con.select.h-25 > .form-input .control {
213
- height: 25px;
214
- line-height: 25px;
215
- padding: 0;
216
- }
217
-
218
- .form-input-con.select.h-25 > .form-input i.icon {
219
- height: 25px;
220
- width: 25px;
221
- line-height: 25px;
222
- }
223
-
224
- .form-input-con.select.h-25 > .form-input .control:focus + .options {
225
- top: 25px !important;
226
- }
227
-
228
- .form-input-con.select.h-25.top > .form-input .control:focus + .options {
229
- border-radius: 5px 5px 0 0;
230
- bottom: 25px;
231
- top: unset !important;
232
- }
233
- .form-input-con.select.h-30, .form-input-con.select.h-30 > .form-input .control {
234
- height: 30px;
235
- line-height: 30px;
236
- padding: 0;
237
- }
238
-
239
- .form-input-con.select.h-30 > .form-input i.icon {
240
- height: 30px;
241
- width: 30px;
242
- line-height: 30px;
243
- }
244
-
245
- .form-input-con.select.h-30 > .form-input .control:focus + .options {
246
- top: 30px !important;
247
- }
248
-
249
- .form-input-con.select.h-30.top > .form-input .control:focus + .options {
250
- border-radius: 5px 5px 0 0;
251
- bottom: 30px;
252
- top: unset !important;
253
- }
254
-
255
- ::ng-deep .form-input-con.select.h-30 > .form-input .options .option {
256
- height: 30px;
257
- line-height: 30px;
258
- font-size: 12px;
259
- }
260
-
261
- .form-input-con.select.h-45, .form-input-con.select.h-45 > .form-input .control {
262
- height: 45px;
263
- line-height: 45px;
264
- padding: 0;
265
- }
266
- .form-input-con.select.h-45 > .form-input .control::-moz-placeholder, .form-input-con.select.h-45 > .form-input .control::-webkit-input-placeholder {
267
- font-size: 12px;
268
- }
269
- .form-input-con.select.h-45 > .form-input i.icon {
270
- height: 45px;
271
- width: 45px;
272
- line-height: 45px;
273
- }
274
-
275
- .form-input-con.select.h-45 > .form-input .control:focus + .options {
276
- top: 45px !important;
277
- }
278
-
279
- .form-input-con.select.h-45.top > .form-input .control:focus + .options {
280
- border-radius: 5px 5px 0 0;
281
- bottom: 45px;
282
- top: unset !important;
283
- }
284
-
285
- ::ng-deep .form-input-con.select.h-45 > .form-input .options .option {
286
- min-height: 40px;
287
- font-size: 12px;
288
- }
289
-
290
- .form-input-con.select.without-icon.h-25 > .form-input .control {
291
- padding: 0;
292
- }
293
- .form-input-con.select.without-icon.h-30 > .form-input .control {
294
- padding: 0;
295
- }
296
- .form-input-con.select.h-30 > .form-input i.icon {
297
- font-size: 11px;
298
- }
299
-
300
-
301
- ::ng-deep .form-input-con.select.without-sub-options > .form-input .options .option {
302
- width: 100%;
303
- }
304
-
305
- .form-input-con.select.disabled > .form-input .control, .form-input-con.select.disabled > .form-input span.icon, .form-input-con.select.disabled > .form-input .label {
306
- cursor: default;
307
- box-shadow: unset;
308
- opacity: 0.7;
309
- filter: blur(0.5px);
310
- -webkit-user-select: none;
311
- -moz-user-select: none;
312
- -khtml-user-select: none;
313
- -ms-user-select: none;
314
- }
315
- .form-input-con.select.plaque-part-2 > .form-input .control {
316
- border: none !important;
317
- }
318
- .form-input-con.select.plaque-part-2{
319
- width: 35px!important;
320
- padding: 0!important;
321
- float: left;
322
- }
323
- .form-input-con.select.plaque-part-2.plaque-part-m{
324
- display: none!important;
325
- }
326
-
@@ -1,16 +0,0 @@
1
- <div #inputDiv [id]="inp.name + 'Input'" [style]="inp.style" [className]="inp.class + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + (inp.icon != null ? '' : ' without-icon') + ' form-input-con select'">
2
- <div class="form-input" (click)="toggleOption($event)">
3
- <div *ngIf="inp.displayLabel" class="label"><i *ngIf="inp.required" class="f-r fas fa-star-of-life required-icon"></i><span class="f-r" [innerHTML]="inp.getLabel()"></span></div>
4
- <div class="w-100 p-r">
5
- <div *ngIf="inp.type === type.Select" class="without-search"></div>
6
- <i *ngIf="inp.icon != null || inp.loading" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
7
- <i *ngIf="inp.withClear && inp.value" (click)="inp.clear()" class="fa-duotone fa-eraser clear-icon"></i>
8
- <input (keydown)="onKeyDown($event)" (focusout)="onFocusOut()" (keyup)="onKeyUp($event)" [disabled]="inp.disabled" [(ngModel)]="inp.search" [placeholder]="inp.placeholder ? inp.l(inp.placeholder) : ''" #inputBase type="text" [name]="inp.name" class="control" autocomplete="off" [readOnly]="inp.type === type.Select" [maxLength]="inp.maxLength > 0 ? inp.maxLength : 524288">
9
- <div #inputOptionsDiv class="options">
10
- <div class="items">
11
- <lib-form-select-item (selectOption)="selectOption($event)" [index]="1" [select]="inp" [item]="opt" *ngFor="let opt of inp.options"></lib-form-select-item>
12
- </div>
13
- </div>
14
- </div>
15
- </div>
16
- </div>
@@ -1,358 +0,0 @@
1
- import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
2
- import * as $ from 'jquery';
3
- import {InputClass, OptionClass} from '../../../classes/form.class';
4
- import {InputError, InputType} from '../../../classes/enum.class';
5
-
6
- @Component({
7
- selector: 'lib-form-select',
8
- templateUrl: './form.select.component.html',
9
- styleUrls: ['./form.select.component.css']
10
- })
11
- export class FormSelectComponent implements OnInit{
12
- @Output()
13
- changeIndex = new EventEmitter<string>();
14
- @Input()
15
- inp: InputClass;
16
- @Input()
17
- inForm: boolean;
18
- cSearch = '';
19
- get type(): typeof InputType { return InputType; }
20
- @ViewChild('inputDiv') inputDiv: ElementRef;
21
- @ViewChild('inputBase') inputBase: ElementRef;
22
- @ViewChild('inputOptionsDiv') inputOptionsDiv: ElementRef;
23
- @ViewChild('inputLabel') inputLabel: ElementRef;
24
- ngOnInit(): void{
25
- if (this.inp.type !== InputType.SelectAutoComplete){
26
- this.inp.load();
27
- }
28
- this.inp.setValue = (v, isEdit) => {
29
- if (!this.inp.multiple){
30
- this.selectOption(v == null ? null : v.toString(), isEdit);
31
- }else{
32
- for (const t of v){
33
- this.selectOption(t.toString(), isEdit);
34
- }
35
- }
36
- };
37
- if (this.inp.default != null){
38
- this.inp.setValue(this.inp.default, false);
39
- }
40
- this.inp.setSearch = (s) => {
41
- this.inp.search = s;
42
- };
43
- this.inp.focus = () => {
44
- this.openOptions();
45
- };
46
- this.inp.isValid = () => {
47
- this.inp.error = null;
48
- if (this.inp.required && ((!this.inp.multiple && ((this.inp.addNew && !this.inp.search) || (!this.inp.addNew && !this.inp.value))) ||
49
- (this.inp.multiple && this.getSelected().length === 0))) {
50
- this.inp.error = InputError.Required;
51
- return false;
52
- }
53
- return true;
54
- };
55
- this.inp.clear = () => {
56
- this.inp.error = null;
57
- if (!this.inp.multiple){
58
- this.inp.setValue(this.inp.default, true);
59
- }else{
60
- this.inp.options.forEach(x => this.unCheck(x));
61
- }
62
- if (this.inp.rel != null){
63
- this.inp.rel.options = [];
64
- }
65
- if (this.inp.type === InputType.SelectAutoComplete){
66
- this.inp.options = [];
67
- }
68
- };
69
- this.inp.data = () => {
70
- return !this.inp.multiple ? (this.inp.addNew ? this.inp.search : this.inp.value) : this.getSelected();
71
- };
72
- this.inp.focusOut = () => {
73
- $(this.inputBase.nativeElement).blur();
74
- };
75
- }
76
- loadOptions(): void{
77
- const v = this.inp.search.replace(/^_+|_+$/g, '');
78
- if (v){
79
- this.inp.load(this.inp.url.replace('{}', v));
80
- }else{
81
- this.inp.options = [];
82
- }
83
- }
84
- openOptions(): void{
85
- this.setPosition();
86
- this.setHoverCenter();
87
- $(this.inputBase.nativeElement).focus();
88
- }
89
- onFocusOut(): void{
90
- this.closeOptions();
91
- }
92
- closeOptions(): boolean{
93
- setTimeout(() => {
94
- $(this.inputDiv.nativeElement).removeClass('top');
95
- this.inp.hover = -1;
96
- if (this.inp.value === null){
97
- if (!this.inp.addNew){
98
- this.inp.search = '';
99
- }
100
- if (this.inp.type === InputType.SelectAutoComplete){
101
- this.inp.options = [];
102
- }else{
103
- this.setOptions();
104
- }
105
- }
106
- }, 1);
107
- return true;
108
- }
109
- setPosition(): void{
110
- const rect = this.inputDiv.nativeElement.getBoundingClientRect();
111
- const offsetOfBottom = window.innerHeight - rect.bottom;
112
- const height = this.inputOptionsDiv.nativeElement.offsetHeight;
113
- if (offsetOfBottom < height){
114
- $(this.inputDiv.nativeElement).addClass('top');
115
- }else{
116
- $(this.inputDiv.nativeElement).removeClass('top');
117
- }
118
- }
119
- setOptions(r = this.inp.options): void{
120
- r.map((x) => {
121
- this.setOptions(x.options);
122
- x.show = (this.inp.value !== null || this.inp.search === '' || x.name.includes(this.inp.search) ||
123
- x.value.includes(this.inp.search) || x.options.filter(o => o.show).length > 0);
124
- });
125
- }
126
- onKeyDown(e): void{
127
- const code = e.keyCode || e.which;
128
- if (code === 9) {
129
- e.preventDefault();
130
- this.cI(e.shiftKey ? 'ShiftTab' : 'Tab');
131
- }
132
- else if (code === 13){
133
- e.preventDefault();
134
- if ($(this.inputBase.nativeElement).is(':focus')){
135
- const h = this.getSelectedHover();
136
- if (!h){
137
- return;
138
- }
139
- this.selectOption(h.value);
140
- }else{
141
- this.cI('Tab');
142
- }
143
- }
144
- else if (code === 40){
145
- e.preventDefault();
146
- if (this.inp.hover + 1 >= this.inp.index){
147
- return;
148
- }
149
- this.inp.hover = this.getHover();
150
- this.setHoverCenter();
151
- }
152
- else if (code === 38){
153
- e.preventDefault();
154
- if (this.inp.hover <= 0){
155
- this.inp.hover = 0;
156
- return;
157
- }
158
- this.inp.hover = this.getHover(-1);
159
- this.setHoverCenter();
160
- }
161
- }
162
- toggleOption(e): void{
163
- if (this.inp.multiple && $(e.target).closest('.option').hasClass('option')){
164
- return;
165
- }
166
- this.openOptions();
167
- }
168
- onKeyUp(e): void{
169
- if (this.cSearch !== e.target.value) {
170
- this.cSearch = e.target.value;
171
- if (this.inp.type === InputType.Select){
172
- return;
173
- }
174
- this.inp.value = null;
175
- if (this.inp.type === InputType.SelectSearch){
176
- this.setOptions();
177
- }else if (e.target.value){
178
- this.loadOptions();
179
- }else{
180
- this.inp.options = [];
181
- }
182
- }
183
- }
184
- selectOption(v, isEdit = false): void{
185
- this.inp.error = null;
186
- const va = this.getValue(v);
187
- if (this.inp.multiple){
188
- this.toggle(va);
189
- this.inp.search = '';
190
- }else{
191
- this.inp.value = v;
192
- this.inp.hover = va ? va.index : -1;
193
- this.inp.search = va ? (this.inp.type === InputType.SelectSearch || this.inp.type === InputType.Select ? va.name : va.search) : '';
194
- }
195
- this.setOptions();
196
- this.cSearch = this.inp.search;
197
- if (this.inp.onChange){
198
- this.inp.onChange(this.inp, isEdit);
199
- }
200
- if (this.inp.rel){
201
- this.inp.rel.value = null;
202
- this.inp.rel.hover = -1;
203
- this.inp.rel.index = 0;
204
- this.inp.rel.search = '';
205
- this.inp.rel.options = [];
206
- if (v !== null){
207
- this.inp.rel.url = this.inp.relUrl.replace('{}', this.inp.value);
208
- if (this.inp.rel.type !== InputType.SelectAutoComplete) {
209
- this.inp.rel.load();
210
- }else{
211
- this.inp.rel.url += '_{}';
212
- }
213
- }
214
- }
215
- if (!isEdit && !this.inp.multiple){
216
- this.cI('Tab');
217
- }
218
- }
219
- toggle(op: OptionClass): void {
220
- if (op.selected){
221
- this.unCheck(op);
222
- setTimeout(() => {this.unCheckParent(op.parent); }, 100);
223
- }else{
224
- this.check(op);
225
- setTimeout(() => {this.checkParent(op.parent); }, 100);
226
- }
227
- }
228
- check(c: OptionClass): void {
229
- c.selected = true;
230
- this.checkChildren(c);
231
- }
232
- unCheck(c: OptionClass): void {
233
- c.selected = false;
234
- c.options.forEach((ch) => {
235
- this.unCheck(ch);
236
- });
237
- }
238
- checkChildren(o: OptionClass): void{
239
- o.options.forEach((ch) => {
240
- this.check(ch);
241
- });
242
- }
243
- checkParent(p: OptionClass): void{
244
- if (p){
245
- if (p.options.filter(x => !x.selected).length > 0){
246
- p.selected = null;
247
- }else{
248
- p.selected = true;
249
- }
250
- this.checkParent(p.parent);
251
- }
252
- }
253
- unCheckParent(p: OptionClass): void{
254
- if (p){
255
- if (p.options.filter(x => x.selected || x.selected == null).length > 0){
256
- p.selected = null;
257
- }else{
258
- p.selected = false;
259
- }
260
- this.unCheckParent(p.parent);
261
- }
262
- }
263
- cI(i: string): void{
264
- setTimeout(() => {
265
- this.changeIndex.emit(i);
266
- if (!this.inForm){
267
- $(this.inputBase.nativeElement).blur();
268
- }
269
- }, 10);
270
- setTimeout(() => {
271
- this.closeOptions();
272
- }, 20);
273
- }
274
- setHoverCenter(): void {
275
- setTimeout(() => {
276
- const hover: any = $(this.inputOptionsDiv.nativeElement).find('.option.hover');
277
- const items: any = $(this.inputOptionsDiv.nativeElement).find('.items');
278
- if (hover.length === 0){
279
- return;
280
- }
281
- items.scrollTop = items.scrollTop - items.offset.top + hover.offset.top - hover.height();
282
- }, 1);
283
- }
284
- title(): string {
285
- if (this.inp.value == null){
286
- return null;
287
- }
288
- return this.getTitle(this.inp);
289
- }
290
- getTitle(os): string{
291
- for (const s of os.options){
292
- if (s.value === this.inp.value.toString()){
293
- return this.inp.l(s.name);
294
- }
295
- const v = this.getTitle(s);
296
- if (v != null){
297
- return v;
298
- }
299
- }
300
- return null;
301
- }
302
- getSelectedHover(o: OptionClass[] = this.inp.options): any{
303
- const h = o.find(x => x.index === this.inp.hover);
304
- if (h){
305
- return h;
306
- }
307
- for (const i of o){
308
- const hi = this.getSelectedHover(i.options);
309
- if (hi){
310
- return hi;
311
- }
312
- }
313
- }
314
- getHover(i = 1, o: OptionClass[] = this.inp.options, h = this.inp.hover): number{
315
- const ho = o.find(x => x.index === h + i);
316
- if (ho){
317
- if (ho.show){
318
- return ho.index;
319
- }else {
320
- h = h + i;
321
- }
322
- }
323
- for (const it of o){
324
- const hi = this.getHover(i, it.options, h);
325
- if (hi){
326
- return hi;
327
- }
328
- }
329
- return 0;
330
- }
331
- getValue(v, o: OptionClass[] = this.inp.options): OptionClass{
332
- const h = o.find(x => x.value === v);
333
- if (h){
334
- return h;
335
- }
336
- for (const i of o){
337
- const hi = this.getValue(v, i.options);
338
- if (hi){
339
- return hi;
340
- }
341
- }
342
- }
343
-
344
- getSelected(opts: OptionClass[]= this.inp.options): any[]{
345
- let l = [];
346
- for (const f of opts){
347
- if (f.selected){
348
- l.push(f.value);
349
- }
350
- if (f.selected && f.options.length !== 0){
351
- continue;
352
- }
353
- const rs = this.getSelected(f.options);
354
- l = l.concat(rs);
355
- }
356
- return l;
357
- }
358
- }