ps-toolkit-ui 0.0.210 → 0.0.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/karma.conf.js +32 -0
  2. package/ng-package.json +16 -0
  3. package/package.json +19 -22
  4. package/src/lib/classes/chart.class.ts +140 -0
  5. package/src/lib/classes/enum.class.ts +193 -0
  6. package/src/lib/classes/excel.class.ts +46 -0
  7. package/src/lib/classes/form.class.ts +528 -0
  8. package/src/lib/classes/helper.class.ts +283 -0
  9. package/src/lib/classes/lang.class.ts +32 -0
  10. package/src/lib/classes/login.class.ts +27 -0
  11. package/src/lib/classes/modal.class.ts +59 -0
  12. package/src/lib/classes/permission.class.ts +55 -0
  13. package/src/lib/classes/request.class.ts +255 -0
  14. package/src/lib/classes/safestyle.class.ts +4 -0
  15. package/src/lib/classes/sidebar.class.ts +20 -0
  16. package/src/lib/classes/steps.class.ts +19 -0
  17. package/src/lib/classes/string.class.ts +219 -0
  18. package/src/lib/classes/table.class.ts +228 -0
  19. package/src/lib/components/accordion/accordion.component.css +116 -0
  20. package/src/lib/components/accordion/accordion.component.html +19 -0
  21. package/src/lib/components/accordion/accordion.component.ts +41 -0
  22. package/src/lib/components/alert/alert.component.css +112 -0
  23. package/src/lib/components/alert/alert.component.html +1 -0
  24. package/src/lib/components/alert/alert.component.ts +35 -0
  25. package/src/lib/components/base.component.ts +38 -0
  26. package/src/lib/components/calendar/calendar.component.css +206 -0
  27. package/src/lib/components/calendar/calendar.component.html +36 -0
  28. package/src/lib/components/calendar/calendar.component.ts +99 -0
  29. package/src/lib/components/chart/chart.component.css +24 -0
  30. package/src/lib/components/chart/chart.component.html +6 -0
  31. package/src/lib/components/chart/chart.component.ts +14 -0
  32. package/src/lib/components/clock/clock.component.css +141 -0
  33. package/src/lib/components/clock/clock.component.html +10 -0
  34. package/src/lib/components/clock/clock.component.ts +37 -0
  35. package/src/lib/components/confirm/confirm.component.css +112 -0
  36. package/src/lib/components/confirm/confirm.component.html +1 -0
  37. package/src/lib/components/confirm/confirm.component.ts +47 -0
  38. package/src/lib/components/footer/footer.component.css +46 -0
  39. package/src/lib/components/footer/footer.component.html +9 -0
  40. package/src/lib/components/footer/footer.component.ts +18 -0
  41. package/src/lib/components/form/bank-card/form.bank-card.component.css +115 -0
  42. package/src/lib/components/form/bank-card/form.bank-card.component.html +13 -0
  43. package/src/lib/components/form/bank-card/form.bank-card.component.ts +144 -0
  44. package/src/lib/components/form/button/form.button.component.css +222 -0
  45. package/src/lib/components/form/button/form.button.component.html +16 -0
  46. package/src/lib/components/form/button/form.button.component.ts +65 -0
  47. package/src/lib/components/form/car/form.car.component.css +287 -0
  48. package/src/lib/components/form/car/form.car.component.html +11 -0
  49. package/src/lib/components/form/car/form.car.component.ts +82 -0
  50. package/src/lib/components/form/car/search/form.car.search.component.css +287 -0
  51. package/src/lib/components/form/car/search/form.car.search.component.html +15 -0
  52. package/src/lib/components/form/car/search/form.car.search.component.ts +170 -0
  53. package/src/lib/components/form/checkbox/form.checkbox.component.css +128 -0
  54. package/src/lib/components/form/checkbox/form.checkbox.component.html +8 -0
  55. package/src/lib/components/form/checkbox/form.checkbox.component.ts +64 -0
  56. package/src/lib/components/form/date/form.date.component.css +310 -0
  57. package/src/lib/components/form/date/form.date.component.html +46 -0
  58. package/src/lib/components/form/date/form.date.component.ts +247 -0
  59. package/src/lib/components/form/datetime/form.datetime.component.css +157 -0
  60. package/src/lib/components/form/datetime/form.datetime.component.html +11 -0
  61. package/src/lib/components/form/datetime/form.datetime.component.ts +98 -0
  62. package/src/lib/components/form/file/form.file.component.css +151 -0
  63. package/src/lib/components/form/file/form.file.component.html +12 -0
  64. package/src/lib/components/form/file/form.file.component.ts +130 -0
  65. package/src/lib/components/form/finger/form.finger.component.css +215 -0
  66. package/src/lib/components/form/finger/form.finger.component.html +59 -0
  67. package/src/lib/components/form/finger/form.finger.component.ts +131 -0
  68. package/src/lib/components/form/hidden/form.hidden.component.css +0 -0
  69. package/src/lib/components/form/hidden/form.hidden.component.html +0 -0
  70. package/src/lib/components/form/hidden/form.hidden.component.ts +29 -0
  71. package/src/lib/components/form/icon/form.icon.component.css +108 -0
  72. package/src/lib/components/form/icon/form.icon.component.html +14 -0
  73. package/src/lib/components/form/icon/form.icon.component.ts +73 -0
  74. package/src/lib/components/form/index/form.component.css +89 -0
  75. package/src/lib/components/form/index/form.component.html +35 -0
  76. package/src/lib/components/form/index/form.component.ts +45 -0
  77. package/src/lib/components/form/label/form.label.component.css +45 -0
  78. package/src/lib/components/form/label/form.label.component.html +2 -0
  79. package/src/lib/components/form/label/form.label.component.ts +30 -0
  80. package/src/lib/components/form/plaque/form.plaque.component.css +76 -0
  81. package/src/lib/components/form/plaque/form.plaque.component.html +10 -0
  82. package/src/lib/components/form/plaque/form.plaque.component.ts +178 -0
  83. package/src/lib/components/form/plaque/select/form.plaque.select.component.css +167 -0
  84. package/src/lib/components/form/plaque/select/form.plaque.select.component.html +19 -0
  85. package/src/lib/components/form/plaque/select/form.plaque.select.component.ts +385 -0
  86. package/src/lib/components/form/radio/form.radio.component.css +158 -0
  87. package/src/lib/components/form/radio/form.radio.component.html +16 -0
  88. package/src/lib/components/form/radio/form.radio.component.ts +78 -0
  89. package/src/lib/components/form/select/form.select.component.css +326 -0
  90. package/src/lib/components/form/select/form.select.component.html +16 -0
  91. package/src/lib/components/form/select/form.select.component.ts +358 -0
  92. package/src/lib/components/form/select/item/form.select.item.component.css +59 -0
  93. package/src/lib/components/form/select/item/form.select.item.component.html +10 -0
  94. package/src/lib/components/form/select/item/form.select.item.component.ts +40 -0
  95. package/src/lib/components/form/table/form.table.component.css +50 -0
  96. package/src/lib/components/form/table/form.table.component.html +8 -0
  97. package/src/lib/components/form/table/form.table.component.ts +94 -0
  98. package/src/lib/components/form/textarea/form.textarea.component.css +109 -0
  99. package/src/lib/components/form/textarea/form.textarea.component.html +10 -0
  100. package/src/lib/components/form/textarea/form.textarea.component.ts +76 -0
  101. package/src/lib/components/form/textbox/form.textbox.component.css +296 -0
  102. package/src/lib/components/form/textbox/form.textbox.component.html +13 -0
  103. package/src/lib/components/form/textbox/form.textbox.component.ts +185 -0
  104. package/src/lib/components/form/time/form.time.component.css +205 -0
  105. package/src/lib/components/form/time/form.time.component.html +22 -0
  106. package/src/lib/components/form/time/form.time.component.ts +139 -0
  107. package/src/lib/components/form/tree/form.tree.component.css +109 -0
  108. package/src/lib/components/form/tree/form.tree.component.html +11 -0
  109. package/src/lib/components/form/tree/form.tree.component.ts +98 -0
  110. package/src/lib/components/form/tree/item/form.tree.item.component.css +142 -0
  111. package/src/lib/components/form/tree/item/form.tree.item.component.html +9 -0
  112. package/src/lib/components/form/tree/item/form.tree.item.component.ts +49 -0
  113. package/src/lib/components/header/header.component.css +57 -0
  114. package/src/lib/components/header/header.component.html +5 -0
  115. package/src/lib/components/header/header.component.ts +28 -0
  116. package/src/lib/components/header/sub/sub.header.component.css +62 -0
  117. package/src/lib/components/header/sub/sub.header.component.html +8 -0
  118. package/src/lib/components/header/sub/sub.header.component.ts +11 -0
  119. package/src/lib/components/layout/layout.component.css +300 -0
  120. package/src/lib/components/layout/layout.component.html +20 -0
  121. package/src/lib/components/layout/layout.component.ts +21 -0
  122. package/src/lib/components/loading/loading.component.css +39 -0
  123. package/src/lib/components/loading/loading.component.html +8 -0
  124. package/src/lib/components/loading/loading.component.ts +18 -0
  125. package/src/lib/components/login/login.component.css +389 -0
  126. package/src/lib/components/login/login.component.html +27 -0
  127. package/src/lib/components/login/login.component.ts +145 -0
  128. package/src/lib/components/modal/modal.component.css +60 -0
  129. package/src/lib/components/modal/modal.component.html +12 -0
  130. package/src/lib/components/modal/modal.component.ts +23 -0
  131. package/src/lib/components/notfound/notfound.component.css +134 -0
  132. package/src/lib/components/notfound/notfound.component.html +10 -0
  133. package/src/lib/components/notfound/notfound.component.ts +25 -0
  134. package/src/lib/components/notification/notification.component.css +45 -0
  135. package/src/lib/components/notification/notification.component.html +2 -0
  136. package/src/lib/components/notification/notification.component.ts +11 -0
  137. package/src/lib/components/sidebar/item/sidebar.item.component.css +236 -0
  138. package/src/lib/components/sidebar/item/sidebar.item.component.html +16 -0
  139. package/src/lib/components/sidebar/item/sidebar.item.component.ts +54 -0
  140. package/src/lib/components/sidebar/sidebar.component.css +42 -0
  141. package/src/lib/components/sidebar/sidebar.component.html +10 -0
  142. package/src/lib/components/sidebar/sidebar.component.ts +60 -0
  143. package/src/lib/components/steps/steps.component.css +320 -0
  144. package/src/lib/components/steps/steps.component.html +18 -0
  145. package/src/lib/components/steps/steps.component.ts +44 -0
  146. package/src/lib/components/table/loading/table.loading.component.css +29 -0
  147. package/src/lib/components/table/loading/table.loading.component.html +9 -0
  148. package/src/lib/components/table/loading/table.loading.component.ts +14 -0
  149. package/src/lib/components/table/pagination/table.pagination.component.css +138 -0
  150. package/src/lib/components/table/pagination/table.pagination.component.html +9 -0
  151. package/src/lib/components/table/pagination/table.pagination.component.ts +89 -0
  152. package/src/lib/components/table/report/table.report.component.css +125 -0
  153. package/src/lib/components/table/report/table.report.component.html +19 -0
  154. package/src/lib/components/table/report/table.report.component.ts +238 -0
  155. package/src/lib/components/table/row/table.row.component.css +170 -0
  156. package/src/lib/components/table/row/table.row.component.html +21 -0
  157. package/src/lib/components/table/row/table.row.component.ts +373 -0
  158. package/src/lib/components/table/table.component.css +116 -0
  159. package/src/lib/components/table/table.component.html +62 -0
  160. package/src/lib/components/table/table.component.ts +180 -0
  161. package/src/lib/components/tooltip/tooltip.component.css +159 -0
  162. package/src/lib/components/tooltip/tooltip.component.html +1 -0
  163. package/src/lib/components/tooltip/tooltip.component.ts +15 -0
  164. package/src/lib/ps-toolkit-ui.module.ts +94 -0
  165. package/src/lib/services/config.service.ts +8 -0
  166. package/{public-api.d.ts → src/public-api.ts} +53 -48
  167. package/src/test.ts +26 -0
  168. package/tsconfig.lib.json +25 -0
  169. package/tsconfig.lib.prod.json +10 -0
  170. package/tsconfig.spec.json +17 -0
  171. package/tslint.json +17 -0
  172. package/bundles/ps-toolkit-ui.umd.js +0 -7646
  173. package/bundles/ps-toolkit-ui.umd.js.map +0 -1
  174. package/bundles/ps-toolkit-ui.umd.min.js +0 -2
  175. package/bundles/ps-toolkit-ui.umd.min.js.map +0 -1
  176. package/esm2015/lib/classes/chart.class.js +0 -140
  177. package/esm2015/lib/classes/enum.class.js +0 -187
  178. package/esm2015/lib/classes/form.class.js +0 -481
  179. package/esm2015/lib/classes/helper.class.js +0 -284
  180. package/esm2015/lib/classes/lang.class.js +0 -32
  181. package/esm2015/lib/classes/login.class.js +0 -22
  182. package/esm2015/lib/classes/modal.class.js +0 -52
  183. package/esm2015/lib/classes/permission.class.js +0 -61
  184. package/esm2015/lib/classes/request.class.js +0 -256
  185. package/esm2015/lib/classes/safestyle.class.js +0 -15
  186. package/esm2015/lib/classes/sidebar.class.js +0 -14
  187. package/esm2015/lib/classes/steps.class.js +0 -20
  188. package/esm2015/lib/classes/string.class.js +0 -220
  189. package/esm2015/lib/classes/table.class.js +0 -215
  190. package/esm2015/lib/components/accordion/accordion.component.js +0 -45
  191. package/esm2015/lib/components/alert/alert.component.js +0 -39
  192. package/esm2015/lib/components/base.component.js +0 -45
  193. package/esm2015/lib/components/calendar/calendar.component.js +0 -97
  194. package/esm2015/lib/components/chart/chart.component.js +0 -17
  195. package/esm2015/lib/components/clock/clock.component.js +0 -33
  196. package/esm2015/lib/components/confirm/confirm.component.js +0 -50
  197. package/esm2015/lib/components/footer/footer.component.js +0 -23
  198. package/esm2015/lib/components/form/bank-card/form.bank-card.component.js +0 -148
  199. package/esm2015/lib/components/form/button/form.button.component.js +0 -68
  200. package/esm2015/lib/components/form/car/form.car.component.js +0 -84
  201. package/esm2015/lib/components/form/car/search/form.car.search.component.js +0 -172
  202. package/esm2015/lib/components/form/checkbox/form.checkbox.component.js +0 -66
  203. package/esm2015/lib/components/form/date/form.date.component.js +0 -254
  204. package/esm2015/lib/components/form/datetime/form.datetime.component.js +0 -104
  205. package/esm2015/lib/components/form/file/form.file.component.js +0 -133
  206. package/esm2015/lib/components/form/finger/form.finger.component.js +0 -138
  207. package/esm2015/lib/components/form/hidden/form.hidden.component.js +0 -31
  208. package/esm2015/lib/components/form/icon/form.icon.component.js +0 -76
  209. package/esm2015/lib/components/form/index/form.component.js +0 -48
  210. package/esm2015/lib/components/form/label/form.label.component.js +0 -32
  211. package/esm2015/lib/components/form/plaque/form.plaque.component.js +0 -176
  212. package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +0 -390
  213. package/esm2015/lib/components/form/radio/form.radio.component.js +0 -79
  214. package/esm2015/lib/components/form/select/form.select.component.js +0 -374
  215. package/esm2015/lib/components/form/select/item/form.select.item.component.js +0 -43
  216. package/esm2015/lib/components/form/table/form.table.component.js +0 -98
  217. package/esm2015/lib/components/form/textarea/form.textarea.component.js +0 -78
  218. package/esm2015/lib/components/form/textbox/form.textbox.component.js +0 -186
  219. package/esm2015/lib/components/form/time/form.time.component.js +0 -145
  220. package/esm2015/lib/components/form/tree/form.tree.component.js +0 -99
  221. package/esm2015/lib/components/form/tree/item/form.tree.item.component.js +0 -48
  222. package/esm2015/lib/components/header/header.component.js +0 -33
  223. package/esm2015/lib/components/header/sub/sub.header.component.js +0 -14
  224. package/esm2015/lib/components/layout/layout.component.js +0 -25
  225. package/esm2015/lib/components/loading/loading.component.js +0 -22
  226. package/esm2015/lib/components/login/login.component.js +0 -148
  227. package/esm2015/lib/components/modal/modal.component.js +0 -25
  228. package/esm2015/lib/components/notfound/notfound.component.js +0 -29
  229. package/esm2015/lib/components/notification/notification.component.js +0 -14
  230. package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +0 -53
  231. package/esm2015/lib/components/sidebar/sidebar.component.js +0 -67
  232. package/esm2015/lib/components/steps/steps.component.js +0 -51
  233. package/esm2015/lib/components/table/loading/table.loading.component.js +0 -17
  234. package/esm2015/lib/components/table/pagination/table.pagination.component.js +0 -84
  235. package/esm2015/lib/components/table/report/table.report.component.js +0 -246
  236. package/esm2015/lib/components/table/row/table.row.component.js +0 -379
  237. package/esm2015/lib/components/table/table.component.js +0 -179
  238. package/esm2015/lib/components/tooltip/tooltip.component.js +0 -19
  239. package/esm2015/lib/ps-toolkit-ui.module.js +0 -95
  240. package/esm2015/lib/services/config.service.js +0 -14
  241. package/esm2015/ps-toolkit-ui.js +0 -20
  242. package/esm2015/public-api.js +0 -52
  243. package/fesm2015/ps-toolkit-ui.js +0 -6566
  244. package/fesm2015/ps-toolkit-ui.js.map +0 -1
  245. package/lib/classes/chart.class.d.ts +0 -11
  246. package/lib/classes/enum.class.d.ts +0 -158
  247. package/lib/classes/form.class.d.ts +0 -173
  248. package/lib/classes/helper.class.d.ts +0 -28
  249. package/lib/classes/lang.class.d.ts +0 -5
  250. package/lib/classes/login.class.d.ts +0 -17
  251. package/lib/classes/modal.class.d.ts +0 -19
  252. package/lib/classes/permission.class.d.ts +0 -31
  253. package/lib/classes/request.class.d.ts +0 -12
  254. package/lib/classes/safestyle.class.d.ts +0 -7
  255. package/lib/classes/sidebar.class.d.ts +0 -11
  256. package/lib/classes/steps.class.d.ts +0 -17
  257. package/lib/classes/string.class.d.ts +0 -218
  258. package/lib/classes/table.class.d.ts +0 -69
  259. package/lib/components/accordion/accordion.component.d.ts +0 -7
  260. package/lib/components/alert/alert.component.d.ts +0 -10
  261. package/lib/components/base.component.d.ts +0 -14
  262. package/lib/components/calendar/calendar.component.d.ts +0 -26
  263. package/lib/components/chart/chart.component.d.ts +0 -5
  264. package/lib/components/clock/clock.component.d.ts +0 -11
  265. package/lib/components/confirm/confirm.component.d.ts +0 -14
  266. package/lib/components/footer/footer.component.d.ts +0 -6
  267. package/lib/components/form/bank-card/form.bank-card.component.d.ts +0 -22
  268. package/lib/components/form/button/form.button.component.d.ts +0 -15
  269. package/lib/components/form/car/form.car.component.d.ts +0 -16
  270. package/lib/components/form/car/search/form.car.search.component.d.ts +0 -17
  271. package/lib/components/form/checkbox/form.checkbox.component.d.ts +0 -14
  272. package/lib/components/form/date/form.date.component.d.ts +0 -42
  273. package/lib/components/form/datetime/form.datetime.component.d.ts +0 -13
  274. package/lib/components/form/file/form.file.component.d.ts +0 -17
  275. package/lib/components/form/finger/form.finger.component.d.ts +0 -15
  276. package/lib/components/form/hidden/form.hidden.component.d.ts +0 -7
  277. package/lib/components/form/icon/form.icon.component.d.ts +0 -15
  278. package/lib/components/form/index/form.component.d.ts +0 -10
  279. package/lib/components/form/label/form.label.component.d.ts +0 -8
  280. package/lib/components/form/plaque/form.plaque.component.d.ts +0 -22
  281. package/lib/components/form/plaque/select/form.plaque.select.component.d.ts +0 -36
  282. package/lib/components/form/radio/form.radio.component.d.ts +0 -13
  283. package/lib/components/form/select/form.select.component.d.ts +0 -39
  284. package/lib/components/form/select/item/form.select.item.component.d.ts +0 -12
  285. package/lib/components/form/table/form.table.component.d.ts +0 -9
  286. package/lib/components/form/textarea/form.textarea.component.d.ts +0 -13
  287. package/lib/components/form/textbox/form.textbox.component.d.ts +0 -20
  288. package/lib/components/form/time/form.time.component.d.ts +0 -25
  289. package/lib/components/form/tree/form.tree.component.d.ts +0 -16
  290. package/lib/components/form/tree/item/form.tree.item.component.d.ts +0 -17
  291. package/lib/components/header/header.component.d.ts +0 -9
  292. package/lib/components/header/sub/sub.header.component.d.ts +0 -3
  293. package/lib/components/layout/layout.component.d.ts +0 -8
  294. package/lib/components/loading/loading.component.d.ts +0 -5
  295. package/lib/components/login/login.component.d.ts +0 -13
  296. package/lib/components/modal/modal.component.d.ts +0 -9
  297. package/lib/components/notfound/notfound.component.d.ts +0 -8
  298. package/lib/components/notification/notification.component.d.ts +0 -3
  299. package/lib/components/sidebar/item/sidebar.item.component.d.ts +0 -14
  300. package/lib/components/sidebar/sidebar.component.d.ts +0 -19
  301. package/lib/components/steps/steps.component.d.ts +0 -10
  302. package/lib/components/table/loading/table.loading.component.d.ts +0 -5
  303. package/lib/components/table/pagination/table.pagination.component.d.ts +0 -15
  304. package/lib/components/table/report/table.report.component.d.ts +0 -34
  305. package/lib/components/table/row/table.row.component.d.ts +0 -34
  306. package/lib/components/table/table.component.d.ts +0 -40
  307. package/lib/components/tooltip/tooltip.component.d.ts +0 -5
  308. package/lib/ps-toolkit-ui.module.d.ts +0 -4
  309. package/lib/services/config.service.d.ts +0 -6
  310. package/ps-toolkit-ui.d.ts +0 -19
  311. package/ps-toolkit-ui.metadata.json +0 -1
