@anglr/datetime 2.0.0-beta.20220221103100 → 2.0.0-beta.20220221120606

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 (463) hide show
  1. package/changelog.md +12 -0
  2. package/date-fns/datetime-date-fns.d.ts +64 -0
  3. package/date-fns/datetime-date-fns.internal.d.ts +64 -0
  4. package/date-fns/package.json +7 -7
  5. package/date-fns/src/{date-fns.d.ts → index.d.ts} +4 -4
  6. package/date-fns/src/index.d.ts.map +1 -0
  7. package/date-fns/src/misc/tokens.d.ts +10 -10
  8. package/date-fns/src/services/dateFnsDateApi.service.d.ts +36 -33
  9. package/date-fns/src/services/dateFnsDateApi.service.d.ts.map +1 -1
  10. package/date-fns/src/services/dateFnsLocale.service.d.ts +10 -10
  11. package/date-fns/temp/datetime-date-fns.api.md +47 -0
  12. package/datetime.d.ts +1913 -5
  13. package/datetime.internal.d.ts +2090 -0
  14. package/es2015/date-fns/src/index.js +4 -0
  15. package/es2015/date-fns/src/index.js.map +1 -0
  16. package/es2015/date-fns/src/misc/tokens.js +20 -0
  17. package/es2015/date-fns/src/misc/tokens.js.map +1 -0
  18. package/es2015/date-fns/src/services/dateFnsDateApi.service.js +438 -0
  19. package/es2015/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
  20. package/es2015/date-fns/src/services/dateFnsLocale.service.js +2 -0
  21. package/es2015/date-fns/src/services/dateFnsLocale.service.js.map +1 -0
  22. package/es2015/karma.conf.js +57 -0
  23. package/es2015/karma.conf.js.map +1 -0
  24. package/{moment/src/moment.d.ts → es2015/moment/src/index.js} +3 -3
  25. package/es2015/moment/src/index.js.map +1 -0
  26. package/es2015/moment/src/misc/tokens.js +15 -0
  27. package/es2015/moment/src/misc/tokens.js.map +1 -0
  28. package/es2015/moment/src/services/momentDateApi.service.js +398 -0
  29. package/es2015/moment/src/services/momentDateApi.service.js.map +1 -0
  30. package/{src/datetime.d.ts → es2015/src/index.js} +19 -19
  31. package/es2015/src/index.js.map +1 -0
  32. package/es2015/src/misc/constants.js +33 -0
  33. package/es2015/src/misc/constants.js.map +1 -0
  34. package/es2015/src/misc/datetime.interface.js +2 -0
  35. package/es2015/src/misc/datetime.interface.js.map +1 -0
  36. package/es2015/src/misc/tokens.js +19 -0
  37. package/es2015/src/misc/tokens.js.map +1 -0
  38. package/es2015/src/misc/validators.js +58 -0
  39. package/es2015/src/misc/validators.js.map +1 -0
  40. package/es2015/src/modules/datePipes.module.js +33 -0
  41. package/es2015/src/modules/datePipes.module.js.map +1 -0
  42. package/es2015/src/picker/components/dayPicker/dayPicker.component.js +172 -0
  43. package/es2015/src/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  44. package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js +2 -0
  45. package/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  46. package/es2015/src/picker/components/monthPicker/monthPicker.component.js +114 -0
  47. package/es2015/src/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  48. package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js +2 -0
  49. package/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  50. package/es2015/src/picker/components/picker/picker.component.animations.js +71 -0
  51. package/es2015/src/picker/components/picker/picker.component.animations.js.map +1 -0
  52. package/es2015/src/picker/components/picker/picker.component.js +241 -0
  53. package/es2015/src/picker/components/picker/picker.component.js.map +1 -0
  54. package/es2015/src/picker/components/pickerBase.component.js +243 -0
  55. package/es2015/src/picker/components/pickerBase.component.js.map +1 -0
  56. package/es2015/src/picker/components/yearPicker/yearPicker.component.js +126 -0
  57. package/es2015/src/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  58. package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js +2 -0
  59. package/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  60. package/es2015/src/picker/interfaces.js +5 -0
  61. package/es2015/src/picker/interfaces.js.map +1 -0
  62. package/es2015/src/picker/misc/datetimePicker.interface.js +2 -0
  63. package/es2015/src/picker/misc/datetimePicker.interface.js.map +1 -0
  64. package/es2015/src/picker/misc/tokens.js +6 -0
  65. package/es2015/src/picker/misc/tokens.js.map +1 -0
  66. package/es2015/src/picker/modules/picker.module.js +46 -0
  67. package/es2015/src/picker/modules/picker.module.js.map +1 -0
  68. package/es2015/src/picker/types.js +8 -0
  69. package/es2015/src/picker/types.js.map +1 -0
  70. package/es2015/src/pipes/asRequiredType.js +22 -0
  71. package/es2015/src/pipes/asRequiredType.js.map +1 -0
  72. package/es2015/src/pipes/dateConvert.pipe.js +35 -0
  73. package/es2015/src/pipes/dateConvert.pipe.js.map +1 -0
  74. package/es2015/src/pipes/dateFormat.pipe.js +45 -0
  75. package/es2015/src/pipes/dateFormat.pipe.js.map +1 -0
  76. package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js +421 -0
  77. package/es2015/src/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  78. package/es2015/src/selector/components/selector/selector.component.animations.js +15 -0
  79. package/es2015/src/selector/components/selector/selector.component.animations.js.map +1 -0
  80. package/es2015/src/selector/components/selector/selector.component.js +344 -0
  81. package/es2015/src/selector/components/selector/selector.component.js.map +1 -0
  82. package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +317 -0
  83. package/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  84. package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +51 -0
  85. package/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  86. package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +51 -0
  87. package/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  88. package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +47 -0
  89. package/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  90. package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +119 -0
  91. package/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  92. package/es2015/src/selector/interfaces.js +2 -0
  93. package/es2015/src/selector/interfaces.js.map +1 -0
  94. package/es2015/src/selector/misc/datetimeSelector.interface.js +2 -0
  95. package/es2015/src/selector/misc/datetimeSelector.interface.js.map +1 -0
  96. package/es2015/src/selector/misc/tokens.js +6 -0
  97. package/es2015/src/selector/misc/tokens.js.map +1 -0
  98. package/es2015/src/selector/modules/basicSelector.module.js +20 -0
  99. package/es2015/src/selector/modules/basicSelector.module.js.map +1 -0
  100. package/es2015/src/selector/modules/selector.module.js +60 -0
  101. package/es2015/src/selector/modules/selector.module.js.map +1 -0
  102. package/es2015/src/selector/types.js +10 -0
  103. package/es2015/src/selector/types.js.map +1 -0
  104. package/es2015/src/services/dateApi.interface.js +2 -0
  105. package/es2015/src/services/dateApi.interface.js.map +1 -0
  106. package/es2015/src/services/datePositionParser.interface.js +2 -0
  107. package/es2015/src/services/datePositionParser.interface.js.map +1 -0
  108. package/es2015/src/services/datePositionParser.service.js +227 -0
  109. package/es2015/src/services/datePositionParser.service.js.map +1 -0
  110. package/es2015/src/services/dateTimeRelativeParser.service.js +66 -0
  111. package/es2015/src/services/dateTimeRelativeParser.service.js.map +1 -0
  112. package/es2015/src/services/dateValueProvider.service.js +58 -0
  113. package/es2015/src/services/dateValueProvider.service.js.map +1 -0
  114. package/es2015/src/services/formatProvider.interface.js +2 -0
  115. package/es2015/src/services/formatProvider.interface.js.map +1 -0
  116. package/es2015/src/services/index.js +4 -0
  117. package/es2015/src/services/index.js.map +1 -0
  118. package/es2020/date-fns/src/index.js +4 -0
  119. package/es2020/date-fns/src/index.js.map +1 -0
  120. package/es2020/date-fns/src/misc/tokens.js +20 -0
  121. package/es2020/date-fns/src/misc/tokens.js.map +1 -0
  122. package/es2020/date-fns/src/services/dateFnsDateApi.service.js +437 -0
  123. package/es2020/date-fns/src/services/dateFnsDateApi.service.js.map +1 -0
  124. package/es2020/date-fns/src/services/dateFnsLocale.service.js +2 -0
  125. package/es2020/date-fns/src/services/dateFnsLocale.service.js.map +1 -0
  126. package/es2020/karma.conf.js +57 -0
  127. package/es2020/karma.conf.js.map +1 -0
  128. package/es2020/moment/src/index.js +3 -0
  129. package/es2020/moment/src/index.js.map +1 -0
  130. package/es2020/moment/src/misc/tokens.js +15 -0
  131. package/es2020/moment/src/misc/tokens.js.map +1 -0
  132. package/es2020/moment/src/services/momentDateApi.service.js +398 -0
  133. package/es2020/moment/src/services/momentDateApi.service.js.map +1 -0
  134. package/es2020/src/index.js +19 -0
  135. package/es2020/src/index.js.map +1 -0
  136. package/es2020/src/misc/constants.js +33 -0
  137. package/es2020/src/misc/constants.js.map +1 -0
  138. package/es2020/src/misc/datetime.interface.js +2 -0
  139. package/es2020/src/misc/datetime.interface.js.map +1 -0
  140. package/es2020/src/misc/tokens.js +19 -0
  141. package/es2020/src/misc/tokens.js.map +1 -0
  142. package/es2020/src/misc/validators.js +58 -0
  143. package/es2020/src/misc/validators.js.map +1 -0
  144. package/es2020/src/modules/datePipes.module.js +33 -0
  145. package/es2020/src/modules/datePipes.module.js.map +1 -0
  146. package/es2020/src/picker/components/dayPicker/dayPicker.component.js +172 -0
  147. package/es2020/src/picker/components/dayPicker/dayPicker.component.js.map +1 -0
  148. package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js +2 -0
  149. package/es2020/src/picker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  150. package/es2020/src/picker/components/monthPicker/monthPicker.component.js +114 -0
  151. package/es2020/src/picker/components/monthPicker/monthPicker.component.js.map +1 -0
  152. package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js +2 -0
  153. package/es2020/src/picker/components/monthPicker/monthPicker.interfaces.js.map +1 -0
  154. package/es2020/src/picker/components/picker/picker.component.animations.js +71 -0
  155. package/es2020/src/picker/components/picker/picker.component.animations.js.map +1 -0
  156. package/es2020/src/picker/components/picker/picker.component.js +236 -0
  157. package/es2020/src/picker/components/picker/picker.component.js.map +1 -0
  158. package/es2020/src/picker/components/pickerBase.component.js +243 -0
  159. package/es2020/src/picker/components/pickerBase.component.js.map +1 -0
  160. package/es2020/src/picker/components/yearPicker/yearPicker.component.js +126 -0
  161. package/es2020/src/picker/components/yearPicker/yearPicker.component.js.map +1 -0
  162. package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js +2 -0
  163. package/es2020/src/picker/components/yearPicker/yearPicker.interfaces.js.map +1 -0
  164. package/es2020/src/picker/interfaces.js +5 -0
  165. package/es2020/src/picker/interfaces.js.map +1 -0
  166. package/es2020/src/picker/misc/datetimePicker.interface.js +2 -0
  167. package/es2020/src/picker/misc/datetimePicker.interface.js.map +1 -0
  168. package/es2020/src/picker/misc/tokens.js +6 -0
  169. package/es2020/src/picker/misc/tokens.js.map +1 -0
  170. package/es2020/src/picker/modules/picker.module.js +46 -0
  171. package/es2020/src/picker/modules/picker.module.js.map +1 -0
  172. package/es2020/src/picker/types.js +8 -0
  173. package/es2020/src/picker/types.js.map +1 -0
  174. package/es2020/src/pipes/asRequiredType.js +22 -0
  175. package/es2020/src/pipes/asRequiredType.js.map +1 -0
  176. package/es2020/src/pipes/dateConvert.pipe.js +35 -0
  177. package/es2020/src/pipes/dateConvert.pipe.js.map +1 -0
  178. package/es2020/src/pipes/dateFormat.pipe.js +45 -0
  179. package/es2020/src/pipes/dateFormat.pipe.js.map +1 -0
  180. package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js +417 -0
  181. package/es2020/src/selector/components/inputDateTime/inputDateTime.component.js.map +1 -0
  182. package/es2020/src/selector/components/selector/selector.component.animations.js +15 -0
  183. package/es2020/src/selector/components/selector/selector.component.animations.js.map +1 -0
  184. package/es2020/src/selector/components/selector/selector.component.js +334 -0
  185. package/es2020/src/selector/components/selector/selector.component.js.map +1 -0
  186. package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +314 -0
  187. package/es2020/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js.map +1 -0
  188. package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +51 -0
  189. package/es2020/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js.map +1 -0
  190. package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +51 -0
  191. package/es2020/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js.map +1 -0
  192. package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +47 -0
  193. package/es2020/src/selector/directives/datetimeValidator/datetimeValidator.directive.js.map +1 -0
  194. package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +118 -0
  195. package/es2020/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js.map +1 -0
  196. package/es2020/src/selector/interfaces.js +2 -0
  197. package/es2020/src/selector/interfaces.js.map +1 -0
  198. package/es2020/src/selector/misc/datetimeSelector.interface.js +2 -0
  199. package/es2020/src/selector/misc/datetimeSelector.interface.js.map +1 -0
  200. package/es2020/src/selector/misc/tokens.js +6 -0
  201. package/es2020/src/selector/misc/tokens.js.map +1 -0
  202. package/es2020/src/selector/modules/basicSelector.module.js +20 -0
  203. package/es2020/src/selector/modules/basicSelector.module.js.map +1 -0
  204. package/es2020/src/selector/modules/selector.module.js +60 -0
  205. package/es2020/src/selector/modules/selector.module.js.map +1 -0
  206. package/es2020/src/selector/types.js +10 -0
  207. package/es2020/src/selector/types.js.map +1 -0
  208. package/es2020/src/services/dateApi.interface.js +2 -0
  209. package/es2020/src/services/dateApi.interface.js.map +1 -0
  210. package/es2020/src/services/datePositionParser.interface.js +2 -0
  211. package/es2020/src/services/datePositionParser.interface.js.map +1 -0
  212. package/es2020/src/services/datePositionParser.service.js +227 -0
  213. package/es2020/src/services/datePositionParser.service.js.map +1 -0
  214. package/es2020/src/services/dateTimeRelativeParser.service.js +65 -0
  215. package/es2020/src/services/dateTimeRelativeParser.service.js.map +1 -0
  216. package/es2020/src/services/dateValueProvider.service.js +58 -0
  217. package/es2020/src/services/dateValueProvider.service.js.map +1 -0
  218. package/es2020/src/services/formatProvider.interface.js +2 -0
  219. package/es2020/src/services/formatProvider.interface.js.map +1 -0
  220. package/es2020/src/services/index.js +4 -0
  221. package/es2020/src/services/index.js.map +1 -0
  222. package/karma.conf.d.ts +2 -0
  223. package/karma.conf.d.ts.map +1 -0
  224. package/moment/datetime-moment.d.ts +47 -0
  225. package/moment/datetime-moment.internal.d.ts +47 -0
  226. package/moment/package.json +7 -7
  227. package/moment/src/index.d.ts +3 -0
  228. package/moment/src/index.d.ts.map +1 -0
  229. package/moment/src/misc/tokens.d.ts +5 -5
  230. package/moment/src/services/momentDateApi.service.d.ts +35 -32
  231. package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
  232. package/moment/temp/datetime-moment.api.md +36 -0
  233. package/package.json +91 -48
  234. package/src/index.d.ts +19 -0
  235. package/src/index.d.ts.map +1 -0
  236. package/src/misc/constants.d.ts +32 -32
  237. package/src/misc/datetime.interface.d.ts +34 -34
  238. package/src/misc/tokens.d.ts +10 -10
  239. package/src/misc/validators.d.ts +25 -25
  240. package/src/modules/datePipes.module.d.ts +12 -5
  241. package/src/modules/datePipes.module.d.ts.map +1 -1
  242. package/src/picker/components/dayPicker/dayPicker.component.d.ts +68 -65
  243. package/src/picker/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  244. package/src/picker/components/dayPicker/dayPicker.component.html +7 -7
  245. package/src/picker/components/dayPicker/dayPicker.interfaces.d.ts +10 -10
  246. package/src/picker/components/monthPicker/monthPicker.component.d.ts +52 -49
  247. package/src/picker/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  248. package/src/picker/components/monthPicker/monthPicker.component.html +6 -6
  249. package/src/picker/components/monthPicker/monthPicker.interfaces.d.ts +6 -6
  250. package/src/picker/components/picker/picker.component.animations.d.ts +4 -4
  251. package/src/picker/components/picker/picker.component.d.ts +104 -101
  252. package/src/picker/components/picker/picker.component.d.ts.map +1 -1
  253. package/src/picker/components/pickerBase.component.d.ts +169 -166
  254. package/src/picker/components/pickerBase.component.d.ts.map +1 -1
  255. package/src/picker/components/yearPicker/yearPicker.component.d.ts +57 -54
  256. package/src/picker/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  257. package/src/picker/components/yearPicker/yearPicker.component.html +6 -6
  258. package/src/picker/components/yearPicker/yearPicker.interfaces.d.ts +6 -6
  259. package/src/picker/interfaces.d.ts +4 -4
  260. package/src/picker/misc/datetimePicker.interface.d.ts +188 -188
  261. package/src/picker/misc/tokens.d.ts +6 -6
  262. package/src/picker/modules/picker.module.d.ts +16 -5
  263. package/src/picker/modules/picker.module.d.ts.map +1 -1
  264. package/src/picker/types.d.ts +7 -7
  265. package/src/pipes/asRequiredType.d.ts +21 -0
  266. package/src/pipes/asRequiredType.d.ts.map +1 -0
  267. package/src/pipes/dateConvert.pipe.d.ts +18 -15
  268. package/src/pipes/dateConvert.pipe.d.ts.map +1 -1
  269. package/src/pipes/dateFormat.pipe.d.ts +20 -17
  270. package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
  271. package/src/selector/components/inputDateTime/inputDateTime.component.d.ts +187 -184
  272. package/src/selector/components/inputDateTime/inputDateTime.component.d.ts.map +1 -1
  273. package/src/selector/components/selector/selector.component.animations.d.ts +4 -4
  274. package/src/selector/components/selector/selector.component.d.ts +155 -152
  275. package/src/selector/components/selector/selector.component.d.ts.map +1 -1
  276. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts +170 -167
  277. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.d.ts.map +1 -1
  278. package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts +22 -19
  279. package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.d.ts.map +1 -1
  280. package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts +22 -19
  281. package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.d.ts.map +1 -1
  282. package/src/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts +21 -18
  283. package/src/selector/directives/datetimeValidator/datetimeValidator.directive.d.ts.map +1 -1
  284. package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts +53 -50
  285. package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.d.ts.map +1 -1
  286. package/src/selector/interfaces.d.ts +1 -1
  287. package/src/selector/misc/datetimeSelector.interface.d.ts +82 -82
  288. package/src/selector/misc/tokens.d.ts +6 -6
  289. package/src/selector/modules/basicSelector.module.d.ts +10 -5
  290. package/src/selector/modules/basicSelector.module.d.ts.map +1 -1
  291. package/src/selector/modules/selector.module.d.ts +18 -5
  292. package/src/selector/modules/selector.module.d.ts.map +1 -1
  293. package/src/selector/types.d.ts +9 -9
  294. package/src/services/dateApi.interface.d.ts +275 -275
  295. package/src/services/datePositionParser.interface.d.ts +40 -40
  296. package/src/services/datePositionParser.service.d.ts +60 -57
  297. package/src/services/datePositionParser.service.d.ts.map +1 -1
  298. package/src/services/dateTimeRelativeParser.service.d.ts +21 -18
  299. package/src/services/dateTimeRelativeParser.service.d.ts.map +1 -1
  300. package/src/services/dateValueProvider.service.d.ts +18 -15
  301. package/src/services/dateValueProvider.service.d.ts.map +1 -1
  302. package/src/services/formatProvider.interface.d.ts +17 -17
  303. package/src/services/index.d.ts +3 -3
  304. package/tsconfig.karma.json +5 -6
  305. package/version.bak +1 -1
  306. package/appveyor.yml +0 -70
  307. package/date-fns/dist/es2015/date-fns/index.js +0 -10
  308. package/date-fns/dist/es2015/date-fns/public_api.js +0 -7
  309. package/date-fns/dist/es2015/date-fns/src/date-fns.js +0 -9
  310. package/date-fns/dist/es2015/date-fns/src/misc/tokens.js +0 -32
  311. package/date-fns/dist/es2015/date-fns/src/services/dateFnsDateApi.service.js +0 -512
  312. package/date-fns/dist/es2015/date-fns/src/services/dateFnsLocale.service.js +0 -18
  313. package/date-fns/dist/es5/date-fns/index.js +0 -10
  314. package/date-fns/dist/es5/date-fns/public_api.js +0 -7
  315. package/date-fns/dist/es5/date-fns/src/date-fns.js +0 -9
  316. package/date-fns/dist/es5/date-fns/src/misc/tokens.js +0 -32
  317. package/date-fns/dist/es5/date-fns/src/services/dateFnsDateApi.service.js +0 -902
  318. package/date-fns/dist/es5/date-fns/src/services/dateFnsLocale.service.js +0 -18
  319. package/date-fns/index.d.ts +0 -5
  320. package/date-fns/index.d.ts.map +0 -1
  321. package/date-fns/index.metadata.json +0 -1
  322. package/date-fns/public_api.d.ts +0 -2
  323. package/date-fns/public_api.d.ts.map +0 -1
  324. package/date-fns/src/date-fns.d.ts.map +0 -1
  325. package/date-fns/src/services/dateFnsDateApi.service.ngfactory.d.ts.map +0 -1
  326. package/datetime.d.ts.map +0 -1
  327. package/datetime.metadata.json +0 -1
  328. package/dist/es2015/datetime.js +0 -10
  329. package/dist/es2015/public_api.js +0 -7
  330. package/dist/es2015/src/datetime.js +0 -24
  331. package/dist/es2015/src/misc/constants.js +0 -46
  332. package/dist/es2015/src/misc/datetime.interface.js +0 -52
  333. package/dist/es2015/src/misc/tokens.js +0 -29
  334. package/dist/es2015/src/misc/validators.js +0 -80
  335. package/dist/es2015/src/modules/datePipes.module.js +0 -26
  336. package/dist/es2015/src/picker/components/dayPicker/dayPicker.component.js +0 -215
  337. package/dist/es2015/src/picker/components/dayPicker/dayPicker.interfaces.js +0 -18
  338. package/dist/es2015/src/picker/components/monthPicker/monthPicker.component.js +0 -138
  339. package/dist/es2015/src/picker/components/monthPicker/monthPicker.interfaces.js +0 -11
  340. package/dist/es2015/src/picker/components/picker/picker.component.animations.js +0 -77
  341. package/dist/es2015/src/picker/components/picker/picker.component.js +0 -386
  342. package/dist/es2015/src/picker/components/pickerBase.component.js +0 -406
  343. package/dist/es2015/src/picker/components/yearPicker/yearPicker.component.js +0 -158
  344. package/dist/es2015/src/picker/components/yearPicker/yearPicker.interfaces.js +0 -11
  345. package/dist/es2015/src/picker/interfaces.js +0 -10
  346. package/dist/es2015/src/picker/misc/datetimePicker.interface.js +0 -245
  347. package/dist/es2015/src/picker/misc/tokens.js +0 -12
  348. package/dist/es2015/src/picker/modules/picker.module.js +0 -35
  349. package/dist/es2015/src/picker/types.js +0 -13
  350. package/dist/es2015/src/pipes/dateConvert.pipe.js +0 -50
  351. package/dist/es2015/src/pipes/dateFormat.pipe.js +0 -64
  352. package/dist/es2015/src/selector/components/inputDateTime/inputDateTime.component.js +0 -588
  353. package/dist/es2015/src/selector/components/selector/selector.component.animations.js +0 -21
  354. package/dist/es2015/src/selector/components/selector/selector.component.js +0 -514
  355. package/dist/es2015/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +0 -456
  356. package/dist/es2015/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -73
  357. package/dist/es2015/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -73
  358. package/dist/es2015/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -70
  359. package/dist/es2015/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -171
  360. package/dist/es2015/src/selector/interfaces.js +0 -7
  361. package/dist/es2015/src/selector/misc/datetimeSelector.interface.js +0 -106
  362. package/dist/es2015/src/selector/misc/tokens.js +0 -12
  363. package/dist/es2015/src/selector/modules/basicSelector.module.js +0 -20
  364. package/dist/es2015/src/selector/modules/selector.module.js +0 -45
  365. package/dist/es2015/src/selector/types.js +0 -15
  366. package/dist/es2015/src/services/dateApi.interface.js +0 -316
  367. package/dist/es2015/src/services/datePositionParser.interface.js +0 -56
  368. package/dist/es2015/src/services/datePositionParser.service.js +0 -297
  369. package/dist/es2015/src/services/dateTimeRelativeParser.service.js +0 -97
  370. package/dist/es2015/src/services/dateValueProvider.service.js +0 -79
  371. package/dist/es2015/src/services/formatProvider.interface.js +0 -28
  372. package/dist/es2015/src/services/index.js +0 -9
  373. package/dist/es5/datetime.js +0 -10
  374. package/dist/es5/public_api.js +0 -7
  375. package/dist/es5/src/datetime.js +0 -24
  376. package/dist/es5/src/misc/constants.js +0 -46
  377. package/dist/es5/src/misc/datetime.interface.js +0 -52
  378. package/dist/es5/src/misc/tokens.js +0 -29
  379. package/dist/es5/src/misc/validators.js +0 -124
  380. package/dist/es5/src/modules/datePipes.module.js +0 -30
  381. package/dist/es5/src/picker/components/dayPicker/dayPicker.component.js +0 -323
  382. package/dist/es5/src/picker/components/dayPicker/dayPicker.interfaces.js +0 -18
  383. package/dist/es5/src/picker/components/monthPicker/monthPicker.component.js +0 -233
  384. package/dist/es5/src/picker/components/monthPicker/monthPicker.interfaces.js +0 -11
  385. package/dist/es5/src/picker/components/picker/picker.component.animations.js +0 -77
  386. package/dist/es5/src/picker/components/picker/picker.component.js +0 -460
  387. package/dist/es5/src/picker/components/pickerBase.component.js +0 -561
  388. package/dist/es5/src/picker/components/yearPicker/yearPicker.component.js +0 -253
  389. package/dist/es5/src/picker/components/yearPicker/yearPicker.interfaces.js +0 -11
  390. package/dist/es5/src/picker/interfaces.js +0 -10
  391. package/dist/es5/src/picker/misc/datetimePicker.interface.js +0 -245
  392. package/dist/es5/src/picker/misc/tokens.js +0 -12
  393. package/dist/es5/src/picker/modules/picker.module.js +0 -39
  394. package/dist/es5/src/picker/types.js +0 -13
  395. package/dist/es5/src/pipes/dateConvert.pipe.js +0 -63
  396. package/dist/es5/src/pipes/dateFormat.pipe.js +0 -79
  397. package/dist/es5/src/selector/components/inputDateTime/inputDateTime.component.js +0 -808
  398. package/dist/es5/src/selector/components/selector/selector.component.animations.js +0 -21
  399. package/dist/es5/src/selector/components/selector/selector.component.js +0 -653
  400. package/dist/es5/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.js +0 -656
  401. package/dist/es5/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.js +0 -84
  402. package/dist/es5/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.js +0 -84
  403. package/dist/es5/src/selector/directives/datetimeValidator/datetimeValidator.directive.js +0 -82
  404. package/dist/es5/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.js +0 -230
  405. package/dist/es5/src/selector/interfaces.js +0 -7
  406. package/dist/es5/src/selector/misc/datetimeSelector.interface.js +0 -106
  407. package/dist/es5/src/selector/misc/tokens.js +0 -12
  408. package/dist/es5/src/selector/modules/basicSelector.module.js +0 -24
  409. package/dist/es5/src/selector/modules/selector.module.js +0 -49
  410. package/dist/es5/src/selector/types.js +0 -15
  411. package/dist/es5/src/services/dateApi.interface.js +0 -316
  412. package/dist/es5/src/services/datePositionParser.interface.js +0 -56
  413. package/dist/es5/src/services/datePositionParser.service.js +0 -366
  414. package/dist/es5/src/services/dateTimeRelativeParser.service.js +0 -108
  415. package/dist/es5/src/services/dateValueProvider.service.js +0 -92
  416. package/dist/es5/src/services/formatProvider.interface.js +0 -28
  417. package/dist/es5/src/services/index.js +0 -9
  418. package/moment/dist/es2015/moment/index.js +0 -10
  419. package/moment/dist/es2015/moment/public_api.js +0 -7
  420. package/moment/dist/es2015/moment/src/misc/tokens.js +0 -26
  421. package/moment/dist/es2015/moment/src/moment.js +0 -8
  422. package/moment/dist/es2015/moment/src/services/momentDateApi.service.js +0 -466
  423. package/moment/dist/es5/moment/index.js +0 -10
  424. package/moment/dist/es5/moment/public_api.js +0 -7
  425. package/moment/dist/es5/moment/src/misc/tokens.js +0 -26
  426. package/moment/dist/es5/moment/src/moment.js +0 -8
  427. package/moment/dist/es5/moment/src/services/momentDateApi.service.js +0 -858
  428. package/moment/index.d.ts +0 -5
  429. package/moment/index.d.ts.map +0 -1
  430. package/moment/index.metadata.json +0 -1
  431. package/moment/public_api.d.ts +0 -2
  432. package/moment/public_api.d.ts.map +0 -1
  433. package/moment/src/moment.d.ts.map +0 -1
  434. package/moment/src/services/momentDateApi.service.ngfactory.d.ts.map +0 -1
  435. package/public_api.d.ts +0 -2
  436. package/public_api.d.ts.map +0 -1
  437. package/src/datetime.d.ts.map +0 -1
  438. package/src/modules/datePipes.module.ngfactory.d.ts.map +0 -1
  439. package/src/picker/components/dayPicker/dayPicker.component.css.shim.ngstyle.d.ts.map +0 -1
  440. package/src/picker/components/dayPicker/dayPicker.component.ngfactory.d.ts.map +0 -1
  441. package/src/picker/components/monthPicker/monthPicker.component.css.shim.ngstyle.d.ts.map +0 -1
  442. package/src/picker/components/monthPicker/monthPicker.component.ngfactory.d.ts.map +0 -1
  443. package/src/picker/components/picker/picker.component.ngfactory.d.ts.map +0 -1
  444. package/src/picker/components/yearPicker/yearPicker.component.css.shim.ngstyle.d.ts.map +0 -1
  445. package/src/picker/components/yearPicker/yearPicker.component.ngfactory.d.ts.map +0 -1
  446. package/src/picker/modules/picker.module.ngfactory.d.ts.map +0 -1
  447. package/src/pipes/dateConvert.pipe.ngfactory.d.ts.map +0 -1
  448. package/src/pipes/dateFormat.pipe.ngfactory.d.ts.map +0 -1
  449. package/src/selector/components/inputDateTime/inputDateTime.component.css.shim.ngstyle.d.ts.map +0 -1
  450. package/src/selector/components/inputDateTime/inputDateTime.component.ngfactory.d.ts.map +0 -1
  451. package/src/selector/components/selector/selector.component.css.shim.ngstyle.d.ts.map +0 -1
  452. package/src/selector/components/selector/selector.component.ngfactory.d.ts.map +0 -1
  453. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.css.shim.ngstyle.d.ts.map +0 -1
  454. package/src/selector/components/simpleInputDateTime/simpleInputDateTime.component.ngfactory.d.ts.map +0 -1
  455. package/src/selector/directives/datetimeMaxValidator/datetimeMaxValidator.directive.ngfactory.d.ts.map +0 -1
  456. package/src/selector/directives/datetimeMinValidator/datetimeMinValidator.directive.ngfactory.d.ts.map +0 -1
  457. package/src/selector/directives/datetimeValidator/datetimeValidator.directive.ngfactory.d.ts.map +0 -1
  458. package/src/selector/directives/selectorControlValueAccessor/selectorControlValueAccessor.directive.ngfactory.d.ts.map +0 -1
  459. package/src/selector/modules/basicSelector.module.ngfactory.d.ts.map +0 -1
  460. package/src/selector/modules/selector.module.ngfactory.d.ts.map +0 -1
  461. package/src/services/datePositionParser.service.ngfactory.d.ts.map +0 -1
  462. package/src/services/dateTimeRelativeParser.service.ngfactory.d.ts.map +0 -1
  463. package/src/services/dateValueProvider.service.ngfactory.d.ts.map +0 -1
