@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,265 @@
1
+ import {
2
+ AfterContentChecked,
3
+ Component,
4
+ ElementRef,
5
+ EventEmitter,
6
+ Inject,
7
+ Input,
8
+ LOCALE_ID,
9
+ NgZone,
10
+ OnDestroy,
11
+ OnInit,
12
+ Output,
13
+ Renderer2, ViewEncapsulation
14
+ } from "@angular/core";
15
+ import {CalendarView} from "../../../../enum/calendar-view.enum";
16
+ import {LanguageCode} from "../../../../enum/language-code.enum";
17
+ import {Weekday} from "../../../../model/weekday.model";
18
+ import {Week} from "../../../../model/week.model";
19
+ import {CalendarUtils} from "../../../../utils/calendar.utils";
20
+ import {NULL_DAY} from "../../../../model/agenda-null-objects";
21
+ import {Day} from "../../../../model/day.model"
22
+ import {Icon} from "../../../../enum/icon.enum";
23
+ import {AgendaEventPerDay} from "../../../../model/agenda-event-per-day.model";
24
+ import {DateUtils} from "../../../../utils/date-utils";
25
+ import {IconCacheService} from "../../../../service/icon-cache.service";
26
+
27
+ @Component({
28
+ selector: "agenda-header",
29
+ template: `
30
+ <div class="agenda-header-wrapper" *ngIf="view === viewTypes.DayView">
31
+ <div class="hour-label-placeholder">
32
+ <view-select [selectedView]="view" (selectedViewChange)="changeTheView($event)"></view-select>
33
+ </div>
34
+ <div class="week-day-label">
35
+ <co-icon class="pointer-hover no-user-select sub-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointLeft)" (click)="subUnit()"></co-icon>
36
+ <div class="day-description" [textContent]="day.description"></div>
37
+ <co-icon class="pointer-hover no-user-select add-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)" (click)="addUnit()"></co-icon>
38
+ </div>
39
+ </div>
40
+ <div class="agenda-header-wrapper" *ngIf="view === viewTypes.WeekView">
41
+ <div class="hour-label-placeholder">
42
+ <view-select [selectedView]="view" (selectedViewChange)="changeTheView($event)"></view-select>
43
+ </div>
44
+ <div class="week-day-label" *ngFor="let weekDay of weekDays; let index = index" [class.selected]="weekDay.weekdaySelected" (click)="setUnit(weekDay)">
45
+ <co-icon *ngIf="index === 0 && showBackButton" class="pointer-hover no-user-select sub-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointLeft)" (click)="subUnit()"></co-icon>
46
+ <div *ngIf="weekDay.newMonth" [textContent]="weekDay.weekdayMonthLong + ' ' + weekDay.weekdayYear" class="month-description"></div>
47
+ <div class="weekday-value" [textContent]="weekDay.weekdayDay"></div>
48
+ <div class="weekday-description" [textContent]="weekDay.weekdayShort"></div>
49
+ <co-icon *ngIf="index === 6" class="pointer-hover no-user-select add-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)" (click)="addUnit()"></co-icon>
50
+ </div>
51
+ </div>
52
+ <div class="agenda-header-wrapper" *ngIf="view === viewTypes.WeekSelectView">
53
+ <div class="week-day-label" *ngFor="let weekDay of weekDays; let index = index"
54
+ [class.selected]="weekDay.weekdaySelected"
55
+ [class.selectable]="weekDay.events && weekDay.events.length > 0"
56
+ (click)="setUnit(weekDay)">
57
+ <co-icon *ngIf="index === 0 && showBackButton" class="pointer-hover no-user-select sub-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointLeft)" (click)="subUnit()"></co-icon>
58
+ <div class="weekday-description" [textContent]="weekDay.weekdayShort"></div>
59
+ <div class="weekday-value" [textContent]="weekDay.weekdayDay + ' ' + weekDay.weekdayMonthShort"></div>
60
+ <co-icon *ngIf="index === 6" class="pointer-hover no-user-select add-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)" (click)="addUnit()"></co-icon>
61
+ </div>
62
+ </div>
63
+ <div class="agenda-header-wrapper" *ngIf="view === viewTypes.MonthView">
64
+ <div class="hour-label-placeholder">
65
+ <view-select [selectedView]="view" (selectedViewChange)="changeTheView($event)"></view-select>
66
+ </div>
67
+ <div class="week-day-label" *ngFor="let weekDay of weekDays; let index = index">
68
+ <co-icon *ngIf="index === 0 && showBackButton" class="pointer-hover no-user-select sub-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointLeft)" (click)="subUnit()"></co-icon>
69
+ <div class="weekday-description" [textContent]="weekDay.weekdayShort"></div>
70
+ <co-icon *ngIf="index === 6" class="pointer-hover no-user-select add-unit-icon dark" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)" (click)="addUnit()"></co-icon>
71
+ </div>
72
+ </div>
73
+ `,
74
+ encapsulation: ViewEncapsulation.None
75
+ })
76
+ export class AgendaHeaderComponent implements OnInit, OnDestroy, AfterContentChecked {
77
+ public readonly icons: typeof Icon = Icon;
78
+ public readonly viewTypes: typeof CalendarView = CalendarView;
79
+
80
+ private readonly scrollbarWidth: number = 15;
81
+
82
+ @Input()
83
+ public set selectedDate(value: Date) {
84
+ this._selectedDate = new Date(value);
85
+ this._prepareHeaderData();
86
+ }
87
+
88
+ public get selectedDate(): Date {
89
+ return this._selectedDate;
90
+ }
91
+
92
+ @Input()
93
+ public view: CalendarView = CalendarView.WeekSelectView;
94
+
95
+ @Input()
96
+ public set firstAvailableDate(value: Date) {
97
+ if (value) {
98
+ this._firstAvailableDate = new Date(value);
99
+ this._prepareHeaderData();
100
+ }
101
+ }
102
+
103
+ public get firstAvailableDate(): Date {
104
+ return this._firstAvailableDate;
105
+ }
106
+
107
+ @Input()
108
+ public set eventsPerDay(value: AgendaEventPerDay[]) {
109
+ this._eventsPerDay = value;
110
+ this._prepareHeaderData();
111
+ }
112
+
113
+ @Output()
114
+ public viewChange: EventEmitter<CalendarView> = new EventEmitter<CalendarView>();
115
+
116
+ @Output()
117
+ public selectedDateChange: EventEmitter<Date> = new EventEmitter<Date>();
118
+
119
+ @Output()
120
+ public rangeChange: EventEmitter<Date> = new EventEmitter<Date>();
121
+
122
+ public weekDays: Weekday[] = [];
123
+ public day: Day = NULL_DAY;
124
+ public showBackButton: boolean = true;
125
+
126
+ private _selectedDate: Date;
127
+ private _firstAvailableDate: Date;
128
+ private _eventsPerDay: AgendaEventPerDay[] = [];
129
+
130
+ constructor(
131
+ @Inject(LOCALE_ID) private readonly _locale: LanguageCode,
132
+ private _elementRef: ElementRef,
133
+ private _renderer: Renderer2,
134
+ private _ngZone: NgZone,
135
+ public iconCacheService: IconCacheService
136
+ ) {
137
+ }
138
+
139
+ ngOnDestroy(): void {
140
+ window.removeEventListener("resize", this._onResize);
141
+ this._elementRef = undefined;
142
+ }
143
+
144
+ ngOnInit(): void {
145
+ this._ngZone.runOutsideAngular(() => {
146
+ window.addEventListener("resize", this._onResize);
147
+ });
148
+ }
149
+
150
+ ngAfterContentChecked(): void {
151
+ this._resizeHost();
152
+ }
153
+
154
+ public subUnit(): void {
155
+ if (this.selectedDate) {
156
+ const newDate: Date = new Date(this.selectedDate);
157
+ switch (this.view) {
158
+ case CalendarView.DayView:
159
+ newDate.setDate(this.selectedDate.getDate() - 1);
160
+ break;
161
+ case CalendarView.WeekView:
162
+ newDate.setDate(this.selectedDate.getDate() - 7);
163
+ break;
164
+ case CalendarView.WeekSelectView:
165
+ newDate.setDate(this.selectedDate.getDate() - 7);
166
+ break;
167
+ case CalendarView.MonthView:
168
+ newDate.setMonth(this.selectedDate.getMonth() - 1);
169
+ break;
170
+ }
171
+ this.selectedDate = newDate;
172
+ this.rangeChange.emit(this.selectedDate);
173
+ }
174
+ }
175
+
176
+ public addUnit(): void {
177
+ if (this.selectedDate) {
178
+ const newDate: Date = new Date(this.selectedDate);
179
+ switch (this.view) {
180
+ case CalendarView.DayView:
181
+ newDate.setDate(this.selectedDate.getDate() + 1);
182
+ break;
183
+ case CalendarView.WeekView:
184
+ newDate.setDate(this.selectedDate.getDate() + 7);
185
+ break;
186
+ case CalendarView.WeekSelectView:
187
+ newDate.setDate(this.selectedDate.getDate() + 7);
188
+ break;
189
+ case CalendarView.MonthView:
190
+ newDate.setMonth(this.selectedDate.getMonth() + 1);
191
+ break;
192
+ }
193
+ this.selectedDate = newDate;
194
+ this.rangeChange.emit(this.selectedDate);
195
+ }
196
+ }
197
+
198
+ public setUnit(weekDay: Weekday): void {
199
+ this.selectedDate = weekDay.date;
200
+ this.selectedDateChange.emit(this.selectedDate);
201
+ }
202
+
203
+ public changeTheView(view: CalendarView): void {
204
+ this.view = view;
205
+ this.viewChange.emit(view);
206
+ this._prepareHeaderData();
207
+ }
208
+
209
+ private _onResize: EventListener = async (): Promise<void> => {
210
+ this._resizeHost();
211
+ }
212
+
213
+ /**
214
+ * Need to resize the host component to size it's fixed positioned child through css
215
+ */
216
+ private _resizeHost(): void {
217
+ if (this._elementRef) {
218
+ this._renderer.setStyle(
219
+ this._elementRef.nativeElement, "width", this._elementRef.nativeElement.parentElement.clientWidth - this.scrollbarWidth + "px");
220
+ }
221
+ }
222
+
223
+ private _prepareHeaderData(): void {
224
+ if (this.selectedDate) {
225
+ switch (this.view) {
226
+ case CalendarView.DayView:
227
+ const day: Day = new Day();
228
+ day.date = new Date(this.selectedDate);
229
+ const options: any = { year: "numeric", month: "long", day: "numeric" };
230
+ day.description = this.selectedDate.toLocaleDateString(this._locale, options);
231
+ this.day = day;
232
+ break;
233
+ case CalendarView.WeekView:
234
+ const weekView: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
235
+ this.weekDays = weekView.weekDays;
236
+ if (this.firstAvailableDate) {
237
+ this.showBackButton = this.weekDays.find(wd => DateUtils.DatesEqual(this.firstAvailableDate, wd.date)) === undefined;
238
+ }
239
+ break;
240
+ case CalendarView.WeekSelectView:
241
+ const weekSelectView: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
242
+ this.weekDays = weekSelectView.weekDays;
243
+ this.weekDays.forEach((wd: Weekday) => {
244
+ const evPerDay: AgendaEventPerDay = this._eventsPerDay && this._eventsPerDay.length > 0 ? this._eventsPerDay.find(e => DateUtils.DatesEqual(e.date, wd.date)) : null;
245
+ if (evPerDay) {
246
+ wd.events = evPerDay.events;
247
+ } else {
248
+ wd.weekdaySelected = false;
249
+ }
250
+ });
251
+ if (this.firstAvailableDate) {
252
+ this.showBackButton = this.weekDays.find(wd => DateUtils.DatesEqual(this.firstAvailableDate, wd.date)) === undefined;
253
+ }
254
+ break;
255
+ case CalendarView.MonthView:
256
+ const weekOfMonth: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
257
+ this.weekDays = weekOfMonth.weekDays;
258
+ if (this.firstAvailableDate) {
259
+ this.showBackButton = this.weekDays.find(wd => DateUtils.DatesEqual(this.firstAvailableDate, wd.date)) === undefined;
260
+ }
261
+ break;
262
+ }
263
+ }
264
+ }
265
+ }
@@ -0,0 +1,38 @@
1
+ import {Component, Input, ViewEncapsulation} from "@angular/core";
2
+
3
+ @Component({
4
+ selector: "agenda-hour-cell",
5
+ template: `
6
+ <div class="row-per-half-hour">
7
+ <agenda-half-hour-cell [date]="date" [showLabel]="onlyLabels && !noLabels"></agenda-half-hour-cell>
8
+ <agenda-half-hour-cell [date]="datePlushalfHour"></agenda-half-hour-cell>
9
+ </div>
10
+ `,
11
+ encapsulation: ViewEncapsulation.None
12
+ })
13
+ export class AgendaHourCellComponent {
14
+ @Input()
15
+ public onlyLabels: boolean = false;
16
+
17
+ @Input()
18
+ public noLabels: boolean = false;
19
+
20
+ @Input()
21
+ public set date(value: Date) {
22
+ this._date = value;
23
+ this._setNextHalfHour();
24
+ }
25
+
26
+ public get date(): Date {
27
+ return this._date;
28
+ }
29
+
30
+ public datePlushalfHour: Date;
31
+
32
+ private _date: Date;
33
+
34
+ private _setNextHalfHour(): void {
35
+ this.datePlushalfHour = new Date(this._date);
36
+ this.datePlushalfHour.setMinutes(this.datePlushalfHour.getMinutes() + 30);
37
+ }
38
+ }
@@ -0,0 +1,50 @@
1
+ import {Component, Input, ViewEncapsulation} from "@angular/core";
2
+
3
+ @Component({
4
+ selector: "agenda-hour-view-labels",
5
+ template: `
6
+ <div class="row-per-hour" *ngFor="let dateByTheHour of datesByTheHour">
7
+ <div>
8
+ <agenda-hour-cell [date]="dateByTheHour" onlyLabels [noLabels]="noLabels"></agenda-hour-cell>
9
+ </div>
10
+ </div>
11
+ `,
12
+ encapsulation: ViewEncapsulation.None
13
+ })
14
+ export class AgendaHourViewLabelsComponent {
15
+
16
+ @Input()
17
+ public set date(value: Date) {
18
+ this._date = new Date(value);
19
+ this._date.setDate(1);
20
+ this._date.setMonth(1);
21
+ this._date.setFullYear(1);
22
+ this._prepareViewData();
23
+ }
24
+
25
+ @Input()
26
+ public noLabels: boolean = false;
27
+
28
+ public readonly datesByTheHour: Date[] = [];
29
+
30
+ public get date(): Date {
31
+ return this._date;
32
+ }
33
+
34
+ private _date: Date = new Date();
35
+
36
+ // fixme remove ctrl + c, ctrl + v code duplication with AgendaHourViewComponent._prepareViewData()
37
+ private _prepareViewData(): void {
38
+ this.datesByTheHour.length = 0;
39
+ if (this.date) {
40
+ let newDate: Date = new Date(this.date);
41
+ newDate.setHours(0, 0, 0, 0);
42
+ this.datesByTheHour.push(newDate);
43
+ for (let i: number = 0; i < 23; i++) {
44
+ newDate = new Date(newDate);
45
+ newDate.setHours(newDate.getHours() + 1);
46
+ this.datesByTheHour.push(newDate);
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,46 @@
1
+ import {Component, Input, ViewEncapsulation} from "@angular/core";
2
+
3
+ @Component({
4
+ selector: "agenda-hour-view",
5
+ template: `
6
+ <div class="row-per-hour" *ngFor="let dateByTheHour of datesByTheHour">
7
+ <div fxLayout="row">
8
+ <agenda-hour-cell [date]="dateByTheHour"></agenda-hour-cell>
9
+ </div>
10
+ </div>
11
+ <ng-content></ng-content>
12
+ `,
13
+ encapsulation: ViewEncapsulation.None
14
+ })
15
+ export class AgendaHourViewComponent {
16
+
17
+ @Input()
18
+ public set date(value: Date) {
19
+ this._date = new Date(value);
20
+ this._prepareViewData();
21
+ }
22
+
23
+ public readonly datesByTheHour: Date[] = [];
24
+
25
+ public get date(): Date {
26
+ return this._date;
27
+ }
28
+
29
+ private _date: Date = new Date();
30
+
31
+ // fixme remove ctrl + c, ctrl + v code duplication with AgendaHourViewLabelsComponent._prepareViewData()
32
+ private _prepareViewData(): void {
33
+ this.datesByTheHour.length = 0;
34
+ if (this.date) {
35
+ let newDate: Date = new Date(this.date);
36
+ newDate.setHours(0, 0, 0, 0);
37
+ this.datesByTheHour.push(newDate);
38
+ for (let i: number = 0; i < 23; i++) {
39
+ newDate = new Date(newDate);
40
+ newDate.setHours(newDate.getHours() + 1);
41
+ this.datesByTheHour.push(newDate);
42
+ }
43
+ }
44
+ }
45
+
46
+ }
@@ -0,0 +1,65 @@
1
+ import {Component, ViewEncapsulation} from "@angular/core";
2
+ import { AgendaBaseViewComponent } from "./agenda-base-view.component";
3
+ import {NULL_MONTH} from "../../../../model/agenda-null-objects";
4
+ import {Month} from "../../../../model/month.model";
5
+ import {Weekday} from "../../../../model/weekday.model";
6
+ import {Week} from "../../../../model/week.model";
7
+ import {DateUtils} from "../../../../utils/date-utils";
8
+ import {CalendarUtils} from "../../../../utils/calendar.utils";
9
+
10
+
11
+ @Component({
12
+ selector: "agenda-month-view",
13
+ template: `
14
+ <div class="view-wrapper">
15
+ <div class="hour-view-labels-wrapper"></div>
16
+ <div class="weeks">
17
+ <div class="week" *ngFor="let week of weeks" fxLayout="row">
18
+ <div class="week-day" *ngFor="let weekDay of week.weekDays" [class.not-in-month]="!weekDay.inView">
19
+ <div class="day" [textContent]="weekDay.weekdayDay"></div>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ `,
25
+ encapsulation: ViewEncapsulation.None
26
+ })
27
+ export class AgendaMonthViewComponent extends AgendaBaseViewComponent {
28
+
29
+ public month: Month = NULL_MONTH;
30
+
31
+ public firstWeekDays: Weekday[] = [];
32
+
33
+ public weeks: Week[] = [];
34
+
35
+ protected prepareViewData(): void {
36
+ const month: Month = new Month();
37
+ if (this.selectedDate) {
38
+ const day: Date = DateUtils.GetFirstDayOfMonth(this.selectedDate);
39
+ const endOfMonth: Date = DateUtils.GetLastDayOfMonth(this.selectedDate);
40
+ let oneMoreIteration: boolean = false;
41
+ let continueLoop: boolean = true;
42
+
43
+ while (continueLoop) {
44
+ if (oneMoreIteration) {
45
+ continueLoop = false;
46
+ }
47
+ const week: Week = CalendarUtils.GetDaysOfWeek(day);
48
+ const len: number = week.weekDays.length;
49
+ for (let i: number = 0; i < len; i++) {
50
+ week.weekDays[i].events = this.getEventsFromDate(week.weekDays[i].date);
51
+ week.weekDays[i].inView = week.weekDays[i].date.getMonth() === this.selectedDate.getMonth();
52
+ }
53
+ month.weeks.push(week);
54
+ day.setDate(day.getDate() + 7);
55
+ if (day.getTime() >= endOfMonth.getTime()) {
56
+ oneMoreIteration = true;
57
+ }
58
+ }
59
+ this.month = month;
60
+ this.firstWeekDays = this.month.firstWeek.weekDays;
61
+ this.weeks = month.weeks;
62
+ }
63
+ }
64
+
65
+ }
@@ -0,0 +1,38 @@
1
+ import {Component, EventEmitter, Input, Output, ViewEncapsulation} from "@angular/core";
2
+ import {CalendarView} from "../../../../enum/calendar-view.enum";
3
+ import {AgendaEvent} from "../../../../model/agenda-event.model";
4
+ import {AgendaEventPerDay} from "../../../../model/agenda-event-per-day.model";
5
+
6
+ @Component({
7
+ selector: "agenda-view",
8
+ template: `
9
+ <div class="view-wrapper mini-scrollbar" [ngSwitch]="view">
10
+ <agenda-day-view *ngSwitchCase="viewTypes.DayView"
11
+ [selectedDate]="selectedDate" [eventsPerDay]="eventsPerDay" (eventChecked)="eventChecked.emit($event)"></agenda-day-view>
12
+ <agenda-week-view *ngSwitchCase="viewTypes.WeekView"
13
+ [view]="view" [selectedDate]="selectedDate" [eventsPerDay]="eventsPerDay" (eventChecked)="eventChecked.emit($event)"></agenda-week-view>
14
+ <agenda-week-select-view *ngSwitchCase="viewTypes.WeekSelectView"
15
+ [view]="view" [selectedDate]="selectedDate" [eventsPerDay]="eventsPerDay" (eventChecked)="eventChecked.emit($event)"></agenda-week-select-view>
16
+ <agenda-month-view *ngSwitchCase="viewTypes.MonthView"
17
+ [selectedDate]="selectedDate" [eventsPerDay]="eventsPerDay" (eventChecked)="eventChecked.emit($event)"></agenda-month-view>
18
+ </div>
19
+ `,
20
+ encapsulation: ViewEncapsulation.None
21
+ })
22
+ export class AgendaViewComponent {
23
+
24
+ @Input()
25
+ public view: CalendarView = CalendarView.WeekView;
26
+
27
+ @Input()
28
+ public selectedDate: Date;
29
+
30
+ @Input()
31
+ public eventsPerDay: AgendaEventPerDay[] = [];
32
+
33
+ @Output()
34
+ public readonly eventChecked: EventEmitter<AgendaEvent> = new EventEmitter<AgendaEvent>();
35
+
36
+ public readonly viewTypes: typeof CalendarView = CalendarView;
37
+
38
+ }
@@ -0,0 +1,63 @@
1
+ import {Component, Input, ViewEncapsulation} from "@angular/core";
2
+ import {AgendaBaseViewComponent} from "./agenda-base-view.component";
3
+ import {NULL_WEEK} from "../../../../model/agenda-null-objects";
4
+ import {CalendarUtils} from "../../../../utils/calendar.utils";
5
+ import {Icon} from "../../../../enum/icon.enum";
6
+ import {CalendarView} from "../../../../enum/calendar-view.enum";
7
+ import {Week} from "../../../../model/week.model";
8
+
9
+ @Component({
10
+ selector: "agenda-week-select-view",
11
+ template: `
12
+ <div class="view-wrapper week-select-view">
13
+ <div class="week-day" *ngFor="let weekDay of week.weekDays">
14
+ <div class="week-select-container" *ngIf="weekDay.weekdaySelected">
15
+ <div class="week-select-left">
16
+ <h3 [textContent]="'AGENDA_CHOOSE_DELIVERY_PERIOD'"></h3>
17
+ <div class="week-select-list mini-scrollbar">
18
+ <agenda-events
19
+ [halfHourHeight]="40"
20
+ [events]="weekDay.events"
21
+ (eventChecked)="eventChecked.emit($event)"
22
+ [view]="view"
23
+ ></agenda-events>
24
+ <div class="no-events-banner" *ngIf="weekDay.events.length === 0">
25
+ <p [textContent]="'AGENDA_NO_PERIODS_AVAILABLE'"></p>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ <div class="week-select-right">
30
+ <h3 [textContent]="'AGENDA_FOR_EVERY_PERIOD'"></h3>
31
+ <ul>
32
+ <li><co-icon [iconData]="iconCacheService.getIcon(icons.CheckRound)" class="small action-color moment-icon"></co-icon><span [textContent]="'AGENDA_FOR_EVERY_PERIOD_REASON1'"></span></li>
33
+ <li><co-icon [iconData]="iconCacheService.getIcon(icons.CheckRound)" class="small action-color moment-icon"></co-icon><span [textContent]="'AGENDA_FOR_EVERY_PERIOD_REASON2'"></span></li>
34
+ </ul>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ `,
40
+ encapsulation: ViewEncapsulation.None
41
+ })
42
+ export class AgendaWeekSelectViewComponent extends AgendaBaseViewComponent {
43
+
44
+ @Input()
45
+ public view: CalendarView = CalendarView.WeekSelectView;
46
+
47
+ public week: Week = NULL_WEEK;
48
+
49
+ public readonly icons: typeof Icon = Icon;
50
+
51
+ protected prepareViewData(): void {
52
+ if (this.selectedDate) {
53
+ // get the events
54
+ const week: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
55
+ const len: number = week.weekDays.length;
56
+ for (let i: number = 0; i < len; i++) {
57
+ week.weekDays[i].events = this.getEventsFromDate(week.weekDays[i].date);
58
+ }
59
+ this.week = week;
60
+ }
61
+ }
62
+
63
+ }
@@ -0,0 +1,46 @@
1
+ import {Component, Input, ViewEncapsulation} from "@angular/core";
2
+ import {NULL_WEEK} from "../../../../model/agenda-null-objects";
3
+ import {CalendarUtils} from "../../../../utils/calendar.utils";
4
+ import {CalendarView} from "../../../../enum/calendar-view.enum";
5
+ import {Week} from "../../../../model/week.model";
6
+ import {AgendaBaseViewComponent} from "./agenda-base-view.component";
7
+
8
+
9
+ @Component({
10
+ selector: "agenda-week-view",
11
+ template: `
12
+ <div class="view-wrapper">
13
+ <agenda-hour-view-labels [date]="selectedDate"></agenda-hour-view-labels>
14
+ <div class="week-day" *ngFor="let weekDay of week.weekDays">
15
+ <agenda-hour-view [date]="weekDay.date">
16
+ <agenda-events
17
+ [halfHourHeight]="40"
18
+ [events]="weekDay.events"
19
+ (eventChecked)="eventChecked.emit($event)"
20
+ [view]="view"
21
+ ></agenda-events>
22
+ </agenda-hour-view>
23
+ </div>
24
+ </div>
25
+ `,
26
+ encapsulation: ViewEncapsulation.None
27
+ })
28
+ export class AgendaWeekViewComponent extends AgendaBaseViewComponent /*implements OnInit, OnDestroy*/ {
29
+
30
+ @Input()
31
+ public view: CalendarView = CalendarView.WeekView;
32
+
33
+ public week: Week = NULL_WEEK;
34
+
35
+ protected prepareViewData(): void {
36
+ if (this.selectedDate) {
37
+ // get the events
38
+ const week: Week = CalendarUtils.GetDaysOfWeek(this.selectedDate);
39
+ const len: number = week.weekDays.length;
40
+ for (let i: number = 0; i < len; i++) {
41
+ week.weekDays[i].events = this.getEventsFromDate(week.weekDays[i].date);
42
+ }
43
+ this.week = week;
44
+ }
45
+ }
46
+ }