@ironcode/vas-lib 1.0.0 → 1.0.2

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 (547) hide show
  1. package/README.md +24 -0
  2. package/cjs/lib/control-value/index.d.ts +2 -0
  3. package/cjs/lib/control-value/index.d.ts.map +1 -0
  4. package/cjs/lib/control-value/index.js +5 -0
  5. package/cjs/lib/control-value/index.js.map +1 -0
  6. package/cjs/lib/control-value/vas-camera-control-value.model.d.ts +8 -0
  7. package/cjs/lib/control-value/vas-camera-control-value.model.d.ts.map +1 -0
  8. package/cjs/lib/control-value/vas-camera-control-value.model.js +12 -0
  9. package/cjs/lib/control-value/vas-camera-control-value.model.js.map +1 -0
  10. package/cjs/lib/controls-config/index.d.ts +4 -0
  11. package/cjs/lib/controls-config/index.d.ts.map +1 -0
  12. package/cjs/lib/controls-config/index.js +7 -0
  13. package/cjs/lib/controls-config/index.js.map +1 -0
  14. package/cjs/lib/controls-config/vas-control-config-direction.enum.d.ts +5 -0
  15. package/cjs/lib/controls-config/vas-control-config-direction.enum.d.ts.map +1 -0
  16. package/cjs/lib/controls-config/vas-control-config-direction.enum.js +11 -0
  17. package/cjs/lib/controls-config/vas-control-config-direction.enum.js.map +1 -0
  18. package/cjs/lib/controls-config/vas-control-config.model.d.ts +8 -0
  19. package/cjs/lib/controls-config/vas-control-config.model.d.ts.map +1 -0
  20. package/cjs/lib/controls-config/vas-control-config.model.js +3 -0
  21. package/cjs/lib/controls-config/vas-control-config.model.js.map +1 -0
  22. package/cjs/lib/controls-config/vas-select-control-config.model.d.ts +10 -0
  23. package/cjs/lib/controls-config/vas-select-control-config.model.d.ts.map +1 -0
  24. package/cjs/lib/controls-config/vas-select-control-config.model.js +3 -0
  25. package/cjs/lib/controls-config/vas-select-control-config.model.js.map +1 -0
  26. package/cjs/lib/entity/index.d.ts +60 -0
  27. package/cjs/lib/entity/index.d.ts.map +1 -0
  28. package/cjs/lib/entity/index.js +63 -0
  29. package/cjs/lib/entity/index.js.map +1 -0
  30. package/cjs/lib/entity/vas-access-group.dto.d.ts +7 -0
  31. package/cjs/lib/entity/vas-access-group.dto.d.ts.map +1 -0
  32. package/cjs/lib/entity/vas-access-group.dto.js +3 -0
  33. package/cjs/lib/entity/vas-access-group.dto.js.map +1 -0
  34. package/cjs/lib/entity/vas-account-config.dto.d.ts +8 -0
  35. package/cjs/lib/entity/vas-account-config.dto.d.ts.map +1 -0
  36. package/cjs/lib/entity/vas-account-config.dto.js +3 -0
  37. package/cjs/lib/entity/vas-account-config.dto.js.map +1 -0
  38. package/{lib → cjs/lib/entity}/vas-account-object.dto.d.ts +1 -0
  39. package/cjs/lib/entity/vas-account-object.dto.d.ts.map +1 -0
  40. package/cjs/lib/entity/vas-account-object.dto.js +3 -0
  41. package/cjs/lib/entity/vas-account-object.dto.js.map +1 -0
  42. package/cjs/lib/entity/vas-account-object.model.d.ts +16 -0
  43. package/cjs/lib/entity/vas-account-object.model.d.ts.map +1 -0
  44. package/cjs/lib/entity/vas-account-object.model.js +28 -0
  45. package/cjs/lib/entity/vas-account-object.model.js.map +1 -0
  46. package/cjs/lib/entity/vas-account.dto.d.ts +55 -0
  47. package/cjs/lib/entity/vas-account.dto.d.ts.map +1 -0
  48. package/cjs/lib/entity/vas-account.dto.js +10 -0
  49. package/cjs/lib/entity/vas-account.dto.js.map +1 -0
  50. package/{lib → cjs/lib/entity}/vas-base.dto.d.ts +3 -0
  51. package/cjs/lib/entity/vas-base.dto.d.ts.map +1 -0
  52. package/cjs/lib/entity/vas-base.dto.js +3 -0
  53. package/cjs/lib/entity/vas-base.dto.js.map +1 -0
  54. package/{lib → cjs/lib/entity}/vas-base.model.d.ts +4 -10
  55. package/cjs/lib/entity/vas-base.model.d.ts.map +1 -0
  56. package/cjs/lib/entity/vas-base.model.js +21 -0
  57. package/cjs/lib/entity/vas-base.model.js.map +1 -0
  58. package/cjs/lib/entity/vas-branch.dto.d.ts +22 -0
  59. package/cjs/lib/entity/vas-branch.dto.d.ts.map +1 -0
  60. package/cjs/lib/entity/vas-branch.dto.js +3 -0
  61. package/cjs/lib/entity/vas-branch.dto.js.map +1 -0
  62. package/cjs/lib/entity/vas-branch.model.d.ts +37 -0
  63. package/cjs/lib/entity/vas-branch.model.d.ts.map +1 -0
  64. package/cjs/lib/entity/vas-branch.model.js +72 -0
  65. package/cjs/lib/entity/vas-branch.model.js.map +1 -0
  66. package/cjs/lib/entity/vas-contact-type.dto.d.ts +8 -0
  67. package/cjs/lib/entity/vas-contact-type.dto.d.ts.map +1 -0
  68. package/cjs/lib/entity/vas-contact-type.dto.js +3 -0
  69. package/cjs/lib/entity/vas-contact-type.dto.js.map +1 -0
  70. package/cjs/lib/entity/vas-contact.dto.d.ts +17 -0
  71. package/cjs/lib/entity/vas-contact.dto.d.ts.map +1 -0
  72. package/cjs/lib/entity/vas-contact.dto.js +3 -0
  73. package/cjs/lib/entity/vas-contact.dto.js.map +1 -0
  74. package/cjs/lib/entity/vas-contact.model.d.ts +33 -0
  75. package/cjs/lib/entity/vas-contact.model.d.ts.map +1 -0
  76. package/cjs/lib/entity/vas-contact.model.js +69 -0
  77. package/cjs/lib/entity/vas-contact.model.js.map +1 -0
  78. package/{lib → cjs/lib/entity}/vas-control-type.dto.d.ts +1 -0
  79. package/cjs/lib/entity/vas-control-type.dto.d.ts.map +1 -0
  80. package/cjs/lib/entity/vas-control-type.dto.js +3 -0
  81. package/cjs/lib/entity/vas-control-type.dto.js.map +1 -0
  82. package/{lib → cjs/lib/entity}/vas-control-type.model.d.ts +6 -9
  83. package/cjs/lib/entity/vas-control-type.model.d.ts.map +1 -0
  84. package/cjs/lib/entity/vas-control-type.model.js +57 -0
  85. package/cjs/lib/entity/vas-control-type.model.js.map +1 -0
  86. package/{lib → cjs/lib/entity}/vas-control.dto.d.ts +5 -1
  87. package/cjs/lib/entity/vas-control.dto.d.ts.map +1 -0
  88. package/cjs/lib/entity/vas-control.dto.js +3 -0
  89. package/cjs/lib/entity/vas-control.dto.js.map +1 -0
  90. package/{lib → cjs/lib/entity}/vas-control.model.d.ts +19 -32
  91. package/cjs/lib/entity/vas-control.model.d.ts.map +1 -0
  92. package/cjs/lib/entity/vas-control.model.js +163 -0
  93. package/cjs/lib/entity/vas-control.model.js.map +1 -0
  94. package/cjs/lib/entity/vas-field.dto.d.ts +11 -0
  95. package/cjs/lib/entity/vas-field.dto.d.ts.map +1 -0
  96. package/cjs/lib/entity/vas-field.dto.js +3 -0
  97. package/cjs/lib/entity/vas-field.dto.js.map +1 -0
  98. package/cjs/lib/entity/vas-field.model.d.ts +46 -0
  99. package/cjs/lib/entity/vas-field.model.d.ts.map +1 -0
  100. package/cjs/lib/entity/vas-field.model.js +92 -0
  101. package/cjs/lib/entity/vas-field.model.js.map +1 -0
  102. package/cjs/lib/entity/vas-file.dto.d.ts +23 -0
  103. package/cjs/lib/entity/vas-file.dto.d.ts.map +1 -0
  104. package/cjs/lib/entity/vas-file.dto.js +13 -0
  105. package/cjs/lib/entity/vas-file.dto.js.map +1 -0
  106. package/cjs/lib/entity/vas-file.model.d.ts +43 -0
  107. package/cjs/lib/entity/vas-file.model.d.ts.map +1 -0
  108. package/cjs/lib/entity/vas-file.model.js +124 -0
  109. package/cjs/lib/entity/vas-file.model.js.map +1 -0
  110. package/cjs/lib/entity/vas-fire-user.dto.d.ts +16 -0
  111. package/cjs/lib/entity/vas-fire-user.dto.d.ts.map +1 -0
  112. package/cjs/lib/entity/vas-fire-user.dto.js +3 -0
  113. package/cjs/lib/entity/vas-fire-user.dto.js.map +1 -0
  114. package/cjs/lib/entity/vas-fire-user.model.d.ts +56 -0
  115. package/cjs/lib/entity/vas-fire-user.model.d.ts.map +1 -0
  116. package/cjs/lib/entity/vas-fire-user.model.js +107 -0
  117. package/cjs/lib/entity/vas-fire-user.model.js.map +1 -0
  118. package/cjs/lib/entity/vas-form-config.dto.d.ts +9 -0
  119. package/cjs/lib/entity/vas-form-config.dto.d.ts.map +1 -0
  120. package/cjs/lib/entity/vas-form-config.dto.js +3 -0
  121. package/cjs/lib/entity/vas-form-config.dto.js.map +1 -0
  122. package/{lib → cjs/lib/entity}/vas-form.dto.d.ts +7 -0
  123. package/cjs/lib/entity/vas-form.dto.d.ts.map +1 -0
  124. package/cjs/lib/entity/vas-form.dto.js +3 -0
  125. package/cjs/lib/entity/vas-form.dto.js.map +1 -0
  126. package/{lib → cjs/lib/entity}/vas-form.model.d.ts +28 -19
  127. package/cjs/lib/entity/vas-form.model.d.ts.map +1 -0
  128. package/cjs/lib/entity/vas-form.model.js +189 -0
  129. package/cjs/lib/entity/vas-form.model.js.map +1 -0
  130. package/{lib → cjs/lib/entity}/vas-group.dto.d.ts +2 -1
  131. package/cjs/lib/entity/vas-group.dto.d.ts.map +1 -0
  132. package/cjs/lib/entity/vas-group.dto.js +3 -0
  133. package/cjs/lib/entity/vas-group.dto.js.map +1 -0
  134. package/{lib → cjs/lib/entity}/vas-group.model.d.ts +5 -23
  135. package/cjs/lib/entity/vas-group.model.d.ts.map +1 -0
  136. package/{lib → cjs/lib}/entity/vas-group.model.js +19 -31
  137. package/cjs/lib/entity/vas-group.model.js.map +1 -0
  138. package/cjs/lib/entity/vas-instruction-job-field.dto.d.ts +9 -0
  139. package/cjs/lib/entity/vas-instruction-job-field.dto.d.ts.map +1 -0
  140. package/cjs/lib/entity/vas-instruction-job-field.dto.js +3 -0
  141. package/cjs/lib/entity/vas-instruction-job-field.dto.js.map +1 -0
  142. package/cjs/lib/entity/vas-instruction-job-field.model.d.ts +26 -0
  143. package/cjs/lib/entity/vas-instruction-job-field.model.d.ts.map +1 -0
  144. package/cjs/lib/entity/vas-instruction-job-field.model.js +52 -0
  145. package/cjs/lib/entity/vas-instruction-job-field.model.js.map +1 -0
  146. package/cjs/lib/entity/vas-instruction-job.dto.d.ts +16 -0
  147. package/cjs/lib/entity/vas-instruction-job.dto.d.ts.map +1 -0
  148. package/cjs/lib/entity/vas-instruction-job.dto.js +3 -0
  149. package/cjs/lib/entity/vas-instruction-job.dto.js.map +1 -0
  150. package/cjs/lib/entity/vas-instruction-job.model.d.ts +58 -0
  151. package/cjs/lib/entity/vas-instruction-job.model.d.ts.map +1 -0
  152. package/cjs/lib/entity/vas-instruction-job.model.js +85 -0
  153. package/cjs/lib/entity/vas-instruction-job.model.js.map +1 -0
  154. package/cjs/lib/entity/vas-instruction-provider.dto.d.ts +9 -0
  155. package/cjs/lib/entity/vas-instruction-provider.dto.d.ts.map +1 -0
  156. package/cjs/lib/entity/vas-instruction-provider.dto.js +3 -0
  157. package/cjs/lib/entity/vas-instruction-provider.dto.js.map +1 -0
  158. package/cjs/lib/entity/vas-instruction-provider.model.d.ts +34 -0
  159. package/cjs/lib/entity/vas-instruction-provider.model.d.ts.map +1 -0
  160. package/cjs/lib/entity/vas-instruction-provider.model.js +62 -0
  161. package/cjs/lib/entity/vas-instruction-provider.model.js.map +1 -0
  162. package/cjs/lib/entity/vas-instruction.dto.d.ts +8 -0
  163. package/cjs/lib/entity/vas-instruction.dto.d.ts.map +1 -0
  164. package/cjs/lib/entity/vas-instruction.dto.js +3 -0
  165. package/cjs/lib/entity/vas-instruction.dto.js.map +1 -0
  166. package/cjs/lib/entity/vas-instruction.model.d.ts +32 -0
  167. package/cjs/lib/entity/vas-instruction.model.d.ts.map +1 -0
  168. package/cjs/lib/entity/vas-instruction.model.js +56 -0
  169. package/cjs/lib/entity/vas-instruction.model.js.map +1 -0
  170. package/cjs/lib/entity/vas-invitation.d.ts +53 -0
  171. package/cjs/lib/entity/vas-invitation.d.ts.map +1 -0
  172. package/cjs/lib/entity/vas-invitation.js +89 -0
  173. package/cjs/lib/entity/vas-invitation.js.map +1 -0
  174. package/{lib → cjs/lib/entity}/vas-job-data.dto.d.ts +1 -0
  175. package/cjs/lib/entity/vas-job-data.dto.d.ts.map +1 -0
  176. package/cjs/lib/entity/vas-job-data.dto.js +3 -0
  177. package/cjs/lib/entity/vas-job-data.dto.js.map +1 -0
  178. package/cjs/lib/entity/vas-job-data.model.d.ts +19 -0
  179. package/cjs/lib/entity/vas-job-data.model.d.ts.map +1 -0
  180. package/cjs/lib/entity/vas-job-data.model.js +25 -0
  181. package/cjs/lib/entity/vas-job-data.model.js.map +1 -0
  182. package/cjs/lib/entity/vas-job-status.dto.d.ts +8 -0
  183. package/cjs/lib/entity/vas-job-status.dto.d.ts.map +1 -0
  184. package/cjs/lib/entity/vas-job-status.dto.js +3 -0
  185. package/cjs/lib/entity/vas-job-status.dto.js.map +1 -0
  186. package/cjs/lib/entity/vas-job-type.dto.d.ts +8 -0
  187. package/cjs/lib/entity/vas-job-type.dto.d.ts.map +1 -0
  188. package/cjs/lib/entity/vas-job-type.dto.js +3 -0
  189. package/cjs/lib/entity/vas-job-type.dto.js.map +1 -0
  190. package/cjs/lib/entity/vas-job.dto.d.ts +23 -0
  191. package/cjs/lib/entity/vas-job.dto.d.ts.map +1 -0
  192. package/cjs/lib/entity/vas-job.dto.js +3 -0
  193. package/cjs/lib/entity/vas-job.dto.js.map +1 -0
  194. package/cjs/lib/entity/vas-job.model.d.ts +232 -0
  195. package/cjs/lib/entity/vas-job.model.d.ts.map +1 -0
  196. package/cjs/lib/entity/vas-job.model.js +465 -0
  197. package/cjs/lib/entity/vas-job.model.js.map +1 -0
  198. package/cjs/lib/entity/vas-job.model.spec-data.d.ts +2 -0
  199. package/cjs/lib/entity/vas-job.model.spec-data.d.ts.map +1 -0
  200. package/cjs/lib/entity/vas-job.model.spec-data.js +29 -0
  201. package/cjs/lib/entity/vas-job.model.spec-data.js.map +1 -0
  202. package/cjs/lib/entity/vas-lookup-type.dto.d.ts +7 -0
  203. package/cjs/lib/entity/vas-lookup-type.dto.d.ts.map +1 -0
  204. package/cjs/lib/entity/vas-lookup-type.dto.js +3 -0
  205. package/cjs/lib/entity/vas-lookup-type.dto.js.map +1 -0
  206. package/cjs/lib/entity/vas-lookup.dto.d.ts +16 -0
  207. package/cjs/lib/entity/vas-lookup.dto.d.ts.map +1 -0
  208. package/cjs/lib/entity/vas-lookup.dto.js +3 -0
  209. package/cjs/lib/entity/vas-lookup.dto.js.map +1 -0
  210. package/cjs/lib/entity/vas-membership.dto.d.ts +12 -0
  211. package/cjs/lib/entity/vas-membership.dto.d.ts.map +1 -0
  212. package/cjs/lib/entity/vas-membership.dto.js +3 -0
  213. package/cjs/lib/entity/vas-membership.dto.js.map +1 -0
  214. package/cjs/lib/entity/vas-membership.model.d.ts +30 -0
  215. package/cjs/lib/entity/vas-membership.model.d.ts.map +1 -0
  216. package/cjs/lib/entity/vas-membership.model.js +66 -0
  217. package/cjs/lib/entity/vas-membership.model.js.map +1 -0
  218. package/cjs/lib/entity/vas-note.dto.d.ts +7 -0
  219. package/cjs/lib/entity/vas-note.dto.d.ts.map +1 -0
  220. package/cjs/lib/entity/vas-note.dto.js +3 -0
  221. package/cjs/lib/entity/vas-note.dto.js.map +1 -0
  222. package/cjs/lib/entity/vas-note.model.d.ts +31 -0
  223. package/cjs/lib/entity/vas-note.model.d.ts.map +1 -0
  224. package/cjs/lib/entity/vas-note.model.js +54 -0
  225. package/cjs/lib/entity/vas-note.model.js.map +1 -0
  226. package/{lib → cjs/lib/entity}/vas-report-layout.dto.d.ts +1 -0
  227. package/cjs/lib/entity/vas-report-layout.dto.d.ts.map +1 -0
  228. package/cjs/lib/entity/vas-report-layout.dto.js +3 -0
  229. package/cjs/lib/entity/vas-report-layout.dto.js.map +1 -0
  230. package/cjs/lib/entity/vas-report-layout.model.d.ts +20 -0
  231. package/cjs/lib/entity/vas-report-layout.model.d.ts.map +1 -0
  232. package/cjs/lib/entity/vas-report-layout.model.js +26 -0
  233. package/cjs/lib/entity/vas-report-layout.model.js.map +1 -0
  234. package/cjs/lib/entity/vas-report-request.dto.d.ts +9 -0
  235. package/cjs/lib/entity/vas-report-request.dto.d.ts.map +1 -0
  236. package/cjs/lib/entity/vas-report-request.dto.js +3 -0
  237. package/cjs/lib/entity/vas-report-request.dto.js.map +1 -0
  238. package/cjs/lib/entity/vas-report-request.model.d.ts +23 -0
  239. package/cjs/lib/entity/vas-report-request.model.d.ts.map +1 -0
  240. package/cjs/lib/entity/vas-report-request.model.js +51 -0
  241. package/cjs/lib/entity/vas-report-request.model.js.map +1 -0
  242. package/cjs/lib/entity/vas-report.dto.d.ts +13 -0
  243. package/cjs/lib/entity/vas-report.dto.d.ts.map +1 -0
  244. package/cjs/lib/entity/vas-report.dto.js +3 -0
  245. package/cjs/lib/entity/vas-report.dto.js.map +1 -0
  246. package/cjs/lib/entity/vas-report.model.d.ts +29 -0
  247. package/cjs/lib/entity/vas-report.model.d.ts.map +1 -0
  248. package/cjs/lib/entity/vas-report.model.js +61 -0
  249. package/cjs/lib/entity/vas-report.model.js.map +1 -0
  250. package/{lib → cjs/lib/entity}/vas-restricted-account-object.dto.d.ts +1 -0
  251. package/cjs/lib/entity/vas-restricted-account-object.dto.d.ts.map +1 -0
  252. package/cjs/lib/entity/vas-restricted-account-object.dto.js +3 -0
  253. package/cjs/lib/entity/vas-restricted-account-object.dto.js.map +1 -0
  254. package/cjs/lib/entity/vas-restricted-account-object.model.d.ts +16 -0
  255. package/cjs/lib/entity/vas-restricted-account-object.model.d.ts.map +1 -0
  256. package/cjs/lib/entity/vas-restricted-account-object.model.js +22 -0
  257. package/cjs/lib/entity/vas-restricted-account-object.model.js.map +1 -0
  258. package/cjs/lib/entity/vas-task-type.dto.d.ts +7 -0
  259. package/cjs/lib/entity/vas-task-type.dto.d.ts.map +1 -0
  260. package/cjs/lib/entity/vas-task-type.dto.js +3 -0
  261. package/cjs/lib/entity/vas-task-type.dto.js.map +1 -0
  262. package/cjs/lib/entity/vas-user.dto.d.ts +9 -0
  263. package/cjs/lib/entity/vas-user.dto.d.ts.map +1 -0
  264. package/cjs/lib/entity/vas-user.dto.js +3 -0
  265. package/cjs/lib/entity/vas-user.dto.js.map +1 -0
  266. package/{lib → cjs/lib/entity}/vas-user.model.d.ts +8 -3
  267. package/cjs/lib/entity/vas-user.model.d.ts.map +1 -0
  268. package/cjs/lib/entity/vas-user.model.js +46 -0
  269. package/cjs/lib/entity/vas-user.model.js.map +1 -0
  270. package/cjs/lib/model/geo-location.d.ts +13 -0
  271. package/cjs/lib/model/geo-location.d.ts.map +1 -0
  272. package/cjs/lib/model/geo-location.js +16 -0
  273. package/cjs/lib/model/geo-location.js.map +1 -0
  274. package/cjs/lib/model/index.d.ts +3 -0
  275. package/cjs/lib/model/index.d.ts.map +1 -0
  276. package/cjs/lib/model/index.js +6 -0
  277. package/cjs/lib/model/index.js.map +1 -0
  278. package/cjs/lib/model/vas-time-range.model.d.ts +5 -0
  279. package/cjs/lib/model/vas-time-range.model.d.ts.map +1 -0
  280. package/cjs/lib/model/vas-time-range.model.js +3 -0
  281. package/cjs/lib/model/vas-time-range.model.js.map +1 -0
  282. package/{lib → cjs/lib}/utils/find-form-control.d.ts +1 -0
  283. package/cjs/lib/utils/find-form-control.d.ts.map +1 -0
  284. package/cjs/lib/utils/find-form-control.js +25 -0
  285. package/cjs/lib/utils/find-form-control.js.map +1 -0
  286. package/cjs/lib/utils/get-value-by-path.d.ts +20 -0
  287. package/cjs/lib/utils/get-value-by-path.d.ts.map +1 -0
  288. package/cjs/lib/utils/get-value-by-path.js +68 -0
  289. package/cjs/lib/utils/get-value-by-path.js.map +1 -0
  290. package/cjs/lib/utils/is-array-string.d.ts +2 -0
  291. package/cjs/lib/utils/is-array-string.d.ts.map +1 -0
  292. package/cjs/lib/utils/is-array-string.js +8 -0
  293. package/cjs/lib/utils/is-array-string.js.map +1 -0
  294. package/cjs/package.json +61 -0
  295. package/cjs/public-api.d.ts +5 -0
  296. package/cjs/public-api.d.ts.map +1 -0
  297. package/cjs/public-api.js +8 -0
  298. package/cjs/public-api.js.map +1 -0
  299. package/esm2020/ironcode-vas-lib.mjs +5 -0
  300. package/esm2020/lib/control-value/index.mjs +2 -0
  301. package/esm2020/lib/control-value/vas-camera-control-value.model.mjs +8 -0
  302. package/esm2020/lib/controls-config/index.mjs +4 -0
  303. package/esm2020/lib/controls-config/vas-control-config-direction.enum.mjs +8 -0
  304. package/esm2020/lib/controls-config/vas-control-config.model.mjs +2 -0
  305. package/esm2020/lib/controls-config/vas-select-control-config.model.mjs +2 -0
  306. package/esm2020/lib/entity/index.mjs +60 -0
  307. package/esm2020/lib/entity/vas-access-group.dto.mjs +2 -0
  308. package/esm2020/lib/entity/vas-account-config.dto.mjs +2 -0
  309. package/esm2020/lib/entity/vas-account-object.dto.mjs +2 -0
  310. package/esm2020/lib/entity/vas-account-object.model.mjs +24 -0
  311. package/esm2020/lib/entity/vas-account.dto.mjs +7 -0
  312. package/esm2020/lib/entity/vas-base.dto.mjs +2 -0
  313. package/esm2020/lib/entity/vas-base.model.mjs +17 -0
  314. package/esm2020/lib/entity/vas-branch.dto.mjs +2 -0
  315. package/esm2020/lib/entity/vas-branch.model.mjs +68 -0
  316. package/esm2020/lib/entity/vas-contact-type.dto.mjs +2 -0
  317. package/esm2020/lib/entity/vas-contact.dto.mjs +2 -0
  318. package/esm2020/lib/entity/vas-contact.model.mjs +84 -0
  319. package/esm2020/lib/entity/vas-control-type.dto.mjs +2 -0
  320. package/esm2020/lib/entity/vas-control-type.model.mjs +53 -0
  321. package/esm2020/lib/entity/vas-control.dto.mjs +2 -0
  322. package/esm2020/lib/entity/vas-control.model.mjs +163 -0
  323. package/esm2020/lib/entity/vas-field.dto.mjs +2 -0
  324. package/esm2020/lib/entity/vas-field.model.mjs +92 -0
  325. package/esm2020/lib/entity/vas-file.dto.mjs +9 -0
  326. package/esm2020/lib/entity/vas-file.model.mjs +126 -0
  327. package/esm2020/lib/entity/vas-fire-user.dto.mjs +2 -0
  328. package/esm2020/lib/entity/vas-fire-user.model.mjs +102 -0
  329. package/esm2020/lib/entity/vas-form-config.dto.mjs +2 -0
  330. package/esm2020/lib/entity/vas-form.dto.mjs +2 -0
  331. package/esm2020/lib/entity/vas-form.model.mjs +185 -0
  332. package/esm2020/lib/entity/vas-group.dto.mjs +2 -0
  333. package/esm2020/lib/entity/vas-group.model.mjs +89 -0
  334. package/esm2020/lib/entity/vas-instruction-job-field.dto.mjs +2 -0
  335. package/esm2020/lib/entity/vas-instruction-job-field.model.mjs +48 -0
  336. package/esm2020/lib/entity/vas-instruction-job.dto.mjs +2 -0
  337. package/esm2020/lib/entity/vas-instruction-job.model.mjs +81 -0
  338. package/esm2020/lib/entity/vas-instruction-provider.dto.mjs +2 -0
  339. package/esm2020/lib/entity/vas-instruction-provider.model.mjs +63 -0
  340. package/esm2020/lib/entity/vas-instruction.dto.mjs +2 -0
  341. package/esm2020/lib/entity/vas-instruction.model.mjs +52 -0
  342. package/esm2020/lib/entity/vas-invitation.mjs +88 -0
  343. package/esm2020/lib/entity/vas-job-data.dto.mjs +2 -0
  344. package/esm2020/lib/entity/vas-job-data.model.mjs +21 -0
  345. package/esm2020/lib/entity/vas-job-status.dto.mjs +2 -0
  346. package/esm2020/lib/entity/vas-job-type.dto.mjs +2 -0
  347. package/esm2020/lib/entity/vas-job.dto.mjs +2 -0
  348. package/esm2020/lib/entity/vas-job.model.mjs +471 -0
  349. package/esm2020/lib/entity/vas-lookup-type.dto.mjs +2 -0
  350. package/esm2020/lib/entity/vas-lookup.dto.mjs +2 -0
  351. package/esm2020/lib/entity/vas-membership.dto.mjs +2 -0
  352. package/esm2020/lib/entity/vas-membership.model.mjs +62 -0
  353. package/esm2020/lib/entity/vas-note.dto.mjs +2 -0
  354. package/esm2020/lib/entity/vas-note.model.mjs +50 -0
  355. package/esm2020/lib/entity/vas-report-layout.dto.mjs +2 -0
  356. package/esm2020/lib/entity/vas-report-layout.model.mjs +22 -0
  357. package/esm2020/lib/entity/vas-report-request.dto.mjs +2 -0
  358. package/esm2020/lib/entity/vas-report-request.model.mjs +46 -0
  359. package/esm2020/lib/entity/vas-report.dto.mjs +2 -0
  360. package/esm2020/lib/entity/vas-report.model.mjs +57 -0
  361. package/esm2020/lib/entity/vas-restricted-account-object.dto.mjs +2 -0
  362. package/esm2020/lib/entity/vas-restricted-account-object.model.mjs +18 -0
  363. package/esm2020/lib/entity/vas-task-type.dto.mjs +2 -0
  364. package/esm2020/lib/entity/vas-user.dto.mjs +2 -0
  365. package/esm2020/lib/entity/vas-user.model.mjs +42 -0
  366. package/esm2020/lib/model/geo-location.mjs +12 -0
  367. package/esm2020/lib/model/index.mjs +3 -0
  368. package/esm2020/lib/model/vas-time-range.model.mjs +2 -0
  369. package/esm2020/lib/utils/get-value-by-path.mjs +64 -0
  370. package/esm2020/lib/utils/is-array-string.mjs +4 -0
  371. package/esm2020/public-api.mjs +5 -0
  372. package/fesm2015/ironcode-vas-lib.mjs +2142 -0
  373. package/fesm2015/ironcode-vas-lib.mjs.map +1 -0
  374. package/fesm2020/ironcode-vas-lib.mjs +2194 -0
  375. package/fesm2020/ironcode-vas-lib.mjs.map +1 -0
  376. package/index.d.ts +5 -0
  377. package/lib/control-value/index.d.ts +1 -0
  378. package/lib/control-value/vas-camera-control-value.model.d.ts +7 -0
  379. package/lib/controls-config/index.d.ts +3 -0
  380. package/lib/controls-config/vas-control-config-direction.enum.d.ts +4 -0
  381. package/lib/controls-config/vas-control-config.model.d.ts +7 -0
  382. package/lib/controls-config/vas-select-control-config.model.d.ts +9 -0
  383. package/lib/entity/index.d.ts +59 -0
  384. package/lib/entity/vas-access-group.dto.d.ts +6 -0
  385. package/lib/entity/vas-account-config.dto.d.ts +7 -0
  386. package/lib/entity/vas-account-object.model.d.ts +15 -0
  387. package/lib/entity/vas-account.dto.d.ts +54 -0
  388. package/lib/entity/vas-base.dto.d.ts +2 -0
  389. package/lib/entity/vas-base.model.d.ts +3 -10
  390. package/lib/entity/vas-branch.dto.d.ts +21 -0
  391. package/lib/entity/vas-branch.model.d.ts +36 -0
  392. package/lib/entity/vas-contact-type.dto.d.ts +7 -0
  393. package/lib/entity/vas-contact.dto.d.ts +16 -0
  394. package/lib/entity/vas-contact.model.d.ts +32 -0
  395. package/lib/entity/vas-control-type.model.d.ts +5 -9
  396. package/lib/entity/vas-control.dto.d.ts +4 -1
  397. package/lib/entity/vas-control.model.d.ts +18 -32
  398. package/lib/entity/vas-field.dto.d.ts +4 -2
  399. package/lib/entity/vas-field.model.d.ts +45 -0
  400. package/lib/entity/vas-file.dto.d.ts +16 -7
  401. package/lib/entity/vas-file.model.d.ts +42 -0
  402. package/lib/entity/vas-fire-user.dto.d.ts +15 -0
  403. package/lib/entity/vas-fire-user.model.d.ts +55 -0
  404. package/lib/entity/vas-form-config.dto.d.ts +8 -0
  405. package/lib/entity/vas-form.dto.d.ts +6 -0
  406. package/lib/entity/vas-form.model.d.ts +27 -19
  407. package/lib/entity/vas-group.dto.d.ts +1 -1
  408. package/lib/entity/vas-group.model.d.ts +4 -23
  409. package/lib/entity/vas-instruction-job-field.dto.d.ts +8 -0
  410. package/lib/entity/vas-instruction-job-field.model.d.ts +25 -0
  411. package/lib/entity/vas-instruction-job.dto.d.ts +15 -0
  412. package/lib/entity/vas-instruction-job.model.d.ts +57 -0
  413. package/lib/entity/vas-instruction-provider.dto.d.ts +8 -0
  414. package/lib/entity/vas-instruction-provider.model.d.ts +33 -0
  415. package/lib/entity/vas-instruction.dto.d.ts +7 -0
  416. package/lib/entity/vas-instruction.model.d.ts +31 -0
  417. package/lib/entity/vas-invitation.d.ts +52 -0
  418. package/lib/entity/vas-job-data.model.d.ts +18 -0
  419. package/lib/entity/vas-job-status.dto.d.ts +7 -0
  420. package/lib/entity/vas-job-type.dto.d.ts +7 -0
  421. package/lib/entity/vas-job.dto.d.ts +13 -2
  422. package/lib/entity/vas-job.model.d.ts +169 -40
  423. package/lib/entity/vas-lookup-type.dto.d.ts +6 -0
  424. package/lib/entity/vas-lookup.dto.d.ts +15 -0
  425. package/lib/entity/vas-membership.dto.d.ts +11 -0
  426. package/lib/entity/vas-membership.model.d.ts +29 -0
  427. package/lib/entity/vas-note.dto.d.ts +6 -0
  428. package/lib/entity/vas-note.model.d.ts +30 -0
  429. package/lib/entity/vas-report-layout.model.d.ts +19 -0
  430. package/lib/entity/vas-report-request.dto.d.ts +8 -0
  431. package/lib/entity/vas-report-request.model.d.ts +22 -0
  432. package/lib/entity/vas-report.dto.d.ts +12 -0
  433. package/lib/entity/vas-report.model.d.ts +28 -0
  434. package/lib/entity/vas-restricted-account-object.model.d.ts +15 -0
  435. package/lib/entity/vas-task-type.dto.d.ts +6 -0
  436. package/lib/entity/vas-user.dto.d.ts +4 -1
  437. package/lib/entity/vas-user.model.d.ts +7 -3
  438. package/lib/model/geo-location.d.ts +12 -0
  439. package/lib/model/index.d.ts +2 -0
  440. package/lib/model/vas-time-range.model.d.ts +4 -0
  441. package/lib/utils/get-value-by-path.d.ts +19 -0
  442. package/lib/utils/is-array-string.d.ts +1 -0
  443. package/package.json +25 -26
  444. package/public-api.d.ts +4 -0
  445. package/lib/entity/report-request.model.d.ts +0 -8
  446. package/lib/entity/report-request.model.js +0 -2
  447. package/lib/entity/report-request.model.js.map +0 -1
  448. package/lib/entity/vas-account-object.dto.js +0 -2
  449. package/lib/entity/vas-account-object.dto.js.map +0 -1
  450. package/lib/entity/vas-base.dto.js +0 -2
  451. package/lib/entity/vas-base.dto.js.map +0 -1
  452. package/lib/entity/vas-base.model.js +0 -24
  453. package/lib/entity/vas-base.model.js.map +0 -1
  454. package/lib/entity/vas-control-type.dto.js +0 -2
  455. package/lib/entity/vas-control-type.dto.js.map +0 -1
  456. package/lib/entity/vas-control-type.model.js +0 -53
  457. package/lib/entity/vas-control-type.model.js.map +0 -1
  458. package/lib/entity/vas-control.dto.js +0 -2
  459. package/lib/entity/vas-control.dto.js.map +0 -1
  460. package/lib/entity/vas-control.model.js +0 -132
  461. package/lib/entity/vas-control.model.js.map +0 -1
  462. package/lib/entity/vas-field.dto.js +0 -2
  463. package/lib/entity/vas-field.dto.js.map +0 -1
  464. package/lib/entity/vas-file.dto.js +0 -2
  465. package/lib/entity/vas-file.dto.js.map +0 -1
  466. package/lib/entity/vas-form.dto.js +0 -2
  467. package/lib/entity/vas-form.dto.js.map +0 -1
  468. package/lib/entity/vas-form.model.js +0 -144
  469. package/lib/entity/vas-form.model.js.map +0 -1
  470. package/lib/entity/vas-group.dto.js +0 -2
  471. package/lib/entity/vas-group.dto.js.map +0 -1
  472. package/lib/entity/vas-group.model.js.map +0 -1
  473. package/lib/entity/vas-job-data.dto.js +0 -2
  474. package/lib/entity/vas-job-data.dto.js.map +0 -1
  475. package/lib/entity/vas-job.dto.js +0 -2
  476. package/lib/entity/vas-job.dto.js.map +0 -1
  477. package/lib/entity/vas-job.model.js +0 -170
  478. package/lib/entity/vas-job.model.js.map +0 -1
  479. package/lib/entity/vas-report-layout.dto.js +0 -2
  480. package/lib/entity/vas-report-layout.dto.js.map +0 -1
  481. package/lib/entity/vas-restricted-account-object.dto.js +0 -2
  482. package/lib/entity/vas-restricted-account-object.dto.js.map +0 -1
  483. package/lib/entity/vas-user.dto.js +0 -2
  484. package/lib/entity/vas-user.dto.js.map +0 -1
  485. package/lib/entity/vas-user.model.js +0 -46
  486. package/lib/entity/vas-user.model.js.map +0 -1
  487. package/lib/ng-models/ng-control.model.d.ts +0 -14
  488. package/lib/ng-models/ng-control.model.js +0 -14
  489. package/lib/ng-models/ng-control.model.js.map +0 -1
  490. package/lib/ng-models/ng-form.model.d.ts +0 -27
  491. package/lib/ng-models/ng-form.model.js +0 -54
  492. package/lib/ng-models/ng-form.model.js.map +0 -1
  493. package/lib/ng-models/ng-group.model.d.ts +0 -36
  494. package/lib/ng-models/ng-group.model.js +0 -59
  495. package/lib/ng-models/ng-group.model.js.map +0 -1
  496. package/lib/report-request.model.d.ts +0 -8
  497. package/lib/report-request.model.js +0 -2
  498. package/lib/report-request.model.js.map +0 -1
  499. package/lib/utils/find-form-control.js +0 -20
  500. package/lib/utils/find-form-control.js.map +0 -1
  501. package/lib/vas-account-object.dto.js +0 -2
  502. package/lib/vas-account-object.dto.js.map +0 -1
  503. package/lib/vas-base.dto.js +0 -2
  504. package/lib/vas-base.dto.js.map +0 -1
  505. package/lib/vas-base.model.js +0 -24
  506. package/lib/vas-base.model.js.map +0 -1
  507. package/lib/vas-control-type.dto.js +0 -2
  508. package/lib/vas-control-type.dto.js.map +0 -1
  509. package/lib/vas-control-type.model.js +0 -53
  510. package/lib/vas-control-type.model.js.map +0 -1
  511. package/lib/vas-control.dto.js +0 -2
  512. package/lib/vas-control.dto.js.map +0 -1
  513. package/lib/vas-control.model.js +0 -132
  514. package/lib/vas-control.model.js.map +0 -1
  515. package/lib/vas-field.dto.d.ts +0 -8
  516. package/lib/vas-field.dto.js +0 -2
  517. package/lib/vas-field.dto.js.map +0 -1
  518. package/lib/vas-file.dto.d.ts +0 -13
  519. package/lib/vas-file.dto.js +0 -2
  520. package/lib/vas-file.dto.js.map +0 -1
  521. package/lib/vas-form.dto.js +0 -2
  522. package/lib/vas-form.dto.js.map +0 -1
  523. package/lib/vas-form.model.js +0 -144
  524. package/lib/vas-form.model.js.map +0 -1
  525. package/lib/vas-group.dto.js +0 -2
  526. package/lib/vas-group.dto.js.map +0 -1
  527. package/lib/vas-group.model.js +0 -105
  528. package/lib/vas-group.model.js.map +0 -1
  529. package/lib/vas-job-data.dto.js +0 -2
  530. package/lib/vas-job-data.dto.js.map +0 -1
  531. package/lib/vas-job.dto.d.ts +0 -11
  532. package/lib/vas-job.dto.js +0 -2
  533. package/lib/vas-job.dto.js.map +0 -1
  534. package/lib/vas-job.model.d.ts +0 -102
  535. package/lib/vas-job.model.js +0 -170
  536. package/lib/vas-job.model.js.map +0 -1
  537. package/lib/vas-job.model.spec.d.ts +0 -1
  538. package/lib/vas-job.model.spec.js +0 -18
  539. package/lib/vas-report-layout.dto.js +0 -2
  540. package/lib/vas-report-layout.dto.js.map +0 -1
  541. package/lib/vas-restricted-account-object.dto.js +0 -2
  542. package/lib/vas-restricted-account-object.dto.js.map +0 -1
  543. package/lib/vas-user.dto.d.ts +0 -5
  544. package/lib/vas-user.dto.js +0 -2
  545. package/lib/vas-user.dto.js.map +0 -1
  546. package/lib/vas-user.model.js +0 -46
  547. package/lib/vas-user.model.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,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AAC,GAAG,WAAW;IAuC3D;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAYpE;;;;;;OAMG;IACH,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAa9C;;;;;;OAMG;IACH,oBAAoB,CAClB,SAAS,EAAE,YAAY,GACtB;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IA6CrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+EG;IACH,aAAa,CACX,SAAS,EAAE,YAAY,EACvB,iBAAiB,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAA6B,EAClE,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAC3B,IAAI;IAkCP;;;OAGG;IACH,cAAc,CAAC,CAAC,SAAS,gBAAgB,EACvC,IAAI,GAAE,MAAM,EAAO,GAClB,CAAC,GAAG,SAAS;IAIhB;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,IAAI;IAyBlE;;;;OAIG;IACI,KAAK,CAAC,UAAU,UAAQ,GAAG,SAAS;IAyC3C;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,WAAW,CACT,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,kBAER,GACA,MAAM;IAuET;;OAEG;IACM,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAc/D"}
