@colijnit/sharedcomponents 1.0.25 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/README.md +8 -11
  2. package/bundles/colijnit-sharedcomponents.umd.js +3706 -0
  3. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -0
  4. package/colijnit-sharedcomponents.d.ts +16 -0
  5. package/colijnit-sharedcomponents.metadata.json +1 -0
  6. package/esm2015/colijnit-sharedcomponents.js +17 -0
  7. package/esm2015/lib/assets/dictionary/text.properties.js +11 -0
  8. package/esm2015/lib/components/circular-gauge/co-circular-gauge.component.js +126 -0
  9. package/esm2015/lib/components/circular-gauge/co-circular-gauge.module.js +21 -0
  10. package/esm2015/lib/components/docsign/component/signature/signature.component.js +75 -0
  11. package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +44 -0
  12. package/esm2015/lib/components/docsign/docsign.component.js +225 -0
  13. package/esm2015/lib/components/docsign/docsign.module.js +23 -0
  14. package/esm2015/lib/components/key-pad/key-pad.component.js +191 -0
  15. package/esm2015/lib/components/key-pad/key-pad.module.js +21 -0
  16. package/esm2015/lib/components/layout-switcher/layout-switcher.component.js +74 -0
  17. package/esm2015/lib/components/layout-switcher/layout-switcher.module.js +21 -0
  18. package/esm2015/lib/components/linear-gauge/co-linear-gauge.component.js +55 -0
  19. package/esm2015/lib/components/linear-gauge/co-linear-gauge.module.js +19 -0
  20. package/esm2015/lib/components/send-method-dialog/enums/send-option.js +8 -0
  21. package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +309 -0
  22. package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +31 -0
  23. package/esm2015/lib/components/statusbar/statusbar.component.js +81 -0
  24. package/esm2015/lib/components/statusbar/statusbar.module.js +23 -0
  25. package/esm2015/lib/components/stock/stock-information/stock-information.component.js +54 -0
  26. package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +350 -0
  27. package/esm2015/lib/components/stock/stock-location/stock-location.component.js +62 -0
  28. package/esm2015/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.js +2 -0
  29. package/esm2015/lib/components/stock/stock-transfer/stock-change-amount.component.js +68 -0
  30. package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +130 -0
  31. package/esm2015/lib/components/stock/stock.component.js +140 -0
  32. package/esm2015/lib/components/stock/stock.module.js +48 -0
  33. package/esm2015/lib/enum/icon.enum.js +19 -0
  34. package/esm2015/lib/enum/keyboard-code.enum.js +32 -0
  35. package/esm2015/lib/enum/language-code.enum.js +8 -0
  36. package/esm2015/lib/factory/business-object-factory.js +120 -0
  37. package/esm2015/lib/factory/decorators/boolean.decorator.js +102 -0
  38. package/esm2015/lib/factory/decorators/complex-array.decorator.js +55 -0
  39. package/esm2015/lib/factory/decorators/complex-field.decorator.js +57 -0
  40. package/esm2015/lib/factory/decorators/date-field.decorator.js +36 -0
  41. package/esm2015/lib/factory/decorators/string-number.decorator.js +43 -0
  42. package/esm2015/lib/model/business-object.js +81 -0
  43. package/esm2015/lib/model/icon-svg.js +18 -0
  44. package/esm2015/lib/service/dictionary.service.js +76 -0
  45. package/esm2015/lib/service/icon-cache.service.js +51 -0
  46. package/esm2015/lib/service/options.service.js +71 -0
  47. package/esm2015/lib/service/shared-connector.service.js +278 -0
  48. package/esm2015/lib/service/shared.service.js +30 -0
  49. package/esm2015/lib/service/stock.service.js +95 -0
  50. package/esm2015/lib/utils/array-utils.js +183 -0
  51. package/esm2015/lib/utils/is-nill.function.js +5 -0
  52. package/esm2015/lib/utils/string-utils.js +64 -0
  53. package/esm2015/public-api.js +21 -0
  54. package/fesm2015/colijnit-sharedcomponents.js +3516 -0
  55. package/fesm2015/colijnit-sharedcomponents.js.map +1 -0
  56. package/lib/assets/dictionary/text.properties.d.ts +3 -0
  57. package/lib/components/circular-gauge/co-circular-gauge.component.d.ts +20 -0
  58. package/lib/components/circular-gauge/co-circular-gauge.module.d.ts +2 -0
  59. package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/_layout.scss +0 -0
  60. package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/_material-definition.scss +0 -0
  61. package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/_theme.scss +0 -0
  62. package/{projects/sharedcomponents/src/lib → lib}/components/circular-gauge/style/material.scss +0 -0
  63. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/_layout.scss +0 -0
  64. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/_material-definition.scss +0 -0
  65. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/_theme.scss +0 -0
  66. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/agenda/style/material.scss +0 -0
  67. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/_layout.scss +0 -0
  68. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/_material-definition.scss +0 -0
  69. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/_theme.scss +0 -0
  70. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/component/calendar/style/material.scss +0 -0
  71. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/_layout.scss +0 -0
  72. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/_material-definition.scss +0 -0
  73. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/_theme.scss +0 -0
  74. package/{projects/sharedcomponents/src/lib → lib}/components/date-planning/style/material.scss +0 -0
  75. package/lib/components/docsign/component/signature/signature.component.d.ts +16 -0
  76. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_layout.scss +0 -0
  77. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
  78. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_theme.scss +0 -0
  79. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/material.scss +0 -0
  80. package/lib/components/docsign/component/signatures/signatures.component.d.ts +12 -0
  81. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
  82. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
  83. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
  84. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/material.scss +0 -0
  85. package/lib/components/docsign/docsign.component.d.ts +92 -0
  86. package/lib/components/docsign/docsign.module.d.ts +2 -0
  87. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_layout.scss +0 -0
  88. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_material-definition.scss +0 -0
  89. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_theme.scss +0 -0
  90. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/material.scss +0 -0
  91. package/lib/components/key-pad/key-pad.component.d.ts +36 -0
  92. package/lib/components/key-pad/key-pad.module.d.ts +2 -0
  93. package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/_layout.scss +0 -0
  94. package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/_material-definition.scss +0 -0
  95. package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/_theme.scss +0 -0
  96. package/{projects/sharedcomponents/src/lib → lib}/components/key-pad/style/material.scss +0 -0
  97. package/lib/components/layout-switcher/layout-switcher.component.d.ts +16 -0
  98. package/lib/components/layout-switcher/layout-switcher.module.d.ts +2 -0
  99. package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/_layout.scss +0 -0
  100. package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/_material-definition.scss +0 -0
  101. package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/_theme.scss +0 -0
  102. package/{projects/sharedcomponents/src/lib → lib}/components/layout-switcher/style/material.scss +0 -0
  103. package/lib/components/linear-gauge/co-linear-gauge.component.d.ts +16 -0
  104. package/lib/components/linear-gauge/co-linear-gauge.module.d.ts +2 -0
  105. package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/_layout.scss +0 -0
  106. package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/_material-definition.scss +0 -0
  107. package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/_theme.scss +0 -0
  108. package/{projects/sharedcomponents/src/lib → lib}/components/linear-gauge/style/material.scss +0 -0
  109. package/lib/components/send-method-dialog/enums/send-option.d.ts +6 -0
  110. package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +62 -0
  111. package/lib/components/send-method-dialog/send-method-dialog.module.d.ts +2 -0
  112. package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/_layout.scss +0 -0
  113. package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/_material-definition.scss +0 -0
  114. package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/_theme.scss +0 -0
  115. package/{projects/sharedcomponents/src/lib → lib}/components/send-method-dialog/style/material.scss +0 -0
  116. package/lib/components/statusbar/statusbar.component.d.ts +22 -0
  117. package/lib/components/statusbar/statusbar.module.d.ts +2 -0
  118. package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/_layout.scss +0 -0
  119. package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/_material-definition.scss +0 -0
  120. package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/_theme.scss +0 -0
  121. package/{projects/sharedcomponents/src/lib → lib}/components/statusbar/style/material.scss +0 -0
  122. package/lib/components/stock/stock-information/stock-information.component.d.ts +10 -0
  123. package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +60 -0
  124. package/lib/components/stock/stock-location/stock-location.component.d.ts +15 -0
  125. package/{projects/sharedcomponents/src/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.ts → lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.d.ts} +2 -2
  126. package/lib/components/stock/stock-transfer/stock-change-amount.component.d.ts +18 -0
  127. package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +36 -0
  128. package/lib/components/stock/stock.component.d.ts +42 -0
  129. package/lib/components/stock/stock.module.d.ts +2 -0
  130. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_layout.scss +0 -0
  131. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_material-definition.scss +0 -0
  132. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_theme.scss +0 -0
  133. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/material.scss +0 -0
  134. package/{projects/sharedcomponents/src/lib/enum/icon.enum.ts → lib/enum/icon.enum.d.ts} +2 -3
  135. package/lib/enum/keyboard-code.enum.d.ts +30 -0
  136. package/lib/enum/language-code.enum.d.ts +6 -0
  137. package/lib/factory/business-object-factory.d.ts +23 -0
  138. package/lib/factory/decorators/boolean.decorator.d.ts +43 -0
  139. package/lib/factory/decorators/complex-array.decorator.d.ts +25 -0
  140. package/lib/factory/decorators/complex-field.decorator.d.ts +25 -0
  141. package/lib/factory/decorators/date-field.decorator.d.ts +17 -0
  142. package/lib/factory/decorators/string-number.decorator.d.ts +22 -0
  143. package/lib/model/business-object.d.ts +7 -0
  144. package/lib/model/icon-svg.d.ts +4 -0
  145. package/lib/service/dictionary.service.d.ts +21 -0
  146. package/lib/service/icon-cache.service.d.ts +18 -0
  147. package/lib/service/options.service.d.ts +13 -0
  148. package/lib/service/shared-connector.service.d.ts +43 -0
  149. package/lib/service/shared.service.d.ts +8 -0
  150. package/lib/service/stock.service.d.ts +38 -0
  151. package/{projects/sharedcomponents/src/lib → lib}/style/_mixin.scss +0 -0
  152. package/{projects/sharedcomponents/src/lib → lib}/style/_variables.scss +0 -0
  153. package/{projects/sharedcomponents/src/lib → lib}/style/sharedcomponents-globals.scss +0 -0
  154. package/lib/utils/array-utils.d.ts +57 -0
  155. package/lib/utils/is-nill.function.d.ts +1 -0
  156. package/lib/utils/string-utils.d.ts +22 -0
  157. package/package.json +26 -74
  158. package/{projects/sharedcomponents/src/public-api.ts → public-api.d.ts} +0 -5
  159. package/.browserslistrc +0 -16
  160. package/.editorconfig +0 -16
  161. package/.vscode/extensions.json +0 -4
  162. package/.vscode/launch.json +0 -20
  163. package/.vscode/tasks.json +0 -42
  164. package/Sharedcomponents.iml +0 -11
  165. package/angular.json +0 -133
  166. package/karma.conf.js +0 -44
  167. package/move-assets.js +0 -14
  168. package/projects/sharedcomponents/.browserslistrc +0 -16
  169. package/projects/sharedcomponents/README.md +0 -24
  170. package/projects/sharedcomponents/karma.conf.js +0 -44
  171. package/projects/sharedcomponents/ng-package.json +0 -17
  172. package/projects/sharedcomponents/package.json +0 -18
  173. package/projects/sharedcomponents/src/lib/assets/dictionary/text.properties.ts +0 -8
  174. package/projects/sharedcomponents/src/lib/assets/icons/angle_left_solid.svg +0 -1
  175. package/projects/sharedcomponents/src/lib/assets/icons/angle_right_solid.svg +0 -1
  176. package/projects/sharedcomponents/src/lib/assets/icons/arrow_fat_right.svg +0 -1
  177. package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_left.svg +0 -8
  178. package/projects/sharedcomponents/src/lib/assets/icons/arrow_point_right.svg +0 -4
  179. package/projects/sharedcomponents/src/lib/assets/icons/bring_forward_regular.svg +0 -1
  180. package/projects/sharedcomponents/src/lib/assets/icons/check_round.svg +0 -1
  181. package/projects/sharedcomponents/src/lib/assets/icons/delete_left_regular.svg +0 -1
  182. package/projects/sharedcomponents/src/lib/assets/icons/delivery_truck.svg +0 -12
  183. package/projects/sharedcomponents/src/lib/assets/icons/email.svg +0 -5
  184. package/projects/sharedcomponents/src/lib/assets/icons/pdf.svg +0 -15
  185. package/projects/sharedcomponents/src/lib/assets/icons/print.svg +0 -10
  186. package/projects/sharedcomponents/src/lib/assets/icons/signature_field.svg +0 -9
  187. package/projects/sharedcomponents/src/lib/assets/icons/xml.svg +0 -9
  188. package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.component.ts +0 -139
  189. package/projects/sharedcomponents/src/lib/components/circular-gauge/co-circular-gauge.module.ts +0 -19
  190. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-base-view.component.ts +0 -68
  191. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-day-view.component.ts +0 -31
  192. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-event.component.ts +0 -67
  193. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-events.component.ts +0 -48
  194. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-half-hour-cell.component.ts +0 -81
  195. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-header.component.ts +0 -265
  196. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-cell.component.ts +0 -38
  197. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view-labels.component.ts +0 -50
  198. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-hour-view.component.ts +0 -46
  199. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-month-view.component.ts +0 -65
  200. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-view.component.ts +0 -38
  201. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-select-view.component.ts +0 -63
  202. package/projects/sharedcomponents/src/lib/components/date-planning/component/agenda/agenda-week-view.component.ts +0 -46
  203. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-months.component.ts +0 -37
  204. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-all-years.component.ts +0 -52
  205. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-header.component.ts +0 -124
  206. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar-view.component.ts +0 -201
  207. package/projects/sharedcomponents/src/lib/components/date-planning/component/calendar/calendar.component.ts +0 -35
  208. package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.component.ts +0 -133
  209. package/projects/sharedcomponents/src/lib/components/date-planning/date-planning.module.ts +0 -56
  210. package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +0 -82
  211. package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +0 -50
  212. package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +0 -252
  213. package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +0 -22
  214. package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.component.ts +0 -205
  215. package/projects/sharedcomponents/src/lib/components/key-pad/key-pad.module.ts +0 -19
  216. package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.component.ts +0 -98
  217. package/projects/sharedcomponents/src/lib/components/layout-switcher/layout-switcher.module.ts +0 -21
  218. package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.component.ts +0 -56
  219. package/projects/sharedcomponents/src/lib/components/linear-gauge/co-linear-gauge.module.ts +0 -17
  220. package/projects/sharedcomponents/src/lib/components/send-method-dialog/enums/send-option.ts +0 -6
  221. package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.component.ts +0 -342
  222. package/projects/sharedcomponents/src/lib/components/send-method-dialog/send-method-dialog.module.ts +0 -33
  223. package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.component.ts +0 -97
  224. package/projects/sharedcomponents/src/lib/components/statusbar/statusbar.module.ts +0 -21
  225. package/projects/sharedcomponents/src/lib/components/stock/stock-in-order/stock-in-order.component.ts +0 -0
  226. package/projects/sharedcomponents/src/lib/components/stock/stock-information/stock-information.component.ts +0 -64
  227. package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +0 -384
  228. package/projects/sharedcomponents/src/lib/components/stock/stock-location/stock-location.component.ts +0 -84
  229. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-change-amount.component.ts +0 -73
  230. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +0 -153
  231. package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +0 -165
  232. package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +0 -51
  233. package/projects/sharedcomponents/src/lib/enum/calendar-view.enum.ts +0 -6
  234. package/projects/sharedcomponents/src/lib/enum/keyboard-code.enum.ts +0 -30
  235. package/projects/sharedcomponents/src/lib/enum/language-code.enum.ts +0 -6
  236. package/projects/sharedcomponents/src/lib/enum/month.enum.ts +0 -15
  237. package/projects/sharedcomponents/src/lib/enum/time-period.enum.ts +0 -9
  238. package/projects/sharedcomponents/src/lib/factory/business-object-factory.ts +0 -120
  239. package/projects/sharedcomponents/src/lib/factory/decorators/boolean.decorator.ts +0 -113
  240. package/projects/sharedcomponents/src/lib/factory/decorators/complex-array.decorator.ts +0 -61
  241. package/projects/sharedcomponents/src/lib/factory/decorators/complex-field.decorator.ts +0 -63
  242. package/projects/sharedcomponents/src/lib/factory/decorators/date-field.decorator.ts +0 -41
  243. package/projects/sharedcomponents/src/lib/factory/decorators/string-number.decorator.ts +0 -48
  244. package/projects/sharedcomponents/src/lib/model/agenda-event-per-day.model.ts +0 -6
  245. package/projects/sharedcomponents/src/lib/model/agenda-event.model.ts +0 -17
  246. package/projects/sharedcomponents/src/lib/model/agenda-null-objects.ts +0 -11
  247. package/projects/sharedcomponents/src/lib/model/business-object.ts +0 -85
  248. package/projects/sharedcomponents/src/lib/model/constant/all-months.ts +0 -17
  249. package/projects/sharedcomponents/src/lib/model/date-range.ts +0 -10
  250. package/projects/sharedcomponents/src/lib/model/day.model.ts +0 -9
  251. package/projects/sharedcomponents/src/lib/model/icon-svg.ts +0 -18
  252. package/projects/sharedcomponents/src/lib/model/month.model.ts +0 -11
  253. package/projects/sharedcomponents/src/lib/model/time-window.bo.ts +0 -21
  254. package/projects/sharedcomponents/src/lib/model/week.model.ts +0 -5
  255. package/projects/sharedcomponents/src/lib/model/weekday.model.ts +0 -17
  256. package/projects/sharedcomponents/src/lib/pipe/array-number.pipe.ts +0 -14
  257. package/projects/sharedcomponents/src/lib/pipe/master-pipes.ts +0 -7
  258. package/projects/sharedcomponents/src/lib/pipe/ucfirst.pipe.ts +0 -14
  259. package/projects/sharedcomponents/src/lib/service/dictionary.service.ts +0 -86
  260. package/projects/sharedcomponents/src/lib/service/icon-cache.service.ts +0 -51
  261. package/projects/sharedcomponents/src/lib/service/options.service.ts +0 -66
  262. package/projects/sharedcomponents/src/lib/service/shared-connector.service.ts +0 -258
  263. package/projects/sharedcomponents/src/lib/service/shared-initializer.service.ts +0 -29
  264. package/projects/sharedcomponents/src/lib/service/shared.service.ts +0 -21
  265. package/projects/sharedcomponents/src/lib/service/stock.service.ts +0 -95
  266. package/projects/sharedcomponents/src/lib/utils/array-utils.ts +0 -202
  267. package/projects/sharedcomponents/src/lib/utils/calendar.utils.ts +0 -75
  268. package/projects/sharedcomponents/src/lib/utils/date-utils.ts +0 -302
  269. package/projects/sharedcomponents/src/lib/utils/function/not-nill.function.ts +0 -4
  270. package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +0 -4
  271. package/projects/sharedcomponents/src/lib/utils/string-utils.ts +0 -67
  272. package/projects/sharedcomponents/src/test.ts +0 -27
  273. package/projects/sharedcomponents/tsconfig.lib.json +0 -18
  274. package/projects/sharedcomponents/tsconfig.lib.prod.json +0 -10
  275. package/projects/sharedcomponents/tsconfig.spec.json +0 -17
  276. package/script/merge-icons.js +0 -39
  277. package/src/app/app.component.scss +0 -9
  278. package/src/app/app.component.spec.ts +0 -31
  279. package/src/app/app.component.ts +0 -156
  280. package/src/app/app.module.ts +0 -60
  281. package/src/assets/.gitkeep +0 -0
  282. package/src/environments/environment.prod.ts +0 -3
  283. package/src/environments/environment.ts +0 -16
  284. package/src/favicon.ico +0 -0
  285. package/src/index.html +0 -13
  286. package/src/main.ts +0 -12
  287. package/src/polyfills.ts +0 -53
  288. package/src/styles.scss +0 -40
  289. package/src/test.ts +0 -26
  290. package/tsconfig.app.json +0 -15
  291. package/tsconfig.json +0 -65
  292. package/tsconfig.spec.json +0 -18
