arco-support-request 0.0.87 → 0.0.89

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 (408) hide show
  1. package/karma.conf.js +44 -0
  2. package/ng-package.json +18 -0
  3. package/package.json +11 -22
  4. package/src/lib/Pipe/allpipe.pipe.ts +127 -0
  5. package/src/lib/Pipe/handlebar-helper-register.ts +249 -0
  6. package/src/lib/Pipe/translate.pipe.ts +32 -0
  7. package/src/lib/all-routing.ts +61 -0
  8. package/src/lib/arco-support-request.component.spec.ts +25 -0
  9. package/src/lib/arco-support-request.component.ts +20 -0
  10. package/src/lib/arco-support-request.module.ts +19 -0
  11. package/src/lib/arco-support-request.service.spec.ts +16 -0
  12. package/src/lib/arco-support-request.service.ts +16 -0
  13. package/src/lib/commonstyles/new-style-rtl.css +380 -0
  14. package/src/lib/commonstyles/styles.scss +4334 -0
  15. package/src/lib/core/encodeurl.service.ts +23 -0
  16. package/src/lib/core/global.service.ts +1859 -0
  17. package/src/lib/core/handlebar-helper-register.ts +247 -0
  18. package/src/lib/core/httpcancel.service.ts +21 -0
  19. package/src/lib/core/loader.service.ts +19 -0
  20. package/src/lib/core/loading-provider.service.ts +64 -0
  21. package/src/lib/core/managehttp.interceptor.ts +49 -0
  22. package/src/lib/core/static/jwt.ts +7 -0
  23. package/src/lib/core/token.service.ts +37 -0
  24. package/src/lib/entity-type-setup/activities-create/activities-create.component.html +69 -0
  25. package/src/lib/entity-type-setup/activities-create/activities-create.component.scss +13 -0
  26. package/src/lib/entity-type-setup/activities-create/activities-create.component.spec.ts +25 -0
  27. package/src/lib/entity-type-setup/activities-create/activities-create.component.ts +143 -0
  28. package/src/lib/entity-type-setup/activities-view/activities-view.component.html +19 -0
  29. package/src/lib/entity-type-setup/activities-view/activities-view.component.scss +3 -0
  30. package/src/lib/entity-type-setup/activities-view/activities-view.component.spec.ts +25 -0
  31. package/src/lib/entity-type-setup/activities-view/activities-view.component.ts +53 -0
  32. package/src/lib/entity-type-setup/activity-template/activity-template.component.html +73 -0
  33. package/src/lib/entity-type-setup/activity-template/activity-template.component.scss +0 -0
  34. package/src/lib/entity-type-setup/activity-template/activity-template.component.spec.ts +25 -0
  35. package/src/lib/entity-type-setup/activity-template/activity-template.component.ts +208 -0
  36. package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.html +356 -0
  37. package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.scss +50 -0
  38. package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.spec.ts +25 -0
  39. package/src/lib/entity-type-setup/activity-template-details/activity-template-details.component.ts +346 -0
  40. package/src/lib/entity-type-setup/commom-condition/commom-condition.component.html +92 -0
  41. package/src/lib/entity-type-setup/commom-condition/commom-condition.component.scss +90 -0
  42. package/src/lib/entity-type-setup/commom-condition/commom-condition.component.spec.ts +25 -0
  43. package/src/lib/entity-type-setup/commom-condition/commom-condition.component.ts +74 -0
  44. package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.html +57 -0
  45. package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.scss +16 -0
  46. package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.spec.ts +25 -0
  47. package/src/lib/entity-type-setup/dynamic/data-fields/data-fields.component.ts +59 -0
  48. package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.html +102 -0
  49. package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.scss +3 -0
  50. package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.spec.ts +25 -0
  51. package/src/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.ts +498 -0
  52. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.html +408 -0
  53. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.scss +123 -0
  54. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.spec.ts +25 -0
  55. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.ts +1073 -0
  56. package/src/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.ts +84 -0
  57. package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.html +194 -0
  58. package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.scss +81 -0
  59. package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.spec.ts +25 -0
  60. package/src/lib/entity-type-setup/dynamic/entity-dynamic-form/entity-dynamic-form.component.ts +1526 -0
  61. package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.html +137 -0
  62. package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.scss +0 -0
  63. package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.spec.ts +25 -0
  64. package/src/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.ts +1353 -0
  65. package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.html +329 -0
  66. package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.scss +0 -0
  67. package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.spec.ts +25 -0
  68. package/src/lib/entity-type-setup/dynamic-task-details/dynamic-task-details.component.ts +520 -0
  69. package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.html +609 -0
  70. package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.scss +99 -0
  71. package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.spec.ts +25 -0
  72. package/src/lib/entity-type-setup/dynamic-task-list/dynamic-task-list.component.ts +784 -0
  73. package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.html +632 -0
  74. package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.scss +261 -0
  75. package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.spec.ts +25 -0
  76. package/src/lib/entity-type-setup/dynamic-ticket-details/dynamic-ticket-details.component.ts +765 -0
  77. package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.html +368 -0
  78. package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.scss +0 -0
  79. package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.spec.ts +25 -0
  80. package/src/lib/entity-type-setup/dynamic-ticket-details-popup/dynamic-ticket-details-popup.component.ts +334 -0
  81. package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.html +500 -0
  82. package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.scss +0 -0
  83. package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.spec.ts +25 -0
  84. package/src/lib/entity-type-setup/dynamic-ticket-list/dynamic-ticket-list.component.ts +862 -0
  85. package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.html +139 -0
  86. package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.scss +14 -0
  87. package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.spec.ts +25 -0
  88. package/src/lib/entity-type-setup/entity-attachment-setup/entity-attachment-setup.component.ts +347 -0
  89. package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.html +150 -0
  90. package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.scss +27 -0
  91. package/src/lib/entity-type-setup/entity-category-activities/entity-category-activities.component.ts +384 -0
  92. package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.html +305 -0
  93. package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.scss +31 -0
  94. package/src/lib/entity-type-setup/entity-category-details/entity-category-details.component.ts +572 -0
  95. package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.html +610 -0
  96. package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.scss +50 -0
  97. package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.spec.ts +25 -0
  98. package/src/lib/entity-type-setup/entity-field-rules/entity-field-rules.component.ts +633 -0
  99. package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.html +609 -0
  100. package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.scss +4 -0
  101. package/src/lib/entity-type-setup/entity-type-field/entity-type-field.component.ts +702 -0
  102. package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.html +530 -0
  103. package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.scss +12 -0
  104. package/src/lib/entity-type-setup/entity-type-form/entity-type-form.component.ts +767 -0
  105. package/src/lib/entity-type-setup/entity-type-setup-routing.module.ts +92 -0
  106. package/src/lib/entity-type-setup/entity-type-setup.module.ts +114 -0
  107. package/src/lib/entity-type-setup/events/events.component.html +211 -0
  108. package/src/lib/entity-type-setup/events/events.component.scss +61 -0
  109. package/src/lib/entity-type-setup/events/events.component.spec.ts +25 -0
  110. package/src/lib/entity-type-setup/events/events.component.ts +517 -0
  111. package/src/lib/entity-type-setup/field-type/field-type.component.html +447 -0
  112. package/src/lib/entity-type-setup/field-type/field-type.component.scss +0 -0
  113. package/src/lib/entity-type-setup/field-type/field-type.component.spec.ts +25 -0
  114. package/src/lib/entity-type-setup/field-type/field-type.component.ts +531 -0
  115. package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.html +152 -0
  116. package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.scss +24 -0
  117. package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.spec.ts +25 -0
  118. package/src/lib/entity-type-setup/field-type-detail/field-type-detail.component.ts +35 -0
  119. package/src/lib/entity-type-setup/instruction/instruction.component.html +239 -0
  120. package/src/lib/entity-type-setup/instruction/instruction.component.scss +18 -0
  121. package/src/lib/entity-type-setup/instruction/instruction.component.ts +450 -0
  122. package/src/lib/entity-type-setup/interface/entityTypeInterface.ts +1046 -0
  123. package/src/lib/entity-type-setup/interface/eventEnum.ts +191 -0
  124. package/src/lib/entity-type-setup/issue-group/issue-group.component.html +77 -0
  125. package/src/lib/entity-type-setup/issue-group/issue-group.component.scss +0 -0
  126. package/src/lib/entity-type-setup/issue-group/issue-group.component.ts +221 -0
  127. package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.html +192 -0
  128. package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.scss +10 -0
  129. package/src/lib/entity-type-setup/issue-sub-group/issue-sub-group.component.ts +418 -0
  130. package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.html +42 -0
  131. package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.scss +8 -0
  132. package/src/lib/entity-type-setup/issue-sub-group-detail/issue-sub-group-detail.component.ts +52 -0
  133. package/src/lib/entity-type-setup/my-task/my-task.component.html +599 -0
  134. package/src/lib/entity-type-setup/my-task/my-task.component.scss +0 -0
  135. package/src/lib/entity-type-setup/my-task/my-task.component.spec.ts +25 -0
  136. package/src/lib/entity-type-setup/my-task/my-task.component.ts +770 -0
  137. package/src/lib/entity-type-setup/page-form-instance.ts +73 -0
  138. package/src/lib/entity-type-setup/page.interface.classes.ts +43 -0
  139. package/src/lib/entity-type-setup/service/dropdown.directive.ts +12 -0
  140. package/src/lib/entity-type-setup/service/entity-type-setup.service.ts +2901 -0
  141. package/src/lib/entity-type-setup/task-crete/task-crete.component.html +61 -0
  142. package/src/lib/entity-type-setup/task-crete/task-crete.component.scss +0 -0
  143. package/src/lib/entity-type-setup/task-crete/task-crete.component.ts +117 -0
  144. package/src/lib/entity-type-setup/ticket-create/ticket-create.component.html +95 -0
  145. package/src/lib/entity-type-setup/ticket-create/ticket-create.component.scss +23 -0
  146. package/src/lib/entity-type-setup/ticket-create/ticket-create.component.spec.ts +25 -0
  147. package/src/lib/entity-type-setup/ticket-create/ticket-create.component.ts +213 -0
  148. package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.html +240 -0
  149. package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.scss +14 -0
  150. package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.spec.ts +25 -0
  151. package/src/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.ts +404 -0
  152. package/src/lib/search.pipe.spec.ts +8 -0
  153. package/src/lib/search.pipe.ts +21 -0
  154. package/src/lib/support-request/action/action.component.html +122 -0
  155. package/src/lib/support-request/action/action.component.scss +6 -0
  156. package/src/lib/support-request/action/action.component.ts +179 -0
  157. package/src/lib/support-request/case-list/case-list.component.html +280 -0
  158. package/src/lib/support-request/case-list/case-list.component.scss +187 -0
  159. package/src/lib/support-request/case-list/case-list.component.ts +519 -0
  160. package/src/lib/support-request/home/home.component.html +16 -0
  161. package/src/lib/support-request/home/home.component.scss +4 -0
  162. package/src/lib/support-request/home/home.component.ts +23 -0
  163. package/src/lib/support-request/pagination/pagination.component.html +71 -0
  164. package/src/lib/support-request/pagination/pagination.component.scss +77 -0
  165. package/src/lib/support-request/pagination/pagination.component.ts +29 -0
  166. package/src/lib/support-request/request-flow/request-flow.component.html +536 -0
  167. package/src/lib/support-request/request-flow/request-flow.component.scss +2 -0
  168. package/src/lib/support-request/request-flow/request-flow.component.ts +914 -0
  169. package/src/lib/support-request/self-service-flow/self-service-flow.component.html +64 -0
  170. package/src/lib/support-request/self-service-flow/self-service-flow.component.scss +2 -0
  171. package/src/lib/support-request/self-service-flow/self-service-flow.component.ts +105 -0
  172. package/src/lib/support-request/support-request-create/support-request-create.component.html +105 -0
  173. package/src/lib/support-request/support-request-create/support-request-create.component.scss +54 -0
  174. package/src/lib/support-request/support-request-create/support-request-create.component.ts +319 -0
  175. package/src/lib/support-request/support-request-details/support-request-details.component.html +553 -0
  176. package/src/lib/support-request/support-request-details/support-request-details.component.scss +338 -0
  177. package/src/lib/support-request/support-request-details/support-request-details.component.ts +849 -0
  178. package/src/lib/support-request/support-request-index/support-request-index.component.html +4 -0
  179. package/src/lib/support-request/support-request-index/support-request-index.component.scss +0 -0
  180. package/src/lib/support-request/support-request-index/support-request-index.component.ts +16 -0
  181. package/src/lib/support-request/support-request-list/support-request-list.component.html +455 -0
  182. package/src/lib/support-request/support-request-list/support-request-list.component.scss +0 -0
  183. package/src/lib/support-request/support-request-list/support-request-list.component.ts +869 -0
  184. package/src/lib/support-request/support-request-routing.module.ts +21 -0
  185. package/src/lib/support-request/support-request.module.ts +103 -0
  186. package/src/lib/support-request/support-request.service.ts +148 -0
  187. package/src/lib/support-request/supportRequestInterface.ts +6 -0
  188. package/src/lib/task/Interfaces/TaskInterface.ts +164 -0
  189. package/src/lib/task/Services/task.service.spec.ts +16 -0
  190. package/src/lib/task/Services/task.service.ts +354 -0
  191. package/src/lib/task/task-routing.module.ts +12 -0
  192. package/src/lib/task/task.module.ts +23 -0
  193. package/src/lib/template/template.component.html +22 -0
  194. package/src/lib/template/template.component.scss +0 -0
  195. package/src/lib/template/template.component.spec.ts +25 -0
  196. package/src/lib/template/template.component.ts +24 -0
  197. package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.html +83 -0
  198. package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.scss +0 -0
  199. package/src/lib/templates/attachmentsetup/attach-list/attach-list.component.ts +120 -0
  200. package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.html +134 -0
  201. package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.scss +0 -0
  202. package/src/lib/templates/attachmentsetup/attach-popup/attach-popup.component.ts +185 -0
  203. package/src/lib/templates/attachmentsetup/attachment-api.ts +55 -0
  204. package/src/lib/templates/attachmentsetup/attachment-interface.ts +100 -0
  205. package/src/lib/templates/attachmentsetup/attachment.service.ts +233 -0
  206. package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.html +97 -0
  207. package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.scss +10 -0
  208. package/src/lib/templates/attachmentsetup/attachmentsetup/attachmentsetup.component.ts +367 -0
  209. package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.html +49 -0
  210. package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.scss +0 -0
  211. package/src/lib/templates/attachmentsetup/documenttype/documenttype.component.ts +226 -0
  212. package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.html +140 -0
  213. package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.scss +8 -0
  214. package/src/lib/templates/attachmentsetup/menu-item-data/menu-item-data.component.ts +176 -0
  215. package/src/lib/templates/card/card.component.html +56 -0
  216. package/src/lib/templates/card/card.component.scss +0 -0
  217. package/src/lib/templates/card/card.component.spec.ts +25 -0
  218. package/src/lib/templates/card/card.component.ts +306 -0
  219. package/src/lib/templates/dashboard/dashboard.component.html +333 -0
  220. package/src/lib/templates/dashboard/dashboard.component.scss +16 -0
  221. package/src/lib/templates/dashboard/dashboard.component.ts +2290 -0
  222. package/src/lib/templates/details/details.component.html +233 -0
  223. package/src/lib/templates/details/details.component.scss +0 -0
  224. package/src/lib/templates/details/details.component.spec.ts +25 -0
  225. package/src/lib/templates/details/details.component.ts +15 -0
  226. package/src/lib/templates/detailstwo/detailstwo.component.html +694 -0
  227. package/src/lib/templates/detailstwo/detailstwo.component.scss +0 -0
  228. package/src/lib/templates/detailstwo/detailstwo.component.spec.ts +25 -0
  229. package/src/lib/templates/detailstwo/detailstwo.component.ts +15 -0
  230. package/src/lib/templates/dyanamic-page/dyanamic-page.component.html +1 -0
  231. package/src/lib/templates/dyanamic-page/dyanamic-page.component.scss +0 -0
  232. package/src/lib/templates/dyanamic-page/dyanamic-page.component.spec.ts +25 -0
  233. package/src/lib/templates/dyanamic-page/dyanamic-page.component.ts +15 -0
  234. package/src/lib/templates/grid/grid-datatype/grid-datatype.component.ts +39 -0
  235. package/src/lib/templates/grid/grid-service.service.ts +236 -0
  236. package/src/lib/templates/grid/grid.component.html +358 -0
  237. package/src/lib/templates/grid/grid.component.scss +118 -0
  238. package/src/lib/templates/grid/grid.component.spec.ts +25 -0
  239. package/src/lib/templates/grid/grid.component.ts +638 -0
  240. package/src/lib/templates/grid/inner-grid/inner-grid.component.html +1 -0
  241. package/src/lib/templates/grid/inner-grid/inner-grid.component.scss +0 -0
  242. package/src/lib/templates/grid/inner-grid/inner-grid.component.spec.ts +25 -0
  243. package/src/lib/templates/grid/inner-grid/inner-grid.component.ts +15 -0
  244. package/src/lib/templates/home/home.component.html +251 -0
  245. package/src/lib/templates/home/home.component.scss +20 -0
  246. package/src/lib/templates/home/home.component.spec.ts +25 -0
  247. package/src/lib/templates/home/home.component.ts +15 -0
  248. package/src/lib/templates/interface_enum/common-Interface.ts +114 -0
  249. package/src/lib/templates/interface_enum/common-enum.ts +159 -0
  250. package/src/lib/templates/interface_enum/icon-class.ts +1149 -0
  251. package/src/lib/templates/leftside/leftside.component.html +77 -0
  252. package/src/lib/templates/leftside/leftside.component.scss +0 -0
  253. package/src/lib/templates/leftside/leftside.component.spec.ts +25 -0
  254. package/src/lib/templates/leftside/leftside.component.ts +238 -0
  255. package/src/lib/templates/login/login.component.html +93 -0
  256. package/src/lib/templates/login/login.component.scss +110 -0
  257. package/src/lib/templates/login/login.component.spec.ts +25 -0
  258. package/src/lib/templates/login/login.component.ts +142 -0
  259. package/src/lib/templates/main-content/main-content.component.html +31 -0
  260. package/src/lib/templates/main-content/main-content.component.scss +6 -0
  261. package/src/lib/templates/main-content/main-content.component.spec.ts +25 -0
  262. package/src/lib/templates/main-content/main-content.component.ts +24 -0
  263. package/src/lib/templates/menu-item/child-menu/child-menu.component.html +5 -0
  264. package/src/lib/templates/menu-item/child-menu/child-menu.component.scss +3 -0
  265. package/src/lib/templates/menu-item/child-menu/child-menu.component.ts +22 -0
  266. package/src/lib/templates/menu-item/menu-item.component.html +25 -0
  267. package/src/lib/templates/menu-item/menu-item.component.scss +11 -0
  268. package/src/lib/templates/menu-item/menu-item.component.ts +29 -0
  269. package/src/lib/templates/pagination/pagination.component.html +71 -0
  270. package/src/lib/templates/pagination/pagination.component.scss +73 -0
  271. package/src/lib/templates/pagination/pagination.component.ts +29 -0
  272. package/src/lib/templates/pie-chart/pie-chart.component.html +0 -0
  273. package/src/lib/templates/pie-chart/pie-chart.component.scss +0 -0
  274. package/src/lib/templates/pie-chart/pie-chart.component.ts +14 -0
  275. package/src/lib/templates/pipe/multiple-search.pipe.ts +28 -0
  276. package/src/lib/templates/pipe/simple-search.pipe.ts +18 -0
  277. package/src/lib/templates/pipe/translate.pipe.ts +31 -0
  278. package/src/lib/templates/request-flow-dash/request-flow-dash.component.html +16 -0
  279. package/src/lib/templates/request-flow-dash/request-flow-dash.component.scss +0 -0
  280. package/src/lib/templates/request-flow-dash/request-flow-dash.component.spec.ts +25 -0
  281. package/src/lib/templates/request-flow-dash/request-flow-dash.component.ts +59 -0
  282. package/src/lib/templates/table/table.component.html +310 -0
  283. package/src/lib/templates/table/table.component.scss +0 -0
  284. package/src/lib/templates/table/table.component.spec.ts +25 -0
  285. package/src/lib/templates/table/table.component.ts +52 -0
  286. package/src/lib/templates/template.service.ts +43 -0
  287. package/src/lib/templates/templates-routing.module.ts +21 -0
  288. package/src/lib/templates/templates.module.ts +80 -0
  289. package/src/lib/templates/topnav/topnav.component.html +172 -0
  290. package/src/lib/templates/topnav/topnav.component.scss +10 -0
  291. package/src/lib/templates/topnav/topnav.component.spec.ts +25 -0
  292. package/src/lib/templates/topnav/topnav.component.ts +59 -0
  293. package/src/lib/ticket/_interfaces/master-models.ts +66 -0
  294. package/src/lib/ticket/_interfaces/model.ts +252 -0
  295. package/src/lib/ticket/_ticket-services/ticket-api.service.ts +319 -0
  296. package/src/lib/ticket/_ticket-services/ticket-master-api.service.ts +169 -0
  297. package/src/lib/ticket/_ticket-services/ticket-priority.service.ts +86 -0
  298. package/src/lib/ticket/_ticket-services/ticketchannel.service.ts +107 -0
  299. package/src/lib/ticket/ticket-routing.module.ts +12 -0
  300. package/src/lib/ticket/ticket.module.ts +29 -0
  301. package/{public-api.d.ts → src/public-api.ts} +6 -1
  302. package/src/test.ts +26 -0
  303. package/tsconfig.lib.json +25 -0
  304. package/tsconfig.lib.prod.json +10 -0
  305. package/tsconfig.spec.json +17 -0
  306. package/tslint.json +17 -0
  307. package/arco-support-request.d.ts +0 -32
  308. package/arco-support-request.metadata.json +0 -1
  309. package/bundles/arco-support-request.umd.js +0 -11683
  310. package/bundles/arco-support-request.umd.js.map +0 -1
  311. package/bundles/arco-support-request.umd.min.js +0 -2
  312. package/bundles/arco-support-request.umd.min.js.map +0 -1
  313. package/esm2015/arco-support-request.js +0 -33
  314. package/esm2015/lib/Pipe/allpipe.pipe.js +0 -110
  315. package/esm2015/lib/Pipe/translate.pipe.js +0 -31
  316. package/esm2015/lib/arco-support-request.component.js +0 -18
  317. package/esm2015/lib/arco-support-request.module.js +0 -20
  318. package/esm2015/lib/arco-support-request.service.js +0 -19
  319. package/esm2015/lib/core/global.service.js +0 -1783
  320. package/esm2015/lib/core/handlebar-helper-register.js +0 -188
  321. package/esm2015/lib/core/static/jwt.js +0 -8
  322. package/esm2015/lib/entity-type-setup/activities-create/activities-create.component.js +0 -126
  323. package/esm2015/lib/entity-type-setup/activities-view/activities-view.component.js +0 -46
  324. package/esm2015/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.js +0 -367
  325. package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.js +0 -867
  326. package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.js +0 -85
  327. package/esm2015/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.js +0 -1056
  328. package/esm2015/lib/entity-type-setup/interface/entityTypeInterface.js +0 -51
  329. package/esm2015/lib/entity-type-setup/interface/eventEnum.js +0 -84
  330. package/esm2015/lib/entity-type-setup/page-form-instance.js +0 -65
  331. package/esm2015/lib/entity-type-setup/page.interface.classes.js +0 -40
  332. package/esm2015/lib/entity-type-setup/service/entity-type-setup.service.js +0 -1871
  333. package/esm2015/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.js +0 -320
  334. package/esm2015/lib/search.pipe.js +0 -19
  335. package/esm2015/lib/support-request/action/action.component.js +0 -104
  336. package/esm2015/lib/support-request/case-list/case-list.component.js +0 -449
  337. package/esm2015/lib/support-request/home/home.component.js +0 -23
  338. package/esm2015/lib/support-request/pagination/pagination.component.js +0 -34
  339. package/esm2015/lib/support-request/request-flow/request-flow.component.js +0 -733
  340. package/esm2015/lib/support-request/self-service-flow/self-service-flow.component.js +0 -88
  341. package/esm2015/lib/support-request/support-request-create/support-request-create.component.js +0 -270
  342. package/esm2015/lib/support-request/support-request-details/support-request-details.component.js +0 -659
  343. package/esm2015/lib/support-request/support-request-index/support-request-index.component.js +0 -16
  344. package/esm2015/lib/support-request/support-request-routing.module.js +0 -22
  345. package/esm2015/lib/support-request/support-request.module.js +0 -98
  346. package/esm2015/lib/support-request/support-request.service.js +0 -107
  347. package/esm2015/lib/support-request/supportRequestInterface.js +0 -2
  348. package/esm2015/lib/task/Interfaces/TaskInterface.js +0 -7
  349. package/esm2015/lib/task/Services/task.service.js +0 -251
  350. package/esm2015/lib/templates/attachmentsetup/attachment-interface.js +0 -2
  351. package/esm2015/lib/templates/attachmentsetup/attachment.service.js +0 -196
  352. package/esm2015/lib/templates/grid/grid-datatype/grid-datatype.component.js +0 -37
  353. package/esm2015/lib/templates/grid/grid-service.service.js +0 -151
  354. package/esm2015/lib/templates/grid/grid.component.js +0 -604
  355. package/esm2015/lib/templates/grid/inner-grid/inner-grid.component.js +0 -15
  356. package/esm2015/lib/templates/interface_enum/common-Interface.js +0 -2
  357. package/esm2015/lib/templates/interface_enum/common-enum.js +0 -164
  358. package/esm2015/lib/ticket/_interfaces/model.js +0 -2
  359. package/esm2015/lib/ticket/_ticket-services/ticket-api.service.js +0 -232
  360. package/esm2015/public-api.js +0 -9
  361. package/fesm2015/arco-support-request.js +0 -11076
  362. package/fesm2015/arco-support-request.js.map +0 -1
  363. package/lib/Pipe/allpipe.pipe.d.ts +0 -19
  364. package/lib/Pipe/translate.pipe.d.ts +0 -7
  365. package/lib/arco-support-request.component.d.ts +0 -5
  366. package/lib/arco-support-request.module.d.ts +0 -2
  367. package/lib/arco-support-request.service.d.ts +0 -9
  368. package/lib/core/global.service.d.ts +0 -99
  369. package/lib/core/handlebar-helper-register.d.ts +0 -1
  370. package/lib/core/static/jwt.d.ts +0 -7
  371. package/lib/entity-type-setup/activities-create/activities-create.component.d.ts +0 -30
  372. package/lib/entity-type-setup/activities-view/activities-view.component.d.ts +0 -16
  373. package/lib/entity-type-setup/dynamic/dynamic-details-view/dynamic-details-view.component.d.ts +0 -67
  374. package/lib/entity-type-setup/dynamic/entity-dynamic-field/entity-dynamic-field.component.d.ts +0 -88
  375. package/lib/entity-type-setup/dynamic/entity-dynamic-field/validation-error.component.d.ts +0 -11
  376. package/lib/entity-type-setup/dynamic/entity-dynamic-view/entity-dynamic-view.component.d.ts +0 -70
  377. package/lib/entity-type-setup/interface/entityTypeInterface.d.ts +0 -917
  378. package/lib/entity-type-setup/interface/eventEnum.d.ts +0 -161
  379. package/lib/entity-type-setup/page-form-instance.d.ts +0 -13
  380. package/lib/entity-type-setup/page.interface.classes.d.ts +0 -33
  381. package/lib/entity-type-setup/service/entity-type-setup.service.d.ts +0 -615
  382. package/lib/entity-type-setup/workflow-dynamic-popup/workflow-dynamic-popup.component.d.ts +0 -86
  383. package/lib/search.pipe.d.ts +0 -4
  384. package/lib/support-request/action/action.component.d.ts +0 -31
  385. package/lib/support-request/case-list/case-list.component.d.ts +0 -100
  386. package/lib/support-request/home/home.component.d.ts +0 -6
  387. package/lib/support-request/pagination/pagination.component.d.ts +0 -18
  388. package/lib/support-request/request-flow/request-flow.component.d.ts +0 -152
  389. package/lib/support-request/self-service-flow/self-service-flow.component.d.ts +0 -32
  390. package/lib/support-request/support-request-create/support-request-create.component.d.ts +0 -55
  391. package/lib/support-request/support-request-details/support-request-details.component.d.ts +0 -138
  392. package/lib/support-request/support-request-index/support-request-index.component.d.ts +0 -5
  393. package/lib/support-request/support-request-routing.module.d.ts +0 -2
  394. package/lib/support-request/support-request.module.d.ts +0 -2
  395. package/lib/support-request/support-request.service.d.ts +0 -35
  396. package/lib/support-request/supportRequestInterface.d.ts +0 -6
  397. package/lib/task/Interfaces/TaskInterface.d.ts +0 -132
  398. package/lib/task/Services/task.service.d.ts +0 -75
  399. package/lib/templates/attachmentsetup/attachment-interface.d.ts +0 -90
  400. package/lib/templates/attachmentsetup/attachment.service.d.ts +0 -61
  401. package/lib/templates/grid/grid-datatype/grid-datatype.component.d.ts +0 -11
  402. package/lib/templates/grid/grid-service.service.d.ts +0 -45
  403. package/lib/templates/grid/grid.component.d.ts +0 -218
  404. package/lib/templates/grid/inner-grid/inner-grid.component.d.ts +0 -5
  405. package/lib/templates/interface_enum/common-Interface.d.ts +0 -96
  406. package/lib/templates/interface_enum/common-enum.d.ts +0 -134
  407. package/lib/ticket/_interfaces/model.d.ts +0 -192
  408. package/lib/ticket/_ticket-services/ticket-api.service.d.ts +0 -81
