@anglr/datetime 1.0.0 → 2.0.1-beta.20220222061608

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 (456) hide show
  1. package/changelog.md +19 -0
  2. package/date-fns/package.json +7 -7
  3. package/date-fns/src/{date-fns.d.ts → index.d.ts} +4 -4
  4. package/date-fns/src/index.d.ts.map +1 -0
  5. package/date-fns/src/misc/tokens.d.ts +10 -10
  6. package/date-fns/src/services/dateFnsDateApi.service.d.ts +36 -33
  7. package/date-fns/src/services/dateFnsDateApi.service.d.ts.map +1 -1
  8. package/date-fns/src/services/dateFnsLocale.service.d.ts +10 -10
  9. package/es2015/date-fns/src/index.js +4 -0
  10. package/es2015/date-fns/src/index.js.map +1 -0
  11. package/es2015/date-fns/src/misc/tokens.js +20 -0
  12. package/es2015/date-fns/src/misc/tokens.js.map +1 -0
  13. package/es2015/date-fns/src/services/dateFnsDateApi.service.js +438 -0
  14. package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
  15. package/es2015/date-fns/src/services/dateFnsLocale.service.js +2 -0
  16. package/es2015/date-fns/src/services/dateFnsLocale.service.js.map +1 -0
  17. package/es2015/karma.conf.js +57 -0
  18. package/es2015/karma.conf.js.map +1 -0
  19. package/{moment/src/moment.d.ts → es2015/moment/src/index.js} +3 -3
  20. package/es2015/moment/src/index.js.map +1 -0
  21. package/es2015/moment/src/misc/tokens.js +15 -0
  22. package/es2015/moment/src/misc/tokens.js.map +1 -0
  23. package/es2015/moment/src/services/momentDateApi.service.js +398 -0
  24. package/es2015/moment/src/services/momentDateApi.service.js.map +1 -0
  25. package/{src/datetime.d.ts → es2015/src/index.js} +19 -19
  26. package/es2015/src/index.js.map +1 -0
  27. package/es2015/src/misc/constants.js +33 -0
  28. package/es2015/src/misc/constants.js.map +1 -0
  29. package/es2015/src/misc/datetime.interface.js +2 -0
  30. package/es2015/src/misc/datetime.interface.js.map +1 -0
  31. package/es2015/src/misc/tokens.js +19 -0
  32. package/es2015/src/misc/tokens.js.map +1 -0
  33. package/es2015/src/misc/validators.js +58 -0
  34. package/es2015/src/misc/validators.js.map +1 -0
  35. package/es2015/src/modules/datePipes.module.js +33 -0
  36. package/es2015/src/modules/datePipes.module.js.map +1 -0
  37. package/es2015/src/picker/components/dayPicker/dayPicker.component.js +172 -0
  38. package/es2015/src/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  39. package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js +2 -0
  40. package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  41. package/es2015/src/picker/components/monthPicker/monthPicker.component.js +114 -0
  42. package/es2015/src/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  43. package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js +2 -0
  44. package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  45. package/es2015/src/picker/components/picker/picker.component.animations.js +71 -0
  46. package/es2015/src/picker/components/picker/picker.component.animations.js.map +1 -0
  47. package/es2015/src/picker/components/picker/picker.component.js +241 -0
  48. package/es2015/src/picker/components/picker/picker.component.js.map +1 -0
  49. package/es2015/src/picker/components/pickerBase.component.js +243 -0
  50. package/es2015/src/picker/components/pickerBase.component.js.map +1 -0
  51. package/es2015/src/picker/components/yearPicker/yearPicker.component.js +126 -0
  52. package/es2015/src/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  53. package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js +2 -0
  54. package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  55. package/es2015/src/picker/interfaces.js +5 -0
  56. package/es2015/src/picker/interfaces.js.map +1 -0
  57. package/es2015/src/picker/misc/datetimePicker.interface.js +2 -0
  58. package/es2015/src/picker/misc/datetimePicker.interface.js.map +1 -0
  59. package/es2015/src/picker/misc/tokens.js +6 -0
  60. package/es2015/src/picker/misc/tokens.js.map +1 -0
  61. package/es2015/src/picker/modules/picker.module.js +46 -0
  62. package/es2015/src/picker/modules/picker.module.js.map +1 -0
  63. package/es2015/src/picker/types.js +8 -0
  64. package/es2015/src/picker/types.js.map +1 -0
  65. package/es2015/src/pipes/asRequiredType.js +22 -0
  66. package/es2015/src/pipes/asRequiredType.js.map +1 -0
  67. package/es2015/src/pipes/dateConvert.pipe.js +35 -0
  68. package/es2015/src/pipes/dateConvert.pipe.js.map +1 -0
  69. package/es2015/src/pipes/dateFormat.pipe.js +45 -0
  70. package/es2015/src/pipes/dateFormat.pipe.js.map +1 -0
  71. package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js +421 -0
  72. package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  73. package/es2015/src/selector/components/selector/selector.component.animations.js +15 -0
  74. package/es2015/src/selector/components/selector/selector.component.animations.js.map +1 -0
  75. package/es2015/src/selector/components/selector/selector.component.js +344 -0
  76. package/es2015/src/selector/components/selector/selector.component.js.map +1 -0
  77. package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +317 -0
  78. package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  79. package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +51 -0
  80. package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  81. package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +51 -0
  82. package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  83. package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +47 -0
  84. package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  85. package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +119 -0
  86. package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  87. package/es2015/src/selector/interfaces.js +2 -0
  88. package/es2015/src/selector/interfaces.js.map +1 -0
  89. package/es2015/src/selector/misc/datetimeSelector.interface.js +2 -0
  90. package/es2015/src/selector/misc/datetimeSelector.interface.js.map +1 -0
  91. package/es2015/src/selector/misc/tokens.js +6 -0
  92. package/es2015/src/selector/misc/tokens.js.map +1 -0
  93. package/es2015/src/selector/modules/basicSelector.module.js +20 -0
  94. package/es2015/src/selector/modules/basicSelector.module.js.map +1 -0
  95. package/es2015/src/selector/modules/selector.module.js +60 -0
  96. package/es2015/src/selector/modules/selector.module.js.map +1 -0
  97. package/es2015/src/selector/types.js +10 -0
  98. package/es2015/src/selector/types.js.map +1 -0
  99. package/es2015/src/services/dateApi.interface.js +2 -0
  100. package/es2015/src/services/dateApi.interface.js.map +1 -0
  101. package/es2015/src/services/datePositionParser.interface.js +2 -0
  102. package/es2015/src/services/datePositionParser.interface.js.map +1 -0
  103. package/es2015/src/services/datePositionParser.service.js +227 -0
  104. package/es2015/src/services/datePositionParser.service.js.map +1 -0
  105. package/es2015/src/services/dateTimeRelativeParser.service.js +66 -0
  106. package/es2015/src/services/dateTimeRelativeParser.service.js.map +1 -0
  107. package/es2015/src/services/dateValueProvider.service.js +58 -0
  108. package/es2015/src/services/dateValueProvider.service.js.map +1 -0
  109. package/es2015/src/services/formatProvider.interface.js +2 -0
  110. package/es2015/src/services/formatProvider.interface.js.map +1 -0
  111. package/es2015/src/services/index.js +4 -0
  112. package/es2015/src/services/index.js.map +1 -0
  113. package/es2020/date-fns/src/index.js +4 -0
  114. package/es2020/date-fns/src/index.js.map +1 -0
  115. package/es2020/date-fns/src/misc/tokens.js +20 -0
  116. package/es2020/date-fns/src/misc/tokens.js.map +1 -0
  117. package/es2020/date-fns/src/services/dateFnsDateApi.service.js +437 -0
  118. package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
  119. package/es2020/date-fns/src/services/dateFnsLocale.service.js +2 -0
  120. package/es2020/date-fns/src/services/dateFnsLocale.service.js.map +1 -0
  121. package/es2020/karma.conf.js +57 -0
  122. package/es2020/karma.conf.js.map +1 -0
  123. package/es2020/moment/src/index.js +3 -0
  124. package/es2020/moment/src/index.js.map +1 -0
  125. package/es2020/moment/src/misc/tokens.js +15 -0
  126. package/es2020/moment/src/misc/tokens.js.map +1 -0
  127. package/es2020/moment/src/services/momentDateApi.service.js +398 -0
  128. package/es2020/moment/src/services/momentDateApi.service.js.map +1 -0
  129. package/es2020/src/index.js +19 -0
  130. package/es2020/src/index.js.map +1 -0
  131. package/es2020/src/misc/constants.js +33 -0
  132. package/es2020/src/misc/constants.js.map +1 -0
  133. package/es2020/src/misc/datetime.interface.js +2 -0
  134. package/es2020/src/misc/datetime.interface.js.map +1 -0
  135. package/es2020/src/misc/tokens.js +19 -0
  136. package/es2020/src/misc/tokens.js.map +1 -0
  137. package/es2020/src/misc/validators.js +58 -0
  138. package/es2020/src/misc/validators.js.map +1 -0
  139. package/es2020/src/modules/datePipes.module.js +33 -0
  140. package/es2020/src/modules/datePipes.module.js.map +1 -0
  141. package/es2020/src/picker/components/dayPicker/dayPicker.component.js +172 -0
  142. package/es2020/src/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  143. package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js +2 -0
  144. package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  145. package/es2020/src/picker/components/monthPicker/monthPicker.component.js +114 -0
  146. package/es2020/src/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  147. package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js +2 -0
  148. package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  149. package/es2020/src/picker/components/picker/picker.component.animations.js +71 -0
  150. package/es2020/src/picker/components/picker/picker.component.animations.js.map +1 -0
  151. package/es2020/src/picker/components/picker/picker.component.js +236 -0
  152. package/es2020/src/picker/components/picker/picker.component.js.map +1 -0
  153. package/es2020/src/picker/components/pickerBase.component.js +243 -0
  154. package/es2020/src/picker/components/pickerBase.component.js.map +1 -0
  155. package/es2020/src/picker/components/yearPicker/yearPicker.component.js +126 -0
  156. package/es2020/src/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  157. package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js +2 -0
  158. package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  159. package/es2020/src/picker/interfaces.js +5 -0
  160. package/es2020/src/picker/interfaces.js.map +1 -0
  161. package/es2020/src/picker/misc/datetimePicker.interface.js +2 -0
  162. package/es2020/src/picker/misc/datetimePicker.interface.js.map +1 -0
  163. package/es2020/src/picker/misc/tokens.js +6 -0
  164. package/es2020/src/picker/misc/tokens.js.map +1 -0
  165. package/es2020/src/picker/modules/picker.module.js +46 -0
  166. package/es2020/src/picker/modules/picker.module.js.map +1 -0
  167. package/es2020/src/picker/types.js +8 -0
  168. package/es2020/src/picker/types.js.map +1 -0
  169. package/es2020/src/pipes/asRequiredType.js +22 -0
  170. package/es2020/src/pipes/asRequiredType.js.map +1 -0
  171. package/es2020/src/pipes/dateConvert.pipe.js +35 -0
  172. package/es2020/src/pipes/dateConvert.pipe.js.map +1 -0
  173. package/es2020/src/pipes/dateFormat.pipe.js +45 -0
  174. package/es2020/src/pipes/dateFormat.pipe.js.map +1 -0
  175. package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js +417 -0
  176. package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  177. package/es2020/src/selector/components/selector/selector.component.animations.js +15 -0
  178. package/es2020/src/selector/components/selector/selector.component.animations.js.map +1 -0
  179. package/es2020/src/selector/components/selector/selector.component.js +334 -0
  180. package/es2020/src/selector/components/selector/selector.component.js.map +1 -0
  181. package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +314 -0
  182. package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  183. package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +51 -0
  184. package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  185. package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +51 -0
  186. package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  187. package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +47 -0
  188. package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  189. package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +118 -0
  190. package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  191. package/es2020/src/selector/interfaces.js +2 -0
  192. package/es2020/src/selector/interfaces.js.map +1 -0
  193. package/es2020/src/selector/misc/datetimeSelector.interface.js +2 -0
  194. package/es2020/src/selector/misc/datetimeSelector.interface.js.map +1 -0
  195. package/es2020/src/selector/misc/tokens.js +6 -0
  196. package/es2020/src/selector/misc/tokens.js.map +1 -0
  197. package/es2020/src/selector/modules/basicSelector.module.js +20 -0
  198. package/es2020/src/selector/modules/basicSelector.module.js.map +1 -0
  199. package/es2020/src/selector/modules/selector.module.js +60 -0
  200. package/es2020/src/selector/modules/selector.module.js.map +1 -0
  201. package/es2020/src/selector/types.js +10 -0
  202. package/es2020/src/selector/types.js.map +1 -0
  203. package/es2020/src/services/dateApi.interface.js +2 -0
  204. package/es2020/src/services/dateApi.interface.js.map +1 -0
  205. package/es2020/src/services/datePositionParser.interface.js +2 -0
  206. package/es2020/src/services/datePositionParser.interface.js.map +1 -0
  207. package/es2020/src/services/datePositionParser.service.js +227 -0
  208. package/es2020/src/services/datePositionParser.service.js.map +1 -0
  209. package/es2020/src/services/dateTimeRelativeParser.service.js +65 -0
  210. package/es2020/src/services/dateTimeRelativeParser.service.js.map +1 -0
  211. package/es2020/src/services/dateValueProvider.service.js +58 -0
  212. package/es2020/src/services/dateValueProvider.service.js.map +1 -0
  213. package/es2020/src/services/formatProvider.interface.js +2 -0
  214. package/es2020/src/services/formatProvider.interface.js.map +1 -0
  215. package/es2020/src/services/index.js +4 -0
  216. package/es2020/src/services/index.js.map +1 -0
  217. package/karma.conf.d.ts +2 -0
  218. package/karma.conf.d.ts.map +1 -0
  219. package/moment/package.json +7 -7
  220. package/moment/src/index.d.ts +3 -0
  221. package/moment/src/index.d.ts.map +1 -0
  222. package/moment/src/misc/tokens.d.ts +5 -5
  223. package/moment/src/services/momentDateApi.service.d.ts +35 -32
  224. package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
  225. package/package.json +100 -48
  226. package/src/index.d.ts +19 -0
  227. package/src/index.d.ts.map +1 -0
  228. package/src/misc/constants.d.ts +32 -32
  229. package/src/misc/datetime.interface.d.ts +34 -34
  230. package/src/misc/tokens.d.ts +10 -10
  231. package/src/misc/validators.d.ts +25 -25
  232. package/src/modules/datePipes.module.d.ts +12 -5
  233. package/src/modules/datePipes.module.d.ts.map +1 -1
  234. package/src/picker/components/dayPicker/dayPicker.component.d.ts +68 -65
  235. package/src/picker/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  236. package/src/picker/components/dayPicker/dayPicker.component.html +7 -7
  237. package/src/picker/components/dayPicker/dayPicker.interfaces.d.ts +10 -10
  238. package/src/picker/components/monthPicker/monthPicker.component.d.ts +52 -49
  239. package/src/picker/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  240. package/src/picker/components/monthPicker/monthPicker.component.html +6 -6
  241. package/src/picker/components/monthPicker/monthPicker.interfaces.d.ts +6 -6
  242. package/src/picker/components/picker/picker.component.animations.d.ts +4 -4
  243. package/src/picker/components/picker/picker.component.d.ts +104 -101
  244. package/src/picker/components/picker/picker.component.d.ts.map +1 -1
  245. package/src/picker/components/pickerBase.component.d.ts +169 -166
  246. package/src/picker/components/pickerBase.component.d.ts.map +1 -1
  247. package/src/picker/components/yearPicker/yearPicker.component.d.ts +57 -54
  248. package/src/picker/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  249. package/src/picker/components/yearPicker/yearPicker.component.html +6 -6
  250. package/src/picker/components/yearPicker/yearPicker.interfaces.d.ts +6 -6
  251. package/src/picker/interfaces.d.ts +4 -4
  252. package/src/picker/misc/datetimePicker.interface.d.ts +188 -188
  253. package/src/picker/misc/tokens.d.ts +6 -6
  254. package/src/picker/modules/picker.module.d.ts +16 -5
  255. package/src/picker/modules/picker.module.d.ts.map +1 -1
  256. package/src/picker/types.d.ts +7 -7
  257. package/src/pipes/asRequiredType.d.ts +21 -0
  258. package/src/pipes/asRequiredType.d.ts.map +1 -0
  259. package/src/pipes/dateConvert.pipe.d.ts +18 -15
  260. package/src/pipes/dateConvert.pipe.d.ts.map +1 -1
  261. package/src/pipes/dateFormat.pipe.d.ts +20 -17
  262. package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
  263. package/src/selector/components/inputDateTime/inputDateTime.component.d.ts +187 -184
  264. package/src/selector/components/inputDateTime/inputDateTime.component.d.ts.map +1 -1
  265. package/src/selector/components/selector/selector.component.animations.d.ts +4 -4
  266. package/src/selector/components/selector/selector.component.d.ts +155 -152
  267. package/src/selector/components/selector/selector.component.d.ts.map +1 -1
  268. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts +170 -167
  269. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +1 -1
  270. package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts +22 -19
  271. package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts.map +1 -1
  272. package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts +22 -19
  273. package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts.map +1 -1
  274. package/src/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts +21 -18
  275. package/src/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts.map +1 -1
  276. package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts +53 -50
  277. package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts.map +1 -1
  278. package/src/selector/interfaces.d.ts +1 -1
  279. package/src/selector/misc/datetimeSelector.interface.d.ts +82 -82
  280. package/src/selector/misc/tokens.d.ts +6 -6
  281. package/src/selector/modules/basicSelector.module.d.ts +10 -5
  282. package/src/selector/modules/basicSelector.module.d.ts.map +1 -1
  283. package/src/selector/modules/selector.module.d.ts +18 -5
  284. package/src/selector/modules/selector.module.d.ts.map +1 -1
  285. package/src/selector/types.d.ts +9 -9
  286. package/src/services/dateApi.interface.d.ts +275 -275
  287. package/src/services/datePositionParser.interface.d.ts +40 -40
  288. package/src/services/datePositionParser.service.d.ts +60 -57
  289. package/src/services/datePositionParser.service.d.ts.map +1 -1
  290. package/src/services/dateTimeRelativeParser.service.d.ts +21 -18
  291. package/src/services/dateTimeRelativeParser.service.d.ts.map +1 -1
  292. package/src/services/dateValueProvider.service.d.ts +18 -15
  293. package/src/services/dateValueProvider.service.d.ts.map +1 -1
  294. package/src/services/formatProvider.interface.d.ts +17 -17
  295. package/src/services/index.d.ts +3 -3
  296. package/tsconfig.karma.json +5 -6
  297. package/version.bak +1 -1
  298. package/appveyor.yml +0 -70
  299. package/date-fns/dist/es2015/date-fns/index.js +0 -10
  300. package/date-fns/dist/es2015/date-fns/public_api.js +0 -7
  301. package/date-fns/dist/es2015/date-fns/src/date-fns.js +0 -9
  302. package/date-fns/dist/es2015/date-fns/src/misc/tokens.js +0 -32
  303. package/date-fns/dist/es2015/date-fns/src/services/dateFnsDateApi.service.js +0 -512
  304. package/date-fns/dist/es2015/date-fns/src/services/dateFnsLocale.service.js +0 -18
  305. package/date-fns/dist/es5/date-fns/index.js +0 -10
  306. package/date-fns/dist/es5/date-fns/public_api.js +0 -7
  307. package/date-fns/dist/es5/date-fns/src/date-fns.js +0 -9
  308. package/date-fns/dist/es5/date-fns/src/misc/tokens.js +0 -32
  309. package/date-fns/dist/es5/date-fns/src/services/dateFnsDateApi.service.js +0 -902
  310. package/date-fns/dist/es5/date-fns/src/services/dateFnsLocale.service.js +0 -18
  311. package/date-fns/index.d.ts +0 -5
  312. package/date-fns/index.d.ts.map +0 -1
  313. package/date-fns/index.metadata.json +0 -1
  314. package/date-fns/public_api.d.ts +0 -2
  315. package/date-fns/public_api.d.ts.map +0 -1
  316. package/date-fns/src/date-fns.d.ts.map +0 -1
  317. package/date-fns/src/services/dateFnsDateApi.service.ngfactory.d.ts.map +0 -1
  318. package/datetime.d.ts +0 -7
  319. package/datetime.d.ts.map +0 -1
  320. package/datetime.metadata.json +0 -1
  321. package/dist/es2015/datetime.js +0 -10
  322. package/dist/es2015/public_api.js +0 -7
  323. package/dist/es2015/src/datetime.js +0 -24
  324. package/dist/es2015/src/misc/constants.js +0 -46
  325. package/dist/es2015/src/misc/datetime.interface.js +0 -52
  326. package/dist/es2015/src/misc/tokens.js +0 -29
  327. package/dist/es2015/src/misc/validators.js +0 -80
  328. package/dist/es2015/src/modules/datePipes.module.js +0 -26
  329. package/dist/es2015/src/picker/components/dayPicker/dayPicker.component.js +0 -215
  330. package/dist/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js +0 -18
  331. package/dist/es2015/src/picker/components/monthPicker/monthPicker.component.js +0 -138
  332. package/dist/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js +0 -11
  333. package/dist/es2015/src/picker/components/picker/picker.component.animations.js +0 -77
  334. package/dist/es2015/src/picker/components/picker/picker.component.js +0 -386
  335. package/dist/es2015/src/picker/components/pickerBase.component.js +0 -406
  336. package/dist/es2015/src/picker/components/yearPicker/yearPicker.component.js +0 -158
  337. package/dist/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js +0 -11
  338. package/dist/es2015/src/picker/interfaces.js +0 -10
  339. package/dist/es2015/src/picker/misc/datetimePicker.interface.js +0 -245
  340. package/dist/es2015/src/picker/misc/tokens.js +0 -12
  341. package/dist/es2015/src/picker/modules/picker.module.js +0 -35
  342. package/dist/es2015/src/picker/types.js +0 -13
  343. package/dist/es2015/src/pipes/dateConvert.pipe.js +0 -50
  344. package/dist/es2015/src/pipes/dateFormat.pipe.js +0 -64
  345. package/dist/es2015/src/selector/components/inputDateTime/inputDateTime.component.js +0 -588
  346. package/dist/es2015/src/selector/components/selector/selector.component.animations.js +0 -21
  347. package/dist/es2015/src/selector/components/selector/selector.component.js +0 -514
  348. package/dist/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +0 -456
  349. package/dist/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -73
  350. package/dist/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -73
  351. package/dist/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -70
  352. package/dist/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -171
  353. package/dist/es2015/src/selector/interfaces.js +0 -7
  354. package/dist/es2015/src/selector/misc/datetimeSelector.interface.js +0 -106
  355. package/dist/es2015/src/selector/misc/tokens.js +0 -12
  356. package/dist/es2015/src/selector/modules/basicSelector.module.js +0 -20
  357. package/dist/es2015/src/selector/modules/selector.module.js +0 -45
  358. package/dist/es2015/src/selector/types.js +0 -15
  359. package/dist/es2015/src/services/dateApi.interface.js +0 -316
  360. package/dist/es2015/src/services/datePositionParser.interface.js +0 -56
  361. package/dist/es2015/src/services/datePositionParser.service.js +0 -297
  362. package/dist/es2015/src/services/dateTimeRelativeParser.service.js +0 -97
  363. package/dist/es2015/src/services/dateValueProvider.service.js +0 -79
  364. package/dist/es2015/src/services/formatProvider.interface.js +0 -28
  365. package/dist/es2015/src/services/index.js +0 -9
  366. package/dist/es5/datetime.js +0 -10
  367. package/dist/es5/public_api.js +0 -7
  368. package/dist/es5/src/datetime.js +0 -24
  369. package/dist/es5/src/misc/constants.js +0 -46
  370. package/dist/es5/src/misc/datetime.interface.js +0 -52
  371. package/dist/es5/src/misc/tokens.js +0 -29
  372. package/dist/es5/src/misc/validators.js +0 -124
  373. package/dist/es5/src/modules/datePipes.module.js +0 -30
  374. package/dist/es5/src/picker/components/dayPicker/dayPicker.component.js +0 -323
  375. package/dist/es5/src/picker/components/dayPicker/dayPicker.interfaces.js +0 -18
  376. package/dist/es5/src/picker/components/monthPicker/monthPicker.component.js +0 -233
  377. package/dist/es5/src/picker/components/monthPicker/monthPicker.interfaces.js +0 -11
  378. package/dist/es5/src/picker/components/picker/picker.component.animations.js +0 -77
  379. package/dist/es5/src/picker/components/picker/picker.component.js +0 -460
  380. package/dist/es5/src/picker/components/pickerBase.component.js +0 -561
  381. package/dist/es5/src/picker/components/yearPicker/yearPicker.component.js +0 -253
  382. package/dist/es5/src/picker/components/yearPicker/yearPicker.interfaces.js +0 -11
  383. package/dist/es5/src/picker/interfaces.js +0 -10
  384. package/dist/es5/src/picker/misc/datetimePicker.interface.js +0 -245
  385. package/dist/es5/src/picker/misc/tokens.js +0 -12
  386. package/dist/es5/src/picker/modules/picker.module.js +0 -39
  387. package/dist/es5/src/picker/types.js +0 -13
  388. package/dist/es5/src/pipes/dateConvert.pipe.js +0 -63
  389. package/dist/es5/src/pipes/dateFormat.pipe.js +0 -79
  390. package/dist/es5/src/selector/components/inputDateTime/inputDateTime.component.js +0 -808
  391. package/dist/es5/src/selector/components/selector/selector.component.animations.js +0 -21
  392. package/dist/es5/src/selector/components/selector/selector.component.js +0 -653
  393. package/dist/es5/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +0 -656
  394. package/dist/es5/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -84
  395. package/dist/es5/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -84
  396. package/dist/es5/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -82
  397. package/dist/es5/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -230
  398. package/dist/es5/src/selector/interfaces.js +0 -7
  399. package/dist/es5/src/selector/misc/datetimeSelector.interface.js +0 -106
  400. package/dist/es5/src/selector/misc/tokens.js +0 -12
  401. package/dist/es5/src/selector/modules/basicSelector.module.js +0 -24
  402. package/dist/es5/src/selector/modules/selector.module.js +0 -49
  403. package/dist/es5/src/selector/types.js +0 -15
  404. package/dist/es5/src/services/dateApi.interface.js +0 -316
  405. package/dist/es5/src/services/datePositionParser.interface.js +0 -56
  406. package/dist/es5/src/services/datePositionParser.service.js +0 -366
  407. package/dist/es5/src/services/dateTimeRelativeParser.service.js +0 -108
  408. package/dist/es5/src/services/dateValueProvider.service.js +0 -92
  409. package/dist/es5/src/services/formatProvider.interface.js +0 -28
  410. package/dist/es5/src/services/index.js +0 -9
  411. package/moment/dist/es2015/moment/index.js +0 -10
  412. package/moment/dist/es2015/moment/public_api.js +0 -7
  413. package/moment/dist/es2015/moment/src/misc/tokens.js +0 -26
  414. package/moment/dist/es2015/moment/src/moment.js +0 -8
  415. package/moment/dist/es2015/moment/src/services/momentDateApi.service.js +0 -466
  416. package/moment/dist/es5/moment/index.js +0 -10
  417. package/moment/dist/es5/moment/public_api.js +0 -7
  418. package/moment/dist/es5/moment/src/misc/tokens.js +0 -26
  419. package/moment/dist/es5/moment/src/moment.js +0 -8
  420. package/moment/dist/es5/moment/src/services/momentDateApi.service.js +0 -858
  421. package/moment/index.d.ts +0 -5
  422. package/moment/index.d.ts.map +0 -1
  423. package/moment/index.metadata.json +0 -1
  424. package/moment/public_api.d.ts +0 -2
  425. package/moment/public_api.d.ts.map +0 -1
  426. package/moment/src/moment.d.ts.map +0 -1
  427. package/moment/src/services/momentDateApi.service.ngfactory.d.ts.map +0 -1
  428. package/public_api.d.ts +0 -2
  429. package/public_api.d.ts.map +0 -1
  430. package/src/datetime.d.ts.map +0 -1
  431. package/src/modules/datePipes.module.ngfactory.d.ts.map +0 -1
  432. package/src/picker/components/dayPicker/dayPicker.component.css.shim.ngstyle.d.ts.map +0 -1
  433. package/src/picker/components/dayPicker/dayPicker.component.ngfactory.d.ts.map +0 -1
  434. package/src/picker/components/monthPicker/monthPicker.component.css.shim.ngstyle.d.ts.map +0 -1
  435. package/src/picker/components/monthPicker/monthPicker.component.ngfactory.d.ts.map +0 -1
  436. package/src/picker/components/picker/picker.component.ngfactory.d.ts.map +0 -1
  437. package/src/picker/components/yearPicker/yearPicker.component.css.shim.ngstyle.d.ts.map +0 -1
  438. package/src/picker/components/yearPicker/yearPicker.component.ngfactory.d.ts.map +0 -1
  439. package/src/picker/modules/picker.module.ngfactory.d.ts.map +0 -1
  440. package/src/pipes/dateConvert.pipe.ngfactory.d.ts.map +0 -1
  441. package/src/pipes/dateFormat.pipe.ngfactory.d.ts.map +0 -1
  442. package/src/selector/components/inputDateTime/inputDateTime.component.css.shim.ngstyle.d.ts.map +0 -1
  443. package/src/selector/components/inputDateTime/inputDateTime.component.ngfactory.d.ts.map +0 -1
  444. package/src/selector/components/selector/selector.component.css.shim.ngstyle.d.ts.map +0 -1
  445. package/src/selector/components/selector/selector.component.ngfactory.d.ts.map +0 -1
  446. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.css.shim.ngstyle.d.ts.map +0 -1
  447. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.ngfactory.d.ts.map +0 -1
  448. package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.ngfactory.d.ts.map +0 -1
  449. package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.ngfactory.d.ts.map +0 -1
  450. package/src/selector/directives/datetimeValidator/datetimeValidator.directive.ngfactory.d.ts.map +0 -1
  451. package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.ngfactory.d.ts.map +0 -1
  452. package/src/selector/modules/basicSelector.module.ngfactory.d.ts.map +0 -1
  453. package/src/selector/modules/selector.module.ngfactory.d.ts.map +0 -1
  454. package/src/services/datePositionParser.service.ngfactory.d.ts.map +0 -1
  455. package/src/services/dateTimeRelativeParser.service.ngfactory.d.ts.map +0 -1
  456. package/src/services/dateValueProvider.service.ngfactory.d.ts.map +0 -1
