@colijnit/sharedcomponents 1.0.23 → 1.0.25

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 (293) hide show
  1. package/.browserslistrc +16 -0
  2. package/.editorconfig +16 -0
  3. package/.vscode/extensions.json +4 -0
  4. package/.vscode/launch.json +20 -0
  5. package/.vscode/tasks.json +42 -0
  6. package/README.md +11 -8
  7. package/Sharedcomponents.iml +11 -0
  8. package/angular.json +133 -0
  9. package/karma.conf.js +44 -0
  10. package/move-assets.js +14 -0
  11. package/package.json +74 -26
  12. package/projects/sharedcomponents/.browserslistrc +16 -0
  13. package/projects/sharedcomponents/README.md +24 -0
  14. package/projects/sharedcomponents/karma.conf.js +44 -0
  15. package/projects/sharedcomponents/ng-package.json +17 -0
  16. package/projects/sharedcomponents/package.json +18 -0
  17. package/projects/sharedcomponents/src/lib/assets/dictionary/text.properties.ts +8 -0
  18. package/projects/sharedcomponents/src/lib/assets/icons/angle_left_solid.svg +1 -0
  19. package/projects/sharedcomponents/src/lib/assets/icons/angle_right_solid.svg +1 -0
  20. package/projects/sharedcomponents/src/lib/assets/icons/arrow_fat_right.svg +1 -0
  21. package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_left.svg +8 -0
  22. package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_right.svg +4 -0
  23. package/projects/sharedcomponents/src/lib/assets/icons/bring_forward_regular.svg +1 -0
  24. package/projects/sharedcomponents/src/lib/assets/icons/check_round.svg +1 -0
  25. package/projects/sharedcomponents/src/lib/assets/icons/delete_left_regular.svg +1 -0
  26. package/projects/sharedcomponents/src/lib/assets/icons/delivery_truck.svg +12 -0
  27. package/projects/sharedcomponents/src/lib/assets/icons/email.svg +5 -0
  28. package/projects/sharedcomponents/src/lib/assets/icons/pdf.svg +15 -0
  29. package/projects/sharedcomponents/src/lib/assets/icons/print.svg +10 -0
  30. package/projects/sharedcomponents/src/lib/assets/icons/signature_field.svg +9 -0
  31. package/projects/sharedcomponents/src/lib/assets/icons/xml.svg +9 -0
  32. package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.component.ts +139 -0
  33. package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.module.ts +19 -0
  34. package/{lib → projects/sharedcomponents/src/lib}/components/circular-gauge/style/_layout.scss +0 -0
  35. package/{lib → projects/sharedcomponents/src/lib}/components/circular-gauge/style/_material-definition.scss +0 -0
  36. package/{lib → projects/sharedcomponents/src/lib}/components/circular-gauge/style/_theme.scss +0 -0
  37. package/{lib → projects/sharedcomponents/src/lib}/components/circular-gauge/style/material.scss +0 -0
  38. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-base-view.component.ts +68 -0
  39. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-day-view.component.ts +31 -0
  40. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-event.component.ts +67 -0
  41. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-events.component.ts +48 -0
  42. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.ts +81 -0
  43. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-header.component.ts +265 -0
  44. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-cell.component.ts +38 -0
  45. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.ts +50 -0
  46. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view.component.ts +46 -0
  47. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-month-view.component.ts +65 -0
  48. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-view.component.ts +38 -0
  49. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-select-view.component.ts +63 -0
  50. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-view.component.ts +46 -0
  51. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/style/_layout.scss +443 -0
  52. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/style/_material-definition.scss +11 -0
  53. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/style/_theme.scss +7 -0
  54. package/{lib/components/layout-switcher → projects/sharedcomponents/src/lib/components/date-planning/component/agenda}/style/material.scss +0 -0
  55. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-months.component.ts +37 -0
  56. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-years.component.ts +52 -0
  57. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-header.component.ts +124 -0
  58. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-view.component.ts +201 -0
  59. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar.component.ts +35 -0
  60. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/style/_layout.scss +167 -0
  61. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/style/_material-definition.scss +7 -0
  62. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/style/_theme.scss +7 -0
  63. package/{lib/components/linear-gauge → projects/sharedcomponents/src/lib/components/date-planning/component/calendar}/style/material.scss +0 -0
  64. package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.component.ts +133 -0
  65. package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.module.ts +56 -0
  66. package/projects/sharedcomponents/src/lib/components/date-planning/style/_layout.scss +47 -0
  67. package/projects/sharedcomponents/src/lib/components/date-planning/style/_material-definition.scss +0 -0
  68. package/projects/sharedcomponents/src/lib/components/date-planning/style/_theme.scss +7 -0
  69. package/projects/sharedcomponents/src/lib/components/date-planning/style/material.scss +5 -0
  70. package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +82 -0
  71. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_layout.scss +0 -0
  72. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
  73. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_theme.scss +0 -0
  74. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/material.scss +0 -0
  75. package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +50 -0
  76. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
  77. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
  78. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
  79. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/material.scss +0 -0
  80. package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +252 -0
  81. package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +22 -0
  82. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_layout.scss +0 -0
  83. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_material-definition.scss +0 -0
  84. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_theme.scss +0 -0
  85. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/material.scss +0 -0
  86. package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.component.ts +205 -0
  87. package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.module.ts +19 -0
  88. package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/_layout.scss +0 -0
  89. package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/_material-definition.scss +0 -0
  90. package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/_theme.scss +0 -0
  91. package/{lib → projects/sharedcomponents/src/lib}/components/key-pad/style/material.scss +0 -0
  92. package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.component.ts +98 -0
  93. package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.module.ts +21 -0
  94. package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/_layout.scss +0 -0
  95. package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/_material-definition.scss +0 -0
  96. package/{lib → projects/sharedcomponents/src/lib}/components/layout-switcher/style/_theme.scss +0 -0
  97. package/projects/sharedcomponents/src/lib/components/layout-switcher/style/material.scss +5 -0
  98. package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.component.ts +56 -0
  99. package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.module.ts +17 -0
  100. package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/_layout.scss +0 -0
  101. package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/_material-definition.scss +0 -0
  102. package/{lib → projects/sharedcomponents/src/lib}/components/linear-gauge/style/_theme.scss +0 -0
  103. package/projects/sharedcomponents/src/lib/components/linear-gauge/style/material.scss +5 -0
  104. package/projects/sharedcomponents/src/lib/components/send-method-dialog/enums/send-option.ts +6 -0
  105. package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.component.ts +342 -0
  106. package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.module.ts +33 -0
  107. package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/_layout.scss +0 -0
  108. package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/_material-definition.scss +0 -0
  109. package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/_theme.scss +0 -0
  110. package/{lib → projects/sharedcomponents/src/lib}/components/send-method-dialog/style/material.scss +0 -0
  111. package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.component.ts +97 -0
  112. package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.module.ts +21 -0
  113. package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/_layout.scss +0 -0
  114. package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/_material-definition.scss +0 -0
  115. package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/_theme.scss +0 -0
  116. package/{lib → projects/sharedcomponents/src/lib}/components/statusbar/style/material.scss +0 -0
  117. package/projects/sharedcomponents/src/lib/components/stock/stock-in-order/stock-in-order.component.ts +0 -0
  118. package/projects/sharedcomponents/src/lib/components/stock/stock-information/stock-information.component.ts +64 -0
  119. package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +384 -0
  120. package/projects/sharedcomponents/src/lib/components/stock/stock-location/stock-location.component.ts +84 -0
  121. package/{lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.d.ts → projects/sharedcomponents/src/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.ts} +2 -2
  122. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-change-amount.component.ts +73 -0
  123. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +153 -0
  124. package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +165 -0
  125. package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +51 -0
  126. package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_layout.scss +0 -0
  127. package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_material-definition.scss +0 -0
  128. package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/_theme.scss +0 -0
  129. package/{lib → projects/sharedcomponents/src/lib}/components/stock/style/material.scss +0 -0
  130. package/projects/sharedcomponents/src/lib/enum/calendar-view.enum.ts +6 -0
  131. package/{lib/enum/icon.enum.d.ts → projects/sharedcomponents/src/lib/enum/icon.enum.ts} +5 -2
  132. package/projects/sharedcomponents/src/lib/enum/keyboard-code.enum.ts +30 -0
  133. package/projects/sharedcomponents/src/lib/enum/language-code.enum.ts +6 -0
  134. package/projects/sharedcomponents/src/lib/enum/month.enum.ts +15 -0
  135. package/projects/sharedcomponents/src/lib/enum/time-period.enum.ts +9 -0
  136. package/projects/sharedcomponents/src/lib/factory/business-object-factory.ts +120 -0
  137. package/projects/sharedcomponents/src/lib/factory/decorators/boolean.decorator.ts +113 -0
  138. package/projects/sharedcomponents/src/lib/factory/decorators/complex-array.decorator.ts +61 -0
  139. package/projects/sharedcomponents/src/lib/factory/decorators/complex-field.decorator.ts +63 -0
  140. package/projects/sharedcomponents/src/lib/factory/decorators/date-field.decorator.ts +41 -0
  141. package/projects/sharedcomponents/src/lib/factory/decorators/string-number.decorator.ts +48 -0
  142. package/projects/sharedcomponents/src/lib/model/agenda-event-per-day.model.ts +6 -0
  143. package/projects/sharedcomponents/src/lib/model/agenda-event.model.ts +17 -0
  144. package/projects/sharedcomponents/src/lib/model/agenda-null-objects.ts +11 -0
  145. package/projects/sharedcomponents/src/lib/model/business-object.ts +85 -0
  146. package/projects/sharedcomponents/src/lib/model/constant/all-months.ts +17 -0
  147. package/projects/sharedcomponents/src/lib/model/date-range.ts +10 -0
  148. package/projects/sharedcomponents/src/lib/model/day.model.ts +9 -0
  149. package/projects/sharedcomponents/src/lib/model/icon-svg.ts +18 -0
  150. package/projects/sharedcomponents/src/lib/model/month.model.ts +11 -0
  151. package/projects/sharedcomponents/src/lib/model/time-window.bo.ts +21 -0
  152. package/projects/sharedcomponents/src/lib/model/week.model.ts +5 -0
  153. package/projects/sharedcomponents/src/lib/model/weekday.model.ts +17 -0
  154. package/projects/sharedcomponents/src/lib/pipe/array-number.pipe.ts +14 -0
  155. package/projects/sharedcomponents/src/lib/pipe/master-pipes.ts +7 -0
  156. package/projects/sharedcomponents/src/lib/pipe/ucfirst.pipe.ts +14 -0
  157. package/projects/sharedcomponents/src/lib/service/dictionary.service.ts +86 -0
  158. package/projects/sharedcomponents/src/lib/service/icon-cache.service.ts +51 -0
  159. package/projects/sharedcomponents/src/lib/service/options.service.ts +66 -0
  160. package/projects/sharedcomponents/src/lib/service/shared-connector.service.ts +258 -0
  161. package/projects/sharedcomponents/src/lib/service/shared-initializer.service.ts +29 -0
  162. package/projects/sharedcomponents/src/lib/service/shared.service.ts +21 -0
  163. package/projects/sharedcomponents/src/lib/service/stock.service.ts +95 -0
  164. package/{lib → projects/sharedcomponents/src/lib}/style/_mixin.scss +0 -0
  165. package/{lib → projects/sharedcomponents/src/lib}/style/_variables.scss +0 -0
  166. package/{lib → projects/sharedcomponents/src/lib}/style/sharedcomponents-globals.scss +0 -0
  167. package/projects/sharedcomponents/src/lib/utils/array-utils.ts +202 -0
  168. package/projects/sharedcomponents/src/lib/utils/calendar.utils.ts +75 -0
  169. package/projects/sharedcomponents/src/lib/utils/date-utils.ts +302 -0
  170. package/projects/sharedcomponents/src/lib/utils/function/not-nill.function.ts +4 -0
  171. package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +4 -0
  172. package/projects/sharedcomponents/src/lib/utils/string-utils.ts +67 -0
  173. package/{public-api.d.ts → projects/sharedcomponents/src/public-api.ts} +5 -0
  174. package/projects/sharedcomponents/src/test.ts +27 -0
  175. package/projects/sharedcomponents/tsconfig.lib.json +18 -0
  176. package/projects/sharedcomponents/tsconfig.lib.prod.json +10 -0
  177. package/projects/sharedcomponents/tsconfig.spec.json +17 -0
  178. package/script/merge-icons.js +39 -0
  179. package/src/app/app.component.scss +9 -0
  180. package/src/app/app.component.spec.ts +31 -0
  181. package/src/app/app.component.ts +156 -0
  182. package/src/app/app.module.ts +60 -0
  183. package/src/assets/.gitkeep +0 -0
  184. package/src/environments/environment.prod.ts +3 -0
  185. package/src/environments/environment.ts +16 -0
  186. package/src/favicon.ico +0 -0
  187. package/src/index.html +13 -0
  188. package/src/main.ts +12 -0
  189. package/src/polyfills.ts +53 -0
  190. package/src/styles.scss +40 -0
  191. package/src/test.ts +26 -0
  192. package/tsconfig.app.json +15 -0
  193. package/tsconfig.json +65 -0
  194. package/tsconfig.spec.json +18 -0
  195. package/bundles/colijnit-sharedcomponents.umd.js +0 -3701
  196. package/bundles/colijnit-sharedcomponents.umd.js.map +0 -1
  197. package/colijnit-sharedcomponents-1.0.23.tgz +0 -0
  198. package/colijnit-sharedcomponents.d.ts +0 -16
  199. package/colijnit-sharedcomponents.metadata.json +0 -1
  200. package/esm2015/colijnit-sharedcomponents.js +0 -17
  201. package/esm2015/lib/assets/dictionary/text.properties.js +0 -11
  202. package/esm2015/lib/components/circular-gauge/co-circular-gauge.component.js +0 -125
  203. package/esm2015/lib/components/circular-gauge/co-circular-gauge.module.js +0 -21
  204. package/esm2015/lib/components/docsign/component/signature/signature.component.js +0 -75
  205. package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +0 -44
  206. package/esm2015/lib/components/docsign/docsign.component.js +0 -225
  207. package/esm2015/lib/components/docsign/docsign.module.js +0 -23
  208. package/esm2015/lib/components/key-pad/key-pad.component.js +0 -191
  209. package/esm2015/lib/components/key-pad/key-pad.module.js +0 -21
  210. package/esm2015/lib/components/layout-switcher/layout-switcher.component.js +0 -74
  211. package/esm2015/lib/components/layout-switcher/layout-switcher.module.js +0 -21
  212. package/esm2015/lib/components/linear-gauge/co-linear-gauge.component.js +0 -55
  213. package/esm2015/lib/components/linear-gauge/co-linear-gauge.module.js +0 -19
  214. package/esm2015/lib/components/send-method-dialog/enums/send-option.js +0 -8
  215. package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +0 -309
  216. package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +0 -31
  217. package/esm2015/lib/components/statusbar/statusbar.component.js +0 -81
  218. package/esm2015/lib/components/statusbar/statusbar.module.js +0 -23
  219. package/esm2015/lib/components/stock/stock-information/stock-information.component.js +0 -54
  220. package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +0 -350
  221. package/esm2015/lib/components/stock/stock-location/stock-location.component.js +0 -62
  222. package/esm2015/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.js +0 -2
  223. package/esm2015/lib/components/stock/stock-transfer/stock-change-amount.component.js +0 -68
  224. package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +0 -130
  225. package/esm2015/lib/components/stock/stock.component.js +0 -140
  226. package/esm2015/lib/components/stock/stock.module.js +0 -48
  227. package/esm2015/lib/enum/icon.enum.js +0 -17
  228. package/esm2015/lib/enum/keyboard-code.enum.js +0 -32
  229. package/esm2015/lib/enum/language-code.enum.js +0 -8
  230. package/esm2015/lib/factory/business-object-factory.js +0 -120
  231. package/esm2015/lib/factory/decorators/boolean.decorator.js +0 -102
  232. package/esm2015/lib/factory/decorators/complex-array.decorator.js +0 -55
  233. package/esm2015/lib/factory/decorators/complex-field.decorator.js +0 -57
  234. package/esm2015/lib/factory/decorators/date-field.decorator.js +0 -36
  235. package/esm2015/lib/factory/decorators/string-number.decorator.js +0 -43
  236. package/esm2015/lib/model/business-object.js +0 -81
  237. package/esm2015/lib/model/icon-svg.js +0 -16
  238. package/esm2015/lib/service/dictionary.service.js +0 -76
  239. package/esm2015/lib/service/icon-cache.service.js +0 -51
  240. package/esm2015/lib/service/options.service.js +0 -71
  241. package/esm2015/lib/service/shared-connector.service.js +0 -278
  242. package/esm2015/lib/service/shared.service.js +0 -30
  243. package/esm2015/lib/service/stock.service.js +0 -95
  244. package/esm2015/lib/utils/array-utils.js +0 -183
  245. package/esm2015/lib/utils/is-nill.function.js +0 -5
  246. package/esm2015/lib/utils/string-utils.js +0 -64
  247. package/esm2015/public-api.js +0 -21
  248. package/fesm2015/colijnit-sharedcomponents.js +0 -3511
  249. package/fesm2015/colijnit-sharedcomponents.js.map +0 -1
  250. package/lib/assets/dictionary/text.properties.d.ts +0 -3
  251. package/lib/components/circular-gauge/co-circular-gauge.component.d.ts +0 -20
  252. package/lib/components/circular-gauge/co-circular-gauge.module.d.ts +0 -2
  253. package/lib/components/docsign/component/signature/signature.component.d.ts +0 -16
  254. package/lib/components/docsign/component/signatures/signatures.component.d.ts +0 -12
  255. package/lib/components/docsign/docsign.component.d.ts +0 -92
  256. package/lib/components/docsign/docsign.module.d.ts +0 -2
  257. package/lib/components/key-pad/key-pad.component.d.ts +0 -36
  258. package/lib/components/key-pad/key-pad.module.d.ts +0 -2
  259. package/lib/components/layout-switcher/layout-switcher.component.d.ts +0 -16
  260. package/lib/components/layout-switcher/layout-switcher.module.d.ts +0 -2
  261. package/lib/components/linear-gauge/co-linear-gauge.component.d.ts +0 -16
  262. package/lib/components/linear-gauge/co-linear-gauge.module.d.ts +0 -2
  263. package/lib/components/send-method-dialog/enums/send-option.d.ts +0 -6
  264. package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +0 -62
  265. package/lib/components/send-method-dialog/send-method-dialog.module.d.ts +0 -2
  266. package/lib/components/statusbar/statusbar.component.d.ts +0 -23
  267. package/lib/components/statusbar/statusbar.module.d.ts +0 -2
  268. package/lib/components/stock/stock-information/stock-information.component.d.ts +0 -10
  269. package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +0 -60
  270. package/lib/components/stock/stock-location/stock-location.component.d.ts +0 -15
  271. package/lib/components/stock/stock-transfer/stock-change-amount.component.d.ts +0 -18
  272. package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +0 -36
  273. package/lib/components/stock/stock.component.d.ts +0 -42
  274. package/lib/components/stock/stock.module.d.ts +0 -2
  275. package/lib/enum/keyboard-code.enum.d.ts +0 -30
  276. package/lib/enum/language-code.enum.d.ts +0 -6
  277. package/lib/factory/business-object-factory.d.ts +0 -23
  278. package/lib/factory/decorators/boolean.decorator.d.ts +0 -43
  279. package/lib/factory/decorators/complex-array.decorator.d.ts +0 -25
  280. package/lib/factory/decorators/complex-field.decorator.d.ts +0 -25
  281. package/lib/factory/decorators/date-field.decorator.d.ts +0 -17
  282. package/lib/factory/decorators/string-number.decorator.d.ts +0 -22
  283. package/lib/model/business-object.d.ts +0 -7
  284. package/lib/model/icon-svg.d.ts +0 -4
  285. package/lib/service/dictionary.service.d.ts +0 -21
  286. package/lib/service/icon-cache.service.d.ts +0 -18
  287. package/lib/service/options.service.d.ts +0 -13
  288. package/lib/service/shared-connector.service.d.ts +0 -43
  289. package/lib/service/shared.service.d.ts +0 -8
  290. package/lib/service/stock.service.d.ts +0 -38
  291. package/lib/utils/array-utils.d.ts +0 -57
  292. package/lib/utils/is-nill.function.d.ts +0 -1
  293. package/lib/utils/string-utils.d.ts +0 -22