@@ -1,52 +0,0 @@
1
- import {Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation} from "@angular/core";
2
-
3
- @Component({
4
- selector: "calendar-all-years",
5
- template: `
6
- <div *ngFor="let currentYear of years"
7
- [textContent]="currentYear"
8
- [class.selected-year]="currentYear === year"
9
- class="pointer-hover"
10
- (click)="year = currentYear; yearChange.emit(year)"
11
- ></div>
12
- `,
13
- encapsulation: ViewEncapsulation.None
14
- })
15
-
16
- export class CalendarAllYearsComponent implements OnInit {
17
-
18
- @Input()
19
- public year: number;
20
-
21
- @Output()
22
- public readonly yearChange: EventEmitter<number> = new EventEmitter<number>();
23
-
24
- public years: number[] = [];
25
-
26
- constructor() {
27
- }
28
-
29
- ngOnInit(): void {
30
- this.years.length = 0;
31
- let start: number = this._determineStart();
32
- const end: number = start + 11;
33
- while (start < end) {
34
- this.years.push(start);
35
- start++;
36
- }
37
- }
38
-
39
- private _determineStart(): number {
40
- if (this.year > 0) {
41
- let thisYear: number = this.year;
42
- let thisYearLastDigit: number = parseInt(thisYear.toString().split("").pop());
43
- while (thisYearLastDigit > 0) {
44
- thisYear--;
45
- thisYearLastDigit = parseInt(thisYear.toString().split("").pop());
46
- }
47
- return thisYear;
48
- }
49
- return 0;
50
- }
51
-
52
- }
@@ -1,124 +0,0 @@
1
- import {Component, DoCheck, EventEmitter, Input, Output, ViewEncapsulation} from "@angular/core";
2
- import {animate, state, style, transition, trigger} from "@angular/animations";
3
- import {ALL_MONTHS} from "../../../../model/constant/all-months";
4
- import {Icon} from "../../../../enum/icon.enum";
5
- import {IconCacheService} from "../../../../service/icon-cache.service";
6
-
7
- @Component({
8
- selector: "calendar-header",
9
- template: `
10
- <div #monthYearSelect class="calendar-header-row">
11
- <co-icon class="pointer-hover" [iconData]="iconCacheService.getIcon(icons.ArrowPointLeft)" (click)="subMonth()"></co-icon>
12
- <div (click)="showMonthYearSelect = true">
13
- <div class="month" [textContent]="currentMonth"></div>
14
- <div class="year" [textContent]="currentYear"></div>
15
- </div>
16
- <co-icon class="pointer-hover" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)" (click)="addMonth()"></co-icon>
17
- </div>
18
- <ng-template #template [absoluteOverlayTemplate]="template">
19
- <div *ngIf="showMonthYearSelect"
20
- (clickOutside)="hideMonthYearSelection()" [alignWith]="monthYearSelect"
21
- class="select-month-year-window" [class.expanded]="expanded" @showMonthYearSelect
22
- [alignTopOffsetPx]="20"
23
- >
24
- <div>
25
- <calendar-all-months [month]="currentMonth" (monthChange)="setNewMonth($event)" shortDescriptions></calendar-all-months>
26
- <div class="vertical-divider"></div>
27
- <calendar-all-years [year]="currentYear" (yearChange)="setNewYear($event)"></calendar-all-years>
28
- </div>
29
- <default-ok-cancel-buttons
30
- (okClick)="changeMonthYear()"
31
- (cancelClick)="showMonthYearSelect = false"
32
- >
33
- </default-ok-cancel-buttons>
34
- </div>
35
- </ng-template>
36
- `,
37
- encapsulation: ViewEncapsulation.None,
38
- animations: [
39
- trigger("showMonthYearSelect", [
40
- state("void", style({
41
- "transform-origin": "top center",
42
- transform: "scaleY(0)"
43
- })),
44
- state("*", style({
45
- "transform-origin": "top center",
46
- transform: "scaleY(1)"
47
- })),
48
- transition(":enter, :leave", [
49
- animate("200ms ease-in-out")
50
- ])
51
- ])
52
- ]
53
- })
54
-
55
- export class CalendarHeaderComponent implements DoCheck {
56
-
57
- @Input()
58
- public selectedDate: Date = new Date();
59
-
60
- @Output()
61
- public readonly selectedDateChange: EventEmitter<Date> = new EventEmitter<Date>();
62
-
63
- public readonly icons: typeof Icon = Icon;
64
-
65
- public showMonthYearSelect: boolean = false;
66
-
67
- public expanded: boolean = false;
68
-
69
- public currentMonth: string;
70
-
71
- public currentYear: number;
72
-
73
- public selectedMonth: number;
74
-
75
- public selectedYear: number;
76
-
77
- constructor(
78
- public iconCacheService: IconCacheService
79
- ) {
80
- }
81
-
82
- ngDoCheck(): void {
83
- if (this.selectedDate) {
84
- this.currentMonth = ALL_MONTHS[this.selectedDate.getMonth()];
85
- this.currentYear = this.selectedDate.getFullYear();
86
- }
87
- }
88
-
89
- public subMonth(): void {
90
- const newDate: Date = new Date(this.selectedDate);
91
- newDate.setMonth(newDate.getMonth() - 1);
92
- this.selectedDate = newDate;
93
- this.selectedDateChange.emit(this.selectedDate);
94
- }
95
-
96
- public addMonth(): void {
97
- const newDate: Date = new Date(this.selectedDate);
98
- newDate.setMonth(newDate.getMonth() + 1);
99
- this.selectedDate = newDate;
100
- this.selectedDateChange.emit(this.selectedDate);
101
- }
102
-
103
- public hideMonthYearSelection(): void {
104
- this.expanded = false;
105
- this.showMonthYearSelect = false;
106
- }
107
-
108
- public setNewMonth(month: number): void {
109
- this.selectedMonth = month;
110
- }
111
-
112
- public setNewYear(year: number): void {
113
- this.selectedYear = year;
114
- }
115
-
116
- public changeMonthYear(): void {
117
- this.hideMonthYearSelection();
118
- const newDate: Date = new Date(this.selectedDate);
119
- newDate.setMonth(this.selectedMonth);
120
- newDate.setFullYear(this.selectedYear);
121
- this.selectedDate = newDate;
122
- this.selectedDateChange.emit(this.selectedDate);
123
- }
124
- }
@@ -1,201 +0,0 @@
1
- import {Component, EventEmitter, Inject, Input, LOCALE_ID, Output, ViewEncapsulation} from "@angular/core";
2
- import {ArrayNumberPipe} from "../../../../pipe/array-number.pipe";
3
- import {DatePipe} from "@angular/common";
4
- import {DateUtils} from "../../../../utils/date-utils";
5
- import {CalendarView} from "../../../../enum/calendar-view.enum";
6
- import {LanguageCode} from "../../../../enum/language-code.enum";
7
-
8
- type DateStamp = { day: number, inMonth: boolean, timestamp: number, week: number, selected: boolean };
9
-
10
- @Component({
11
- selector: "calendar-view",
12
- template: `
13
- <div class="calendar-content">
14
- <div>
15
- <div class="week-day-header week-row">
16
- <div class="week-acronym"></div>
17
- <div *ngFor="let weekDay of weekDayLabel" [textContent]="weekDay | ucfirst"
18
- class="week-day-label"></div>
19
- </div>
20
- <div class="week-row" *ngFor="let week of weeks;trackBy:trackByWeek">
21
- <div [textContent]="week[0].week" class="week-number"></div>
22
- <div *ngFor="let date of week;trackBy:trackByStamp" class="week-day"
23
- (click)="onDateClick(date)" [textContent]="date.day"
24
- [class.in-month]="date.inMonth" [class.is-selected]="date.selected"
25
- [class.is-today]="date.timestamp === todayDayStamp"></div>
26
- </div>
27
- </div>
28
- </div>
29
- `,
30
- encapsulation: ViewEncapsulation.None
31
- })
32
- //fixme we don't have a todayDayStamp field but our template references it
33
- export class CalendarViewComponent {
34
-
35
- @Input()
36
- public set view(value: CalendarView) {
37
- this._view = value;
38
- this._selectDays();
39
- }
40
-
41
- public get view(): CalendarView {
42
- return this._view;
43
- }
44
-
45
- @Input()
46
- public set selectedDate(value: Date) {
47
- this._selectedDate = value;
48
- this._selectedDate.setHours(0, 0, 0, 0);
49
- this._prepareWeeks();
50
- }
51
-
52
- public get selectedDate(): Date {
53
- return this._selectedDate;
54
- }
55
-
56
- @Output()
57
- public selectedDateChange: EventEmitter<Date> = new EventEmitter<Date>();
58
-
59
- public trackByStamp: Function = (index: number, stamp: DateStamp): number => {
60
- return stamp && stamp.timestamp || index;
61
- }
62
-
63
- public trackByWeek: Function = (index: number, week: DateStamp[]): number => {
64
- return week && week[0].week || index;
65
- }
66
-
67
- public weekDayLabel: string[] = [];
68
-
69
- public weeks: DateStamp[][] = [];
70
-
71
- private _selectedDate: Date = new Date();
72
-
73
- private _view: CalendarView = CalendarView.WeekView;
74
-
75
- constructor(
76
- @Inject(LOCALE_ID) private readonly _locale: LanguageCode,
77
- ) {
78
- this.selectedDate.setHours(0, 0, 0, 0);
79
- this._setLabels();
80
- }
81
-
82
- public onDateClick(date: DateStamp): void {
83
- this.selectedDate = new Date(date.timestamp);
84
- this.selectedDateChange.emit(this.selectedDate);
85
- this._selectDays();
86
- }
87
-
88
- private _setLabels(): void {
89
- const datePipe: DatePipe = new DatePipe(this._locale);
90
-
91
- const currentDay: number = this.selectedDate.getDay();
92
- const startWeekDate: Date = new Date(this.selectedDate.getTime());
93
- startWeekDate.setDate(startWeekDate.getDate() - currentDay - 1);
94
-
95
- this.weekDayLabel = new ArrayNumberPipe().transform(7).map(() => {
96
- startWeekDate.setDate(startWeekDate.getDate() + 1);
97
- return datePipe.transform(startWeekDate, "E");
98
- });
99
- this.weekDayLabel.push(this.weekDayLabel.shift());
100
- }
101
-
102
- private _prepareWeeks(): void {
103
- this.weeks.length = 0;
104
-
105
- const date: Date = new Date(this.selectedDate.getTime());
106
- date.setHours(0, 0, 0, 0);
107
-
108
- // go to last day of month
109
- date.setMonth(date.getMonth() + 1);
110
- date.setDate(0);
111
- const monthEndDay: number = date.getDay();
112
- const monthEndDate: number = date.getDate();
113
-
114
- // days after end of month
115
- const daysAfter: number = !monthEndDay ? 0 : 7 - monthEndDay;
116
-
117
- // go to first day of month
118
- date.setDate(1);
119
- const monthBeginDay: number = date.getDay();
120
-
121
- // days before start of month
122
- const daysBefore: number = !monthBeginDay ? 6 : monthBeginDay - 1;
123
-
124
- // go to start of calendar view
125
- date.setDate(-daysBefore + 1);
126
-
127
- // amount of weeks to display
128
- const weekCount: number = Math.ceil((daysBefore + daysAfter + monthEndDate) / 7);
129
- const weekStart: number = DateUtils.GetWeekNumber(date);
130
- const weekEnd: number = weekStart + weekCount - 1;
131
-
132
- // iterate over week count
133
- for (let i: number = weekStart; i <= weekEnd; i++) {
134
- let week: number = i;
135
-
136
- // only recalculate week when it's necessary
137
- if (weekStart > 50) {
138
- week = DateUtils.GetWeekNumber(date);
139
- }
140
- const days: DateStamp[] = [];
141
-
142
- // iterate over 7 days
143
- for (let ii: number = 1; ii <= 7; ii++) {
144
- // check if we are in the current month
145
- let inMonth: boolean = true;
146
- if (i === weekStart) {
147
- inMonth = ii > daysBefore;
148
- } else if (i === weekEnd) {
149
- inMonth = ii <= 7 - daysAfter;
150
- }
151
-
152
- const timestamp: number = date.getTime();
153
- // add dateStamp to date array
154
- days.push({
155
- week: week,
156
- inMonth: inMonth,
157
- day: date.getDate(),
158
- timestamp: timestamp,
159
- selected: this.selectedDate.getTime() === timestamp
160
- });
161
- // go one day further
162
- date.setDate(date.getDate() + 1);
163
- }
164
- this.weeks.push(days);
165
- }
166
- this._selectDays();
167
- }
168
-
169
- private _selectDays(): void {
170
- this._resetSelection();
171
- if (!this.selectedDate) {
172
- return;
173
- }
174
- const weekNumber: number = DateUtils.GetWeekNumber(this.selectedDate);
175
- const len: number = this.weeks.length;
176
- for (let i: number = 0; i < len; i++) {
177
- const leni: number = this.weeks[i].length;
178
- for (let ii: number = 0; ii < leni; ii++) {
179
- if (this.weeks[i][ii].inMonth && this.view === CalendarView.MonthView) {
180
- this.weeks[i][ii].selected = true;
181
- } else if (this.weeks[i][ii].week === weekNumber && this.view === CalendarView.WeekView) {
182
- this.weeks[i][ii].selected = true;
183
- } else if (this.weeks[i][ii].timestamp === this.selectedDate.getTime() && this.view === CalendarView.WeekSelectView) {
184
- this.weeks[i][ii].selected = true;
185
- } else if (this.weeks[i][ii].timestamp === this.selectedDate.getTime() && this.view === CalendarView.DayView) {
186
- this.weeks[i][ii].selected = true;
187
- }
188
- }
189
- }
190
- }
191
-
192
- private _resetSelection(): void {
193
- const len: number = this.weeks.length;
194
- for (let i: number = 0; i < len; i++) {
195
- const leni: number = this.weeks[i].length;
196
- for (let ii: number = 0; ii < leni; ii++) {
197
- this.weeks[i][ii].selected = false;
198
- }
199
- }
200
- }
201
- }
@@ -1,35 +0,0 @@
1
- import {Component, EventEmitter, Input, Output, ViewEncapsulation} from "@angular/core";
2
- import {CalendarView} from "../../../../enum/calendar-view.enum";
3
-
4
- @Component({
5
- selector: "calendar",
6
- template: `
7
- <div class="sc-calendar">
8
- <calendar-header [selectedDate]="selectedDate" (selectedDateChange)="changeSelectedDate($event)"></calendar-header>
9
- <calendar-view [view]="view" [selectedDate]="selectedDate" (selectedDateChange)="changeSelectedDate($event)"></calendar-view>
10
- </div>
11
- `,
12
- encapsulation: ViewEncapsulation.None
13
- })
14
- export class CalendarComponent {
15
-
16
- @Input()
17
- public view: CalendarView = CalendarView.WeekView;
18
-
19
- @Input()
20
- public selectedDate: Date = new Date();
21
-
22
- @Input()
23
- public days: Date[] = [];
24
-
25
- @Output()
26
- public selectedDateChange: EventEmitter<Date> = new EventEmitter<Date>();
27
-
28
- constructor() {
29
- }
30
-
31
- public changeSelectedDate(date: Date): void {
32
- this.selectedDate = date;
33
- this.selectedDateChange.emit(this.selectedDate);
34
- }
35
- }
@@ -1,133 +0,0 @@
1
- import {
2
- ChangeDetectorRef,
3
- Component,
4
- ElementRef,
5
- EventEmitter,
6
- Input,
7
- Output,
8
- Renderer2,
9
- ViewChild,
10
- ViewEncapsulation
11
- } from "@angular/core";
12
- import {animate, state, style, transition, trigger} from "@angular/animations";
13
- import {CalendarView} from "@syncfusion/ej2-angular-calendars";
14
-
15
- @Component({
16
- selector: "sc-date-planning",
17
- template: `
18
- <div class="sc-agenda">
19
- <div class="content-wrapper">
20
- <calendar *ngIf="calendarNavigation"
21
- [view]="view"
22
- [(days)]="days"
23
- [selectedDate]="selectedDate" (selectedDateChange)="doChangeSelectedDate($event)"></calendar>
24
- <div class="agenda-content-wrapper mini-scrollbar">
25
- <div class="agenda-content">
26
- <agenda-header [view]="view" (viewChange)="doChangeView($event)"
27
- [firstAvailableDate]="firstAvailableDate"
28
- [eventsPerDay]="eventsPerDay"
29
- [selectedDate]="selectedDate"
30
- (selectedDateChange)="doChangeSelectedDate($event)"
31
- (rangeChange)="doChangeSelectedDate($event, true)"></agenda-header>
32
- <agenda-view [view]="view"
33
- [selectedDate]="selectedDate"
34
- [eventsPerDay]="eventsPerDay"
35
- (eventChecked)="eventChecked.emit($event)"></agenda-view>
36
- </div>
37
- </div>
38
- </div>
39
- </div>
40
- <button-colijn *ngIf="showButton && eventsPerDay.length > 0" class="text-only select-agenda-button"
41
- [label]="buttonLabel"
42
- (click)="buttonClick.emit($event)">
43
- </button-colijn>
44
- `,
45
- animations: [
46
- trigger("showHideWindow", [
47
- state("void", style({transform: "scaleY(0)"})),
48
- state("*", style({transform: "scaleY(1)"})),
49
- transition(":enter, :leave", [
50
- animate("200ms ease-in-out")
51
- ])
52
- ])
53
- ],
54
- encapsulation: ViewEncapsulation.None
55
- })
56
-
57
- export class DatePlanningComponent {
58
-
59
- @Input()
60
- public calendarNavigation: boolean = false;
61
-
62
- @Input()
63
- public showButton: boolean = false;
64
-
65
- @Input()
66
- public selectedDate: Date;
67
-
68
- @Input()
69
- public firstAvailableDate: Date;
70
-
71
- @Input()
72
- public buttonLabel: string = "";
73
-
74
- @Input()
75
- public eventsPerDay: any = [];
76
-
77
- @Input()
78
- public view: CalendarView;
79
-
80
- @Output()
81
- public readonly eventChecked: EventEmitter<any> = new EventEmitter<any>();
82
-
83
- @Output()
84
- public readonly selectedDateChange: EventEmitter<Date> = new EventEmitter<Date>();
85
-
86
- @Output()
87
- public readonly rangeChange: EventEmitter<Date> = new EventEmitter<Date>();
88
-
89
- @Output()
90
- public readonly viewChange: EventEmitter<CalendarView> = new EventEmitter<CalendarView>();
91
-
92
- @Output()
93
- public readonly buttonClick: EventEmitter<MouseEvent> = new EventEmitter<MouseEvent>();
94
-
95
- @ViewChild("dayStart", { static: true })
96
- public dayStart: ElementRef;
97
-
98
- public days: Date[] = [];
99
- private _selectedDate: Date = new Date();
100
-
101
- constructor(
102
- private _changeDetector: ChangeDetectorRef,
103
- private renderer: Renderer2
104
- ) {
105
- }
106
-
107
- public doChangeSelectedDate(date: Date, rangeChanged: boolean = false): void {
108
- this.selectedDate = new Date(date);
109
- if (rangeChanged) {
110
- this.rangeChange.next(this.selectedDate);
111
- } else {
112
- this.selectedDateChange.next(this.selectedDate);
113
- }
114
- this._changeDetector.detectChanges();
115
- }
116
-
117
- public doChangeView(view: CalendarView): void {
118
- this.view = view;
119
- this.viewChange.next(this.view);
120
- }
121
-
122
- public scrollToDayStart(): void {
123
- if (this.dayStart !== undefined) {
124
- const dayStart: any = this.renderer.selectRootElement("#dayStart");
125
- if (dayStart) {
126
- setTimeout(() => {
127
- dayStart.scrollIntoView({behavior: "instant", block: "center"});
128
- });
129
- }
130
- }
131
- }
132
-
133
- }
@@ -1,56 +0,0 @@
1
- import { NgModule } from "@angular/core";
2
- import { CommonModule } from "@angular/common";
3
- import {DatePlanningComponent} from "./date-planning.component";
4
- import {IconModule, InputDatePickerModule} from "@colijnit/corecomponents_v12";
5
- import {CalendarAllYearsComponent} from "./component/calendar/calendar-all-years.component";
6
- import {CalendarAllMonthsComponent} from "./component/calendar/calendar-all-months.component";
7
- import {CalendarHeaderComponent} from "./component/calendar/calendar-header.component";
8
- import {CalendarComponent} from "./component/calendar/calendar.component";
9
- import {CalendarViewComponent} from "./component/calendar/calendar-view.component";
10
- import {AgendaHeaderComponent} from "./component/agenda/agenda-header.component";
11
- import {AgendaViewComponent} from "./component/agenda/agenda-view.component";
12
- import {AgendaMonthViewComponent} from "./component/agenda/agenda-month-view.component";
13
- import {AgendaDayViewComponent} from "./component/agenda/agenda-day-view.component";
14
- import {AgendaWeekViewComponent} from "./component/agenda/agenda-week-view.component";
15
- import {AgendaWeekSelectViewComponent} from "./component/agenda/agenda-week-select-view.component";
16
- import {AgendaHourViewComponent} from "./component/agenda/agenda-hour-view.component";
17
- import {AgendaHourCellComponent} from "./component/agenda/agenda-hour-cell.component";
18
- import {AgendaHourViewLabelsComponent} from "./component/agenda/agenda-hour-view-labels.component";
19
- import {AgendaHalfHourCellComponent} from "./component/agenda/agenda-half-hour-cell.component";
20
- import {AgendaEventsComponent} from "./component/agenda/agenda-events.component";
21
- import {AgendaEventComponent} from "./component/agenda/agenda-event.component";
22
- import {MASTER_PIPES} from "../../pipe/master-pipes";
23
-
24
- @NgModule({
25
- imports: [
26
- CommonModule,
27
- InputDatePickerModule,
28
- IconModule,
29
- ],
30
- declarations: [
31
- DatePlanningComponent,
32
- CalendarAllYearsComponent,
33
- CalendarAllMonthsComponent,
34
- CalendarHeaderComponent,
35
- CalendarComponent,
36
- CalendarViewComponent,
37
- AgendaHeaderComponent,
38
- AgendaViewComponent,
39
- AgendaMonthViewComponent,
40
- AgendaDayViewComponent,
41
- AgendaWeekViewComponent,
42
- AgendaWeekSelectViewComponent,
43
- AgendaHourViewComponent,
44
- AgendaHourCellComponent,
45
- AgendaHourViewLabelsComponent,
46
- AgendaHalfHourCellComponent,
47
- AgendaEventsComponent,
48
- AgendaEventComponent,
49
- MASTER_PIPES
50
- ],
51
- exports: [
52
- DatePlanningComponent
53
- ]
54
- })
55
- export class DatePlanningModule {
56
- }
@@ -1,82 +0,0 @@
1
- import {Component, ElementRef, EventEmitter, HostBinding, Input, OnInit, Output, ViewChild, ViewEncapsulation} from "@angular/core";
2
- import SignaturePad from "signature_pad";
3
-
4
- @Component({
5
- selector: "ione-signature",
6
- template: `
7
- <div class="signature-wrapper">
8
- <div class="signature-header">
9
- <span *ngIf="title" class="title" [textContent]="title"></span>
10
- <div class="button-wrapper">
11
- <input type="button" (click)="handleSave($event)" [value]="saveButtonLabel"/>
12
- <input type="button" (click)="handleClear($event)" [value]="clearButtonLabel">
13
- </div>
14
- </div>
15
- <div class="canvas">
16
- <canvas #signature></canvas>
17
- </div>
18
- </div>
19
- `,
20
- encapsulation: ViewEncapsulation.None
21
- })
22
- export class SignatureComponent {
23
- @ViewChild("signature", {read: ElementRef}) set content(content: ElementRef) {
24
- if (content) {
25
- this.signatureCanvas = content;
26
- this._initCanvas();
27
- }
28
- }
29
-
30
- @Input()
31
- public title: string;
32
-
33
- @Input()
34
- public saveButtonLabel: string = 'SAVE';
35
-
36
- @Input()
37
- public clearButtonLabel: string = 'CLEAR';
38
-
39
- @Output()
40
- public save: EventEmitter<string> = new EventEmitter<string>();
41
-
42
- @HostBinding("class.ione-signature")
43
- public showClass() {
44
- return true;
45
- }
46
-
47
- public signature: SignaturePad;
48
- public signatureCanvas: ElementRef;
49
-
50
- public handleSave(event: MouseEvent): void {
51
- // save canvas as svg
52
- // const sig: string = this.signature.toDataURL("image/svg+xml");
53
- const sig: string = this.signature.toDataURL("image/png");
54
- // emit signature string
55
- this.save.next(sig);
56
- }
57
-
58
- public handleClear(event: MouseEvent): void {
59
- if (this.signature) {
60
- this.signature.clear();
61
- }
62
- }
63
-
64
- private _initCanvas(): void {
65
- if (this.signatureCanvas && this.signatureCanvas.nativeElement) {
66
- this.signature = new SignaturePad(this.signatureCanvas.nativeElement);
67
- setTimeout(() => {
68
- this._resizeSignatureCanvas(this.signature, this.signatureCanvas);
69
- });
70
- }
71
- }
72
-
73
- private _resizeSignatureCanvas(signature: SignaturePad, signatureCanvas: ElementRef): void {
74
- const imageBeforeResize: string = signature.toDataURL();
75
- const ratio: number = Math.max(window.devicePixelRatio || 1, 1);
76
- signatureCanvas.nativeElement.width = signatureCanvas.nativeElement.offsetWidth * ratio;
77
- signatureCanvas.nativeElement.height = signatureCanvas.nativeElement.offsetHeight * ratio;
78
- signatureCanvas.nativeElement.getContext("2d").scale(ratio, ratio);
79
- signature.fromDataURL(imageBeforeResize);
80
- }
81
-
82
- }