@@ -0,0 +1,421 @@
1
+ import { Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef, ElementRef, ViewChild } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import { DATE_API } from '../../../misc/tokens';
4
+ import { DatePositionParserService } from '../../../services/datePositionParser.service';
5
+ import { DateValueProvider } from '../../../services/dateValueProvider.service';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "../../../services/datePositionParser.service";
8
+ import * as i2 from "../../../services/dateValueProvider.service";
9
+ /**
10
+ * Component used as datetime selector with input
11
+ */
12
+ export class InputDateTimeSelectorComponent {
13
+ //######################### constructor #########################
14
+ constructor(_dateApi, _parserSvc, _valueProvider, _changeDetector) {
15
+ this._dateApi = _dateApi;
16
+ this._parserSvc = _parserSvc;
17
+ this._valueProvider = _valueProvider;
18
+ this._changeDetector = _changeDetector;
19
+ //######################### protected fields #########################
20
+ /**
21
+ * Occurs when value changes
22
+ */
23
+ this._valueChange = new Subject();
24
+ /**
25
+ * Occurs when selector is touched by user
26
+ */
27
+ this._touched = new Subject();
28
+ /**
29
+ * Occurs when selector requires picker to be displayed or hidden
30
+ */
31
+ this._pickerRequest = new Subject();
32
+ /**
33
+ * Instance of parser created for specific format
34
+ */
35
+ this._parser = null;
36
+ /**
37
+ * Currently used format for displaying data
38
+ */
39
+ this._format = '';
40
+ /**
41
+ * Current value representation as date api wrapper
42
+ */
43
+ this._dateApiValue = null;
44
+ /**
45
+ * Indication whether is current value valid value
46
+ */
47
+ this._isValid = true;
48
+ /**
49
+ * Minimal possible value that can be picked
50
+ */
51
+ this._minValue = null;
52
+ /**
53
+ * Maximal possible value that can be picked
54
+ */
55
+ this._maxValue = null;
56
+ //######################### public properties - template bindings #########################
57
+ /**
58
+ * Indication whether is input disabled
59
+ * @internal
60
+ */
61
+ this.disabled = false;
62
+ }
63
+ //######################### public properties - implementation of DateTimeSelector #########################
64
+ /**
65
+ * Gets or sets currently used format for displaying data
66
+ */
67
+ get format() {
68
+ return this._format;
69
+ }
70
+ set format(value) {
71
+ //only if format changes
72
+ if (this._format != value) {
73
+ this._parser = this._parserSvc.createParser(this._dateApi.getFormat(value));
74
+ }
75
+ this._format = value;
76
+ }
77
+ /**
78
+ * Gets current value of datetime
79
+ */
80
+ get value() {
81
+ if (!this._dateApiValue || !this._isValid) {
82
+ return null;
83
+ }
84
+ return this._valueProvider.getValue(this._dateApiValue.value, this._format);
85
+ }
86
+ /**
87
+ * Gets formatted value
88
+ */
89
+ get formattedValue() {
90
+ if (!this._isValid) {
91
+ return null;
92
+ }
93
+ return this.currentValue;
94
+ }
95
+ /**
96
+ * Gets indication whether is current value valid
97
+ */
98
+ get valid() {
99
+ return this._isValid;
100
+ }
101
+ /**
102
+ * Occurs when value changes
103
+ */
104
+ get valueChange() {
105
+ return this._valueChange.asObservable();
106
+ }
107
+ /**
108
+ * Occurs when selector is touched by user
109
+ */
110
+ get touched() {
111
+ return this._touched.asObservable();
112
+ }
113
+ /**
114
+ * Occurs when selector requires picker to be displayed
115
+ */
116
+ get pickerRequest() {
117
+ return this._pickerRequest.asObservable();
118
+ }
119
+ //######################### protected properties #########################
120
+ /**
121
+ * Gets or sets string representation current of value
122
+ */
123
+ get currentValue() {
124
+ return this.input.value || null;
125
+ }
126
+ set currentValue(value) {
127
+ if (this.input) {
128
+ this.input.value = value !== null && value !== void 0 ? value : '';
129
+ }
130
+ }
131
+ /**
132
+ * Gets input element used for handling date time value
133
+ */
134
+ get input() {
135
+ return this.inputElement.nativeElement;
136
+ }
137
+ //######################### public methods - implementation of DateTimeSelector #########################
138
+ /**
139
+ * Sets minimal possible value for picker, that can be picked
140
+ * @param value - Minimal possible value that can be picked
141
+ */
142
+ setMinValue(value) {
143
+ this._minValue = value;
144
+ }
145
+ /**
146
+ * Sets maximal possible value for picker, that can be picked
147
+ * @param value - Maximal possible value that can be picked
148
+ */
149
+ setMaxValue(value) {
150
+ this._maxValue = value;
151
+ }
152
+ /**
153
+ * Sets value of datetime selector
154
+ * @param value - Value to be set to this selector
155
+ */
156
+ setValue(value) {
157
+ if (value === null || value === void 0 ? void 0 : value.from) {
158
+ this._dateApiValue = this._dateApi.getValue(value === null || value === void 0 ? void 0 : value.from, this._format);
159
+ this._isValid = this._dateApiValue.isValid();
160
+ this._show();
161
+ }
162
+ else {
163
+ this._clearValue();
164
+ }
165
+ }
166
+ /**
167
+ * Sets as 'control' disabled
168
+ * @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true
169
+ */
170
+ setDisabled(disabled = true) {
171
+ this.disabled = disabled;
172
+ }
173
+ /**
174
+ * Explicitly runs invalidation of content (change detection)
175
+ */
176
+ invalidateVisuals() {
177
+ this._changeDetector.detectChanges();
178
+ }
179
+ //######################### public methods - template bindings #########################
180
+ /**
181
+ * Handles gaining of focus
182
+ * @internal
183
+ */
184
+ handleFocus() {
185
+ this._pickerRequest.next(true);
186
+ //no value
187
+ if (!this._dateApiValue) {
188
+ this._dateApiValue = this._dateApi.now();
189
+ this._isValid = this._dateApiValue.isValid();
190
+ if (this._minMaxConstraintTest()) {
191
+ this._clearValue();
192
+ }
193
+ else {
194
+ this._valueChange.next();
195
+ }
196
+ }
197
+ if (!this._isValid) {
198
+ return;
199
+ }
200
+ this._show();
201
+ const result = this._parser.parse(this.currentValue, this.input.selectionStart);
202
+ this.input.selectionStart = result.positionFrom;
203
+ this.input.selectionEnd = result.positionTo;
204
+ }
205
+ /**
206
+ * Handles blur on input
207
+ * @internal
208
+ */
209
+ handleBlur() {
210
+ this._pickerRequest.next(false);
211
+ }
212
+ /**
213
+ * Handles user input
214
+ * @internal
215
+ */
216
+ handleInput() {
217
+ //empty value
218
+ if (!this.currentValue) {
219
+ this._clearValue();
220
+ this._valueChange.next();
221
+ return;
222
+ }
223
+ this._dateApiValue = this._dateApi.getValue(this.currentValue, this._format);
224
+ this._isValid = this._dateApiValue.isValid();
225
+ this._valueChange.next();
226
+ }
227
+ /**
228
+ * Handles selection of text inside of input
229
+ * @internal
230
+ */
231
+ handleSelect() {
232
+ //handles when all text is selected
233
+ if (this.currentValue && this.input.selectionStart == 0 && this.input.selectionEnd == this.input.value.length) {
234
+ const result = this._parser.parse(this.input.value, this.input.selectionStart);
235
+ this.input.selectionStart = result.positionFrom;
236
+ this.input.selectionEnd = result.positionTo;
237
+ }
238
+ }
239
+ /**
240
+ * Handles click event inside of input
241
+ * @internal
242
+ */
243
+ handleClick() {
244
+ this._pickerRequest.next(true);
245
+ if (!this._dateApiValue) {
246
+ return;
247
+ }
248
+ const result = this._parser.parse(this.input.value, this.input.selectionStart);
249
+ this.input.selectionStart = result.positionFrom;
250
+ this.input.selectionEnd = result.positionTo;
251
+ }
252
+ /**
253
+ * Handles keyboard events
254
+ * @param event - Keyboard event that occured
255
+ * @param input - Html input element that holds current value and selection
256
+ * @internal
257
+ */
258
+ handleKeyboard(event) {
259
+ var _a;
260
+ if (!((_a = this._dateApiValue) === null || _a === void 0 ? void 0 : _a.isValid())) {
261
+ return;
262
+ }
263
+ switch (event.key) {
264
+ case 'ArrowRight':
265
+ case 'ArrowLeft':
266
+ {
267
+ event.preventDefault();
268
+ event.stopPropagation();
269
+ const result = event.key == 'ArrowLeft' ? this._parser.previous(this.input.value, this.input.selectionStart) : this._parser.next(this.input.value, this.input.selectionStart);
270
+ if (result) {
271
+ this.input.selectionStart = result.positionFrom;
272
+ this.input.selectionEnd = result.positionTo;
273
+ }
274
+ break;
275
+ }
276
+ case 'ArrowUp':
277
+ case 'ArrowDown':
278
+ {
279
+ event.preventDefault();
280
+ event.stopPropagation();
281
+ let result = this._parser.parse(this.input.value, this.input.selectionStart);
282
+ const selectionStart = result.positionFrom;
283
+ this._stepChangeValue(result.part, event.key == 'ArrowUp');
284
+ this._show();
285
+ result = this._parser.parse(this.input.value, selectionStart);
286
+ this.input.selectionStart = result.positionFrom;
287
+ this.input.selectionEnd = result.positionTo;
288
+ break;
289
+ }
290
+ case 'Tab':
291
+ {
292
+ const result = event.shiftKey ? this._parser.previous(this.input.value, this.input.selectionStart) : this._parser.next(this.input.value, this.input.selectionStart);
293
+ if (result) {
294
+ event.preventDefault();
295
+ event.stopPropagation();
296
+ this.input.selectionStart = result.positionFrom;
297
+ this.input.selectionEnd = result.positionTo;
298
+ }
299
+ break;
300
+ }
301
+ case 'a':
302
+ {
303
+ if (event.ctrlKey) {
304
+ event.preventDefault();
305
+ event.stopPropagation();
306
+ }
307
+ break;
308
+ }
309
+ case 'Backspace':
310
+ {
311
+ this._clearValue();
312
+ this._valueChange.next();
313
+ break;
314
+ }
315
+ case 'Escape':
316
+ {
317
+ this._pickerRequest.next(false);
318
+ break;
319
+ }
320
+ case ' ':
321
+ {
322
+ if (event.ctrlKey) {
323
+ this._pickerRequest.next(true);
324
+ }
325
+ break;
326
+ }
327
+ }
328
+ }
329
+ //######################### protected methods #########################
330
+ /**
331
+ * Shows current value in input
332
+ */
333
+ _show() {
334
+ var _a, _b;
335
+ if (this._isValid) {
336
+ this.currentValue = (_b = (_a = this._dateApiValue) === null || _a === void 0 ? void 0 : _a.format(this._format)) !== null && _b !== void 0 ? _b : null;
337
+ }
338
+ }
339
+ /**
340
+ * Tests whether are min or max constraint broken, returns true if constraint is broken
341
+ */
342
+ _minMaxConstraintTest() {
343
+ return (!!this._minValue && this._dateApiValue.isBefore(this._minValue)) ||
344
+ (!!this._maxValue && this._dateApiValue.isAfter(this._maxValue));
345
+ }
346
+ /**
347
+ * Runs code with check whether min max constrains was broken
348
+ * @param code - Code that should be executed which can change current value
349
+ */
350
+ _withMinMaxConstraint(code) {
351
+ var _a;
352
+ this._dateApiValue.updateOriginal();
353
+ code();
354
+ //min value constraint failure
355
+ if (this._minMaxConstraintTest()) {
356
+ (_a = this._dateApiValue) === null || _a === void 0 ? void 0 : _a.resetOriginal();
357
+ return;
358
+ }
359
+ this._valueChange.next();
360
+ }
361
+ /**
362
+ * Clears current value
363
+ */
364
+ _clearValue() {
365
+ this._dateApiValue = null;
366
+ this._isValid = true;
367
+ this.currentValue = null;
368
+ }
369
+ /**
370
+ * Changes current value of date for for specified part by single step
371
+ * @param part - Part of date that should be changed
372
+ * @param increment - Indication whether value should be incremented or decremented
373
+ */
374
+ _stepChangeValue(part, increment) {
375
+ var _a;
376
+ if (!((_a = this._dateApiValue) === null || _a === void 0 ? void 0 : _a.isValid())) {
377
+ return;
378
+ }
379
+ switch (part) {
380
+ case 'y':
381
+ case 'Y':
382
+ {
383
+ this._withMinMaxConstraint(() => increment ? this._dateApiValue.addYears(1) : this._dateApiValue.subtractYears(1));
384
+ break;
385
+ }
386
+ case 'Q':
387
+ {
388
+ break;
389
+ }
390
+ case 'M':
391
+ {
392
+ this._withMinMaxConstraint(() => increment ? this._dateApiValue.addMonths(1) : this._dateApiValue.subtractMonths(1));
393
+ break;
394
+ }
395
+ case 'w':
396
+ {
397
+ this._withMinMaxConstraint(() => increment ? this._dateApiValue.addWeeks(1) : this._dateApiValue.subtractWeeks(1));
398
+ break;
399
+ }
400
+ case 'd':
401
+ case 'D':
402
+ {
403
+ this._withMinMaxConstraint(() => increment ? this._dateApiValue.addDays(1) : this._dateApiValue.subtractDays(1));
404
+ break;
405
+ }
406
+ }
407
+ }
408
+ }
409
+ InputDateTimeSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: InputDateTimeSelectorComponent, deps: [{ token: DATE_API }, { token: i1.DatePositionParserService }, { token: i2.DateValueProvider }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
410
+ InputDateTimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: InputDateTimeSelectorComponent, selector: "input-date-time-selector", viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (select)=\"handleSelect()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\">", styles: [":host\r\n{\r\n display: block;\r\n}\r\n\r\ninput\r\n{\r\n width: 100%;\r\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: InputDateTimeSelectorComponent, decorators: [{
412
+ type: Component,
413
+ args: [{ selector: 'input-date-time-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (select)=\"handleSelect()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\">", styles: [":host\r\n{\r\n display: block;\r\n}\r\n\r\ninput\r\n{\r\n width: 100%;\r\n}"] }]
414
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
415
+ type: Inject,
416
+ args: [DATE_API]
417
+ }] }, { type: i1.DatePositionParserService }, { type: i2.DateValueProvider }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { inputElement: [{
418
+ type: ViewChild,
419
+ args: ['input', { static: true }]
420
+ }] } });
421
+ //# sourceMappingURL=inputDateTime.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputDateTime.component.js","sourceRoot":"","sources":["../../../../../src/selector/components/inputDateTime/inputDateTime.component.ts","../../../../../src/selector/components/inputDateTime/inputDateTime.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACnH,OAAO,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAGzC,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAC,yBAAyB,EAAC,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAC,iBAAiB,EAAC,MAAM,6CAA6C,CAAC;;;;AAG9E;;GAEG;A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,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;oBAErH,MAAM;iBACT;YACD,KAAK,GAAG,CAAC;YACT,KAAK,GAAG;gBACR;oBACI,IAAI,CAAC,qBAAqB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,aAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;oBAEnH,MAAM;iBACT;SACJ;IACL,CAAC;;2HA3hBQ,8BAA8B,kBA+KnB,QAAQ;+GA/KnB,8BAA8B,qLCpB3C,2VASmC;2FDWtB,8BAA8B;kBAP1C,SAAS;+BAEI,0BAA0B,mBAGnB,uBAAuB,CAAC,MAAM;;0BAiLlC,MAAM;2BAAC,QAAQ;oJA5BrB,YAAY;sBADlB,SAAS;uBAAC,OAAO,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef, ElementRef, ViewChild} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DateTimeValue} from '../../../misc/datetime.interface';\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateApi, DateApiObject, DatePositionParser} from '../../../services';\nimport {DatePositionParserService} from '../../../services/datePositionParser.service';\nimport {DateValueProvider} from '../../../services/dateValueProvider.service';\nimport {DateTimeSelector} from '../../misc/datetimeSelector.interface';\n\n/**\n * Component used as datetime selector with input\n */\n@Component(\n{\n selector: 'input-date-time-selector',\n templateUrl: 'inputDateTime.component.html',\n styleUrls: ['inputDateTime.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class InputDateTimeSelectorComponent<TDate = any> implements DateTimeSelector<TDate>\n{\n //######################### protected fields #########################\n\n /**\n * Occurs when value changes\n */\n protected _valueChange: Subject<void> = new Subject<void>();\n\n /**\n * Occurs when selector is touched by user\n */\n protected _touched: Subject<void> = new Subject<void>();\n\n /**\n * Occurs when selector requires picker to be displayed or hidden\n */\n protected _pickerRequest: Subject<boolean> = new Subject<boolean>();\n\n /**\n * Instance of parser created for specific format\n */\n protected _parser: DatePositionParser|null = null;\n\n /**\n * Currently used format for displaying data\n */\n protected _format: string = '';\n\n /**\n * Current value representation as date api wrapper\n */\n protected _dateApiValue: null|DateApiObject<TDate> = null;\n\n /**\n * Indication whether is current value valid value\n */\n protected _isValid: boolean = true;\n\n /**\n * Minimal possible value that can be picked\n */\n protected _minValue: TDate|null = null;\n\n /**\n * Maximal possible value that can be picked\n */\n protected _maxValue: TDate|null = null;\n\n //######################### public properties - implementation of DateTimeSelector #########################\n\n /**\n * Gets or sets currently used format for displaying data\n */\n public get format(): string\n {\n return this._format;\n }\n public set format(value: string)\n {\n //only if format changes\n if(this._format != value)\n {\n this._parser = this._parserSvc.createParser(this._dateApi.getFormat(value));\n }\n\n this._format = value;\n }\n\n /**\n * Gets or sets placeholder that is displayed when there is no value selected\n */\n public placeholder: string|undefined;\n\n /**\n * Gets current value of datetime\n */\n public get value(): DateTimeValue<TDate>|null\n {\n if(!this._dateApiValue || !this._isValid)\n {\n return null;\n }\n\n return this._valueProvider.getValue(this._dateApiValue.value, this._format);\n }\n\n /**\n * Gets formatted value\n */\n public get formattedValue(): string|null\n {\n if(!this._isValid)\n {\n return null;\n }\n\n return this.currentValue;\n }\n\n /**\n * Gets indication whether is current value valid\n */\n public get valid(): boolean\n {\n return this._isValid;\n }\n\n /**\n * Occurs when value changes\n */\n public get valueChange(): Observable<void>\n {\n return this._valueChange.asObservable();\n }\n\n /**\n * Occurs when selector is touched by user\n */\n public get touched(): Observable<void>\n {\n return this._touched.asObservable();\n }\n\n /**\n * Occurs when selector requires picker to be displayed\n */\n public get pickerRequest(): Observable<boolean>\n {\n return this._pickerRequest.asObservable();\n }\n\n //######################### public properties - template bindings #########################\n\n /**\n * Indication whether is input disabled\n * @internal\n */\n public disabled: boolean = false;\n\n //######################### public properties - children #########################\n\n /**\n * Instance of html input element\n * @internal\n */\n @ViewChild('input', {static: true})\n public inputElement?: ElementRef<HTMLInputElement>;\n\n //######################### protected properties #########################\n\n /**\n * Gets or sets string representation current of value\n */\n protected get currentValue(): string|null\n {\n return this.input.value || null;\n }\n protected set currentValue(value: string|null)\n {\n if(this.input)\n {\n this.input.value = value ?? '';\n }\n }\n\n /**\n * Gets input element used for handling date time value\n */\n protected get input(): HTMLInputElement\n {\n return this.inputElement!.nativeElement;\n }\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n protected _parserSvc: DatePositionParserService,\n protected _valueProvider: DateValueProvider<TDate>,\n protected _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of DateTimeSelector #########################\n\n /**\n * Sets minimal possible value for picker, that can be picked\n * @param value - Minimal possible value that can be picked\n */\n public setMinValue(value: TDate|null): void\n {\n this._minValue = value;\n }\n\n /**\n * Sets maximal possible value for picker, that can be picked\n * @param value - Maximal possible value that can be picked\n */\n public setMaxValue(value: TDate|null): void\n {\n this._maxValue = value;\n }\n\n /**\n * Sets value of datetime selector\n * @param value - Value to be set to this selector\n */\n public setValue(value: DateTimeValue<TDate>|null): void\n {\n if(value?.from)\n {\n this._dateApiValue = this._dateApi.getValue(value?.from, this._format);\n this._isValid = this._dateApiValue.isValid();\n \n this._show();\n }\n else\n {\n this._clearValue();\n }\n }\n\n /**\n * Sets as 'control' disabled\n * @param disabled - Indication whether sets value as disabled, if omitted it is same as disabled set to true\n */\n public setDisabled(disabled: boolean = true): void\n {\n this.disabled = disabled;\n }\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n public invalidateVisuals(): void\n {\n this._changeDetector.detectChanges();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Handles gaining of focus\n * @internal\n */\n public handleFocus()\n {\n this._pickerRequest.next(true);\n\n //no value\n if(!this._dateApiValue)\n {\n this._dateApiValue = this._dateApi.now();\n this._isValid = this._dateApiValue.isValid();\n\n if(this._minMaxConstraintTest())\n {\n this._clearValue();\n }\n else\n {\n this._valueChange.next();\n }\n }\n\n if(!this._isValid)\n {\n return;\n }\n\n this._show();\n\n const result = this._parser!.parse(this.currentValue!, this.input.selectionStart!);\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n\n /**\n * Handles blur on input\n * @internal\n */\n public handleBlur()\n {\n this._pickerRequest.next(false);\n }\n\n /**\n * Handles user input\n * @internal\n */\n public handleInput()\n {\n //empty value\n if(!this.currentValue)\n {\n this._clearValue();\n this._valueChange.next();\n\n return;\n }\n\n this._dateApiValue = this._dateApi.getValue(this.currentValue, this._format);\n this._isValid = this._dateApiValue.isValid();\n this._valueChange.next();\n }\n\n /**\n * Handles selection of text inside of input\n * @internal\n */\n public handleSelect()\n {\n //handles when all text is selected\n if(this.currentValue && this.input.selectionStart == 0 && this.input.selectionEnd == this.input.value.length)\n {\n const result = this._parser!.parse(this.input.value, this.input.selectionStart!);\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n }\n\n /**\n * Handles click event inside of input\n * @internal\n */\n public handleClick()\n {\n this._pickerRequest.next(true);\n\n if(!this._dateApiValue)\n {\n return;\n }\n\n const result = this._parser!.parse(this.input.value, this.input.selectionStart!);\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n\n /**\n * Handles keyboard events\n * @param event - Keyboard event that occured\n * @param input - Html input element that holds current value and selection\n * @internal\n */\n public handleKeyboard(event: KeyboardEvent)\n {\n if(!this._dateApiValue?.isValid())\n {\n return;\n }\n\n switch(event.key)\n {\n case 'ArrowRight':\n case 'ArrowLeft':\n {\n event.preventDefault();\n event.stopPropagation();\n\n const result = event.key == 'ArrowLeft' ? this._parser!.previous(this.input.value, this.input.selectionStart!) : this._parser!.next(this.input.value, this.input.selectionStart!);\n\n if(result)\n {\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n\n break;\n }\n case 'ArrowUp':\n case 'ArrowDown':\n {\n event.preventDefault();\n event.stopPropagation();\n\n let result = this._parser!.parse(this.input.value, this.input.selectionStart!);\n const selectionStart = result.positionFrom;\n\n this._stepChangeValue(result.part, event.key == 'ArrowUp');\n this._show();\n\n result = this._parser!.parse(this.input.value, selectionStart);\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n\n break;\n }\n case 'Tab':\n {\n const result = event.shiftKey ? this._parser!.previous(this.input.value, this.input.selectionStart!) : this._parser!.next(this.input.value, this.input.selectionStart!);\n\n if(result)\n {\n event.preventDefault();\n event.stopPropagation();\n\n this.input.selectionStart = result.positionFrom;\n this.input.selectionEnd = result.positionTo;\n }\n\n break;\n }\n case 'a':\n {\n if(event.ctrlKey)\n {\n event.preventDefault();\n event.stopPropagation();\n }\n\n break;\n }\n case 'Backspace':\n {\n this._clearValue();\n this._valueChange.next();\n\n break;\n }\n case 'Escape':\n {\n this._pickerRequest.next(false);\n\n break;\n }\n case ' ':\n {\n if(event.ctrlKey)\n {\n this._pickerRequest.next(true);\n }\n\n break;\n }\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows current value in input\n */\n protected _show()\n {\n if(this._isValid)\n {\n this.currentValue = this._dateApiValue?.format(this._format) ?? null;\n }\n }\n\n /**\n * Tests whether are min or max constraint broken, returns true if constraint is broken\n */\n protected _minMaxConstraintTest(): boolean\n {\n return (!!this._minValue && this._dateApiValue!.isBefore(this._minValue)) ||\n (!!this._maxValue && this._dateApiValue!.isAfter(this._maxValue));\n }\n\n /**\n * Runs code with check whether min max constrains was broken\n * @param code - Code that should be executed which can change current value\n */\n protected _withMinMaxConstraint(code: () => void): void\n {\n this._dateApiValue!.updateOriginal();\n\n code();\n\n //min value constraint failure\n if(this._minMaxConstraintTest())\n {\n this._dateApiValue?.resetOriginal();\n\n return;\n }\n\n this._valueChange.next();\n }\n\n /**\n * Clears current value\n */\n protected _clearValue()\n {\n this._dateApiValue = null;\n this._isValid = true;\n this.currentValue = null;\n }\n\n /**\n * Changes current value of date for for specified part by single step\n * @param part - Part of date that should be changed\n * @param increment - Indication whether value should be incremented or decremented\n */\n protected _stepChangeValue(part: string, increment: boolean)\n {\n if(!this._dateApiValue?.isValid())\n {\n return;\n }\n\n switch(part)\n {\n case 'y':\n case 'Y':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addYears(1) : this._dateApiValue!.subtractYears(1));\n\n break;\n }\n case 'Q':\n {\n break;\n }\n case 'M':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addMonths(1) : this._dateApiValue!.subtractMonths(1));\n\n break;\n }\n case 'w':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addWeeks(1) : this._dateApiValue!.subtractWeeks(1));\n\n break;\n }\n case 'd':\n case 'D':\n {\n this._withMinMaxConstraint(() => increment ? this._dateApiValue!.addDays(1) : this._dateApiValue!.subtractDays(1));\n\n break;\n }\n }\n }\n}","<input type=\"text\"\r\n #input\r\n (focus)=\"handleFocus()\"\r\n (blur)=\"handleBlur()\"\r\n (input)=\"handleInput()\"\r\n (click)=\"handleClick()\"\r\n (select)=\"handleSelect()\"\r\n (keydown)=\"handleKeyboard($any($event))\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\">"]}
@@ -0,0 +1,15 @@
1
+ import { animateChild, transition, trigger } from '@angular/animations';
2
+ /**
3
+ * Animation trigger for animating children on enter leave
4
+ */
5
+ export const enterLeaveAnimateChildTrigger = trigger('enterLeaveAnimateChild', [
6
+ transition(':enter', [
7
+ animateChild()
8
+ // query(':enter', animateChild())
9
+ ]),
10
+ transition(':leave', [
11
+ animateChild()
12
+ // query(':leave', animateChild())
13
+ ])
14
+ ]);
15
+ //# sourceMappingURL=selector.component.animations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selector.component.animations.js","sourceRoot":"","sources":["../../../../../src/selector/components/selector/selector.component.animations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,OAAO,CAAC,wBAAwB,EAC7E;IACI,UAAU,CAAC,QAAQ,EACnB;QACI,YAAY,EAAE;QACd,kCAAkC;KACrC,CAAC;IACF,UAAU,CAAC,QAAQ,EACnB;QACI,YAAY,EAAE;QACd,kCAAkC;KACrC,CAAC;CACL,CAAC,CAAC","sourcesContent":["import {animateChild, transition, trigger} from '@angular/animations';\n\n/**\n * Animation trigger for animating children on enter leave\n */\nexport const enterLeaveAnimateChildTrigger = trigger('enterLeaveAnimateChild',\n[\n transition(':enter', \n [\n animateChild()\n // query(':enter', animateChild())\n ]),\n transition(':leave', \n [\n animateChild()\n // query(':leave', animateChild())\n ])\n]);"]}