@@ -0,0 +1,86 @@
1
+ import {Injectable} from "@angular/core";
2
+ import {LanguageCode} from "../enum/language-code.enum";
3
+ import {StringUtils} from "../utils/string-utils";
4
+ import {Dictionary} from "../assets/dictionary/text.properties";
5
+
6
+ // The localization service, providing peers with text translation functionality.
7
+ @Injectable({
8
+ providedIn: "root"
9
+ })
10
+ export class DictionaryService {
11
+ private readonly dictionaryUrl: string = "js/browser/res/dictionary/";
12
+
13
+ public get language(): string {
14
+ return this._language;
15
+ }
16
+
17
+ public set rootUrl(value: string) {
18
+ this._rootUrl = value;
19
+ this._dictBasePath = this._rootUrl + "/" + this.dictionaryUrl;
20
+ }
21
+
22
+ // public dictionaryLoaded: Subject<void> = new Subject();
23
+
24
+ private _dictBasePath: string;
25
+ private _rootUrl: string;
26
+ // private _dictionaryPromise: Map<LanguageCode, Promise<{ [key: string]: string }>> = new Map<LanguageCode, Promise<{ [key: string]: string }>>();
27
+ private _dictionaries: Map<string, { [key: string]: string }> = new Map<string, { [key: string]: string }>();
28
+ private _language: string;
29
+
30
+ // Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
31
+ private readonly _placeholder: string = "|~";
32
+
33
+ constructor(
34
+ ) {
35
+ }
36
+
37
+ // Loads the dictionary for given language in memory.
38
+ public async setDictionary(language: string): Promise<void> {
39
+ this._language = language || LanguageCode.Dutch;
40
+ this._loadDictionary();
41
+ }
42
+
43
+ private _loadDictionary() {
44
+ if (!this._dictionaries.has(this._language)) {
45
+ const dictionary: Dictionary = new Dictionary();
46
+ // eslint-disable-next-line no-magic-numbers
47
+ if (dictionary.strings[this._language.substr(0, 2).toLowerCase()] !== undefined) {
48
+ // eslint-disable-next-line no-magic-numbers
49
+ this._dictionaries.set(this._language, dictionary.strings[this._language.substr(0, 2).toLowerCase()]);
50
+ }
51
+ }
52
+ }
53
+
54
+ /**
55
+ * Returns the localized text for the given dictionary key.
56
+ * @param {string} key
57
+ * @param {boolean} [upperCaseFirst = true] False for first letter lowercase, true for first letter uppercase for returned dict val
58
+ * @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
59
+ * @returns {string} The translated text for given dictionary key
60
+ */
61
+ public get(key: string, upperCaseFirst: boolean = true, ...replacementTexts: string[]): string {
62
+ if (!StringUtils.IsStringWithLength(key)) {
63
+ return key || "";
64
+ }
65
+
66
+ if (this.language === undefined) {
67
+ this._language = LanguageCode.Dutch;
68
+ this._loadDictionary();
69
+ }
70
+
71
+ let text: string = this._dictionaries.get(this.language)[key];
72
+ text = StringUtils.IsStringWithLength(text) ? text : key;
73
+
74
+ if (upperCaseFirst) {
75
+ text = text.charAt(0).toUpperCase() + text.slice(1);
76
+ } else {
77
+ text = text.charAt(0).toLowerCase() + text.slice(1);
78
+ }
79
+
80
+ if (replacementTexts.length > 0) {
81
+ text = StringUtils.ReplaceOccurrencesIn(text, this._placeholder, ...replacementTexts);
82
+ }
83
+
84
+ return text;
85
+ }
86
+ }
@@ -0,0 +1,51 @@
1
+ import {Injectable} from "@angular/core";
2
+ import {DomSanitizer, SafeHtml} from "@angular/platform-browser";
3
+ import {Icon} from "../enum/icon.enum";
4
+ import {IconSvg} from "../model/icon-svg";
5
+
6
+ @Injectable({
7
+ providedIn: "root"
8
+ })
9
+ export class IconCacheService {
10
+ /**
11
+ * All the icons as a large JSON object, from the all-icons.json file.
12
+ * The object has property keys that are the icon names, and property values with the data string of the actual svg icon.
13
+ */
14
+ public get iconCache(): { [iconName: string]: SafeHtml } {
15
+ return this._iconCache;
16
+ }
17
+
18
+ private _iconCache: { [iconName: string]: SafeHtml } = {};
19
+
20
+ constructor(
21
+ private _sanitizer: DomSanitizer
22
+ ) {
23
+ this.setIconCache();
24
+ }
25
+
26
+ public getIcon(iconName: Icon): SafeHtml {
27
+ if (iconName) {
28
+ return this._iconCache[iconName.toLowerCase()];
29
+ }
30
+ }
31
+
32
+ public getIconAsBase64(iconName: Icon): SafeHtml {
33
+ const icon: string = IconSvg[iconName];
34
+ const base64Data: string = window.btoa(icon);
35
+ return this._sanitizer.bypassSecurityTrustUrl(`data:image/svg+xml;base64,${base64Data}`);
36
+ }
37
+
38
+ public getRawIcon(iconName: Icon): string {
39
+ if (iconName) {
40
+ return IconSvg[iconName.toLowerCase()];
41
+ }
42
+ }
43
+
44
+ public setIconCache(): void {
45
+ for (const key in IconSvg) {
46
+ if (IconSvg.hasOwnProperty(key) && typeof IconSvg[key] !== "function") {
47
+ this._iconCache[key.toLowerCase()] = this._sanitizer.bypassSecurityTrustHtml(IconSvg[key]);
48
+ }
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,66 @@
1
+ import {Injectable} from "@angular/core";
2
+ import {BehaviorSubject} from "rxjs";
3
+ import {DictionaryService} from "./dictionary.service";
4
+
5
+ @Injectable({
6
+ providedIn: "root"
7
+ })
8
+ export class OptionsService {
9
+
10
+ public optionsInitialized: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
11
+
12
+ public set options(value: any) {
13
+ this._options = value;
14
+ }
15
+
16
+ public get options(): any {
17
+ return this._options;
18
+ }
19
+
20
+ public optionsLoaded: BehaviorSubject<boolean> = new BehaviorSubject(false);
21
+
22
+ private _options: any;
23
+
24
+ constructor(private _dictionary: DictionaryService) {
25
+ }
26
+
27
+ public async createSettingsFromObject(obj: any): Promise<void> {
28
+ this.options = new Object();
29
+ if (obj.hasOwnProperty("url")) {
30
+ this.options.url = obj["url"];
31
+ }
32
+ if (obj.hasOwnProperty("schema")) {
33
+ this.options.schema = obj["schema"];
34
+ }
35
+ if (obj.hasOwnProperty("version")) {
36
+ this.options.version = obj["version"];
37
+ }
38
+ if (obj.hasOwnProperty("languageCode")) {
39
+ this.options.languageCode = obj["languageCode"];
40
+ } else {
41
+ this.options.languageCode = "NL";
42
+ }
43
+ if (obj.hasOwnProperty("username")) {
44
+ this.options.username = obj["username"];
45
+ }
46
+ if (obj.hasOwnProperty("password")) {
47
+ this.options.password = obj["password"];
48
+ }
49
+ if (obj.hasOwnProperty("session")) {
50
+ this.options.session = obj["session"];
51
+ }
52
+ if (obj.hasOwnProperty("useLoginEncryption")) {
53
+ this.options.useLoginEncryption = obj["useLoginEncryption"];
54
+ }
55
+
56
+ this.optionsLoaded.next(true);
57
+ }
58
+
59
+ public async initialize(options: any): Promise<void> {
60
+ if (options) {
61
+ await this.createSettingsFromObject(options);
62
+ await this._dictionary.setDictionary(this.options.languageCode);
63
+ this.optionsInitialized.next(true);
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,258 @@
1
+ import {Articles} from "@colijnit/articleapi/build/articles";
2
+ import {Sharedapi} from "@colijnit/sharedapi/build/sharedapi";
3
+ import {Printer} from "@colijnit/sharedapi/build/model/report/printer.bo";
4
+ import {Injectable} from "@angular/core";
5
+ import {ArticleExtended} from "@colijnit/articleapi/build/model/article-extended.bo";
6
+ import {DataServiceResponseData} from "@colijnit/articleapi/build/model/data-service-response-data";
7
+ import {DataServiceResponseData as DataServiceResponse} from "@colijnit/sharedapi/build/model/data-service-response-data";
8
+ import {BusinessObjectFactory} from "../factory/business-object-factory";
9
+ import {PrintStockStickers} from "@colijnit/sharedapi/build/model/print-stock-stickers";
10
+ import {GetStockHistoryRequest} from "@colijnit/articleapi/build/model/get-stock-history-request";
11
+ import {ArticleStock as ArticleStockBo} from "@colijnit/articleapi/build/model/article-stock.bo";
12
+ import {ArticleStock} from "@colijnit/articleapi/build/model/article-stock";
13
+ import {StockHistoryBo} from "@colijnit/articleapi/build/model/stock-history.bo";
14
+ import {StockStickersPrintLayouts} from "@colijnit/sharedapi/build/model/report/stock-stickers-print-layouts.bo";
15
+ import {ArticleStockManagement} from "@colijnit/articleapi/build/model/article-stock-management";
16
+ import {ArticleDetailsBo} from "@colijnit/articleapi/build/model/article-details.bo";
17
+ import {StockStatus} from "@colijnit/articleapi/build/model/stock-status.bo";
18
+ import {StockManagementWarehouses} from "@colijnit/articleapi/build/model/stock-management-warehouses.bo";
19
+ import {StockLocation} from "@colijnit/articleapi/build/model/stock-location.bo";
20
+ import {ArticleTransaction} from "@colijnit/articleapi/build/model/article-transaction";
21
+ import {ArticleTransaction as ArticleTransactionBo} from "@colijnit/articleapi/build/model/article-transaction.bo";
22
+ import {OptionsService} from "./options.service";
23
+ import {PrintPriceStickers} from "@colijnit/sharedapi/build/model/print-price-stickers.bo";
24
+
25
+
26
+ @Injectable({
27
+ providedIn: "root"
28
+ })
29
+ export class SharedConnectorService {
30
+ public articleConnector: Articles;
31
+ public sharedConnector: Sharedapi;
32
+
33
+ private _boFactory: BusinessObjectFactory = new BusinessObjectFactory();
34
+
35
+
36
+ constructor(
37
+ private _optionsService: OptionsService,
38
+ ) {
39
+ }
40
+
41
+ public async connect(): Promise<void> {
42
+ this.articleConnector = new Articles(this._optionsService.options);
43
+ this.sharedConnector = new Sharedapi(this._optionsService.options);
44
+ }
45
+
46
+ public async getAllPrinters(showAll: boolean = true): Promise<Printer[]> {
47
+ return new Promise((resolve: Function, reject: Function) => {
48
+ return this.sharedConnector.listAllPrinters(showAll).then((result: DataServiceResponse) => {
49
+ if (result.validationResult && result.validationResult.success) {
50
+ if (result.resultObject) {
51
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(Printer, result.resultObject));
52
+ }
53
+ } else {
54
+ reject(result.validationMessagesAsString);
55
+ }
56
+ });
57
+ });
58
+ }
59
+
60
+ public async getPrintStockStickers(request: PrintStockStickers): Promise<PrintStockStickers> {
61
+ return new Promise((resolve: Function, reject: Function) => {
62
+ return this.sharedConnector.getPrintStockStickers(request).then((result: DataServiceResponse) => {
63
+ if (result.validationResult && result.validationResult.success) {
64
+ if (result.resultObject) {
65
+ resolve(this._boFactory.makeWithRawBackendData(PrintStockStickers, result.resultObject));
66
+ }
67
+ } else {
68
+ reject(result.validationMessagesAsString);
69
+ }
70
+ })
71
+ })
72
+ }
73
+
74
+ public async getPrintPriceStickers(request: PrintPriceStickers): Promise<PrintPriceStickers> {
75
+ return new Promise((resolve: Function, reject: Function) => {
76
+ return this.sharedConnector.printPriceStickers(request).then((result: DataServiceResponse) => {
77
+ if (result.validationResult && result.validationResult.success) {
78
+ if (result.resultObject) {
79
+ resolve(this._boFactory.makeWithRawBackendData(PrintPriceStickers, result.resultObject));
80
+ }
81
+ } else {
82
+ reject(result.validationMessagesAsString);
83
+ }
84
+ })
85
+ })
86
+ }
87
+
88
+ // public async getStockStickerPrintLayouts(stockStickersPrintLayouts: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
89
+ // return new Promise((resolve: Function, reject: Function) => {
90
+ // return this.sharedConnector.getStockStickerPrintLayouts(stockStickersPrintLayouts).then((result: DataServiceResponse) => {
91
+ // if (result.validationResult && result.validationResult.success) {
92
+ // if (result.resultObject) {
93
+ // resolve(this._boFactory.makeWithRawBackendData(stockStickersPrintLayouts, result.resultObject));
94
+ // }
95
+ // } else {
96
+ // reject(result.validationMessagesAsString);
97
+ // }
98
+ // })
99
+ // })
100
+ // }
101
+
102
+ public async getArticleFullObject(goodId: number): Promise<ArticleExtended> {
103
+ return new Promise((resolve: Function, reject: Function) => {
104
+ return this.articleConnector.getArticleFullObject(goodId).then((result: DataServiceResponseData) => {
105
+ // if (result.validationResult && result.validationResult.success) {
106
+ // if (result.resultObject) {
107
+ // resolve(this._boFactory.makeWithRawBackendData(ArticleExtended, result.resultObject));
108
+ // }
109
+ // } else {
110
+ // reject(result.validationMessagesAsString);
111
+ // }
112
+ });
113
+ });
114
+ }
115
+
116
+ public async getStockHistory(request: GetStockHistoryRequest): Promise<StockHistoryBo[]> {
117
+ return new Promise((resolve: Function, reject: Function) => {
118
+ return this.articleConnector.getStockHistory(request).then((result: DataServiceResponseData) => {
119
+ if (result.validationResult && result.validationResult.success) {
120
+ if (result.resultObject && result.resultObject.hasOwnProperty("stockHistory")) {
121
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockHistoryBo, result.resultObject.stockHistory));
122
+ }
123
+ } else {
124
+ reject(result.validationMessagesAsString);
125
+ }
126
+ })
127
+ })
128
+ }
129
+
130
+ public async getStockInformation(data: ArticleStock): Promise<ArticleStockBo[]> {
131
+ return new Promise((resolve: Function, reject: Function) => {
132
+ return this.articleConnector.getStockInformation(data).then((result: DataServiceResponseData) => {
133
+ if (result.validationResult && result.validationResult.success) {
134
+ if (result.resultObjects) {
135
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleStockBo, result.resultObjects));
136
+ }
137
+ } else {
138
+ reject(result.validationMessagesAsString);
139
+ }
140
+ });
141
+ });
142
+ }
143
+
144
+ public async getStockManagementWarehouses(): Promise<StockManagementWarehouses[]> {
145
+ return new Promise((resolve: Function, reject: Function) => {
146
+ return this.articleConnector.getStockManagementWarehouses().then((result: DataServiceResponseData) => {
147
+ if (result.validationResult && result.validationResult.success) {
148
+ if (result.resultObjects) {
149
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockManagementWarehouses, result.resultObjects));
150
+ }
151
+ } else {
152
+ reject(result.validationMessagesAsString);
153
+ }
154
+ });
155
+ });
156
+ }
157
+
158
+ public async getStockManagementLocations(warehouseNo: number): Promise<StockLocation[]> {
159
+ return new Promise((resolve: Function, reject: Function) => {
160
+ return this.articleConnector.getStockManagementLocations(warehouseNo).then((result: DataServiceResponseData) => {
161
+ if (result.validationResult && result.validationResult.success) {
162
+ if (result.resultObjects) {
163
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockLocation, result.resultObjects));
164
+ }
165
+ } else {
166
+ reject(result.validationMessagesAsString);
167
+ }
168
+ });
169
+ });
170
+ }
171
+
172
+ public async getArticleDetails(data: ArticleStockManagement): Promise<ArticleDetailsBo[]> {
173
+ return new Promise((resolve: Function, reject: Function) => {
174
+ return this.articleConnector.getArticleDetails(data).then((result: DataServiceResponseData) => {
175
+ if (result.validationResult && result.validationResult.success) {
176
+ if (result.resultObjects) {
177
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleDetailsBo, result.resultObjects));
178
+ }
179
+ } else {
180
+ reject(result.validationMessagesAsString);
181
+ }
182
+ });
183
+ });
184
+ }
185
+
186
+ public async updateArticleDetails(data: ArticleDetailsBo): Promise<boolean> {
187
+ return new Promise((resolve: Function, reject: Function) => {
188
+ return this.articleConnector.updateArticleDetails(data).then(async (result: DataServiceResponseData) => {
189
+ if (result.validationResult && result.validationResult.success) {
190
+ await this.commit();
191
+ resolve(true);
192
+ } else {
193
+ reject(result.validationMessagesAsString);
194
+ }
195
+ });
196
+ });
197
+ }
198
+ public async lockArticleDetails(data: ArticleStockManagement): Promise<boolean> {
199
+ return new Promise((resolve: Function, reject: Function) => {
200
+ return this.articleConnector.lockArticleDetails(data).then(async (result: DataServiceResponseData) => {
201
+ if (result.validationResult && result.validationResult.success) {
202
+ await this.commit();
203
+ resolve(true);
204
+ } else {
205
+ reject(result.validationMessagesAsString);
206
+ }
207
+ });
208
+ });
209
+ }
210
+
211
+
212
+ public async getStockStatus(): Promise<StockStatus[]> {
213
+ return new Promise((resolve: Function, reject: Function) => {
214
+ return this.articleConnector.getStockState().then((result: DataServiceResponseData) => {
215
+ if (result.validationResult && result.validationResult.success) {
216
+ if (result.resultObjects) {
217
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockStatus, result.resultObjects));
218
+ }
219
+ } else {
220
+ reject(result.validationMessagesAsString);
221
+ }
222
+ });
223
+ });
224
+ }
225
+
226
+ public async getStockStickerTemplates(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
227
+ return new Promise((resolve: Function, reject: Function) => {
228
+ return this.sharedConnector.getStockStickerPrintLayouts(data).then((result: DataServiceResponse) => {
229
+ if (result.validationResult && result.validationResult.success) {
230
+ if (result.resultObject) {
231
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockStickersPrintLayouts, result.resultObject));
232
+ }
233
+ } else {
234
+ reject(result.validationMessagesAsString);
235
+ }
236
+ });
237
+ });
238
+ }
239
+
240
+ public async getArticleTransaction(data: ArticleTransaction): Promise<ArticleTransactionBo[]> {
241
+ return new Promise((resolve: Function, reject: Function) => {
242
+ return this.articleConnector.getArticleTransaction(data).then((result: DataServiceResponseData) => {
243
+ if (result.validationResult && result.validationResult.success) {
244
+ if (result.resultObjects) {
245
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleTransactionBo, result.resultObjects));
246
+ }
247
+ } else {
248
+ reject(result.validationMessagesAsString);
249
+ }
250
+ });
251
+ });
252
+ }
253
+
254
+ public commit(): Promise<DataServiceResponseData> {
255
+ return this.articleConnector.commit();
256
+ }
257
+
258
+ }
@@ -0,0 +1,29 @@
1
+ import {Inject, Injectable, Injector} from "@angular/core";
2
+ import {SharedService} from "./shared.service";
3
+
4
+ @Injectable()
5
+ export class SharedInitializerService {
6
+
7
+ constructor(
8
+ @Inject(Injector) private readonly injector: Injector
9
+ ) {
10
+ }
11
+
12
+ public async initializeApp(): Promise<void> {
13
+ const options = {
14
+ url: "http://130.62.7.55:8888/ione/",
15
+ schema: "815",
16
+ version: "252",
17
+ useLoginEncryption: true,
18
+ username: "patrick",
19
+ password: "patrick",
20
+ languageCode: "NL",
21
+ };
22
+
23
+ const sharedService = this.injector.get(SharedService);
24
+ if (sharedService) {
25
+ await sharedService.init(options);
26
+ }
27
+ }
28
+
29
+ }
@@ -0,0 +1,21 @@
1
+ import {SharedConnectorService} from "./shared-connector.service";
2
+ import {Injectable} from "@angular/core";
3
+ import {OptionsService} from "./options.service";
4
+
5
+ @Injectable({
6
+ providedIn: "root"
7
+ })
8
+
9
+ export class SharedService {
10
+
11
+ constructor(
12
+ protected options: OptionsService,
13
+ protected connector: SharedConnectorService,
14
+ ) {
15
+ }
16
+
17
+ public async init(options: any): Promise<void> {
18
+ await this.options.initialize(options);
19
+ this.connector.connect();
20
+ }
21
+ }
@@ -0,0 +1,95 @@
1
+ import {Injectable} from "@angular/core";
2
+ import {PrintStockStickers} from "@colijnit/sharedapi/build/model/print-stock-stickers";
3
+ import {Printer} from "@colijnit/sharedapi/build/model/report/printer.bo";
4
+ import {GetStockHistoryRequest} from "@colijnit/articleapi/build/model/get-stock-history-request";
5
+ import {ArticleStock as ArticleStockBo} from "@colijnit/articleapi/build/model/article-stock.bo";
6
+ import {ArticleStock} from "@colijnit/articleapi/build/model/article-stock";
7
+ import {StockHistoryBo} from "@colijnit/articleapi/build/model/stock-history.bo";
8
+ import {StockStickersPrintLayouts} from "@colijnit/sharedapi/build/model/report/stock-stickers-print-layouts.bo";
9
+ import {ArticleDetailsBo} from "@colijnit/articleapi/build/model/article-details.bo";
10
+ import {ArticleStockManagement} from "@colijnit/articleapi/build/model/article-stock-management";
11
+ import {StockStatus} from "@colijnit/articleapi/build/model/stock-status.bo";
12
+ import {StockManagementWarehouses} from "@colijnit/articleapi/build/model/stock-management-warehouses.bo";
13
+ import {StockLocation} from "@colijnit/articleapi/build/model/stock-location.bo";
14
+ import {DataServiceResponseData} from "@colijnit/articleapi/build/model/data-service-response-data";
15
+ import {ArticleTransaction} from "@colijnit/articleapi/build/model/article-transaction";
16
+ import {ArticleTransaction as ArticleTransactionBo} from "@colijnit/articleapi/build/model/article-transaction.bo";
17
+ import {SharedService} from "./shared.service";
18
+ import {PrintPriceStickers} from "@colijnit/sharedapi/build/model/print-price-stickers.bo";
19
+ import {SharedConnectorService} from "./shared-connector.service";
20
+
21
+ @Injectable({
22
+ providedIn: 'root',
23
+ })
24
+ export class StockService {
25
+
26
+ public stockStickers: PrintStockStickers;
27
+ public printSticker: PrintStockStickers = new PrintStockStickers();
28
+ public printPriceSticker: PrintPriceStickers = new PrintPriceStickers();
29
+
30
+ constructor(
31
+ private _sharedService: SharedConnectorService,
32
+ ) {
33
+ }
34
+
35
+ public async getPrintStockStickers(data: PrintStockStickers): Promise<void> {
36
+ await this._sharedService.getPrintStockStickers(data);
37
+ }
38
+
39
+ public async getPrintPriceStickers(data: PrintPriceStickers): Promise<void> {
40
+ await this._sharedService.getPrintPriceStickers(data);
41
+ }
42
+
43
+ public async getAllPrinters(showAll: boolean = true): Promise<Printer[]> {
44
+ return await this._sharedService.getAllPrinters(showAll);
45
+ }
46
+
47
+ public async getStockHistory(data: GetStockHistoryRequest): Promise<StockHistoryBo[]> {
48
+ return await this._sharedService.getStockHistory(data);
49
+ }
50
+
51
+ public async getStockInformation(data: ArticleStock): Promise<ArticleStockBo[]> {
52
+ return await this._sharedService.getStockInformation(data);
53
+ }
54
+
55
+ // public async getStockStickerPrintLayouts(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
56
+ // return await this._connector.getStockStickerPrintLayouts(data);
57
+ // }
58
+
59
+ public async getArticleDetails(data: ArticleStockManagement): Promise<ArticleDetailsBo[]> {
60
+ return await this._sharedService.getArticleDetails(data);
61
+ }
62
+
63
+ public async updateArticleDetails(data: ArticleDetailsBo): Promise<boolean> {
64
+ return await this._sharedService.updateArticleDetails(data);
65
+ }
66
+
67
+ public async getStockState(): Promise<StockStatus[]> {
68
+ return await this._sharedService.getStockStatus();
69
+ }
70
+
71
+ public async getStockStickerTemplates(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
72
+ return await this._sharedService.getStockStickerTemplates(data);
73
+ }
74
+
75
+ public async getStockManagementWarehouses(): Promise<StockManagementWarehouses[]> {
76
+ return await this._sharedService.getStockManagementWarehouses();
77
+ }
78
+
79
+ public async getStockManagementLocations(warehouseNo: number): Promise<StockLocation[]> {
80
+ return await this._sharedService.getStockManagementLocations(warehouseNo);
81
+ }
82
+
83
+ public async getArticleTransaction(data: ArticleTransaction): Promise<ArticleTransactionBo[]> {
84
+ return await this._sharedService.getArticleTransaction(data);
85
+ }
86
+
87
+ public async lockArticleDetails(data: ArticleStockManagement): Promise<boolean> {
88
+ return await this._sharedService.lockArticleDetails(data);
89
+ }
90
+
91
+ public commit(): Promise<DataServiceResponseData> {
92
+ return this._sharedService.commit();
93
+ }
94
+
95
+ }