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
package/karma.conf.js ADDED
@@ -0,0 +1,32 @@
1
+ // Karma configuration file, see link for more information
2
+ // https://karma-runner.github.io/1.0/config/configuration-file.html
3
+
4
+ module.exports = function (config) {
5
+ config.set({
6
+ basePath: '',
7
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
+ plugins: [
9
+ require('karma-jasmine'),
10
+ require('karma-chrome-launcher'),
11
+ require('karma-jasmine-html-reporter'),
12
+ require('karma-coverage-istanbul-reporter'),
13
+ require('@angular-devkit/build-angular/plugins/karma')
14
+ ],
15
+ client: {
16
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
17
+ },
18
+ coverageIstanbulReporter: {
19
+ dir: require('path').join(__dirname, '../../coverage/ps-toolkit-ui'),
20
+ reports: ['html', 'lcovonly', 'text-summary'],
21
+ fixWebpackSourcePaths: true
22
+ },
23
+ reporters: ['progress', 'kjhtml'],
24
+ port: 9876,
25
+ colors: true,
26
+ logLevel: config.LOG_INFO,
27
+ autoWatch: true,
28
+ browsers: ['Chrome'],
29
+ singleRun: false,
30
+ restartOnFileChange: true
31
+ });
32
+ };
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/ps-toolkit-ui",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ },
7
+ "whitelistedNonPeerDependencies": [
8
+ "jalali-moment",
9
+ "jquery",
10
+ "lodash",
11
+ "highcharts"
12
+ ],
13
+ "assets": [
14
+ "src/assets"
15
+ ]
16
+ }
package/package.json CHANGED
@@ -1,22 +1,19 @@
1
- {
2
- "name": "ps-toolkit-ui",
3
- "version": "0.0.210",
4
- "peerDependencies": {
5
- "@angular/common": "^10.1.6",
6
- "@angular/core": "^10.1.6"
7
- },
8
- "dependencies": {
9
- "jalali-moment": "^3.3.10",
10
- "jquery": "^3.5.1",
11
- "lodash": "^4.17.21",
12
- "tslib": "^2.0.0"
13
- },
14
- "main": "bundles/ps-toolkit-ui.umd.js",
15
- "module": "fesm2015/ps-toolkit-ui.js",
16
- "es2015": "fesm2015/ps-toolkit-ui.js",
17
- "esm2015": "esm2015/ps-toolkit-ui.js",
18
- "fesm2015": "fesm2015/ps-toolkit-ui.js",
19
- "typings": "ps-toolkit-ui.d.ts",
20
- "metadata": "ps-toolkit-ui.metadata.json",
21
- "sideEffects": false
22
- }
1
+ {
2
+ "name": "ps-toolkit-ui",
3
+ "version": "0.0.211",
4
+ "peerDependencies": {
5
+ "@angular/common": "^10.1.6",
6
+ "@angular/core": "^10.1.6"
7
+ },
8
+ "dependencies": {
9
+ "highcharts": "^9.3.3",
10
+ "jalali-moment": "^3.3.10",
11
+ "jquery": "^3.5.1",
12
+ "lodash": "^4.17.21",
13
+ "tslib": "^2.0.0"
14
+ },
15
+ "devDependencies": {
16
+ "@types/jquery": "^3.5.8",
17
+ "@types/lodash": "^4.14.176"
18
+ }
19
+ }
@@ -0,0 +1,140 @@
1
+ import * as Highcharts from 'highcharts';
2
+ export class ChartClass {
3
+ constructor(l: (k, v?) => string, name: string) {
4
+ this.l = l;
5
+ this.name = name;
6
+ }
7
+ l: (k, v?) => string;
8
+ name: string;
9
+ style = {};
10
+ loading = false;
11
+ options = {};
12
+ setChart(cOpt, categories = []): void{
13
+ const date = this.l('Date');
14
+ const min = Math.min(...[].concat.apply([], cOpt.series.map(o => o.data)));
15
+ const th = this;
16
+ const opt = {
17
+ chart: {
18
+ type: 'line',
19
+ spacing: [30, 30, 30, 30]
20
+ },
21
+ title: {text: null},
22
+ credits: {enabled: false},
23
+ yAxis: {
24
+ visible: true, reverse: true, min, title: {text: null},
25
+ labels: {
26
+ useHTML: true,
27
+ style: {
28
+ fontFamily: 'VazirBold',
29
+ direction: 'rtl',
30
+ textAlign: 'center'
31
+ },
32
+ formatter(): string{
33
+ return cOpt.unit ? cOpt.unit.replace('{}', this.value.toLocaleString()) : this.value.toLocaleString();
34
+ }
35
+ }
36
+ },
37
+ plotOptions: {
38
+ line: {
39
+ marker: {
40
+ enabled: false
41
+ }
42
+ }
43
+ },
44
+ xAxis: {
45
+ categories,
46
+ reversed: true,
47
+ labels: {
48
+ useHTML: true,
49
+ style: {
50
+ fontFamily: 'VazirBold',
51
+ direction: 'rtl',
52
+ textAlign: 'center'
53
+ },
54
+ step: Math.floor(categories.length / 5),
55
+ formatter(): string{
56
+ return this.value.split(' ')[0];
57
+ }
58
+ }
59
+ },
60
+ legend: {
61
+ useHTML: true,
62
+ rtl: true,
63
+ itemMarginRight: 50,
64
+ itemMarginLeft: 50,
65
+ itemStyle: {
66
+ fontFamily: 'VazirBold',
67
+ direction: 'rtl'
68
+ }
69
+ },
70
+ tooltip: {
71
+ shared: true,
72
+ crosshairs: true,
73
+ useHTML: true,
74
+ style: {
75
+ fontFamily: 'VazirBold',
76
+ direction: 'rtl',
77
+ textAlign: 'center'
78
+ },
79
+ formatter(): string{
80
+ let s = '<div>' + date + ' : ' + this.x + '</br>';
81
+ for (const p of this.points.filter(x => x.y !== 0)){
82
+ const symbol = th.getSymbol(p);
83
+ s += (symbol ? symbol : '') + '<span class="rtl d-ib">' + (cOpt.showName ?
84
+ '<span style="' + (symbol ? '' : 'color: ' + p.color) + '" class="m-l-5">' +
85
+ p.series.name + '</span> ' : '') +
86
+ '<span style="' + (cOpt.showName ? '' : 'color: ' + p.color) + '">'
87
+ + (cOpt.unit ? cOpt.unit.replace('{}', p.y.toLocaleString()) : p.y.toLocaleString()) + '</span>' + '</span></br>';
88
+ }
89
+ s += '</div>';
90
+ return s;
91
+ }
92
+ },
93
+
94
+ series: []
95
+ };
96
+ this.options = this.merge(opt, cOpt);
97
+ Highcharts.chart(this.name + 'Chart', this.options);
98
+ }
99
+ getSymbol(point): string{
100
+ let marker = null;
101
+ if ( point.point.graphic && point.point.graphic.symbolName ) {
102
+ switch ( point.point.graphic.symbolName ) {
103
+ case 'circle':
104
+ marker = '●';
105
+ break;
106
+ case 'diamond':
107
+ marker = '♦';
108
+ break;
109
+ case 'square':
110
+ marker = '■';
111
+ break;
112
+ case 'triangle':
113
+ marker = '▲';
114
+ break;
115
+ case 'triangle-down':
116
+ marker = '▼';
117
+ break;
118
+ default:
119
+ marker = '●';
120
+ break;
121
+ }
122
+ return '<span style="margin-left: 10px; color: ' + point.color + '">' + marker + '</span>';
123
+ }
124
+ return marker;
125
+ }
126
+ merge(b, c): any{
127
+ for (const k of Object.keys(c)){
128
+ if (Object.keys(b).includes(k)){
129
+ if (c[k] != null && c[k].constructor === Object){
130
+ b[k] = this.merge(b[k], c[k]);
131
+ }else{
132
+ b[k] = c[k];
133
+ }
134
+ }else{
135
+ b[k] = c[k];
136
+ }
137
+ }
138
+ return b;
139
+ }
140
+ }
@@ -0,0 +1,193 @@
1
+ // @dynamic
2
+ export class EnumUtils {
3
+ static getValues(enumObj: any): any[] {
4
+ return EnumUtils.getKeys(enumObj).map(value => enumObj[value]);
5
+ }
6
+ static getKeyByValue(enumObj: any, v): any[] {
7
+ return this.getKeys(enumObj).find(key => enumObj[key] === v);
8
+ }
9
+ static getKeys(enumObj: any): any[] {
10
+ return Object.keys(enumObj).filter(key => typeof enumObj[key] === 'number');
11
+ }
12
+ static getKeysAndValues(enumObj: any): any[] {
13
+ return this.getKeys(enumObj).map(key => {
14
+ return {
15
+ key, value: enumObj[key]
16
+ };
17
+ });
18
+ }
19
+ }
20
+
21
+ export enum InputError {
22
+ Required = 'Required',
23
+ Invalid = 'Invalid',
24
+ Length = 'Length',
25
+ MinLength = 'MinLength',
26
+ MaxLength = 'MaxLength',
27
+ MinAmount = 'MinAmount',
28
+ MaxAmount = 'MaxAmount',
29
+ Expired = 'Expired',
30
+ Error = 'Error',
31
+ NotMatch = 'NotMatch',
32
+ NotAllowed = 'NotAllowed',
33
+ MaxContent = 'MaxContent',
34
+ Exist = 'Exist',
35
+ NotExist = 'NotExist',
36
+ Wrong = 'Wrong',
37
+ Upload = 'Upload',
38
+ }
39
+
40
+ export enum InputType {
41
+ Text,
42
+ Password,
43
+ Mobile,
44
+ Phone,
45
+ Email,
46
+ NationalCode,
47
+ PostalCode,
48
+ Sheba,
49
+ Number,
50
+ Select,
51
+ SelectSearch,
52
+ SelectAutoComplete,
53
+ Date,
54
+ Time,
55
+ DateTime,
56
+ Check,
57
+ TextArea,
58
+ Label,
59
+ Button,
60
+ Submit,
61
+ Icon,
62
+ File,
63
+ Url,
64
+ Price,
65
+ Radio,
66
+ Tree,
67
+ Plaque,
68
+ PlaqueM,
69
+ SelectAutoCompletePlaque,
70
+ SelectAutoCompletePlaqueM,
71
+ BankCard,
72
+ Constant,
73
+ Hidden,
74
+ Table,
75
+ CarSearch,
76
+ Car,
77
+ Finger,
78
+ }
79
+
80
+ export enum OperationEnum
81
+ {
82
+ All = -1,
83
+ Insert = 1,
84
+ Update = 2,
85
+ Delete = 3,
86
+ }
87
+
88
+ export enum Method {
89
+ Get,
90
+ Post,
91
+ Delete,
92
+ Put,
93
+ Options,
94
+ Patch,
95
+ }
96
+
97
+ export enum TableCollType {
98
+ Text,
99
+ Date,
100
+ Time,
101
+ DateTime,
102
+ DateDif,
103
+ DateRemain,
104
+ Url,
105
+ Image,
106
+ Function,
107
+ Price,
108
+ Plaque,
109
+ PlaqueText,
110
+ FileSize,
111
+ Bool,
112
+ }
113
+
114
+ export enum UserType {
115
+ All = 0,
116
+ Admin = 1,
117
+ User = 2
118
+ }
119
+
120
+ export enum StatusEnum
121
+ {
122
+ All = -1,
123
+ Active = 0,
124
+ DeActive = 1,
125
+ Delete = 2,
126
+ Report = 3,
127
+ }
128
+ export enum PaymentStatusEnum
129
+ {
130
+ All = 0,
131
+ Success = 100,
132
+ NOK = 102,
133
+ Request = 103,
134
+ Notfound = 104,
135
+ NotRequest = 105,
136
+ NotfoundPackage = 106
137
+ }
138
+ export enum ResultStatusEnum
139
+ {
140
+ Failed = 0,
141
+ Success = 1,
142
+ Unauthorized = 2,
143
+ NotAccess = 3
144
+ }
145
+
146
+ export enum PermissionTypeEnum
147
+ {
148
+ Form = -1,
149
+ Item = 0,
150
+ Access = 1,
151
+ Option = 2,
152
+ }
153
+
154
+ export enum PermissionAccessTypeEnum
155
+ {
156
+ List = 1,
157
+ Insert = 2,
158
+ Update = 3,
159
+ Delete = 4,
160
+ Print = 5,
161
+ }
162
+
163
+ export enum PermissionInputActionEnum
164
+ {
165
+ None = 0,
166
+ OnClick = 1,
167
+ Link = 2,
168
+ LinkNewTab = 3,
169
+ File = 4,
170
+ Modal = 5,
171
+ Confirm = 6
172
+ }
173
+
174
+ export enum PermissionInputTypeEnum
175
+ {
176
+ Icon = 0,
177
+ Button = 1,
178
+ }
179
+
180
+ export enum VehicleType
181
+ {
182
+ Car = 1,
183
+ Motorcycle = 2,
184
+ Airplane = 3,
185
+ Train = 4,
186
+ Ship = 5,
187
+ }
188
+ export enum TableOptionType
189
+ {
190
+ Hidden = 1,
191
+ Show = 2,
192
+ Group = 3,
193
+ }
@@ -0,0 +1,46 @@
1
+ // import * as FileSaver from 'file-saver';
2
+ // import * as XLSX from 'xlsx';
3
+ const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
4
+ const CSV_TYPE = 'data:text/csv;charset=UTF-8';
5
+ const EXCEL_EXTENSION = '.xlsx';
6
+ const CSV_EXTENSION = '.csv';
7
+
8
+ export class ExcelService {
9
+ constructor() { }
10
+ // public exportAsExcelFile(json: any[], excelFileName: string): void
11
+ // {
12
+ // const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);
13
+ // const workbook: XLSX.WorkBook = {
14
+ // Sheets: { data: worksheet },
15
+ // SheetNames: ['data']
16
+ // };
17
+ // const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
18
+ // this.saveAsExcelFile(excelBuffer, excelFileName);
19
+ // }
20
+ // public getExcelData(json: any[], excelFileName: string): Blob
21
+ // {
22
+ // const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);
23
+ // const workbook: XLSX.WorkBook = {
24
+ // Sheets: { data: worksheet },
25
+ // SheetNames: ['data']
26
+ // };
27
+ // const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
28
+ // return new Blob([excelBuffer], {type: EXCEL_TYPE});
29
+ // }
30
+ // private saveAsExcelFile(buffer: any, fileName: string): void {
31
+ // const data: Blob = new Blob([buffer], {type: EXCEL_TYPE});
32
+ // FileSaver.saveAs(data, fileName + new Date().getTime() + EXCEL_EXTENSION);
33
+ // }
34
+ // private saveAsCsvFile(buffer: any, fileName: string): void {
35
+ // const data: Blob = new Blob([buffer], {type: CSV_TYPE});
36
+ // FileSaver.saveAs(data, fileName + new Date().getTime() + CSV_EXTENSION);
37
+ // }
38
+ // public exportAsCsvFile(json: any[], fileName: string): void {
39
+ // const replacer = (key, value) => value === null ? '' : value; // specify how you want to handle null values here
40
+ // const header = Object.keys(json[0]);
41
+ // const csv = json.map(row => header.map(fieldName => JSON.stringify(row[fieldName], replacer)).join(','));
42
+ // csv.unshift(header.join(','));
43
+ // const csvArray = csv.join('\r\n');
44
+ // this.saveAsCsvFile('\uFEFF' + csvArray, fileName);
45
+ // }
46
+ }