@@ -0,0 +1,151 @@
1
+ .form-input-con.file {
2
+ position: relative;
3
+ float: right;
4
+ width: 100%;
5
+ padding: 0 15px;
6
+ cursor: pointer;
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.file .form-input {
13
+ position: relative;
14
+ float: right;
15
+ width: 100%;
16
+ }
17
+
18
+ .form-input-con.file .form-input .input-base-file, .form-input-con.file .form-input .input-base {
19
+ position: absolute;
20
+ width: 0;
21
+ height: 0;
22
+ opacity: 0;
23
+ cursor: pointer;
24
+ top: 50%;
25
+ right: 50%;
26
+ z-index: 1;
27
+ }
28
+
29
+ .form-input-con.file .form-input .control {
30
+ float: left;
31
+ width: 100%;
32
+ height: 35px;
33
+ line-height: 35px;
34
+ padding: 0 135px 0 35px;
35
+ text-align: center;
36
+ position: relative;
37
+ z-index: 2;
38
+ overflow: hidden;
39
+ text-overflow: ellipsis;
40
+ white-space: nowrap;
41
+ border-radius: 5px;
42
+ border: var(--border-input);
43
+ background-color: white;
44
+ font-size: 11px;
45
+ }
46
+ .form-input-con.file .form-input .control .title{
47
+ float: right;
48
+ width: 100%;
49
+ }
50
+
51
+ .form-input-con.file .form-input .control:hover, .form-input-con.file .form-input .input-base:focus + .control {
52
+ outline: none;
53
+ border: var(--border-input-dark);
54
+ }
55
+
56
+ .form-input-con.file.error .form-input .control {
57
+ border: var(--border-input-red);
58
+ }
59
+ .form-input-con.file.error .form-input .control, .form-input-con.file.error .form-input span.icon {
60
+ color: var(--red);
61
+ }
62
+ .form-input-con.file .form-input .control:hover .button, .form-input-con.file .form-input .input-base:focus + .control .button {
63
+ background-color: var(--green-dark);
64
+ }
65
+ .form-input-con.file .form-input .button:hover {
66
+ background-color: var(--green-dark);
67
+ }
68
+
69
+ .form-input-con.file .form-input i.icon {
70
+ position: absolute;
71
+ width: 35px;
72
+ font-size: 13px;
73
+ color: var(--comp);
74
+ text-align: center;
75
+ height: 35px;
76
+ line-height: 35px;
77
+ left: 0;
78
+ bottom: 0;
79
+ z-index: 2;
80
+ }
81
+
82
+ .form-input-con.file .form-input .label {
83
+ float: right;
84
+ width: 100%;
85
+ height: 20px;
86
+ line-height: 20px;
87
+ padding: 0 10px;
88
+ font-size: 12px;
89
+ margin-bottom: 3px;
90
+ cursor: default;
91
+ -webkit-user-select: none;
92
+ -moz-user-select: none;
93
+ -khtml-user-select: none;
94
+ -ms-user-select: none;
95
+ direction: rtl;
96
+ text-align: right;
97
+ }
98
+ .form-input-con.file .form-input .label .required-icon{
99
+ height: 20px;
100
+ width: 20px;
101
+ line-height: 20px;
102
+ font-size: 9px;
103
+ color: var(--red);
104
+ text-align: center;
105
+ }
106
+
107
+ .form-input-con.file .form-input .button {
108
+ position: absolute;
109
+ width: 100px;
110
+ right: 0;
111
+ bottom: 0;
112
+ background-color: var(--green);
113
+ border-radius: 0 5px 5px 0;
114
+ height: 35px;
115
+ line-height: 35px;
116
+ text-align: center;
117
+ color: white;
118
+ font-size: 10px;
119
+ z-index: 2;
120
+ }
121
+
122
+ .form-input-con.file.h-35 {
123
+ height: 35px;
124
+ }
125
+
126
+ .form-input-con.file.has-value.h-35 .form-input .control {
127
+ height: 35px;
128
+ direction: ltr;
129
+ font-size: 9px;
130
+ }
131
+
132
+ .form-input-con.file.h-35 .form-input i.icon, .form-input-con.file.h-35 .form-input .button {
133
+ height: 35px;
134
+ line-height: 35px;
135
+ }
136
+
137
+ .form-input-con.file.h-30 {
138
+ height: 30px;
139
+ }
140
+
141
+ .form-input-con.file.h-30 .form-input .control {
142
+ height: 30px;
143
+ line-height: 30px;
144
+ direction: ltr;
145
+ font-size: 9px;
146
+ }
147
+
148
+ .form-input-con.file.h-30 .form-input i.icon, .form-input-con.file.h-30 .form-input .button {
149
+ height: 30px;
150
+ line-height: 30px;
151
+ }
@@ -0,0 +1,12 @@
1
+ <label #inputDiv [id]="inp.name + 'Input'" [for]="inp.name + 'InputFile'" [className]="inp.class + (inp.error == null ? '' : ' error') + (inp.value != null && inp.value != '' ? ' has-value' : '') + ' form-input-con file'">
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 #inputBaseFile class="input-base-file" type="file" [id]="inp.name + 'InputFile'" [multiple]="inp.multiple" (change)="onChange($event)">
5
+ <input #inputBase type="text" class="input-base" (keydown)="onKeyDown($event)" (focusin)="onFocusIn()">
6
+ <div class="control">
7
+ <div class="title">{{title()}}</div>
8
+ <div class="button">{{inp.multiple ? inp.l("ChooseFiles") : inp.l("ChooseFile")}}</div>
9
+ </div>
10
+ <i *ngIf="inp.icon != null || inp.loading" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
11
+ </div>
12
+ </label>
@@ -0,0 +1,130 @@
1
+ import {Component, ElementRef, EventEmitter, HostListener, 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-file',
8
+ templateUrl: './form.file.component.html',
9
+ styleUrls: ['./form.file.component.css']
10
+ })
11
+ export class FormFileComponent implements OnInit{
12
+ @Input()
13
+ inp: InputClass;
14
+ @Output()
15
+ changeIndex = new EventEmitter<string>();
16
+ @ViewChild('inputDiv') inputDiv: ElementRef;
17
+ @ViewChild('inputBaseFile') inputBaseFile: ElementRef;
18
+ @ViewChild('inputBase') inputBase: ElementRef;
19
+ constructor(){
20
+ }
21
+
22
+ ngOnInit(): void {
23
+ this.inp.setValue = (v) => {
24
+ this.inp.value = v;
25
+ };
26
+ this.inp.isValid = () => {
27
+ this.inp.error = null;
28
+ if (this.inp.required && !this.inp.value) {
29
+ this.inp.error = InputError.Required;
30
+ return false;
31
+ }
32
+ if (!this.inp.required && !this.inp.value) {
33
+ return true;
34
+ }
35
+ if (this.inp.allowed != null && this.inp.value != null && typeof this.inp.value !== 'string' &&
36
+ this.inp.value.map(x => this.inp.allowed.includes(x.name.split('.').pop().toLowerCase())).filter(x => !x).length > 0) {
37
+ this.inp.error = InputError.NotAllowed;
38
+ return false;
39
+ }
40
+ if (this.inp.maxLength !== -1 && this.inp.value != null && typeof this.inp.value !== 'string' &&
41
+ this.inp.value.map(x => x.size > this.inp.maxLength * 1024).filter(x => x).length > 0) {
42
+ this.inp.error = InputError.MaxContent;
43
+ return false;
44
+ }
45
+ return true;
46
+ };
47
+ this.inp.clear = () => {
48
+ this.inp.error = null;
49
+ this.inp.value = this.inp.default;
50
+ };
51
+ this.inp.data = () => {
52
+ if (this.inp.value && typeof this.inp.value !== 'string') {
53
+ if (!this.inp.exportPdf) {
54
+ return this.inp.value;
55
+ } else {
56
+ // const doc = new jsPDF();
57
+ // let y = 5;
58
+ // for (const img of this.inp.value) {
59
+ // const i = await this.getPdfImage(img);
60
+ // if (y + i.h > 287) {
61
+ // doc.addPage();
62
+ // y = 5;
63
+ // }
64
+ // doc.addImage(i.base64, 'JPEG', 5, y, i.w, i.h);
65
+ // y += i.h + 5;
66
+ // }
67
+ // return doc.output('blob');
68
+ }
69
+ }
70
+ return null;
71
+ };
72
+ this.inp.focus = () => {
73
+ this.onClick();
74
+ };
75
+ }
76
+ getPdfImage(file): any{
77
+ return new Promise((resolve, reject) => {
78
+ const reader = new FileReader();
79
+ reader.readAsDataURL(file);
80
+ reader.onload = () => {
81
+ const i = new Image();
82
+ i.src = window.URL.createObjectURL(file);
83
+ i.onload = () => {
84
+ let w = i.width;
85
+ let h = i.height;
86
+ if (w > 200){
87
+ h = (200 * h) / w;
88
+ w = 200;
89
+ }
90
+ if (h > 287){
91
+ w = (287 * w) / h;
92
+ h = 287;
93
+ }
94
+ resolve({base64: reader.result.toString(), w, h});
95
+ };
96
+ };
97
+ reader.onerror = error => reject(error);
98
+ });
99
+ }
100
+ onClick(): void{
101
+ $(this.inputBase.nativeElement).focus();
102
+ }
103
+ onChange(e): void{
104
+ this.inp.error = null;
105
+ const v = [];
106
+ for (const f of e.target.files){
107
+ v.push(f);
108
+ }
109
+ this.inp.value = v;
110
+ this.changeIndex.emit('Tab');
111
+ }
112
+ onKeyDown(e): void{
113
+ const code = e.keyCode || e.which;
114
+ if (code === 9 || code === 13) {
115
+ e.preventDefault();
116
+ this.changeIndex.emit(e.shiftKey ? 'ShiftTab' : 'Tab');
117
+ }
118
+ }
119
+ onFocusIn(): void{
120
+ $(this.inputBase.nativeElement).focus();
121
+ }
122
+ title(): string{
123
+ if (this.inp.value == null){
124
+ return this.inp.l('FileNotSelected');
125
+ }
126
+ const t = typeof this.inp.value === 'string' ? this.inp.value : this.inp.value.map(x => x.name).join(', ');
127
+ const l = typeof this.inp.value === 'string' ? 1 : this.inp.value.length;
128
+ return this.inp.l('FileSelected', [l, t]);
129
+ }
130
+ }
@@ -0,0 +1,215 @@
1
+ .form-input.finger {
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.finger .form-input-flex {
12
+ float: right;
13
+ width: 100%;
14
+ justify-content: center;
15
+ align-items: center;
16
+ display: flex;
17
+ }
18
+ .form-input.finger .form-input-flex .form-input-con {
19
+ float: right;
20
+ width: 250px;
21
+ }
22
+ .form-input.finger .form-input-flex .form-input-con .label {
23
+ float: right;
24
+ width: 100%;
25
+ height: 20px;
26
+ line-height: 20px;
27
+ padding: 0 10px;
28
+ font-size: 12px;
29
+ margin-bottom: 3px;
30
+ cursor: default;
31
+ -webkit-user-select: none;
32
+ -moz-user-select: none;
33
+ -khtml-user-select: none;
34
+ -ms-user-select: none;
35
+ direction: rtl;
36
+ text-align: right;
37
+ }
38
+ .form-input.finger .form-input-flex .form-input-con.error .label {
39
+ font-size: 10px;
40
+ color: var(--red);
41
+ }
42
+ .form-input.finger .form-input-flex .form-input-con .label .required-icon{
43
+ height: 20px;
44
+ width: 20px;
45
+ line-height: 20px;
46
+ font-size: 9px;
47
+ color: var(--red);
48
+ text-align: center;
49
+ }
50
+ .form-input.finger .form-input-flex .form-input-con > .control{
51
+ float: right;
52
+ width: 100%;
53
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
54
+ border-radius: 5px;
55
+ background-color: white;
56
+ position: relative;
57
+ min-height: 35px;
58
+ }
59
+
60
+ .form-input.finger .form-input-flex .form-input-con .input-base {
61
+ position: absolute;
62
+ width: 0;
63
+ height: 0;
64
+ opacity: 0;
65
+ cursor: pointer;
66
+ top: 50%;
67
+ right: 50%;
68
+ z-index: 1;
69
+ }
70
+ .form-input.finger .form-input-flex .form-input-con:hover .control, .form-input.finger .form-input-flex .form-input-con .input-base:focus + .control {
71
+ box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.7);
72
+ }
73
+ .form-input.finger .form-input-flex .form-input-con 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
+
89
+ .form-input.finger .form-input-flex .form-input-con.error > .control {
90
+ box-shadow: 0 1px 3px 0 var(--red);
91
+ }
92
+ .form-input.finger .form-input-flex .form-input-con.error i.icon {
93
+ color: var(--red-cc);
94
+ }
95
+
96
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers {
97
+ float: right;
98
+ width: 100%;
99
+ position: relative;
100
+ }
101
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con{
102
+ float: right;
103
+ width: 50%;
104
+ position: relative;
105
+ }
106
+
107
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con .hand{
108
+ float: right;
109
+ width: 100%;
110
+ position: relative;
111
+ font-size: 100px;
112
+ height: 160px;
113
+ line-height: 160px;
114
+ text-align: right;
115
+ padding-right: 10px;
116
+ }
117
+
118
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con .btn-f{
119
+ position: absolute;
120
+ font-size: 12px;
121
+ color: white;
122
+ cursor: pointer;
123
+ background-color: var(--green);
124
+ border-radius: 50%;
125
+ width: 17px;
126
+ height: 17px;
127
+ text-align: center;
128
+ justify-content: center;
129
+ align-items: center;
130
+ display: flex;
131
+ }
132
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con .btn-f:hover{
133
+ background-color: var(--green-dark);
134
+ }
135
+
136
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con .btn-f.remove{
137
+ background-color: var(--red);
138
+ }
139
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con .btn-f.remove:hover{
140
+ background-color: var(--red-dark);
141
+ }
142
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con .btn-f.loading{
143
+ background-color: var(--comp);
144
+ }
145
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con .btn-f.loading:hover{
146
+ background-color: var(--comp);
147
+ }
148
+
149
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.right .btn-f.f1{
150
+ top: 79px;
151
+ right: 26px;
152
+ }
153
+
154
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.right .btn-f.f2{
155
+ top: 37px;
156
+ right: 47px;
157
+ }
158
+
159
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.right .btn-f.f3{
160
+ top: 29px;
161
+ right: 64px;
162
+ }
163
+
164
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.right .btn-f.f4{
165
+ top: 37px;
166
+ right: 82px;
167
+ }
168
+
169
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.right .btn-f.f5{
170
+ top: 54px;
171
+ right: 99px;
172
+ }
173
+
174
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.left .btn-f.f1{
175
+ top: 79px;
176
+ left: 26px;
177
+ }
178
+
179
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.left .btn-f.f2{
180
+ top: 37px;
181
+ left: 47px;
182
+ }
183
+
184
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.left .btn-f.f3{
185
+ top: 29px;
186
+ left: 64px;
187
+ }
188
+
189
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.left .btn-f.f4{
190
+ top: 37px;
191
+ left: 82px;
192
+ }
193
+
194
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con.left .btn-f.f5{
195
+ top: 54px;
196
+ left: 99px;
197
+ }
198
+
199
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con .btn-f .img{
200
+ position: absolute;
201
+ width: 75px;
202
+ height: 100px;
203
+ bottom: 20px;
204
+ right: calc((17px - 75px) / 2);
205
+ background-position: center center;
206
+ background-repeat: no-repeat;
207
+ background-size: cover;
208
+ z-index: 1;
209
+ border-radius: 5px;
210
+ box-shadow: var(--box-shadow);
211
+ display: none;
212
+ }
213
+ .form-input.finger .form-input-flex .form-input-con > .control .fingers .hand-con .btn-f.remove:hover .img{
214
+ display: block;
215
+ }
@@ -0,0 +1,59 @@
1
+ <div #inputDiv [id]="inp.name + 'Input'" [className]="inp.class + ' form-input finger' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '')">
2
+ <div class="form-input-flex">
3
+ <div class="form-input-con" (click)="onClick()">
4
+ <div *ngIf="inp.displayLabel" class="label"><i *ngIf="inp.required" class="fas fa-star-of-life required-icon"></i>{{inp.getLabel()}}</div>
5
+ <input #inputBase type="checkbox" class="input-base" (keydown)="onKeyDown($event)" (focusin)="onFocusIn()">
6
+ <div class="control">
7
+ <i *ngIf="inp.icon != null || inp.loading" #inputIcon [className]="(inp.loading ? 'fa-spin fa-spinner ' : inp.icon) + (inp.icon.includes('far') ? '' : ' fas') + ' icon'"></i>
8
+ <div class="fingers">
9
+ <div class="hand-con right">
10
+ <i class="fas fa-hand-paper hand fa-flip-horizontal"></i>
11
+ <div (click)="addRemoveFinger('R1')" [className]="(inp.value.R1 == 'Loading' ? 'loading ' : (inp.value.R1 == null ? '' : 'remove ')) + 'btn-f f1'">
12
+ <i [className]="(inp.value.R1 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.R1 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
13
+ <div class="img" *ngIf="inp.value.R1 && inp.value.R1.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.R1.Image + '\')'}"></div>
14
+ </div>
15
+ <div (click)="addRemoveFinger('R2')" [className]="(inp.value.R2 == 'Loading' ? 'loading ' : (inp.value.R2 == null ? '' : 'remove ')) + 'btn-f f2'">
16
+ <i [className]="(inp.value.R2 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.R2 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
17
+ <div class="img" *ngIf="inp.value.R2 && inp.value.R2.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.R2.Image + '\')'}"></div>
18
+ </div>
19
+ <div (click)="addRemoveFinger('R3')" [className]="(inp.value.R3 == 'Loading' ? 'loading ' : (inp.value.R3 == null ? '' : 'remove ')) + 'btn-f f3'">
20
+ <i [className]="(inp.value.R3 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.R3 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
21
+ <div class="img" *ngIf="inp.value.R3 && inp.value.R3.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.R3.Image + '\')'}"></div>
22
+ </div>
23
+ <div (click)="addRemoveFinger('R4')" [className]="(inp.value.R4 == 'Loading' ? 'loading ' : (inp.value.R4 == null ? '' : 'remove ')) + 'btn-f f4'">
24
+ <i [className]="(inp.value.R4 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.R4 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
25
+ <div class="img" *ngIf="inp.value.R4 && inp.value.R4.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.R4.Image + '\')'}"></div>
26
+ </div>
27
+ <div (click)="addRemoveFinger('R5')" [className]="(inp.value.R5 == 'Loading' ? 'loading ' : (inp.value.R5 == null ? '' : 'remove ')) + 'btn-f f5'">
28
+ <i [className]="(inp.value.R5 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.R5 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
29
+ <div class="img" *ngIf="inp.value.R5 && inp.value.R5.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.R5.Image + '\')'}"></div>
30
+ </div>
31
+ </div>
32
+ <div class="hand-con left">
33
+ <i class="fas hand fa-hand-paper"></i>
34
+ <div (click)="addRemoveFinger('L1')" [className]="(inp.value.L1 == 'Loading' ? 'loading ' : (inp.value.L1 == null ? '' : 'remove ')) + 'btn-f f1'">
35
+ <i [className]="(inp.value.L1 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.L1 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
36
+ <div class="img" *ngIf="inp.value.L1 && inp.value.L1.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.L1.Image + '\')'}"></div>
37
+ </div>
38
+ <div (click)="addRemoveFinger('L2')" [className]="(inp.value.L2 == 'Loading' ? 'loading ' : (inp.value.L2 == null ? '' : 'remove ')) + 'btn-f f2'">
39
+ <i [className]="(inp.value.L2 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.L2 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
40
+ <div class="img" *ngIf="inp.value.L2 && inp.value.L2.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.L2.Image + '\')'}"></div>
41
+ </div>
42
+ <div (click)="addRemoveFinger('L3')" [className]="(inp.value.L3 == 'Loading' ? 'loading ' : (inp.value.L3 == null ? '' : 'remove ')) + 'btn-f f3'">
43
+ <i [className]="(inp.value.L3 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.L3 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
44
+ <div class="img" *ngIf="inp.value.L3 && inp.value.L3.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.L3.Image + '\')'}"></div>
45
+ </div>
46
+ <div (click)="addRemoveFinger('L4')" [className]="(inp.value.L4 == 'Loading' ? 'loading ' : (inp.value.L4 == null ? '' : 'remove ')) + 'btn-f f4'">
47
+ <i [className]="(inp.value.L4 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.L4 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
48
+ <div class="img" *ngIf="inp.value.L4 && inp.value.L4.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.L4.Image + '\')'}"></div>
49
+ </div>
50
+ <div (click)="addRemoveFinger('L5')" [className]="(inp.value.L5 == 'Loading' ? 'loading ' : (inp.value.L5 == null ? '' : 'remove ')) + 'btn-f f5'">
51
+ <i [className]="(inp.value.L5 == 'Loading' ? 'fa-spin fa-spinner ' : (inp.value.L5 == null ? 'fa-plus ' : 'fa-minus ')) + 'fas'"></i>
52
+ <div class="img" *ngIf="inp.value.L5 && inp.value.L5.Image" [style]="{backgroundImage: 'url(\'data:image/png;base64,' + inp.value.L5.Image + '\')'}"></div>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>