@colijnit/sharedcomponents 1.0.25 → 1.0.26

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 (292) hide show
  1. package/README.md +8 -11
  2. package/bundles/colijnit-sharedcomponents.umd.js +3706 -0
  3. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -0
  4. package/colijnit-sharedcomponents.d.ts +16 -0
  5. package/colijnit-sharedcomponents.metadata.json +1 -0
  6. package/esm2015/colijnit-sharedcomponents.js +17 -0
  7. package/esm2015/lib/assets/dictionary/text.properties.js +11 -0
  8. package/esm2015/lib/components/circular-gauge/co-circular-gauge.component.js +126 -0
  9. package/esm2015/lib/components/circular-gauge/co-circular-gauge.module.js +21 -0
  10. package/esm2015/lib/components/docsign/component/signature/signature.component.js +75 -0
  11. package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +44 -0
  12. package/esm2015/lib/components/docsign/docsign.component.js +225 -0
  13. package/esm2015/lib/components/docsign/docsign.module.js +23 -0
  14. package/esm2015/lib/components/key-pad/key-pad.component.js +191 -0
  15. package/esm2015/lib/components/key-pad/key-pad.module.js +21 -0
  16. package/esm2015/lib/components/layout-switcher/layout-switcher.component.js +74 -0
  17. package/esm2015/lib/components/layout-switcher/layout-switcher.module.js +21 -0
  18. package/esm2015/lib/components/linear-gauge/co-linear-gauge.component.js +55 -0
  19. package/esm2015/lib/components/linear-gauge/co-linear-gauge.module.js +19 -0
  20. package/esm2015/lib/components/send-method-dialog/enums/send-option.js +8 -0
  21. package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +309 -0
  22. package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +31 -0
  23. package/esm2015/lib/components/statusbar/statusbar.component.js +81 -0
  24. package/esm2015/lib/components/statusbar/statusbar.module.js +23 -0
  25. package/esm2015/lib/components/stock/stock-information/stock-information.component.js +54 -0
  26. package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +350 -0
  27. package/esm2015/lib/components/stock/stock-location/stock-location.component.js +62 -0
  28. package/esm2015/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.js +2 -0
  29. package/esm2015/lib/components/stock/stock-transfer/stock-change-amount.component.js +68 -0
  30. package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +130 -0
  31. package/esm2015/lib/components/stock/stock.component.js +140 -0
  32. package/esm2015/lib/components/stock/stock.module.js +48 -0
  33. package/esm2015/lib/enum/icon.enum.js +19 -0
  34. package/esm2015/lib/enum/keyboard-code.enum.js +32 -0
  35. package/esm2015/lib/enum/language-code.enum.js +8 -0
  36. package/esm2015/lib/factory/business-object-factory.js +120 -0
  37. package/esm2015/lib/factory/decorators/boolean.decorator.js +102 -0
  38. package/esm2015/lib/factory/decorators/complex-array.decorator.js +55 -0
  39. package/esm2015/lib/factory/decorators/complex-field.decorator.js +57 -0
  40. package/esm2015/lib/factory/decorators/date-field.decorator.js +36 -0
  41. package/esm2015/lib/factory/decorators/string-number.decorator.js +43 -0
  42. package/esm2015/lib/model/business-object.js +81 -0
  43. package/esm2015/lib/model/icon-svg.js +18 -0
  44. package/esm2015/lib/service/dictionary.service.js +76 -0
  45. package/esm2015/lib/service/icon-cache.service.js +51 -0
  46. package/esm2015/lib/service/options.service.js +71 -0
  47. package/esm2015/lib/service/shared-connector.service.js +278 -0
  48. package/esm2015/lib/service/shared.service.js +30 -0
  49. package/esm2015/lib/service/stock.service.js +95 -0
  50. package/esm2015/lib/utils/array-utils.js +183 -0
  51. package/esm2015/lib/utils/is-nill.function.js +5 -0
  52. package/esm2015/lib/utils/string-utils.js +64 -0
  53. package/esm2015/public-api.js +21 -0
  54. package/fesm2015/colijnit-sharedcomponents.js +3516 -0
  55. package/fesm2015/colijnit-sharedcomponents.js.map +1 -0
  56. package/lib/assets/dictionary/text.properties.d.ts +3 -0
  57. package/lib/components/circular-gauge/co-circular-gauge.component.d.ts +20 -0
  58. package/lib/components/circular-gauge/co-circular-gauge.module.d.ts +2 -0
  59. package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/_layout.scss +0 -0
  60. package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/_material-definition.scss +0 -0
  61. package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/_theme.scss +0 -0
  62. package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/material.scss +0 -0
  63. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/_layout.scss +0 -0
  64. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/_material-definition.scss +0 -0
  65. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/_theme.scss +0 -0
  66. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/material.scss +0 -0
  67. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/_layout.scss +0 -0
  68. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/_material-definition.scss +0 -0
  69. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/_theme.scss +0 -0
  70. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/material.scss +0 -0
  71. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/_layout.scss +0 -0
  72. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/_material-definition.scss +0 -0
  73. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/_theme.scss +0 -0
  74. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/material.scss +0 -0
  75. package/lib/components/docsign/component/signature/signature.component.d.ts +16 -0
  76. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_layout.scss +0 -0
  77. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
  78. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_theme.scss +0 -0
  79. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/material.scss +0 -0
  80. package/lib/components/docsign/component/signatures/signatures.component.d.ts +12 -0
  81. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
  82. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
  83. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
  84. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/material.scss +0 -0
  85. package/lib/components/docsign/docsign.component.d.ts +92 -0
  86. package/lib/components/docsign/docsign.module.d.ts +2 -0
  87. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_layout.scss +0 -0
  88. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_material-definition.scss +0 -0
  89. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_theme.scss +0 -0
  90. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/material.scss +0 -0
  91. package/lib/components/key-pad/key-pad.component.d.ts +36 -0
  92. package/lib/components/key-pad/key-pad.module.d.ts +2 -0
  93. package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/_layout.scss +0 -0
  94. package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/_material-definition.scss +0 -0
  95. package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/_theme.scss +0 -0
  96. package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/material.scss +0 -0
  97. package/lib/components/layout-switcher/layout-switcher.component.d.ts +16 -0
  98. package/lib/components/layout-switcher/layout-switcher.module.d.ts +2 -0
  99. package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/_layout.scss +0 -0
  100. package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/_material-definition.scss +0 -0
  101. package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/_theme.scss +0 -0
  102. package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/material.scss +0 -0
  103. package/lib/components/linear-gauge/co-linear-gauge.component.d.ts +16 -0
  104. package/lib/components/linear-gauge/co-linear-gauge.module.d.ts +2 -0
  105. package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/_layout.scss +0 -0
  106. package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/_material-definition.scss +0 -0
  107. package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/_theme.scss +0 -0
  108. package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/material.scss +0 -0
  109. package/lib/components/send-method-dialog/enums/send-option.d.ts +6 -0
  110. package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +62 -0
  111. package/lib/components/send-method-dialog/send-method-dialog.module.d.ts +2 -0
  112. package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/_layout.scss +0 -0
  113. package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/_material-definition.scss +0 -0
  114. package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/_theme.scss +0 -0
  115. package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/material.scss +0 -0
  116. package/lib/components/statusbar/statusbar.component.d.ts +22 -0
  117. package/lib/components/statusbar/statusbar.module.d.ts +2 -0
  118. package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/_layout.scss +0 -0
  119. package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/_material-definition.scss +0 -0
  120. package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/_theme.scss +0 -0
  121. package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/material.scss +0 -0
  122. package/lib/components/stock/stock-information/stock-information.component.d.ts +10 -0
  123. package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +60 -0
  124. package/lib/components/stock/stock-location/stock-location.component.d.ts +15 -0
  125. package/{projects/sharedcomponents/src/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.ts → lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.d.ts} +2 -2
  126. package/lib/components/stock/stock-transfer/stock-change-amount.component.d.ts +18 -0
  127. package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +36 -0
  128. package/lib/components/stock/stock.component.d.ts +42 -0
  129. package/lib/components/stock/stock.module.d.ts +2 -0
  130. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_layout.scss +0 -0
  131. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_material-definition.scss +0 -0
  132. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_theme.scss +0 -0
  133. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/material.scss +0 -0
  134. package/{projects/sharedcomponents/src/lib/enum/icon.enum.ts → lib/enum/icon.enum.d.ts} +2 -3
  135. package/lib/enum/keyboard-code.enum.d.ts +30 -0
  136. package/lib/enum/language-code.enum.d.ts +6 -0
  137. package/lib/factory/business-object-factory.d.ts +23 -0
  138. package/lib/factory/decorators/boolean.decorator.d.ts +43 -0
  139. package/lib/factory/decorators/complex-array.decorator.d.ts +25 -0
  140. package/lib/factory/decorators/complex-field.decorator.d.ts +25 -0
  141. package/lib/factory/decorators/date-field.decorator.d.ts +17 -0
  142. package/lib/factory/decorators/string-number.decorator.d.ts +22 -0
  143. package/lib/model/business-object.d.ts +7 -0
  144. package/lib/model/icon-svg.d.ts +4 -0
  145. package/lib/service/dictionary.service.d.ts +21 -0
  146. package/lib/service/icon-cache.service.d.ts +18 -0
  147. package/lib/service/options.service.d.ts +13 -0
  148. package/lib/service/shared-connector.service.d.ts +43 -0
  149. package/lib/service/shared.service.d.ts +8 -0
  150. package/lib/service/stock.service.d.ts +38 -0
  151. package/{projects/sharedcomponents/src/lib → lib}/style/_mixin.scss +0 -0
  152. package/{projects/sharedcomponents/src/lib → lib}/style/_variables.scss +0 -0
  153. package/{projects/sharedcomponents/src/lib → lib}/style/sharedcomponents-globals.scss +0 -0
  154. package/lib/utils/array-utils.d.ts +57 -0
  155. package/lib/utils/is-nill.function.d.ts +1 -0
  156. package/lib/utils/string-utils.d.ts +22 -0
  157. package/package.json +26 -74
  158. package/{projects/sharedcomponents/src/public-api.ts → public-api.d.ts} +0 -5
  159. package/.browserslistrc +0 -16
  160. package/.editorconfig +0 -16
  161. package/.vscode/extensions.json +0 -4
  162. package/.vscode/launch.json +0 -20
  163. package/.vscode/tasks.json +0 -42
  164. package/Sharedcomponents.iml +0 -11
  165. package/angular.json +0 -133
  166. package/karma.conf.js +0 -44
  167. package/move-assets.js +0 -14
  168. package/projects/sharedcomponents/.browserslistrc +0 -16
  169. package/projects/sharedcomponents/README.md +0 -24
  170. package/projects/sharedcomponents/karma.conf.js +0 -44
  171. package/projects/sharedcomponents/ng-package.json +0 -17
  172. package/projects/sharedcomponents/package.json +0 -18
  173. package/projects/sharedcomponents/src/lib/assets/dictionary/text.properties.ts +0 -8
  174. package/projects/sharedcomponents/src/lib/assets/icons/angle_left_solid.svg +0 -1
  175. package/projects/sharedcomponents/src/lib/assets/icons/angle_right_solid.svg +0 -1
  176. package/projects/sharedcomponents/src/lib/assets/icons/arrow_fat_right.svg +0 -1
  177. package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_left.svg +0 -8
  178. package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_right.svg +0 -4
  179. package/projects/sharedcomponents/src/lib/assets/icons/bring_forward_regular.svg +0 -1
  180. package/projects/sharedcomponents/src/lib/assets/icons/check_round.svg +0 -1
  181. package/projects/sharedcomponents/src/lib/assets/icons/delete_left_regular.svg +0 -1
  182. package/projects/sharedcomponents/src/lib/assets/icons/delivery_truck.svg +0 -12
  183. package/projects/sharedcomponents/src/lib/assets/icons/email.svg +0 -5
  184. package/projects/sharedcomponents/src/lib/assets/icons/pdf.svg +0 -15
  185. package/projects/sharedcomponents/src/lib/assets/icons/print.svg +0 -10
  186. package/projects/sharedcomponents/src/lib/assets/icons/signature_field.svg +0 -9
  187. package/projects/sharedcomponents/src/lib/assets/icons/xml.svg +0 -9
  188. package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.component.ts +0 -139
  189. package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.module.ts +0 -19
  190. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-base-view.component.ts +0 -68
  191. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-day-view.component.ts +0 -31
  192. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-event.component.ts +0 -67
  193. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-events.component.ts +0 -48
  194. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.ts +0 -81
  195. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-header.component.ts +0 -265
  196. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-cell.component.ts +0 -38
  197. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.ts +0 -50
  198. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view.component.ts +0 -46
  199. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-month-view.component.ts +0 -65
  200. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-view.component.ts +0 -38
  201. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-select-view.component.ts +0 -63
  202. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-view.component.ts +0 -46
  203. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-months.component.ts +0 -37
  204. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-years.component.ts +0 -52
  205. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-header.component.ts +0 -124
  206. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-view.component.ts +0 -201
  207. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar.component.ts +0 -35
  208. package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.component.ts +0 -133
  209. package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.module.ts +0 -56
  210. package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +0 -82
  211. package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +0 -50
  212. package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +0 -252
  213. package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +0 -22
  214. package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.component.ts +0 -205
  215. package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.module.ts +0 -19
  216. package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.component.ts +0 -98
  217. package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.module.ts +0 -21
  218. package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.component.ts +0 -56
  219. package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.module.ts +0 -17
  220. package/projects/sharedcomponents/src/lib/components/send-method-dialog/enums/send-option.ts +0 -6
  221. package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.component.ts +0 -342
  222. package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.module.ts +0 -33
  223. package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.component.ts +0 -97
  224. package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.module.ts +0 -21
  225. package/projects/sharedcomponents/src/lib/components/stock/stock-in-order/stock-in-order.component.ts +0 -0
  226. package/projects/sharedcomponents/src/lib/components/stock/stock-information/stock-information.component.ts +0 -64
  227. package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +0 -384
  228. package/projects/sharedcomponents/src/lib/components/stock/stock-location/stock-location.component.ts +0 -84
  229. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-change-amount.component.ts +0 -73
  230. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +0 -153
  231. package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +0 -165
  232. package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +0 -51
  233. package/projects/sharedcomponents/src/lib/enum/calendar-view.enum.ts +0 -6
  234. package/projects/sharedcomponents/src/lib/enum/keyboard-code.enum.ts +0 -30
  235. package/projects/sharedcomponents/src/lib/enum/language-code.enum.ts +0 -6
  236. package/projects/sharedcomponents/src/lib/enum/month.enum.ts +0 -15
  237. package/projects/sharedcomponents/src/lib/enum/time-period.enum.ts +0 -9
  238. package/projects/sharedcomponents/src/lib/factory/business-object-factory.ts +0 -120
  239. package/projects/sharedcomponents/src/lib/factory/decorators/boolean.decorator.ts +0 -113
  240. package/projects/sharedcomponents/src/lib/factory/decorators/complex-array.decorator.ts +0 -61
  241. package/projects/sharedcomponents/src/lib/factory/decorators/complex-field.decorator.ts +0 -63
  242. package/projects/sharedcomponents/src/lib/factory/decorators/date-field.decorator.ts +0 -41
  243. package/projects/sharedcomponents/src/lib/factory/decorators/string-number.decorator.ts +0 -48
  244. package/projects/sharedcomponents/src/lib/model/agenda-event-per-day.model.ts +0 -6
  245. package/projects/sharedcomponents/src/lib/model/agenda-event.model.ts +0 -17
  246. package/projects/sharedcomponents/src/lib/model/agenda-null-objects.ts +0 -11
  247. package/projects/sharedcomponents/src/lib/model/business-object.ts +0 -85
  248. package/projects/sharedcomponents/src/lib/model/constant/all-months.ts +0 -17
  249. package/projects/sharedcomponents/src/lib/model/date-range.ts +0 -10
  250. package/projects/sharedcomponents/src/lib/model/day.model.ts +0 -9
  251. package/projects/sharedcomponents/src/lib/model/icon-svg.ts +0 -18
  252. package/projects/sharedcomponents/src/lib/model/month.model.ts +0 -11
  253. package/projects/sharedcomponents/src/lib/model/time-window.bo.ts +0 -21
  254. package/projects/sharedcomponents/src/lib/model/week.model.ts +0 -5
  255. package/projects/sharedcomponents/src/lib/model/weekday.model.ts +0 -17
  256. package/projects/sharedcomponents/src/lib/pipe/array-number.pipe.ts +0 -14
  257. package/projects/sharedcomponents/src/lib/pipe/master-pipes.ts +0 -7
  258. package/projects/sharedcomponents/src/lib/pipe/ucfirst.pipe.ts +0 -14
  259. package/projects/sharedcomponents/src/lib/service/dictionary.service.ts +0 -86
  260. package/projects/sharedcomponents/src/lib/service/icon-cache.service.ts +0 -51
  261. package/projects/sharedcomponents/src/lib/service/options.service.ts +0 -66
  262. package/projects/sharedcomponents/src/lib/service/shared-connector.service.ts +0 -258
  263. package/projects/sharedcomponents/src/lib/service/shared-initializer.service.ts +0 -29
  264. package/projects/sharedcomponents/src/lib/service/shared.service.ts +0 -21
  265. package/projects/sharedcomponents/src/lib/service/stock.service.ts +0 -95
  266. package/projects/sharedcomponents/src/lib/utils/array-utils.ts +0 -202
  267. package/projects/sharedcomponents/src/lib/utils/calendar.utils.ts +0 -75
  268. package/projects/sharedcomponents/src/lib/utils/date-utils.ts +0 -302
  269. package/projects/sharedcomponents/src/lib/utils/function/not-nill.function.ts +0 -4
  270. package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +0 -4
  271. package/projects/sharedcomponents/src/lib/utils/string-utils.ts +0 -67
  272. package/projects/sharedcomponents/src/test.ts +0 -27
  273. package/projects/sharedcomponents/tsconfig.lib.json +0 -18
  274. package/projects/sharedcomponents/tsconfig.lib.prod.json +0 -10
  275. package/projects/sharedcomponents/tsconfig.spec.json +0 -17
  276. package/script/merge-icons.js +0 -39
  277. package/src/app/app.component.scss +0 -9
  278. package/src/app/app.component.spec.ts +0 -31
  279. package/src/app/app.component.ts +0 -156
  280. package/src/app/app.module.ts +0 -60
  281. package/src/assets/.gitkeep +0 -0
  282. package/src/environments/environment.prod.ts +0 -3
  283. package/src/environments/environment.ts +0 -16
  284. package/src/favicon.ico +0 -0
  285. package/src/index.html +0 -13
  286. package/src/main.ts +0 -12
  287. package/src/polyfills.ts +0 -53
  288. package/src/styles.scss +0 -40
  289. package/src/test.ts +0 -26
  290. package/tsconfig.app.json +0 -15
  291. package/tsconfig.json +0 -65
  292. package/tsconfig.spec.json +0 -18
