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,125 @@
1
+
2
+ ::ng-deep lib-table-row{
3
+ display: contents;
4
+ }
5
+ tr{
6
+ position: relative;
7
+ }
8
+
9
+ tr td{
10
+ font-family: VazirLight;
11
+ font-size: 12px;
12
+ font-weight: normal;
13
+ text-align: center;
14
+ position: relative;
15
+ vertical-align: middle;
16
+ }
17
+
18
+ tr.children{
19
+ display: none;
20
+ }
21
+
22
+ tr.children.rightline:after{
23
+ right: 20px;
24
+ }
25
+
26
+ ::ng-deep tr td .select-row{
27
+ font-size: 18px;
28
+ height: 30px;
29
+ line-height: 30px;
30
+ cursor: pointer;
31
+ }
32
+
33
+ ::ng-deep tr td .handle-sortable{
34
+ cursor: move;
35
+ }
36
+
37
+ ::ng-deep tr td .status{
38
+ padding: 3px 10px;
39
+ border-radius: 5px;
40
+ font-size: 10px;
41
+ cursor: default;
42
+ display: inline-block;
43
+ vertical-align: middle;
44
+ -webkit-user-select: none;
45
+ -moz-user-select: none;
46
+ -khtml-user-select: none;
47
+ -ms-user-select: none;
48
+ }
49
+ ::ng-deep tr td .status.blue{
50
+ color: var(--blue);
51
+ background-color: var(--blue-22);
52
+ }
53
+ ::ng-deep tr td .status.green{
54
+ color: var(--green);
55
+ background-color: var(--green-22);
56
+ }
57
+ ::ng-deep tr td .status.red{
58
+ color: var(--red);
59
+ background-color: var(--red-22);
60
+ }
61
+ ::ng-deep tr td .status.gray{
62
+ color: var(--black);
63
+ background-color: var(--black-22);
64
+ }
65
+ ::ng-deep tr td .status.yellow{
66
+ color: var(--yellow);
67
+ background-color: var(--yellow-22);
68
+ }
69
+
70
+ ::ng-deep tr td .plaque{
71
+ float: right;
72
+ width: 140px;
73
+ height: 30px;
74
+ background-image: url("../../../../assets/images/plaque.png");
75
+ background-repeat: no-repeat;
76
+ background-position: center center;
77
+ background-size: contain;
78
+ margin-right: calc(50% - 70px);
79
+ font-size: 14px;
80
+ background-color: white;
81
+ margin-top: 5px;
82
+ border-radius: 4px;
83
+ }
84
+ ::ng-deep tr td .plaque.plaque-m{
85
+ background-image: url("../../../../assets/images/plaque_m.png");
86
+ }
87
+ ::ng-deep tr td .plaque.p{
88
+ background-color: #ffc913;
89
+ }
90
+ ::ng-deep tr td .plaque.g{
91
+ background-color: #e20600;
92
+ }
93
+ ::ng-deep tr td .plaque .part1{
94
+ float: left;
95
+ width: 32px;
96
+ height: 30px;
97
+ line-height: 33px;
98
+ margin-left: 13px;
99
+ }
100
+ ::ng-deep tr td .plaque.plaque-m .part1{
101
+ width: 42px;
102
+ margin-left: 13px;
103
+ }
104
+ ::ng-deep tr td .plaque .part2{
105
+ float: left;
106
+ width: 25px;
107
+ height: 30px;
108
+ line-height: 30px;
109
+ }
110
+ ::ng-deep tr td .plaque.plaque-m .part2{
111
+ width: 57px;
112
+ line-height: 33px;
113
+ }
114
+ ::ng-deep tr td .plaque .part3{
115
+ float: left;
116
+ width: 42px;
117
+ height: 30px;
118
+ line-height: 33px;
119
+ }
120
+ ::ng-deep tr td .plaque .part4{
121
+ float: left;
122
+ width: 28px;
123
+ height: 30px;
124
+ }
125
+
@@ -0,0 +1,19 @@
1
+ <tr class="underline" [id]="row.Id ? row.Id : ''" [style]="{height: table.height + 'px', zIndex: row.RowNum }">
2
+ <td style="width: 50px" *ngIf="table.hasChildren && (table.level === null || table.level > level)"><lib-form-icon *ngIf="showChildren != null && showChildren.type === type.Icon" [inp]="showChildren"></lib-form-icon></td>
3
+ <td style="width: 50px" *ngIf="table.withSelect"><i (click)="select()" [className]="(row.selected ? 'fas fa-check-square green' : 'far fa-square') + ' select-row'"></i></td>
4
+ <td style="width: 50px" *ngIf="table.sortable"><i class="fa-duotone fa-grip-vertical handle-sortable"></i></td>
5
+ <td [style]="{width: col.percent + '%'}" [className]="col.class + ' item'" *ngFor="let col of table.cols" [innerHTML]="getCell(col)"></td>
6
+ <td [style]="{width: (100 - itemsWidth) + '%'}" class="t-l" *ngIf="table.hasOption()">
7
+ <span *ngFor="let opt of getOptions()">
8
+ <lib-form-button *ngIf="opt.type == type.Button" [inp]="opt"></lib-form-button>
9
+ <lib-form-icon *ngIf="opt.type == type.Icon" [inp]="opt"></lib-form-icon>
10
+ </span>
11
+ </td>
12
+ </tr>
13
+ <tr #childrenDiv *ngIf="table.hasChildren && (table.level === null || table.level > level)" class="children rightline">
14
+ <td [colSpan]="table.cols.length + (table.hasChildren ? 1 : 0) + (table.hasOption() ? 1 : 0)">
15
+ <table style="width: 94%; margin: 15px 3% 15px 0;">
16
+ <lib-table-row (loadParent)="loadChildren($event)" [level]="level + 1" (changeRows)="onChangeRows($event)" [id]="child.id ? child.id : ''" [table]="table" [row]="child" *ngFor="let child of children"></lib-table-row>
17
+ </table>
18
+ </td>
19
+ </tr>
@@ -0,0 +1,238 @@
1
+ import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
2
+ import * as _ from 'lodash';
3
+ import {TableClass, TableCollClass} from '../../../classes/table.class';
4
+ import {InputType, Method, PermissionAccessTypeEnum, PermissionTypeEnum, TableCollType} from '../../../classes/enum.class';
5
+ import {InputClass} from '../../../classes/form.class';
6
+ import {RequestClass} from '../../../classes/request.class';
7
+ import {HelperClass} from '../../../classes/helper.class';
8
+ import {PsToolkitUiConfigService} from '../../../services/config.service';
9
+ import * as $ from 'jquery';
10
+
11
+ @Component({
12
+ selector: 'lib-table-report',
13
+ templateUrl: './table.report.component.html',
14
+ styleUrls: ['./table.report.component.css']
15
+ })
16
+ export class TableReportComponent implements OnInit{
17
+ @Input()
18
+ confirmShow: any;
19
+ @Output()
20
+ changeRows = new EventEmitter<object>();
21
+ @Input()
22
+ level: number;
23
+ @Input()
24
+ table: TableClass;
25
+ @Input()
26
+ row;
27
+ @Output()
28
+ loadParent = new EventEmitter<string>();
29
+ get type(): typeof InputType { return InputType; }
30
+ options: InputClass[];
31
+ optEdit: InputClass;
32
+ optDelete: InputClass;
33
+ optStatus: InputClass;
34
+ showChildren: InputClass = null;
35
+ addChildren: InputClass = null;
36
+ itemsWidth = 0;
37
+ children: any[] = [];
38
+ @ViewChild('childrenDiv') childrenDiv: ElementRef;
39
+ constructor(public service: PsToolkitUiConfigService) {
40
+ }
41
+ ngOnInit(): void {
42
+ this.itemsWidth = this.table.cols.reduce((a, {percent}) => a + percent, 0);
43
+ this.optEdit = new InputClass(this.table.environment, this.table.l, this.table.name + 'Update', 'fa-duotone fa-pen', InputType.Icon,
44
+ 'blue h-25 m-h-5 d-ib va-m f-u');
45
+ this.optDelete = new InputClass(this.table.environment, this.table.l, this.table.name + 'Delete', 'fa-duotone fa-trash', InputType.Icon,
46
+ 'red h-25 m-h-5 d-ib va-m f-u');
47
+ if (this.table.hasChildren){
48
+ if (this.table.permissions.hasAccess(PermissionAccessTypeEnum.Insert)){
49
+ this.addChildren = new InputClass(this.table.environment, this.table.l, 'Add', 'fa-duotone fa-plus fa-rotate-90', InputType.Icon,
50
+ 'green m-h-5 h-25 d-ib va-m f-u');
51
+ this.addChildren.onClick = () => {
52
+ this.table.form.url = this.table.url + 'Insert';
53
+ this.table.form.inputs.find(x => x.name === 'ParentId').setValue(this.row.Id, false);
54
+ this.table.form.onSuccessBase = () => {
55
+ this.table.modal.hide();
56
+ this.showChildren.type = InputType.Icon;
57
+ this.loadChildren(this.row.Id);
58
+ };
59
+ this.table.showInsertModal();
60
+ };
61
+ }
62
+ this.showChildren = new InputClass(this.table.environment, this.table.l, 'Subset', 'fa-duotone fa-angle-left f-s-22',
63
+ this.row.CountChild > 0 ? InputType.Icon : InputType.Hidden, 'h-25 m-h-5 d-ib va-m f-u');
64
+ this.showChildren.onClick = () => {
65
+ if ($(this.childrenDiv.nativeElement).is(':visible')){
66
+ $(this.childrenDiv.nativeElement).hide();
67
+ this.showChildren.icon = 'fa-duotone fa-angle-left f-s-22';
68
+ } else if (this.children.length === 0){
69
+ this.loadChildren(this.row.Id);
70
+ } else {
71
+ $(this.childrenDiv.nativeElement).show();
72
+ this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
73
+ }
74
+ };
75
+ }
76
+ if (this.table.hasStatus){
77
+ this.optStatus = new InputClass(this.table.environment, this.table.l, 'Status',
78
+ this.row.Active ? 'fa-toggle-on' : 'fa-toggle-off', InputType.Icon,
79
+ 'm-h-5 h-20 ' + (this.row.Active ? 'green' : ''));
80
+ this.optStatus.row = this.row;
81
+ this.optStatus.onClick = (btn) => {
82
+ new RequestClass(this.table.l).send(this.table.url + '/Status/' + btn.row.Id, Method.Post, null, btn, (r) => {
83
+ btn.class = 'm-h-5 h-20 ' + (r ? 'green' : '');
84
+ btn.icon = r ? 'fa-toggle-on' : 'fa-toggle-off';
85
+ });
86
+ };
87
+ }
88
+ this.options = this.getOptions();
89
+ if (this.table.form){
90
+ this.optEdit.onClick = () => {
91
+ this.table.form.url = this.table.url + 'Update/' + this.row.Id;
92
+ if (this.table.hasChildren && this.row.ParentId != null) {
93
+ this.table.form.onSuccessBase = () => {
94
+ this.table.modal.hide();
95
+ this.loadParent.emit(this.row.ParentId);
96
+ };
97
+ } else {
98
+ this.table.form.onSuccessBase = () => {
99
+ this.table.modal.hide();
100
+ this.table.load();
101
+ };
102
+ }
103
+ this.edit();
104
+ };
105
+ } else {
106
+ this.optEdit.url = this.table.url + '/' + this.row.Id;
107
+ }
108
+ if (this.table.sortable){
109
+ this.setSortRow();
110
+ }
111
+ }
112
+ loadChildren(p): void{
113
+ new RequestClass(this.table.l).send(this.table.url + `List?ParentId=${p}`, Method.Post, null, this.showChildren, (result) => {
114
+ this.children = result.List;
115
+ setTimeout(() => {
116
+ $(this.childrenDiv.nativeElement).slideDown();
117
+ this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
118
+ }, 50);
119
+ });
120
+ }
121
+ select(): void{
122
+ this.row.selected = !this.row.selected;
123
+ }
124
+ onChangeRows(e): void{
125
+ return this.changeRows.emit(e);
126
+ }
127
+ setSortRow(): void{
128
+ setTimeout(() => {
129
+ if (this.table.hasChildren) {
130
+ // @ts-ignore
131
+ $(this.childrenDiv.nativeElement).sortable({
132
+ axis: 'y',
133
+ handle: '> .row > .item-con > .handle-sortable',
134
+ update: () => {
135
+ const data = [];
136
+ // @ts-ignore
137
+ $(this.childrenDiv.nativeElement).sortable('toArray').forEach(x => data.push(x));
138
+ new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, data, null, () => {
139
+ if (this.table.onSort){
140
+ this.table.onSort();
141
+ }
142
+ });
143
+ }
144
+ });
145
+ }
146
+ }, 500);
147
+ }
148
+ getOptions(): InputClass[]{
149
+ return [];
150
+ // return (this.addChildren !== null && (this.table.level === null || this.table.level > this.level) ? [this.addChildren] : [])
151
+ // .concat(this.table.options.map((o) => {
152
+ // const i = HelperClass.clone(o);
153
+ // if (i.url){
154
+ // i.url = i.url.replace('{}', this.row.Id);
155
+ // }
156
+ // if (i.modal && i.modal.form){
157
+ // i.modal.form.url = i.modal.form.url.replace('{}', this.row.Id);
158
+ // }
159
+ // i.row = this.row;
160
+ // i.class = i.class + ' m-h-5 h-25 d-ib va-m f-u';
161
+ // return i;
162
+ // })).concat(this.table.hasStatus ? [this.optStatus] : [])
163
+ // .concat(this.table.permissions.hasAccess('Update') ? [this.optEdit] : [])
164
+ // .concat(this.table.permissions.hasAccess('Delete') ? [this.optDelete] : []);
165
+ }
166
+ getCell(col: TableCollClass): any{
167
+ console.log('getCell');
168
+ const cv = _.get(this.row, col.name);
169
+ if (col.fun != null) {
170
+ return col.fun(this.row);
171
+ } else if (col.enum !== null) {
172
+ return col.enum.get(cv);
173
+ } else if (col.type === TableCollType.DateDif) {
174
+ return HelperClass.getDateDif(this.table.l, cv);
175
+ } else if (col.type === TableCollType.Date) {
176
+ return HelperClass.getDate(cv);
177
+ } else if (col.type === TableCollType.DateTime) {
178
+ return HelperClass.getDateTime(cv);
179
+ } else if (col.type === TableCollType.Time) {
180
+ return HelperClass.getTime(cv);
181
+ } else if (col.type === TableCollType.Url) {
182
+ return '<a target="_blank" href="' + cv + '">' + cv + '</a>';
183
+ } else if (col.type === TableCollType.Image) {
184
+ return '<img class="h-100" alt="" src="' + this.service.environment.url + cv + '"/>';
185
+ } else if (col.type === TableCollType.Price) {
186
+ return cv.toLocaleString() + ' ' + this.table.l('Rial');
187
+ } else if (col.type === TableCollType.Plaque) {
188
+ const parts = cv.split('_');
189
+ if (parts.length === 4) {
190
+ return '<div class="plaque' + (parts[1] === 'ع' ? ' p' : '') + (parts[1] === 'الف' ? ' g' : '') + '">' +
191
+ '<div class="part1">' + parts[0] + '</div>' +
192
+ '<div class="part2">' + parts[1] + '</div>' +
193
+ '<div class="part3">' + parts[2] + '</div>' +
194
+ '<div class="part4">' + parts[3] + '</div>' +
195
+ '</div>';
196
+ } else if (parts.length === 2){
197
+ return '<div class="plaque plaque-m">' +
198
+ '<div class="part1">' + parts[0] + '</div>' +
199
+ '<div class="part2">' + parts[1] + '</div>' +
200
+ '</div>';
201
+ }
202
+ } else if (col.type === TableCollType.PlaqueText) {
203
+ const parts = cv.split('_');
204
+ if (parts.length === 4){
205
+ return `<div class="ltr">${parts[0]} ${parts[1]}&lrm; ${parts[2]} ${parts[3]}</div>`;
206
+ }
207
+ }
208
+ return this.table.l(cv);
209
+ }
210
+ getCol(n): string{
211
+ let c = this.row;
212
+ n.split('.').forEach((x) => {
213
+ c = c[x];
214
+ });
215
+ return c;
216
+ }
217
+ edit(): void{
218
+ if (this.table.permissions.Type === PermissionTypeEnum.Form){
219
+ this.table.form.name = 'Update';
220
+ this.table.form.setData(this.row);
221
+ this.table.form.setButtons(this.table.form.onTop, true, this.row.Id);
222
+ this.table.form.inputs.filter(x => x.inEditDisabled).forEach(x => x.disabled = true);
223
+ this.table.form.inputs.filter(x => !x.inEditVisible).forEach(x => x.visible = false);
224
+ }else{
225
+ new RequestClass(this.table.environment, this.table.l).send(this.table.url + 'Get/' + this.row.Id, Method.Post, null,
226
+ this.optEdit, (result) => {
227
+ this.table.form.name = 'Update';
228
+ this.table.form.setButtons(this.table.form.onTop, true, this.row.Id);
229
+ this.table.form.setData(result);
230
+ this.table.form.inputs.filter(x => x.inEditDisabled).forEach(x => x.disabled = true);
231
+ this.table.form.inputs.filter(x => !x.inEditVisible).forEach(x => x.visible = false);
232
+ if (this.table.modal){
233
+ this.table.modal.show();
234
+ }
235
+ });
236
+ }
237
+ }
238
+ }
@@ -0,0 +1,170 @@
1
+
2
+ ::ng-deep lib-table-row {
3
+ display: contents;
4
+ }
5
+
6
+ tr {
7
+ position: relative;
8
+ }
9
+
10
+ tr td {
11
+ font-family: VazirLight;
12
+ font-size: 12px;
13
+ font-weight: normal;
14
+ text-align: center;
15
+ position: relative;
16
+ vertical-align: middle;
17
+ }
18
+
19
+ tr td .options-con {
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ height: 100%;
24
+ width: 0;
25
+ overflow: hidden;
26
+ justify-content: center;
27
+ align-items: center;
28
+ display: flex;
29
+ background: linear-gradient(270deg, transparent 0, #fff 80px, #fff);
30
+ }
31
+ tr td .options-con.show {
32
+ width: unset;
33
+ overflow: unset;
34
+ }
35
+
36
+ tr:hover > td > .options-con {
37
+ width: auto;
38
+ overflow: unset;
39
+ }
40
+
41
+ tr td .options-con:not(.show) span:first-child{
42
+ margin-right: 100px;
43
+ }
44
+
45
+ tr td .options-con span:last-child{
46
+ margin-left: 10px;
47
+ }
48
+
49
+ tr.children {
50
+ display: none;
51
+ }
52
+
53
+ tr.children.rightline:after {
54
+ right: 20px;
55
+ }
56
+
57
+ ::ng-deep tr td .select-row {
58
+ font-size: 18px;
59
+ height: 30px;
60
+ line-height: 30px;
61
+ cursor: pointer;
62
+ }
63
+
64
+ ::ng-deep tr td .handle-sortable {
65
+ cursor: move;
66
+ }
67
+
68
+ ::ng-deep tr td .status {
69
+ padding: 3px 10px;
70
+ border-radius: 5px;
71
+ font-size: 10px;
72
+ cursor: default;
73
+ display: inline-block;
74
+ vertical-align: middle;
75
+ -webkit-user-select: none;
76
+ -moz-user-select: none;
77
+ -khtml-user-select: none;
78
+ -ms-user-select: none;
79
+ }
80
+
81
+ ::ng-deep tr td .status.blue {
82
+ color: var(--blue);
83
+ background-color: var(--blue-22);
84
+ }
85
+
86
+ ::ng-deep tr td .status.green {
87
+ color: var(--green);
88
+ background-color: var(--green-22);
89
+ }
90
+
91
+ ::ng-deep tr td .status.red {
92
+ color: var(--red);
93
+ background-color: var(--red-22);
94
+ }
95
+
96
+ ::ng-deep tr td .status.gray {
97
+ color: var(--black);
98
+ background-color: var(--black-22);
99
+ }
100
+
101
+ ::ng-deep tr td .status.yellow {
102
+ color: var(--yellow);
103
+ background-color: var(--yellow-22);
104
+ }
105
+
106
+ ::ng-deep tr td .plaque {
107
+ float: right;
108
+ width: 140px;
109
+ height: 30px;
110
+ background-image: url("../../../../assets/images/plaque.png");
111
+ background-repeat: no-repeat;
112
+ background-position: center center;
113
+ background-size: contain;
114
+ margin-right: calc(50% - 70px);
115
+ font-size: 14px;
116
+ background-color: white;
117
+ border-radius: 4px;
118
+ }
119
+
120
+ ::ng-deep tr td .plaque.plaque-m {
121
+ background-image: url("../../../../assets/images/plaque_m.png");
122
+ }
123
+
124
+ ::ng-deep tr td .plaque.p {
125
+ background-color: #ffc913;
126
+ }
127
+
128
+ ::ng-deep tr td .plaque.g {
129
+ background-color: #e20600;
130
+ }
131
+
132
+ ::ng-deep tr td .plaque .part1 {
133
+ float: left;
134
+ width: 32px;
135
+ height: 30px;
136
+ line-height: 33px;
137
+ margin-left: 13px;
138
+ }
139
+
140
+ ::ng-deep tr td .plaque.plaque-m .part1 {
141
+ width: 42px;
142
+ margin-left: 13px;
143
+ }
144
+
145
+ ::ng-deep tr td .plaque .part2 {
146
+ float: left;
147
+ width: 25px;
148
+ height: 30px;
149
+ line-height: 30px;
150
+ }
151
+
152
+ ::ng-deep tr td .plaque.plaque-m .part2 {
153
+ width: 57px;
154
+ line-height: 33px;
155
+ }
156
+
157
+ ::ng-deep tr td .plaque .part3 {
158
+ float: left;
159
+ width: 42px;
160
+ height: 30px;
161
+ line-height: 33px;
162
+ }
163
+
164
+ ::ng-deep tr td .plaque .part4 {
165
+ float: left;
166
+ height: 20px;
167
+ width: 28px;
168
+ margin-top: 8px;
169
+ }
170
+
@@ -0,0 +1,21 @@
1
+ <tr class="underline p-r" [id]="row.Id ? row.Id : ''" [style]="{height: table.height + 'px', zIndex: row.RowNum }">
2
+ <td style="width: 50px" *ngIf="table.hasChildren && (table.level === null || table.level > level)"><lib-form-icon *ngIf="showChildren != null && showChildren.type === type.Icon" [inp]="showChildren"></lib-form-icon></td>
3
+ <td style="width: 50px" *ngIf="table.withSelect"><i (click)="select()" [className]="(row.selected ? 'fas fa-check-square green' : 'far fa-square') + ' select-row'"></i></td>
4
+ <td style="width: 50px" *ngIf="table.sortable"><i class="fa-duotone fa-grip-vertical handle-sortable"></i></td>
5
+ <td [style]="{width: col.percent + '%'}" [className]="col.class + ' item'" *ngFor="let col of table.cols" [innerHTML]="getCell(col)"></td>
6
+ <td *ngIf="row.Options.length > 0">
7
+ <div [className]="(table.optionType == tableOptionType.Show ? 'show ' : '') + 'options-con'">
8
+ <span *ngFor="let opt of getOptions()">
9
+ <lib-form-button *ngIf="opt.type == type.Button" [inp]="opt"></lib-form-button>
10
+ <lib-form-icon *ngIf="opt.type == type.Icon" [inp]="opt"></lib-form-icon>
11
+ </span>
12
+ </div>
13
+ </td>
14
+ </tr>
15
+ <tr #childrenDiv *ngIf="table.hasChildren && (table.level === null || table.level > level)" class="children rightline">
16
+ <td [colSpan]="table.cols.length + (table.hasChildren ? 1 : 0) + (row.Options.length > 0 ? 1 : 0)">
17
+ <table style="width: 94%; margin: 15px 3% 15px 0;">
18
+ <lib-table-row (loadParent)="loadChildren($event)" (confirmShow)="onConfirmShow($event)" [level]="level + 1" (changeRows)="onChangeRows($event)" [id]="child.id ? child.id : ''" [table]="table" [row]="child" *ngFor="let child of children"></lib-table-row>
19
+ </table>
20
+ </td>
21
+ </tr>