@@ -0,0 +1,417 @@
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 ?? '';
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?.from) {
158
+ this._dateApiValue = this._dateApi.getValue(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
+ if (!this._dateApiValue?.isValid()) {
260
+ return;
261
+ }
262
+ switch (event.key) {
263
+ case 'ArrowRight':
264
+ case 'ArrowLeft':
265
+ {
266
+ event.preventDefault();
267
+ event.stopPropagation();
268
+ const result = event.key == 'ArrowLeft' ? this._parser.previous(this.input.value, this.input.selectionStart) : this._parser.next(this.input.value, this.input.selectionStart);
269
+ if (result) {
270
+ this.input.selectionStart = result.positionFrom;
271
+ this.input.selectionEnd = result.positionTo;
272
+ }
273
+ break;
274
+ }
275
+ case 'ArrowUp':
276
+ case 'ArrowDown':
277
+ {
278
+ event.preventDefault();
279
+ event.stopPropagation();
280
+ let result = this._parser.parse(this.input.value, this.input.selectionStart);
281
+ const selectionStart = result.positionFrom;
282
+ this._stepChangeValue(result.part, event.key == 'ArrowUp');
283
+ this._show();
284
+ result = this._parser.parse(this.input.value, selectionStart);
285
+ this.input.selectionStart = result.positionFrom;
286
+ this.input.selectionEnd = result.positionTo;
287
+ break;
288
+ }
289
+ case 'Tab':
290
+ {
291
+ const result = event.shiftKey ? this._parser.previous(this.input.value, this.input.selectionStart) : this._parser.next(this.input.value, this.input.selectionStart);
292
+ if (result) {
293
+ event.preventDefault();
294
+ event.stopPropagation();
295
+ this.input.selectionStart = result.positionFrom;
296
+ this.input.selectionEnd = result.positionTo;
297
+ }
298
+ break;
299
+ }
300
+ case 'a':
301
+ {
302
+ if (event.ctrlKey) {
303
+ event.preventDefault();
304
+ event.stopPropagation();
305
+ }
306
+ break;
307
+ }
308
+ case 'Backspace':
309
+ {
310
+ this._clearValue();
311
+ this._valueChange.next();
312
+ break;
313
+ }
314
+ case 'Escape':
315
+ {
316
+ this._pickerRequest.next(false);
317
+ break;
318
+ }
319
+ case ' ':
320
+ {
321
+ if (event.ctrlKey) {
322
+ this._pickerRequest.next(true);
323
+ }
324
+ break;
325
+ }
326
+ }
327
+ }
328
+ //######################### protected methods #########################
329
+ /**
330
+ * Shows current value in input
331
+ */
332
+ _show() {
333
+ if (this._isValid) {
334
+ this.currentValue = this._dateApiValue?.format(this._format) ?? null;
335
+ }
336
+ }
337
+ /**
338
+ * Tests whether are min or max constraint broken, returns true if constraint is broken
339
+ */
340
+ _minMaxConstraintTest() {
341
+ return (!!this._minValue && this._dateApiValue.isBefore(this._minValue)) ||
342
+ (!!this._maxValue && this._dateApiValue.isAfter(this._maxValue));
343
+ }
344
+ /**
345
+ * Runs code with check whether min max constrains was broken
346
+ * @param code - Code that should be executed which can change current value
347
+ */
348
+ _withMinMaxConstraint(code) {
349
+ this._dateApiValue.updateOriginal();
350
+ code();
351
+ //min value constraint failure
352
+ if (this._minMaxConstraintTest()) {
353
+ this._dateApiValue?.resetOriginal();
354
+ return;
355
+ }
356
+ this._valueChange.next();
357
+ }
358
+ /**
359
+ * Clears current value
360
+ */
361
+ _clearValue() {
362
+ this._dateApiValue = null;
363
+ this._isValid = true;
364
+ this.currentValue = null;
365
+ }
366
+ /**
367
+ * Changes current value of date for for specified part by single step
368
+ * @param part - Part of date that should be changed
369
+ * @param increment - Indication whether value should be incremented or decremented
370
+ */
371
+ _stepChangeValue(part, increment) {
372
+ if (!this._dateApiValue?.isValid()) {
373
+ return;
374
+ }
375
+ switch (part) {
376
+ case 'y':
377
+ case 'Y':
378
+ {
379
+ this._withMinMaxConstraint(() => increment ? this._dateApiValue.addYears(1) : this._dateApiValue.subtractYears(1));
380
+ break;
381
+ }
382
+ case 'Q':
383
+ {
384
+ break;
385
+ }
386
+ case 'M':
387
+ {
388
+ this._withMinMaxConstraint(() => increment ? this._dateApiValue.addMonths(1) : this._dateApiValue.subtractMonths(1));
389
+ break;
390
+ }
391
+ case 'w':
392
+ {
393
+ this._withMinMaxConstraint(() => increment ? this._dateApiValue.addWeeks(1) : this._dateApiValue.subtractWeeks(1));
394
+ break;
395
+ }
396
+ case 'd':
397
+ case 'D':
398
+ {
399
+ this._withMinMaxConstraint(() => increment ? this._dateApiValue.addDays(1) : this._dateApiValue.subtractDays(1));
400
+ break;
401
+ }
402
+ }
403
+ }
404
+ }
405
+ 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 });
406
+ 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 });
407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: InputDateTimeSelectorComponent, decorators: [{
408
+ type: Component,
409
+ 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}"] }]
410
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
411
+ type: Inject,
412
+ args: [DATE_API]
413
+ }] }, { type: i1.DatePositionParserService }, { type: i2.DateValueProvider }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { inputElement: [{
414
+ type: ViewChild,
415
+ args: ['input', { static: true }]
416
+ }] } });
417
+ //# 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;;;;AA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ACT;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]);"]}