@@ -0,0 +1,3706 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/animations'), require('pdf-lib'), require('pdfjs-dist/legacy/build/pdf'), require('pdfjs-dist/build/pdf.worker.entry'), require('@angular/common'), require('signature_pad'), require('@colijnit/sharedapi/build/model/print-stock-stickers'), require('@colijnit/sharedapi/build/model/print-price-stickers.bo'), require('@colijnit/articleapi/build/articles'), require('@colijnit/sharedapi/build/sharedapi'), require('@colijnit/sharedapi/build/model/report/printer.bo'), require('@colijnit/articleapi/build/utils/function/not-nill.function'), require('@colijnit/articleapi/build/utils/object-utils'), require('@colijnit/articleapi/build/enum/yes-no-db-type.enum'), require('@colijnit/articleapi/build/enum/true-false-db-type.enum'), require('@colijnit/articleapi/build/enum/one-zero-bool-db-type.enum'), require('@colijnit/articleapi/build/enum/db-boolean-value-type.enum'), require('@colijnit/articleapi/build/utils/date-utils'), require('@colijnit/articleapi/build/utils/number-utils'), require('@colijnit/articleapi/build/utils/function/is-nill.function'), require('@colijnit/articleapi/build/factory/decorators/map-property.decorator'), require('@colijnit/articleapi/build/factory/decorators/boolean.decorator'), require('@colijnit/articleapi/build/factory/decorators/json.decorator'), require('@colijnit/articleapi/build/factory/decorators/complex-array.decorator'), require('@colijnit/articleapi/build/model/article-stock.bo'), require('@colijnit/articleapi/build/model/stock-history.bo'), require('@colijnit/sharedapi/build/model/report/stock-stickers-print-layouts.bo'), require('@colijnit/articleapi/build/model/article-details.bo'), require('@colijnit/articleapi/build/model/stock-status.bo'), require('@colijnit/articleapi/build/model/stock-management-warehouses.bo'), require('@colijnit/articleapi/build/model/stock-location.bo'), require('@colijnit/articleapi/build/model/article-transaction.bo'), require('rxjs'), require('@colijnit/articleapi/build/model/get-stock-history-request'), require('@colijnit/articleapi/build/model/article-stock'), require('@colijnit/corecomponents_v12'), require('@angular/platform-browser'), require('@colijnit/articleapi/build/model/article-stock-management'), require('@colijnit/articleapi/build/model/article-transaction'), require('@syncfusion/ej2-angular-circulargauge')) :
3
+ typeof define === 'function' && define.amd ? define('@colijnit/sharedcomponents', ['exports', '@angular/core', '@angular/animations', 'pdf-lib', 'pdfjs-dist/legacy/build/pdf', 'pdfjs-dist/build/pdf.worker.entry', '@angular/common', 'signature_pad', '@colijnit/sharedapi/build/model/print-stock-stickers', '@colijnit/sharedapi/build/model/print-price-stickers.bo', '@colijnit/articleapi/build/articles', '@colijnit/sharedapi/build/sharedapi', '@colijnit/sharedapi/build/model/report/printer.bo', '@colijnit/articleapi/build/utils/function/not-nill.function', '@colijnit/articleapi/build/utils/object-utils', '@colijnit/articleapi/build/enum/yes-no-db-type.enum', '@colijnit/articleapi/build/enum/true-false-db-type.enum', '@colijnit/articleapi/build/enum/one-zero-bool-db-type.enum', '@colijnit/articleapi/build/enum/db-boolean-value-type.enum', '@colijnit/articleapi/build/utils/date-utils', '@colijnit/articleapi/build/utils/number-utils', '@colijnit/articleapi/build/utils/function/is-nill.function', '@colijnit/articleapi/build/factory/decorators/map-property.decorator', '@colijnit/articleapi/build/factory/decorators/boolean.decorator', '@colijnit/articleapi/build/factory/decorators/json.decorator', '@colijnit/articleapi/build/factory/decorators/complex-array.decorator', '@colijnit/articleapi/build/model/article-stock.bo', '@colijnit/articleapi/build/model/stock-history.bo', '@colijnit/sharedapi/build/model/report/stock-stickers-print-layouts.bo', '@colijnit/articleapi/build/model/article-details.bo', '@colijnit/articleapi/build/model/stock-status.bo', '@colijnit/articleapi/build/model/stock-management-warehouses.bo', '@colijnit/articleapi/build/model/stock-location.bo', '@colijnit/articleapi/build/model/article-transaction.bo', 'rxjs', '@colijnit/articleapi/build/model/get-stock-history-request', '@colijnit/articleapi/build/model/article-stock', '@colijnit/corecomponents_v12', '@angular/platform-browser', '@colijnit/articleapi/build/model/article-stock-management', '@colijnit/articleapi/build/model/article-transaction', '@syncfusion/ej2-angular-circulargauge'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.sharedcomponents = {}), global.ng.core, global.ng.animations, global.pdfLib, global.PDFJS, global.pdfjsWorker, global.ng.common, global.SignaturePad, global.printStockStickers, global.printPriceStickers_bo, global.articles, global.sharedapi, global.printer_bo, global.notNill_function, global.objectUtils, global.yesNoDbType_enum, global.trueFalseDbType_enum, global.oneZeroBoolDbType_enum, global.dbBooleanValueType_enum, global.dateUtils, global.numberUtils, global.isNill_function, global.mapProperty_decorator, global.boolean_decorator, global.json_decorator, global.complexArray_decorator, global.articleStock_bo, global.stockHistory_bo, global.stockStickersPrintLayouts_bo, global.articleDetails_bo, global.stockStatus_bo, global.stockManagementWarehouses_bo, global.stockLocation_bo, global.articleTransaction_bo, global.rxjs, global.getStockHistoryRequest, global.articleStock, global.corecomponents_v12, global.ng.platformBrowser, global.articleStockManagement, global.articleTransaction, global.ej2AngularCirculargauge));
5
+ })(this, (function (exports, i0, animations, pdfLib, PDFJS, pdfjsWorker, common, SignaturePad, printStockStickers, printPriceStickers_bo, articles, sharedapi, printer_bo, notNill_function, objectUtils, yesNoDbType_enum, trueFalseDbType_enum, oneZeroBoolDbType_enum, dbBooleanValueType_enum, dateUtils, numberUtils, isNill_function, mapProperty_decorator, boolean_decorator, json_decorator, complexArray_decorator, articleStock_bo, stockHistory_bo, stockStickersPrintLayouts_bo, articleDetails_bo, stockStatus_bo, stockManagementWarehouses_bo, stockLocation_bo, articleTransaction_bo, rxjs, getStockHistoryRequest, articleStock, corecomponents_v12, i1, articleStockManagement, articleTransaction, ej2AngularCirculargauge) { 'use strict';
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
+ var PDFJS__namespace = /*#__PURE__*/_interopNamespace(PDFJS);
29
+ var pdfjsWorker__default = /*#__PURE__*/_interopDefaultLegacy(pdfjsWorker);
30
+ var SignaturePad__default = /*#__PURE__*/_interopDefaultLegacy(SignaturePad);
31
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
32
+
33
+ /******************************************************************************
34
+ Copyright (c) Microsoft Corporation.
35
+
36
+ Permission to use, copy, modify, and/or distribute this software for any
37
+ purpose with or without fee is hereby granted.
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
40
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
42
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
43
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
+ PERFORMANCE OF THIS SOFTWARE.
46
+ ***************************************************************************** */
47
+ /* global Reflect, Promise */
48
+ var extendStatics = function (d, b) {
49
+ extendStatics = Object.setPrototypeOf ||
50
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51
+ function (d, b) { for (var p in b)
52
+ if (Object.prototype.hasOwnProperty.call(b, p))
53
+ d[p] = b[p]; };
54
+ return extendStatics(d, b);
55
+ };
56
+ function __extends(d, b) {
57
+ if (typeof b !== "function" && b !== null)
58
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
59
+ extendStatics(d, b);
60
+ function __() { this.constructor = d; }
61
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
62
+ }
63
+ var __assign = function () {
64
+ __assign = Object.assign || function __assign(t) {
65
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
66
+ s = arguments[i];
67
+ for (var p in s)
68
+ if (Object.prototype.hasOwnProperty.call(s, p))
69
+ t[p] = s[p];
70
+ }
71
+ return t;
72
+ };
73
+ return __assign.apply(this, arguments);
74
+ };
75
+ function __rest(s, e) {
76
+ var t = {};
77
+ for (var p in s)
78
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
79
+ t[p] = s[p];
80
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
81
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
82
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
83
+ t[p[i]] = s[p[i]];
84
+ }
85
+ return t;
86
+ }
87
+ function __decorate(decorators, target, key, desc) {
88
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
89
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
90
+ r = Reflect.decorate(decorators, target, key, desc);
91
+ else
92
+ for (var i = decorators.length - 1; i >= 0; i--)
93
+ if (d = decorators[i])
94
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
95
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
96
+ }
97
+ function __param(paramIndex, decorator) {
98
+ return function (target, key) { decorator(target, key, paramIndex); };
99
+ }
100
+ function __metadata(metadataKey, metadataValue) {
101
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
102
+ return Reflect.metadata(metadataKey, metadataValue);
103
+ }
104
+ function __awaiter(thisArg, _arguments, P, generator) {
105
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
106
+ return new (P || (P = Promise))(function (resolve, reject) {
107
+ function fulfilled(value) { try {
108
+ step(generator.next(value));
109
+ }
110
+ catch (e) {
111
+ reject(e);
112
+ } }
113
+ function rejected(value) { try {
114
+ step(generator["throw"](value));
115
+ }
116
+ catch (e) {
117
+ reject(e);
118
+ } }
119
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
120
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
121
+ });
122
+ }
123
+ function __generator(thisArg, body) {
124
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
125
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
126
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
127
+ function verb(n) { return function (v) { return step([n, v]); }; }
128
+ function step(op) {
129
+ if (f)
130
+ throw new TypeError("Generator is already executing.");
131
+ while (_)
132
+ try {
133
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
134
+ return t;
135
+ if (y = 0, t)
136
+ op = [op[0] & 2, t.value];
137
+ switch (op[0]) {
138
+ case 0:
139
+ case 1:
140
+ t = op;
141
+ break;
142
+ case 4:
143
+ _.label++;
144
+ return { value: op[1], done: false };
145
+ case 5:
146
+ _.label++;
147
+ y = op[1];
148
+ op = [0];
149
+ continue;
150
+ case 7:
151
+ op = _.ops.pop();
152
+ _.trys.pop();
153
+ continue;
154
+ default:
155
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
156
+ _ = 0;
157
+ continue;
158
+ }
159
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
160
+ _.label = op[1];
161
+ break;
162
+ }
163
+ if (op[0] === 6 && _.label < t[1]) {
164
+ _.label = t[1];
165
+ t = op;
166
+ break;
167
+ }
168
+ if (t && _.label < t[2]) {
169
+ _.label = t[2];
170
+ _.ops.push(op);
171
+ break;
172
+ }
173
+ if (t[2])
174
+ _.ops.pop();
175
+ _.trys.pop();
176
+ continue;
177
+ }
178
+ op = body.call(thisArg, _);
179
+ }
180
+ catch (e) {
181
+ op = [6, e];
182
+ y = 0;
183
+ }
184
+ finally {
185
+ f = t = 0;
186
+ }
187
+ if (op[0] & 5)
188
+ throw op[1];
189
+ return { value: op[0] ? op[1] : void 0, done: true };
190
+ }
191
+ }
192
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
193
+ if (k2 === undefined)
194
+ k2 = k;
195
+ var desc = Object.getOwnPropertyDescriptor(m, k);
196
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
197
+ desc = { enumerable: true, get: function () { return m[k]; } };
198
+ }
199
+ Object.defineProperty(o, k2, desc);
200
+ }) : (function (o, m, k, k2) {
201
+ if (k2 === undefined)
202
+ k2 = k;
203
+ o[k2] = m[k];
204
+ });
205
+ function __exportStar(m, o) {
206
+ for (var p in m)
207
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
208
+ __createBinding(o, m, p);
209
+ }
210
+ function __values(o) {
211
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
212
+ if (m)
213
+ return m.call(o);
214
+ if (o && typeof o.length === "number")
215
+ return {
216
+ next: function () {
217
+ if (o && i >= o.length)
218
+ o = void 0;
219
+ return { value: o && o[i++], done: !o };
220
+ }
221
+ };
222
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
223
+ }
224
+ function __read(o, n) {
225
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
226
+ if (!m)
227
+ return o;
228
+ var i = m.call(o), r, ar = [], e;
229
+ try {
230
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
231
+ ar.push(r.value);
232
+ }
233
+ catch (error) {
234
+ e = { error: error };
235
+ }
236
+ finally {
237
+ try {
238
+ if (r && !r.done && (m = i["return"]))
239
+ m.call(i);
240
+ }
241
+ finally {
242
+ if (e)
243
+ throw e.error;
244
+ }
245
+ }
246
+ return ar;
247
+ }
248
+ /** @deprecated */
249
+ function __spread() {
250
+ for (var ar = [], i = 0; i < arguments.length; i++)
251
+ ar = ar.concat(__read(arguments[i]));
252
+ return ar;
253
+ }
254
+ /** @deprecated */
255
+ function __spreadArrays() {
256
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
257
+ s += arguments[i].length;
258
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
259
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
260
+ r[k] = a[j];
261
+ return r;
262
+ }
263
+ function __spreadArray(to, from, pack) {
264
+ if (pack || arguments.length === 2)
265
+ for (var i = 0, l = from.length, ar; i < l; i++) {
266
+ if (ar || !(i in from)) {
267
+ if (!ar)
268
+ ar = Array.prototype.slice.call(from, 0, i);
269
+ ar[i] = from[i];
270
+ }
271
+ }
272
+ return to.concat(ar || Array.prototype.slice.call(from));
273
+ }
274
+ function __await(v) {
275
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
276
+ }
277
+ function __asyncGenerator(thisArg, _arguments, generator) {
278
+ if (!Symbol.asyncIterator)
279
+ throw new TypeError("Symbol.asyncIterator is not defined.");
280
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
281
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
282
+ function verb(n) { if (g[n])
283
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
284
+ function resume(n, v) { try {
285
+ step(g[n](v));
286
+ }
287
+ catch (e) {
288
+ settle(q[0][3], e);
289
+ } }
290
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
291
+ function fulfill(value) { resume("next", value); }
292
+ function reject(value) { resume("throw", value); }
293
+ function settle(f, v) { if (f(v), q.shift(), q.length)
294
+ resume(q[0][0], q[0][1]); }
295
+ }
296
+ function __asyncDelegator(o) {
297
+ var i, p;
298
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
299
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
300
+ }
301
+ function __asyncValues(o) {
302
+ if (!Symbol.asyncIterator)
303
+ throw new TypeError("Symbol.asyncIterator is not defined.");
304
+ var m = o[Symbol.asyncIterator], i;
305
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
306
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
307
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
308
+ }
309
+ function __makeTemplateObject(cooked, raw) {
310
+ if (Object.defineProperty) {
311
+ Object.defineProperty(cooked, "raw", { value: raw });
312
+ }
313
+ else {
314
+ cooked.raw = raw;
315
+ }
316
+ return cooked;
317
+ }
318
+ ;
319
+ var __setModuleDefault = Object.create ? (function (o, v) {
320
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
321
+ }) : function (o, v) {
322
+ o["default"] = v;
323
+ };
324
+ function __importStar(mod) {
325
+ if (mod && mod.__esModule)
326
+ return mod;
327
+ var result = {};
328
+ if (mod != null)
329
+ for (var k in mod)
330
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
331
+ __createBinding(result, mod, k);
332
+ __setModuleDefault(result, mod);
333
+ return result;
334
+ }
335
+ function __importDefault(mod) {
336
+ return (mod && mod.__esModule) ? mod : { default: mod };
337
+ }
338
+ function __classPrivateFieldGet(receiver, state, kind, f) {
339
+ if (kind === "a" && !f)
340
+ throw new TypeError("Private accessor was defined without a getter");
341
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
342
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
343
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
344
+ }
345
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
346
+ if (kind === "m")
347
+ throw new TypeError("Private method is not writable");
348
+ if (kind === "a" && !f)
349
+ throw new TypeError("Private accessor was defined without a setter");
350
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
351
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
352
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
353
+ }
354
+ function __classPrivateFieldIn(state, receiver) {
355
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
356
+ throw new TypeError("Cannot use 'in' operator on non-object");
357
+ return typeof state === "function" ? receiver === state : state.has(receiver);
358
+ }
359
+
360
+ var DocsignComponent = /** @class */ (function () {
361
+ function DocsignComponent() {
362
+ this.saveButtonLabel = 'SAVE';
363
+ this.clearButtonLabel = 'CLEAR';
364
+ this.signDocumentButtonLabel = 'SIGN_DOCUMENT';
365
+ this.cancelButtonLabel = 'CANCEL';
366
+ this.pdfSaved = new i0.EventEmitter();
367
+ this.cancelClick = new i0.EventEmitter();
368
+ this.showSignaturePopup = false;
369
+ this.showSigBuyer = false;
370
+ this.showSigSeller = false;
371
+ this.showSignatures = false;
372
+ }
373
+ Object.defineProperty(DocsignComponent.prototype, "pdf", {
374
+ get: function () {
375
+ return this._pdf;
376
+ },
377
+ /**
378
+ * Load an existing [[PDFDocument]]. The input data can be provided in
379
+ * multiple formats:
380
+ *
381
+ * | Type | Contents |
382
+ * | ------------- | ------------------------------------------------------ |
383
+ * | `string` | A base64 encoded string (or data URI) containing a PDF |
384
+ * | `Uint8Array` | The raw bytes of a PDF |
385
+ * | `ArrayBuffer` | The raw bytes of a PDF |
386
+ *
387
+ * For example:
388
+ * ```js
389
+ * import { PDFDocument } from 'pdf-lib'
390
+ *
391
+ * // pdf=string
392
+ * const base64 =
393
+ * 'JVBERi0xLjcKJYGBgYEKCjUgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbm' +
394
+ * 'd0aCAxMDQKPj4Kc3RyZWFtCniccwrhMlAAwaJ0Ln2P1Jyy1JLM5ERdc0MjCwUjE4WQNC4Q' +
395
+ * '6cNlCFZkqGCqYGSqEJLLZWNuYGZiZmbkYuZsZmlmZGRgZmluDCQNzc3NTM2NzdzMXMxMjQ' +
396
+ * 'ztFEKyuEK0uFxDuAAOERdVCmVuZHN0cmVhbQplbmRvYmoKCjYgMCBvYmoKPDwKL0ZpbHRl' +
397
+ * 'ciAvRmxhdGVEZWNvZGUKL1R5cGUgL09ialN0bQovTiA0Ci9GaXJzdCAyMAovTGVuZ3RoID' +
398
+ * 'IxNQo+PgpzdHJlYW0KeJxVj9GqwjAMhu/zFHkBzTo3nCCCiiKIHPEICuJF3cKoSCu2E8/b' +
399
+ * '20wPIr1p8v9/8kVhgilmGfawX2CGaVrgcAi0/bsy0lrX7IGWpvJ4iJYEN3gEmrrGBlQwGs' +
400
+ * 'HHO9VBX1wNrxAqMX87RBD5xpJuddqwd82tjAHxzV1U5LPgy52DKXWnr1Lheg+j/c/pzGVr' +
401
+ * 'iqV0VlwZPXGPCJjElw/ybkwUmeoWgxesDXGhHJC/D/iikp1Av80ptKU0FdBEe25pPihAM1' +
402
+ * 'u6ytgaaWfs2Hrz35CJT1+EWmAKZW5kc3RyZWFtCmVuZG9iagoKNyAwIG9iago8PAovU2l6' +
403
+ * 'ZSA4Ci9Sb290IDIgMCBSCi9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9UeXBlIC9YUmVmCi9MZW' +
404
+ * '5ndGggMzgKL1cgWyAxIDIgMiBdCi9JbmRleCBbIDAgOCBdCj4+CnN0cmVhbQp4nBXEwREA' +
405
+ * 'EBAEsCwz3vrvRmOOyyOoGhZdutHN2MT55fIAVocD+AplbmRzdHJlYW0KZW5kb2JqCgpzdG' +
406
+ * 'FydHhyZWYKNTEwCiUlRU9G'
407
+ *
408
+ * const dataUri = 'data:application/pdf;base64,' + base64
409
+ *
410
+ * const pdfDoc1 = await PDFDocument.load(base64)
411
+ * const pdfDoc2 = await PDFDocument.load(dataUri)
412
+ *
413
+ * // pdf=Uint8Array
414
+ * import fs from 'fs'
415
+ * const uint8Array = fs.readFileSync('with_update_sections.pdf')
416
+ * const pdfDoc3 = await PDFDocument.load(uint8Array)
417
+ *
418
+ * // pdf=ArrayBuffer
419
+ * const url = 'https://pdf-lib.js.org/assets/with_update_sections.pdf'
420
+ * const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())
421
+ * const pdfDoc4 = await PDFDocument.load(arrayBuffer)
422
+ *
423
+ * ```
424
+ *
425
+ * @param pdf The input data containing a PDF document.
426
+ * @param options The options to be used when loading the document.
427
+ * @returns Resolves with a document loaded from the input.
428
+ */
429
+ set: function (value) {
430
+ if (value) {
431
+ this._pdf = value;
432
+ this._openPDF();
433
+ }
434
+ },
435
+ enumerable: false,
436
+ configurable: true
437
+ });
438
+ DocsignComponent.prototype.showClass = function () {
439
+ return true;
440
+ };
441
+ DocsignComponent.prototype.saveFirstSignature = function (sig) {
442
+ this._saveSignature(sig, this.sigBuyerPosition);
443
+ this.showSigBuyer = false;
444
+ this._savePdf();
445
+ };
446
+ DocsignComponent.prototype.saveSecondSignature = function (sig) {
447
+ this._saveSignature(sig, this.sigSellerPosition);
448
+ this.showSigSeller = false;
449
+ this._savePdf();
450
+ };
451
+ DocsignComponent.prototype._openPDF = function () {
452
+ return __awaiter(this, void 0, void 0, function () {
453
+ var _a, pdfDataUri;
454
+ return __generator(this, function (_b) {
455
+ switch (_b.label) {
456
+ case 0:
457
+ // first create reader to check signatures
458
+ this._checkSignatures();
459
+ _a = this;
460
+ return [4 /*yield*/, pdfLib.PDFDocument.load(this._pdf, {
461
+ updateMetadata: false
462
+ })];
463
+ case 1:
464
+ _a.pdfDoc = _b.sent();
465
+ return [4 /*yield*/, this.pdfDoc.saveAsBase64({ dataUri: true })];
466
+ case 2:
467
+ pdfDataUri = _b.sent();
468
+ this.iframe.nativeElement.src = pdfDataUri;
469
+ return [2 /*return*/];
470
+ }
471
+ });
472
+ });
473
+ };
474
+ DocsignComponent.prototype._savePdf = function () {
475
+ return __awaiter(this, void 0, void 0, function () {
476
+ var result;
477
+ return __generator(this, function (_a) {
478
+ switch (_a.label) {
479
+ case 0:
480
+ if (!(!this.showSigBuyer && !this.showSigSeller)) return [3 /*break*/, 2];
481
+ return [4 /*yield*/, this.pdfDoc.saveAsBase64()];
482
+ case 1:
483
+ result = _a.sent();
484
+ this.pdfSaved.next(result);
485
+ _a.label = 2;
486
+ case 2: return [2 /*return*/];
487
+ }
488
+ });
489
+ });
490
+ };
491
+ DocsignComponent.prototype._checkSignatures = function () {
492
+ return __awaiter(this, void 0, void 0, function () {
493
+ var pdfWorkerSrc, pdfReader, numPages, i, page, text;
494
+ return __generator(this, function (_a) {
495
+ switch (_a.label) {
496
+ case 0:
497
+ if (window.hasOwnProperty('pdfWorkerSrc') &&
498
+ typeof window.pdfWorkerSrc === 'string' &&
499
+ window.pdfWorkerSrc) {
500
+ pdfWorkerSrc = window.pdfWorkerSrc;
501
+ }
502
+ else {
503
+ pdfWorkerSrc = pdfjsWorker__default["default"];
504
+ }
505
+ PDFJS__namespace.GlobalWorkerOptions.workerSrc = pdfWorkerSrc;
506
+ return [4 /*yield*/, PDFJS__namespace.getDocument(this._pdf).promise];
507
+ case 1:
508
+ pdfReader = _a.sent();
509
+ numPages = pdfReader.numPages;
510
+ i = 0;
511
+ _a.label = 2;
512
+ case 2:
513
+ if (!(i < numPages)) return [3 /*break*/, 6];
514
+ return [4 /*yield*/, pdfReader.getPage(i + 1)];
515
+ case 3:
516
+ page = _a.sent();
517
+ return [4 /*yield*/, page.getTextContent()];
518
+ case 4:
519
+ text = _a.sent();
520
+ page.cleanup();
521
+ if (this.firstSignatureField) {
522
+ this.sigBuyerPosition = this._getPositionSignature(text, this.firstSignatureField);
523
+ if (this.sigBuyerPosition.width > 0 && this.sigBuyerPosition.height > 0) {
524
+ this.sigBuyerPosition.page = i;
525
+ this.showSigBuyer = true;
526
+ }
527
+ }
528
+ if (this.secondSignatureField) {
529
+ this.sigSellerPosition = this._getPositionSignature(text, this.secondSignatureField);
530
+ if (this.sigSellerPosition.width > 0 && this.sigSellerPosition.height > 0) {
531
+ this.sigSellerPosition.page = i;
532
+ this.showSigSeller = true;
533
+ }
534
+ }
535
+ _a.label = 5;
536
+ case 5:
537
+ i++;
538
+ return [3 /*break*/, 2];
539
+ case 6: return [2 /*return*/];
540
+ }
541
+ });
542
+ });
543
+ };
544
+ DocsignComponent.prototype._getPositionSignature = function (textItem, signatureField) {
545
+ var sigItem = textItem.items.find(function (i) { return i.str.toLowerCase() === signatureField.toLowerCase(); });
546
+ if (sigItem) {
547
+ textItem.items.slice(textItem.items.indexOf(sigItem), 1);
548
+ return {
549
+ x: sigItem.transform[4],
550
+ y: sigItem.transform[5],
551
+ width: sigItem.width,
552
+ height: sigItem.height,
553
+ page: 0
554
+ };
555
+ }
556
+ return { x: 0, y: 0, width: 0, height: 0, page: 0 };
557
+ };
558
+ DocsignComponent.prototype._saveSignature = function (sig, dimensions) {
559
+ return __awaiter(this, void 0, void 0, function () {
560
+ var jpgImage, page;
561
+ return __generator(this, function (_a) {
562
+ switch (_a.label) {
563
+ case 0: return [4 /*yield*/, this.pdfDoc.embedPng(sig)];
564
+ case 1:
565
+ jpgImage = _a.sent();
566
+ return [4 /*yield*/, this.pdfDoc.getPage(dimensions.page)];
567
+ case 2:
568
+ page = _a.sent();
569
+ page.drawImage(jpgImage, {
570
+ x: ((dimensions.x + (dimensions.width / 2)) - (200 / 2)),
571
+ y: ((dimensions.y + (dimensions.height / 2)) - (100 / 2)),
572
+ width: 200,
573
+ height: 100
574
+ });
575
+ return [2 /*return*/];
576
+ }
577
+ });
578
+ });
579
+ };
580
+ return DocsignComponent;
581
+ }());
582
+ DocsignComponent.decorators = [
583
+ { type: i0.Component, args: [{
584
+ selector: "ione-docsign",
585
+ template: "\n <iframe #iframe></iframe>\n <ione-signatures *ngIf=\"showSignatures\" @showHideSignature\n [showFirstSignature]=\"showSigBuyer\"\n [firstSignatureTitle]=\"firstSignatureLabel\"\n [showSecondSignature]=\"showSigSeller\"\n [secondSignatureTitle]=\"secondSignatureLabel\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (saveFirstSignature)=\"saveFirstSignature($event)\"\n (saveSecondSignature)=\"saveSecondSignature($event)\"\n ></ione-signatures>\n <input type=\"button\" *ngIf=\"(showSigBuyer || showSigSeller) && !showSignatures\" class=\"button button-sign-document\"\n [value]=\"signDocumentButtonLabel\"\n (click)=\"showSignatures = true\"\n />\n <input type=\"button\" class=\"button button-cancel\"\n [value]=\"cancelButtonLabel\"\n (click)=\"cancelClick.emit($event)\"\n />\n ",
586
+ animations: [
587
+ animations.trigger("showHideSignature", [
588
+ animations.state("void", animations.style({ transform: "translate(-50%, -50%) scale(0)" })),
589
+ animations.state("*", animations.style({ transform: "translate(-50%, -50%) scale(1)" })),
590
+ animations.transition("void <=> *", animations.animate("200ms ease-in-out")),
591
+ ])
592
+ ],
593
+ encapsulation: i0.ViewEncapsulation.None
594
+ },] }
595
+ ];
596
+ DocsignComponent.propDecorators = {
597
+ iframe: [{ type: i0.ViewChild, args: ["iframe", { read: i0.ElementRef },] }],
598
+ pdf: [{ type: i0.Input }],
599
+ firstSignatureLabel: [{ type: i0.Input }],
600
+ firstSignatureField: [{ type: i0.Input }],
601
+ secondSignatureLabel: [{ type: i0.Input }],
602
+ secondSignatureField: [{ type: i0.Input }],
603
+ saveButtonLabel: [{ type: i0.Input }],
604
+ clearButtonLabel: [{ type: i0.Input }],
605
+ signDocumentButtonLabel: [{ type: i0.Input }],
606
+ cancelButtonLabel: [{ type: i0.Input }],
607
+ pdfSaved: [{ type: i0.Output }],
608
+ cancelClick: [{ type: i0.Output }],
609
+ showClass: [{ type: i0.HostBinding, args: ['class.ione-docsign',] }]
610
+ };
611
+
612
+ var SignatureComponent = /** @class */ (function () {
613
+ function SignatureComponent() {
614
+ this.saveButtonLabel = 'SAVE';
615
+ this.clearButtonLabel = 'CLEAR';
616
+ this.save = new i0.EventEmitter();
617
+ }
618
+ Object.defineProperty(SignatureComponent.prototype, "content", {
619
+ set: function (content) {
620
+ if (content) {
621
+ this.signatureCanvas = content;
622
+ this._initCanvas();
623
+ }
624
+ },
625
+ enumerable: false,
626
+ configurable: true
627
+ });
628
+ SignatureComponent.prototype.showClass = function () {
629
+ return true;
630
+ };
631
+ SignatureComponent.prototype.handleSave = function (event) {
632
+ // save canvas as svg
633
+ // const sig: string = this.signature.toDataURL("image/svg+xml");
634
+ var sig = this.signature.toDataURL("image/png");
635
+ // emit signature string
636
+ this.save.next(sig);
637
+ };
638
+ SignatureComponent.prototype.handleClear = function (event) {
639
+ if (this.signature) {
640
+ this.signature.clear();
641
+ }
642
+ };
643
+ SignatureComponent.prototype._initCanvas = function () {
644
+ var _this = this;
645
+ if (this.signatureCanvas && this.signatureCanvas.nativeElement) {
646
+ this.signature = new SignaturePad__default["default"](this.signatureCanvas.nativeElement);
647
+ setTimeout(function () {
648
+ _this._resizeSignatureCanvas(_this.signature, _this.signatureCanvas);
649
+ });
650
+ }
651
+ };
652
+ SignatureComponent.prototype._resizeSignatureCanvas = function (signature, signatureCanvas) {
653
+ var imageBeforeResize = signature.toDataURL();
654
+ var ratio = Math.max(window.devicePixelRatio || 1, 1);
655
+ signatureCanvas.nativeElement.width = signatureCanvas.nativeElement.offsetWidth * ratio;
656
+ signatureCanvas.nativeElement.height = signatureCanvas.nativeElement.offsetHeight * ratio;
657
+ signatureCanvas.nativeElement.getContext("2d").scale(ratio, ratio);
658
+ signature.fromDataURL(imageBeforeResize);
659
+ };
660
+ return SignatureComponent;
661
+ }());
662
+ SignatureComponent.decorators = [
663
+ { type: i0.Component, args: [{
664
+ selector: "ione-signature",
665
+ template: "\n <div class=\"signature-wrapper\">\n <div class=\"signature-header\">\n <span *ngIf=\"title\" class=\"title\" [textContent]=\"title\"></span>\n <div class=\"button-wrapper\">\n <input type=\"button\" (click)=\"handleSave($event)\" [value]=\"saveButtonLabel\"/>\n <input type=\"button\" (click)=\"handleClear($event)\" [value]=\"clearButtonLabel\">\n </div>\n </div>\n <div class=\"canvas\">\n <canvas #signature></canvas>\n </div>\n </div>\n ",
666
+ encapsulation: i0.ViewEncapsulation.None
667
+ },] }
668
+ ];
669
+ SignatureComponent.propDecorators = {
670
+ content: [{ type: i0.ViewChild, args: ["signature", { read: i0.ElementRef },] }],
671
+ title: [{ type: i0.Input }],
672
+ saveButtonLabel: [{ type: i0.Input }],
673
+ clearButtonLabel: [{ type: i0.Input }],
674
+ save: [{ type: i0.Output }],
675
+ showClass: [{ type: i0.HostBinding, args: ["class.ione-signature",] }]
676
+ };
677
+
678
+ var SignaturesComponent = /** @class */ (function () {
679
+ function SignaturesComponent() {
680
+ this.showFirstSignature = false;
681
+ this.showSecondSignature = false;
682
+ this.saveButtonLabel = 'SAVE';
683
+ this.clearButtonLabel = 'CLEAR';
684
+ this.saveFirstSignature = new i0.EventEmitter();
685
+ this.saveSecondSignature = new i0.EventEmitter();
686
+ }
687
+ SignaturesComponent.prototype.showClass = function () {
688
+ return true;
689
+ };
690
+ return SignaturesComponent;
691
+ }());
692
+ SignaturesComponent.decorators = [
693
+ { type: i0.Component, args: [{
694
+ selector: "ione-signatures",
695
+ template: "\n <ione-signature *ngIf=\"showFirstSignature\"\n [title]=\"firstSignatureTitle\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (save)=\"saveFirstSignature.emit($event)\"></ione-signature>\n <ione-signature *ngIf=\"showSecondSignature\"\n [title]=\"secondSignatureTitle\"\n [saveButtonLabel]=\"saveButtonLabel\"\n [clearButtonLabel]=\"clearButtonLabel\"\n (save)=\"saveSecondSignature.emit($event)\"></ione-signature>\n ",
696
+ encapsulation: i0.ViewEncapsulation.None
697
+ },] }
698
+ ];
699
+ SignaturesComponent.propDecorators = {
700
+ showFirstSignature: [{ type: i0.Input }],
701
+ firstSignatureTitle: [{ type: i0.Input }],
702
+ showSecondSignature: [{ type: i0.Input }],
703
+ secondSignatureTitle: [{ type: i0.Input }],
704
+ saveButtonLabel: [{ type: i0.Input }],
705
+ clearButtonLabel: [{ type: i0.Input }],
706
+ saveFirstSignature: [{ type: i0.Output }],
707
+ saveSecondSignature: [{ type: i0.Output }],
708
+ showClass: [{ type: i0.HostBinding, args: ["class.ione-signatures",] }]
709
+ };
710
+
711
+ var DocsignModule = /** @class */ (function () {
712
+ function DocsignModule() {
713
+ }
714
+ return DocsignModule;
715
+ }());
716
+ DocsignModule.decorators = [
717
+ { type: i0.NgModule, args: [{
718
+ imports: [
719
+ common.CommonModule
720
+ ],
721
+ declarations: [
722
+ DocsignComponent,
723
+ SignatureComponent,
724
+ SignaturesComponent
725
+ ],
726
+ exports: [
727
+ DocsignComponent
728
+ ]
729
+ },] }
730
+ ];
731
+
732
+ var PROP_META_KEY$3 = "complexField";
733
+ /**
734
+ * !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
735
+ */
736
+ /**
737
+ * Property decorator for properties of businessobject classes that are other strongly typed businessobjects.
738
+ * Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
739
+ * to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
740
+ *
741
+ * Usage:
742
+ *
743
+ * @ComplexField(Transaction)
744
+ * public transaction: Transaction
745
+ *
746
+ * Also keeps track of a "complexFieldProps" metadata on the class-level, as a reflect-metadata workaround to be able to
747
+ * retrieve all properties that have the @ComplexField(..) decorator (impossible with current Reflect API).
748
+ */
749
+ function ComplexField(type) {
750
+ return function (target, propertyKey) {
751
+ if (!target || !propertyKey) {
752
+ return;
753
+ }
754
+ // warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
755
+ // to be immediately processed when a class is first imported
756
+ if (!type) {
757
+ // eslint-disable-next-line no-console
758
+ console.warn("@ComplexField(type): type was UNDEFINED. Called on prop (" + objectUtils.ObjectUtils.GetClassName(target) + ", " + propertyKey + "). " +
759
+ "Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS " +
760
+ "where both classes and their dependencies are used, e.g. factory, repository or models..");
761
+ return;
762
+ }
763
+ Reflect.defineMetadata(PROP_META_KEY$3, type, target, propertyKey);
764
+ };
765
+ }
766
+ // Utility function holder of the ComplexFieldDecorator decorator.
767
+ var ComplexFieldDecorator = /** @class */ (function () {
768
+ function ComplexFieldDecorator() {
769
+ }
770
+ /**
771
+ * Returns whether given property (as a string) on given object is a complex field. A complex field is a field that is decorated
772
+ * with the @ComplexField decorator.
773
+ */
774
+ ComplexFieldDecorator.IsComplexField = function (target, propertyKey) {
775
+ if (!target || !propertyKey || typeof target !== "object") {
776
+ return false;
777
+ }
778
+ return (notNill_function.notNill(Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey)));
779
+ };
780
+ // Returns the VALUE of the @ComplexField(VALUE) property decorator on the given propertyKey on the given modelObject.
781
+ ComplexFieldDecorator.GetComplexFieldType = function (target, propertyKey) {
782
+ if (!target || !propertyKey || typeof target !== "object") {
783
+ return undefined;
784
+ }
785
+ return Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey);
786
+ };
787
+ return ComplexFieldDecorator;
788
+ }());
789
+
790
+ var PROP_META_KEY$2 = "complexArray";
791
+ /**
792
+ * !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
793
+ */
794
+ /**
795
+ * Property decorator for properties of businessobject classes that are an array of other strongly typed businessobjects.
796
+ * Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
797
+ * to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
798
+ *
799
+ * Usage:
800
+ *
801
+ * @ComplexArray(TransactionLine)
802
+ * public transactionLines: TransactionLine[]
803
+ */
804
+ function ComplexArray(type) {
805
+ return function (target, propertyKey) {
806
+ if (!target || !propertyKey || typeof target !== "object") {
807
+ return;
808
+ }
809
+ // warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
810
+ // to be immediately processed when a class is first imported
811
+ if (!type) {
812
+ console.warn("@ComplexArray(type): type was UNDEFINED. Called on prop (" + objectUtils.ObjectUtils.GetClassName(target) + ", " + propertyKey + "). " +
813
+ "Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS " +
814
+ "where both classes and their dependencies are used, e.g. factory, repository or models..");
815
+ return;
816
+ }
817
+ Reflect.defineMetadata(PROP_META_KEY$2, type, target, propertyKey);
818
+ };
819
+ }
820
+ // Utility function holder of the ComplexArrayDecorator decorator.
821
+ var ComplexArrayDecorator = /** @class */ (function () {
822
+ function ComplexArrayDecorator() {
823
+ }
824
+ /**
825
+ * Returns whether given property (as a string) on given object is a complex array. A complex array is an array field that is decorated
826
+ * with the @ComplexArray decorator.
827
+ */
828
+ ComplexArrayDecorator.IsComplexArray = function (target, propertyKey) {
829
+ if (!target || !propertyKey || typeof target !== "object") {
830
+ return false;
831
+ }
832
+ return (notNill_function.notNill(Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey)));
833
+ };
834
+ /**
835
+ * Returns the VALUE of the @ComplexArray(VALUE) property decorator on the given propertyKey on the given modelobject.
836
+ */
837
+ ComplexArrayDecorator.GetComplexArrayType = function (target, propertyKey) {
838
+ if (!target || !propertyKey || typeof target !== "object") {
839
+ return undefined;
840
+ }
841
+ return Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey);
842
+ };
843
+ return ComplexArrayDecorator;
844
+ }());
845
+
846
+ var PROP_META_KEY_JN = "booleanTextJN";
847
+ var PROP_META_KEY_TF = "booleanTextTF";
848
+ var PROP_META_KEY_10 = "booleanText10";
849
+ /**
850
+ * There are 'J', 'T', 'N', 'F', 0 and 1 'boolean values' in the database. These should be translated to true and false boolean values in
851
+ * our client application.
852
+ *
853
+ * The values 'J' and 'N' seem to be most commonly used. This is the default setting when using this decorator.
854
+ * You can pass 'T' or 1 for the other variants as follows:
855
+ *
856
+ * Usage:
857
+ *
858
+ * @BooleanText() or @BooleanText("J") (the default, uses YesNoDbType char values)
859
+ * public foo: boolean // 'J' and 'N' become true and false after BusinessObjectFactoryService and -SerializerService processing
860
+ *
861
+ * @BooleanText('T') (uses TrueFalseDbType char values)
862
+ * public bar: boolean // 'T' and 'F' become true and false after BusinessObjectFactoryService and -SerializerService processing
863
+ *
864
+ * @BooleanText(1)
865
+ * public baz: boolean // 1 and 0 become true and false after BusinessObjectFactoryService and -SerializerService processing
866
+ */
867
+ function BooleanText(type) {
868
+ return function (target, propertyKey) {
869
+ if (!target || !propertyKey) {
870
+ return;
871
+ }
872
+ // by default, it's a J N boolean text
873
+ if (!type || type === "J") {
874
+ Reflect.defineMetadata(PROP_META_KEY_JN, true, target, propertyKey);
875
+ }
876
+ else if (type === "T") {
877
+ Reflect.defineMetadata(PROP_META_KEY_TF, true, target, propertyKey);
878
+ }
879
+ else if (type === 1) {
880
+ Reflect.defineMetadata(PROP_META_KEY_10, true, target, propertyKey);
881
+ }
882
+ };
883
+ }
884
+ // Utility function holder of the BooleanTextDecorator decorator.
885
+ var BooleanTextDecorator = /** @class */ (function () {
886
+ function BooleanTextDecorator() {
887
+ }
888
+ /**
889
+ * Returns whether given property (as a string) on given object is a boolean text field. That is, it's a field that is decorated
890
+ * with the @BooleanText decorator.
891
+ */
892
+ BooleanTextDecorator.IsBooleanTextField = function (target, propertyKey) {
893
+ if (!target || !propertyKey || typeof target !== "object") {
894
+ return false;
895
+ }
896
+ return (Reflect.getMetadata(PROP_META_KEY_JN, target, propertyKey) === true
897
+ ||
898
+ Reflect.getMetadata(PROP_META_KEY_TF, target, propertyKey) === true
899
+ ||
900
+ Reflect.getMetadata(PROP_META_KEY_10, target, propertyKey) === true);
901
+ };
902
+ /**
903
+ * Returns the logical true or false value of given character ('J', 'N', 'T' or 'F') or number (0 or 1).
904
+ * Returns UNDEFINED if given boolChar was not recognised as a boolean text.
905
+ */
906
+ BooleanTextDecorator.GetLogicalBooleanValue = function (dbBoolChar) {
907
+ return dbBooleanValueType_enum.GetLogicalBooleanValue(dbBoolChar);
908
+ };
909
+ /**
910
+ * Returns the boolean character / number of given logical bool property on target object. Uses its @BooleanText() annotation to decide
911
+ * what character / number to return.
912
+ * Used in BusinessObjectSerializerServiceService to convert logical bools to their original boolean character.
913
+ * @returns {string|number} The original, reverse-engineered boolean character (or number) of given object property, or undefined.
914
+ */
915
+ BooleanTextDecorator.GetDbBooleanValue = function (target, propertyKey) {
916
+ if (!target || !propertyKey || typeof target !== "object") {
917
+ return undefined;
918
+ }
919
+ var dbBoolVal = undefined;
920
+ var curBoolVal = target[propertyKey];
921
+ if (BooleanTextDecorator._IsJaNeeProp(target, propertyKey)) {
922
+ dbBoolVal = yesNoDbType_enum.GetYesNoDbBooleanValue(curBoolVal);
923
+ }
924
+ else if (BooleanTextDecorator._IsTrueFalseProp(target, propertyKey)) {
925
+ dbBoolVal = trueFalseDbType_enum.GetTrueFalseDbBooleanValue(curBoolVal);
926
+ }
927
+ else if (BooleanTextDecorator._IsZeroOneProp(target, propertyKey)) {
928
+ dbBoolVal = oneZeroBoolDbType_enum.GetOneZeroDbBooleanValue(curBoolVal);
929
+ }
930
+ return dbBoolVal;
931
+ };
932
+ BooleanTextDecorator._IsJaNeeProp = function (target, propertyKey) {
933
+ return BooleanTextDecorator._IsProp(PROP_META_KEY_JN, target, propertyKey);
934
+ };
935
+ BooleanTextDecorator._IsTrueFalseProp = function (target, propertyKey) {
936
+ return BooleanTextDecorator._IsProp(PROP_META_KEY_TF, target, propertyKey);
937
+ };
938
+ BooleanTextDecorator._IsZeroOneProp = function (target, propertyKey) {
939
+ return BooleanTextDecorator._IsProp(PROP_META_KEY_10, target, propertyKey);
940
+ };
941
+ BooleanTextDecorator._IsProp = function (prop, target, propertyKey) {
942
+ return !!target && !!propertyKey && typeof target === "object" && Reflect.hasMetadata(prop, target, propertyKey);
943
+ };
944
+ return BooleanTextDecorator;
945
+ }());
946
+
947
+ var PROP_META_KEY$1 = "dateField";
948
+ /**
949
+ * !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
950
+ */
951
+ /**
952
+ * Property decorator for properties of businessobject classes that are of type Date, but are sent to us as strings.
953
+ * Ensures that the BusinessObjectFactory makes proper JavaScript Date objects from incoming strings for @DateField() decorated properties.
954
+ *
955
+ * Usage:
956
+ *
957
+ * @DateField()
958
+ * public expectedDeliveryDate: Date
959
+ */
960
+ function DateField() {
961
+ return function (target, propertyKey) {
962
+ if (!target || !propertyKey) {
963
+ return;
964
+ }
965
+ Reflect.defineMetadata(PROP_META_KEY$1, undefined, target, propertyKey);
966
+ };
967
+ }
968
+ // Utility function holder of the @DateField() decorator.
969
+ var DateFieldFieldDecorator = /** @class */ (function () {
970
+ function DateFieldFieldDecorator() {
971
+ }
972
+ // Returns whether given property (as a string) on given object is decorated with @DateField().
973
+ DateFieldFieldDecorator.IsDateField = function (target, propertyKey) {
974
+ if (!target || !propertyKey || typeof target !== "object") {
975
+ return false;
976
+ }
977
+ return Reflect.hasMetadata(PROP_META_KEY$1, target, propertyKey);
978
+ };
979
+ DateFieldFieldDecorator.StringAsDate = function (str) {
980
+ return dateUtils.DateUtils.StringAsDate(str);
981
+ };
982
+ return DateFieldFieldDecorator;
983
+ }());
984
+
985
+ var PROP_META_KEY = "stringNumber";
986
+ /**
987
+ * !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
988
+ */
989
+ /**
990
+ * Decorator for properties of businessobjects that are sent to us as strings from the database, but which we want to use as a number in the client.
991
+ *
992
+ * Can be handy for incongruent backend api cases, where id data types are communicated wrongly via strings instead of numbers
993
+ * (e.g. on EmployeeFullObject.district, points to a District which has a number id, but in employee it's a string representation of that number...)
994
+ *
995
+ * Used by business object factory and -serializer.
996
+ *
997
+ * Usage:
998
+ *
999
+ * @StringNumber()
1000
+ * public rights: UserRightType
1001
+ */
1002
+ function StringNumber() {
1003
+ return function (target, propertyKey) {
1004
+ if (!target || !propertyKey) {
1005
+ return;
1006
+ }
1007
+ Reflect.defineMetadata(PROP_META_KEY, undefined, target, propertyKey);
1008
+ };
1009
+ }
1010
+ // Utility function holder of the @StringNumber() decorator.
1011
+ var StringNumberDecorator = /** @class */ (function () {
1012
+ function StringNumberDecorator() {
1013
+ }
1014
+ // Returns whether given property (as a string) on given object is decorated with @StringNumber().
1015
+ StringNumberDecorator.IsStringNumber = function (target, propertyKey) {
1016
+ if (!target || !propertyKey || typeof target !== "object") {
1017
+ return false;
1018
+ }
1019
+ return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
1020
+ };
1021
+ StringNumberDecorator.StringAsNumber = function (str) {
1022
+ return numberUtils.NumberUtils.ParseFloatKeepPrecision(str);
1023
+ };
1024
+ StringNumberDecorator.NumberAsString = function (nr) {
1025
+ return "" + nr;
1026
+ };
1027
+ return StringNumberDecorator;
1028
+ }());
1029
+
1030
+ // @returns true iff given value equals null or equals undefined
1031
+ function isNill(value) {
1032
+ return value === null || value === undefined;
1033
+ }
1034
+
1035
+ var ArrayUtils = /** @class */ (function () {
1036
+ function ArrayUtils() {
1037
+ }
1038
+ /**
1039
+ * Returns whether at least one element in given array could be found by given finder function.
1040
+ *
1041
+ * @param {T[]} array
1042
+ * @param {(element: T) => boolean} finder A finder function that takes an element of the array and returns a boolean that represents
1043
+ * the 'found status' for that element; whether it should have been found or not.
1044
+ */
1045
+ ArrayUtils.ContainsAnElementFoundBy = function (array, finder) {
1046
+ if (!array || !finder) {
1047
+ return false;
1048
+ }
1049
+ return notNill_function.notNill(this.Find(array, finder));
1050
+ };
1051
+ /**
1052
+ * Cross-browser Array.find() function. Returns the first item in given array for which the foundBy function returns true. Returns
1053
+ * undefined when none was found.
1054
+ *
1055
+ * Example usage:
1056
+ * const foundItem: BusinessObject = ArrayUtils.Find<BusinessObject>(modelArray, (modelItem: BusinessObject) => <br>
1057
+ * (return modelItem.getId() === '1')
1058
+ * * });
1059
+ *
1060
+ * @param array The array with items to search in.
1061
+ * @param foundBy The finder function applied on each items of the array, when that returns true, the item is considered found.
1062
+ */
1063
+ ArrayUtils.Find = function (array, foundBy) {
1064
+ if (!array || !foundBy) {
1065
+ return undefined;
1066
+ }
1067
+ for (var i = 0, len = array.length; i < len; i++) {
1068
+ var itemCur = array[i];
1069
+ if (foundBy(itemCur)) {
1070
+ return itemCur;
1071
+ }
1072
+ }
1073
+ return undefined;
1074
+ };
1075
+ // @returns empty array when nothing found, otherwise array with found items
1076
+ ArrayUtils.FindAll = function (array, foundBy) {
1077
+ var answer = [];
1078
+ if (!array || !foundBy) {
1079
+ return answer;
1080
+ }
1081
+ for (var i = 0, len = array.length; i < len; i++) {
1082
+ var itemCur = array[i];
1083
+ if (foundBy(itemCur)) {
1084
+ answer.push(itemCur);
1085
+ }
1086
+ }
1087
+ return answer;
1088
+ };
1089
+ // returns a simple clone of given array, using array.slice(0)
1090
+ ArrayUtils.CloneArray = function (array) {
1091
+ var answer = [];
1092
+ if (array) {
1093
+ answer = array.slice(0);
1094
+ }
1095
+ return answer;
1096
+ };
1097
+ /**
1098
+ * Returns a 'semi deep clone' of given array. Its first-level members are object-shallow-cloned (optionally with a strongly typed constructor),
1099
+ * or just as plain object (see param arrayItemsClass).
1100
+ * @param array
1101
+ * @param arrayItemsClass If provided, the cloned array's first-level items will be strongly typed to / constructed as this class. Otherwise
1102
+ * it'll be a plain object.
1103
+ * @param deepClone Set to true if array items contain FUNCTIONS that need to be cloned..
1104
+ * @returns {Array} semi-deep clone of given array
1105
+ */
1106
+ ArrayUtils.CloneArrayAndItsItems = function (array, arrayItemsClass, deepClone) {
1107
+ if (deepClone === void 0) { deepClone = false; }
1108
+ var cloneArray = [];
1109
+ if (array) {
1110
+ for (var i = 0, len = array.length; i < len; i++) {
1111
+ if (deepClone) {
1112
+ cloneArray.push(objectUtils.ObjectUtils.GetDeepClone(array[i]));
1113
+ }
1114
+ else {
1115
+ cloneArray.push(objectUtils.ObjectUtils.GetShallowClone(array[i], arrayItemsClass));
1116
+ }
1117
+ }
1118
+ }
1119
+ else {
1120
+ return [];
1121
+ }
1122
+ return cloneArray;
1123
+ };
1124
+ /**
1125
+ * Removes element at given index from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really
1126
+ * removes the element using splice().
1127
+ *
1128
+ * @param {number} index
1129
+ * @param {any[]} array in-out
1130
+ * @returns {boolean} True if and only if the element on given index is succesfully removed from given array.
1131
+ */
1132
+ ArrayUtils.RemoveElementAtIndex = function (index, array) {
1133
+ if (numberUtils.NumberUtils.IsNaN(index) || index < 0 || !Array.isArray(array) || array.length === 0) {
1134
+ return false;
1135
+ }
1136
+ if (index in array) {
1137
+ array.splice(index, 1);
1138
+ return true;
1139
+ }
1140
+ else {
1141
+ return false;
1142
+ }
1143
+ };
1144
+ /**
1145
+ * Removes given element from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really removes the
1146
+ * element using splice(). Also works on associative arrays.
1147
+ *
1148
+ * @param {T} element The element to remove.
1149
+ * @param {T[]} array The array to remove the element from.
1150
+ * @returns {boolean} True iff given element was truly successfully removed from given array.
1151
+ */
1152
+ ArrayUtils.RemoveElement = function (element, array) {
1153
+ if (!Array.isArray(array)) {
1154
+ return false;
1155
+ }
1156
+ var index = array.indexOf(element);
1157
+ return ArrayUtils.RemoveElementAtIndex(index, array);
1158
+ };
1159
+ // Checks if given array is defined, and is an array, and has length > 0, and, optionally checks that the first element is of type given clazz.
1160
+ ArrayUtils.IsArrayWithElements = function (arrayToCheck, classItemsMustBeInstanceOf) {
1161
+ if (isNill_function.isNill(arrayToCheck)) {
1162
+ return false;
1163
+ }
1164
+ if (Array.isArray(arrayToCheck) && arrayToCheck.length > 0) {
1165
+ if (classItemsMustBeInstanceOf) {
1166
+ return arrayToCheck[0] instanceof classItemsMustBeInstanceOf;
1167
+ }
1168
+ else {
1169
+ return true;
1170
+ }
1171
+ }
1172
+ else {
1173
+ return false;
1174
+ }
1175
+ };
1176
+ // Removes all elements from given array for which given filter function holds true. Returns true if at least one removed, else false.
1177
+ ArrayUtils.RemoveElementsByFilter = function (array, filterFunction) {
1178
+ if (!ArrayUtils.IsArrayWithElements(array) || !filterFunction) {
1179
+ return false;
1180
+ }
1181
+ var atLeastOneRemoved = false;
1182
+ var len = array.length;
1183
+ for (var i = len - 1; i >= 0; i--) {
1184
+ var item = array[i];
1185
+ if (filterFunction.call(this, item) === true) {
1186
+ array.splice(i, 1);
1187
+ atLeastOneRemoved = true;
1188
+ }
1189
+ }
1190
+ return atLeastOneRemoved;
1191
+ };
1192
+ ArrayUtils.MoveElement = function (element, toIndex, array) {
1193
+ if (!Array.isArray(array) || isNill_function.isNill(toIndex)) {
1194
+ return false;
1195
+ }
1196
+ var fromIndex = array.indexOf(element);
1197
+ var toIndexCorrected = numberUtils.NumberUtils.GetNearestNumberWithinBounds(toIndex, 0, array.length - 1);
1198
+ if (fromIndex === -1 || array[toIndexCorrected] === element) {
1199
+ // element did not exist in given array, or already existed on given toIndex
1200
+ return false;
1201
+ }
1202
+ array.splice(toIndexCorrected, 0, array.splice(fromIndex, 1)[0]);
1203
+ return true;
1204
+ };
1205
+ // PRE: elements exists in given array. POST: given elementToPlace has a lower index than given afterThisElement. Array is in-out manipulated.
1206
+ ArrayUtils.PlaceElementAfterOther = function (array, elementToPlace, afterThisElement) {
1207
+ if (array) {
1208
+ var afterThisElIdx = array.indexOf(afterThisElement);
1209
+ var elToPlaceIdx = array.indexOf(elementToPlace);
1210
+ if (afterThisElIdx >= elToPlaceIdx) {
1211
+ ArrayUtils.MoveElement(elementToPlace, afterThisElIdx + 1, array);
1212
+ }
1213
+ }
1214
+ };
1215
+ return ArrayUtils;
1216
+ }());
1217
+
1218
+ /**
1219
+ * This type represents the concept of a business object ID type. ID's of business objects can be a primary number, a simple string or a
1220
+ * object for a composite key.
1221
+ *
1222
+ * Simply to prevent type declarations of 'number | string | Object' for BO ID data all over the application.
1223
+ */
1224
+ var BusinessObject = /** @class */ (function () {
1225
+ function BusinessObject() {
1226
+ }
1227
+ // Overridable. Returns the ID of the model. Concrete model classes often override this method to provide their specific ID getter.
1228
+ BusinessObject.prototype.getId = function () {
1229
+ return this.id;
1230
+ };
1231
+ BusinessObject.prototype.setOwnMappedPropsFromRawData = function (rawData) {
1232
+ var _this = this;
1233
+ if (rawData === void 0) { rawData = {}; }
1234
+ if (!rawData) {
1235
+ return;
1236
+ }
1237
+ Object.keys(this).forEach(function (key) {
1238
+ // check if property needs to be mapped
1239
+ if (mapProperty_decorator.MapPropertyDecorator.IsMapProperty(_this, key)) {
1240
+ var mapKeys = mapProperty_decorator.MapPropertyDecorator.GetMapProperty(_this, key).split(",");
1241
+ var len = mapKeys.length;
1242
+ for (var i = 0; i < len; i++) {
1243
+ // eslint-disable-next-line
1244
+ var mapKey = mapKeys[i].trim();
1245
+ var objProp = rawData[mapKey];
1246
+ var decorated = false;
1247
+ if (rawData.hasOwnProperty(mapKey)) {
1248
+ if (boolean_decorator.BooleanTextDecorator.IsBooleanTextField(_this, key)) {
1249
+ _this[key] = boolean_decorator.BooleanTextDecorator.GetLogicalBooleanValue(objProp);
1250
+ decorated = true;
1251
+ }
1252
+ if (json_decorator.JsonFieldFieldDecorator.IsJsonField(_this, key)) {
1253
+ _this[key] = json_decorator.JsonFieldFieldDecorator.StringAsJson(objProp);
1254
+ decorated = true;
1255
+ }
1256
+ if (complexArray_decorator.ComplexArrayDecorator.IsComplexArray(_this, key)) {
1257
+ var arrayClass = complexArray_decorator.ComplexArrayDecorator.GetComplexArrayType(_this, key);
1258
+ // eslint-disable-next-line
1259
+ var origArray = _this[key];
1260
+ // eslint-disable-next-line
1261
+ var newArray = [];
1262
+ // eslint-disable-next-line @typescript-eslint/prefer-for-of
1263
+ for (var j = 0; j < origArray.length; j++) {
1264
+ // eslint-disable-next-line
1265
+ var item = new arrayClass(origArray[j]);
1266
+ newArray.push(item);
1267
+ }
1268
+ _this[key] = newArray;
1269
+ }
1270
+ else {
1271
+ if (!decorated) {
1272
+ _this[key] = objProp;
1273
+ }
1274
+ }
1275
+ break;
1276
+ }
1277
+ }
1278
+ }
1279
+ else {
1280
+ if (rawData.hasOwnProperty(key)) {
1281
+ var objProp = rawData[key];
1282
+ if (boolean_decorator.BooleanTextDecorator.IsBooleanTextField(_this, key)) {
1283
+ _this[key] = boolean_decorator.BooleanTextDecorator.GetLogicalBooleanValue(objProp);
1284
+ }
1285
+ else if (json_decorator.JsonFieldFieldDecorator.IsJsonField(_this, key)) {
1286
+ _this[key] = json_decorator.JsonFieldFieldDecorator.StringAsJson(objProp);
1287
+ }
1288
+ else {
1289
+ _this[key] = objProp;
1290
+ }
1291
+ }
1292
+ }
1293
+ });
1294
+ };
1295
+ return BusinessObject;
1296
+ }());
1297
+
1298
+ // Factory service creates businessobjects, using their decorators in the process.
1299
+ var BusinessObjectFactory = /** @class */ (function () {
1300
+ function BusinessObjectFactory() {
1301
+ }
1302
+ /**
1303
+ * Creates and returns a new business data object instance of given class, with all given data properties applied to it in a
1304
+ * complex-aware style. That is, all properties on given class that are decorated with @ComplexField(..) or @ComplexArray(..) decorators
1305
+ * become strongly typed business objects, with methods that are usable and such.
1306
+ *
1307
+ * @param modelClass
1308
+ * @param {Object} rawData The object with all (possibly raw/flat/not alive) data to be applied to the created model object
1309
+ */
1310
+ BusinessObjectFactory.prototype.makeWithRawBackendData = function (modelClass, rawData) {
1311
+ if (!modelClass) {
1312
+ return undefined;
1313
+ }
1314
+ if (typeof modelClass !== typeof BusinessObject) {
1315
+ return undefined;
1316
+ }
1317
+ var model = new modelClass();
1318
+ this._copyAllPropertiesDecoratorProcessedFrom(rawData, model);
1319
+ return model;
1320
+ };
1321
+ // see makeWithRawBackendData, this is a loop-wrapper around that method
1322
+ BusinessObjectFactory.prototype.makeBOArrayFromRawBackendDataArray = function (modelClass, arrayOfRawDatas) {
1323
+ if (!modelClass) {
1324
+ return undefined;
1325
+ }
1326
+ var trueClientBos = [];
1327
+ if (arrayOfRawDatas) {
1328
+ for (var i = 0, len = arrayOfRawDatas.length; i < len; i++) {
1329
+ trueClientBos.push(this.makeWithRawBackendData(modelClass, arrayOfRawDatas[i]));
1330
+ }
1331
+ }
1332
+ return trueClientBos;
1333
+ };
1334
+ BusinessObjectFactory.prototype.instantiateNewBo = function (modelClass) {
1335
+ return this.makeWithRawBackendData(modelClass, {});
1336
+ };
1337
+ /**
1338
+ * Applies all properties of given 'source' object to the given 'destination' businessobject, if destination has that property.
1339
+ * Works with the @ComplexField(), @ComplexArray, @BooleanText, @CoInject and @DateField annotations of given destination model.
1340
+ *
1341
+ * @param sourceData Raw data to copy to destination model
1342
+ * @param {BusinessObject} destinationModel InOut: The annotated businessobject to apply source properties to
1343
+ */
1344
+ BusinessObjectFactory.prototype._copyAllPropertiesDecoratorProcessedFrom = function (sourceData, destinationModel) {
1345
+ if (!sourceData || !destinationModel) {
1346
+ return;
1347
+ }
1348
+ // process all source data into destinationModel
1349
+ for (var srcPropKey in sourceData) {
1350
+ if (!sourceData.hasOwnProperty(srcPropKey)) {
1351
+ continue;
1352
+ }
1353
+ var srcPropVal = sourceData[srcPropKey];
1354
+ if (ComplexFieldDecorator.IsComplexField(destinationModel, srcPropKey)) {
1355
+ var classOfField = ComplexFieldDecorator.GetComplexFieldType(destinationModel, srcPropKey);
1356
+ destinationModel[srcPropKey] = this.makeWithRawBackendData(classOfField, srcPropVal);
1357
+ }
1358
+ else if (ComplexArrayDecorator.IsComplexArray(destinationModel, srcPropKey)) {
1359
+ var sourceArray = srcPropVal;
1360
+ if (!sourceArray) {
1361
+ continue;
1362
+ }
1363
+ var classOfArrayItems = ComplexArrayDecorator.GetComplexArrayType(destinationModel, srcPropKey);
1364
+ var tempArray = [];
1365
+ for (var i = 0, len = sourceArray.length; i < len; i++) {
1366
+ tempArray.push(this.makeWithRawBackendData(classOfArrayItems, sourceArray[i]));
1367
+ }
1368
+ destinationModel[srcPropKey] = tempArray;
1369
+ }
1370
+ else if (BooleanTextDecorator.IsBooleanTextField(destinationModel, srcPropKey)) {
1371
+ // logical 'true' and 'false' also allowed as incoming values for @BooleanText() properties: then just copy their value
1372
+ if (typeof srcPropVal === "boolean") {
1373
+ destinationModel[srcPropKey] = srcPropVal;
1374
+ // here, it should be a 'J' or 'N' (or 'T' or 'F'): assign the associated boolean value
1375
+ }
1376
+ else {
1377
+ destinationModel[srcPropKey] = BooleanTextDecorator.GetLogicalBooleanValue(srcPropVal);
1378
+ }
1379
+ }
1380
+ else if (DateFieldFieldDecorator.IsDateField(destinationModel, srcPropKey)) {
1381
+ destinationModel[srcPropKey] = DateFieldFieldDecorator.StringAsDate(srcPropVal);
1382
+ }
1383
+ else if (StringNumberDecorator.IsStringNumber(destinationModel, srcPropKey)) {
1384
+ destinationModel[srcPropKey] = StringNumberDecorator.StringAsNumber(srcPropVal);
1385
+ }
1386
+ // non-decorated prop
1387
+ else {
1388
+ if (isNill(srcPropVal)) {
1389
+ destinationModel[srcPropKey] = undefined;
1390
+ }
1391
+ else if (Array.isArray(srcPropVal)) {
1392
+ destinationModel[srcPropKey] = ArrayUtils.CloneArray(srcPropVal);
1393
+ }
1394
+ else if (typeof srcPropVal === "object") {
1395
+ if (srcPropVal instanceof Map) { //just copy the value in case of maps
1396
+ destinationModel[srcPropKey] = srcPropVal;
1397
+ }
1398
+ else {
1399
+ destinationModel[srcPropKey] = Object.assign({}, srcPropVal);
1400
+ }
1401
+ }
1402
+ else {
1403
+ destinationModel[srcPropKey] = srcPropVal;
1404
+ }
1405
+ }
1406
+ }
1407
+ };
1408
+ return BusinessObjectFactory;
1409
+ }());
1410
+
1411
+ var LanguageCode;
1412
+ (function (LanguageCode) {
1413
+ LanguageCode["Dutch"] = "nl-NL";
1414
+ LanguageCode["English"] = "en-GB";
1415
+ LanguageCode["German"] = "de-DE";
1416
+ LanguageCode["French"] = "fr-FR";
1417
+ })(LanguageCode || (LanguageCode = {}));
1418
+
1419
+ // Static utility functions holder related to strings.
1420
+ var StringUtils = /** @class */ (function () {
1421
+ function StringUtils() {
1422
+ }
1423
+ /**
1424
+ * Returns a new string where given placeholder in given source string are replaced by given replacement texts.
1425
+ *
1426
+ * Example usage:
1427
+ *
1428
+ * source = "ABCDABCD"
1429
+ * placeholder = "BC"
1430
+ * replacementTexts = "Z", "Z" (REST arguments)
1431
+ * OUTPUT = "AZDAZD"
1432
+ *
1433
+ * @param {string} source
1434
+ * @param {string} placeholder
1435
+ * @param {string} replacementTexts If only one is given, this function replaces all placeholders with that single replacementText.
1436
+ * If more are given, placeholders without a corresponding replacementText will remain their original placeholder characters.
1437
+ */
1438
+ StringUtils.ReplaceOccurrencesIn = function (source, placeholder) {
1439
+ var replacementTexts = [];
1440
+ for (var _i = 2; _i < arguments.length; _i++) {
1441
+ replacementTexts[_i - 2] = arguments[_i];
1442
+ }
1443
+ // parameter guards
1444
+ if (!(source)) {
1445
+ return undefined;
1446
+ }
1447
+ if (!placeholder || replacementTexts.length === 0) {
1448
+ return source;
1449
+ }
1450
+ var outString = source;
1451
+ // one replacementText means replace for all
1452
+ if (replacementTexts.length === 1) {
1453
+ // "g" is the g flag to replace globally
1454
+ outString = outString.replace(placeholder, replacementTexts[0]);
1455
+ }
1456
+ else {
1457
+ // replace occurence i by replacementTexts[i], one at a time in loop (there might be a faster way..)
1458
+ for (var i = 0, len = replacementTexts.length; i < len; i++) {
1459
+ outString = outString.replace(placeholder, replacementTexts[i]);
1460
+ }
1461
+ }
1462
+ return outString;
1463
+ };
1464
+ // Returns the given argument as a string. Returns given defaultValue if conversion of argument to string was impossible.
1465
+ StringUtils.ParseString = function (arg, defaultValue) {
1466
+ if (defaultValue === void 0) { defaultValue = ""; }
1467
+ if (!StringUtils.IsString(arg)) {
1468
+ if (arg && typeof arg.toString === "function") {
1469
+ arg = arg.toString();
1470
+ }
1471
+ else {
1472
+ arg = defaultValue;
1473
+ }
1474
+ }
1475
+ return arg;
1476
+ };
1477
+ StringUtils.IsString = function (str) {
1478
+ return typeof str === 'string';
1479
+ };
1480
+ // Returns whether given str is a string and has a length > 0.
1481
+ StringUtils.IsStringWithLength = function (str) {
1482
+ return str && StringUtils.IsString(str) && str.length > 0;
1483
+ };
1484
+ // Returns given string, escaped for use as string literal in regular expressions.
1485
+ StringUtils._escapeRegExp = function (str) {
1486
+ return str; // .replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^$\|]/g, "\\$&");
1487
+ };
1488
+ return StringUtils;
1489
+ }());
1490
+
1491
+ var Dictionary = /** @class */ (function () {
1492
+ function Dictionary() {
1493
+ this.strings = {
1494
+ "nl": {},
1495
+ "de": {},
1496
+ "fr": {},
1497
+ "en": {},
1498
+ };
1499
+ }
1500
+ return Dictionary;
1501
+ }());
1502
+
1503
+ // The localization service, providing peers with text translation functionality.
1504
+ var DictionaryService = /** @class */ (function () {
1505
+ function DictionaryService() {
1506
+ this.dictionaryUrl = "js/browser/res/dictionary/";
1507
+ // private _dictionaryPromise: Map<LanguageCode, Promise<{ [key: string]: string }>> = new Map<LanguageCode, Promise<{ [key: string]: string }>>();
1508
+ this._dictionaries = new Map();
1509
+ // Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
1510
+ this._placeholder = "|~";
1511
+ }
1512
+ Object.defineProperty(DictionaryService.prototype, "language", {
1513
+ get: function () {
1514
+ return this._language;
1515
+ },
1516
+ enumerable: false,
1517
+ configurable: true
1518
+ });
1519
+ Object.defineProperty(DictionaryService.prototype, "rootUrl", {
1520
+ set: function (value) {
1521
+ this._rootUrl = value;
1522
+ this._dictBasePath = this._rootUrl + "/" + this.dictionaryUrl;
1523
+ },
1524
+ enumerable: false,
1525
+ configurable: true
1526
+ });
1527
+ // Loads the dictionary for given language in memory.
1528
+ DictionaryService.prototype.setDictionary = function (language) {
1529
+ return __awaiter(this, void 0, void 0, function () {
1530
+ return __generator(this, function (_a) {
1531
+ this._language = language || LanguageCode.Dutch;
1532
+ this._loadDictionary();
1533
+ return [2 /*return*/];
1534
+ });
1535
+ });
1536
+ };
1537
+ DictionaryService.prototype._loadDictionary = function () {
1538
+ if (!this._dictionaries.has(this._language)) {
1539
+ var dictionary = new Dictionary();
1540
+ // eslint-disable-next-line no-magic-numbers
1541
+ if (dictionary.strings[this._language.substr(0, 2).toLowerCase()] !== undefined) {
1542
+ // eslint-disable-next-line no-magic-numbers
1543
+ this._dictionaries.set(this._language, dictionary.strings[this._language.substr(0, 2).toLowerCase()]);
1544
+ }
1545
+ }
1546
+ };
1547
+ /**
1548
+ * Returns the localized text for the given dictionary key.
1549
+ * @param {string} key
1550
+ * @param {boolean} [upperCaseFirst = true] False for first letter lowercase, true for first letter uppercase for returned dict val
1551
+ * @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
1552
+ * @returns {string} The translated text for given dictionary key
1553
+ */
1554
+ DictionaryService.prototype.get = function (key, upperCaseFirst) {
1555
+ if (upperCaseFirst === void 0) { upperCaseFirst = true; }
1556
+ var replacementTexts = [];
1557
+ for (var _i = 2; _i < arguments.length; _i++) {
1558
+ replacementTexts[_i - 2] = arguments[_i];
1559
+ }
1560
+ if (!StringUtils.IsStringWithLength(key)) {
1561
+ return key || "";
1562
+ }
1563
+ if (this.language === undefined) {
1564
+ this._language = LanguageCode.Dutch;
1565
+ this._loadDictionary();
1566
+ }
1567
+ var text = this._dictionaries.get(this.language)[key];
1568
+ text = StringUtils.IsStringWithLength(text) ? text : key;
1569
+ if (upperCaseFirst) {
1570
+ text = text.charAt(0).toUpperCase() + text.slice(1);
1571
+ }
1572
+ else {
1573
+ text = text.charAt(0).toLowerCase() + text.slice(1);
1574
+ }
1575
+ if (replacementTexts.length > 0) {
1576
+ text = StringUtils.ReplaceOccurrencesIn.apply(StringUtils, __spreadArray([text, this._placeholder], __read(replacementTexts)));
1577
+ }
1578
+ return text;
1579
+ };
1580
+ return DictionaryService;
1581
+ }());
1582
+ DictionaryService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DictionaryService_Factory() { return new DictionaryService(); }, token: DictionaryService, providedIn: "root" });
1583
+ DictionaryService.decorators = [
1584
+ { type: i0.Injectable, args: [{
1585
+ providedIn: "root"
1586
+ },] }
1587
+ ];
1588
+ DictionaryService.ctorParameters = function () { return []; };
1589
+
1590
+ var OptionsService = /** @class */ (function () {
1591
+ function OptionsService(_dictionary) {
1592
+ this._dictionary = _dictionary;
1593
+ this.optionsInitialized = new rxjs.BehaviorSubject(false);
1594
+ this.optionsLoaded = new rxjs.BehaviorSubject(false);
1595
+ }
1596
+ Object.defineProperty(OptionsService.prototype, "options", {
1597
+ get: function () {
1598
+ return this._options;
1599
+ },
1600
+ set: function (value) {
1601
+ this._options = value;
1602
+ },
1603
+ enumerable: false,
1604
+ configurable: true
1605
+ });
1606
+ OptionsService.prototype.createSettingsFromObject = function (obj) {
1607
+ return __awaiter(this, void 0, void 0, function () {
1608
+ return __generator(this, function (_a) {
1609
+ this.options = new Object();
1610
+ if (obj.hasOwnProperty("url")) {
1611
+ this.options.url = obj["url"];
1612
+ }
1613
+ if (obj.hasOwnProperty("schema")) {
1614
+ this.options.schema = obj["schema"];
1615
+ }
1616
+ if (obj.hasOwnProperty("version")) {
1617
+ this.options.version = obj["version"];
1618
+ }
1619
+ if (obj.hasOwnProperty("languageCode")) {
1620
+ this.options.languageCode = obj["languageCode"];
1621
+ }
1622
+ else {
1623
+ this.options.languageCode = "NL";
1624
+ }
1625
+ if (obj.hasOwnProperty("username")) {
1626
+ this.options.username = obj["username"];
1627
+ }
1628
+ if (obj.hasOwnProperty("password")) {
1629
+ this.options.password = obj["password"];
1630
+ }
1631
+ if (obj.hasOwnProperty("session")) {
1632
+ this.options.session = obj["session"];
1633
+ }
1634
+ if (obj.hasOwnProperty("useLoginEncryption")) {
1635
+ this.options.useLoginEncryption = obj["useLoginEncryption"];
1636
+ }
1637
+ this.optionsLoaded.next(true);
1638
+ return [2 /*return*/];
1639
+ });
1640
+ });
1641
+ };
1642
+ OptionsService.prototype.initialize = function (options) {
1643
+ return __awaiter(this, void 0, void 0, function () {
1644
+ return __generator(this, function (_a) {
1645
+ switch (_a.label) {
1646
+ case 0:
1647
+ if (!options) return [3 /*break*/, 3];
1648
+ return [4 /*yield*/, this.createSettingsFromObject(options)];
1649
+ case 1:
1650
+ _a.sent();
1651
+ return [4 /*yield*/, this._dictionary.setDictionary(this.options.languageCode)];
1652
+ case 2:
1653
+ _a.sent();
1654
+ this.optionsInitialized.next(true);
1655
+ _a.label = 3;
1656
+ case 3: return [2 /*return*/];
1657
+ }
1658
+ });
1659
+ });
1660
+ };
1661
+ return OptionsService;
1662
+ }());
1663
+ OptionsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function OptionsService_Factory() { return new OptionsService(i0__namespace.ɵɵinject(DictionaryService)); }, token: OptionsService, providedIn: "root" });
1664
+ OptionsService.decorators = [
1665
+ { type: i0.Injectable, args: [{
1666
+ providedIn: "root"
1667
+ },] }
1668
+ ];
1669
+ OptionsService.ctorParameters = function () { return [
1670
+ { type: DictionaryService }
1671
+ ]; };
1672
+
1673
+ var SharedConnectorService = /** @class */ (function () {
1674
+ function SharedConnectorService(_optionsService) {
1675
+ this._optionsService = _optionsService;
1676
+ this._boFactory = new BusinessObjectFactory();
1677
+ }
1678
+ SharedConnectorService.prototype.connect = function () {
1679
+ return __awaiter(this, void 0, void 0, function () {
1680
+ return __generator(this, function (_a) {
1681
+ this.articleConnector = new articles.Articles(this._optionsService.options);
1682
+ this.sharedConnector = new sharedapi.Sharedapi(this._optionsService.options);
1683
+ return [2 /*return*/];
1684
+ });
1685
+ });
1686
+ };
1687
+ SharedConnectorService.prototype.getAllPrinters = function (showAll) {
1688
+ if (showAll === void 0) { showAll = true; }
1689
+ return __awaiter(this, void 0, void 0, function () {
1690
+ var _this = this;
1691
+ return __generator(this, function (_a) {
1692
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1693
+ return _this.sharedConnector.listAllPrinters(showAll).then(function (result) {
1694
+ if (result.validationResult && result.validationResult.success) {
1695
+ if (result.resultObject) {
1696
+ resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(printer_bo.Printer, result.resultObject));
1697
+ }
1698
+ }
1699
+ else {
1700
+ reject(result.validationMessagesAsString);
1701
+ }
1702
+ });
1703
+ })];
1704
+ });
1705
+ });
1706
+ };
1707
+ SharedConnectorService.prototype.getPrintStockStickers = function (request) {
1708
+ return __awaiter(this, void 0, void 0, function () {
1709
+ var _this = this;
1710
+ return __generator(this, function (_a) {
1711
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1712
+ return _this.sharedConnector.getPrintStockStickers(request).then(function (result) {
1713
+ if (result.validationResult && result.validationResult.success) {
1714
+ if (result.resultObject) {
1715
+ resolve(_this._boFactory.makeWithRawBackendData(printStockStickers.PrintStockStickers, result.resultObject));
1716
+ }
1717
+ }
1718
+ else {
1719
+ reject(result.validationMessagesAsString);
1720
+ }
1721
+ });
1722
+ })];
1723
+ });
1724
+ });
1725
+ };
1726
+ SharedConnectorService.prototype.getPrintPriceStickers = function (request) {
1727
+ return __awaiter(this, void 0, void 0, function () {
1728
+ var _this = this;
1729
+ return __generator(this, function (_a) {
1730
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1731
+ return _this.sharedConnector.printPriceStickers(request).then(function (result) {
1732
+ if (result.validationResult && result.validationResult.success) {
1733
+ if (result.resultObject) {
1734
+ resolve(_this._boFactory.makeWithRawBackendData(printPriceStickers_bo.PrintPriceStickers, result.resultObject));
1735
+ }
1736
+ }
1737
+ else {
1738
+ reject(result.validationMessagesAsString);
1739
+ }
1740
+ });
1741
+ })];
1742
+ });
1743
+ });
1744
+ };
1745
+ // public async getStockStickerPrintLayouts(stockStickersPrintLayouts: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
1746
+ // return new Promise((resolve: Function, reject: Function) => {
1747
+ // return this.sharedConnector.getStockStickerPrintLayouts(stockStickersPrintLayouts).then((result: DataServiceResponse) => {
1748
+ // if (result.validationResult && result.validationResult.success) {
1749
+ // if (result.resultObject) {
1750
+ // resolve(this._boFactory.makeWithRawBackendData(stockStickersPrintLayouts, result.resultObject));
1751
+ // }
1752
+ // } else {
1753
+ // reject(result.validationMessagesAsString);
1754
+ // }
1755
+ // })
1756
+ // })
1757
+ // }
1758
+ SharedConnectorService.prototype.getArticleFullObject = function (goodId) {
1759
+ return __awaiter(this, void 0, void 0, function () {
1760
+ var _this = this;
1761
+ return __generator(this, function (_a) {
1762
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1763
+ return _this.articleConnector.getArticleFullObject(goodId).then(function (result) {
1764
+ // if (result.validationResult && result.validationResult.success) {
1765
+ // if (result.resultObject) {
1766
+ // resolve(this._boFactory.makeWithRawBackendData(ArticleExtended, result.resultObject));
1767
+ // }
1768
+ // } else {
1769
+ // reject(result.validationMessagesAsString);
1770
+ // }
1771
+ });
1772
+ })];
1773
+ });
1774
+ });
1775
+ };
1776
+ SharedConnectorService.prototype.getStockHistory = function (request) {
1777
+ return __awaiter(this, void 0, void 0, function () {
1778
+ var _this = this;
1779
+ return __generator(this, function (_a) {
1780
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1781
+ return _this.articleConnector.getStockHistory(request).then(function (result) {
1782
+ if (result.validationResult && result.validationResult.success) {
1783
+ if (result.resultObject && result.resultObject.hasOwnProperty("stockHistory")) {
1784
+ resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(stockHistory_bo.StockHistoryBo, result.resultObject.stockHistory));
1785
+ }
1786
+ }
1787
+ else {
1788
+ reject(result.validationMessagesAsString);
1789
+ }
1790
+ });
1791
+ })];
1792
+ });
1793
+ });
1794
+ };
1795
+ SharedConnectorService.prototype.getStockInformation = function (data) {
1796
+ return __awaiter(this, void 0, void 0, function () {
1797
+ var _this = this;
1798
+ return __generator(this, function (_a) {
1799
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1800
+ return _this.articleConnector.getStockInformation(data).then(function (result) {
1801
+ if (result.validationResult && result.validationResult.success) {
1802
+ if (result.resultObjects) {
1803
+ resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(articleStock_bo.ArticleStock, result.resultObjects));
1804
+ }
1805
+ }
1806
+ else {
1807
+ reject(result.validationMessagesAsString);
1808
+ }
1809
+ });
1810
+ })];
1811
+ });
1812
+ });
1813
+ };
1814
+ SharedConnectorService.prototype.getStockManagementWarehouses = function () {
1815
+ return __awaiter(this, void 0, void 0, function () {
1816
+ var _this = this;
1817
+ return __generator(this, function (_a) {
1818
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1819
+ return _this.articleConnector.getStockManagementWarehouses().then(function (result) {
1820
+ if (result.validationResult && result.validationResult.success) {
1821
+ if (result.resultObjects) {
1822
+ resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(stockManagementWarehouses_bo.StockManagementWarehouses, result.resultObjects));
1823
+ }
1824
+ }
1825
+ else {
1826
+ reject(result.validationMessagesAsString);
1827
+ }
1828
+ });
1829
+ })];
1830
+ });
1831
+ });
1832
+ };
1833
+ SharedConnectorService.prototype.getStockManagementLocations = function (warehouseNo) {
1834
+ return __awaiter(this, void 0, void 0, function () {
1835
+ var _this = this;
1836
+ return __generator(this, function (_a) {
1837
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1838
+ return _this.articleConnector.getStockManagementLocations(warehouseNo).then(function (result) {
1839
+ if (result.validationResult && result.validationResult.success) {
1840
+ if (result.resultObjects) {
1841
+ resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(stockLocation_bo.StockLocation, result.resultObjects));
1842
+ }
1843
+ }
1844
+ else {
1845
+ reject(result.validationMessagesAsString);
1846
+ }
1847
+ });
1848
+ })];
1849
+ });
1850
+ });
1851
+ };
1852
+ SharedConnectorService.prototype.getArticleDetails = function (data) {
1853
+ return __awaiter(this, void 0, void 0, function () {
1854
+ var _this = this;
1855
+ return __generator(this, function (_a) {
1856
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1857
+ return _this.articleConnector.getArticleDetails(data).then(function (result) {
1858
+ if (result.validationResult && result.validationResult.success) {
1859
+ if (result.resultObjects) {
1860
+ resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(articleDetails_bo.ArticleDetailsBo, result.resultObjects));
1861
+ }
1862
+ }
1863
+ else {
1864
+ reject(result.validationMessagesAsString);
1865
+ }
1866
+ });
1867
+ })];
1868
+ });
1869
+ });
1870
+ };
1871
+ SharedConnectorService.prototype.updateArticleDetails = function (data) {
1872
+ return __awaiter(this, void 0, void 0, function () {
1873
+ var _this = this;
1874
+ return __generator(this, function (_a) {
1875
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1876
+ return _this.articleConnector.updateArticleDetails(data).then(function (result) { return __awaiter(_this, void 0, void 0, function () {
1877
+ return __generator(this, function (_a) {
1878
+ switch (_a.label) {
1879
+ case 0:
1880
+ if (!(result.validationResult && result.validationResult.success)) return [3 /*break*/, 2];
1881
+ return [4 /*yield*/, this.commit()];
1882
+ case 1:
1883
+ _a.sent();
1884
+ resolve(true);
1885
+ return [3 /*break*/, 3];
1886
+ case 2:
1887
+ reject(result.validationMessagesAsString);
1888
+ _a.label = 3;
1889
+ case 3: return [2 /*return*/];
1890
+ }
1891
+ });
1892
+ }); });
1893
+ })];
1894
+ });
1895
+ });
1896
+ };
1897
+ SharedConnectorService.prototype.lockArticleDetails = function (data) {
1898
+ return __awaiter(this, void 0, void 0, function () {
1899
+ var _this = this;
1900
+ return __generator(this, function (_a) {
1901
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1902
+ return _this.articleConnector.lockArticleDetails(data).then(function (result) { return __awaiter(_this, void 0, void 0, function () {
1903
+ return __generator(this, function (_a) {
1904
+ switch (_a.label) {
1905
+ case 0:
1906
+ if (!(result.validationResult && result.validationResult.success)) return [3 /*break*/, 2];
1907
+ return [4 /*yield*/, this.commit()];
1908
+ case 1:
1909
+ _a.sent();
1910
+ resolve(true);
1911
+ return [3 /*break*/, 3];
1912
+ case 2:
1913
+ reject(result.validationMessagesAsString);
1914
+ _a.label = 3;
1915
+ case 3: return [2 /*return*/];
1916
+ }
1917
+ });
1918
+ }); });
1919
+ })];
1920
+ });
1921
+ });
1922
+ };
1923
+ SharedConnectorService.prototype.getStockStatus = function () {
1924
+ return __awaiter(this, void 0, void 0, function () {
1925
+ var _this = this;
1926
+ return __generator(this, function (_a) {
1927
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1928
+ return _this.articleConnector.getStockState().then(function (result) {
1929
+ if (result.validationResult && result.validationResult.success) {
1930
+ if (result.resultObjects) {
1931
+ resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(stockStatus_bo.StockStatus, result.resultObjects));
1932
+ }
1933
+ }
1934
+ else {
1935
+ reject(result.validationMessagesAsString);
1936
+ }
1937
+ });
1938
+ })];
1939
+ });
1940
+ });
1941
+ };
1942
+ SharedConnectorService.prototype.getStockStickerTemplates = function (data) {
1943
+ return __awaiter(this, void 0, void 0, function () {
1944
+ var _this = this;
1945
+ return __generator(this, function (_a) {
1946
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1947
+ return _this.sharedConnector.getStockStickerPrintLayouts(data).then(function (result) {
1948
+ if (result.validationResult && result.validationResult.success) {
1949
+ if (result.resultObject) {
1950
+ resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(stockStickersPrintLayouts_bo.StockStickersPrintLayouts, result.resultObject));
1951
+ }
1952
+ }
1953
+ else {
1954
+ reject(result.validationMessagesAsString);
1955
+ }
1956
+ });
1957
+ })];
1958
+ });
1959
+ });
1960
+ };
1961
+ SharedConnectorService.prototype.getArticleTransaction = function (data) {
1962
+ return __awaiter(this, void 0, void 0, function () {
1963
+ var _this = this;
1964
+ return __generator(this, function (_a) {
1965
+ return [2 /*return*/, new Promise(function (resolve, reject) {
1966
+ return _this.articleConnector.getArticleTransaction(data).then(function (result) {
1967
+ if (result.validationResult && result.validationResult.success) {
1968
+ if (result.resultObjects) {
1969
+ resolve(_this._boFactory.makeBOArrayFromRawBackendDataArray(articleTransaction_bo.ArticleTransaction, result.resultObjects));
1970
+ }
1971
+ }
1972
+ else {
1973
+ reject(result.validationMessagesAsString);
1974
+ }
1975
+ });
1976
+ })];
1977
+ });
1978
+ });
1979
+ };
1980
+ SharedConnectorService.prototype.commit = function () {
1981
+ return this.articleConnector.commit();
1982
+ };
1983
+ return SharedConnectorService;
1984
+ }());
1985
+ SharedConnectorService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function SharedConnectorService_Factory() { return new SharedConnectorService(i0__namespace.ɵɵinject(OptionsService)); }, token: SharedConnectorService, providedIn: "root" });
1986
+ SharedConnectorService.decorators = [
1987
+ { type: i0.Injectable, args: [{
1988
+ providedIn: "root"
1989
+ },] }
1990
+ ];
1991
+ SharedConnectorService.ctorParameters = function () { return [
1992
+ { type: OptionsService }
1993
+ ]; };
1994
+
1995
+ var StockService = /** @class */ (function () {
1996
+ function StockService(_sharedService) {
1997
+ this._sharedService = _sharedService;
1998
+ this.printSticker = new printStockStickers.PrintStockStickers();
1999
+ this.printPriceSticker = new printPriceStickers_bo.PrintPriceStickers();
2000
+ }
2001
+ StockService.prototype.getPrintStockStickers = function (data) {
2002
+ return __awaiter(this, void 0, void 0, function () {
2003
+ return __generator(this, function (_a) {
2004
+ switch (_a.label) {
2005
+ case 0: return [4 /*yield*/, this._sharedService.getPrintStockStickers(data)];
2006
+ case 1:
2007
+ _a.sent();
2008
+ return [2 /*return*/];
2009
+ }
2010
+ });
2011
+ });
2012
+ };
2013
+ StockService.prototype.getPrintPriceStickers = function (data) {
2014
+ return __awaiter(this, void 0, void 0, function () {
2015
+ return __generator(this, function (_a) {
2016
+ switch (_a.label) {
2017
+ case 0: return [4 /*yield*/, this._sharedService.getPrintPriceStickers(data)];
2018
+ case 1:
2019
+ _a.sent();
2020
+ return [2 /*return*/];
2021
+ }
2022
+ });
2023
+ });
2024
+ };
2025
+ StockService.prototype.getAllPrinters = function (showAll) {
2026
+ if (showAll === void 0) { showAll = true; }
2027
+ return __awaiter(this, void 0, void 0, function () {
2028
+ return __generator(this, function (_a) {
2029
+ switch (_a.label) {
2030
+ case 0: return [4 /*yield*/, this._sharedService.getAllPrinters(showAll)];
2031
+ case 1: return [2 /*return*/, _a.sent()];
2032
+ }
2033
+ });
2034
+ });
2035
+ };
2036
+ StockService.prototype.getStockHistory = function (data) {
2037
+ return __awaiter(this, void 0, void 0, function () {
2038
+ return __generator(this, function (_a) {
2039
+ switch (_a.label) {
2040
+ case 0: return [4 /*yield*/, this._sharedService.getStockHistory(data)];
2041
+ case 1: return [2 /*return*/, _a.sent()];
2042
+ }
2043
+ });
2044
+ });
2045
+ };
2046
+ StockService.prototype.getStockInformation = function (data) {
2047
+ return __awaiter(this, void 0, void 0, function () {
2048
+ return __generator(this, function (_a) {
2049
+ switch (_a.label) {
2050
+ case 0: return [4 /*yield*/, this._sharedService.getStockInformation(data)];
2051
+ case 1: return [2 /*return*/, _a.sent()];
2052
+ }
2053
+ });
2054
+ });
2055
+ };
2056
+ // public async getStockStickerPrintLayouts(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
2057
+ // return await this._connector.getStockStickerPrintLayouts(data);
2058
+ // }
2059
+ StockService.prototype.getArticleDetails = function (data) {
2060
+ return __awaiter(this, void 0, void 0, function () {
2061
+ return __generator(this, function (_a) {
2062
+ switch (_a.label) {
2063
+ case 0: return [4 /*yield*/, this._sharedService.getArticleDetails(data)];
2064
+ case 1: return [2 /*return*/, _a.sent()];
2065
+ }
2066
+ });
2067
+ });
2068
+ };
2069
+ StockService.prototype.updateArticleDetails = function (data) {
2070
+ return __awaiter(this, void 0, void 0, function () {
2071
+ return __generator(this, function (_a) {
2072
+ switch (_a.label) {
2073
+ case 0: return [4 /*yield*/, this._sharedService.updateArticleDetails(data)];
2074
+ case 1: return [2 /*return*/, _a.sent()];
2075
+ }
2076
+ });
2077
+ });
2078
+ };
2079
+ StockService.prototype.getStockState = function () {
2080
+ return __awaiter(this, void 0, void 0, function () {
2081
+ return __generator(this, function (_a) {
2082
+ switch (_a.label) {
2083
+ case 0: return [4 /*yield*/, this._sharedService.getStockStatus()];
2084
+ case 1: return [2 /*return*/, _a.sent()];
2085
+ }
2086
+ });
2087
+ });
2088
+ };
2089
+ StockService.prototype.getStockStickerTemplates = function (data) {
2090
+ return __awaiter(this, void 0, void 0, function () {
2091
+ return __generator(this, function (_a) {
2092
+ switch (_a.label) {
2093
+ case 0: return [4 /*yield*/, this._sharedService.getStockStickerTemplates(data)];
2094
+ case 1: return [2 /*return*/, _a.sent()];
2095
+ }
2096
+ });
2097
+ });
2098
+ };
2099
+ StockService.prototype.getStockManagementWarehouses = function () {
2100
+ return __awaiter(this, void 0, void 0, function () {
2101
+ return __generator(this, function (_a) {
2102
+ switch (_a.label) {
2103
+ case 0: return [4 /*yield*/, this._sharedService.getStockManagementWarehouses()];
2104
+ case 1: return [2 /*return*/, _a.sent()];
2105
+ }
2106
+ });
2107
+ });
2108
+ };
2109
+ StockService.prototype.getStockManagementLocations = function (warehouseNo) {
2110
+ return __awaiter(this, void 0, void 0, function () {
2111
+ return __generator(this, function (_a) {
2112
+ switch (_a.label) {
2113
+ case 0: return [4 /*yield*/, this._sharedService.getStockManagementLocations(warehouseNo)];
2114
+ case 1: return [2 /*return*/, _a.sent()];
2115
+ }
2116
+ });
2117
+ });
2118
+ };
2119
+ StockService.prototype.getArticleTransaction = function (data) {
2120
+ return __awaiter(this, void 0, void 0, function () {
2121
+ return __generator(this, function (_a) {
2122
+ switch (_a.label) {
2123
+ case 0: return [4 /*yield*/, this._sharedService.getArticleTransaction(data)];
2124
+ case 1: return [2 /*return*/, _a.sent()];
2125
+ }
2126
+ });
2127
+ });
2128
+ };
2129
+ StockService.prototype.lockArticleDetails = function (data) {
2130
+ return __awaiter(this, void 0, void 0, function () {
2131
+ return __generator(this, function (_a) {
2132
+ switch (_a.label) {
2133
+ case 0: return [4 /*yield*/, this._sharedService.lockArticleDetails(data)];
2134
+ case 1: return [2 /*return*/, _a.sent()];
2135
+ }
2136
+ });
2137
+ });
2138
+ };
2139
+ StockService.prototype.commit = function () {
2140
+ return this._sharedService.commit();
2141
+ };
2142
+ return StockService;
2143
+ }());
2144
+ StockService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function StockService_Factory() { return new StockService(i0__namespace.ɵɵinject(SharedConnectorService)); }, token: StockService, providedIn: "root" });
2145
+ StockService.decorators = [
2146
+ { type: i0.Injectable, args: [{
2147
+ providedIn: 'root',
2148
+ },] }
2149
+ ];
2150
+ StockService.ctorParameters = function () { return [
2151
+ { type: SharedConnectorService }
2152
+ ]; };
2153
+
2154
+ var StockComponent = /** @class */ (function () {
2155
+ function StockComponent(stockService, _optionsService, _dictionary, _changeDetector) {
2156
+ var _this = this;
2157
+ this.stockService = stockService;
2158
+ this._optionsService = _optionsService;
2159
+ this._dictionary = _dictionary;
2160
+ this._changeDetector = _changeDetector;
2161
+ this.handleStickerClicked = new i0.EventEmitter();
2162
+ this.showStockInformationGrid = true;
2163
+ this.showStockLocation = false;
2164
+ this.showStockTransfer = false;
2165
+ this.allAvailableStock = 0;
2166
+ this.allTechnicalStock = 0;
2167
+ this._subscriptions = [];
2168
+ this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }));
2169
+ }
2170
+ Object.defineProperty(StockComponent.prototype, "article", {
2171
+ set: function (article) {
2172
+ this.articleExtended = article;
2173
+ this.getStockInformation(article);
2174
+ },
2175
+ enumerable: false,
2176
+ configurable: true
2177
+ });
2178
+ ;
2179
+ StockComponent.prototype.showClass = function () {
2180
+ return true;
2181
+ };
2182
+ StockComponent.prototype.ngOnDestroy = function () {
2183
+ this._subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); });
2184
+ };
2185
+ StockComponent.prototype.backToStockLinesClicked = function () {
2186
+ this.showStockLocation = false;
2187
+ this.showStockInformationGrid = true;
2188
+ };
2189
+ StockComponent.prototype.handleStockTransferClick = function (event) {
2190
+ this.stockTransferArticleDetails = event;
2191
+ this.showStockTransfer = !this.showStockTransfer;
2192
+ this.showStockInformationGrid = !this.showStockInformationGrid;
2193
+ this.stockService.stockStickers = new printStockStickers.PrintStockStickers();
2194
+ };
2195
+ StockComponent.prototype.backToStock = function () {
2196
+ this.showStockTransfer = !this.showStockTransfer;
2197
+ this.showStockInformationGrid = !this.showStockInformationGrid;
2198
+ };
2199
+ StockComponent.prototype.getStockHistory = function () {
2200
+ return __awaiter(this, void 0, void 0, function () {
2201
+ var stockHistoryInformation, _a;
2202
+ return __generator(this, function (_b) {
2203
+ switch (_b.label) {
2204
+ case 0:
2205
+ stockHistoryInformation = new getStockHistoryRequest.GetStockHistoryRequest();
2206
+ stockHistoryInformation.type = "B";
2207
+ stockHistoryInformation.goodId = this.articleExtended.goodId.toString();
2208
+ _a = this;
2209
+ return [4 /*yield*/, this.stockService.getStockHistory(stockHistoryInformation)];
2210
+ case 1:
2211
+ _a.stockHistory = _b.sent();
2212
+ return [2 /*return*/];
2213
+ }
2214
+ });
2215
+ });
2216
+ };
2217
+ StockComponent.prototype.getStockInformation = function (data) {
2218
+ return __awaiter(this, void 0, void 0, function () {
2219
+ var articleData, _a;
2220
+ var _this = this;
2221
+ return __generator(this, function (_b) {
2222
+ switch (_b.label) {
2223
+ case 0:
2224
+ articleData = new articleStock.ArticleStock();
2225
+ articleData.goodId = data.goodId.toString();
2226
+ articleData.viewKind = "M";
2227
+ _a = this;
2228
+ return [4 /*yield*/, this.stockService.getStockInformation(articleData)];
2229
+ case 1:
2230
+ _a.stockInformation = _b.sent();
2231
+ this.stockInformation.forEach(function (articleStock) { return _this.allAvailableStock += articleStock.availableStock; });
2232
+ this.stockInformation.forEach(function (articleStock) { return _this.allTechnicalStock += articleStock.technicalStock; });
2233
+ return [2 /*return*/];
2234
+ }
2235
+ });
2236
+ });
2237
+ };
2238
+ StockComponent.prototype._handleSettingsLoaded = function (loaded) {
2239
+ return __awaiter(this, void 0, void 0, function () {
2240
+ return __generator(this, function (_a) {
2241
+ switch (_a.label) {
2242
+ case 0:
2243
+ if (!loaded) return [3 /*break*/, 2];
2244
+ return [4 /*yield*/, this._initConnection().then()];
2245
+ case 1:
2246
+ _a.sent();
2247
+ _a.label = 2;
2248
+ case 2: return [2 /*return*/];
2249
+ }
2250
+ });
2251
+ });
2252
+ };
2253
+ StockComponent.prototype._initConnection = function () {
2254
+ return __awaiter(this, void 0, void 0, function () {
2255
+ var _this = this;
2256
+ return __generator(this, function (_a) {
2257
+ switch (_a.label) {
2258
+ case 0:
2259
+ // await this._connector.connect(this._optionsService.options);
2260
+ if (this._optionsService.options.url) {
2261
+ this._dictionary.rootUrl = this._optionsService.options.url.replace("/ajaxservice", "");
2262
+ }
2263
+ return [4 /*yield*/, this._dictionary.setDictionary(this._optionsService.options.languageCode)];
2264
+ case 1:
2265
+ _a.sent();
2266
+ setTimeout(function () {
2267
+ _this._changeDetector.detectChanges();
2268
+ });
2269
+ return [2 /*return*/];
2270
+ }
2271
+ });
2272
+ });
2273
+ };
2274
+ return StockComponent;
2275
+ }());
2276
+ StockComponent.decorators = [
2277
+ { type: i0.Component, args: [{
2278
+ selector: "co-stock",
2279
+ template: "\n <div class=\"stock-info-container\">\n <co-stock-information [article]=\"articleExtended\"\n [articleStock]=\"\"\n [allAvailableStockInformation]=\"allAvailableStock\"\n [allTechnicalStockInformation]=\"allTechnicalStock\"\n >\n </co-stock-information>\n <hr>\n <co-stock-information-grid *ngIf=\"showStockInformationGrid\"\n [stockLocationData]=\"stockLocationInformation\"\n [articleStockInformation]=\"stockInformation\"\n (transferIconClicked)=\"handleStockTransferClick($event)\"\n (historyClicked)=\"getStockHistory()\"\n [stockHistoryInformation]=\"stockHistory\"\n >\n </co-stock-information-grid>\n <co-stock-location *ngIf=\"showStockLocation\"\n (backToStockLines)=\"backToStockLinesClicked()\">\n\n </co-stock-location>\n <co-stock-transfer *ngIf=\"showStockTransfer\"\n (handleCancelClicked)=\"backToStock()\"\n [article]=\"stockTransferArticle\"\n [articleToTransfer]=\"stockTransferArticleDetails\"\n [stockSticker]=\"stockService.stockStickers\"\n (handleStickerClicked)=\"handleStickerClicked.emit($event)\"\n [articleWarehouse]=\"articleWarehouse\"\n [allWarehouses]=\"allWarehouses\"\n >\n </co-stock-transfer>\n </div>\n ",
2280
+ encapsulation: i0.ViewEncapsulation.None
2281
+ },] }
2282
+ ];
2283
+ StockComponent.ctorParameters = function () { return [
2284
+ { type: StockService },
2285
+ { type: OptionsService },
2286
+ { type: DictionaryService },
2287
+ { type: i0.ChangeDetectorRef }
2288
+ ]; };
2289
+ StockComponent.propDecorators = {
2290
+ stock: [{ type: i0.ViewChild, args: [StockComponent,] }],
2291
+ handleStickerClicked: [{ type: i0.Output }],
2292
+ article: [{ type: i0.Input }],
2293
+ articleWarehouse: [{ type: i0.Input }],
2294
+ allWarehouses: [{ type: i0.Input }],
2295
+ showClass: [{ type: i0.HostBinding, args: ["class.co-stock",] }]
2296
+ };
2297
+
2298
+ var StockInformationComponent = /** @class */ (function () {
2299
+ function StockInformationComponent() {
2300
+ }
2301
+ return StockInformationComponent;
2302
+ }());
2303
+ StockInformationComponent.decorators = [
2304
+ { type: i0.Component, args: [{
2305
+ selector: "co-stock-information",
2306
+ template: "\n <div class=\"stock-info\" *ngIf=\"article\">\n <div class=\"stock-info-row\" >\n <div class=\"stock-info-row-image\">\n <div class=\"stock-image\">\n <co-image class=\"stock-image\" [source]=\"article.imageData\"></co-image>\n </div>\n </div>\n <div class=\"stock-good-info\">\n <div>\n <span [textContent]=\"article.description\"></span>\n </div>\n <div>\n <span [textContent]=\"article.articleNumber\"></span>\n </div>\n </div>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'STOCK_STATUS'\"></label>\n <span [textContent]=\"article.stockStatus\"></span>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'AMOUNT_IN_STOCK'\"></label>\n <span [textContent]=\"allTechnicalStockInformation\"></span>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'AMOUNT_AVAILABLE'\"></label>\n <span [textContent]=\"allAvailableStockInformation\"></span>\n </div>\n <div class=\"stock-status\">\n <label [textContent]=\"'AMOUNT_LATER_AVAILABLE'\"></label>\n <span [textContent]=\"\"></span>\n </div>\n </div>\n ",
2307
+ encapsulation: i0.ViewEncapsulation.None
2308
+ },] }
2309
+ ];
2310
+ StockInformationComponent.ctorParameters = function () { return []; };
2311
+ StockInformationComponent.propDecorators = {
2312
+ article: [{ type: i0.Input }],
2313
+ articleStock: [{ type: i0.Input }],
2314
+ allAvailableStockInformation: [{ type: i0.Input }],
2315
+ allTechnicalStockInformation: [{ type: i0.Input }]
2316
+ };
2317
+
2318
+ /** AUTO GENERATED FILE. DO NOT CHANGE.. OR YOU WILL SUFFER THE CONSEQUENCES OF YOUR ACTIONS **/
2319
+ var IconSvg = {
2320
+ "angle_left_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path fill=\"#183153\" d=\"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z\"/></svg>",
2321
+ "angle_right_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path fill=\"#183153\" d=\"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z\"/></svg>",
2322
+ "arrow_fat_right": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"37.5 25 25.2 12.7 25.2 20.35 12.5 20.35 12.5 29.66 25.2 29.66 25.2 37.3 37.5 25\" fill=\"#484f60\"/></svg>",
2323
+ "arrow_point_left": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\" ><path fill=\"#484F5F\" d=\"M31.9,36.7l-14.7-9.6C17.1,27,17,26.9,17,26.7v-2.4c0-0.2,0.1-0.3,0.2-0.4l14.7-9.6c0.2-0.2,0.5-0.1,0.7,0.1l1.4,2.1c0.2,0.2,0.1,0.5-0.1,0.7l-12,7.8c-0.3,0.2-0.3,0.6,0,0.8l12,7.8c0.2,0.2,0.3,0.5,0.1,0.7l-1.4,2.1C32.4,36.8,32.1,36.8,31.9,36.7z\"/></svg>",
2324
+ "arrow_point_right": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\"><path fill=\"#484F5F\" d=\"M19.1,14.3l14.7,9.6c0.1,0.1,0.2,0.2,0.2,0.4v2.4c0,0.2-0.1,0.3-0.2,0.4l-14.7,9.6c-0.2,0.2-0.5,0.1-0.7-0.1l-1.4-2.1c-0.2-0.2-0.1-0.5,0.1-0.7l12-7.8c0.3-0.2,0.3-0.6,0-0.8l-12-7.8c-0.2-0.2-0.3-0.5-0.1-0.7l1.4-2.1C18.6,14.2,18.9,14.2,19.1,14.3z\"/></svg>",
2325
+ "bring_forward_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path fill=\"#183153\" d=\"M224 464H448C456.8 464 464 456.8 464 448V224C464 215.2 456.8 208 448 208H384V160H448C483.3 160 512 188.7 512 224V448C512 483.3 483.3 512 448 512H224C188.7 512 160 483.3 160 448V384H208V448C208 456.8 215.2 464 224 464zM64 352C28.65 352 0 323.3 0 288V64C0 28.65 28.65 0 64 0H288C323.3 0 352 28.65 352 64V288C352 323.3 323.3 352 288 352H64z\"/></svg>",
2326
+ "check_round": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,10A15,15,0,1,0,40,25,15,15,0,0,0,25,10ZM23,34l-6.24-9.09,2.81-3.59L23,26.45,27.66,16h5.58Z\" fill=\"#484f60\"/></svg>",
2327
+ "delete_left_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z\"/></svg>",
2328
+ "delivery_truck": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"15.35\" y=\"16.56\" width=\"15.14\" height=\"10.94\" transform=\"translate(-1.83 2.08) rotate(-5)\" fill=\"#484f60\"/><path d=\"M38.5,18.1l-6.9.61L32.41,28l-7.63.67a3.76,3.76,0,0,1,1.43,2.25l7.25-.63A3.83,3.83,0,0,1,41,29.6l1-.1-.52-6Zm.29,5.84-3.91.34a.51.51,0,0,1-.55-.46L34,20.1a.49.49,0,0,1,.45-.54l2.27-.2a.5.5,0,0,1,.48.25l2,3.59A.5.5,0,0,1,38.79,23.94Z\" fill=\"#484f60\"/><path d=\"M19.66,29.09a3.8,3.8,0,0,0-1,2.46l-.74.07-1.82-.94L16,29.41Z\" fill=\"#484f60\"/><path d=\"M34.56,30.62a2.74,2.74,0,1,0,2.49-3A2.73,2.73,0,0,0,34.56,30.62Z\" fill=\"#484f60\"/><path d=\"M19.74,31.91a2.74,2.74,0,1,0,2.49-3A2.74,2.74,0,0,0,19.74,31.91Z\" fill=\"#484f60\"/><rect x=\"7.96\" y=\"17.63\" width=\"5\" height=\"1\" transform=\"translate(-1.54 0.98) rotate(-5)\" fill=\"#484f60\"/><rect x=\"11.02\" y=\"29.71\" width=\"3\" height=\"1\" transform=\"translate(-2.59 1.21) rotate(-5)\" fill=\"#484f60\"/><rect x=\"9.48\" y=\"23.53\" width=\"4\" height=\"1\" transform=\"matrix(1, -0.09, 0.09, 1, -2.05, 1.09)\" fill=\"#484f60\"/></svg>",
2329
+ "email": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.79,38.45A17.82,17.82,0,0,1,23.86,40,13.09,13.09,0,0,1,10.41,26.42C10.41,17.63,16.83,10,26.53,10c7.63,0,13.06,5.21,13.06,12.46,0,6.33-3.53,10.3-8.19,10.3a3.42,3.42,0,0,1-3.71-3.32h-.08A6.5,6.5,0,0,1,22,32.76c-2.75,0-4.82-2.11-4.82-5.65a9.85,9.85,0,0,1,10.13-10,12.89,12.89,0,0,1,5.13,1l-1.3,8c-.43,2.54-.13,3.71,1.08,3.75,1.85.09,4.18-2.28,4.18-7.28,0-5.65-3.62-10-10.3-10S13.73,17.76,13.73,26c0,7.25,4.57,11.3,11,11.3A14.81,14.81,0,0,0,31,36ZM28,20.65a5.34,5.34,0,0,0-1.33-.18c-2.85,0-5.09,2.81-5.09,6.12,0,1.64.73,2.68,2.16,2.68,1.59,0,3.27-2,3.66-4.53Z\" fill=\"#484f60\"/></svg>",
2330
+ "pdf": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.88c-2.16,0-2.72-.56-2.72-2.72V12.88c0-2.15.56-2.71,2.72-2.71h11.6l8.66,8.88v3.43H32.8V19.6l-7.88-8.09h-11c-1.38,0-1.38,0-1.38,1.37V37.45c0,1.37,0,1.37,1.38,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M27.83,26.63v4.24h1a3.57,3.57,0,0,0,.78-.06,1.22,1.22,0,0,0,.52-.26,1.44,1.44,0,0,0,.34-.62,4.13,4.13,0,0,0,.13-1.18,3.79,3.79,0,0,0-.13-1.14,1.51,1.51,0,0,0-.37-.62,1.14,1.14,0,0,0-.6-.3,5.93,5.93,0,0,0-1.06-.06Z\" fill=\"#484f60\"/><path d=\"M21.86,26.63v1.82h.71a3.57,3.57,0,0,0,1-.1A.88.88,0,0,0,24,28a.84.84,0,0,0,.14-.5.8.8,0,0,0-.2-.57.88.88,0,0,0-.52-.29,6.36,6.36,0,0,0-.93,0Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm6.12,4.24a1.68,1.68,0,0,1-.54.63,1.9,1.9,0,0,1-.67.3,6.57,6.57,0,0,1-1.34.1h-.85V32H20.57V25.54h2.07a7.75,7.75,0,0,1,1.54.1,1.73,1.73,0,0,1,.93.63,2,2,0,0,1,.37,1.25A2,2,0,0,1,25.26,28.51Zm6.45,1.66A2.91,2.91,0,0,1,31,31.31a2.28,2.28,0,0,1-.91.51A4,4,0,0,1,29,32H26.54V25.54H28.9a4.21,4.21,0,0,1,1.22.13,2.08,2.08,0,0,1,1,.59,2.79,2.79,0,0,1,.61,1,4.76,4.76,0,0,1,.21,1.52A4.19,4.19,0,0,1,31.71,30.17Zm5.7-3.54h-3.1v1.52H37v1.08H34.31V32H33V25.54h4.39Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/></svg>",
2331
+ "print": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M38,16.5H12a2,2,0,0,0-2,2v9a2,2,0,0,0,2,2h2v-5H36v5h2a2,2,0,0,0,2-2v-9A2,2,0,0,0,38,16.5ZM37,21a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,37,21Z\" fill=\"#484f60\"/><path d=\"M35,11.5v5H15v-5H35m1-1H14v7H36v-7Z\" fill=\"#484f60\"/><path d=\"M35,25.5v13H15v-13H35m1-1H14v15H36v-15Z\" fill=\"#484f60\"/><rect x=\"17\" y=\"28.3\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/><rect x=\"17\" y=\"31.5\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/><rect x=\"17\" y=\"34.7\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/></svg>",
2332
+ "signature_field": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M20.1,25.42a1.1,1.1,0,1,1,1.27,1.45l-3.3,9.07A63.13,63.13,0,0,1,28,28.3l1.26-12-8.26-3-6.77,10A62.4,62.4,0,0,1,17,35.54l3.3-9.07A1.12,1.12,0,0,1,20.1,25.42Z\" fill=\"#484f60\"/><rect x=\"21.62\" y=\"11.43\" width=\"8.79\" height=\"2.34\" transform=\"translate(5.88 -8.14) rotate(20)\" fill=\"#484f60\"/><path d=\"M18.11,37.48c1.44,2.65,4.58,2.94,7.23,2.1,1.41-.44,2.2-1.49,3.44-2.06,2.42-1.1,3.13,1.2,5.36,1.37.42,0,2-.65,1.54-.68-2.55-.19-2.93-3.13-5.51-2.65a4.9,4.9,0,0,0-1.64.71c-.77.49-1.31,1.62-2.07,2l-4.61.56A3.38,3.38,0,0,1,20,37c-.22-.41-2,.28-1.85.5Z\" fill=\"#484f60\"/></svg>",
2333
+ "xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.87c-2.15,0-2.71-.56-2.71-2.72V12.88c0-2.15.56-2.71,2.71-2.71H25.48l8.66,8.88v3.43H32.8V19.6l-7.88-8.09H13.87c-1.37,0-1.37,0-1.37,1.37V37.45c0,1.37,0,1.37,1.37,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm5.36,7.41-1.3-2-1.3,2H20.48l2-3.06-1.81-2.8h1.38l1.18,1.88,1.15-1.88h1.37l-1.83,2.85,2,3Zm7.67,0h-1.1V27.07l-1.16,4.61H28.77l-1.16-4.61v4.61H26.52V25.82h1.76l1.07,4,1-4h1.77Zm5.33,0H33.38V25.87h1.18v4.82H37.5Z\" fill=\"#484f60\"/></svg>"
2334
+ };
2335
+
2336
+ var IconCacheService = /** @class */ (function () {
2337
+ function IconCacheService(_sanitizer) {
2338
+ this._sanitizer = _sanitizer;
2339
+ this._iconCache = {};
2340
+ this.setIconCache();
2341
+ }
2342
+ Object.defineProperty(IconCacheService.prototype, "iconCache", {
2343
+ /**
2344
+ * All the icons as a large JSON object, from the all-icons.json file.
2345
+ * The object has property keys that are the icon names, and property values with the data string of the actual svg icon.
2346
+ */
2347
+ get: function () {
2348
+ return this._iconCache;
2349
+ },
2350
+ enumerable: false,
2351
+ configurable: true
2352
+ });
2353
+ IconCacheService.prototype.getIcon = function (iconName) {
2354
+ if (iconName) {
2355
+ return this._iconCache[iconName.toLowerCase()];
2356
+ }
2357
+ };
2358
+ IconCacheService.prototype.getIconAsBase64 = function (iconName) {
2359
+ var icon = IconSvg[iconName];
2360
+ var base64Data = window.btoa(icon);
2361
+ return this._sanitizer.bypassSecurityTrustUrl("data:image/svg+xml;base64," + base64Data);
2362
+ };
2363
+ IconCacheService.prototype.getRawIcon = function (iconName) {
2364
+ if (iconName) {
2365
+ return IconSvg[iconName.toLowerCase()];
2366
+ }
2367
+ };
2368
+ IconCacheService.prototype.setIconCache = function () {
2369
+ for (var key in IconSvg) {
2370
+ if (IconSvg.hasOwnProperty(key) && typeof IconSvg[key] !== "function") {
2371
+ this._iconCache[key.toLowerCase()] = this._sanitizer.bypassSecurityTrustHtml(IconSvg[key]);
2372
+ }
2373
+ }
2374
+ };
2375
+ return IconCacheService;
2376
+ }());
2377
+ IconCacheService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IconCacheService_Factory() { return new IconCacheService(i0__namespace.ɵɵinject(i1__namespace.DomSanitizer)); }, token: IconCacheService, providedIn: "root" });
2378
+ IconCacheService.decorators = [
2379
+ { type: i0.Injectable, args: [{
2380
+ providedIn: "root"
2381
+ },] }
2382
+ ];
2383
+ IconCacheService.ctorParameters = function () { return [
2384
+ { type: i1.DomSanitizer }
2385
+ ]; };
2386
+
2387
+ /** AUTO GENERATED FILE. DO NOT CHANGE.. OR YOU WILL SUFFER THE CONSEQUENCES OF YOUR ACTIONS **/
2388
+ var Icon;
2389
+ (function (Icon) {
2390
+ Icon["AngleLeftSolid"] = "angle_left_solid";
2391
+ Icon["AngleRightSolid"] = "angle_right_solid";
2392
+ Icon["ArrowFatRight"] = "arrow_fat_right";
2393
+ Icon["ArrowPointLeft"] = "arrow_point_left";
2394
+ Icon["ArrowPointRight"] = "arrow_point_right";
2395
+ Icon["BringForwardRegular"] = "bring_forward_regular";
2396
+ Icon["CheckRound"] = "check_round";
2397
+ Icon["DeleteLeftRegular"] = "delete_left_regular";
2398
+ Icon["DeliveryTruck"] = "delivery_truck";
2399
+ Icon["Email"] = "email";
2400
+ Icon["Pdf"] = "pdf";
2401
+ Icon["Print"] = "print";
2402
+ Icon["SignatureField"] = "signature_field";
2403
+ Icon["Xml"] = "xml";
2404
+ })(Icon || (Icon = {}));
2405
+
2406
+ var StockInformationGridComponent = /** @class */ (function () {
2407
+ function StockInformationGridComponent(iconCacheService, _stockService) {
2408
+ this.iconCacheService = iconCacheService;
2409
+ this._stockService = _stockService;
2410
+ this.icons = Icon;
2411
+ this.transferIconClicked = new i0.EventEmitter();
2412
+ this.historyClicked = new i0.EventEmitter();
2413
+ this.show = false;
2414
+ this.hideOrShowLocationTab = false;
2415
+ this.showStockHistory = false;
2416
+ this.showSendMethodDialog = false;
2417
+ this.hideOrShowTabs = true;
2418
+ this.dataWareHouseFields = { text: "warehouseDescription", value: "warehouseNo" };
2419
+ this.articleStockSearchInfo = new articleStock.ArticleStock();
2420
+ this.showChangeStockDetails = false;
2421
+ this.articleDetailsInformation = new articleStockManagement.ArticleStockManagement();
2422
+ this.tabs = [
2423
+ "STOCK",
2424
+ "IN_ORDER2",
2425
+ "ORDERS1"
2426
+ ];
2427
+ this.activeTab = this.tabs[0];
2428
+ }
2429
+ Object.defineProperty(StockInformationGridComponent.prototype, "activeTabText", {
2430
+ get: function () {
2431
+ switch (this.activeTab) {
2432
+ case this.tabs[0]:
2433
+ return "Voorraadregels";
2434
+ case this.tabs[1]:
2435
+ return "Gevonden in order(s)";
2436
+ case this.tabs[2]:
2437
+ return "Gevonden in bestellingen";
2438
+ default:
2439
+ return "Voorraadlocatie regels";
2440
+ }
2441
+ },
2442
+ enumerable: false,
2443
+ configurable: true
2444
+ });
2445
+ StockInformationGridComponent.prototype.handleTabClick = function (tabData) {
2446
+ this.activeTab = tabData;
2447
+ if (this.activeTab === "IN_ORDER2") {
2448
+ this.getInOrderData();
2449
+ }
2450
+ if (this.activeTab === "ORDERS1") {
2451
+ this.getOrderData();
2452
+ }
2453
+ };
2454
+ StockInformationGridComponent.prototype.onLocationClick = function (data) {
2455
+ this.articleStockSearchInfo.goodId = data.goodId.toString();
2456
+ this.articleStockSearchInfo.wareHouseNo = data.warehouseNo.toString();
2457
+ this.articleStockSearchInfo.viewKind = "D";
2458
+ this.selectedWarehouse = data.warehouseNo;
2459
+ if (!this.dataWareHouseCode) {
2460
+ this.getStockManagementWarehouses(data);
2461
+ }
2462
+ this.getArticleDetails(data);
2463
+ this.hideOrShowTabs = false;
2464
+ this.hideOrShowLocationTab = true;
2465
+ this._stockService.lockArticleDetails(this.articleDetailsInformation);
2466
+ };
2467
+ StockInformationGridComponent.prototype.handleHistoryClick = function () {
2468
+ this.historyClicked.emit();
2469
+ this.hideOrShowLocationTab = false;
2470
+ this.showChangeStockDetails = false;
2471
+ this.hideOrShowTabs = false;
2472
+ this.showStockHistory = true;
2473
+ };
2474
+ StockInformationGridComponent.prototype.backToStockInformation = function () {
2475
+ this.showStockHistory = false;
2476
+ this.hideOrShowTabs = true;
2477
+ };
2478
+ StockInformationGridComponent.prototype.handleStockTransferClick = function (event) {
2479
+ this.transferIconClicked.emit(event);
2480
+ };
2481
+ StockInformationGridComponent.prototype.handleBackToStockClick = function () {
2482
+ return __awaiter(this, void 0, void 0, function () {
2483
+ return __generator(this, function (_a) {
2484
+ this.activeTab = this.tabs[0];
2485
+ this.hideOrShowTabs = true;
2486
+ this.hideOrShowLocationTab = false;
2487
+ this.articleDetails = undefined;
2488
+ return [2 /*return*/];
2489
+ });
2490
+ });
2491
+ };
2492
+ StockInformationGridComponent.prototype.openSendMethodDialog = function (data) {
2493
+ this._stockService.printSticker.goodId = data.goodId;
2494
+ this._stockService.printSticker.warehouse = data.warehouseNo;
2495
+ this.showSendMethodDialog = !this.showSendMethodDialog;
2496
+ };
2497
+ StockInformationGridComponent.prototype.printStockStickers = function () {
2498
+ this._stockService.getPrintStockStickers(this._stockService.printSticker);
2499
+ };
2500
+ StockInformationGridComponent.prototype.onOkClick = function () {
2501
+ };
2502
+ StockInformationGridComponent.prototype.onCancelClick = function () {
2503
+ };
2504
+ StockInformationGridComponent.prototype.openDialogClick = function (data) {
2505
+ this.selectedArticleDetailsData = data;
2506
+ this.showChangeStockDetails = true;
2507
+ };
2508
+ StockInformationGridComponent.prototype.getArticleDetails = function (data) {
2509
+ var _this = this;
2510
+ // const info = new ArticleStockManagement();
2511
+ this.articleDetailsInformation.goodId = data.goodId;
2512
+ this.articleDetailsInformation.lineId = data.lineId;
2513
+ this.articleDetailsInformation.warehouseNumber = data.warehouseNo;
2514
+ this._stockService.getArticleDetails(this.articleDetailsInformation).then(function (details) {
2515
+ _this.articleDetails = details;
2516
+ });
2517
+ };
2518
+ StockInformationGridComponent.prototype.getStockManagementWarehouses = function (data) {
2519
+ var _this = this;
2520
+ this._stockService.getStockManagementWarehouses().then(function (warehouses) {
2521
+ _this.dataWareHouseCode = warehouses;
2522
+ _this.selectedWarehouse = data.warehouseNo;
2523
+ });
2524
+ };
2525
+ StockInformationGridComponent.prototype.onSelectWarehouse = function (event) {
2526
+ var _this = this;
2527
+ this.articleDetailsInformation.warehouseNumber = event;
2528
+ if (this.selectedWarehouse || this.selectedWarehouse === 0) {
2529
+ this._stockService.getArticleDetails(this.articleDetailsInformation).then(function (details) {
2530
+ _this.articleDetails = details;
2531
+ });
2532
+ }
2533
+ };
2534
+ StockInformationGridComponent.prototype.getInOrderData = function () {
2535
+ return __awaiter(this, void 0, void 0, function () {
2536
+ var inOrderData, _a;
2537
+ return __generator(this, function (_b) {
2538
+ switch (_b.label) {
2539
+ case 0:
2540
+ inOrderData = new articleTransaction.ArticleTransaction();
2541
+ inOrderData.type = "V";
2542
+ inOrderData.goodId = this.articleStockInformation[0].goodId.toString();
2543
+ _a = this;
2544
+ return [4 /*yield*/, this._stockService.getArticleTransaction(inOrderData)];
2545
+ case 1:
2546
+ _a.inOrderInformation = _b.sent();
2547
+ return [2 /*return*/];
2548
+ }
2549
+ });
2550
+ });
2551
+ };
2552
+ StockInformationGridComponent.prototype.getOrderData = function () {
2553
+ return __awaiter(this, void 0, void 0, function () {
2554
+ var orderData, _a;
2555
+ return __generator(this, function (_b) {
2556
+ switch (_b.label) {
2557
+ case 0:
2558
+ orderData = new articleTransaction.ArticleTransaction();
2559
+ orderData.type = "V";
2560
+ orderData.goodId = this.articleStockInformation[0].goodId.toString();
2561
+ _a = this;
2562
+ return [4 /*yield*/, this._stockService.getArticleTransaction(orderData)];
2563
+ case 1:
2564
+ _a.orderInformation = _b.sent();
2565
+ return [2 /*return*/];
2566
+ }
2567
+ });
2568
+ });
2569
+ };
2570
+ StockInformationGridComponent.prototype.addNewRow = function () {
2571
+ };
2572
+ return StockInformationGridComponent;
2573
+ }());
2574
+ StockInformationGridComponent.decorators = [
2575
+ { type: i0.Component, args: [{
2576
+ selector: "co-stock-information-grid",
2577
+ template: "\n <div class=\"tab-link show\" *ngIf=\"hideOrShowTabs\">\n <span class=\"tab-link-buttons\"\n *ngFor=\"let tab of tabs\"\n (click)=\"handleTabClick(tab)\"\n [textContent]=\"tab\"\n [class.active]=\"tab === activeTab\"\n ></span>\n </div>\n\n <div class=\"stock-line\">\n <div [textContent]=\"activeTabText\"></div>\n\n </div>\n\n <div class=\"stock-grid\">\n <co-simple-grid *ngIf=\"activeTab === tabs[0] && hideOrShowTabs\"\n [data]=\"articleStockInformation\"\n class=\"simple-grid\"\n [showAdd]=\"true\"\n [showToolbar]=\"true\"\n (addRow)=\"addNewRow()\"\n [inlineEdit]=\"true\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'warehouseNo'\" [order]=\"10\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'warehouseName'\" [order]=\"11\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'technicalStock'\" [order]=\"12\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'availableStock'\" [order]=\"13\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ECONOMICAL_STOCK'\" [field]=\"'economicalStock'\" [order]=\"14\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'locationNo'\" [order]=\"15\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"'Bekijken'\" (click)=\"onLocationClick(row)\"></span>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[1]\"\n [data]=\"inOrderInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'IN_ORDER2'\" [field]=\"'transactionNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'CUSTOMER'\" [field]=\"'user'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\" [field]=\"'transactionDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'amountInOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'wareHouseNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION'\" [field]=\"'locationNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruck)\" (click)=\"handleStockTransferClick($event)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n\n <co-simple-grid *ngIf=\"activeTab === tabs[2]\"\n [data]=\"orderInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'PURCHASE_ORDER_NR'\" [field]=\"'transactionNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE'\" [field]=\"'transactionDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'amountInOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVED'\" [field]=\"'reserved'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'FREE_STOCK'\" [field]=\"'freeStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DELIVERY_DATE1'\" [field]=\"'deliveryDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RESERVE'\" [field]=\"'reservation'\"></co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-grid\" *ngIf=\"hideOrShowLocationTab\">\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <span class=\"stock-button-back\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></span>\n </div>\n <div class=\"stock-location-right-group\">\n <co-drop-down-list [(model)]=\"selectedWarehouse\"\n [collection]=\"dataWareHouseCode\"\n [fields]=\"dataWareHouseFields\"\n [placeholder]=\"'WAREHOUSE'\"\n (modelChange)=\"onSelectWarehouse($event)\"\n [required]=\"true\"\n ></co-drop-down-list>\n </div>\n </div>\n\n<!-- TODO move to own component stock-location-->\n <co-simple-grid [data]=\"articleDetails\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <div class=\"stock-location-group\">\n <div class=\"stock-location-left-group\">\n <co-button class=\"stock-lines-button\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"handleBackToStockClick()\"></co-button>\n </div>\n </div>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'warehouseDescription'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'BATCH'\" [field]=\"'batchNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SERIAL_NO'\" [field]=\"'serialNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK'\" [field]=\"'amountInStock'\">\n <ng-template #template let-row=\"row\">\n <co-input-number-picker (keyup.enter)=\"openDialogClick(row)\" [(model)]=\"row['amountInStock']\">\n\n </co-input-number-picker>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ALLOCATED'\" [field]=\"'amountInStockFree'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK'\" [field]=\"'perceptibleStorage'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PHYSICAL_STOCK'\" [field]=\"'amountInStockOriginal'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'VALUTA'\" [field]=\"'currency'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PURCHASE_PRICE'\" [field]=\"'purchasePrice'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SUPPLIER_NUMBER'\" [field]=\"'supplierNo'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER'\" [field]=\"'transfer'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruck)\" (click)=\"handleStockTransferClick(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <co-stock-change-amount *ngIf=\"showChangeStockDetails\"\n (closeStockChangeAmount)=\"showChangeStockDetails = false\"\n [selectedArticleDetailsData]=\"selectedArticleDetailsData\"\n >\n </co-stock-change-amount>\n\n <div class=\"stock-grid\" *ngIf=\"showStockHistory\">\n <div class=\"stock-button-left-group\">\n <span class=\"stock-button-back\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"backToStockInformation()\"></span>\n </div>\n <co-simple-grid [data]=\"stockHistoryInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'MUTATION_DATE'\" [field]=\"'mutationDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'MUTATION_TIME'\" [field]=\"'mutationTime'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AMOUNT'\" [field]=\"'amount'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'WAREHOUSE'\" [field]=\"'wareHouseNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION'\" [field]=\"'locationNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSACTION_TYPE'\" [field]=\"'transType'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DOCUMENT_NUMBER'\" [field]=\"'docNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LINE'\" [field]=\"'posLineNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK_STATE'\" [field]=\"'stockStateId'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK_REMARK'\" [field]=\"'stockStateRemarkId'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'VALUTA'\" [field]=\"'currencyCode'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'RELATION_ID'\" [field]=\"'relationId'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'USER'\" [field]=\"'user'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'MUTATION_TYPE'\" [field]=\"'mutationType'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER'\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\" (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n\n <div class=\"stock-button-toolbar\">\n <div class=\"stock-button-left-group\">\n <co-button *ngIf=\"activeTab === tabs[0]\" [label]=\"'HISTORY'\" (click)=\"handleHistoryClick()\"></co-button>\n </div>\n <div class=\"stock-button-middle-group\">\n <div class=\"button-left\">\n <co-button [textContent]=\"'Ok'\" (click)=\"onOkClick()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button [textContent]=\"'Annuleren'\" (click)=\"onCancelClick()\"></co-button>\n </div>\n </div>\n </div>\n <ione-send-method-dialog\n *ngIf=\"showSendMethodDialog\"\n [showDialog]=\"showSendMethodDialog\"\n (printButtonClicked)=\"printStockStickers()\"\n ></ione-send-method-dialog>\n ",
2578
+ encapsulation: i0.ViewEncapsulation.None
2579
+ },] }
2580
+ ];
2581
+ StockInformationGridComponent.ctorParameters = function () { return [
2582
+ { type: IconCacheService },
2583
+ { type: StockService }
2584
+ ]; };
2585
+ StockInformationGridComponent.propDecorators = {
2586
+ stock: [{ type: i0.ViewChild, args: [StockInformationGridComponent,] }],
2587
+ articleStockInformation: [{ type: i0.Input }],
2588
+ stockLocationData: [{ type: i0.Input }],
2589
+ stockHistoryInformation: [{ type: i0.Input }],
2590
+ transferIconClicked: [{ type: i0.Output }],
2591
+ historyClicked: [{ type: i0.Output }]
2592
+ };
2593
+
2594
+ var StockLocationComponent = /** @class */ (function () {
2595
+ function StockLocationComponent(_stockService) {
2596
+ this._stockService = _stockService;
2597
+ this.backToStockLines = new i0.EventEmitter();
2598
+ this.stockLocationColumns = [];
2599
+ this.stockLocationColumns.push({ field: "location", headerText: "WAREHOUSE", editType: "none" }, { field: "batch", headerText: "BATCH" }, { field: "serieNo", headerText: "SERIAL_NO" }, { field: "amountInStock", headerText: "STOCK", textAlign: "Right", editType: "numericEdit" }, { field: "allocated", headerText: "ALLOCATED", textAlign: "Right" }, { field: "amountAvailable", headerText: "AVAILABLE_STOCK", textAlign: "Right" }, { field: "PhysicalStock", headerText: "PHYSICAL_STOCK", textAlign: "Right" }, { field: "Valuta", headerText: "VALUTA", textAlign: "Right" }, { field: "PurchasePrice", headerText: "PURSCHASE_PRICE", textAlign: "Right" }, { field: "SupplierNo", headerText: "SUPPLIER_NO", textAlign: "Right" }, { field: "Transfer", headerText: "TRANSFER" }, { field: "sticker", headerText: "STICKER" });
2600
+ }
2601
+ StockLocationComponent.prototype.backToStockInformation = function () {
2602
+ this.backToStockLines.emit();
2603
+ };
2604
+ StockLocationComponent.prototype.onOkClick = function () {
2605
+ };
2606
+ StockLocationComponent.prototype.onCancelClick = function () {
2607
+ };
2608
+ StockLocationComponent.prototype.onSelectWarehouse = function (event) {
2609
+ };
2610
+ return StockLocationComponent;
2611
+ }());
2612
+ StockLocationComponent.decorators = [
2613
+ { type: i0.Component, args: [{
2614
+ selector: "co-stock-location",
2615
+ template: "\n <div class=\"stock-location-wrapper\">\n <div class=\"buttons-wrapper\">\n <div class=\"stock-button-left-group\">\n <span class=\"stock-button-back\" [textContent]=\"'BACK_TO_STOCK_LINES'\" (click)=\"backToStockInformation()\"></span>\n </div>\n <div class=\"dropdown-wrapper\">\n <co-drop-down-list\n [collection]=\"allWarehouses\"\n [placeholder]=\"'WAREHOUSES'\"\n (modelChange)=\"onSelectWarehouse($event)\"\n ></co-drop-down-list>\n </div>\n </div>\n\n <div class=\"stock-grid\">\n\n </div>\n <div class=\"button-wrapper\">\n <div class=\"button-left\">\n <co-button (click)=\"onOkClick()\"></co-button>\n </div>\n <div class=\"button-right\">\n <co-button (click)=\"onCancelClick()\"></co-button>\n </div>\n </div>\n </div>\n\n ",
2616
+ encapsulation: i0.ViewEncapsulation.None
2617
+ },] }
2618
+ ];
2619
+ StockLocationComponent.ctorParameters = function () { return [
2620
+ { type: StockService }
2621
+ ]; };
2622
+ StockLocationComponent.propDecorators = {
2623
+ stockLocationInformation: [{ type: i0.Input }],
2624
+ backToStockLines: [{ type: i0.Output }]
2625
+ };
2626
+
2627
+ var StockTransferComponent = /** @class */ (function () {
2628
+ function StockTransferComponent(_stockService) {
2629
+ this._stockService = _stockService;
2630
+ this.handleCancelClicked = new i0.EventEmitter();
2631
+ this.handleStickerClicked = new i0.EventEmitter();
2632
+ this.allWarehousesDropdownFields = { text: "warehouseDescription", value: "warehouseNo" };
2633
+ this.allLocationDropdownFields = { text: "locationNo", value: "locationNo" };
2634
+ this.showSendMethodDialog = false;
2635
+ this.stockState = [];
2636
+ this.stockStateDropdownField = { text: "stateDescription", value: "stockStateId" };
2637
+ }
2638
+ StockTransferComponent.prototype.ngAfterViewInit = function () {
2639
+ this.getStockManagementWarehouses();
2640
+ this.getStockState();
2641
+ };
2642
+ StockTransferComponent.prototype.handleOkClick = function (data) {
2643
+ return __awaiter(this, void 0, void 0, function () {
2644
+ return __generator(this, function (_a) {
2645
+ switch (_a.label) {
2646
+ case 0:
2647
+ data.selected = true;
2648
+ data.entryDate = new Date;
2649
+ return [4 /*yield*/, this._stockService.updateArticleDetails(data)];
2650
+ case 1:
2651
+ _a.sent();
2652
+ return [2 /*return*/];
2653
+ }
2654
+ });
2655
+ });
2656
+ };
2657
+ StockTransferComponent.prototype.handleCancelClick = function () {
2658
+ this.handleCancelClicked.emit();
2659
+ };
2660
+ StockTransferComponent.prototype.handleSelectedWarehouse = function (event) {
2661
+ this.selectedWarehouse = event;
2662
+ this.getStockManagementLocations(this.selectedWarehouse);
2663
+ };
2664
+ StockTransferComponent.prototype.handleStickerClick = function () {
2665
+ return __awaiter(this, void 0, void 0, function () {
2666
+ return __generator(this, function (_a) {
2667
+ this.handleStickerClicked.emit();
2668
+ this.showSendMethodDialog = true;
2669
+ return [2 /*return*/];
2670
+ });
2671
+ });
2672
+ };
2673
+ StockTransferComponent.prototype.getStockManagementWarehouses = function () {
2674
+ var _this = this;
2675
+ this._stockService.getStockManagementWarehouses().then(function (warehouses) {
2676
+ _this.warehouses = warehouses;
2677
+ });
2678
+ };
2679
+ StockTransferComponent.prototype.getStockManagementLocations = function (data) {
2680
+ var _this = this;
2681
+ this._stockService.getStockManagementLocations(data).then(function (locations) {
2682
+ _this.locations = locations;
2683
+ });
2684
+ };
2685
+ StockTransferComponent.prototype.getStockState = function () {
2686
+ var _this = this;
2687
+ this._stockService.getStockState().then(function (state) {
2688
+ _this.stockState = state;
2689
+ });
2690
+ };
2691
+ return StockTransferComponent;
2692
+ }());
2693
+ StockTransferComponent.decorators = [
2694
+ { type: i0.Component, args: [{
2695
+ selector: "co-stock-transfer",
2696
+ template: "\n <div class=\"stock-transfer\">\n <div class=\"stock-transfer-columns\">\n <div *ngIf=\"articleToTransfer\" class=\"stock-transfer-left-column\">\n <co-input-text disabled\n [(model)]=\"articleToTransfer.warehouseDescription\"\n [textContent]=\"articleToTransfer.warehouseDescription\"\n [placeholder]=\"'Standaard magazijn'\">\n </co-input-text>\n <co-input-text disabled\n [(model)]=\"articleToTransfer.locationNo\"\n [textContent]=\"articleToTransfer.locationNo\"\n [placeholder]=\"'Standaard locatie'\">\n </co-input-text>\n <co-input-text disabled\n [(model)]=\"stockSticker.batch\"\n [placeholder]=\"'Batch'\">\n </co-input-text>\n <co-input-text disabled\n [(model)]=\"stockSticker.serial\"\n [placeholder]=\"'Serie'\">\n </co-input-text>\n <co-input-text\n [(model)]=\"articleToTransfer.amountTransfer\"\n [placeholder]=\"'Aantal'\">\n </co-input-text>\n </div>\n\n <div class=\"stock-transfer-right-column\">\n <co-drop-down-list [collection]=\"warehouses\"\n [fields]=\"allWarehousesDropdownFields\"\n (modelChange)=\"handleSelectedWarehouse($event)\"\n [(model)]=\"articleToTransfer.targetWarehouse\">\n </co-drop-down-list>\n <co-drop-down-list [collection]=\"locations\"\n [fields]=\"allLocationDropdownFields\"\n [(model)]=\"articleToTransfer.targetLocation\"\n >\n </co-drop-down-list>\n <co-drop-down-list [collection]=\"stockState\"\n [fields]=\"stockStateDropdownField\"\n [placeholder]=\"'Voorraadstatus'\"\n [(model)]=\"articleToTransfer.stockStateId\">\n </co-drop-down-list>\n <co-input-text [placeholder]=\"'Omschrijving'\"\n [(model)]=\"articleToTransfer.stockStateRemark\">\n </co-input-text>\n </div>\n </div>\n\n <div class=\"ok-cancel-buttons\">\n <co-button [textContent]=\"'Ok'\" (click)=\"handleOkClick(articleToTransfer)\"></co-button>\n <co-button [textContent]=\"'Annuleren'\" (click)=\"handleCancelClick()\"></co-button>\n <co-button [textContent]=\"'Sticker'\" (click)=\"handleStickerClick()\"></co-button>\n </div>\n </div>\n ",
2697
+ encapsulation: i0.ViewEncapsulation.None
2698
+ },] }
2699
+ ];
2700
+ StockTransferComponent.ctorParameters = function () { return [
2701
+ { type: StockService }
2702
+ ]; };
2703
+ StockTransferComponent.propDecorators = {
2704
+ stockSticker: [{ type: i0.Input }],
2705
+ article: [{ type: i0.Input }],
2706
+ articleToTransfer: [{ type: i0.Input }],
2707
+ articleWarehouse: [{ type: i0.Input }],
2708
+ allWarehouses: [{ type: i0.Input }],
2709
+ handleCancelClicked: [{ type: i0.Output }],
2710
+ handleStickerClicked: [{ type: i0.Output }]
2711
+ };
2712
+
2713
+ var SendOption;
2714
+ (function (SendOption) {
2715
+ SendOption[SendOption["Email"] = 0] = "Email";
2716
+ SendOption[SendOption["Print"] = 1] = "Print";
2717
+ SendOption[SendOption["Pdf"] = 2] = "Pdf";
2718
+ SendOption[SendOption["Xml"] = 3] = "Xml";
2719
+ })(SendOption || (SendOption = {}));
2720
+
2721
+ var SendMethodDialogComponent = /** @class */ (function () {
2722
+ function SendMethodDialogComponent(iconCacheService, stockService, _optionsService, _dictionary, _changeDetector) {
2723
+ var _this = this;
2724
+ this.iconCacheService = iconCacheService;
2725
+ this.stockService = stockService;
2726
+ this._optionsService = _optionsService;
2727
+ this._dictionary = _dictionary;
2728
+ this._changeDetector = _changeDetector;
2729
+ this.icons = Icon;
2730
+ this.sendOption = SendOption;
2731
+ this.showEmailOption = true;
2732
+ this.showPrintOption = true;
2733
+ this.showPdfOption = true;
2734
+ this.showXmlOption = true;
2735
+ this.showPrintPriceStickers = false;
2736
+ this.showPrintStockStickers = true;
2737
+ this.sendOptions = [
2738
+ { option: SendOption.Email,
2739
+ iconName: this.icons.Email,
2740
+ },
2741
+ { option: SendOption.Print,
2742
+ iconName: this.icons.Print,
2743
+ },
2744
+ { option: SendOption.Pdf,
2745
+ iconName: this.icons.Pdf,
2746
+ },
2747
+ { option: SendOption.Xml,
2748
+ iconName: this.icons.Xml,
2749
+ }
2750
+ ];
2751
+ this.activeSendOption = SendOption.Email;
2752
+ this.showStandardPrinterOptions = false;
2753
+ this.showPrinterSelections = false;
2754
+ this.showExitButton = true;
2755
+ this.printTemplatesField = { text: "name", value: "reportId" };
2756
+ this.priceListDataField = { text: "name", value: "priceListCode" };
2757
+ this.upAndLoaded = false;
2758
+ this.emails = ['lars.vdv@colijn-it.nl', 'david@colijn-it.nl', 'ruben@colijn-it.nl'];
2759
+ this.models = [false, false, true];
2760
+ this.layouts = ['Layout 1', 'Layout 2', 'Layout 3'];
2761
+ this.showDialog = false;
2762
+ this.startSignatureClicked = new i0.EventEmitter();
2763
+ this.printButtonClicked = new i0.EventEmitter();
2764
+ this._subscriptions = [];
2765
+ this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }));
2766
+ }
2767
+ Object.defineProperty(SendMethodDialogComponent.prototype, "articleData", {
2768
+ set: function (data) {
2769
+ this.stockService.printSticker.goodId = data.goodId;
2770
+ this.stockService.printSticker.warehouse = data.warehouseNo;
2771
+ },
2772
+ enumerable: false,
2773
+ configurable: true
2774
+ });
2775
+ ;
2776
+ SendMethodDialogComponent.prototype.showClass = function () {
2777
+ return true;
2778
+ };
2779
+ SendMethodDialogComponent.prototype.ngOnDestroy = function () {
2780
+ this._subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); });
2781
+ };
2782
+ SendMethodDialogComponent.prototype.getPrinters = function () {
2783
+ return __awaiter(this, void 0, void 0, function () {
2784
+ var _this = this;
2785
+ return __generator(this, function (_a) {
2786
+ return [2 /*return*/, this.stockService.getAllPrinters(true).then(function (list) {
2787
+ _this.printerList = list;
2788
+ })];
2789
+ });
2790
+ });
2791
+ };
2792
+ SendMethodDialogComponent.prototype.closeDialogClick = function () {
2793
+ this.showDialog = false;
2794
+ };
2795
+ SendMethodDialogComponent.prototype.handleSignatureStart = function () {
2796
+ this.startSignatureClicked.emit();
2797
+ };
2798
+ SendMethodDialogComponent.prototype.handlePrintClicked = function () {
2799
+ // this.printButtonClicked.emit();
2800
+ if (this.stockService.printSticker.printerName) {
2801
+ this.stockService.getPrintStockStickers(this.stockService.printSticker);
2802
+ }
2803
+ };
2804
+ SendMethodDialogComponent.prototype.togglePrinterSelection = function () {
2805
+ this.getPrinters();
2806
+ if (!this.showPrinterSelections) {
2807
+ this.showPrinterSelections = true;
2808
+ this.headerTitle = 'Printer selectie';
2809
+ }
2810
+ else {
2811
+ this.showPrinterSelections = false;
2812
+ this.headerTitle = 'Verzendopties';
2813
+ }
2814
+ };
2815
+ SendMethodDialogComponent.prototype.onPrinterClicked = function (printer) {
2816
+ this.defaultPrinter = printer.name;
2817
+ this.stockService.printSticker.printerName = printer.name;
2818
+ this.showPrinterSelections = !this.showPrinterSelections;
2819
+ };
2820
+ SendMethodDialogComponent.prototype.getPrintTemplates = function () {
2821
+ var _this = this;
2822
+ if (!this.printTemplates) {
2823
+ var data = new stockStickersPrintLayouts_bo.StockStickersPrintLayouts();
2824
+ this.stockService.getStockStickerTemplates(data).then(function (templates) {
2825
+ _this.printTemplates = templates;
2826
+ });
2827
+ }
2828
+ };
2829
+ SendMethodDialogComponent.prototype._handleSettingsLoaded = function (loaded) {
2830
+ return __awaiter(this, void 0, void 0, function () {
2831
+ return __generator(this, function (_a) {
2832
+ switch (_a.label) {
2833
+ case 0:
2834
+ if (!loaded) return [3 /*break*/, 2];
2835
+ return [4 /*yield*/, this._initConnection().then()];
2836
+ case 1:
2837
+ _a.sent();
2838
+ this.upAndLoaded = true;
2839
+ _a.label = 2;
2840
+ case 2: return [2 /*return*/];
2841
+ }
2842
+ });
2843
+ });
2844
+ };
2845
+ SendMethodDialogComponent.prototype._initConnection = function () {
2846
+ return __awaiter(this, void 0, void 0, function () {
2847
+ var _this = this;
2848
+ return __generator(this, function (_a) {
2849
+ switch (_a.label) {
2850
+ case 0:
2851
+ // await this._connector.connect(this._optionsService.options);
2852
+ if (this._optionsService.options.url) {
2853
+ this._dictionary.rootUrl = this._optionsService.options.url.replace("/ajaxservice", "");
2854
+ }
2855
+ return [4 /*yield*/, this._dictionary.setDictionary(this._optionsService.options.languageCode)];
2856
+ case 1:
2857
+ _a.sent();
2858
+ setTimeout(function () {
2859
+ _this._changeDetector.detectChanges();
2860
+ });
2861
+ return [2 /*return*/];
2862
+ }
2863
+ });
2864
+ });
2865
+ };
2866
+ return SendMethodDialogComponent;
2867
+ }());
2868
+ SendMethodDialogComponent.decorators = [
2869
+ { type: i0.Component, args: [{
2870
+ selector: "ione-send-method-dialog",
2871
+ template: "\n <div class=\"send-method-dialog-wrapper\">\n <co-dialog-wizard id=\"sendOptionsDialog\" *ngIf=\"showDialog\" [showCloseIcon]=\"showExitButton\" (closeClick)=\"closeDialogClick()\">\n <ng-container header>\n <span [textContent]=\"headerTitle\"></span>\n </ng-container>\n <div class=\"dialog-content-wrapper\">\n <div class=\"main-content-container\" *ngIf=\"!showPrinterSelections\">\n <div class=\"send-options-wrapper\">\n <div class=\"custom-button-wrapper\"\n *ngFor=\"let sendOption of sendOptions\"\n [class.selected-option]=\"sendOption.option === activeSendOption\"\n (click)=\"activeSendOption = sendOption.option\">\n <co-icon [iconData]=\"iconCacheService.getIcon(sendOption.iconName)\"></co-icon>\n </div>\n </div>\n\n <div class=\"email-option-content\" *ngIf=\"activeSendOption === sendOption.Email || activeSendOption === sendOption.Pdf\">\n <div class=\"emails-container\" *ngIf=\"activeSendOption === sendOption.Email\">\n <co-input-checkbox\n *ngFor=\"let email, let index of emails\"\n [name]=\"email\"\n [(model)]=\"models[index]\"\n [label]=\"email\"\n [cssClass]=\"'input-checkbox-wrapper'\"\n ></co-input-checkbox>\n </div>\n\n <div class=\"lov-wrapper\">\n <co-input-combo-box\n [(model)]=\"selectedLayout\"\n [collection]=\"layouts\"\n [forceReadonly]=\"true\"\n placeholder=\"Layout\"\n ></co-input-combo-box>\n </div>\n\n <div class=\"signature-button-wrapper\">\n <div class=\"custom-button-wrapper signature-button\" (click)=\"handleSignatureStart()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.SignatureField)\"></co-icon>\n </div>\n </div>\n </div>\n\n <div class=\"email-option-content\" *ngIf=\"activeSendOption === sendOption.Print\" (click)=\"getPrintTemplates()\">\n <div *ngIf=\"showPrintPriceStickers\">\n <div class=\"lov-wrapper\">\n <co-input-combo-box\n [(model)]=\"stockService.printPriceSticker.reportId\"\n [collection]=\"printTemplates\"\n [fields]=\"printTemplatesField\"\n placeholder=\"Layout\"\n ></co-input-combo-box>\n </div>\n <div class=\"lov-wrapper\" *ngIf=\"priceListCodeData\">\n <co-input-combo-box\n [(model)]=\"stockService.printPriceSticker.priceListCode\"\n [collection]=\"priceListCodeData\"\n [fields]=\"priceListDataField\"\n placeholder=\"Layout\"\n ></co-input-combo-box>\n </div>\n </div>\n\n <div *ngIf=\"showPrintStockStickers\">\n <div class=\"lov-wrapper\">\n <co-input-combo-box\n [(model)]=\"stockService.printSticker.reportId\"\n [collection]=\"printTemplates\"\n [fields]=\"printTemplatesField\"\n placeholder=\"Layout\"\n ></co-input-combo-box>\n </div>\n </div>\n\n <div class=\"lov-wrapper clickable\" (click)=\"togglePrinterSelection()\">\n <div class=\"selected-printer-wrapper\">\n <div class=\"printer-option-list-item\">\n <co-icon class=\"printer-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\"></co-icon>\n <div class=\"printer-details\" *ngIf=\"printerList\">\n <span class=\"printer-name\" [textContent]=\"defaultPrinter\"></span>\n <span class=\"printer-status\" [textContent]=\"defaultPrinter.acceptingJobs\"></span>\n </div>\n </div>\n <co-icon class=\"select-printer-arrow\" [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\"></co-icon>\n </div>\n </div>\n\n <div class=\"standard-printer-wrapper\">\n <div class=\"standard-printer-link\" (click)=\"showStandardPrinterOptions = !showStandardPrinterOptions\">\n <co-icon class=\"arrow-icon\" [iconData]=\"iconCacheService.getIcon(icons.ArrowFatRight)\"></co-icon>\n <span class=\"standard-printer-message\" [textContent]=\"'Standaard printer voor lay-out instellen'\"></span>\n </div>\n\n <div class=\"standard-printer-selections\" *ngIf=\"showStandardPrinterOptions\">\n <co-input-checkbox\n [(model)]=\"models[0]\"\n [label]=\"'Per gebruiker instellen'\"\n [cssClass]=\"'input-checkbox-wrapper'\"\n ></co-input-checkbox>\n <co-input-checkbox\n [(model)]=\"models[1]\"\n [label]=\"'Voor alle gebruikers instellen'\"\n [cssClass]=\"'input-checkbox-wrapper'\"\n ></co-input-checkbox>\n </div>\n </div>\n\n <div class=\"print-footer-wrapper\">\n <div class=\"input-number-wrapper\">\n <co-input-number-picker class=\"number-picker\"\n [step]=\"1\" [(model)]=\"stockService.printSticker.amount\" [min]=\"1\"\n [ngModelOptions]=\"{debounce: 1}\">\n </co-input-number-picker>\n </div>\n <div class=\"custom-button-wrapper print-button\" (click)=\"handlePrintClicked()\">\n <span [textContent]=\"'Print'\"></span>\n </div>\n <div class=\"custom-button-wrapper signature-button\" (click)=\"handleSignatureStart()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.SignatureField)\"></co-icon>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"printer-content-container\" @slideInOut *ngIf=\"showPrinterSelections\">\n <div class=\"selected-printer-wrapper selection clickable\" *ngFor=\"let printers of printerList\" (click)=\"onPrinterClicked(printers)\">\n <div class=\"printer-option-list-item\">\n <co-icon class=\"printer-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\"></co-icon>\n <div class=\"printer-details\">\n <span class=\"printer-name\" [textContent]=\"printers.name\"></span>\n <span class=\"printer-status\" [textContent]=\"printers.acceptingJobs\"></span>\n </div>\n </div>\n <co-icon class=\"select-printer-arrow\" *ngIf=\"!showPrinterSelections\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\"></co-icon>\n </div>\n </div>\n </div>\n </co-dialog-wizard>\n </div>\n ",
2872
+ encapsulation: i0.ViewEncapsulation.None,
2873
+ animations: [
2874
+ animations.trigger('slideInOut', [
2875
+ animations.state('*', animations.style({ transform: 'translateX(0%)', width: '100%', opacity: '1' })),
2876
+ animations.state('void', animations.style({ transform: 'translateX(150%)', opacity: '0' })),
2877
+ animations.transition('void => *', animations.animate(250))
2878
+ ])
2879
+ ]
2880
+ },] }
2881
+ ];
2882
+ SendMethodDialogComponent.ctorParameters = function () { return [
2883
+ { type: IconCacheService },
2884
+ { type: StockService },
2885
+ { type: OptionsService },
2886
+ { type: DictionaryService },
2887
+ { type: i0.ChangeDetectorRef }
2888
+ ]; };
2889
+ SendMethodDialogComponent.propDecorators = {
2890
+ showEmailOption: [{ type: i0.Input }],
2891
+ showPrintOption: [{ type: i0.Input }],
2892
+ showPdfOption: [{ type: i0.Input }],
2893
+ showXmlOption: [{ type: i0.Input }],
2894
+ showPrintPriceStickers: [{ type: i0.Input }],
2895
+ showPrintStockStickers: [{ type: i0.Input }],
2896
+ priceListCodeData: [{ type: i0.Input }],
2897
+ showDialog: [{ type: i0.Input }],
2898
+ headerTitle: [{ type: i0.Input }],
2899
+ printerList: [{ type: i0.Input }],
2900
+ articleData: [{ type: i0.Input }],
2901
+ startSignatureClicked: [{ type: i0.Output }],
2902
+ printButtonClicked: [{ type: i0.Output }],
2903
+ showClass: [{ type: i0.HostBinding, args: ["class.ione-send-method-dialog",] }]
2904
+ };
2905
+
2906
+ var SendMethodDialogModule = /** @class */ (function () {
2907
+ function SendMethodDialogModule() {
2908
+ }
2909
+ return SendMethodDialogModule;
2910
+ }());
2911
+ SendMethodDialogModule.decorators = [
2912
+ { type: i0.NgModule, args: [{
2913
+ declarations: [
2914
+ SendMethodDialogComponent
2915
+ ],
2916
+ imports: [
2917
+ common.CommonModule,
2918
+ corecomponents_v12.CoDialogPromptModule,
2919
+ corecomponents_v12.InputCheckboxModule,
2920
+ corecomponents_v12.InputComboBoxModule,
2921
+ corecomponents_v12.IconModule,
2922
+ corecomponents_v12.InputNumberPickerModule,
2923
+ corecomponents_v12.CoDialogWizardModule,
2924
+ corecomponents_v12.ButtonModule
2925
+ ],
2926
+ exports: [
2927
+ SendMethodDialogComponent
2928
+ ],
2929
+ providers: [
2930
+ StockService
2931
+ ]
2932
+ },] }
2933
+ ];
2934
+
2935
+ var StockChangeAmountComponent = /** @class */ (function () {
2936
+ function StockChangeAmountComponent(_stockService) {
2937
+ this._stockService = _stockService;
2938
+ this.closeStockChangeAmount = new i0.EventEmitter();
2939
+ this.stockState = [];
2940
+ this.stockStateDropdownField = { text: "stateDescription", value: "stockStateId" };
2941
+ }
2942
+ StockChangeAmountComponent.prototype.ngAfterViewInit = function () {
2943
+ this.getStockState();
2944
+ };
2945
+ StockChangeAmountComponent.prototype.closeDialogClick = function () {
2946
+ this.closeStockChangeAmount.emit();
2947
+ };
2948
+ StockChangeAmountComponent.prototype.handleOkClick = function (data) {
2949
+ return __awaiter(this, void 0, void 0, function () {
2950
+ return __generator(this, function (_a) {
2951
+ switch (_a.label) {
2952
+ case 0: return [4 /*yield*/, this._stockService.updateArticleDetails(data)];
2953
+ case 1:
2954
+ _a.sent();
2955
+ return [2 /*return*/];
2956
+ }
2957
+ });
2958
+ });
2959
+ };
2960
+ StockChangeAmountComponent.prototype.handleCancelClick = function () {
2961
+ this.closeStockChangeAmount.emit();
2962
+ };
2963
+ StockChangeAmountComponent.prototype.getStockState = function () {
2964
+ var _this = this;
2965
+ this._stockService.getStockState().then(function (state) {
2966
+ _this.stockState = state;
2967
+ });
2968
+ };
2969
+ return StockChangeAmountComponent;
2970
+ }());
2971
+ StockChangeAmountComponent.decorators = [
2972
+ { type: i0.Component, args: [{
2973
+ selector: "co-stock-change-amount",
2974
+ template: "\n <div class=\"stock-transfer\">\n <co-dialog-wizard [showCloseIcon]=\"true\" (closeClick)=\"closeDialogClick()\">\n <ng-container header>\n <span [textContent]=\"'STOCK_CHANGE_REASON'\"></span>\n </ng-container>\n <div class=\"popup-wrapper\">\n <co-drop-down-list [collection]=\"stockState\"\n [fields]=\"stockStateDropdownField\"\n [placeholder]=\"'STOCK_STATE'\"\n [(model)]=\"selectedArticleDetailsData.stockStateId\"\n ></co-drop-down-list>\n\n <co-input-textarea [(model)]=\"selectedArticleDetailsData.stockStateRemark\"\n\n ></co-input-textarea>\n <div class=\"ok-cancel-buttons\">\n <co-button [textContent]=\"'Ok'\" (click)=\"handleOkClick(selectedArticleDetailsData)\"></co-button>\n <co-button [textContent]=\"'Annuleren'\" (click)=\"handleCancelClick()\"></co-button>\n </div>\n </div>\n </co-dialog-wizard>\n </div>\n ",
2975
+ encapsulation: i0.ViewEncapsulation.None
2976
+ },] }
2977
+ ];
2978
+ StockChangeAmountComponent.ctorParameters = function () { return [
2979
+ { type: StockService }
2980
+ ]; };
2981
+ StockChangeAmountComponent.propDecorators = {
2982
+ selectedArticleDetailsData: [{ type: i0.Input }],
2983
+ closeStockChangeAmount: [{ type: i0.Output }]
2984
+ };
2985
+
2986
+ var StockModule = /** @class */ (function () {
2987
+ function StockModule() {
2988
+ }
2989
+ return StockModule;
2990
+ }());
2991
+ StockModule.decorators = [
2992
+ { type: i0.NgModule, args: [{
2993
+ imports: [
2994
+ corecomponents_v12.InputComboBoxModule,
2995
+ corecomponents_v12.CoGridModule,
2996
+ corecomponents_v12.ButtonModule,
2997
+ common.CommonModule,
2998
+ corecomponents_v12.InputRadioButtonModule,
2999
+ corecomponents_v12.DropDownModule,
3000
+ corecomponents_v12.SimpleGridModule,
3001
+ corecomponents_v12.ImageModule,
3002
+ corecomponents_v12.InputTextModule,
3003
+ SendMethodDialogModule,
3004
+ corecomponents_v12.IconModule,
3005
+ corecomponents_v12.InputNumberPickerModule,
3006
+ corecomponents_v12.CoDialogWizardModule,
3007
+ corecomponents_v12.InputTextareaModule
3008
+ ],
3009
+ declarations: [
3010
+ StockComponent,
3011
+ StockInformationComponent,
3012
+ StockInformationGridComponent,
3013
+ StockLocationComponent,
3014
+ StockTransferComponent,
3015
+ StockChangeAmountComponent
3016
+ ],
3017
+ exports: [
3018
+ StockComponent
3019
+ ],
3020
+ providers: [
3021
+ StockService
3022
+ ]
3023
+ },] }
3024
+ ];
3025
+
3026
+ var KeyboardCode;
3027
+ (function (KeyboardCode) {
3028
+ KeyboardCode["Backspace"] = "Backspace";
3029
+ KeyboardCode["Digit0"] = "Digit0";
3030
+ KeyboardCode["Digit1"] = "Digit1";
3031
+ KeyboardCode["Digit2"] = "Digit2";
3032
+ KeyboardCode["Digit3"] = "Digit3";
3033
+ KeyboardCode["Digit4"] = "Digit4";
3034
+ KeyboardCode["Digit5"] = "Digit5";
3035
+ KeyboardCode["Digit6"] = "Digit6";
3036
+ KeyboardCode["Digit7"] = "Digit7";
3037
+ KeyboardCode["Digit8"] = "Digit8";
3038
+ KeyboardCode["Digit9"] = "Digit9";
3039
+ KeyboardCode["Enter"] = "Enter";
3040
+ KeyboardCode["Escape"] = "Escape";
3041
+ KeyboardCode["Minus"] = "Minus";
3042
+ KeyboardCode["Numpad0"] = "Numpad0";
3043
+ KeyboardCode["Numpad1"] = "Numpad1";
3044
+ KeyboardCode["Numpad2"] = "Numpad2";
3045
+ KeyboardCode["Numpad3"] = "Numpad3";
3046
+ KeyboardCode["Numpad4"] = "Numpad4";
3047
+ KeyboardCode["Numpad5"] = "Numpad5";
3048
+ KeyboardCode["Numpad6"] = "Numpad6";
3049
+ KeyboardCode["Numpad7"] = "Numpad7";
3050
+ KeyboardCode["Numpad8"] = "Numpad8";
3051
+ KeyboardCode["Numpad9"] = "Numpad9";
3052
+ KeyboardCode["NumpadDecimal"] = "NumpadDecimal";
3053
+ KeyboardCode["NumpadEnter"] = "NumpadEnter";
3054
+ KeyboardCode["NumpadSubtract"] = "NumpadSubtract";
3055
+ KeyboardCode["Period"] = "Period";
3056
+ })(KeyboardCode || (KeyboardCode = {}));
3057
+
3058
+ var KeyPadComponent = /** @class */ (function () {
3059
+ function KeyPadComponent(iconCacheService) {
3060
+ this.iconCacheService = iconCacheService;
3061
+ this.icons = Icon;
3062
+ this.showValue = true;
3063
+ this.emitModelChangeOnEnter = true;
3064
+ this.modelChange = new i0.EventEmitter();
3065
+ this.internalModelChange = new i0.EventEmitter();
3066
+ this.enterClick = new i0.EventEmitter();
3067
+ this._validKeyMap = new Map([
3068
+ [KeyboardCode.Digit0, "0"],
3069
+ [KeyboardCode.Digit1, "1"],
3070
+ [KeyboardCode.Digit2, "2"],
3071
+ [KeyboardCode.Digit3, "3"],
3072
+ [KeyboardCode.Digit4, "4"],
3073
+ [KeyboardCode.Digit5, "5"],
3074
+ [KeyboardCode.Digit6, "6"],
3075
+ [KeyboardCode.Digit7, "7"],
3076
+ [KeyboardCode.Digit8, "8"],
3077
+ [KeyboardCode.Digit9, "9"],
3078
+ [KeyboardCode.Numpad0, "0"],
3079
+ [KeyboardCode.Numpad1, "1"],
3080
+ [KeyboardCode.Numpad2, "2"],
3081
+ [KeyboardCode.Numpad3, "3"],
3082
+ [KeyboardCode.Numpad4, "4"],
3083
+ [KeyboardCode.Numpad5, "5"],
3084
+ [KeyboardCode.Numpad6, "6"],
3085
+ [KeyboardCode.Numpad7, "7"],
3086
+ [KeyboardCode.Numpad8, "8"],
3087
+ [KeyboardCode.Numpad9, "9"],
3088
+ [KeyboardCode.NumpadDecimal, "."],
3089
+ [KeyboardCode.Period, "."]
3090
+ ]);
3091
+ this.isNegative = false;
3092
+ this._model = 0;
3093
+ this._internalModel = "0";
3094
+ this._maxCharacters = 11;
3095
+ }
3096
+ Object.defineProperty(KeyPadComponent.prototype, "model", {
3097
+ get: function () {
3098
+ return this._model;
3099
+ },
3100
+ set: function (value) {
3101
+ this._model = value;
3102
+ this._internalModel = this._model + "";
3103
+ },
3104
+ enumerable: false,
3105
+ configurable: true
3106
+ });
3107
+ KeyPadComponent.prototype.showClass = function () {
3108
+ return true;
3109
+ };
3110
+ KeyPadComponent.prototype.handleKeyDown = function (event) {
3111
+ this._keyDown(event);
3112
+ };
3113
+ Object.defineProperty(KeyPadComponent.prototype, "internalModel", {
3114
+ get: function () {
3115
+ return this._internalModel;
3116
+ },
3117
+ set: function (value) {
3118
+ this._internalModel = value;
3119
+ this.isNegative = parseFloat(this._internalModel) < 0;
3120
+ this.internalModelChange.emit(this._internalModel);
3121
+ },
3122
+ enumerable: false,
3123
+ configurable: true
3124
+ });
3125
+ KeyPadComponent.prototype.handleMinusClick = function (event) {
3126
+ var model = parseFloat(this.internalModel);
3127
+ if (model !== 0) {
3128
+ if (model < 0) {
3129
+ this.internalModel = Math.abs(model) + "";
3130
+ }
3131
+ else {
3132
+ this.internalModel = -model + "";
3133
+ }
3134
+ }
3135
+ this._emitModelChange();
3136
+ };
3137
+ KeyPadComponent.prototype.handleClearClick = function (event) {
3138
+ this.internalModel = "0";
3139
+ this._emitModelChange();
3140
+ };
3141
+ KeyPadComponent.prototype.handleBsClick = function (event) {
3142
+ var wish = this.internalModel;
3143
+ wish = wish.slice(0, wish.length - 1) || "0";
3144
+ if (!isNaN(parseFloat(wish))) {
3145
+ this.internalModel = parseFloat(wish) + "";
3146
+ }
3147
+ this._emitModelChange();
3148
+ };
3149
+ KeyPadComponent.prototype.handleButtonClick = function (chr) {
3150
+ this._updateModel(chr);
3151
+ };
3152
+ KeyPadComponent.prototype.handleEnterClick = function (event) {
3153
+ this._emitModelChange(true);
3154
+ this.enterClick.emit();
3155
+ };
3156
+ KeyPadComponent.prototype._updateModel = function (value) {
3157
+ if (value === undefined || value === null ||
3158
+ (value === '.' && this.internalModel.indexOf('.') > -1) ||
3159
+ this.internalModel.length >= this._maxCharacters) {
3160
+ return;
3161
+ }
3162
+ this.internalModel = this.internalModel !== "0" ? this.internalModel + value : value;
3163
+ this._emitModelChange();
3164
+ };
3165
+ KeyPadComponent.prototype._keyDown = function (event) {
3166
+ if (this._isEnter(event)) {
3167
+ this.handleEnterClick(event);
3168
+ }
3169
+ else if (this._isMinus(event)) {
3170
+ this.handleMinusClick(event);
3171
+ }
3172
+ else if (this._isEscape(event)) {
3173
+ this.handleClearClick(event);
3174
+ }
3175
+ else if (this._isBackspace(event)) {
3176
+ this.handleBsClick(event);
3177
+ }
3178
+ else {
3179
+ this._updateModel(this._validKeyMap.get(event.code));
3180
+ }
3181
+ };
3182
+ KeyPadComponent.prototype._isEnter = function (event) {
3183
+ return event.code === KeyboardCode.Enter || event.code === KeyboardCode.NumpadEnter;
3184
+ };
3185
+ KeyPadComponent.prototype._isMinus = function (event) {
3186
+ return event.code === KeyboardCode.Minus || event.code === KeyboardCode.NumpadSubtract;
3187
+ };
3188
+ KeyPadComponent.prototype._isEscape = function (event) {
3189
+ return event.code === KeyboardCode.Escape;
3190
+ };
3191
+ KeyPadComponent.prototype._isBackspace = function (event) {
3192
+ return event.code === KeyboardCode.Backspace;
3193
+ };
3194
+ KeyPadComponent.prototype._emitModelChange = function (enter) {
3195
+ if (enter === void 0) { enter = false; }
3196
+ if ((enter && this.emitModelChangeOnEnter) || (!enter && !this.emitModelChangeOnEnter)) {
3197
+ var model = parseFloat(this.internalModel);
3198
+ if (!isNaN(model)) {
3199
+ if (enter && this.emitModelChangeOnEnter) {
3200
+ this.model = model;
3201
+ }
3202
+ this.modelChange.emit(model);
3203
+ }
3204
+ }
3205
+ };
3206
+ return KeyPadComponent;
3207
+ }());
3208
+ KeyPadComponent.decorators = [
3209
+ { type: i0.Component, args: [{
3210
+ selector: 'co-key-pad',
3211
+ template: "\n <div class=\"key-pad-wrapper\">\n <div class=\"key-pad-model-wrapper\" *ngIf=\"showValue\">\n <div class=\"key-pad-model\" [textContent]=\"internalModel\" [class.negative]=\"isNegative\"></div>\n </div>\n <div class=\"key-pad-button-wrapper\">\n <div class=\"key-pad-button button-7\" [textContent]=\"'7'\" (click)=\"handleButtonClick('7')\"></div>\n <div class=\"key-pad-button button-8\" [textContent]=\"'8'\" (click)=\"handleButtonClick('8')\"></div>\n <div class=\"key-pad-button button-9\" [textContent]=\"'9'\" (click)=\"handleButtonClick('9')\"></div>\n <div class=\"key-pad-button button-bs\" (click)=\"handleBsClick($event)\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.DeleteLeftRegular)\"></co-icon>\n </div>\n <div class=\"key-pad-button button-4\" [textContent]=\"'4'\" (click)=\"handleButtonClick('4')\"></div>\n <div class=\"key-pad-button button-5\" [textContent]=\"'5'\" (click)=\"handleButtonClick('5')\"></div>\n <div class=\"key-pad-button button-6\" [textContent]=\"'6'\" (click)=\"handleButtonClick('6')\"></div>\n <div class=\"key-pad-button button-minus\" [textContent]=\"'-'\" (click)=\"handleMinusClick($event)\"></div>\n <div class=\"key-pad-button button-1\" [textContent]=\"'1'\" (click)=\"handleButtonClick('1')\"></div>\n <div class=\"key-pad-button button-2\" [textContent]=\"'2'\" (click)=\"handleButtonClick('2')\"></div>\n <div class=\"key-pad-button button-3\" [textContent]=\"'3'\" (click)=\"handleButtonClick('3')\"></div>\n <div class=\"key-pad-button button-enter\" (click)=\"handleEnterClick($event)\">\n <span [textContent]=\"'enter'\"></span>\n </div>\n <div class=\"key-pad-button button-0\" [textContent]=\"'0'\" (click)=\"handleButtonClick('0')\"></div>\n <div class=\"key-pad-button button-dot\" [textContent]=\"'.'\" (click)=\"handleButtonClick('.')\"></div>\n </div>\n </div>\n ",
3212
+ encapsulation: i0.ViewEncapsulation.None
3213
+ },] }
3214
+ ];
3215
+ KeyPadComponent.ctorParameters = function () { return [
3216
+ { type: IconCacheService }
3217
+ ]; };
3218
+ KeyPadComponent.propDecorators = {
3219
+ model: [{ type: i0.Input }],
3220
+ showValue: [{ type: i0.Input }],
3221
+ emitModelChangeOnEnter: [{ type: i0.Input }],
3222
+ modelChange: [{ type: i0.Output }],
3223
+ internalModelChange: [{ type: i0.Output }],
3224
+ enterClick: [{ type: i0.Output }],
3225
+ showClass: [{ type: i0.HostBinding, args: ['class.co-key-pad',] }],
3226
+ handleKeyDown: [{ type: i0.HostListener, args: ['window:keydown', ['$event'],] }]
3227
+ };
3228
+
3229
+ var KeyPadModule = /** @class */ (function () {
3230
+ function KeyPadModule() {
3231
+ }
3232
+ return KeyPadModule;
3233
+ }());
3234
+ KeyPadModule.decorators = [
3235
+ { type: i0.NgModule, args: [{
3236
+ imports: [
3237
+ common.CommonModule,
3238
+ corecomponents_v12.IconModule
3239
+ ],
3240
+ declarations: [
3241
+ KeyPadComponent
3242
+ ],
3243
+ exports: [
3244
+ KeyPadComponent
3245
+ ]
3246
+ },] }
3247
+ ];
3248
+
3249
+ var LayoutSwitcherComponent = /** @class */ (function () {
3250
+ function LayoutSwitcherComponent(iconCacheService) {
3251
+ this.iconCacheService = iconCacheService;
3252
+ this.icon = Icon;
3253
+ this.layoutItems = [];
3254
+ this.layoutSwitchEmit = new i0.EventEmitter();
3255
+ this.showMaskSidebar = false;
3256
+ this._activeIndex = 0;
3257
+ }
3258
+ LayoutSwitcherComponent.prototype.showClass = function () {
3259
+ return true;
3260
+ };
3261
+ Object.defineProperty(LayoutSwitcherComponent.prototype, "activeIndex", {
3262
+ get: function () {
3263
+ return this._activeIndex;
3264
+ },
3265
+ set: function (index) {
3266
+ this._activeIndex = index;
3267
+ this.toggleMaskSidebar();
3268
+ this.layoutSwitchEmit.emit(this.layoutItems[index]);
3269
+ },
3270
+ enumerable: false,
3271
+ configurable: true
3272
+ });
3273
+ LayoutSwitcherComponent.prototype.toggleMaskSidebar = function () {
3274
+ this.showMaskSidebar = !this.showMaskSidebar;
3275
+ };
3276
+ return LayoutSwitcherComponent;
3277
+ }());
3278
+ LayoutSwitcherComponent.decorators = [
3279
+ { type: i0.Component, args: [{
3280
+ selector: "layout-switcher",
3281
+ template: "\n <div class=\"mask-wrapper\" [class.mask-wrapper-active]='showMaskSidebar' @showHideSidebar>\n <div class=\"icon-wrapper\" (click)=\"toggleMaskSidebar()\">\n <co-icon class=\"icon-mask\" [iconData]=\"iconCacheService.getIcon(icon.BringForwardRegular)\" [@positionIcon]=\"showMaskSidebar\"></co-icon>\n\n <co-icon class='icon-mask-sidebar-handle' [@positionHandle]='showMaskSidebar' [iconData]=\"showMaskSidebar ? iconCacheService.getIcon(this.icon.AngleLeftSolid) : iconCacheService.getIcon(this.icon.AngleRightSolid)\"></co-icon>\n </div>\n\n <div class=\"mask-content\" *ngIf=\"showMaskSidebar\" @showHideSidebar>\n <span *ngFor='let item of this.layoutItems' [class.active]=\"this.activeIndex === this.layoutItems.indexOf(item)\" [textContent]=\"item\" (click)='activeIndex = this.layoutItems.indexOf(item)' ></span>\n </div>\n </div>\n\n ",
3282
+ animations: [
3283
+ animations.trigger("showHideSidebar", [
3284
+ animations.state("void", animations.style({ "width": "0" })),
3285
+ animations.state("*", animations.style({ "width": "*" })),
3286
+ animations.transition("void <=> *", animations.animate(200))
3287
+ ]),
3288
+ animations.trigger("positionIcon", [
3289
+ animations.state("true", animations.style({ "left": "70px" })),
3290
+ animations.state("false", animations.style({ "left": "10px" })),
3291
+ animations.transition("true <=> false", animations.animate(200))
3292
+ ]),
3293
+ animations.trigger("positionHandle", [
3294
+ animations.state("true", animations.style({ "left": "15px" })),
3295
+ animations.state("false", animations.style({ "left": "75px" })),
3296
+ animations.transition("true <=> false", animations.animate(200))
3297
+ ])
3298
+ ],
3299
+ encapsulation: i0.ViewEncapsulation.None
3300
+ },] }
3301
+ ];
3302
+ LayoutSwitcherComponent.ctorParameters = function () { return [
3303
+ { type: IconCacheService }
3304
+ ]; };
3305
+ LayoutSwitcherComponent.propDecorators = {
3306
+ showClass: [{ type: i0.HostBinding, args: ['class.layout-switcher',] }],
3307
+ layoutItems: [{ type: i0.Input }],
3308
+ layoutSwitchEmit: [{ type: i0.Output }]
3309
+ };
3310
+
3311
+ var LayoutSwitcherModule = /** @class */ (function () {
3312
+ function LayoutSwitcherModule() {
3313
+ }
3314
+ return LayoutSwitcherModule;
3315
+ }());
3316
+ LayoutSwitcherModule.decorators = [
3317
+ { type: i0.NgModule, args: [{
3318
+ imports: [
3319
+ common.CommonModule,
3320
+ corecomponents_v12.IconModule
3321
+ ],
3322
+ declarations: [
3323
+ LayoutSwitcherComponent,
3324
+ ],
3325
+ exports: [
3326
+ LayoutSwitcherComponent
3327
+ ]
3328
+ },] }
3329
+ ];
3330
+
3331
+ var GaugeColor$1;
3332
+ (function (GaugeColor) {
3333
+ GaugeColor["Low"] = "#E0E0E0";
3334
+ GaugeColor["Medium"] = "#F88952";
3335
+ GaugeColor["High"] = "#5FDCB3";
3336
+ })(GaugeColor$1 || (GaugeColor$1 = {}));
3337
+ var CoCircularGaugeComponent = /** @class */ (function () {
3338
+ function CoCircularGaugeComponent() {
3339
+ this._color = GaugeColor$1.Low;
3340
+ this.majorTicks = {
3341
+ height: 0,
3342
+ };
3343
+ this.minorTicks = {
3344
+ height: 0
3345
+ };
3346
+ this.labelStyle = {
3347
+ position: 'Inside', useRangeColor: true,
3348
+ font: { size: '0px', fontFamily: 'inherit' }
3349
+ };
3350
+ this.lineStyle = {
3351
+ width: 0
3352
+ };
3353
+ this.ranges = [
3354
+ {
3355
+ start: 1, end: 100,
3356
+ radius: '13px',
3357
+ startWidth: 3, endWidth: 3,
3358
+ color: '#E0E0E0',
3359
+ roundedCornerRadius: 0
3360
+ },
3361
+ ];
3362
+ }
3363
+ Object.defineProperty(CoCircularGaugeComponent.prototype, "value", {
3364
+ get: function () {
3365
+ return this._value;
3366
+ },
3367
+ set: function (value) {
3368
+ this._value = value;
3369
+ this._setColor();
3370
+ },
3371
+ enumerable: false,
3372
+ configurable: true
3373
+ });
3374
+ Object.defineProperty(CoCircularGaugeComponent.prototype, "color", {
3375
+ get: function () {
3376
+ return this._color;
3377
+ },
3378
+ enumerable: false,
3379
+ configurable: true
3380
+ });
3381
+ CoCircularGaugeComponent.prototype.showClass = function () {
3382
+ return true;
3383
+ };
3384
+ CoCircularGaugeComponent.prototype.getAxes = function () {
3385
+ return [{
3386
+ minimum: 0,
3387
+ maximum: 100,
3388
+ radius: '15px',
3389
+ startAngle: 1,
3390
+ endAngle: 360,
3391
+ majorTicks: this.majorTicks,
3392
+ minorTicks: this.minorTicks,
3393
+ labelStyle: this.labelStyle,
3394
+ lineStyle: this.lineStyle,
3395
+ ranges: this.ranges,
3396
+ pointers: this.getPointers(),
3397
+ annotations: this.getAnnotations(),
3398
+ }];
3399
+ };
3400
+ CoCircularGaugeComponent.prototype.getPointers = function () {
3401
+ if (this.value) {
3402
+ return [{
3403
+ roundedCornerRadius: 0,
3404
+ value: this.value,
3405
+ type: 'RangeBar',
3406
+ radius: '13px',
3407
+ color: this.color,
3408
+ border: {
3409
+ width: 0
3410
+ },
3411
+ animation: {
3412
+ enable: false
3413
+ },
3414
+ pointerWidth: 3
3415
+ }];
3416
+ }
3417
+ };
3418
+ ;
3419
+ CoCircularGaugeComponent.prototype.getAnnotations = function () {
3420
+ if (this.value !== undefined) {
3421
+ var label = this.value ? this.value + "%" : "0%";
3422
+ return [{
3423
+ content: '<div class="annotation">' +
3424
+ label + '</div>',
3425
+ angle: 90,
3426
+ radius: '50%',
3427
+ zIndex: '10',
3428
+ }];
3429
+ }
3430
+ };
3431
+ CoCircularGaugeComponent.prototype._setColor = function () {
3432
+ if (this.value == 0) {
3433
+ this._color = GaugeColor$1.Low;
3434
+ }
3435
+ else if (this.value >= 0 && this.value < 100) {
3436
+ this._color = GaugeColor$1.Medium;
3437
+ }
3438
+ else if (this.value == 100) {
3439
+ this._color = GaugeColor$1.High;
3440
+ }
3441
+ };
3442
+ return CoCircularGaugeComponent;
3443
+ }());
3444
+ CoCircularGaugeComponent.decorators = [
3445
+ { type: i0.Component, args: [{
3446
+ selector: "co-circular-gauge",
3447
+ template: "\n <div class=\"circular-gauge-wrapper\">\n <ejs-circulargauge\n class=\"circular-gauge\"\n [width]=\"'100%'\"\n [axes]=\"getAxes()\">\n </ejs-circulargauge>\n </div>\n ",
3448
+ encapsulation: i0.ViewEncapsulation.None
3449
+ },] }
3450
+ ];
3451
+ CoCircularGaugeComponent.propDecorators = {
3452
+ circulargauge: [{ type: i0.ViewChild, args: ['circulargauge',] }],
3453
+ value: [{ type: i0.Input }],
3454
+ showClass: [{ type: i0.HostBinding, args: ["class.co-circular-gauge",] }]
3455
+ };
3456
+
3457
+ var CoCircularGaugeModule = /** @class */ (function () {
3458
+ function CoCircularGaugeModule() {
3459
+ }
3460
+ return CoCircularGaugeModule;
3461
+ }());
3462
+ CoCircularGaugeModule.decorators = [
3463
+ { type: i0.NgModule, args: [{
3464
+ imports: [
3465
+ common.CommonModule,
3466
+ ej2AngularCirculargauge.CircularGaugeModule
3467
+ ],
3468
+ declarations: [
3469
+ CoCircularGaugeComponent
3470
+ ],
3471
+ exports: [
3472
+ CoCircularGaugeComponent
3473
+ ]
3474
+ },] }
3475
+ ];
3476
+
3477
+ var GaugeColor;
3478
+ (function (GaugeColor) {
3479
+ GaugeColor["Low"] = "#E0E0E0";
3480
+ GaugeColor["Medium"] = "#F88952";
3481
+ GaugeColor["High"] = "#5FDCB3";
3482
+ })(GaugeColor || (GaugeColor = {}));
3483
+ var CoLinearGaugeComponent = /** @class */ (function () {
3484
+ function CoLinearGaugeComponent() {
3485
+ this.color = GaugeColor.Low;
3486
+ }
3487
+ Object.defineProperty(CoLinearGaugeComponent.prototype, "value", {
3488
+ get: function () {
3489
+ return this._value;
3490
+ },
3491
+ set: function (value) {
3492
+ this._value = value;
3493
+ this._setColor();
3494
+ },
3495
+ enumerable: false,
3496
+ configurable: true
3497
+ });
3498
+ CoLinearGaugeComponent.prototype.showClass = function () {
3499
+ return true;
3500
+ };
3501
+ CoLinearGaugeComponent.prototype.getStyle = function () {
3502
+ return "linear-gradient(90deg, " + this.color + " 0 " + this.value + "%, white " + this.value + "% 100%";
3503
+ };
3504
+ CoLinearGaugeComponent.prototype._setColor = function () {
3505
+ if (this.value == 0) {
3506
+ this.color = GaugeColor.Low;
3507
+ }
3508
+ else if (this.value >= 0 && this.value < 100) {
3509
+ this.color = GaugeColor.Medium;
3510
+ }
3511
+ else if (this.value == 100) {
3512
+ this.color = GaugeColor.High;
3513
+ }
3514
+ };
3515
+ return CoLinearGaugeComponent;
3516
+ }());
3517
+ CoLinearGaugeComponent.decorators = [
3518
+ { type: i0.Component, args: [{
3519
+ selector: "co-linear-gauge",
3520
+ template: "\n <div class=\"linear-gauge\"\n [style.background]=\"getStyle()\"\n [style.border-color]=\"color\"\n [textContent]=\"count ? count : ''\"\n ></div>\n ",
3521
+ encapsulation: i0.ViewEncapsulation.None
3522
+ },] }
3523
+ ];
3524
+ CoLinearGaugeComponent.propDecorators = {
3525
+ value: [{ type: i0.Input }],
3526
+ count: [{ type: i0.Input }],
3527
+ showClass: [{ type: i0.HostBinding, args: ["class.co-linear-gauge",] }]
3528
+ };
3529
+
3530
+ var CoLinearGaugeModule = /** @class */ (function () {
3531
+ function CoLinearGaugeModule() {
3532
+ }
3533
+ return CoLinearGaugeModule;
3534
+ }());
3535
+ CoLinearGaugeModule.decorators = [
3536
+ { type: i0.NgModule, args: [{
3537
+ imports: [
3538
+ common.CommonModule,
3539
+ ],
3540
+ declarations: [
3541
+ CoLinearGaugeComponent
3542
+ ],
3543
+ exports: [
3544
+ CoLinearGaugeComponent
3545
+ ]
3546
+ },] }
3547
+ ];
3548
+
3549
+ var StatusbarComponent = /** @class */ (function () {
3550
+ function StatusbarComponent() {
3551
+ this.statusbarClick = new i0.EventEmitter();
3552
+ this.showPopup = false;
3553
+ this.popupClass = 'dropdown';
3554
+ }
3555
+ Object.defineProperty(StatusbarComponent.prototype, "statusbarData", {
3556
+ get: function () {
3557
+ return this._statusbarData;
3558
+ },
3559
+ set: function (value) {
3560
+ this._statusbarData = value;
3561
+ },
3562
+ enumerable: false,
3563
+ configurable: true
3564
+ });
3565
+ StatusbarComponent.prototype.showClass = function () {
3566
+ return true;
3567
+ };
3568
+ StatusbarComponent.prototype.onHover = function (event) {
3569
+ this.showPopup = true;
3570
+ this._mouseY = event.screenY;
3571
+ this._windowHeight = window.innerHeight;
3572
+ this.setPopupClass();
3573
+ };
3574
+ StatusbarComponent.prototype.onLeave = function () {
3575
+ this.showPopup = false;
3576
+ };
3577
+ StatusbarComponent.prototype.onStatusbarClick = function () {
3578
+ this.statusbarClick.emit();
3579
+ };
3580
+ StatusbarComponent.prototype.setPopupClass = function () {
3581
+ var popupHeight = this.statusbarData.length * 30;
3582
+ var dropdownInScreen = (this._mouseY + popupHeight) <= this._windowHeight;
3583
+ if (dropdownInScreen) {
3584
+ this.popupClass = 'dropdown';
3585
+ }
3586
+ else {
3587
+ this.popupClass = 'dropup';
3588
+ }
3589
+ };
3590
+ return StatusbarComponent;
3591
+ }());
3592
+ StatusbarComponent.decorators = [
3593
+ { type: i0.Component, args: [{
3594
+ selector: "co-statusbar",
3595
+ template: "\n <div class=\"co-statusbar-wrapper\"\n *ngIf=\"statusbarData\"\n (mouseover)=\"onHover($event)\"\n (mouseleave)=\"onLeave()\"\n (click)=\"onStatusbarClick()\">\n <div class=\"statuses\">\n <div *ngFor=\"let data of statusbarData; let index = index\" class=\"status\">\n <co-linear-gauge [value]=\"data.percentage\" [count]=\"!!data.count ? data.count : undefined\"></co-linear-gauge>\n </div>\n </div>\n <div class=status-description-popup *ngIf=\"showPopup\" @showHidePopup [ngClass]=\"popupClass\">\n <div class=\"status-descriptions\">\n <div *ngFor=\"let data of statusbarData; let index = index\" class=\"status-description\">\n <co-circular-gauge [value]=\"data.percentage\"></co-circular-gauge>\n <span [textContent]=\"data.label\"></span>\n </div>\n </div>\n </div>\n </div>\n ",
3596
+ animations: [
3597
+ animations.trigger("showHidePopup", [
3598
+ animations.state("void", animations.style({ opacity: 0 })),
3599
+ animations.state("*", animations.style({ opacity: 1 })),
3600
+ animations.transition("void <=> *", animations.animate("250ms ease-in-out")),
3601
+ ])
3602
+ ],
3603
+ encapsulation: i0.ViewEncapsulation.None
3604
+ },] }
3605
+ ];
3606
+ StatusbarComponent.ctorParameters = function () { return []; };
3607
+ StatusbarComponent.propDecorators = {
3608
+ statusbarData: [{ type: i0.Input }],
3609
+ statusbarClick: [{ type: i0.Output }],
3610
+ showClass: [{ type: i0.HostBinding, args: ["class.co-statusbar",] }]
3611
+ };
3612
+
3613
+ var StatusbarModule = /** @class */ (function () {
3614
+ function StatusbarModule() {
3615
+ }
3616
+ return StatusbarModule;
3617
+ }());
3618
+ StatusbarModule.decorators = [
3619
+ { type: i0.NgModule, args: [{
3620
+ imports: [
3621
+ common.CommonModule,
3622
+ CoCircularGaugeModule,
3623
+ CoLinearGaugeModule
3624
+ ],
3625
+ declarations: [
3626
+ StatusbarComponent
3627
+ ],
3628
+ exports: [
3629
+ StatusbarComponent
3630
+ ]
3631
+ },] }
3632
+ ];
3633
+
3634
+ var SharedService = /** @class */ (function () {
3635
+ function SharedService(options, connector) {
3636
+ this.options = options;
3637
+ this.connector = connector;
3638
+ }
3639
+ SharedService.prototype.init = function (options) {
3640
+ return __awaiter(this, void 0, void 0, function () {
3641
+ return __generator(this, function (_a) {
3642
+ switch (_a.label) {
3643
+ case 0: return [4 /*yield*/, this.options.initialize(options)];
3644
+ case 1:
3645
+ _a.sent();
3646
+ this.connector.connect();
3647
+ return [2 /*return*/];
3648
+ }
3649
+ });
3650
+ });
3651
+ };
3652
+ return SharedService;
3653
+ }());
3654
+ SharedService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0__namespace.ɵɵinject(OptionsService), i0__namespace.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
3655
+ SharedService.decorators = [
3656
+ { type: i0.Injectable, args: [{
3657
+ providedIn: "root"
3658
+ },] }
3659
+ ];
3660
+ SharedService.ctorParameters = function () { return [
3661
+ { type: OptionsService },
3662
+ { type: SharedConnectorService }
3663
+ ]; };
3664
+
3665
+ /*
3666
+ * Public API Surface of sharedcomponents
3667
+ */
3668
+
3669
+ /**
3670
+ * Generated bundle index. Do not edit.
3671
+ */
3672
+
3673
+ exports.CoCircularGaugeComponent = CoCircularGaugeComponent;
3674
+ exports.CoCircularGaugeModule = CoCircularGaugeModule;
3675
+ exports.CoLinearGaugeComponent = CoLinearGaugeComponent;
3676
+ exports.CoLinearGaugeModule = CoLinearGaugeModule;
3677
+ exports.DocsignComponent = DocsignComponent;
3678
+ exports.DocsignModule = DocsignModule;
3679
+ exports.KeyPadComponent = KeyPadComponent;
3680
+ exports.KeyPadModule = KeyPadModule;
3681
+ exports.LayoutSwitcherComponent = LayoutSwitcherComponent;
3682
+ exports.LayoutSwitcherModule = LayoutSwitcherModule;
3683
+ exports.SendMethodDialogComponent = SendMethodDialogComponent;
3684
+ exports.SendMethodDialogModule = SendMethodDialogModule;
3685
+ exports.SharedService = SharedService;
3686
+ exports.StatusbarComponent = StatusbarComponent;
3687
+ exports.StatusbarModule = StatusbarModule;
3688
+ exports.StockComponent = StockComponent;
3689
+ exports.StockModule = StockModule;
3690
+ exports["ɵa"] = SignatureComponent;
3691
+ exports["ɵb"] = SignaturesComponent;
3692
+ exports["ɵc"] = StockService;
3693
+ exports["ɵd"] = SharedConnectorService;
3694
+ exports["ɵe"] = OptionsService;
3695
+ exports["ɵf"] = DictionaryService;
3696
+ exports["ɵg"] = IconCacheService;
3697
+ exports["ɵh"] = StockInformationComponent;
3698
+ exports["ɵi"] = StockInformationGridComponent;
3699
+ exports["ɵj"] = StockLocationComponent;
3700
+ exports["ɵk"] = StockTransferComponent;
3701
+ exports["ɵl"] = StockChangeAmountComponent;
3702
+
3703
+ Object.defineProperty(exports, '__esModule', { value: true });
3704
+
3705
+ }));
3706
+ //# sourceMappingURL=colijnit-sharedcomponents.umd.js.map