@@ -0,0 +1,1073 @@
1
+ import { Component, Input, OnInit, Output, EventEmitter, SimpleChanges } from '@angular/core';
2
+ import {
3
+ EntityTypeFieldVM,
4
+ ILookUpJsonFieldData,
5
+ } from '../../interface/entityTypeInterface';
6
+ import { FormGroup, FormBuilder } from '@angular/forms';
7
+ import { E_DataType } from '../../../templates/interface_enum/common-enum';
8
+ import { EntityTypeSetupService } from '../../service/entity-type-setup.service';
9
+ import { Observable } from 'rxjs';
10
+ import { PageForm } from '../../page-form-instance';
11
+ import {
12
+ IRestConfig,
13
+ ISearchCriteria } from '../../../templates/interface_enum/common-Interface';
14
+ import Swal from 'sweetalert2';
15
+ import { GlobalService } from '../../../core/global.service';
16
+ import { TranslatePipe } from '../../../Pipe/translate.pipe';
17
+ import { FilterPipe, UniqueFilterPipe } from '../../../Pipe/allpipe.pipe';
18
+ import * as Handlebars from 'handlebars';
19
+ declare var $: any;
20
+
21
+ @Component({
22
+ selector: 'app-entity-dynamic-field',
23
+ templateUrl: './entity-dynamic-field.component.html',
24
+ styleUrls: ['./entity-dynamic-field.component.scss'],
25
+ })
26
+ export class EntityDynamicFieldComponent implements OnInit {
27
+ constructor(
28
+ private entityTypeSetup: EntityTypeSetupService,
29
+ public globalService: GlobalService,
30
+ ) {}
31
+
32
+ ngOnInit(): void {
33
+
34
+ this.entityTypeSetup.onPlaceHolderSelect.subscribe((x) => {
35
+ if (x && x.placeholder) this.clks(x.placeholder,x.Type);
36
+ });
37
+ this.OnSelectRequestorValue();
38
+ // this.setDDLValueOnEditMode()
39
+
40
+
41
+ this.getListFieldData()
42
+ // this.generateDropDownFields()
43
+ }
44
+
45
+ ngOnChanges(changes: SimpleChanges) {
46
+
47
+ if(changes && changes.fieldsList && changes.fieldsList.firstChange==false) {
48
+
49
+ this.OnSelectRequestorValue("ngOnChanges");
50
+ }
51
+
52
+ }
53
+
54
+ @Input() RequestorField: any = null;
55
+ @Input() RequestorFieldValue: any = null;
56
+
57
+ @Input() ParameterData:any=null;
58
+
59
+ @Input() fieldsList: EntityTypeFieldVM[] = [];
60
+ @Input() dynamicFormGroup: FormGroup;
61
+ @Input() pageForm: PageForm;
62
+ @Input() PageGroupValues: any = {};
63
+ @Input() submitted: boolean;
64
+ @Input() Type: string = 'Design';
65
+ @Input() rowIndex: number;
66
+ @Input() groupIndex: number;
67
+ @Input() ActionType: any;
68
+
69
+ @Input() EntityType: number;
70
+
71
+ @Output() FieldChangeEvent: any = new EventEmitter<{
72
+ FieldData: any;
73
+ RestData: any;
74
+ }>();
75
+ @Output() deleteField: any = new EventEmitter<{
76
+ fieldIndex: number;
77
+ groupIndex: number;
78
+ rowIndex: number;
79
+ }>();
80
+ @Output() downField: any = new EventEmitter<{
81
+ fieldIndex: number;
82
+ groupIndex: number;
83
+ rowIndex: number;
84
+ }>();
85
+ @Output() upField: any = new EventEmitter<{
86
+ fieldIndex: number;
87
+ groupIndex: number;
88
+ rowIndex: number;
89
+ }>();
90
+
91
+ _dataType = E_DataType;
92
+
93
+ dropDown$ = Object.assign({});
94
+ dropDownColumn$: any[] = [];
95
+ generateDropDownFields() {
96
+ for (const iterator of this.fieldsList) {
97
+ if (iterator.DataType == E_DataType.dropdown) {
98
+ this.dropDown$[iterator.Description] = new Observable((obx) => {
99
+ if (iterator.FieldData) {
100
+ var jsonItem = JSON.parse(iterator.FieldData);
101
+ if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
102
+ const url = jsonItem.api.url;
103
+ this.entityTypeSetup.getDyamicUrl(url).subscribe((ress: any) => {
104
+
105
+ let res = ress;
106
+ if (ress && ress?.entities) res = ress.entities;
107
+ if (ress && ress?.Data) res = ress.Data;
108
+ if (ress && ress?.templates) res = ress.templates;
109
+ if (ress && ress?.Data && ress?.Data?.Data) res = ress.Data.Data;
110
+
111
+ if (res && Array.isArray(res) && res.length > 0) {
112
+ obx.next(
113
+ res.map((x) =>
114
+ Object.assign({
115
+ Id: x[jsonItem.api.valueField],
116
+ Description: x[jsonItem.api.textField],
117
+ })
118
+ )
119
+ );
120
+ } else if (
121
+ Object.keys(res).length > 0 &&
122
+ Object.keys(res).includes('List')
123
+ ) {
124
+ obx.next(
125
+ res['List'].map((x) =>
126
+ Object.assign({
127
+ Id: x[jsonItem.api.valueField],
128
+ Description: x[jsonItem.api.textField],
129
+ })
130
+ )
131
+ );
132
+ } else obx.next([]);
133
+ });
134
+ } else {
135
+ if (
136
+ jsonItem.options &&
137
+ Array.isArray(jsonItem.options) &&
138
+ jsonItem.options.length > 0
139
+ ) {
140
+
141
+
142
+ obx.next(
143
+ jsonItem.options.map((x) =>
144
+ Object.assign({
145
+ Id: x.value,
146
+ Description: x.text,
147
+ })
148
+ )
149
+ );
150
+ } else obx.next([]);
151
+ }
152
+ }
153
+ });
154
+ }
155
+ }
156
+ }
157
+
158
+ validationError(name: string, errorName: string) {
159
+ if (name && errorName)
160
+ return this.dynamicFormGroup.get(name).errors[errorName] ? true : false;
161
+ else return this.dynamicFormGroup.get(name).errors ? true : false;
162
+ }
163
+
164
+ getType(_dataType: E_DataType | number) {
165
+ switch (_dataType) {
166
+ case E_DataType.int:
167
+ case E_DataType.decimal:
168
+ return 'number';
169
+ case E_DataType.date:
170
+ return 'date';
171
+ case E_DataType.dateTime:
172
+ return 'datetime-local';
173
+ case E_DataType.timespan:
174
+ return 'time';
175
+ case E_DataType.bool:
176
+ return 'checkbox';
177
+ case E_DataType.string:
178
+ return 'text';
179
+ case E_DataType.image:
180
+ return 'file';
181
+
182
+ default:
183
+ return 'text';
184
+ }
185
+ }
186
+
187
+ changeTextEvent(event) {
188
+
189
+ }
190
+
191
+
192
+ setDDLValueOnEditMode() {
193
+ if (this.PageGroupValues && this.PageGroupValues.RecId) {
194
+ this.fieldsList.map((x) => {
195
+ if (x.DataType == E_DataType.dropdown) {
196
+
197
+
198
+ let _field=x.Description+"_Desc"
199
+ if( _field in this.PageGroupValues) {
200
+
201
+ x.showSelectedValues = this.PageGroupValues[_field];
202
+ }
203
+ else {
204
+ x.showSelectedValues = this.PageGroupValues[x.Description];
205
+ }
206
+
207
+ }
208
+
209
+ });
210
+ alert("asa");
211
+
212
+
213
+ }
214
+ }
215
+
216
+
217
+
218
+ datatype: any;
219
+ changeFiledValue(event, item, SelectedObj?) {
220
+ // alert("change")
221
+
222
+ // let val = event.target.value;
223
+ // let id= event.target.id;
224
+ // let x =this.pageForm.form.get[id];
225
+ this.FieldChangeEvent.emit({ FieldData: item, RestData: SelectedObj });
226
+ }
227
+
228
+ SelectedFiles: any = null;
229
+ selectedFileItem: any = null;
230
+
231
+ changeFile(event: any, item) {
232
+ // alert("change");
233
+
234
+ this.selectedFileItem = item;
235
+ this.SelectedFiles = event.target.files;
236
+ }
237
+
238
+ _deleteField(fieldIndex) {
239
+ this.deleteField.emit({
240
+ fieldIndex: fieldIndex,
241
+ groupIndex: this.groupIndex,
242
+ rowIndex: this.rowIndex,
243
+ });
244
+ }
245
+ _downField(fieldIndex) {
246
+ this.downField.emit({
247
+ fieldIndex: fieldIndex,
248
+ groupIndex: this.groupIndex,
249
+ rowIndex: this.rowIndex,
250
+ });
251
+ }
252
+ _upField(fieldIndex) {
253
+ this.upField.emit({
254
+ fieldIndex: fieldIndex,
255
+ groupIndex: this.groupIndex,
256
+ rowIndex: this.rowIndex,
257
+ });
258
+ }
259
+
260
+ getFiledKey(keyValue, lookup) {
261
+ let key = keyValue;
262
+ let lookupValue: ILookUpJsonFieldData = JSON.parse(lookup);
263
+ if (lookupValue) key = lookupValue.IdDescription;
264
+ return key;
265
+ }
266
+
267
+ tempFields: any;
268
+
269
+ loadDropdown(
270
+ field: EntityTypeFieldVM,
271
+ searchCriteria?: any,
272
+ RequestorField?:any,
273
+ SearchText?:any
274
+ ) {
275
+
276
+ this.tempFields = field;
277
+
278
+ if (field.DataType == E_DataType.dropdown) {
279
+ // if(field.LookupData) {
280
+ // let _lookdata = JSON.parse(field.LookupData);
281
+ // let columns =_lookdata.IdField.split(",");
282
+ // this.dropDownColumn$[field.Description] = columns;
283
+ // }
284
+
285
+ // dropDownColumn
286
+
287
+ this.dropDown$[field.Description] = new Observable((obx) => {
288
+ if (field.FieldData) {
289
+ var jsonItem = JSON.parse(field.FieldData);
290
+ if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
291
+ let isDepandancyvalue = true;
292
+ let _formvalue = this.pageForm.form.value;
293
+
294
+ let restData: IRestConfig = jsonItem.rest;
295
+
296
+ /* #region Column def */
297
+ let columns: any[] = [];
298
+ columns.push(restData.valueField);
299
+ // columns.push(restData.textField)
300
+
301
+ let _col = restData.textField.split(',');
302
+ columns.push(..._col);
303
+ this.dropDownColumn$[field.Description] = columns;
304
+ /* #endregion */
305
+
306
+ let _handleData:any={};
307
+ if (this.ParameterData){
308
+ _handleData.params = this.ParameterData;
309
+ }
310
+
311
+ restData.QueryStrings.forEach((query) => {
312
+ if (query.Type == 'FieldValue') {
313
+
314
+ if (!_formvalue[query.Value] && query.IsNullable != true) {
315
+ // Swal.fire('please fill ' + query.Value, 'warning');
316
+ Swal.fire({
317
+ title: this.translatePipe.transform('please fill ' + query.Value),
318
+ });
319
+ isDepandancyvalue = false;
320
+ return;
321
+ }
322
+ }
323
+ else{
324
+
325
+ query.Value = this.hanbleBarData(query.Value,_handleData);
326
+ }
327
+ });
328
+
329
+ restData.Headers = restData.Headers.map(x => {
330
+ x.Value = this.hanbleBarData(x.Value,_handleData);
331
+ return x
332
+ });
333
+ restData.URL = this.hanbleBarData(restData.URL,_handleData);
334
+ restData.Body = this.hanbleBarData(restData.Body,_handleData);
335
+
336
+ if (!isDepandancyvalue) {
337
+ return;
338
+ }
339
+
340
+ this.entityTypeSetup.dynamicAPi(restData, _formvalue, searchCriteria,SearchText,restData.Havecriteria)
341
+ .subscribe((ress: any) => {
342
+
343
+ let res = ress;
344
+ if(restData.ResponseView) {
345
+ let _rview = restData.ResponseView.split(".");
346
+ _rview.forEach(x => {
347
+ if (ress) {
348
+ ress = ress[x];
349
+ res = ress;
350
+ }
351
+ else
352
+ res = "";
353
+ });
354
+ }
355
+ else {
356
+ if (ress.Data) {
357
+ res = ress.Data;
358
+ if (res.Data)
359
+ res = res.Data
360
+ }
361
+ if (ress.content) res = ress.content;
362
+
363
+ if (ress.entities) res = ress.entities;
364
+ if (ress.templates) res = ress.templates;
365
+
366
+ }
367
+
368
+ if (RequestorField) {
369
+ let _Sitem = res.filter((x) => x[restData.valueField] == this.RequestorFieldValue);
370
+ this.fieldsList.map((x) => {
371
+ if (x.Description == field.Description)
372
+ x.showTable = false;
373
+ });
374
+ if (_Sitem && _Sitem.length > 0) {
375
+ this.selectDropDownRow(_Sitem[0], field);
376
+ }
377
+ }
378
+
379
+ if (res && Array.isArray(res) && res.length > 0) {
380
+ obx.next(res);
381
+ } else if (
382
+ Object.keys(res).length > 0 &&
383
+ Object.keys(res).includes('List')
384
+ ) {
385
+ obx.next(res['List']);
386
+ } else obx.next([]);
387
+ });
388
+ } else if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
389
+ const url = jsonItem.api.url;
390
+ this.entityTypeSetup.getDyamicUrl(url).subscribe((ress: any) => {
391
+
392
+ let res = ress;
393
+ if(jsonItem.api && jsonItem.api.ResponseView) {
394
+ let _rview = jsonItem.api.ResponseView.split(".");
395
+ _rview.forEach(x => {
396
+ if (ress) {
397
+ ress = ress[x];
398
+ res = ress;
399
+ }
400
+ else
401
+ res = "";
402
+ });
403
+ }
404
+ else {
405
+ if (ress.Data) {
406
+ res = ress.Data;
407
+ if (res.Data)
408
+ res = res.Data
409
+ }
410
+ if (ress.content) res = ress.content;
411
+
412
+ if (ress.entities) res = ress.entities;
413
+ if (ress.templates) res = ress.templates;
414
+
415
+ }
416
+
417
+ if (res && Array.isArray(res) && res.length > 0) {
418
+ obx.next(
419
+ res.map((x) =>
420
+ Object.assign({
421
+ Id: x[jsonItem.api.valueField],
422
+ Description: x[jsonItem.api.textField],
423
+ })
424
+ )
425
+ );
426
+ } else if (
427
+ Object.keys(res).length > 0 &&
428
+ Object.keys(res).includes('List')
429
+ ) {
430
+ obx.next(
431
+ res['List'].map((x) =>
432
+ Object.assign({
433
+ Id: x[jsonItem.api.valueField],
434
+ Description: x[jsonItem.api.textField],
435
+ })
436
+ )
437
+ );
438
+ } else obx.next([]);
439
+ });
440
+ } else {
441
+ if (
442
+ jsonItem.options &&
443
+ Array.isArray(jsonItem.options) &&
444
+ jsonItem.options.length > 0
445
+ ) {
446
+
447
+
448
+ /* #region Column def for json manual Item */
449
+ let columns: any[] = ['value', 'text'];
450
+ this.dropDownColumn$[field.Description] = columns;
451
+ /* #endregion */
452
+
453
+ if (RequestorField) {
454
+ let _Sitem = jsonItem.options.filter(
455
+ (x) => x.text == this.RequestorField
456
+ );
457
+ if (_Sitem && _Sitem.length > 0) {
458
+ this.selectDropDownRow(_Sitem[0], field);
459
+ }
460
+ }
461
+
462
+ obx.next(jsonItem.options);
463
+ } else obx.next([]);
464
+ }
465
+ }
466
+ });
467
+ }
468
+ }
469
+
470
+ closeSearchBox: boolean = false;
471
+ closesearch() {
472
+ this.closeSearchBox = false;
473
+ }
474
+
475
+
476
+ showDetailsFormField(field: EntityTypeFieldVM) {
477
+
478
+ let _ret: boolean = true;
479
+
480
+ if (field.LookupData) {
481
+ let _LookupData = JSON.parse(field.LookupData);
482
+ // LookupData.LookupTable
483
+ if (_LookupData && _LookupData.DetailsShowData && _LookupData.DetailsShowData.length > 0) {
484
+ _LookupData.DetailsShowData.forEach(element => {
485
+
486
+ if (element.Type == "All" ||
487
+ (element.Type == "OnlyArabic" && this.globalService.CurrentLanguage == "Ar") ||
488
+ (element.Type == "OnlyEnglish" && this.globalService.CurrentLanguage != "Ar"))
489
+ _ret = true;
490
+ else
491
+ _ret = false;
492
+ });
493
+ }
494
+
495
+ }
496
+
497
+
498
+ return _ret
499
+
500
+ }
501
+
502
+
503
+ // -----------these no need once client side pagination done.
504
+ pageStartFrom: number = 1;
505
+ defineItemsPerPage: number = 10;
506
+ //total: number = this.dropDownColumn$.length;
507
+ // -----------these no need once client side pagination done.
508
+ defineRecordCount(event) {
509
+
510
+ this.defineItemsPerPage = event.target.value;
511
+ this.pageStartFrom = 1;
512
+ }
513
+
514
+ autoSearchDropdown(event: any,field: EntityTypeFieldVM,searchValue?,RequestorField?) {
515
+
516
+
517
+
518
+ this.tempFields = field;
519
+
520
+ if (field.DataType == E_DataType.dropdown) {
521
+ if (field.FieldData) {
522
+ var jsonItem = JSON.parse(field.FieldData);
523
+ if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
524
+ let restData: IRestConfig = jsonItem.rest;
525
+ let _Searchcriteria: ISearchCriteria = {
526
+ Pagging: {
527
+ PageNo: 1,
528
+ PageSize: 100,
529
+ },
530
+ Where: [],
531
+ SortOrder: 1,
532
+ };
533
+ if (!searchValue) searchValue = event.target.value;
534
+ let filterobj = {
535
+ Field: restData.valueField,
536
+ Operator: 'Contains',
537
+ TableAlias: '',
538
+ Value: searchValue,
539
+ };
540
+
541
+ jsonItem.rest.QueryStrings.filter(x => x.Type == "SearchValue").map((y) => {
542
+ let temp = ":" + y.Name;
543
+ filterobj.Field += temp;
544
+ });
545
+
546
+ if (filterobj.Field)
547
+ _Searchcriteria.Where.push(filterobj);
548
+ this.loadDropdown(field, _Searchcriteria, RequestorField,searchValue);
549
+ }
550
+ }
551
+ }
552
+ }
553
+
554
+ loadDropdownColumn(field: EntityTypeFieldVM) {
555
+
556
+ let columns: string[] = ['value', 'text'];
557
+ this.dropDownColumn$[field.Description] = columns;
558
+ let jsonItem = JSON.parse(field.FieldData);
559
+ if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
560
+ let restData: IRestConfig = jsonItem.rest;
561
+ columns = [];
562
+ columns.push(restData.valueField);
563
+ let _col = restData.textField.split(',');
564
+ columns.push(..._col);
565
+ this.dropDownColumn$[field.Description] = columns;
566
+
567
+ if (jsonItem.rest.Havecriteria) {
568
+ this.fieldsList.map((x) => {
569
+ if (x.Description == field.Description) {
570
+ x.showSearchBox = true;
571
+ }
572
+ });
573
+ } else {
574
+
575
+ let showSearchBox: boolean = false;
576
+ let SearchValue = jsonItem.rest.QueryStrings.filter((x) => x.Type == "SearchValue");
577
+ if (SearchValue.length > 0) {
578
+ showSearchBox = true;
579
+ }
580
+ if(showSearchBox) {
581
+ this.fieldsList.map((x) => {
582
+ if (x.Description == field.Description) {
583
+ x.showSearchBox = true;
584
+ }
585
+ });
586
+ }
587
+ }
588
+ this.loadDropdown(field);
589
+ } else {
590
+ this.loadDropdown(field);
591
+ }
592
+ this.closesearch();
593
+ }
594
+
595
+ selectDropDownRow(row, field: EntityTypeFieldVM) {
596
+
597
+ var jsonItem = JSON.parse(field.FieldData);
598
+ let _fieldVal = null;
599
+ if (jsonItem.isDynamic) _fieldVal = row[jsonItem.rest.valueField];
600
+ else _fieldVal = row['value'];
601
+
602
+ this.pageForm.form.get(field.Description).setValue(_fieldVal);
603
+
604
+ let showValue = '';
605
+ // this.dropDownColumn$[field.Description].forEach((col) => {
606
+ // showValue = showValue + row[col] + ' | ';
607
+ // });
608
+ if (jsonItem && jsonItem.rest) {
609
+ let _filedDropdown: IRestConfig = jsonItem.rest
610
+ if (_filedDropdown.TextboxShowData && _filedDropdown.TextboxShowData.length > 0) {
611
+
612
+ showValue = ''
613
+ _filedDropdown.TextboxShowData.forEach(element => {
614
+
615
+ if (element.Type == "All" ||
616
+ (element.Type =="OnlyArabic" && this.globalService.CurrentLanguage=="Ar") ||
617
+ (element.Type =="OnlyEnglish" && this.globalService.CurrentLanguage!="Ar"))
618
+ showValue = showValue + row[element.Column] + "-";
619
+ // else if(element.Type =="OnlyArabic" && this.globalService.CurrentLanguage=="Ar") {
620
+ // showValue = showValue + row[element.Column] + " - ";
621
+ // }
622
+ // else if(element.Type =="OnlyEnglish" && this.globalService.CurrentLanguage!="Ar") {
623
+ // showValue = showValue + row[element.Column] + " - ";
624
+ // }
625
+
626
+ });
627
+ if(showValue){
628
+ let value = showValue.charAt(showValue.length-1)
629
+ if(value == "-"){
630
+ showValue = showValue.substring(0, showValue.length - 1)
631
+ }
632
+
633
+ }
634
+ }
635
+ else
636
+ showValue = row[this.dropDownColumn$[field.Description][1]]
637
+ }
638
+ else
639
+ showValue = row[this.dropDownColumn$[field.Description][1]]
640
+
641
+ this.fieldsList.map((x) => {
642
+ if (x.Description == field.Description) x.showSelectedValues = showValue;
643
+ });
644
+
645
+ this.closesearch();
646
+ this.changeFiledValue('', field, row);
647
+ }
648
+
649
+ showTable(item) {
650
+ this.pageStartFrom = 1;
651
+ this.defineItemsPerPage = 10;
652
+ this.fieldsList.map((x) => {
653
+ if (x.Description != item.Description) x.showTable = false;
654
+ });
655
+
656
+ item.showTable = !item.showTable;
657
+ this.loadDropdownColumn(item);
658
+ }
659
+
660
+ activeInputId: any;
661
+
662
+ clks(item,Type) {
663
+
664
+ if (this.activeInputId){
665
+ if(Type !="Event"){
666
+ this.typeInTextarea($('#' + this.activeInputId), '@@' + item);
667
+ }
668
+ else{
669
+ this.typeInTextarea($('#' + this.activeInputId), item);
670
+ }
671
+ }
672
+
673
+ //'@@' +
674
+ return false;
675
+ }
676
+
677
+ typeInTextarea(el, newText) {
678
+ var start = el.prop('selectionStart');
679
+ var end = el.prop('selectionEnd');
680
+ var text = el.val();
681
+ var before = text.substring(0, start);
682
+ var after = text.substring(end, text.length);
683
+ el.val(before + newText + after);
684
+ el[0].selectionStart = el[0].selectionEnd = start + newText.length;
685
+ el.focus();
686
+
687
+ this.pageForm.form.get(this.activeInputId).setValue(el.val());
688
+
689
+ let item = this.fieldsList.filter(
690
+ (x) => x.Description == this.activeInputId
691
+ )[0];
692
+ this.changeFiledValue('', item);
693
+
694
+ return false;
695
+ }
696
+
697
+ searchValue: any;
698
+
699
+ customSearchFn(term: string, item: any) {
700
+ // alert('a');
701
+
702
+ // this.searchValue = term
703
+ this.loadDropdown(this.tempFields, term);
704
+ }
705
+
706
+ OnSearch(field) {
707
+ this.searchValue;
708
+ // alert('b');
709
+
710
+ // term = term.toLocaleLowerCase();
711
+ // return item.code.toLocaleLowerCase().indexOf(term) > -1 ||
712
+ // item.countryName.toLocaleLowerCase().indexOf(term) > -1;
713
+
714
+ if (field.DataType == E_DataType.dropdown) {
715
+ this.dropDown$[field.Description] = new Observable((obx) => {
716
+ if (field.FieldData) {
717
+ var jsonItem = JSON.parse(field.FieldData);
718
+ if (jsonItem.isDynamic && jsonItem.rest && jsonItem.rest.URL) {
719
+ let isDepandancyvalue = true;
720
+ let _formvalue = this.pageForm.form.value;
721
+
722
+ let restData: IRestConfig = jsonItem.rest;
723
+ let _handleData:any={};
724
+ if (this.ParameterData){
725
+ _handleData.params = this.ParameterData;
726
+ }
727
+
728
+ restData.QueryStrings.forEach((query) => {
729
+ if (query.Type == 'FieldValue') {
730
+
731
+ if (!_formvalue[query.Value]) {
732
+ // Swal.fire('please fill ' + query.Value, 'warning');
733
+ Swal.fire({
734
+ title: this.translatePipe.transform('please fill ' + query.Value),
735
+ });
736
+ isDepandancyvalue = false;
737
+ return;
738
+ }
739
+ }
740
+ });
741
+
742
+ restData.Headers = restData.Headers.map(x => {
743
+ x.Value = this.hanbleBarData(x.Value,_handleData);
744
+ return x
745
+ });
746
+ restData.URL = this.hanbleBarData(restData.URL,_handleData);
747
+ restData.Body = this.hanbleBarData(restData.Body,_handleData);
748
+
749
+
750
+ if (!isDepandancyvalue) {
751
+ return;
752
+ }
753
+
754
+ this.entityTypeSetup.dynamicAPi(restData, _formvalue)
755
+ .subscribe((ress: any) => {
756
+
757
+ let res = ress;
758
+ if(restData.ResponseView) {
759
+ let _rview = restData.ResponseView.split(".");
760
+ _rview.forEach(x => {
761
+ if (ress) {
762
+ ress = ress[x];
763
+ res = ress;
764
+ }
765
+ else
766
+ res = "";
767
+ });
768
+ }
769
+ else {
770
+ if (ress.Data) {
771
+ res = ress.Data;
772
+ if (res.Data)
773
+ res = res.Data
774
+ }
775
+ if (ress.content) res = ress.content;
776
+
777
+ if (ress.entities) res = ress.entities;
778
+ if (ress.templates) res = ress.templates;
779
+
780
+ }
781
+
782
+ if (res && Array.isArray(res) && res.length > 0) {
783
+ obx.next(
784
+ res.map((x) =>
785
+ Object.assign({
786
+ Id: x[jsonItem.rest.valueField],
787
+ Description: x[jsonItem.rest.textField],
788
+ })
789
+ )
790
+ );
791
+ } else if (
792
+ Object.keys(res).length > 0 &&
793
+ Object.keys(res).includes('List')
794
+ ) {
795
+ obx.next(
796
+ res['List'].map((x) =>
797
+ Object.assign({
798
+ Id: x[jsonItem.rest.valueField],
799
+ Description: x[jsonItem.rest.textField],
800
+ })
801
+ )
802
+ );
803
+ } else obx.next([]);
804
+ });
805
+ } else if (jsonItem.isDynamic && jsonItem.api && jsonItem.api.url) {
806
+ const url = jsonItem.api.url;
807
+ this.entityTypeSetup.getDyamicUrl(url).subscribe((ress: any) => {
808
+
809
+ let res = ress;
810
+ if (jsonItem.api && jsonItem.api.ResponseView) {
811
+ let _rview = jsonItem.api.ResponseView.split(".");
812
+ _rview.forEach(x => {
813
+ if (ress) {
814
+ ress = ress[x];
815
+ res = ress;
816
+ }
817
+ else
818
+ res = "";
819
+ });
820
+ }
821
+ else {
822
+ if (ress.Data) {
823
+ res = ress.Data;
824
+ if (res.Data)
825
+ res = res.Data
826
+ }
827
+ if (ress.content) res = ress.content;
828
+
829
+ if (ress.entities) res = ress.entities;
830
+ if (ress.templates) res = ress.templates;
831
+
832
+ }
833
+
834
+ if (res && Array.isArray(res) && res.length > 0) {
835
+ obx.next(
836
+ res.map((x) =>
837
+ Object.assign({
838
+ Id: x[jsonItem.api.valueField],
839
+ Description: x[jsonItem.api.textField],
840
+ })
841
+ )
842
+ );
843
+ } else if (
844
+ Object.keys(res).length > 0 &&
845
+ Object.keys(res).includes('List')
846
+ ) {
847
+ obx.next(
848
+ res['List'].map((x) =>
849
+ Object.assign({
850
+ Id: x[jsonItem.api.valueField],
851
+ Description: x[jsonItem.api.textField],
852
+ })
853
+ )
854
+ );
855
+ } else obx.next([]);
856
+ });
857
+ } else {
858
+ if (
859
+ jsonItem.options &&
860
+ Array.isArray(jsonItem.options) &&
861
+ jsonItem.options.length > 0
862
+ ) {
863
+
864
+
865
+ obx.next(
866
+ jsonItem.options.map((x) =>
867
+ Object.assign({
868
+ Id: x.value,
869
+ Description: x.text,
870
+ })
871
+ )
872
+ );
873
+ } else obx.next([]);
874
+ }
875
+ }
876
+ });
877
+ }
878
+ }
879
+
880
+ OnSelectRequestorValue(Type?) {
881
+
882
+ if (!this.RequestorField || !this.RequestorFieldValue) return;
883
+
884
+ let _RequestorField = this.fieldsList.filter(
885
+ (x) => x.Description == this.RequestorField
886
+ );
887
+ if (_RequestorField && _RequestorField.length > 0) {
888
+ let _field = _RequestorField[0];
889
+
890
+
891
+ this.fieldsList = this.fieldsList.map((x) => {
892
+ if (x.Description == _field.Description) {
893
+ x.showTable = true;
894
+ x.IsReadonly = true;
895
+ x.IsInactive = true;
896
+ }
897
+ return x
898
+ });
899
+
900
+ if (!Type) {
901
+ if (this.pageForm.form && this.pageForm.form.get(this.RequestorField))
902
+ this.pageForm.form.get(this.RequestorField).setValue(this.RequestorFieldValue, { onlySelf: true });
903
+ if (_field.DataType == E_DataType.dropdown) {
904
+ this.autoSearchDropdown(null,_field,this.RequestorFieldValue,this.RequestorField);
905
+ } else {
906
+ setTimeout(() => this.changeFiledValue('', _field), 1000);
907
+ }
908
+ }
909
+
910
+
911
+ }
912
+ }
913
+
914
+ showshortcode:boolean = false;
915
+ shortcode: any[]=[];
916
+ shortcutkey: any = [];
917
+ getShortCodeCannedResponse(event?) {
918
+
919
+ // columns.push(...short);
920
+ event = '';
921
+ if (this.showshortcode && (!this.shortcode || this.shortcode.length < 1 )) {
922
+
923
+ this.entityTypeSetup.getShortKeyCannedResponse(event).subscribe((res:any) => {
924
+
925
+ this.shortcode = res;
926
+ this.shortcutkey = res;
927
+ });
928
+ }
929
+ }
930
+
931
+ closeShortCanned: boolean = false;
932
+ closeShortKey() {
933
+ this.closeShortCanned = false;
934
+ }
935
+
936
+ shortkey: any;
937
+ selectShortKey(item) {
938
+
939
+
940
+ if (this.activeInputId)
941
+ this.typeInTextarea($('#' + this.activeInputId), item.Message);
942
+ return false;
943
+
944
+ this.closeShortKey();
945
+ // this.changeFiledValue('', field, row);
946
+ }
947
+
948
+ showShortKey(item) {
949
+ this.shortkey.map((x) => {
950
+ if (x.Message != item.Message) x.showshort = false;
951
+ });
952
+
953
+ item.showshort = !item.showshort;
954
+ this.getShortCodeCannedResponse(item);
955
+ }
956
+
957
+ FiedlListData$ = Object.assign({});
958
+ getListFieldData() {
959
+ for (const field of this.fieldsList) {
960
+ if (field.DataType == E_DataType.List) {
961
+
962
+ this.FiedlListData$[field.Description] = [];
963
+ let fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
964
+ if (fieldVal) {
965
+ for (let key in fieldVal) {
966
+ let temp = { key: key, value: fieldVal[key] };
967
+ this.FiedlListData$[field.Description].push(temp);
968
+ }
969
+ }
970
+ }
971
+ }
972
+ }
973
+
974
+
975
+ addnewList(field: EntityTypeFieldVM) {
976
+
977
+
978
+ if (!(this.FiedlListData$[field.Description] && this.FiedlListData$[field.Description].length > 0)) {
979
+ this.FiedlListData$[field.Description] = [];
980
+ let fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
981
+ if (fieldVal) {
982
+ for (let key in fieldVal) {
983
+ let temp = { key: key, value: fieldVal[key] };
984
+ this.FiedlListData$[field.Description].push(temp);
985
+ }
986
+ }
987
+ }
988
+ this.FiedlListData$[field.Description].push({ key: null, value: null })
989
+
990
+ let _fieldVal = {}
991
+ this.FiedlListData$[field.Description].forEach(x => _fieldVal[x.key] = x.value)
992
+ this.pageForm.form.get(field.Description).setValue(_fieldVal);
993
+ this.changeFiledValue('', field);
994
+ }
995
+
996
+
997
+ removeList(field: EntityTypeFieldVM, index) {
998
+
999
+ // this.FiedlListData$[field.Description] = [];
1000
+ // let fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
1001
+ // if (fieldVal) {
1002
+ // for (let key in fieldVal) {
1003
+ // let temp = { key: key, value: fieldVal[key] };
1004
+ // this.FiedlListData$[field.Description].push(temp);
1005
+ // }
1006
+ // }
1007
+ this.FiedlListData$[field.Description].splice(index, 1)
1008
+
1009
+ let _fieldVal = {}
1010
+ this.FiedlListData$[field.Description].forEach(x => _fieldVal[x.key] = x.value);
1011
+ this.pageForm.form.get(field.Description).setValue(_fieldVal);
1012
+ this.changeFiledValue('', field);
1013
+ }
1014
+
1015
+ changeFiledList(field: EntityTypeFieldVM,item,index) {
1016
+
1017
+ // this.FiedlListData$[field.Description] = [];
1018
+ // let fieldVal = this.pageForm.form && this.pageForm.form.get(field.Description).value;
1019
+ // if (fieldVal) {
1020
+ // for (let key in fieldVal) {
1021
+ // let temp = { key: key, value: fieldVal[key] };
1022
+ // this.FiedlListData$[field.Description].push(temp);
1023
+ // }
1024
+ // }
1025
+
1026
+ // this.FiedlListData$[field.Description][index]=item;
1027
+
1028
+ let _fieldVal = {}
1029
+ this.FiedlListData$[field.Description].forEach(x => _fieldVal[x.key] = x.value);
1030
+ this.pageForm.form.get(field.Description).setValue(_fieldVal);
1031
+ this.changeFiledValue('', field);
1032
+ }
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+ translatePipe = new TranslatePipe(this.globalService);
1042
+ FilterPipe = new FilterPipe();
1043
+ UniqueFilterPipe = new UniqueFilterPipe();
1044
+
1045
+
1046
+ hanbleBarData(_code, data?) {
1047
+ if (!data || (typeof data != 'object'))
1048
+ data = {};
1049
+ data.CurrentData = this;
1050
+ data.Local = localStorage;
1051
+ data.Cookies = this.Cookies;
1052
+ data.System = this.globalService.SystemConfigs;
1053
+ if (_code && data) {
1054
+ let template = Handlebars.compile(_code);
1055
+ let result = template(data);
1056
+ return result
1057
+ }
1058
+ else {
1059
+ return _code
1060
+ }
1061
+ }
1062
+
1063
+ get Cookies() {
1064
+ let cookies = document.cookie.split(';');
1065
+ let cookie = {};
1066
+ for (let i = 0; i < cookies.length; i++) {
1067
+ let hash = (cookies[i].split('='));
1068
+ let _key = hash[0].toString().replace(" ", "");
1069
+ cookie[_key] = hash[1];
1070
+ }
1071
+ return cookie;
1072
+ }
1073
+ }