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,22 +0,0 @@
1
- <div #inputDiv [id]="inp.name + 'Input'" [style]="inp.style" [className]="inp.class + ' form-input-con time' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '')">
2
- <div class="form-input" (click)="toggleTime()">
3
- <div *ngIf="inp.displayLabel" class="label"><i *ngIf="inp.required" class="fas fa-star-of-life required-icon"></i>{{inp.getLabel()}}</div>
4
- <div class="w-100 p-r">
5
- <i *ngIf="inp.icon != null || inp.loading" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
6
- <i *ngIf="inp.withClear && inp.value" (click)="inp.clear()" class="fa-duotone fa-eraser clear-icon"></i>
7
- <input (keydown)="onKeyDown($event)" (keyup)="onKeyUp($event)" (focusout)="onFocusOut()" [disabled]="inp.disabled" [(ngModel)]="inp.search" #inputBase [name]="inp.name" [placeholder]="inp.l(inp.name)" class="control" autocomplete="off" maxlength="">
8
- <div #inputOptionsDiv class="options-con">
9
- <div class="options">
10
- <div class="hours">
11
- <div [className]="(h === activeHour ? 'active ' : '') + 'hour'" (click)="selectTime(h, 'hour')" *ngFor="let h of hours">{{h}}</div>
12
- </div>
13
- <div class="rightline">
14
- </div>
15
- <div class="minutes">
16
- <div [className]="(m === activeMinute ? 'active ' : '') + 'minute'" (click)="selectTime(m, 'minute')" *ngFor="let m of minutes">{{m}}</div>
17
- </div>
18
- </div>
19
- </div>
20
- </div>
21
- </div>
22
- </div>
@@ -1,139 +0,0 @@
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
- import {InputError} from '../../../classes/enum.class';
5
-
6
- @Component({
7
- selector: 'lib-form-time',
8
- templateUrl: './form.time.component.html',
9
- styleUrls: ['./form.time.component.css']
10
- })
11
- export class FormTimeComponent implements OnInit{
12
- @Input()
13
- inp: InputClass;
14
- @Input()
15
- inForm: boolean;
16
- @Output()
17
- changeIndex = new EventEmitter<string>();
18
- cSearch = '';
19
- hours = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23'];
20
- minutes = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59'];
21
- activeHour = null;
22
- activeMinute = null;
23
- @ViewChild('inputBase') inputBase: ElementRef;
24
- @ViewChild('inputDiv') inputDiv: ElementRef;
25
- @ViewChild('inputLabel') inputLabel: ElementRef;
26
- @ViewChild('inputOptionsDiv') inputOptionsDiv: ElementRef;
27
- constructor(){
28
- }
29
- ngOnInit(): void{
30
- if (this.inp.value){
31
- this.inp.setValue(this.inp.value, false);
32
- }
33
- this.inp.setValue = (v) => {
34
- if (v === null){
35
- this.inp.clear();
36
- return;
37
- } else {
38
- this.activeHour = `${(v.Hours > 9 ? v.Hours : `0${v.Hours}`)}`;
39
- this.activeMinute = `${(v.Minutes > 9 ? v.Minutes : `0${v.Minutes}`)}`;
40
- this.inp.value = `${this.activeHour}:${this.activeMinute}`;
41
- this.inp.search = `${this.activeHour}:${this.activeMinute}`;
42
- }
43
- };
44
- this.inp.isValid = () => {
45
- this.inp.error = null;
46
- if (this.inp.required && !this.inp.value) {
47
- this.inp.error = InputError.Required;
48
- return false;
49
- }
50
- if (!this.inp.required && !this.inp.value) {
51
- return true;
52
- }
53
- if (!RegExp(/^(?:(?:([01]?\d|2[0-3]):)([0-5]?\d))$/).test(this.inp.value)) {
54
- this.inp.error = InputError.Invalid;
55
- return false;
56
- }
57
- return true;
58
- };
59
- this.inp.clear = () => {
60
- if (this.inp.default){
61
- this.inp.setValue(this.inp.default, false);
62
- }else{
63
- this.inp.value = null;
64
- this.inp.search = null;
65
- }
66
- };
67
- this.inp.data = () => {
68
- return this.inp.value;
69
- };
70
- this.inp.focus = () => {
71
- this.openOptions();
72
- };
73
- this.inp.focusOut = () => {
74
- $(this.inputBase.nativeElement).blur();
75
- };
76
- }
77
- toggleTime(): void{
78
- this.openOptions();
79
- }
80
- openOptions(): void {
81
- this.setPosition();
82
- $(this.inputBase.nativeElement).focus();
83
- }
84
- setPosition(): void{
85
- const rect = this.inputDiv.nativeElement.getBoundingClientRect();
86
- const offsetOfBottom = window.innerHeight - rect.bottom;
87
- const height = this.inputOptionsDiv.nativeElement.offsetHeight;
88
- if (offsetOfBottom < height){
89
- $(this.inputDiv.nativeElement).addClass('top');
90
- }else{
91
- $(this.inputDiv.nativeElement).removeClass('top');
92
- }
93
- }
94
- onKeyDown(e): void{
95
- const code = e.keyCode || e.which;
96
- if (code === 9 || code === 13) {
97
- e.preventDefault();
98
- $(this.inputDiv.nativeElement).removeClass('top');
99
- this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
100
- if (!this.inForm){
101
- $(this.inputBase.nativeElement).blur();
102
- }
103
- }
104
- }
105
- onKeyUp(e): void{
106
- this.inp.error = null;
107
- if (this.cSearch !== e.target.value) {
108
- this.cSearch = e.target.value;
109
- if (this.inp.search !== '' && this.inp.search !== null){
110
- if (RegExp(/^(?:(?:([01]?\d|2[0-3]):)([0-5]?\d))$/).test(this.inp.search)){
111
- const hm = this.inp.search.split(':');
112
- this.activeHour = hm[0].length === 2 ? hm[0] : `0${hm[0]}`;
113
- this.activeMinute = hm[1].length === 2 ? hm[1] : `0${hm[1]}`;
114
- this.inp.value = `${this.activeHour}:${this.activeMinute}`;
115
- return;
116
- }
117
- }
118
- this.activeHour = null;
119
- this.activeMinute = null;
120
- this.inp.value = null;
121
- }
122
- }
123
- onFocusOut(): void{
124
- $(this.inputDiv.nativeElement).removeClass('top');
125
- this.inp.search = this.inp.value;
126
- }
127
- selectTime(v: string, s: string): void{
128
- if (s === 'hour'){
129
- this.activeMinute = this.activeMinute === null ? '00' : this.activeMinute;
130
- this.activeHour = v;
131
- }else{
132
- this.activeHour = this.activeHour === null ? '00' : this.activeHour;
133
- this.activeMinute = v;
134
- this.changeIndex.emit('Tab');
135
- }
136
- this.inp.search = `${this.activeHour}:${this.activeMinute}`;
137
- this.inp.value = `${this.activeHour}:${this.activeMinute}`;
138
- }
139
- }
@@ -1,109 +0,0 @@
1
- .form-input-con.tree {
2
- float: right;
3
- width: 100%;
4
- padding: 0 15px;
5
- -webkit-user-select: none;
6
- -moz-user-select: none;
7
- -khtml-user-select: none;
8
- -ms-user-select: none;
9
- position: relative;
10
- }
11
- .form-input-con.tree .form-input {
12
- float: right;
13
- width: 100%;
14
- position: relative;
15
- }
16
- .form-input-con.tree .form-input .label {
17
- float: right;
18
- width: 100%;
19
- height: 20px;
20
- line-height: 20px;
21
- padding: 0 10px;
22
- font-size: 12px;
23
- margin-bottom: 3px;
24
- cursor: default;
25
- -webkit-user-select: none;
26
- -moz-user-select: none;
27
- -khtml-user-select: none;
28
- -ms-user-select: none;
29
- direction: rtl;
30
- text-align: right;
31
- }
32
- .form-input-con.tree.error .form-input .label {
33
- font-size: 10px;
34
- color: var(--red);
35
- }
36
- .form-input-con.tree .form-input .label .required-icon{
37
- height: 20px;
38
- width: 20px;
39
- line-height: 20px;
40
- font-size: 9px;
41
- color: var(--red);
42
- text-align: center;
43
- }
44
- .form-input-con.tree .form-input > .control{
45
- float: right;
46
- width: 100%;
47
- border-radius: 5px;
48
- background-color: white;
49
- min-height: 35px;
50
- position: relative;
51
- padding: 10px;
52
- max-height: 400px;
53
- overflow-y: auto;
54
- overflow-x: hidden;
55
- border: var(--border-input);
56
- }
57
- .form-input-con.tree .form-input:hover .control, .form-input-con.tree .form-input .input-base:focus + .control {
58
- border: var(--border-input-dark);
59
- }
60
- .form-input-con.tree.error .form-input:hover .control, .form-input-con.tree.error .form-input .input-base:focus + .control {
61
- border: var(--border-input-red-dark);
62
- }
63
- .form-input-con.tree .form-input .input-base {
64
- position: absolute;
65
- width: 0;
66
- height: 0;
67
- opacity: 0;
68
- cursor: pointer;
69
- top: 50%;
70
- right: 50%;
71
- z-index: 1;
72
- }
73
- .form-input-con.tree .form-input i.icon {
74
- position: absolute;
75
- font-size: 14px;
76
- color: var(--comp);
77
- cursor: default;
78
- top: 0;
79
- z-index: 1;
80
- -webkit-transition: all .35s ease-in-out;
81
- transition: all .35s ease-in-out;
82
- width: 35px;
83
- text-align: center;
84
- height: 35px;
85
- line-height: 35px;
86
- left: 0;
87
- }
88
- .form-input-con.tree .form-input i.clear-icon {
89
- position: absolute;
90
- font-size: 14px;
91
- color: var(--red);
92
- cursor: pointer;
93
- bottom: 0;
94
- z-index: 3;
95
- -webkit-transition: all .35s ease-in-out;
96
- transition: all .35s ease-in-out;
97
- width: 35px;
98
- text-align: center;
99
- height: 35px;
100
- line-height: 38px;
101
- right: 0;
102
- }
103
-
104
- .form-input-con.tree.error .form-input > .control {
105
- border: var(--border-input-red);
106
- }
107
- .form-input-con.tree.error .form-input i.icon {
108
- color: var(--red);
109
- }
@@ -1,11 +0,0 @@
1
- <div #inputDiv [id]="inp.name + 'Input'" [className]="inp.class + ' form-input-con tree' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '')">
2
- <div class="form-input" (click)="onClick()">
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 #inputBase type="checkbox" class="input-base" (keydown)="onKeyDown($event)" (focusin)="onFocusIn()">
5
- <div [className]="(inp.loading ? 'o-h ' : '') + 'control'">
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
- <lib-form-tree-item [level]="0" [index]="i" [item]="item" [tree]="inp" [base]="true" *ngFor="let item of inp.rows; let i = index"></lib-form-tree-item>
9
- </div>
10
- </div>
11
- </div>
@@ -1,98 +0,0 @@
1
- import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
2
- import * as $ from 'jquery';
3
- import {InputClass, TreeRowClass} from '../../../classes/form.class';
4
- import {InputError} from '../../../classes/enum.class';
5
-
6
- @Component({
7
- selector: 'lib-form-tree',
8
- templateUrl: './form.tree.component.html',
9
- styleUrls: ['./form.tree.component.css']
10
- })
11
- export class FormTreeComponent implements OnInit{
12
- @Input()
13
- inp: InputClass;
14
- @Output()
15
- changeIndex = new EventEmitter<string>();
16
- @ViewChild('inputBase') inputBase: ElementRef;
17
- constructor(){
18
- }
19
- ngOnInit(): void {
20
- this.inp.load();
21
- this.inp.focus = () => {
22
- this.onFocusIn();
23
- };
24
- this.inp.isValid = () => {
25
- this.inp.error = null;
26
- if (this.inp.required && this.getSelected().length === 0) {
27
- this.inp.error = InputError.Required;
28
- return false;
29
- }
30
- return true;
31
- };
32
- this.inp.data = () => {
33
- return this.getSelected();
34
- };
35
- this.inp.setValue = (v) => {
36
- this.check(v.map(String));
37
- };
38
- this.inp.clear = () => {
39
- this.inp.setValue([], false);
40
- };
41
- }
42
-
43
- onClick(): void{
44
- this.onFocusIn();
45
- }
46
- onKeyDown(e): void{
47
- const code = e.keyCode || e.which;
48
- if (code === 9 || code === 13) {
49
- e.preventDefault();
50
- this.changeIndex.emit(e.shiftKey ? 'ShiftTab' : 'Tab');
51
- }
52
- }
53
- onFocusIn(): void{
54
- $(this.inputBase.nativeElement).focus();
55
- }
56
- getSelected(): any[]{
57
- let l = [];
58
- for (const f of this.inp.rows){
59
- l = l.concat(this.getRowSelected(f));
60
- }
61
- return l;
62
- }
63
- getRowSelected(ch: TreeRowClass): any[]{
64
- let l = [];
65
- if (ch.selected && (!this.inp.onlyChild || ch.children.length === 0)){
66
- l.push(ch.value);
67
- }
68
- ch.children.forEach((c) => {
69
- const rs = this.getRowSelected(c);
70
- l = l.concat(rs);
71
- });
72
- return l;
73
- }
74
-
75
- check(ids, chs = this.inp.rows): boolean{
76
- let isChecked = false;
77
- let cIsChecked = false;
78
- for (const r of chs){
79
- r.selected = ids.includes(r.value);
80
- if (r.selected){
81
- isChecked = true;
82
- }
83
- cIsChecked = this.check(ids, r.children);
84
- if (this.inp.onlyChild && cIsChecked){
85
- r.selected = true;
86
- }
87
- }
88
- return isChecked || cIsChecked;
89
- }
90
- checkChildren(chs: TreeRowClass[], ids): void{
91
- for (const r of chs){
92
- if (ids.includes(r.value)){
93
- r.toggle(this.inp.onlyChild);
94
- }
95
- setTimeout(() => {this.checkChildren(r.children, ids); });
96
- }
97
- }
98
- }
@@ -1,142 +0,0 @@
1
- .row-item {
2
- float: left;
3
- width: 90%;
4
- text-align: center;
5
- position: relative;
6
- margin: 2px 0 2px 5px;
7
- }
8
-
9
- .row-item .content {
10
- float: right;
11
- width: 100%;
12
- cursor: pointer;
13
- border-radius: 5px;
14
- background-color: #0b486b11;
15
- }
16
-
17
- .row-item .open-close {
18
- position: absolute;
19
- right: -30px;
20
- height: 35px;
21
- width: 10px;
22
- text-align: center;
23
- line-height: 30px;
24
- font-size: 20px;
25
- cursor: pointer;
26
- }
27
-
28
- .row-item .content:hover, .row-item .content.parent {
29
- background-color: #0b486b22;
30
- }
31
-
32
- .row-item .content.parent:hover {
33
- background-color: #0b486b44;
34
- }
35
-
36
- .row-item .children {
37
- float: left;
38
- width: 100%;
39
- padding: 10px;
40
- position: relative;
41
- display: none;
42
- }
43
-
44
- .row-item .children .items {
45
- float: left;
46
- width: 100%;
47
- }
48
-
49
- .row-item .children > .line {
50
- width: 2px;
51
- background-color: #0b486b22;
52
- top: 15px;
53
- right: 20px;
54
- height: calc(100% - 30px);
55
- position: absolute;
56
- }
57
-
58
- .row-item .children .row-item > .line {
59
- width: 10px;
60
- background-color: #0b486b22;
61
- top: 17px;
62
- height: 2px;
63
- position: absolute;
64
- right: -35px;
65
- }
66
-
67
- .row-item .content .title {
68
- float: right;
69
- width: 100%;
70
- height: 35px;
71
- line-height: 35px;
72
- font-size: 12px;
73
- }
74
-
75
-
76
- .row-item .checkbox {
77
- float: right;
78
- width: 100%;
79
- text-align: center;
80
- height: 35px;
81
- line-height: 35px;
82
- padding: 0 35px;
83
- cursor: pointer;
84
- -webkit-user-select: none;
85
- -moz-user-select: none;
86
- -khtml-user-select: none;
87
- -ms-user-select: none;
88
- font-size: 12px;
89
- z-index: 2;
90
- position: relative;
91
- }
92
-
93
- .row-item .control {
94
- position: absolute;
95
- width: 0;
96
- height: 0;
97
- opacity: 0;
98
- cursor: pointer;
99
- top: 50%;
100
- right: 50%;
101
- z-index: 1;
102
- }
103
- .row-item > .checkbox:before {
104
- content: "\f0c8";
105
- position: absolute;
106
- font-family: "Font Awesome 5 Pro";
107
- font-weight: normal;
108
- width: 35px;
109
- height: 35px;
110
- line-height: 35px;
111
- right: 0;
112
- top: 0;
113
- font-size: 18px;
114
- }
115
-
116
- .row-item.selected > .checkbox:before {
117
- content: "\f14a";
118
- color: var(--green);
119
- font-weight: 900;
120
- animation: pop 180ms ease-in;
121
- }
122
-
123
- .row-item.null > .checkbox:before {
124
- content: "\f146";
125
- color: var(--green);
126
- font-weight: 900;
127
- animation: pop 180ms ease-in;
128
- }
129
- .row-item:after{
130
- content:"";
131
- border: 0;
132
- height: 1px;
133
- width: 100%;
134
- float: right;
135
- position: absolute;
136
- right: 0;
137
- bottom: 0;
138
- background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(50, 50, 50, 0.25), rgba(0, 0, 0, 0));
139
- }
140
- ::ng-deep lib-form-tree-item:last-of-type > .row-item:after{
141
- display: none;
142
- }
@@ -1,9 +0,0 @@
1
- <div [className]="(item.selected ? 'selected ' : item.selected == null ? 'null ' : '') + 'row-item'">
2
- <div (click)="onClick()" class="checkbox">{{tree.l(item.name)}}</div>
3
- <i *ngIf="item.children.length > 0" (click)="openClose($event)" [className]="(index == 0 && level == 0 ? 'fa-duotone fa-caret-down ' : 'fa-duotone fa-caret-left ') + 'open-close'"></i>
4
- <div [className]="(index == 0 && level == 0 ? 'open ' : '') + 'children'" [style]="index == 0 && level == 0 ? {display: 'block'} : {}" *ngIf="item.children.length > 0">
5
- <div class="items rightline">
6
- <lib-form-tree-item [level]="level + 1" [index]="i" [item]="child" [parent]="item" [tree]="tree" *ngFor="let child of item.children; let i = index"></lib-form-tree-item>
7
- </div>
8
- </div>
9
- </div>
@@ -1,49 +0,0 @@
1
- import {Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, ViewChild} from '@angular/core';
2
- import * as $ from 'jquery';
3
- import {InputClass, TreeRowClass} from '../../../../classes/form.class';
4
-
5
- @Component({
6
- selector: 'lib-form-tree-item',
7
- templateUrl: './form.tree.item.component.html',
8
- styleUrls: ['./form.tree.item.component.css']
9
- })
10
- export class FormTreeItemComponent implements OnInit{
11
- @Input()
12
- item: TreeRowClass;
13
- @Input()
14
- level: number;
15
- @Input()
16
- index: number;
17
- @Input()
18
- tree: InputClass;
19
- @Input()
20
- parent: TreeRowClass = null;
21
- @Input()
22
- base: boolean;
23
- @Output()
24
- changeIndex = new EventEmitter<string>();
25
- @ViewChild('inputDiv') inputDiv: ElementRef;
26
- @ViewChild('inputBase') inputBase: ElementRef;
27
- constructor(){
28
- }
29
- ngOnInit(): void{
30
- this.item.parent = this.parent;
31
- }
32
- openClose(e): void {
33
- const ch = $(e.target).closest('.row-item').find(' > .children');
34
- const oc = $(e.target).closest('.row-item').find(' > .open-close');
35
- if (ch.hasClass('open')) {
36
- ch.removeClass('open');
37
- ch.stop().slideUp();
38
- oc.removeClass('fa-caret-down').addClass('fa-caret-left');
39
- } else {
40
- ch.addClass('open');
41
- ch.stop().slideDown();
42
- oc.addClass('fa-caret-down').removeClass('fa-caret-left');
43
- }
44
- }
45
-
46
- onClick(): void {
47
- this.item.toggle(this.tree.onlyChild);
48
- }
49
- }
@@ -1,57 +0,0 @@
1
- #Header{
2
- float: right;
3
- width: 100%;
4
- height: 50px;
5
- background-color: white;
6
- position: relative;
7
- z-index: 11;
8
- }
9
- #Header .logout{
10
- float: left;
11
- width: 80px;
12
- margin: 10px 30px;
13
- }
14
- @media (max-width: 399.98px) {
15
- #Header .toggle-sidebar{
16
- display: block;
17
- }
18
- }
19
-
20
- @media (min-width: 400px) and (max-width: 499.98px) {
21
- #Header .toggle-sidebar{
22
- display: block;
23
- }
24
- }
25
-
26
- @media (min-width: 500px) and (max-width: 599.98px) {
27
- #Header .toggle-sidebar{
28
- display: block;
29
- }
30
- }
31
-
32
- @media (min-width: 600px) and (max-width: 699.98px) {
33
- #Header .toggle-sidebar{
34
- display: block;
35
- }
36
- }
37
-
38
- @media (min-width: 700px) and (max-width: 799.98px) {
39
- #Header .toggle-sidebar{
40
- display: block;
41
- }
42
- }
43
-
44
- @media (min-width: 800px) and (max-width: 899.98px) {
45
- }
46
-
47
- @media (min-width: 900px) and (max-width: 999.98px) {
48
- }
49
-
50
- @media (min-width: 1000px) and (max-width: 1099.98px) {
51
- }
52
-
53
- @media (min-width: 1100px) and (max-width: 1199.98px) {
54
- }
55
-
56
- @media (min-width: 1200px) {
57
- }
@@ -1,5 +0,0 @@
1
- <div id="Header" class="underline">
2
- <div class="logout">
3
- <lib-form-button [inp]="logoutInp"></lib-form-button>
4
- </div>
5
- </div>
@@ -1,28 +0,0 @@
1
- import {Component, EventEmitter, Output} from '@angular/core';
2
- import {InputClass} from '../../classes/form.class';
3
- import {InputType} from '../../classes/enum.class';
4
- import {PsToolkitUiConfigService} from '../../services/config.service';
5
- import {LangClass} from '../../classes/lang.class';
6
- import {strings} from '../../classes/string.class';
7
- import {HelperClass} from '../../classes/helper.class';
8
-
9
- @Component({
10
- selector: 'lib-header',
11
- templateUrl: './header.component.html',
12
- styleUrls: ['./header.component.css']
13
- })
14
- export class HeaderComponent{
15
- logoutInp: InputClass;
16
- @Output()
17
- logout = new EventEmitter();
18
- constructor(public config: PsToolkitUiConfigService){
19
- const lang = new LangClass(config.currentLang, config.strings);
20
- const l = (key: string, v = null): string => {
21
- return lang.get('Public', 'Header', key, v);
22
- };
23
- this.logoutInp = new InputClass(config.environment, l, 'Logout', null, InputType.Button, 'grey h-30');
24
- this.logoutInp.onClick = () => {
25
- this.logout.emit();
26
- };
27
- }
28
- }