@@ -0,0 +1,465 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VasJobModel = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const vas_file_dto_1 = require("./vas-file.dto");
6
+ const angular2_uuid_1 = require("angular2-uuid");
7
+ const moment_1 = tslib_1.__importDefault(require("moment"));
8
+ const get_value_by_path_1 = require("../utils/get-value-by-path");
9
+ const vas_field_model_1 = require("./vas-field.model");
10
+ const vas_restricted_account_object_model_1 = require("./vas-restricted-account-object.model");
11
+ const geo_location_1 = require("../model/geo-location");
12
+ const vas_camera_control_value_model_1 = require("../control-value/vas-camera-control-value.model");
13
+ const is_array_string_1 = require("../utils/is-array-string");
14
+ /**
15
+ * JobModel
16
+ */
17
+ class VasJobModel extends vas_restricted_account_object_model_1.VasRestrictedAccountObjectModel {
18
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, reference, jobDate, jobStatus, jobType, assigneeId, formId, timeZoneOffset, pendingFields, childModified, version, fields, files, createdByDisplayName, modifiedByDisplayName, geoLocation) {
19
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
20
+ this.id = id;
21
+ this.created = created;
22
+ this.serverCreated = serverCreated;
23
+ this.createdBy = createdBy;
24
+ this.modified = modified;
25
+ this.serverModified = serverModified;
26
+ this.modifiedBy = modifiedBy;
27
+ this.createdByName = createdByName;
28
+ this.modifiedByName = modifiedByName;
29
+ this.account = account;
30
+ this.accessGroup = accessGroup;
31
+ this.reference = reference;
32
+ this.jobDate = jobDate;
33
+ this.jobStatus = jobStatus;
34
+ this.jobType = jobType;
35
+ this.assigneeId = assigneeId;
36
+ this.formId = formId;
37
+ this.timeZoneOffset = timeZoneOffset;
38
+ this.pendingFields = pendingFields;
39
+ this.childModified = childModified;
40
+ this.version = version;
41
+ this.fields = fields;
42
+ this.files = files;
43
+ this.createdByDisplayName = createdByDisplayName;
44
+ this.modifiedByDisplayName = modifiedByDisplayName;
45
+ this.geoLocation = geoLocation;
46
+ }
47
+ /**
48
+ * Returns this with the dynamic interface
49
+ * @return {VasJobModelDynamicInterface}
50
+ */
51
+ get $this() {
52
+ return this;
53
+ }
54
+ /**
55
+ * Returns a list of Job dynamic properties i.e. those that are added by the
56
+ * dynamic forms
57
+ */
58
+ get dynamicProperties() {
59
+ const nativeProps = this.staticProperties;
60
+ return Object
61
+ .getOwnPropertyNames(this)
62
+ .filter(prop => !nativeProps.includes(prop));
63
+ }
64
+ /**
65
+ * Returns a list of Job static properties i.e. those that are declared by
66
+ * the type
67
+ */
68
+ get staticProperties() {
69
+ return Object.getOwnPropertyNames(VasJobModel.empty());
70
+ }
71
+ /**
72
+ * @return {VasJobModel}
73
+ */
74
+ static empty() {
75
+ return new VasJobModel('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', (0, moment_1.default)().utcOffset(), 0, '', 0, [], [], '', '', (0, geo_location_1.getEmptyGeoLocation)());
76
+ }
77
+ static fromDto(dto) {
78
+ const model = new VasJobModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', dto.reference || '', dto.jobDate || '', dto.jobStatus || '', dto.jobType || '', dto.assigneeId || '', dto.formId || '', dto.timeZoneOffset || (0, moment_1.default)().utcOffset(), dto.pendingFields || 0, dto.childModified || '', dto.version || 0, dto.fields || [], dto.files || [], dto.createdByDisplayName || '', dto.modifiedByDisplayName || '', dto.geoLocation || (0, geo_location_1.getEmptyGeoLocation)());
79
+ const emptyKeys = model.staticProperties;
80
+ Object
81
+ .keys(dto)
82
+ .filter(key => emptyKeys.indexOf(key) === -1)
83
+ .forEach((key) => model.$this[key] = dto[key]);
84
+ return model;
85
+ }
86
+ /**
87
+ * @param {VasFormModel} formModel
88
+ * @return {Record<string, VasFieldDtoValue>}
89
+ */
90
+ getFields(formModel) {
91
+ const fields = {};
92
+ formModel.groups
93
+ .forEach(group => {
94
+ group.controls.forEach(control => {
95
+ (fields)[control.reportTemplateName] =
96
+ this.getValueByPath([group.name, control.name]);
97
+ });
98
+ });
99
+ return fields;
100
+ }
101
+ /**
102
+ * Will return an object whose keys are the names of all fields in the job.
103
+ * This method is similar to `getFields` except that this method will only
104
+ * return values where a value was set, as opposed to `getFields` which
105
+ * return a property regardless (because it uses the form to drive the logic)
106
+ * @return {Record<string, VasFieldDtoValue>}
107
+ */
108
+ getFields2() {
109
+ let fields = {};
110
+ this.dynamicProperties
111
+ .forEach((groupName) => {
112
+ Object
113
+ .keys(this.$this[groupName])
114
+ .forEach(controlName => {
115
+ fields[controlName] = this.getValueByPath([groupName, controlName]);
116
+ });
117
+ }, {});
118
+ return fields;
119
+ }
120
+ /**
121
+ * Returns an object describing how many attachments were added to this job
122
+ * (camera controls and files), and how many have not been uploaded yet.
123
+ *
124
+ * @param formModel instance of {@link VasFormModel} that was used when the
125
+ * job was created
126
+ */
127
+ getFilesUploadStatus(formModel) {
128
+ const pathsWithValue = formModel
129
+ .getCameraControlPaths()
130
+ .map(path => {
131
+ const value = this.getValueByPath(path);
132
+ if (value && !!value.id) {
133
+ return path;
134
+ }
135
+ return null;
136
+ })
137
+ .filter(path => path !== null ? path : null)
138
+ .filter(is_array_string_1.isArrayString);
139
+ let total = pathsWithValue.length;
140
+ total += this.files.length;
141
+ // calculate the number of camera images still to upload
142
+ let pending = pathsWithValue
143
+ .map(path => this.getValueByPath(path))
144
+ .map((value) => {
145
+ if ((0, vas_file_dto_1.isFileDto)(value)) {
146
+ return value.id && value.status !== 'COMPLETE';
147
+ }
148
+ else if ((0, vas_camera_control_value_model_1.isCameraControlValueV1)(value)) {
149
+ // if url is not set, it hasn't been uploaded
150
+ return value.id && !value.url;
151
+ }
152
+ return false;
153
+ })
154
+ .filter(hasUploaded => hasUploaded)
155
+ .length;
156
+ // add total from files that are pending
157
+ pending += this.files
158
+ .filter(value => value.status !== 'COMPLETED')
159
+ .length;
160
+ return {
161
+ pending,
162
+ total
163
+ };
164
+ }
165
+ /**
166
+ * This method will hydrate the `fields` property of the model. The reason for
167
+ * this is that we have different ways to store the field data. One way, is
168
+ * we store them as dynamic properties of the job. For example job.foo.bar,
169
+ * where `foo` is the name of a Group, and `bar` is the name of a control.
170
+ * Thus, when we create a job using a form in the client, the job object will
171
+ * have its static properties (id, account, reference etc), and also a number
172
+ * of dynamic properties determined by the Groups and Controls. This kind of
173
+ * object is nice to work with in certain circumstances. However, the api
174
+ * works differently. In the API a Job is a record, and references a number of
175
+ * Field records. Each Field stores the value. Comparing these two models we
176
+ * have:
177
+ * A) job with dynamic properties, e.g.
178
+ * {
179
+ * id: <guid>,
180
+ * reference: "something"
181
+ * <other static job properties>...
182
+ * foo: {
183
+ * bar: "value"
184
+ * }
185
+ * }
186
+ *
187
+ * B) job with fields
188
+ * {
189
+ * id: <guid>,
190
+ * reference: "something"
191
+ * <other static job properties>...
192
+ * <will not have dynamic properties>...
193
+ * fields: [
194
+ * {
195
+ * id: <guid>,
196
+ * <other field properties>,
197
+ * value: "value"
198
+ * }
199
+ * ]
200
+ * }
201
+ *
202
+ * So, what this method does is given a JobModel in the form of A, read all
203
+ * of those dynamic properties and set them into `fields`. Doing this requires
204
+ * knowledge of the Form that was used to create the job. Moreover, since the
205
+ * dynamic properties do not contain the ids of the fields, we also allow to
206
+ * pass in a `controlFieldIdMap`. This map stores the mapping between Control
207
+ * and the Field that was created in the Job to store the value for that
208
+ * Control. This is useful, if for example you want to compare a Job in form A
209
+ * with a Job in form B, for example if you want to update the Job on the API
210
+ * with a Job that was saved by a client in form A.
211
+ *
212
+ * E.g.
213
+ * Client -> API: client requests form
214
+ * User -> Client: user fills in the form and submits
215
+ * Client -> Firestore: client saves the Job in form A i.e. dynamic props
216
+ * Firestore -> Function: A function is triggered to sync the job to the API
217
+ * Function -> API: Function checks if job already exists, it receives 404
218
+ * Function -> Function: The function calls `hydrateFields(...)`
219
+ * Function -> API: The function POST the Job to /jobs
220
+ * Function -> API: The function POST each field to /fields
221
+ *
222
+ * Similarly, if the user updates the job
223
+ * Client -> API: client requests form
224
+ * User -> Client: user fills in the form and submits an update
225
+ * Client -> Firestore: client saves the Job in form A i.e. dynamic props
226
+ * Firestore -> Function: A function is triggered to sync the job to the API
227
+ * Function -> API: Function checks if job already exists, it receives 200
228
+ * Function -> Function: The function calls `hydrateFields(...)` passing in
229
+ * the map is made by iterating over the fields it
230
+ * received from the API and storing the mappings
231
+ * between controlId and fieldId for each field
232
+ * Function -> API: The function PATCH the Job to /jobs
233
+ * Function -> API: The function POST/PATCH each field to /fields
234
+ * treated as new
235
+ *
236
+ * @param {VasFormModel} formModel the VasFormModel that was used to create
237
+ * the job
238
+ * @param {Map<string, string>} controlFieldIdMap a mapping of control to
239
+ * field ids. This is used to determine whether a new id for the field should
240
+ * be generated, or to reuse an existing one from the map.
241
+ * @param {Array<string>} controlNames if a value is provided, it will be used
242
+ * to filter the fields that are returned.
243
+ * @return {Array<VasFieldDto>}
244
+ */
245
+ hydrateFields(formModel, controlFieldIdMap = new Map(), controlNames) {
246
+ const fields = [];
247
+ formModel.groups
248
+ .forEach(group => {
249
+ group.controls.forEach(control => {
250
+ if (!control.name.startsWith('fields.')) {
251
+ return;
252
+ }
253
+ if (controlNames && !controlNames.includes(control.name)) {
254
+ return;
255
+ }
256
+ fields.push(vas_field_model_1.VasFieldModel.fromDto({
257
+ // if the controlId exists in the map, use the associated fieldId,
258
+ // otherwise generate a new id for the field.
259
+ id: controlFieldIdMap.get(control.id) || angular2_uuid_1.UUID.UUID(),
260
+ account: this.account,
261
+ job: this.id,
262
+ createdBy: this.createdBy,
263
+ created: this.created,
264
+ modifiedBy: this.modifiedBy,
265
+ modified: this.modified,
266
+ control: control.id,
267
+ value: this.getValueByPath([group.name, control.name])
268
+ }));
269
+ });
270
+ });
271
+ this.fields = fields;
272
+ }
273
+ /**
274
+ * @param {string[]} path path segments
275
+ * @return {void}
276
+ */
277
+ getValueByPath(path = []) {
278
+ return (0, get_value_by_path_1.getValueByPath)(path, this.$this);
279
+ }
280
+ /**
281
+ * A very non sophisticated way to set values in the job via paths
282
+ *
283
+ * For example:
284
+ *
285
+ * setValueByPath('value', ['foo', 'bar']);
286
+ *
287
+ * will make results in job
288
+ * {
289
+ * foo: {
290
+ * bar: 'value'
291
+ * }
292
+ * }
293
+ *
294
+ * @param {any} value the value to set
295
+ * @param {string[]} path path segments
296
+ */
297
+ setValueByPath(value, path = []) {
298
+ switch (path.length) {
299
+ case 0: {
300
+ return;
301
+ }
302
+ case 1: {
303
+ this[path[0]] = value;
304
+ return;
305
+ }
306
+ case 2: {
307
+ // eslint-disable-next-line max-len
308
+ this.$this[path[0]][path[1]] = value;
309
+ return;
310
+ }
311
+ case 3: {
312
+ // eslint-disable-next-line max-len
313
+ this.$this[path[0]][path[1]][path[2]] = value;
314
+ return;
315
+ }
316
+ default: {
317
+ throw Error('path has too many segments');
318
+ }
319
+ }
320
+ }
321
+ /**
322
+ * @param {boolean} staticOnly if true, will only output values for the static
323
+ * properties in the dto
324
+ * @return {VasJobDto}
325
+ */
326
+ toDto(staticOnly = false) {
327
+ if (staticOnly) {
328
+ return {
329
+ id: this.id,
330
+ created: this.created,
331
+ createdBy: this.createdBy,
332
+ modified: this.modified,
333
+ modifiedBy: this.modifiedBy,
334
+ serverCreated: this.serverCreated,
335
+ serverModified: this.serverModified,
336
+ createdByName: this.createdByName,
337
+ modifiedByName: this.modifiedByName,
338
+ account: this.account,
339
+ accessGroup: this.accessGroup,
340
+ reference: this.reference,
341
+ jobDate: this.jobDate,
342
+ jobStatus: this.jobStatus,
343
+ jobType: this.jobType,
344
+ assigneeId: this.assigneeId,
345
+ formId: this.formId,
346
+ timeZoneOffset: this.timeZoneOffset,
347
+ pendingFields: this.pendingFields,
348
+ childModified: this.childModified,
349
+ version: this.version,
350
+ fields: this.fields,
351
+ files: this.files,
352
+ createdByDisplayName: this.createdByDisplayName,
353
+ modifiedByDisplayName: this.modifiedByDisplayName,
354
+ geoLocation: this.geoLocation
355
+ };
356
+ }
357
+ const dto = {};
358
+ [...this.staticProperties, ...this.dynamicProperties]
359
+ .forEach(prop => (dto)[prop] = this.$this[prop]);
360
+ return dto;
361
+ }
362
+ /**
363
+ * This method will parse a syntax that allows us to build strings from the
364
+ * values of from the job model. For example if the job model was:
365
+ *
366
+ * {
367
+ * foo: 'bar'
368
+ * }
369
+ *
370
+ * and we pass "i am foo {foo}", the result would be:
371
+ *
372
+ * "i am foo bar"
373
+ *
374
+ * we can also use moment to parse dates, for example if the job model was:
375
+ *
376
+ * {
377
+ * created: "2022-01-01T00:00:00+0000"
378
+ * }
379
+ *
380
+ * and we pass "{created|date:YY-MM-DD}", the result would be:
381
+ *
382
+ * "2022-01-01"
383
+ *
384
+ * @param {string} value a string with the syntax
385
+ * @param {ParseSyntaxOptions} options
386
+ * @return {string} the results of parsing the syntax on this job
387
+ */
388
+ parseSyntax(value, options = {
389
+ timeZoneOffset: 0
390
+ }) {
391
+ if (!value || typeof value !== 'string') {
392
+ return '';
393
+ }
394
+ return value.replace(/({[^}]*})/g, (match, token) => {
395
+ const syntax = token.substring(1, token.length - 1);
396
+ let [key, filter] = syntax.split('|');
397
+ key = (key || '').trim();
398
+ filter = (filter || '').trim();
399
+ let filterName, filterArg = '';
400
+ if (filter) {
401
+ const splitIndex = filter.indexOf(':');
402
+ if (splitIndex !== -1) {
403
+ filterName = filter.substring(0, splitIndex);
404
+ filterArg = filter.substring(splitIndex + 1);
405
+ }
406
+ else {
407
+ filterName = filter;
408
+ filterArg = '';
409
+ }
410
+ filterName = (filterName || '').trim();
411
+ filterArg = (filterArg || '').trim();
412
+ }
413
+ const path = key.split('.');
414
+ const objectKey = path.shift() || '';
415
+ let result = '';
416
+ if (objectKey === 'job') {
417
+ result = (this.getValueByPath(path) || '').toString();
418
+ }
419
+ else if (objectKey === 'fields') {
420
+ result = ((0, get_value_by_path_1.getValueByPath)(path, this.getFields2()) || '').toString();
421
+ }
422
+ else if (objectKey.length) {
423
+ if (options.objects) {
424
+ if (options.objects[objectKey] === undefined) {
425
+ console.debug(`objectKey ${objectKey} is not present in options.object`);
426
+ result = '';
427
+ }
428
+ else {
429
+ result = ((0, get_value_by_path_1.getValueByPath)(path, options.objects[objectKey]) || '')
430
+ .toString();
431
+ }
432
+ }
433
+ else {
434
+ console.debug(`objectKey ${objectKey} was used but options.object is not set`);
435
+ return '';
436
+ }
437
+ }
438
+ else {
439
+ return '';
440
+ }
441
+ if (filterName && result) {
442
+ switch (filterName) {
443
+ case 'date': {
444
+ return (0, moment_1.default)(result)
445
+ .utcOffset(options.timeZoneOffset)
446
+ .format(filterArg || '');
447
+ }
448
+ default: {
449
+ console.warn('unknown filter %s', filterName);
450
+ }
451
+ }
452
+ }
453
+ return result;
454
+ }).trim();
455
+ }
456
+ ;
457
+ /**
458
+ * @return {object}
459
+ */
460
+ toApiDto() {
461
+ return Object.assign(Object.assign({}, super.toApiDto()), { reference: this.reference || '~', jobDate: this.jobDate || '~', jobType: this.jobType || '~', accessGroup: this.accessGroup || '~', jobStatus: this.jobStatus || '~', assigneeId: this.assigneeId || '~', timeZoneOffset: this.timeZoneOffset || 0, pendingFields: this.pendingFields || 0, lastForm: this.formId || '~' });
462
+ }
463
+ }
464
+ exports.VasJobModel = VasJobModel;
465
+ //# sourceMappingURL=vas-job.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vas-job.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.ts"],"names":[],"mappings":";;;;AAAA,iDAAuD;AACvD,iDAAqC;AACrC,4DAA4B;AAC5B,kEAA4D;AAG5D,uDAAkD;AAGlD,+FAAwF;AACxF,wDAAyE;AACzE,oGAAqH;AACrH,8DAAyD;AAoBzD;;GAEG;AACH,MAAa,WAAY,SAAQ,qEAA+B;IAE9D,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EACtB,OAAe,EACf,WAAmB,EAC5B,SAAiB,EACjB,OAAe,EACf,SAAiB,EACjB,OAAe,EACf,UAAkB,EAClB,MAAc,EACd,cAAsB,EACtB,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import moment from 'moment';\nimport { getValueByPath } from '../utils/get-value-by-path';\nimport { VasBaseDto } from './vas-base.dto';\nimport { VasFieldDto, VasFieldDtoValue } from './vas-field.dto';\nimport { VasFieldModel } from './vas-field.model';\nimport { VasFormModel } from './vas-form.model';\nimport { VasJobDto } from './vas-job.dto';\nimport { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';\nimport { GeoLocation, getEmptyGeoLocation } from '../model/geo-location';\nimport { isCameraControlValueV1, VasCameraControlValueModel } from '../control-value/vas-camera-control-value.model';\nimport { isArrayString } from '../utils/is-array-string';\n\nexport declare interface VasJobModelDynamicInterface {\n [s: string]: string | number | Record<string, VasFieldDtoValue>;\n}\n\nexport interface ParseSyntaxOptions {\n // This value will be used to adjust any datetime values that are referenced\n // in the syntax string. See\n // https://momentjscom.readthedocs.io/en/latest/moment/03-manipulating/09-utc-offset/\n // for more information about how `moment` will handle the value.\n timeZoneOffset: number,\n // this dictionary can be passed in to contain other objects to be referenced\n // in the syntax. For example if we have {job.foo} this will reference the\n // job's `foo` property, however if we have \"reportLayout.title\" this will\n // expect to find a property of `objects` called `reportLayout` which will\n // have a property called `title`\n objects?: Record<string, Partial<VasBaseDto> | Record<string, VasFieldDtoValue>>;\n}\n\n/**\n * JobModel\n */\nexport class VasJobModel extends VasRestrictedAccountObjectModel {\n\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public override createdByName: string,\n public override modifiedByName: string,\n public override account: string,\n public override accessGroup: string,\n public reference: string,\n public jobDate: string,\n public jobStatus: string,\n public jobType: string,\n public assigneeId: string,\n public formId: string,\n public timeZoneOffset: number,\n public pendingFields: number,\n public childModified: string,\n public version: number,\n public fields: Array<VasFieldDto>,\n public files: Array<VasFileDto>,\n public createdByDisplayName: string,\n public modifiedByDisplayName: string,\n public geoLocation: GeoLocation\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n account,\n accessGroup\n );\n }\n\n /**\n * Returns this with the dynamic interface\n * @return {VasJobModelDynamicInterface}\n */\n get $this(): VasJobModelDynamicInterface {\n return this as any;\n }\n\n /**\n * Returns a list of Job dynamic properties i.e. those that are added by the\n * dynamic forms\n */\n get dynamicProperties(): Array<string> {\n const nativeProps = this.staticProperties;\n return Object\n .getOwnPropertyNames(this)\n .filter(prop => !nativeProps.includes(prop));\n }\n\n /**\n * Returns a list of Job static properties i.e. those that are declared by\n * the type\n */\n get staticProperties(): Array<string> {\n return Object.getOwnPropertyNames(VasJobModel.empty());\n }\n\n /**\n * @return {VasJobModel}\n */\n public static empty(): VasJobModel {\n return new VasJobModel(\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n moment().utcOffset(),\n 0,\n '',\n 0,\n [],\n [],\n '',\n '',\n getEmptyGeoLocation()\n );\n }\n\n public static fromDto(dto: Partial<VasJobDto>): VasJobModel {\n const model = new VasJobModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.accessGroup || '',\n dto.reference || '',\n dto.jobDate || '',\n dto.jobStatus || '',\n dto.jobType || '',\n dto.assigneeId || '',\n dto.formId || '',\n dto.timeZoneOffset || moment().utcOffset(),\n dto.pendingFields || 0,\n dto.childModified || '',\n dto.version || 0,\n dto.fields || [],\n dto.files || [],\n dto.createdByDisplayName || '',\n dto.modifiedByDisplayName || '',\n dto.geoLocation || getEmptyGeoLocation()\n );\n const emptyKeys = model.staticProperties;\n Object\n .keys(dto)\n .filter(key => emptyKeys.indexOf(key) === -1)\n .forEach((key: string) =>\n model.$this[key] = (dto as VasJobModelDynamicInterface)[key]\n );\n return model;\n }\n\n /**\n * @param {VasFormModel} formModel\n * @return {Record<string, VasFieldDtoValue>}\n */\n getFields(formModel: VasFormModel): Record<string, VasFieldDtoValue> {\n const fields: { [key: string]: VasFieldDtoValue } = {};\n formModel.groups\n .forEach(group => {\n group.controls.forEach(control => {\n (fields)[control.reportTemplateName] =\n this.getValueByPath([group.name, control.name]);\n });\n });\n return fields;\n }\n\n /**\n * Will return an object whose keys are the names of all fields in the job.\n * This method is similar to `getFields` except that this method will only\n * return values where a value was set, as opposed to `getFields` which\n * return a property regardless (because it uses the form to drive the logic)\n * @return {Record<string, VasFieldDtoValue>}\n */\n getFields2(): Record<string, VasFieldDtoValue> {\n let fields: { [key: string]: VasFieldDtoValue } = {};\n this.dynamicProperties\n .forEach((groupName) => {\n Object\n .keys(this.$this[groupName])\n .forEach(controlName => {\n fields[controlName] = this.getValueByPath([groupName, controlName]);\n });\n }, {});\n return fields;\n }\n\n /**\n * Returns an object describing how many attachments were added to this job\n * (camera controls and files), and how many have not been uploaded yet.\n *\n * @param formModel instance of {@link VasFormModel} that was used when the\n * job was created\n */\n getFilesUploadStatus(\n formModel: VasFormModel\n ): { pending: number; total: number } {\n\n const pathsWithValue: Array<Array<string>> = formModel\n .getCameraControlPaths()\n .map(path => {\n const value: VasFileDto | VasCameraControlValueModel =\n this.getValueByPath(path) as any;\n if (value && !!value.id) {\n return path;\n }\n return null;\n })\n .filter(path => path !== null ? path : null)\n .filter(isArrayString);\n\n let total = pathsWithValue.length;\n\n total += this.files.length;\n\n // calculate the number of camera images still to upload\n let pending = pathsWithValue\n .map(path => this.getValueByPath(path) as any)\n .map((value: VasFileDto | VasCameraControlValueModel) => {\n if (isFileDto(value)) {\n return value.id && value.status !== 'COMPLETE';\n } else if (isCameraControlValueV1(value)) {\n // if url is not set, it hasn't been uploaded\n return value.id && !value.url;\n }\n return false;\n })\n .filter(hasUploaded => hasUploaded)\n .length;\n\n // add total from files that are pending\n pending += this.files\n .filter(value => value.status !== 'COMPLETED')\n .length;\n\n return {\n pending,\n total\n };\n }\n\n /**\n * This method will hydrate the `fields` property of the model. The reason for\n * this is that we have different ways to store the field data. One way, is\n * we store them as dynamic properties of the job. For example job.foo.bar,\n * where `foo` is the name of a Group, and `bar` is the name of a control.\n * Thus, when we create a job using a form in the client, the job object will\n * have its static properties (id, account, reference etc), and also a number\n * of dynamic properties determined by the Groups and Controls. This kind of\n * object is nice to work with in certain circumstances. However, the api\n * works differently. In the API a Job is a record, and references a number of\n * Field records. Each Field stores the value. Comparing these two models we\n * have:\n * A) job with dynamic properties, e.g.\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * foo: {\n * bar: \"value\"\n * }\n * }\n *\n * B) job with fields\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * <will not have dynamic properties>...\n * fields: [\n * {\n * id: <guid>,\n * <other field properties>,\n * value: \"value\"\n * }\n * ]\n * }\n *\n * So, what this method does is given a JobModel in the form of A, read all\n * of those dynamic properties and set them into `fields`. Doing this requires\n * knowledge of the Form that was used to create the job. Moreover, since the\n * dynamic properties do not contain the ids of the fields, we also allow to\n * pass in a `controlFieldIdMap`. This map stores the mapping between Control\n * and the Field that was created in the Job to store the value for that\n * Control. This is useful, if for example you want to compare a Job in form A\n * with a Job in form B, for example if you want to update the Job on the API\n * with a Job that was saved by a client in form A.\n *\n * E.g.\n * Client -> API: client requests form\n * User -> Client: user fills in the form and submits\n * Client -> Firestore: client saves the Job in form A i.e. dynamic props\n * Firestore -> Function: A function is triggered to sync the job to the API\n * Function -> API: Function checks if job already exists, it receives 404\n * Function -> Function: The function calls `hydrateFields(...)`\n * Function -> API: The function POST the Job to /jobs\n * Function -> API: The function POST each field to /fields\n *\n * Similarly, if the user updates the job\n * Client -> API: client requests form\n * User -> Client: user fills in the form and submits an update\n * Client -> Firestore: client saves the Job in form A i.e. dynamic props\n * Firestore -> Function: A function is triggered to sync the job to the API\n * Function -> API: Function checks if job already exists, it receives 200\n * Function -> Function: The function calls `hydrateFields(...)` passing in\n * the map is made by iterating over the fields it\n * received from the API and storing the mappings\n * between controlId and fieldId for each field\n * Function -> API: The function PATCH the Job to /jobs\n * Function -> API: The function POST/PATCH each field to /fields\n * treated as new\n *\n * @param {VasFormModel} formModel the VasFormModel that was used to create\n * the job\n * @param {Map<string, string>} controlFieldIdMap a mapping of control to\n * field ids. This is used to determine whether a new id for the field should\n * be generated, or to reuse an existing one from the map.\n * @param {Array<string>} controlNames if a value is provided, it will be used\n * to filter the fields that are returned.\n * @return {Array<VasFieldDto>}\n */\n hydrateFields(\n formModel: VasFormModel,\n controlFieldIdMap: Map<string, string> = new Map<string, string>(),\n controlNames?: Array<string>\n ): void {\n const fields: Array<VasFieldDto> = [];\n formModel.groups\n .forEach(group => {\n group.controls.forEach(control => {\n\n if (!control.name.startsWith('fields.')) {\n return;\n }\n\n if (controlNames && !controlNames.includes(control.name)) {\n return;\n }\n\n fields.push(VasFieldModel.fromDto({\n // if the controlId exists in the map, use the associated fieldId,\n // otherwise generate a new id for the field.\n id: controlFieldIdMap.get(control.id) || UUID.UUID(),\n account: this.account,\n job: this.id,\n createdBy: this.createdBy,\n created: this.created,\n modifiedBy: this.modifiedBy,\n modified: this.modified,\n control: control.id,\n value: this.getValueByPath(\n [group.name, control.name]\n )\n }));\n });\n });\n this.fields = fields;\n }\n\n /**\n * @param {string[]} path path segments\n * @return {void}\n */\n getValueByPath<T extends VasFieldDtoValue>(\n path: string[] = []\n ): T | undefined {\n return getValueByPath(path, this.$this);\n }\n\n /**\n * A very non sophisticated way to set values in the job via paths\n *\n * For example:\n *\n * setValueByPath('value', ['foo', 'bar']);\n *\n * will make results in job\n * {\n * foo: {\n * bar: 'value'\n * }\n * }\n *\n * @param {any} value the value to set\n * @param {string[]} path path segments\n */\n setValueByPath(value: VasFieldDtoValue, path: string[] = []): void {\n switch (path.length) {\n case 0: {\n return;\n }\n case 1: {\n (this as any)[path[0]] = value;\n return;\n }\n case 2: {\n // eslint-disable-next-line max-len\n (this.$this[path[0]] as Record<string, VasFieldDtoValue>)[path[1]] = value;\n return;\n }\n case 3: {\n // eslint-disable-next-line max-len\n ((this.$this[path[0]] as Record<string, VasFieldDtoValue>)[path[1]] as Record<string, VasFieldDtoValue>)[path[2]] = value;\n return;\n }\n default: {\n throw Error('path has too many segments');\n }\n }\n }\n\n /**\n * @param {boolean} staticOnly if true, will only output values for the static\n * properties in the dto\n * @return {VasJobDto}\n */\n public toDto(staticOnly = false): VasJobDto {\n\n if (staticOnly) {\n return {\n id: this.id,\n created: this.created,\n createdBy: this.createdBy,\n modified: this.modified,\n modifiedBy: this.modifiedBy,\n serverCreated: this.serverCreated,\n serverModified: this.serverModified,\n createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n account: this.account,\n accessGroup: this.accessGroup,\n reference: this.reference,\n jobDate: this.jobDate,\n jobStatus: this.jobStatus,\n jobType: this.jobType,\n assigneeId: this.assigneeId,\n formId: this.formId,\n timeZoneOffset: this.timeZoneOffset,\n pendingFields: this.pendingFields,\n childModified: this.childModified,\n version: this.version,\n fields: this.fields,\n files: this.files,\n createdByDisplayName: this.createdByDisplayName,\n modifiedByDisplayName: this.modifiedByDisplayName,\n geoLocation: this.geoLocation\n };\n }\n\n const dto = {} as VasJobModelDynamicInterface;\n [...this.staticProperties, ...this.dynamicProperties]\n .forEach(prop =>\n (dto)[prop] = this.$this[prop]);\n\n return dto as any;\n }\n\n /**\n * This method will parse a syntax that allows us to build strings from the\n * values of from the job model. For example if the job model was:\n *\n * {\n * foo: 'bar'\n * }\n *\n * and we pass \"i am foo {foo}\", the result would be:\n *\n * \"i am foo bar\"\n *\n * we can also use moment to parse dates, for example if the job model was:\n *\n * {\n * created: \"2022-01-01T00:00:00+0000\"\n * }\n *\n * and we pass \"{created|date:YY-MM-DD}\", the result would be:\n *\n * \"2022-01-01\"\n *\n * @param {string} value a string with the syntax\n * @param {ParseSyntaxOptions} options\n * @return {string} the results of parsing the syntax on this job\n */\n parseSyntax(\n value: string,\n options: ParseSyntaxOptions = {\n timeZoneOffset: 0\n }\n ): string {\n\n if (!value || typeof value !== 'string') {\n return '';\n }\n return value.replace(/({[^}]*})/g, (match: string, token: string) => {\n const syntax = token.substring(1, token.length - 1);\n\n let [key, filter] = syntax.split('|');\n key = (key || '').trim();\n filter = (filter || '').trim();\n\n let filterName, filterArg: string = '';\n if (filter) {\n const splitIndex = filter.indexOf(':');\n if (splitIndex !== -1) {\n filterName = filter.substring(0, splitIndex);\n filterArg = filter.substring(splitIndex + 1);\n } else {\n filterName = filter;\n filterArg = '';\n }\n filterName = (filterName || '').trim();\n filterArg = (filterArg || '').trim();\n }\n const path = key.split('.');\n const objectKey = path.shift() || '';\n let result = '';\n if (objectKey === 'job') {\n result = (this.getValueByPath(path) || '').toString();\n } else if (objectKey === 'fields') {\n result = (getValueByPath(path, this.getFields2()) || '').toString();\n } else if (objectKey.length) {\n if (options.objects) {\n if (options.objects[objectKey] === undefined) {\n console.debug(\n `objectKey ${objectKey} is not present in options.object`\n );\n result = '';\n } else {\n result = (getValueByPath(path, options.objects[objectKey]) || '')\n .toString();\n }\n } else {\n console.debug(\n `objectKey ${objectKey} was used but options.object is not set`\n );\n return '';\n }\n } else {\n return '';\n }\n\n\n if (filterName && result) {\n switch (filterName) {\n case 'date': {\n return moment(result)\n .utcOffset(options.timeZoneOffset)\n .format(filterArg || '');\n }\n default: {\n console.warn('unknown filter %s', filterName);\n }\n }\n }\n\n return result;\n }).trim();\n };\n\n /**\n * @return {object}\n */\n override toApiDto(): Record<string, string | number | boolean> {\n return {\n ...super.toApiDto(),\n reference: this.reference || '~',\n jobDate: this.jobDate || '~',\n jobType: this.jobType || '~',\n accessGroup: this.accessGroup || '~',\n jobStatus: this.jobStatus || '~',\n assigneeId: this.assigneeId || '~',\n timeZoneOffset: this.timeZoneOffset || 0,\n pendingFields: this.pendingFields || 0,\n lastForm: this.formId || '~'\n };\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const formDto1Group1Control: import("@ironcode/vas-lib").VasFormDto;
2
+ //# sourceMappingURL=vas-job.model.spec-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vas-job.model.spec-data.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.spec-data.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,wCAsBxB,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formDto1Group1Control = void 0;
4
+ const vas_lib_1 = require("@ironcode/vas-lib");
5
+ const vas_lib_2 = require("@ironcode/vas-lib");
6
+ const vas_lib_3 = require("@ironcode/vas-lib");
7
+ const vas_lib_4 = require("@ironcode/vas-lib");
8
+ exports.formDto1Group1Control = vas_lib_3.VasFormModel.fromDto({
9
+ id: 'form',
10
+ geoLocationEnabled: false,
11
+ groups: [
12
+ vas_lib_2.VasGroupModel.fromDto({
13
+ id: 'group',
14
+ name: 'groupa',
15
+ title: 'Group A',
16
+ scoreWeight: 1,
17
+ controls: [
18
+ vas_lib_4.VasControlModel.fromDto({
19
+ id: 'control',
20
+ controlType: vas_lib_1.VasControlTypeModel.fromDto({
21
+ name: 'text'
22
+ }).toDto(),
23
+ name: 'fields.foo'
24
+ }).toDto()
25
+ ],
26
+ }).toDto()
27
+ ],
28
+ }).toDto();
29
+ //# sourceMappingURL=vas-job.model.spec-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vas-job.model.spec-data.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.spec-data.ts"],"names":[],"mappings":";;;AAAA,+CAAwD;AACxD,+CAAkD;AAClD,+CAAiD;AACjD,+CAAoD;AAEvC,QAAA,qBAAqB,GAAG,sBAAY,CAAC,OAAO,CAAC;IACxD,EAAE,EAAE,MAAM;IACV,kBAAkB,EAAE,KAAK;IACzB,MAAM,EAAE;QACN,uBAAa,CAAC,OAAO,CACnB;YACE,EAAE,EAAE,OAAO;YACX,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,CAAC;YACd,QAAQ,EAAE;gBACR,yBAAe,CAAC,OAAO,CAAC;oBACtB,EAAE,EAAE,SAAS;oBACb,WAAW,EAAE,6BAAmB,CAAC,OAAO,CAAC;wBACvC,IAAI,EAAE,MAAM;qBACb,CAAC,CAAC,KAAK,EAAE;oBACV,IAAI,EAAE,YAAY;iBACnB,CAAC,CAAC,KAAK,EAAE;aACX;SACF,CACF,CAAC,KAAK,EAAE;KACV;CACF,CAAC,CAAC,KAAK,EAAE,CAAC","sourcesContent":["import { VasControlTypeModel } from '@ironcode/vas-lib';\nimport { VasGroupModel } from '@ironcode/vas-lib';\nimport { VasFormModel } from '@ironcode/vas-lib';\nimport { VasControlModel } from '@ironcode/vas-lib';\n\nexport const formDto1Group1Control = VasFormModel.fromDto({\n id: 'form',\n geoLocationEnabled: false,\n groups: [\n VasGroupModel.fromDto(\n {\n id: 'group',\n name: 'groupa',\n title: 'Group A',\n scoreWeight: 1,\n controls: [\n VasControlModel.fromDto({\n id: 'control',\n controlType: VasControlTypeModel.fromDto({\n name: 'text'\n }).toDto(),\n name: 'fields.foo'\n }).toDto()\n ],\n }\n ).toDto()\n ],\n}).toDto();\n"]}
@@ -0,0 +1,7 @@
1
+ import { VasAccountObjectDto } from './vas-account-object.dto';
2
+ export interface VasLookupTypeDto extends VasAccountObjectDto {
3
+ title: string;
4
+ sequence: number;
5
+ categoryGroups: Array<string>;
6
+ }
7
+ //# sourceMappingURL=vas-lookup-type.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vas-lookup-type.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-lookup-type.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC/B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=vas-lookup-type.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vas-lookup-type.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-lookup-type.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasAccountObjectDto } from './vas-account-object.dto';\n\nexport interface VasLookupTypeDto extends VasAccountObjectDto {\n title: string;\n sequence: number;\n categoryGroups: Array<string>;\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { VasAccountObjectDto } from './vas-account-object.dto';
2
+ export interface VasLookupDto extends VasAccountObjectDto {
3
+ id: string;
4
+ created: string;
5
+ serverCreated: string;
6
+ createdBy: string;
7
+ serverModified: string;
8
+ modifiedBy: string;
9
+ account: string;
10
+ accessGroup: string;
11
+ lookupType: string;
12
+ title: string;
13
+ content: string;
14
+ sequence: number;
15
+ }
16
+ //# sourceMappingURL=vas-lookup.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vas-lookup.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-lookup.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,YAAa,SAAQ,mBAAmB;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=vas-lookup.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vas-lookup.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-lookup.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasAccountObjectDto } from './vas-account-object.dto';\n\nexport interface VasLookupDto extends VasAccountObjectDto {\n id: string;\n created: string;\n serverCreated: string;\n createdBy: string;\n serverModified: string;\n modifiedBy: string;\n account: string;\n accessGroup: string;\n lookupType: string;\n title: string;\n content: string;\n sequence: number;\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { VasAccountObjectDto } from './vas-account-object.dto';
2
+ export interface VasMembershipDto extends VasAccountObjectDto {
3
+ user: string;
4
+ admin: boolean;
5
+ lookupTypes: Array<string>;
6
+ contactTypes: Array<string>;
7
+ accessGroups: Array<string>;
8
+ jobStatuses: Array<string>;
9
+ jobTypes: Array<string>;
10
+ taskTypes: Array<string>;
11
+ }
12
+ //# sourceMappingURL=vas-membership.dto.d.ts.map