@anglr/datetime 5.0.0-beta.20221018120203 → 5.0.0-beta.20221019112435

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 (187) hide show
  1. package/changelog.md +63 -1
  2. package/es2015/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -1
  3. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.component.js +0 -1
  4. package/es2015/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +1 -1
  5. package/es2015/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +1 -1
  6. package/es2015/src/legacy/picker/components/picker/picker.component.js +4 -4
  7. package/es2015/src/legacy/picker/components/picker/picker.component.js.map +1 -1
  8. package/es2015/src/legacy/picker/components/pickerBase.component.js.map +1 -1
  9. package/es2015/src/legacy/picker/components/pickerImplBase.component.js.map +1 -1
  10. package/es2015/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -1
  11. package/es2015/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +1 -1
  12. package/es2015/src/legacy/picker/misc/datetimePicker.interface.js.map +1 -1
  13. package/es2015/src/legacy/picker/misc/tokens.js.map +1 -1
  14. package/es2015/src/legacy/picker/modules/picker.module.js +9 -9
  15. package/es2015/src/legacy/picker/modules/picker.module.js.map +1 -1
  16. package/es2015/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +2 -2
  17. package/es2015/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +1 -1
  18. package/es2015/src/legacy/selector/misc/datetimeSelector.interface.js.map +1 -1
  19. package/es2015/src/legacy/selector/modules/selector.module.js +4 -4
  20. package/es2015/src/legacy/selector/modules/selector.module.js.map +1 -1
  21. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +18 -12
  22. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -1
  23. package/es2015/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js +48 -0
  24. package/es2015/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +1 -0
  25. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +195 -0
  26. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -0
  27. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js +2 -0
  28. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js.map +1 -0
  29. package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +78 -0
  30. package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +1 -0
  31. package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.interfaces.js +2 -0
  32. package/es2015/src/modules/dateTimePicker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  33. package/es2015/src/modules/dateTimePicker/components/index.js +5 -0
  34. package/es2015/src/modules/dateTimePicker/components/index.js.map +1 -0
  35. package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +195 -0
  36. package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +1 -0
  37. package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js +2 -0
  38. package/es2015/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js.map +1 -0
  39. package/es2015/src/modules/dateTimePicker/directives/index.js +3 -0
  40. package/es2015/src/modules/dateTimePicker/directives/index.js.map +1 -0
  41. package/es2015/src/modules/dateTimePicker/index.js +6 -0
  42. package/es2015/src/modules/dateTimePicker/index.js.map +1 -0
  43. package/es2015/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js +2 -0
  44. package/es2015/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js.map +1 -0
  45. package/es2015/src/modules/dateTimePicker/interfaces/index.js +2 -0
  46. package/es2015/src/modules/dateTimePicker/interfaces/index.js.map +1 -0
  47. package/es2015/src/modules/dateTimePicker/misc/tokens.js +10 -0
  48. package/es2015/src/modules/dateTimePicker/misc/tokens.js.map +1 -0
  49. package/es2015/src/modules/dateTimePicker/modules/dateTimePicker.module.js +28 -0
  50. package/es2015/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +1 -0
  51. package/es2015/src/modules/dateTimePicker/modules/index.js +2 -0
  52. package/es2015/src/modules/dateTimePicker/modules/index.js.map +1 -0
  53. package/es2015/src/modules/index.js +1 -0
  54. package/es2015/src/modules/index.js.map +1 -1
  55. package/es2015/src/pipes/dateFormat.pipe.js +3 -9
  56. package/es2015/src/pipes/dateFormat.pipe.js.map +1 -1
  57. package/es2020/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -1
  58. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.component.js +0 -1
  59. package/es2020/src/legacy/picker/components/dayPicker/dayPicker.component.js.map +1 -1
  60. package/es2020/src/legacy/picker/components/monthPicker/monthPicker.component.js.map +1 -1
  61. package/es2020/src/legacy/picker/components/picker/picker.component.js +4 -4
  62. package/es2020/src/legacy/picker/components/picker/picker.component.js.map +1 -1
  63. package/es2020/src/legacy/picker/components/pickerBase.component.js.map +1 -1
  64. package/es2020/src/legacy/picker/components/pickerImplBase.component.js.map +1 -1
  65. package/es2020/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -1
  66. package/es2020/src/legacy/picker/components/yearPicker/yearPicker.component.js.map +1 -1
  67. package/es2020/src/legacy/picker/misc/datetimePicker.interface.js.map +1 -1
  68. package/es2020/src/legacy/picker/misc/tokens.js.map +1 -1
  69. package/es2020/src/legacy/picker/modules/picker.module.js +9 -9
  70. package/es2020/src/legacy/picker/modules/picker.module.js.map +1 -1
  71. package/es2020/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js +2 -2
  72. package/es2020/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.js.map +1 -1
  73. package/es2020/src/legacy/selector/misc/datetimeSelector.interface.js.map +1 -1
  74. package/es2020/src/legacy/selector/modules/selector.module.js +4 -4
  75. package/es2020/src/legacy/selector/modules/selector.module.js.map +1 -1
  76. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +18 -12
  77. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -1
  78. package/es2020/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js +48 -0
  79. package/es2020/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +1 -0
  80. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +192 -0
  81. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -0
  82. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js +2 -0
  83. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.js.map +1 -0
  84. package/es2020/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +75 -0
  85. package/es2020/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +1 -0
  86. package/es2020/src/modules/dateTimePicker/components/dayPicker/dayPicker.interfaces.js +2 -0
  87. package/es2020/src/modules/dateTimePicker/components/dayPicker/dayPicker.interfaces.js.map +1 -0
  88. package/es2020/src/modules/dateTimePicker/components/index.js +5 -0
  89. package/es2020/src/modules/dateTimePicker/components/index.js.map +1 -0
  90. package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +188 -0
  91. package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +1 -0
  92. package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js +2 -0
  93. package/es2020/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.js.map +1 -0
  94. package/es2020/src/modules/dateTimePicker/directives/index.js +3 -0
  95. package/es2020/src/modules/dateTimePicker/directives/index.js.map +1 -0
  96. package/es2020/src/modules/dateTimePicker/index.js +6 -0
  97. package/es2020/src/modules/dateTimePicker/index.js.map +1 -0
  98. package/es2020/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js +2 -0
  99. package/es2020/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.js.map +1 -0
  100. package/es2020/src/modules/dateTimePicker/interfaces/index.js +2 -0
  101. package/es2020/src/modules/dateTimePicker/interfaces/index.js.map +1 -0
  102. package/es2020/src/modules/dateTimePicker/misc/tokens.js +10 -0
  103. package/es2020/src/modules/dateTimePicker/misc/tokens.js.map +1 -0
  104. package/es2020/src/modules/dateTimePicker/modules/dateTimePicker.module.js +28 -0
  105. package/es2020/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +1 -0
  106. package/es2020/src/modules/dateTimePicker/modules/index.js +2 -0
  107. package/es2020/src/modules/dateTimePicker/modules/index.js.map +1 -0
  108. package/es2020/src/modules/index.js +1 -0
  109. package/es2020/src/modules/index.js.map +1 -1
  110. package/es2020/src/pipes/dateFormat.pipe.js +3 -9
  111. package/es2020/src/pipes/dateFormat.pipe.js.map +1 -1
  112. package/package.json +7 -1
  113. package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts +8 -4
  114. package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts.map +1 -1
  115. package/src/legacy/picker/components/dayPicker/dayPicker.component.d.ts +2 -2
  116. package/src/legacy/picker/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  117. package/src/legacy/picker/components/monthPicker/monthPicker.component.d.ts +2 -2
  118. package/src/legacy/picker/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  119. package/src/legacy/picker/components/picker/picker.component.d.ts +11 -11
  120. package/src/legacy/picker/components/picker/picker.component.d.ts.map +1 -1
  121. package/src/legacy/picker/components/pickerBase.component.d.ts +2 -2
  122. package/src/legacy/picker/components/pickerBase.component.d.ts.map +1 -1
  123. package/src/legacy/picker/components/pickerImplBase.component.d.ts +2 -2
  124. package/src/legacy/picker/components/pickerImplBase.component.d.ts.map +1 -1
  125. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.d.ts +2 -2
  126. package/src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.d.ts.map +1 -1
  127. package/src/legacy/picker/components/yearPicker/yearPicker.component.d.ts +2 -2
  128. package/src/legacy/picker/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  129. package/src/legacy/picker/misc/datetimePicker.interface.d.ts +2 -6
  130. package/src/legacy/picker/misc/datetimePicker.interface.d.ts.map +1 -1
  131. package/src/legacy/picker/misc/tokens.d.ts +2 -2
  132. package/src/legacy/picker/misc/tokens.d.ts.map +1 -1
  133. package/src/legacy/picker/modules/picker.module.d.ts +4 -4
  134. package/src/legacy/picker/modules/picker.module.d.ts.map +1 -1
  135. package/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts +2 -2
  136. package/src/legacy/selector/directives/dateTimePickerRenderer/dateTimePickerRenderer.directive.d.ts.map +1 -1
  137. package/src/legacy/selector/misc/datetimeSelector.interface.d.ts +2 -2
  138. package/src/legacy/selector/misc/datetimeSelector.interface.d.ts.map +1 -1
  139. package/src/legacy/selector/modules/selector.module.d.ts +1 -1
  140. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts +6 -2
  141. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts.map +1 -1
  142. package/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.d.ts +66 -0
  143. package/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.d.ts.map +1 -0
  144. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts +80 -0
  145. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts.map +1 -0
  146. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.html +1 -0
  147. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.d.ts +17 -0
  148. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.d.ts.map +1 -0
  149. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.css +27 -0
  150. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.d.ts +35 -0
  151. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.d.ts.map +1 -0
  152. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.html +21 -0
  153. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.interfaces.d.ts +11 -0
  154. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.interfaces.d.ts.map +1 -0
  155. package/src/modules/dateTimePicker/components/index.d.ts +5 -0
  156. package/src/modules/dateTimePicker/components/index.d.ts.map +1 -0
  157. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts +79 -0
  158. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts.map +1 -0
  159. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.d.ts +31 -0
  160. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.d.ts.map +1 -0
  161. package/src/modules/dateTimePicker/directives/index.d.ts +3 -0
  162. package/src/modules/dateTimePicker/directives/index.d.ts.map +1 -0
  163. package/src/modules/dateTimePicker/index.d.ts +6 -0
  164. package/src/modules/dateTimePicker/index.d.ts.map +1 -0
  165. package/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.d.ts +48 -0
  166. package/src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.d.ts.map +1 -0
  167. package/src/modules/dateTimePicker/interfaces/index.d.ts +2 -0
  168. package/src/modules/dateTimePicker/interfaces/index.d.ts.map +1 -0
  169. package/src/modules/dateTimePicker/misc/tokens.d.ts +12 -0
  170. package/src/modules/dateTimePicker/misc/tokens.d.ts.map +1 -0
  171. package/src/modules/dateTimePicker/modules/dateTimePicker.module.d.ts +12 -0
  172. package/src/modules/dateTimePicker/modules/dateTimePicker.module.d.ts.map +1 -0
  173. package/src/modules/dateTimePicker/modules/index.d.ts +2 -0
  174. package/src/modules/dateTimePicker/modules/index.d.ts.map +1 -0
  175. package/src/modules/index.d.ts +1 -0
  176. package/src/modules/index.d.ts.map +1 -1
  177. package/src/pipes/dateFormat.pipe.d.ts +28 -2
  178. package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
  179. package/styles/components/_date-time-picker.scss +8 -0
  180. package/styles/core/_functions.scss +11 -0
  181. package/styles/core/_misc.scss +199 -0
  182. package/styles/core/_mixins.scss +23 -0
  183. package/styles/core/_theme.scss +3 -0
  184. package/styles/index.scss +2 -0
  185. package/styles/themes/dark.scss +19 -0
  186. package/styles/themes/light.scss +19 -0
  187. package/version.bak +1 -1
package/changelog.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## Version 5.0.0 (2022-10-18)
3
+ ## Version 5.0.0 (2022-10-19)
4
4
 
5
5
  ### Features
6
6
 
@@ -16,6 +16,7 @@
16
16
  - `disabled` indication whether is date time disabled
17
17
  - `focus` occurs when input gains focus
18
18
  - `blur` occurs when input loses focus
19
+ - `element` html element that represents input itself
19
20
  - new `DateTimeModule` module for basic date time directives, components, pipes
20
21
  - **exports**
21
22
  - `DateTimeControlValueAccessorDirective`
@@ -94,8 +95,63 @@
94
95
  - `minValue` min allowed value
95
96
  - new `dateTimeModelValidatorFactory` function, that is factory function that creates validator function factory
96
97
  - new `DateTime` decorator, that sets date time validator to property on which is used
98
+ - new `DateTimePickerModule` module, that is module for components that are used as date time picker
99
+ - **exports**
100
+ - `DateTimePickerComponent`
101
+ - `DateTimePickerDirective`
102
+ - new `DateTimePickerDirective` directive, that is directive that is used for displaying and attaching date time picker
103
+ - **implements**
104
+ - `OnInit`
105
+ - `OnDestroy`
106
+ - **inputs**
107
+ - `withPickerOptions` gets or sets options for date time picker directive
108
+ - **methods**
109
+ - `showPicker` hides date time picker
110
+ - `hidePicker` shows date time picker
111
+ - new `DateTimePickerComponent` directive, which is component used for displaying date time picker
112
+ - **extends** `DateTimeRestrictedBase`
113
+ - **implements**
114
+ - `DateTimeInputValue`
115
+ - `OnChanges`
116
+ - `OnDestroy`
117
+ - **inputs**
118
+ - `value` docs from `DateTimeInputValue`
119
+ - `options` options for date time picker
120
+ - **outputs**
121
+ - `valueChange` docs from `DateTimeInputValue`
122
+ - new `DateTimePicker` interface, which describes date time picker API for each date time period
123
+ - **properties**
124
+ - `value` value of date time picker
125
+ - `options` options for date time picker period
126
+ - `display` date that describes which date should be displayed
127
+ - `maxDate` max allowed date
128
+ - `minDate` min allowed date to be selected
129
+ - `canScaleUp` indication whether picker can display scale date time period up
130
+ - `canScaleDown` indication whether picker can display scale date time period down
131
+ - `valueChange` occurs when date time picker value changes
132
+ - `scaleUp` occurs when period should be scaled up
133
+ - `scaleDown` occurs when period should be scaled down
134
+ - new `DateTimePickerDirectiveOptions` directive, which is defintion of date time picker directive options
135
+ - **properties**
136
+ - `closeOnValueSelect` indication whether close picker on value selection
137
+ - `showOnFocus` indication whether display picker when date time input gets focus
138
+ - `alwaysVisible` indication whether is picker always visible, mostly used for debugging
139
+ - `disabled` indication whether picker is disabled, if true, you cant display picker
140
+ - `absolute` indication whether use absolute global positioning of picker
141
+ - `positionOptions` position options that are used to position picker
142
+ - new `DATE_TIME_PICKER_DIRECTIVE_OPTIONS` injection token for global options for date time picker directive
143
+ - new `DATE_TIME_PICKER_OPTIONS` injection token for global options for date time picker component
144
+ - new `DateTimePeriodPickerBase` class, which is base abstract class for each date time period picker
145
+ - **implements**
146
+ - `DateTimePicker`
147
+ - new `DateTimePickerOptions` interface, that is defintion of date time picker component options
148
+ - **properties**
149
+ - `periodsDefinition` definition of types for each period type for picker
150
+ - `defaultPeriod` name of default period for picker that is displayed after opening
97
151
  - updated `DateApiObject` interface
98
152
  - new `unixTimestamp` method, that gets value of date time as unix timestamp
153
+ - updated `DateFormatPipe`
154
+ - improved typings for `transform`
99
155
  - *subpackage* `@anglr/datetime/moment`
100
156
  - updated `MomentDateApi`
101
157
  - now implements also new `unixTimestamp`
@@ -120,6 +176,12 @@
120
176
  - `to` can now also be `undefined` or `null`
121
177
  - updated `DateTimeRelativeParser` service
122
178
  - now `m` means minutes and `M` means months
179
+ - updated `DateTimePickerModule` renamed to `DateTimeLegacyPickerModule`
180
+ - updated `DateTimePickerComponent` renamed to `DateTimePickerLegacyComponent`
181
+ - updated `DateTimePicker` renamed to `DateTimeLegacyPicker`
182
+ - updated `DateTimePickerOptions` renamed to `DateTimePickerLegacyOptions`
183
+ - updated `DateFormatPipe`
184
+ - typings that allows custom format must use `customFormat` new parameter
123
185
 
124
186
  ## Version 4.0.0 (2022-10-14)
125
187
 
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeInput.interface.js","sourceRoot":"","sources":["../../../../src/interfaces/dateTimeInput/dateTimeInput.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {EventEmitter} from '@angular/core';\n\nimport {DateTimeInputOutputValue} from '../../misc/types';\n\n/**\n * Defines date time input value API\n */\nexport interface DateTimeInputValue<TDate = unknown>\n{\n /**\n * Current value of date time, could be string, unix timestamp, Date, TDate object, or ranged DateTimeValue\n */\n value: DateTimeInputOutputValue<TDate>|undefined|null;\n\n /**\n * Occurs when value changes\n */\n valueChange: EventEmitter<void>;\n}\n/**\n * Defines date time input and communication API for it\n */\nexport interface DateTimeInput<TDate = unknown> extends DateTimeInputValue<TDate>\n{\n /**\n * Value of date time, raw string value which is visible to user\n */\n rawValue: string|undefined|null;\n\n /**\n * Indication whether is date time disabled\n */\n disabled: boolean;\n\n /**\n * Occurs when input gains focus\n */\n focus: EventEmitter<FocusEvent>;\n\n /**\n * Occurs when input loses focus\n */\n blur: EventEmitter<FocusEvent>;\n}"]}
1
+ {"version":3,"file":"dateTimeInput.interface.js","sourceRoot":"","sources":["../../../../src/interfaces/dateTimeInput/dateTimeInput.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {EventEmitter} from '@angular/core';\n\nimport {DateTimeInputOutputValue} from '../../misc/types';\n\n/**\n * Defines date time input value API\n */\nexport interface DateTimeInputValue<TDate = unknown>\n{\n /**\n * Current value of date time, could be string, unix timestamp, Date, TDate object, or ranged DateTimeValue\n */\n value: DateTimeInputOutputValue<TDate>|undefined|null;\n\n /**\n * Occurs when value changes\n */\n readonly valueChange: EventEmitter<void>;\n}\n/**\n * Defines date time input and communication API for it\n */\nexport interface DateTimeInput<TDate = unknown> extends DateTimeInputValue<TDate>\n{\n /**\n * Value of date time, raw string value which is visible to user\n */\n readonly rawValue: string|undefined|null;\n\n /**\n * Indication whether is date time disabled\n */\n disabled: boolean;\n\n /**\n * Occurs when input gains focus\n */\n readonly focus: EventEmitter<FocusEvent>;\n\n /**\n * Occurs when input loses focus\n */\n readonly blur: EventEmitter<FocusEvent>;\n\n /**\n * Html element that represents input itself\n */\n readonly element: HTMLElement;\n}"]}
@@ -144,7 +144,6 @@ export class DateTimeDayPickerComponent extends PickerBaseComponent {
144
144
  const data = {
145
145
  active: false,
146
146
  disabled: false,
147
- betweenActive: false,
148
147
  date: this.displayDate.value,
149
148
  otherMonth: otherMonth,
150
149
  today: this.displayDate.isSameDay(today),
@@ -1 +1 @@
1
- {"version":3,"file":"dayPicker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/dayPicker/dayPicker.component.ts","../../../../../../src/legacy/picker/components/dayPicker/dayPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGtC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;;;;;AAG5D;;GAEG;AACH,MAAM,aAAa,GACnB;IACI,eAAe,EAAE,Q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C;;uHAlPQ,0BAA0B,kBA0Bf,QAAQ;2GA1BnB,0BAA0B,mFCnCvC,2wCAoBM;2FDeO,0BAA0B;kBAPtC,SAAS;+BAEI,sBAAsB,mBAGf,uBAAuB,CAAC,MAAM;;0BA4BlC,MAAM;2BAAC,QAAQ","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef} from '@angular/core';\nimport {extend} from '@jscrpt/common';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../../services/dateApi/dateApi.interface';\nimport {DateTimePicker, DayData, PeriodData} from '../../misc/datetimePicker.interface';\nimport {PickerBaseComponent} from '../pickerBase.component';\nimport {DayPickerCssClasses} from './dayPicker.interfaces';\n\n/**\n * Default styles for picker\n */\nconst defaultStyles: DayPickerCssClasses =\n{\n periodSelection: 'period',\n previousPeriod: 'fas fa-angle-left clickable',\n nextPeriod: 'fas fa-angle-right clickable',\n periodValue: 'period-value',\n periodData: 'period-data',\n periodDatum: 'period-datum clickable',\n weekdayName: 'weekday',\n clickable: 'clickable'\n};\n\n/**\n * Component used for displaying day picker\n */\n@Component(\n{\n selector: 'date-time-day-picker',\n templateUrl: 'dayPicker.component.html',\n styleUrls: ['dayPicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeDayPickerComponent<TDate = any> extends PickerBaseComponent<TDate, DayData<TDate>, DayPickerCssClasses> implements DateTimePicker<TDate, DayPickerCssClasses>\n{\n //######################### protected fields #########################\n\n /**\n * Stored this picker month data\n */\n protected _thisMonthData: DayData<TDate>[] = [];\n\n //######################### public properties - template bindings #########################\n\n /**\n * Names of days\n * @internal\n */\n public weekdays: string[] = [];\n\n /**\n * Value used for displaying time\n */\n public get timeValue(): DateTimeValue<TDate> | null\n {\n return this._value;\n }\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n changeDetector: ChangeDetectorRef)\n {\n super(dateApi, changeDetector);\n\n this.cssClasses = extend(true, {}, defaultStyles);\n this.weekdays = this._dateApi.weekdaysShort();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed period to \"lower\" period\n * @param event - Event that occured\n * @internal\n */\n public goDown(event: Event): void\n {\n event.preventDefault();\n\n if(!this.canGoDown)\n {\n return;\n }\n\n if(this.displayDate)\n {\n this._scaleDown.next(this.displayDate.value);\n }\n }\n\n /**\n * Changes displayed month to next month\n * @param event - Event that occured\n * @internal\n */\n public nextMonth(event: Event): void\n {\n event.preventDefault();\n this.displayDate!.addMonths(1);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Changes displayed month to previous month\n * @param event - Event that occured\n * @internal\n */\n public previousMonth(event: Event): void\n {\n event.preventDefault();\n this.displayDate!.subtractMonths(1);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Selects day\n * @param event - Event that occured\n * @param day - Selects day \n * @internal\n */\n public override select(event: Event, day: DayData<TDate>): void\n {\n event.preventDefault();\n\n if(day.disabled)\n {\n return;\n }\n\n this._setPeriod(day);\n\n //when time picker is enabled\n if(this.canGoDown)\n {\n const from = this._dateApi\n .getValue(day.date)\n .hour(this._originalHour)\n .minute(this._originalMinute);\n\n const to = this._dateApi\n .getValue(this._endOfPeriod(day))\n .hour(this._originalHour)\n .minute(this._originalMinute);\n\n this._value =\n {\n from: from.value,\n to: to.value\n };\n }\n //no time picker\n else\n {\n this._value =\n {\n from: day.date,\n to: this._endOfPeriod(day)\n };\n }\n \n this._valueChange.next();\n\n if(day.otherMonth)\n {\n this.display(this._dateApi.getValue(day.date));\n }\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n public display(value: DateApiObject<TDate>): void\n {\n this.displayDate = value;\n this.periodData = [];\n this._thisMonthData = [];\n const currentMonthDate = this.displayDate.value;\n const today = this._dateApi.now().value;\n\n this.displayDate\n .startOfMonth()\n .updateOriginal()\n .startOfWeek();\n\n do\n {\n for(let x = 0; x < 7; x++)\n {\n const day = this.displayDate.dayOfMonth();\n const otherMonth = !this.displayDate.isSameMonth(currentMonthDate);\n const data = \n {\n active: false,\n disabled: false,\n betweenActive: false,\n date: this.displayDate.value,\n otherMonth: otherMonth,\n today: this.displayDate.isSameDay(today),\n weekend: this.displayDate.isWeekend(),\n day: day\n };\n\n this.periodData.push(data);\n\n if(!otherMonth)\n {\n this._thisMonthData.push(data);\n }\n\n this.displayDate.addDays(1);\n }\n }\n while(this.displayDate.isSameMonth(currentMonthDate));\n\n this.displayDate.resetOriginal();\n\n //can go down set minutes and hours\n if(this.canGoDown)\n {\n this.displayDate\n .minute(this._originalMinute)\n .hour(this._originalHour);\n }\n\n this._updateMinMax();\n\n //set value if exists\n if(this._value && (this.displayDate.isSameMonth(this._value.from!) || this.displayDate.isSameMonth(this._value.to!)))\n {\n this.setValue(this._value);\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Obtains end of period\n * @param period - Period for which should be end obtained\n */\n protected _endOfPeriod(period: PeriodData<TDate>): TDate\n {\n return this._dateApi.getValue(period.date).endOfDay().value;\n }\n\n /**\n * Tests whether provided value is in same period as displayed picker\n * @param val - Tested value for same period as displayed picker\n */\n protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean\n {\n return val.isSameMonth(this.displayDate!.value);\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameDay(target);\n }\n\n /**\n * Gets period data for specified value\n * @param val - Value for which is period data obtained\n */\n protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>\n {\n return this._thisMonthData[val.dayOfMonth() - 1];\n }\n}","<div [ngClass]=\"cssClasses.periodSelection | asRequired\">\r\n <div [ngClass]=\"cssClasses.previousPeriod | asRequired\" (mousedown)=\"previousMonth($event)\"></div>\r\n <div [ngClass]=\"cssClasses.periodValue | asRequired | mergeCssClasses: [{'clickable': canGoUp}]\" (mousedown)=\"goUp($event)\">{{displayDate?.format('MMMM yyyy')}}</div>\r\n <div [ngClass]=\"cssClasses.nextPeriod | asRequired\" (mousedown)=\"nextMonth($event)\"></div>\r\n</div>\r\n\r\n<div [ngClass]=\"cssClasses.periodData | asRequired\">\r\n <div [ngClass]=\"cssClasses.weekdayName | asRequired\" *ngFor=\"let weekday of weekdays\">{{weekday}}</div>\r\n <div *ngFor=\"let day of periodData\"\r\n [ngClass]=\"cssClasses.periodDatum | asRequired\"\r\n [class.other-month]=\"day.otherMonth\"\r\n [class.today]=\"day.today\"\r\n [class.weekend]=\"day.weekend\"\r\n [class.active]=\"day.active\"\r\n [class.disabled]=\"day.disabled\"\r\n (mousedown)=\"select($event, day)\">{{day.day}}</div>\r\n</div>\r\n\r\n<div class=\"flex-row\" style=\"justify-content: center; border-top: 1px solid #FFF;\" *ngIf=\"canGoDown\">\r\n <div [class.clickable]=\"canGoDown\" (mousedown)=\"goDown($event)\">{{timeValue?.from | dateFormat: 'time'}}</div>\r\n</div>"]}
1
+ {"version":3,"file":"dayPicker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/dayPicker/dayPicker.component.ts","../../../../../../src/legacy/picker/components/dayPicker/dayPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGtC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;;;;;AAG5D;;GAEG;AACH,MAAM,aAAa,GACnB;IACI,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,6BAA6B;IAC7C,UAAU,EAAE,8BAA8B;IAC1C,WAAW,EAAE,cAAc;IAC3B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AsB,mBAGf,uBAAuB,CAAC,MAAM;;0BA4BlC,MAAM;2BAAC,QAAQ","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef} from '@angular/core';\nimport {extend} from '@jscrpt/common';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../../services/dateApi/dateApi.interface';\nimport {DateTimeLegacyPicker, DayData, PeriodData} from '../../misc/datetimePicker.interface';\nimport {PickerBaseComponent} from '../pickerBase.component';\nimport {DayPickerCssClasses} from './dayPicker.interfaces';\n\n/**\n * Default styles for picker\n */\nconst defaultStyles: DayPickerCssClasses =\n{\n periodSelection: 'period',\n previousPeriod: 'fas fa-angle-left clickable',\n nextPeriod: 'fas fa-angle-right clickable',\n periodValue: 'period-value',\n periodData: 'period-data',\n periodDatum: 'period-datum clickable',\n weekdayName: 'weekday',\n clickable: 'clickable'\n};\n\n/**\n * Component used for displaying day picker\n */\n@Component(\n{\n selector: 'date-time-day-picker',\n templateUrl: 'dayPicker.component.html',\n styleUrls: ['dayPicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeDayPickerComponent<TDate = any> extends PickerBaseComponent<TDate, DayData<TDate>, DayPickerCssClasses> implements DateTimeLegacyPicker<TDate, DayPickerCssClasses>\n{\n //######################### protected fields #########################\n\n /**\n * Stored this picker month data\n */\n protected _thisMonthData: DayData<TDate>[] = [];\n\n //######################### public properties - template bindings #########################\n\n /**\n * Names of days\n * @internal\n */\n public weekdays: string[] = [];\n\n /**\n * Value used for displaying time\n */\n public get timeValue(): DateTimeValue<TDate> | null\n {\n return this._value;\n }\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n changeDetector: ChangeDetectorRef)\n {\n super(dateApi, changeDetector);\n\n this.cssClasses = extend(true, {}, defaultStyles);\n this.weekdays = this._dateApi.weekdaysShort();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed period to \"lower\" period\n * @param event - Event that occured\n * @internal\n */\n public goDown(event: Event): void\n {\n event.preventDefault();\n\n if(!this.canGoDown)\n {\n return;\n }\n\n if(this.displayDate)\n {\n this._scaleDown.next(this.displayDate.value);\n }\n }\n\n /**\n * Changes displayed month to next month\n * @param event - Event that occured\n * @internal\n */\n public nextMonth(event: Event): void\n {\n event.preventDefault();\n this.displayDate!.addMonths(1);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Changes displayed month to previous month\n * @param event - Event that occured\n * @internal\n */\n public previousMonth(event: Event): void\n {\n event.preventDefault();\n this.displayDate!.subtractMonths(1);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Selects day\n * @param event - Event that occured\n * @param day - Selects day \n * @internal\n */\n public override select(event: Event, day: DayData<TDate>): void\n {\n event.preventDefault();\n\n if(day.disabled)\n {\n return;\n }\n\n this._setPeriod(day);\n\n //when time picker is enabled\n if(this.canGoDown)\n {\n const from = this._dateApi\n .getValue(day.date)\n .hour(this._originalHour)\n .minute(this._originalMinute);\n\n const to = this._dateApi\n .getValue(this._endOfPeriod(day))\n .hour(this._originalHour)\n .minute(this._originalMinute);\n\n this._value =\n {\n from: from.value,\n to: to.value\n };\n }\n //no time picker\n else\n {\n this._value =\n {\n from: day.date,\n to: this._endOfPeriod(day)\n };\n }\n \n this._valueChange.next();\n\n if(day.otherMonth)\n {\n this.display(this._dateApi.getValue(day.date));\n }\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n public display(value: DateApiObject<TDate>): void\n {\n this.displayDate = value;\n this.periodData = [];\n this._thisMonthData = [];\n const currentMonthDate = this.displayDate.value;\n const today = this._dateApi.now().value;\n\n this.displayDate\n .startOfMonth()\n .updateOriginal()\n .startOfWeek();\n\n do\n {\n for(let x = 0; x < 7; x++)\n {\n const day = this.displayDate.dayOfMonth();\n const otherMonth = !this.displayDate.isSameMonth(currentMonthDate);\n const data = \n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n otherMonth: otherMonth,\n today: this.displayDate.isSameDay(today),\n weekend: this.displayDate.isWeekend(),\n day: day\n };\n\n this.periodData.push(data);\n\n if(!otherMonth)\n {\n this._thisMonthData.push(data);\n }\n\n this.displayDate.addDays(1);\n }\n }\n while(this.displayDate.isSameMonth(currentMonthDate));\n\n this.displayDate.resetOriginal();\n\n //can go down set minutes and hours\n if(this.canGoDown)\n {\n this.displayDate\n .minute(this._originalMinute)\n .hour(this._originalHour);\n }\n\n this._updateMinMax();\n\n //set value if exists\n if(this._value && (this.displayDate.isSameMonth(this._value.from!) || this.displayDate.isSameMonth(this._value.to!)))\n {\n this.setValue(this._value);\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Obtains end of period\n * @param period - Period for which should be end obtained\n */\n protected _endOfPeriod(period: PeriodData<TDate>): TDate\n {\n return this._dateApi.getValue(period.date).endOfDay().value;\n }\n\n /**\n * Tests whether provided value is in same period as displayed picker\n * @param val - Tested value for same period as displayed picker\n */\n protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean\n {\n return val.isSameMonth(this.displayDate!.value);\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameDay(target);\n }\n\n /**\n * Gets period data for specified value\n * @param val - Value for which is period data obtained\n */\n protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>\n {\n return this._thisMonthData[val.dayOfMonth() - 1];\n }\n}","<div [ngClass]=\"cssClasses.periodSelection | asRequired\">\r\n <div [ngClass]=\"cssClasses.previousPeriod | asRequired\" (mousedown)=\"previousMonth($event)\"></div>\r\n <div [ngClass]=\"cssClasses.periodValue | asRequired | mergeCssClasses: [{'clickable': canGoUp}]\" (mousedown)=\"goUp($event)\">{{displayDate?.format('MMMM yyyy')}}</div>\r\n <div [ngClass]=\"cssClasses.nextPeriod | asRequired\" (mousedown)=\"nextMonth($event)\"></div>\r\n</div>\r\n\r\n<div [ngClass]=\"cssClasses.periodData | asRequired\">\r\n <div [ngClass]=\"cssClasses.weekdayName | asRequired\" *ngFor=\"let weekday of weekdays\">{{weekday}}</div>\r\n <div *ngFor=\"let day of periodData\"\r\n [ngClass]=\"cssClasses.periodDatum | asRequired\"\r\n [class.other-month]=\"day.otherMonth\"\r\n [class.today]=\"day.today\"\r\n [class.weekend]=\"day.weekend\"\r\n [class.active]=\"day.active\"\r\n [class.disabled]=\"day.disabled\"\r\n (mousedown)=\"select($event, day)\">{{day.day}}</div>\r\n</div>\r\n\r\n<div class=\"flex-row\" style=\"justify-content: center; border-top: 1px solid #FFF;\" *ngIf=\"canGoDown\">\r\n <div [class.clickable]=\"canGoDown\" (mousedown)=\"goDown($event)\">{{timeValue?.from | dateFormat: 'time'}}</div>\r\n</div>"]}
@@ -1 +1 @@
1
- {"version":3,"file":"monthPicker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/monthPicker/monthPicker.component.ts","../../../../../../src/legacy/picker/components/monthPicker/monthPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;;;;AAG5D;;GAEG;AACH,MAAM,aAAa,GACnB;IACI,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,6BAA6B;IAC7C,UAAU,EAAE,8BAA8B;IAC1C,WAAW,EAAE,cAAc;IAC3B,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,wBAAwB;IACrC,SAAS,EAAE,WAAW;CACzB,CAAC;AAEF;;GAEG;AAQH,MAA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AI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;QACjC,IAAI,CAAC,aAAa,EAAE,CAAC;QAErB,qBAAqB;QACrB,IAAG,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,IAAK,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAG,CAAC,CAAC,EAClH;YACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9B;IACL,CAAC;IAED,uEAAuE;IAEvE;;;OAGG;IACO,YAAY,CAAC,MAAyB;QAE5C,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC;IAClE,CAAC;IAED;;;OAGG;IACO,wBAAwB,CAAC,GAAyB;QAExD,OAAO,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,WAAY,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACO,aAAa,CAAC,GAAyB,EAAE,MAAa;QAE5D,OAAO,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACO,cAAc,CAAC,GAAyB;QAE9C,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;IACxC,CAAC;;yHAhHQ,4BAA4B,kBAGjB,QAAQ;6GAHnB,4BAA4B,qFCjCzC,gxBAYM;2FDqBO,4BAA4B;kBAPxC,SAAS;+BAEI,wBAAwB,mBAGjB,uBAAuB,CAAC,MAAM;;0BAKlC,MAAM;2BAAC,QAAQ","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef} from '@angular/core';\nimport {extend} from '@jscrpt/common';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../../services/dateApi/dateApi.interface';\nimport {DateTimePicker, MonthData, PeriodData} from '../../misc/datetimePicker.interface';\nimport {PickerBaseComponent} from '../pickerBase.component';\nimport {MonthPickerCssClasses} from './monthPicker.interfaces';\n\n/**\n * Default styles for picker\n */\nconst defaultStyles: MonthPickerCssClasses =\n{\n periodSelection: 'period',\n previousPeriod: 'fas fa-angle-left clickable',\n nextPeriod: 'fas fa-angle-right clickable',\n periodValue: 'period-value',\n periodData: 'period-data',\n periodDatum: 'period-datum clickable',\n clickable: 'clickable'\n};\n\n/**\n * Component used for displaying month picker\n */\n@Component(\n{\n selector: 'date-time-month-picker',\n templateUrl: 'monthPicker.component.html',\n styleUrls: ['monthPicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeMonthPickerComponent<TDate = any> extends PickerBaseComponent<TDate, MonthData<TDate>, MonthPickerCssClasses> implements DateTimePicker<TDate, MonthPickerCssClasses>\n{\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n changeDetector: ChangeDetectorRef)\n {\n super(dateApi, changeDetector);\n\n this.cssClasses = extend(true, {}, defaultStyles);\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed year to next year\n * @param event - Event that occured\n * @internal\n */\n public nextYear(event: Event)\n {\n event.preventDefault();\n this.displayDate!.addYears(1);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Changes displayed year to previous year\n * @param event - Event that occured\n * @internal\n */\n public previousYear(event: Event)\n {\n event.preventDefault();\n this.displayDate!.subtractYears(1);\n\n this.display(this.displayDate!);\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n public display(value: DateApiObject<TDate>): void\n {\n this.displayDate = value;\n\n const monthOfYear = this.displayDate.startOfYear().updateOriginal();\n this.periodData = [];\n\n for(let x = 0; x < 12; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: monthOfYear.value,\n name: monthOfYear.format('MMM')\n });\n\n monthOfYear.addMonths(1);\n }\n\n this.displayDate.resetOriginal();\n this._updateMinMax();\n\n //set value if exists\n if(this._value && (this.displayDate.isSameYear(this._value.from!) || this.displayDate.isSameYear(this._value.to!)))\n {\n this.setValue(this._value);\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Obtains end of period\n * @param period - Period for which should be end obtained\n */\n protected _endOfPeriod(period: PeriodData<TDate>): TDate\n {\n return this._dateApi.getValue(period.date).endOfMonth().value;\n }\n\n /**\n * Tests whether provided value is in same period as displayed picker\n * @param val - Tested value for same period as displayed picker\n */\n protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean\n {\n return val.isSameYear(this.displayDate!.value);\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameMonth(target);\n }\n\n /**\n * Gets period data for specified value\n * @param val - Value for which is period data obtained\n */\n protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>\n {\n return this.periodData[val.month()];\n }\n}","<div [ngClass]=\"cssClasses.periodSelection | asRequired\">\r\n <div [ngClass]=\"cssClasses.previousPeriod | asRequired\" (mousedown)=\"previousYear($event)\"></div>\r\n <div [ngClass]=\"cssClasses.periodValue | asRequired\" [class.clickable]=\"canGoUp\" (mousedown)=\"goUp($event)\">{{displayDate?.format('yyyy')}}</div>\r\n <div [ngClass]=\"cssClasses.nextPeriod | asRequired\" (mousedown)=\"nextYear($event)\"></div>\r\n</div>\r\n\r\n<div [ngClass]=\"cssClasses.periodData | asRequired\">\r\n <div *ngFor=\"let month of periodData\"\r\n [ngClass]=\"cssClasses.periodDatum | asRequired\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"select($event, month)\">{{month.name}}</div>\r\n</div>"]}
1
+ {"version":3,"file":"monthPicker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/monthPicker/monthPicker.component.ts","../../../../../../src/legacy/picker/components/monthPicker/monthPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;;;;AAG5D;;GAEG;AACH,MAAM,aAAa,GACnB;IACI,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,6BAA6B;IAC7C,UAAU,EAAE,8BAA8B;IAC1C,WAAW,EAAE,cAAc;IAC3B,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,wBAAwB;IACrC,SAAS,EAAE,WAAW;CACzB,CAAC;AAEF;;GAEG;AAQH,MAAM,OAAO,4BAA0C,SAAQ,mBAAmE;IAE9H,iEAAiE;IACjE,YAA8B,OAAuB,EACzC,cAAiC;QAEzC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAE/B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC;IACtD,CAAC;IAED,wFAAwF;IAExF;;;;OAIG;IACI,QAAQ,CAAC,KAAY;QAExB,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,WAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAE9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAY,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACI,YAAY,CAAC,KAAY;QAE5B,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,WAAY,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAEnC,IAAI,CAAC,OAAO,CAAC,IAAI,CA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AAI,CAAC,WAAY,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACO,aAAa,CAAC,GAAyB,EAAE,MAAa;QAE5D,OAAO,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACO,cAAc,CAAC,GAAyB;QAE9C,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;IACxC,CAAC;;yHAhHQ,4BAA4B,kBAGjB,QAAQ;6GAHnB,4BAA4B,qFCjCzC,gxBAYM;2FDqBO,4BAA4B;kBAPxC,SAAS;+BAEI,wBAAwB,mBAGjB,uBAAuB,CAAC,MAAM;;0BAKlC,MAAM;2BAAC,QAAQ","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef} from '@angular/core';\nimport {extend} from '@jscrpt/common';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../../services/dateApi/dateApi.interface';\nimport {DateTimeLegacyPicker, MonthData, PeriodData} from '../../misc/datetimePicker.interface';\nimport {PickerBaseComponent} from '../pickerBase.component';\nimport {MonthPickerCssClasses} from './monthPicker.interfaces';\n\n/**\n * Default styles for picker\n */\nconst defaultStyles: MonthPickerCssClasses =\n{\n periodSelection: 'period',\n previousPeriod: 'fas fa-angle-left clickable',\n nextPeriod: 'fas fa-angle-right clickable',\n periodValue: 'period-value',\n periodData: 'period-data',\n periodDatum: 'period-datum clickable',\n clickable: 'clickable'\n};\n\n/**\n * Component used for displaying month picker\n */\n@Component(\n{\n selector: 'date-time-month-picker',\n templateUrl: 'monthPicker.component.html',\n styleUrls: ['monthPicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeMonthPickerComponent<TDate = any> extends PickerBaseComponent<TDate, MonthData<TDate>, MonthPickerCssClasses> implements DateTimeLegacyPicker<TDate, MonthPickerCssClasses>\n{\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n changeDetector: ChangeDetectorRef)\n {\n super(dateApi, changeDetector);\n\n this.cssClasses = extend(true, {}, defaultStyles);\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed year to next year\n * @param event - Event that occured\n * @internal\n */\n public nextYear(event: Event)\n {\n event.preventDefault();\n this.displayDate!.addYears(1);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Changes displayed year to previous year\n * @param event - Event that occured\n * @internal\n */\n public previousYear(event: Event)\n {\n event.preventDefault();\n this.displayDate!.subtractYears(1);\n\n this.display(this.displayDate!);\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n public display(value: DateApiObject<TDate>): void\n {\n this.displayDate = value;\n\n const monthOfYear = this.displayDate.startOfYear().updateOriginal();\n this.periodData = [];\n\n for(let x = 0; x < 12; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: monthOfYear.value,\n name: monthOfYear.format('MMM')\n });\n\n monthOfYear.addMonths(1);\n }\n\n this.displayDate.resetOriginal();\n this._updateMinMax();\n\n //set value if exists\n if(this._value && (this.displayDate.isSameYear(this._value.from!) || this.displayDate.isSameYear(this._value.to!)))\n {\n this.setValue(this._value);\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Obtains end of period\n * @param period - Period for which should be end obtained\n */\n protected _endOfPeriod(period: PeriodData<TDate>): TDate\n {\n return this._dateApi.getValue(period.date).endOfMonth().value;\n }\n\n /**\n * Tests whether provided value is in same period as displayed picker\n * @param val - Tested value for same period as displayed picker\n */\n protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean\n {\n return val.isSameYear(this.displayDate!.value);\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameMonth(target);\n }\n\n /**\n * Gets period data for specified value\n * @param val - Value for which is period data obtained\n */\n protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>\n {\n return this.periodData[val.month()];\n }\n}","<div [ngClass]=\"cssClasses.periodSelection | asRequired\">\r\n <div [ngClass]=\"cssClasses.previousPeriod | asRequired\" (mousedown)=\"previousYear($event)\"></div>\r\n <div [ngClass]=\"cssClasses.periodValue | asRequired\" [class.clickable]=\"canGoUp\" (mousedown)=\"goUp($event)\">{{displayDate?.format('yyyy')}}</div>\r\n <div [ngClass]=\"cssClasses.nextPeriod | asRequired\" (mousedown)=\"nextYear($event)\"></div>\r\n</div>\r\n\r\n<div [ngClass]=\"cssClasses.periodData | asRequired\">\r\n <div *ngFor=\"let month of periodData\"\r\n [ngClass]=\"cssClasses.periodDatum | asRequired\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"select($event, month)\">{{month.name}}</div>\r\n</div>"]}
@@ -26,7 +26,7 @@ const defaultConfiguration = {
26
26
  /**
27
27
  * Component used for displaying date time picker
28
28
  */
29
- export class DateTimePickerComponent {
29
+ export class DateTimePickerLegacyComponent {
30
30
  //######################### constructor #########################
31
31
  constructor(configuration, _dateApi, _changeDetector) {
32
32
  this._dateApi = _dateApi;
@@ -215,9 +215,9 @@ export class DateTimePickerComponent {
215
215
  }
216
216
  }
217
217
  }
218
- DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: DATE_TIME_PICKER_CONFIGURATION, optional: true }, { token: DATE_API }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
219
- DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: DateTimePickerComponent, selector: "date-time-picker", inputs: { options: "options", value: "value", minValue: "minValue", maxValue: "maxValue" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div [@scaleUpDown]=\"activePickerIndex\">\r\n <ng-template [ngComponentOutletEx]=\"activePickerComponent!\" (ngComponentOutletExCreated)=\"pickerCreated($event!)\"></ng-template>\r\n</div>", styles: [":host\r\n{\r\n display: inline-block;\r\n}"], dependencies: [{ kind: "directive", type: i1.NgComponentOutletEx, selector: "[ngComponentOutletEx]", inputs: ["ngComponentOutletEx", "ngComponentOutletExInjector", "ngComponentOutletExContent"], outputs: ["ngComponentOutletExCreated"], exportAs: ["ngComponentOutletEx"] }], animations: [scaleUpDownTrigger], changeDetection: i0.ChangeDetectionStrategy.OnPush });
220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerComponent, decorators: [{
218
+ DateTimePickerLegacyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerLegacyComponent, deps: [{ token: DATE_TIME_PICKER_CONFIGURATION, optional: true }, { token: DATE_API }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
219
+ DateTimePickerLegacyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: DateTimePickerLegacyComponent, selector: "date-time-picker", inputs: { options: "options", value: "value", minValue: "minValue", maxValue: "maxValue" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div [@scaleUpDown]=\"activePickerIndex\">\r\n <ng-template [ngComponentOutletEx]=\"activePickerComponent!\" (ngComponentOutletExCreated)=\"pickerCreated($event!)\"></ng-template>\r\n</div>", styles: [":host\r\n{\r\n display: inline-block;\r\n}"], dependencies: [{ kind: "directive", type: i1.NgComponentOutletEx, selector: "[ngComponentOutletEx]", inputs: ["ngComponentOutletEx", "ngComponentOutletExInjector", "ngComponentOutletExContent"], outputs: ["ngComponentOutletExCreated"], exportAs: ["ngComponentOutletEx"] }], animations: [scaleUpDownTrigger], changeDetection: i0.ChangeDetectionStrategy.OnPush });
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerLegacyComponent, decorators: [{
221
221
  type: Component,
222
222
  args: [{ selector: 'date-time-picker', animations: [scaleUpDownTrigger], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [@scaleUpDown]=\"activePickerIndex\">\r\n <ng-template [ngComponentOutletEx]=\"activePickerComponent!\" (ngComponentOutletExCreated)=\"pickerCreated($event!)\"></ng-template>\r\n</div>", styles: [":host\r\n{\r\n display: inline-block;\r\n}"] }]
223
223
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"picker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/picker/picker.component.ts","../../../../../../src/legacy/picker/components/picker/picker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAgB,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAY,MAAM,eAAe,CAAC;AAC5J,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAGlC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,8BAA8B,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,0BAA0B,EAAC,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAC,4BAA4B,EAAC,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAC,2BAA2B,EAAC,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;;;AAEjE,sBAAsB;AAEtB;;GAEG;AACH,MAAM,oBAAoB,GAC1B;IACI,aAAa,EAAE,KAAK;IACpB,uBAAuB,EACvB;QACI,KAAK,EAAE,0BAA0B;QACjC,OAAO,EAAE,4BAA4B;QACrC,MAAM,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E/I,MAAM,CAAC,iBAAiB,EAAE,CAAC;IAC/B,CAAC;IAED,uEAAuE;IAEvE;;OAEG;IACO,oBAAoB;;QAE1B,IAAG,CAAC,IAAI,CAAC,aAAa,EACtB;YACI,OAAO;SACV;QAED,iBAAiB;QACjB,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,MAAA,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,0CAAE,YAAY,mCAAI,EAAE,CAAC,CAAC;QAEhF,IAAG,CAAA,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,0CAAE,YAAY,MAAI,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,0CAAE,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA,EAC7G;YACI,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,0CAAE,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACrG;IACL,CAAC;;oHA5RQ,uBAAuB,kBAyIA,8BAA8B,6BAC1C,QAAQ;wGA1InB,uBAAuB,6LC7CpC,kMAEM,2VDwCU,CAAC,kBAAkB,CAAC;2FAGvB,uBAAuB;kBARnC,SAAS;+BAEI,kBAAkB,cAGhB,CAAC,kBAAkB,CAAC,mBACf,uBAAuB,CAAC,MAAM;;0BA2IlC,QAAQ;;0BAAI,MAAM;2BAAC,8BAA8B;;0BACjD,MAAM;2BAAC,QAAQ;4EArEjB,OAAO;sBADjB,KAAK;gBAoBK,KAAK;sBADf,KAAK;gBAiBK,QAAQ;sBADlB,KAAK;gBAeK,QAAQ;sBADlB,KAAK;gBAiBC,WAAW;sBADjB,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, Optional, Inject, Input, Type, OnInit, EventEmitter, Output, ChangeDetectorRef, OnDestroy} from '@angular/core';\nimport {extend} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi} from '../../../../services';\nimport {DateTimePicker, DateTimePickerOptions} from '../../misc/datetimePicker.interface';\nimport {DATE_TIME_PICKER_CONFIGURATION} from '../../misc/tokens';\nimport {DateTimeDayPickerComponent} from '../dayPicker/dayPicker.component';\nimport {DateTimeMonthPickerComponent} from '../monthPicker/monthPicker.component';\nimport {DateTimeYearPickerComponent} from '../yearPicker/yearPicker.component';\nimport {scaleUpDownTrigger} from './picker.component.animations';\n\n//TODO - merge options\n\n/**\n * Default configuration for picker\n */\nconst defaultConfiguration: DateTimePickerOptions<DateTimePicker> =\n{\n defaultPeriod: 'day',\n pickerPeriodsDefinition:\n {\n 'day': DateTimeDayPickerComponent,\n 'month': DateTimeMonthPickerComponent,\n 'year': DateTimeYearPickerComponent\n },\n pickerPeriodsOrder: null,\n cssClasses:\n {\n }\n};\n\n/**\n * Component used for displaying date time picker\n */\n@Component(\n{\n selector: 'date-time-picker',\n templateUrl: 'picker.component.html',\n styleUrls: ['picker.component.css'],\n animations: [scaleUpDownTrigger],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimePickerComponent<TDate = any> implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of active date time picker\n */\n protected _activePicker?: DateTimePicker<TDate>;\n\n /**\n * Name, id of displayed picker\n */\n protected _activePickerName!: string;\n\n /**\n * Array of available picker names\n */\n protected _pickerNames: string[] = [];\n\n /**\n * Current selected value\n */\n protected _value: DateTimeValue<TDate>|null = null;\n\n /**\n * All subscriptions for active picker\n */\n protected _activePickerSubscriptions: Subscription = new Subscription();\n\n /**\n * Date that should be displayed in picker, used when moving up or down in periods\n */\n protected _display?: TDate;\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 /**\n * Current options used by picker\n */\n protected _options: DateTimePickerOptions<DateTimePicker<TDate>>;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Currently active date time picker component type\n * @internal\n */\n public activePickerComponent?: Type<DateTimePicker<TDate>>;\n\n /**\n * Active picker index\n * @internal\n */\n public activePickerIndex: number = 0;\n\n //######################### public properties - inputs #########################\n\n /**\n * Current options used by picker\n */\n @Input()\n public get options(): Partial<DateTimePickerOptions<DateTimePicker<TDate>>>\n {\n return this._options;\n }\n public set options(value: Partial<DateTimePickerOptions<DateTimePicker<TDate>>>)\n {\n this._options = extend(true, this._options, value);\n\n // without deep-copy for this attribute\n if (value?.pickerPeriodsDefinition)\n {\n this._options.pickerPeriodsDefinition = value.pickerPeriodsDefinition;\n }\n }\n\n /**\n * Current selected value\n */\n @Input()\n public get value(): DateTimeValue<TDate>|null\n {\n return this._value;\n }\n public set value(value: DateTimeValue<TDate>|null)\n {\n this._value = value;\n\n this._activePicker?.setValue(value);\n this._activePicker?.invalidateVisuals();\n }\n\n /**\n * Gets or sets minimal possible value for picker, that can be picked\n */\n @Input()\n public get minValue(): TDate|null\n {\n return this._minValue;\n }\n public set minValue(value: TDate|null)\n {\n this._minValue = value;\n this._activePicker?.setMinValue(this._minValue);\n }\n\n /**\n * Gets or sets maximal possible value for picker, that can be picked\n */\n @Input()\n public get maxValue(): TDate|null\n {\n return this._maxValue;\n }\n public set maxValue(value: TDate|null)\n {\n this._maxValue = value;\n this._activePicker?.setMaxValue(this._maxValue);\n }\n\n //######################### public properties - outputs #########################\n\n /**\n * Occurs when value changes\n */\n @Output()\n public valueChange: EventEmitter<DateTimeValue<TDate>> = new EventEmitter<DateTimeValue<TDate>>();\n\n //######################### constructor #########################\n constructor(@Optional() @Inject(DATE_TIME_PICKER_CONFIGURATION) configuration: Partial<DateTimePickerOptions<DateTimePicker<TDate>>>,\n @Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n protected _changeDetector: ChangeDetectorRef)\n {\n this._options = extend(true, {}, defaultConfiguration, configuration);\n // without deep-copy for this attribute\n if (configuration?.pickerPeriodsDefinition)\n {\n this._options.pickerPeriodsDefinition = configuration.pickerPeriodsDefinition;\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n\n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n if (this._options.pickerPeriodsOrder)\n {\n if (Array.isArray(this._options.pickerPeriodsOrder))\n {\n this._pickerNames = this._options.pickerPeriodsOrder;\n }\n else\n {\n this._pickerNames = this._options.pickerPeriodsOrder.split(',')\n .map(x => x.trim())\n .filter(x => x);\n }\n }\n if (this._pickerNames && this._pickerNames.length > 0)\n {\n this._pickerNames.forEach(x => \n {\n if(!this._options.pickerPeriodsDefinition![x!])\n {\n throw new Error(`There is no period '${x}' in picker options`);\n }\n });\n }\n else\n {\n this._pickerNames = Object.keys(this._options.pickerPeriodsDefinition!);\n }\n\n if(this._pickerNames.findIndex(x => x == this._options.defaultPeriod) < 0)\n {\n throw new Error(`There is no period '${this._options.defaultPeriod}' in picker options`);\n }\n\n this.activePickerComponent = this._options.pickerPeriodsDefinition![this._options.defaultPeriod!];\n this._activePickerName = this._options.defaultPeriod!;\n this.activePickerIndex = this._pickerNames.indexOf(this._activePickerName);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._display = undefined;\n this._activePickerSubscriptions.unsubscribe();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Handles created or destroyed date time picker instance\n * @param picker - Instance of picker or null\n * @internal\n */\n public pickerCreated(picker: DateTimePicker<TDate>): void\n {\n if(picker == this._activePicker)\n {\n return;\n }\n\n this._activePicker = picker;\n\n this._activePickerSubscriptions.unsubscribe();\n this._activePickerSubscriptions = new Subscription();\n\n if(!this._activePicker)\n {\n return;\n }\n\n this._activePickerSubscriptions.add(picker.valueChange.subscribe(() =>\n {\n this._value = picker.value;\n this.valueChange.emit(this._value!);\n }));\n\n this._activePickerSubscriptions.add(picker.scaleUp.subscribe(display =>\n {\n this._display = display;\n const index = this._pickerNames.indexOf(this._activePickerName) + 1;\n this._activePickerName = this._pickerNames[index];\n this.activePickerIndex = this._pickerNames.indexOf(this._activePickerName);\n this.activePickerComponent = this._options.pickerPeriodsDefinition![this._activePickerName];\n }));\n\n this._activePickerSubscriptions.add(picker.scaleDown.subscribe(display =>\n {\n this._display = display;\n const index = this._pickerNames.indexOf(this._activePickerName) - 1;\n this._activePickerName = this._pickerNames[index];\n this.activePickerIndex = this._pickerNames.indexOf(this._activePickerName);\n this.activePickerComponent = this._options.pickerPeriodsDefinition![this._activePickerName];\n }));\n\n picker.setCanGoDown(this._pickerNames.indexOf(this._activePickerName) > 0);\n picker.setCanGoUp(this._pickerNames.indexOf(this._activePickerName) < this._pickerNames.length - 1);\n\n this._setPickerCssClasses();\n picker.setValue(this._value);\n picker.setMinValue(this._minValue);\n picker.setMaxValue(this._maxValue);\n picker.display(this._display ? this._dateApi.getValue(this._display) : this._dateApi.getValue(this._value?.from ?? this._dateApi.now().value));\n\n picker.invalidateVisuals();\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets picker css classes\n */\n protected _setPickerCssClasses(): void\n {\n if(!this._activePicker)\n {\n return;\n }\n\n //sets shared css\n this._activePicker.setCssClasses(this._options?.cssClasses?.pickerShared ?? {});\n\n if(this._options?.cssClasses?.pickerCustom && this._options?.cssClasses?.pickerCustom[this._activePickerName])\n {\n this._activePicker.setCssClasses(this._options?.cssClasses?.pickerCustom[this._activePickerName]);\n }\n }\n}\n","<div [@scaleUpDown]=\"activePickerIndex\">\r\n <ng-template [ngComponentOutletEx]=\"activePickerComponent!\" (ngComponentOutletExCreated)=\"pickerCreated($event!)\"></ng-template>\r\n</div>"]}
1
+ {"version":3,"file":"picker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/picker/picker.component.ts","../../../../../../src/legacy/picker/components/picker/picker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,E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C,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACrG;IACL,CAAC;;0HA5RQ,6BAA6B,kBAyIN,8BAA8B,6BAC1C,QAAQ;8GA1InB,6BAA6B,6LC7C1C,kMAEM,2VDwCU,CAAC,kBAAkB,CAAC;2FAGvB,6BAA6B;kBARzC,SAAS;+BAEI,kBAAkB,cAGhB,CAAC,kBAAkB,CAAC,mBACf,uBAAuB,CAAC,MAAM;;0BA2IlC,QAAQ;;0BAAI,MAAM;2BAAC,8BAA8B;;0BACjD,MAAM;2BAAC,QAAQ;4EArEjB,OAAO;sBADjB,KAAK;gBAoBK,KAAK;sBADf,KAAK;gBAiBK,QAAQ;sBADlB,KAAK;gBAeK,QAAQ;sBADlB,KAAK;gBAiBC,WAAW;sBADjB,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, Optional, Inject, Input, Type, OnInit, EventEmitter, Output, ChangeDetectorRef, OnDestroy} from '@angular/core';\nimport {extend} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi} from '../../../../services';\nimport {DateTimeLegacyPicker, DateTimePickerLegacyOptions} from '../../misc/datetimePicker.interface';\nimport {DATE_TIME_PICKER_CONFIGURATION} from '../../misc/tokens';\nimport {DateTimeDayPickerComponent} from '../dayPicker/dayPicker.component';\nimport {DateTimeMonthPickerComponent} from '../monthPicker/monthPicker.component';\nimport {DateTimeYearPickerComponent} from '../yearPicker/yearPicker.component';\nimport {scaleUpDownTrigger} from './picker.component.animations';\n\n//TODO - merge options\n\n/**\n * Default configuration for picker\n */\nconst defaultConfiguration: DateTimePickerLegacyOptions<DateTimeLegacyPicker> =\n{\n defaultPeriod: 'day',\n pickerPeriodsDefinition:\n {\n 'day': DateTimeDayPickerComponent,\n 'month': DateTimeMonthPickerComponent,\n 'year': DateTimeYearPickerComponent\n },\n pickerPeriodsOrder: null,\n cssClasses:\n {\n }\n};\n\n/**\n * Component used for displaying date time picker\n */\n@Component(\n{\n selector: 'date-time-picker',\n templateUrl: 'picker.component.html',\n styleUrls: ['picker.component.css'],\n animations: [scaleUpDownTrigger],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimePickerLegacyComponent<TDate = any> implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of active date time picker\n */\n protected _activePicker?: DateTimeLegacyPicker<TDate>;\n\n /**\n * Name, id of displayed picker\n */\n protected _activePickerName!: string;\n\n /**\n * Array of available picker names\n */\n protected _pickerNames: string[] = [];\n\n /**\n * Current selected value\n */\n protected _value: DateTimeValue<TDate>|null = null;\n\n /**\n * All subscriptions for active picker\n */\n protected _activePickerSubscriptions: Subscription = new Subscription();\n\n /**\n * Date that should be displayed in picker, used when moving up or down in periods\n */\n protected _display?: TDate;\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 /**\n * Current options used by picker\n */\n protected _options: DateTimePickerLegacyOptions<DateTimeLegacyPicker<TDate>>;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Currently active date time picker component type\n * @internal\n */\n public activePickerComponent?: Type<DateTimeLegacyPicker<TDate>>;\n\n /**\n * Active picker index\n * @internal\n */\n public activePickerIndex: number = 0;\n\n //######################### public properties - inputs #########################\n\n /**\n * Current options used by picker\n */\n @Input()\n public get options(): Partial<DateTimePickerLegacyOptions<DateTimeLegacyPicker<TDate>>>\n {\n return this._options;\n }\n public set options(value: Partial<DateTimePickerLegacyOptions<DateTimeLegacyPicker<TDate>>>)\n {\n this._options = extend(true, this._options, value);\n\n // without deep-copy for this attribute\n if (value?.pickerPeriodsDefinition)\n {\n this._options.pickerPeriodsDefinition = value.pickerPeriodsDefinition;\n }\n }\n\n /**\n * Current selected value\n */\n @Input()\n public get value(): DateTimeValue<TDate>|null\n {\n return this._value;\n }\n public set value(value: DateTimeValue<TDate>|null)\n {\n this._value = value;\n\n this._activePicker?.setValue(value);\n this._activePicker?.invalidateVisuals();\n }\n\n /**\n * Gets or sets minimal possible value for picker, that can be picked\n */\n @Input()\n public get minValue(): TDate|null\n {\n return this._minValue;\n }\n public set minValue(value: TDate|null)\n {\n this._minValue = value;\n this._activePicker?.setMinValue(this._minValue);\n }\n\n /**\n * Gets or sets maximal possible value for picker, that can be picked\n */\n @Input()\n public get maxValue(): TDate|null\n {\n return this._maxValue;\n }\n public set maxValue(value: TDate|null)\n {\n this._maxValue = value;\n this._activePicker?.setMaxValue(this._maxValue);\n }\n\n //######################### public properties - outputs #########################\n\n /**\n * Occurs when value changes\n */\n @Output()\n public valueChange: EventEmitter<DateTimeValue<TDate>> = new EventEmitter<DateTimeValue<TDate>>();\n\n //######################### constructor #########################\n constructor(@Optional() @Inject(DATE_TIME_PICKER_CONFIGURATION) configuration: Partial<DateTimePickerLegacyOptions<DateTimeLegacyPicker<TDate>>>,\n @Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n protected _changeDetector: ChangeDetectorRef)\n {\n this._options = extend(true, {}, defaultConfiguration, configuration);\n // without deep-copy for this attribute\n if (configuration?.pickerPeriodsDefinition)\n {\n this._options.pickerPeriodsDefinition = configuration.pickerPeriodsDefinition;\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n\n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n if (this._options.pickerPeriodsOrder)\n {\n if (Array.isArray(this._options.pickerPeriodsOrder))\n {\n this._pickerNames = this._options.pickerPeriodsOrder;\n }\n else\n {\n this._pickerNames = this._options.pickerPeriodsOrder.split(',')\n .map(x => x.trim())\n .filter(x => x);\n }\n }\n if (this._pickerNames && this._pickerNames.length > 0)\n {\n this._pickerNames.forEach(x => \n {\n if(!this._options.pickerPeriodsDefinition![x!])\n {\n throw new Error(`There is no period '${x}' in picker options`);\n }\n });\n }\n else\n {\n this._pickerNames = Object.keys(this._options.pickerPeriodsDefinition!);\n }\n\n if(this._pickerNames.findIndex(x => x == this._options.defaultPeriod) < 0)\n {\n throw new Error(`There is no period '${this._options.defaultPeriod}' in picker options`);\n }\n\n this.activePickerComponent = this._options.pickerPeriodsDefinition![this._options.defaultPeriod!];\n this._activePickerName = this._options.defaultPeriod!;\n this.activePickerIndex = this._pickerNames.indexOf(this._activePickerName);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._display = undefined;\n this._activePickerSubscriptions.unsubscribe();\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Handles created or destroyed date time picker instance\n * @param picker - Instance of picker or null\n * @internal\n */\n public pickerCreated(picker: DateTimeLegacyPicker<TDate>): void\n {\n if(picker == this._activePicker)\n {\n return;\n }\n\n this._activePicker = picker;\n\n this._activePickerSubscriptions.unsubscribe();\n this._activePickerSubscriptions = new Subscription();\n\n if(!this._activePicker)\n {\n return;\n }\n\n this._activePickerSubscriptions.add(picker.valueChange.subscribe(() =>\n {\n this._value = picker.value;\n this.valueChange.emit(this._value!);\n }));\n\n this._activePickerSubscriptions.add(picker.scaleUp.subscribe(display =>\n {\n this._display = display;\n const index = this._pickerNames.indexOf(this._activePickerName) + 1;\n this._activePickerName = this._pickerNames[index];\n this.activePickerIndex = this._pickerNames.indexOf(this._activePickerName);\n this.activePickerComponent = this._options.pickerPeriodsDefinition![this._activePickerName];\n }));\n\n this._activePickerSubscriptions.add(picker.scaleDown.subscribe(display =>\n {\n this._display = display;\n const index = this._pickerNames.indexOf(this._activePickerName) - 1;\n this._activePickerName = this._pickerNames[index];\n this.activePickerIndex = this._pickerNames.indexOf(this._activePickerName);\n this.activePickerComponent = this._options.pickerPeriodsDefinition![this._activePickerName];\n }));\n\n picker.setCanGoDown(this._pickerNames.indexOf(this._activePickerName) > 0);\n picker.setCanGoUp(this._pickerNames.indexOf(this._activePickerName) < this._pickerNames.length - 1);\n\n this._setPickerCssClasses();\n picker.setValue(this._value);\n picker.setMinValue(this._minValue);\n picker.setMaxValue(this._maxValue);\n picker.display(this._display ? this._dateApi.getValue(this._display) : this._dateApi.getValue(this._value?.from ?? this._dateApi.now().value));\n\n picker.invalidateVisuals();\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets picker css classes\n */\n protected _setPickerCssClasses(): void\n {\n if(!this._activePicker)\n {\n return;\n }\n\n //sets shared css\n this._activePicker.setCssClasses(this._options?.cssClasses?.pickerShared ?? {});\n\n if(this._options?.cssClasses?.pickerCustom && this._options?.cssClasses?.pickerCustom[this._activePickerName])\n {\n this._activePicker.setCssClasses(this._options?.cssClasses?.pickerCustom[this._activePickerName]);\n }\n }\n}\n","<div [@scaleUpDown]=\"activePickerIndex\">\r\n <ng-template [ngComponentOutletEx]=\"activePickerComponent!\" (ngComponentOutletExCreated)=\"pickerCreated($event!)\"></ng-template>\r\n</div>"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pickerBase.component.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/components/pickerBase.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAGnE,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;;AAEnE;;GAEG;AAEH,MAAM,OAAgB,mBAAkG,SAAQ,uBAA2C;IAsBvK,iEAAiE;IACjE,YAA8B,OAAuB,EACzC,cAAiC;QAEzC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAxBnC,sEAAsE;QAEtE;;WAEG;QACO,kBAAa,GAAW,CAAC,CAAC;QAEpC;;WAEG;QACO,oBAAe,GAAW,CAAC,CAAC;QAEtC,2FAA2F;QAE3F;;;WAGG;QACI,eAAU,GAAgB,EAAE,CAAC;IAOpC,CAAC;IAED,wFAAwF;IAExF;;;;;OAKG;IACI,MAAM,CAAC,KAAY,EAAE,MAAyB;QAE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,SAAS,GAAG,KAAK,CAAC;QAEtB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAE7B,IAAG,CAAC,CAAC,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,EAClG;gBACI,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;aAC1B;YAED,IAAG,SAAS,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,EAClH;gBACI,SAAS,GAAG,IAAI,CAAC;gBACjB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;aAC1B;QACL,CAAC,CAAC,CAAC;IACP,CAAC;;gHA5KiB,mBAAmB,kBAuBjB,QAAQ;oGAvBV,mBAAmB;2FAAnB,mBAAmB;kBADxC,SAAS;;0BAwBO,MAAM;2BAAC,QAAQ","sourcesContent":["import {ChangeDetectorRef, Directive, Inject} from '@angular/core';\n\nimport {DateTimeValue} from '../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../services/dateApi/dateApi.interface';\nimport {DateTimePicker, PeriodData} from '../misc/datetimePicker.interface';\nimport {PickerImplBaseComponent} from './pickerImplBase.component';\n\n/**\n * Base class used as base for picker\n */\n@Directive()\nexport abstract class PickerBaseComponent<TDate = any, TDateData extends PeriodData<TDate> = any, TCssClasses = object> extends PickerImplBaseComponent<TDate, TCssClasses> implements DateTimePicker<TDate, TCssClasses>\n{\n //######################### protected fields #########################\n\n /**\n * Value of originaly set hour\n */\n protected _originalHour: number = 0;\n\n /**\n * Value of originaly set minute\n */\n protected _originalMinute: number = 0;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Array of period data to be displayed\n * @internal\n */\n public periodData: TDateData[] = [];\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n changeDetector: ChangeDetectorRef)\n {\n super(dateApi, changeDetector);\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Selects period\n * @param event - Event that occured\n * @param period - Selected period\n * @internal\n */\n public select(event: Event, period: PeriodData<TDate>): void\n {\n event.preventDefault();\n\n if(period.disabled)\n {\n return;\n }\n\n //handle selection of value\n if(!this.canGoDown)\n {\n this._setPeriod(period);\n\n this._value =\n {\n from: period.date,\n to: this._endOfPeriod(period)\n };\n\n this._valueChange.next();\n\n return;\n }\n\n this._scaleDown.next(period.date);\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\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 this._updateMinMax();\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 this._updateMinMax();\n }\n\n /**\n * Sets value of datetime picker\n * @param value - Value to be set to this picker\n */\n public setValue(value: DateTimeValue<TDate>|null): void\n {\n this._value = value;\n\n if(this._value)\n {\n this._originalHour = this._dateApi.getValue(this._value.from!).hour();\n this._originalMinute = this._dateApi.getValue(this._value.from!).minute();\n }\n\n //value is present\n if(this._value && this.displayDate)\n {\n const val = this._dateApi.getValue(this._value.from!);\n\n //change picker to value\n if(!this._isSamePeriodAsDisplayed(val))\n {\n this.display(val);\n\n return;\n }\n\n const period = this._getPeriodData(val);\n\n //was initialized\n if(period)\n {\n this._setPeriod(period);\n }\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets period as active\n * @param period - Period to be set as active\n */\n protected _setPeriod(period: PeriodData<TDate>): void\n {\n this.periodData.forEach(itm => itm.active = false);\n\n period.active = true;\n }\n\n /**\n * Updates minimal and maximal value for picker\n */\n protected _updateMinMax(): void\n {\n if(!this.periodData.length)\n {\n return;\n }\n\n //no min, no max\n if(!this._minValue && !this._maxValue)\n {\n this.periodData.forEach(itm => itm.disabled = false);\n\n return;\n }\n\n const minDateApi = this._minValue ? this._dateApi.getValue(this._minValue) : null;\n const maxDateApi = this._maxValue ? this._dateApi.getValue(this._maxValue) : null;\n let restAfter = false;\n\n this.periodData.forEach(period =>\n {\n if(!!minDateApi && minDateApi.isAfter(period.date) && !this._isSamePeriod(minDateApi, period.date))\n {\n period.disabled = true;\n }\n\n if(restAfter || (!!maxDateApi && maxDateApi.isBefore(period.date) && !this._isSamePeriod(maxDateApi, period.date)))\n {\n restAfter = true;\n period.disabled = true;\n }\n });\n }\n\n /**\n * Obtains end of period\n * @param period - Period for which should be end obtained\n */\n protected abstract _endOfPeriod(period: PeriodData<TDate>): TDate;\n\n /**\n * Tests whether provided value is in same period as displayed picker\n * @param val - Tested value for same period as displayed picker\n */\n protected abstract _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean;\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected abstract _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean;\n\n /**\n * Gets period data for specified value\n * @param val - Value for which is period data obtained\n */\n protected abstract _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>;\n}"]}
1
+ {"version":3,"file":"pickerBase.component.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/components/pickerBase.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAGnE,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;;AAEnE;;GAEG;AAEH,MAAM,OAAgB,mBAAkG,SAAQ,uBAA2C;IAsBvK,iEAAiE;IACjE,YAA8B,OA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V;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAClF,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAClF,IAAI,SAAS,GAAG,KAAK,CAAC;QAEtB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAE7B,IAAG,CAAC,CAAC,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,EAClG;gBACI,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;aAC1B;YAED,IAAG,SAAS,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,EAClH;gBACI,SAAS,GAAG,IAAI,CAAC;gBACjB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;aAC1B;QACL,CAAC,CAAC,CAAC;IACP,CAAC;;gHA5KiB,mBAAmB,kBAuBjB,QAAQ;oGAvBV,mBAAmB;2FAAnB,mBAAmB;kBADxC,SAAS;;0BAwBO,MAAM;2BAAC,QAAQ","sourcesContent":["import {ChangeDetectorRef, Directive, Inject} from '@angular/core';\n\nimport {DateTimeValue} from '../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../services/dateApi/dateApi.interface';\nimport {DateTimeLegacyPicker, PeriodData} from '../misc/datetimePicker.interface';\nimport {PickerImplBaseComponent} from './pickerImplBase.component';\n\n/**\n * Base class used as base for picker\n */\n@Directive()\nexport abstract class PickerBaseComponent<TDate = any, TDateData extends PeriodData<TDate> = any, TCssClasses = object> extends PickerImplBaseComponent<TDate, TCssClasses> implements DateTimeLegacyPicker<TDate, TCssClasses>\n{\n //######################### protected fields #########################\n\n /**\n * Value of originaly set hour\n */\n protected _originalHour: number = 0;\n\n /**\n * Value of originaly set minute\n */\n protected _originalMinute: number = 0;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Array of period data to be displayed\n * @internal\n */\n public periodData: TDateData[] = [];\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n changeDetector: ChangeDetectorRef)\n {\n super(dateApi, changeDetector);\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Selects period\n * @param event - Event that occured\n * @param period - Selected period\n * @internal\n */\n public select(event: Event, period: PeriodData<TDate>): void\n {\n event.preventDefault();\n\n if(period.disabled)\n {\n return;\n }\n\n //handle selection of value\n if(!this.canGoDown)\n {\n this._setPeriod(period);\n\n this._value =\n {\n from: period.date,\n to: this._endOfPeriod(period)\n };\n\n this._valueChange.next();\n\n return;\n }\n\n this._scaleDown.next(period.date);\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\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 this._updateMinMax();\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 this._updateMinMax();\n }\n\n /**\n * Sets value of datetime picker\n * @param value - Value to be set to this picker\n */\n public setValue(value: DateTimeValue<TDate>|null): void\n {\n this._value = value;\n\n if(this._value)\n {\n this._originalHour = this._dateApi.getValue(this._value.from!).hour();\n this._originalMinute = this._dateApi.getValue(this._value.from!).minute();\n }\n\n //value is present\n if(this._value && this.displayDate)\n {\n const val = this._dateApi.getValue(this._value.from!);\n\n //change picker to value\n if(!this._isSamePeriodAsDisplayed(val))\n {\n this.display(val);\n\n return;\n }\n\n const period = this._getPeriodData(val);\n\n //was initialized\n if(period)\n {\n this._setPeriod(period);\n }\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets period as active\n * @param period - Period to be set as active\n */\n protected _setPeriod(period: PeriodData<TDate>): void\n {\n this.periodData.forEach(itm => itm.active = false);\n\n period.active = true;\n }\n\n /**\n * Updates minimal and maximal value for picker\n */\n protected _updateMinMax(): void\n {\n if(!this.periodData.length)\n {\n return;\n }\n\n //no min, no max\n if(!this._minValue && !this._maxValue)\n {\n this.periodData.forEach(itm => itm.disabled = false);\n\n return;\n }\n\n const minDateApi = this._minValue ? this._dateApi.getValue(this._minValue) : null;\n const maxDateApi = this._maxValue ? this._dateApi.getValue(this._maxValue) : null;\n let restAfter = false;\n\n this.periodData.forEach(period =>\n {\n if(!!minDateApi && minDateApi.isAfter(period.date) && !this._isSamePeriod(minDateApi, period.date))\n {\n period.disabled = true;\n }\n\n if(restAfter || (!!maxDateApi && maxDateApi.isBefore(period.date) && !this._isSamePeriod(maxDateApi, period.date)))\n {\n restAfter = true;\n period.disabled = true;\n }\n });\n }\n\n /**\n * Obtains end of period\n * @param period - Period for which should be end obtained\n */\n protected abstract _endOfPeriod(period: PeriodData<TDate>): TDate;\n\n /**\n * Tests whether provided value is in same period as displayed picker\n * @param val - Tested value for same period as displayed picker\n */\n protected abstract _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean;\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected abstract _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean;\n\n /**\n * Gets period data for specified value\n * @param val - Value for which is period data obtained\n */\n protected abstract _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>;\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pickerIm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AAC;IACxC,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAEhB,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;IAC1C,CAAC;IAkCD,wFAAwF;IAExF;;;;OAIG;IACI,IAAI,CAAC,KAAY;QAEpB,KAAK,CAAC,cAAc,EAAE,CAAC;QAEvB,IAAG,CAAC,IAAI,CAAC,OAAO,EAChB;YACI,OAAO;SACV;QAED,IAAG,IAAI,CAAC,WAAW,EACnB;YACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC9C;IACL,CAAC;IAED,uGAAuG;IAEvG;;;OAGG;IACI,aAAa,CAAC,UAAuB;QAExC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACpE,CAAC;IA0BD;;;OAGG;IACI,YAAY,CAAC,KAAc;QAE9B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACI,UAAU,CAAC,KAAc;QAE5B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,iBAAiB;QAEpB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC;IAED,2EAA2E;IAE3E;;;;OAIG;IAEI,WAAW,CAAC,KAAY;QAE3B,KAAK,CAAC,cAAc,EAAE,CAAC;IAC3B,CAAC;;oHAlMiB,uBAAuB,kBA+FrB,QAAQ;wGA/FV,uBAAuB;2FAAvB,uBAAuB;kBAD5C,SAAS;;0BAgGO,MAAM;2BAAC,QAAQ;4EAgGrB,WAAW;sBADjB,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {ChangeDetectorRef, Directive, HostListener, Inject} from '@angular/core';\nimport {extend} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DateTimeValue} from '../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../services/dateApi/dateApi.interface';\nimport {DateTimePicker} from '../misc/datetimePicker.interface';\n\n/**\n * Base class used as base for picker as base implementation of DateTimePicker interface\n */\n@Directive()\nexport abstract class PickerImplBaseComponent<TDate = any, TCssClasses = any> implements DateTimePicker<TDate, TCssClasses>\n{\n //######################### protected fields #########################\n\n /**\n * Current value of datetime\n */\n protected _value: DateTimeValue<TDate>|null = null;\n\n /**\n * Occurs when value changes\n */\n protected _valueChange: Subject<void> = new Subject<void>();\n \n /**\n * Occurs when user scales up\n */\n protected _scaleUp: Subject<TDate> = new Subject<TDate>();\n\n /**\n * Occurs when user scales down\n */\n protected _scaleDown: Subject<TDate> = new Subject<TDate>();\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 DateTimePicker #########################\n\n /**\n * Gets current value of datetime\n */\n public get value(): DateTimeValue<TDate>|null\n {\n return this._value;\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 user scales up\n */\n public get scaleUp(): Observable<TDate>\n {\n return this._scaleUp.asObservable();\n }\n\n /**\n * Occurs when user scales down\n */\n public get scaleDown(): Observable<TDate>\n {\n return this._scaleDown.asObservable();\n }\n\n //######################### public properties - template bindings #########################\n\n /**\n * Date api instance for displayed date\n * @internal\n */\n public displayDate: DateApiObject<TDate>|null = null;\n\n /**\n * Indication whether can go up in period\n * @internal\n */\n public canGoUp: boolean = false;\n\n /**\n * Indication whether can go down in period\n * @internal\n */\n public canGoDown: boolean = false;\n\n /**\n * Css classes that are used within picker\n * @internal\n */\n public cssClasses!: TCssClasses;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n protected _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed period to \"higher\" period\n * @param event - Event that occured\n * @internal\n */\n public goUp(event: Event): void\n {\n event.preventDefault();\n\n if(!this.canGoUp)\n {\n return;\n }\n\n if(this.displayDate)\n {\n this._scaleUp.next(this.displayDate.value);\n }\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\n\n /**\n * Sets css classes for picker, allowing to override defaults\n * @param cssClasses - Css classes to be set for picker\n */\n public setCssClasses(cssClasses: TCssClasses): void\n {\n this.cssClasses = extend(true, {}, this.cssClasses, cssClasses);\n }\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 abstract setMinValue(value: TDate|null): void;\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 abstract setMaxValue(value: TDate|null): void;\n\n /**\n * Sets value of datetime picker\n * @param value - Value to be set to this picker\n */\n public abstract setValue(value: DateTimeValue<TDate>|null): void;\n\n /**\n * Sets display date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n public abstract display(value: DateApiObject<TDate>): void;\n\n /**\n * Sets indication whether can go down\n * @param value - Indication whether can go down in period\n */\n public setCanGoDown(value: boolean): void\n {\n this.canGoDown = value;\n }\n\n /**\n * Sets indication whether can go up\n * @param value - Indication whether can go up in period\n */\n public setCanGoUp(value: boolean): void\n {\n this.canGoUp = value;\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 - host #########################\n\n /**\n * Handles click anyway in picker, that blocks blur\n * @param event - Event that occured\n * @internal\n */\n @HostListener('mousedown', ['$event'])\n public handleClick(event: Event): void\n {\n event.preventDefault();\n }\n}"]}
1
+ {"version":3,"file":"pickerImplBase.component.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/components/pickerImplBase.component.ts"],"names":[],"mappings":"AA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CAAC,YAAY,EAAE,CAAC;IAC1C,CAAC;IAkCD,wFAAwF;IAExF;;;;OAIG;IACI,IAAI,CAAC,KAAY;QAEpB,KAAK,CAAC,cAAc,EAAE,CAAC;QAEvB,IAAG,CAAC,IAAI,CAAC,OAAO,EAChB;YACI,OAAO;SACV;QAED,IAAG,IAAI,CAAC,WAAW,EACnB;YACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC9C;IACL,CAAC;IAED,uGAAuG;IAEvG;;;OAGG;IACI,aAAa,CAAC,UAAuB;QAExC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACpE,CAAC;IA0BD;;;OAGG;IACI,YAAY,CAAC,KAAc;QAE9B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACI,UAAU,CAAC,KAAc;QAE5B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,iBAAiB;QAEpB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC;IAED,2EAA2E;IAE3E;;;;OAIG;IAEI,WAAW,CAAC,KAAY;QAE3B,KAAK,CAAC,cAAc,EAAE,CAAC;IAC3B,CAAC;;oHAlMiB,uBAAuB,kBA+FrB,QAAQ;wGA/FV,uBAAuB;2FAAvB,uBAAuB;kBAD5C,SAAS;;0BAgGO,MAAM;2BAAC,QAAQ;4EAgGrB,WAAW;sBADjB,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {ChangeDetectorRef, Directive, HostListener, Inject} from '@angular/core';\nimport {extend} from '@jscrpt/common';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DateTimeValue} from '../../../interfaces/dateTime/datetime.interface';\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../services/dateApi/dateApi.interface';\nimport {DateTimeLegacyPicker} from '../misc/datetimePicker.interface';\n\n/**\n * Base class used as base for picker as base implementation of DateTimePicker interface\n */\n@Directive()\nexport abstract class PickerImplBaseComponent<TDate = any, TCssClasses = any> implements DateTimeLegacyPicker<TDate, TCssClasses>\n{\n //######################### protected fields #########################\n\n /**\n * Current value of datetime\n */\n protected _value: DateTimeValue<TDate>|null = null;\n\n /**\n * Occurs when value changes\n */\n protected _valueChange: Subject<void> = new Subject<void>();\n \n /**\n * Occurs when user scales up\n */\n protected _scaleUp: Subject<TDate> = new Subject<TDate>();\n\n /**\n * Occurs when user scales down\n */\n protected _scaleDown: Subject<TDate> = new Subject<TDate>();\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 DateTimePicker #########################\n\n /**\n * Gets current value of datetime\n */\n public get value(): DateTimeValue<TDate>|null\n {\n return this._value;\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 user scales up\n */\n public get scaleUp(): Observable<TDate>\n {\n return this._scaleUp.asObservable();\n }\n\n /**\n * Occurs when user scales down\n */\n public get scaleDown(): Observable<TDate>\n {\n return this._scaleDown.asObservable();\n }\n\n //######################### public properties - template bindings #########################\n\n /**\n * Date api instance for displayed date\n * @internal\n */\n public displayDate: DateApiObject<TDate>|null = null;\n\n /**\n * Indication whether can go up in period\n * @internal\n */\n public canGoUp: boolean = false;\n\n /**\n * Indication whether can go down in period\n * @internal\n */\n public canGoDown: boolean = false;\n\n /**\n * Css classes that are used within picker\n * @internal\n */\n public cssClasses!: TCssClasses;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected _dateApi: DateApi<TDate>,\n protected _changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed period to \"higher\" period\n * @param event - Event that occured\n * @internal\n */\n public goUp(event: Event): void\n {\n event.preventDefault();\n\n if(!this.canGoUp)\n {\n return;\n }\n\n if(this.displayDate)\n {\n this._scaleUp.next(this.displayDate.value);\n }\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\n\n /**\n * Sets css classes for picker, allowing to override defaults\n * @param cssClasses - Css classes to be set for picker\n */\n public setCssClasses(cssClasses: TCssClasses): void\n {\n this.cssClasses = extend(true, {}, this.cssClasses, cssClasses);\n }\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 abstract setMinValue(value: TDate|null): void;\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 abstract setMaxValue(value: TDate|null): void;\n\n /**\n * Sets value of datetime picker\n * @param value - Value to be set to this picker\n */\n public abstract setValue(value: DateTimeValue<TDate>|null): void;\n\n /**\n * Sets display date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n public abstract display(value: DateApiObject<TDate>): void;\n\n /**\n * Sets indication whether can go down\n * @param value - Indication whether can go down in period\n */\n public setCanGoDown(value: boolean): void\n {\n this.canGoDown = value;\n }\n\n /**\n * Sets indication whether can go up\n * @param value - Indication whether can go up in period\n */\n public setCanGoUp(value: boolean): void\n {\n this.canGoUp = value;\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 - host #########################\n\n /**\n * Handles click anyway in picker, that blocks blur\n * @param event - Event that occured\n * @internal\n */\n @HostListener('mousedown', ['$event'])\n public handleClick(event: Event): void\n {\n event.preventDefault();\n }\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"rollerTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.ts","../../../../../../src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.html"],"names":[],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AK,CAAC;SAC5B;QAED,IAAG,IAAI,CAAC,WAAW,EACnB;YACI,IAAI,CAAC,MAAM;gBACX;oBACI,IAAI,EAAE,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK;oBAC7B,EAAE,EAAE,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK;iBAC9B,CAAC;YAEF,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;SAC5B;IACL,CAAC;;8HArKQ,iCAAiC;kHAAjC,iCAAiC,2FCpB9C,oyFAmEA;2FD/Ca,iCAAiC;kBAP7C,SAAS;+BAEI,8BAA8B,mBAGvB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DateApiObject} from '../../../../services';\nimport {LoopScrollData} from '../../directives';\nimport {DateTimePicker} from '../../interfaces';\nimport {PickerImplBaseComponent} from '../pickerImplBase.component';\nimport {hours, minutes} from './rollerTimePicker.data';\nimport {RollerTimePickerCssClasses} from './rollerTimePicker.interface';\n\n/**\n * Component used for rendering roller time picker\n */\n@Component(\n{\n selector: 'date-time-roller-time-picker',\n templateUrl: 'rollerTimePicker.component.html',\n styleUrls: ['rollerTimePicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeRollerTimePickerComponent<TDate = any> extends PickerImplBaseComponent<TDate, RollerTimePickerCssClasses> implements DateTimePicker<TDate, RollerTimePickerCssClasses>\n{\n //######################### public properties - template bindings #########################\n\n /**\n * Array of available hours\n */\n public hours: LoopScrollData[] = hours;\n\n /**\n * Array of available minutes\n */\n public minutes: LoopScrollData[] = minutes;\n\n /**\n * Indication whether are minutes open\n */\n public minutesOpen: boolean = false;\n\n /**\n * Indication whether are hours open\n */\n public hoursOpen: boolean = false;\n\n /**\n * Current value of hour\n */\n public get hour(): number\n {\n return this.displayDate?.hour() ?? 0;\n }\n public set hour(value: number)\n {\n this.displayDate?.hour(value);\n }\n\n /**\n * Current value of minute\n */\n public get minute(): number\n {\n return this.displayDate?.minute() ?? 0;\n }\n public set minute(value: number)\n {\n this.displayDate?.minute(value);\n }\n\n //######################### public methods - implementation of PickerBaseComponent #########################\n \n /**\n * @inheritdoc\n */\n public display(value: DateApiObject<TDate>): void\n {\n this.displayDate = value;\n }\n\n /**\n * @inheritdoc\n */\n public setMinValue(_value: TDate | null): void\n {\n }\n\n /**\n * @inheritdoc\n */\n public setMaxValue(_value: TDate | null): void\n {\n }\n\n /**\n * @inheritdoc\n */\n public setValue(value: DateTimeValue<TDate> | null): void\n {\n if(value)\n {\n this.displayDate = this._dateApi.getValue(value.from!);\n }\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Sets hour\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as hour\n * @returns \n */\n public setHour<TData = any>(event: MouseEvent|null, value: TData): void\n {\n if(!this.hoursOpen && event)\n {\n return;\n }\n\n event?.stopPropagation();\n event?.preventDefault();\n\n if(this.hour == value as unknown as number)\n {\n this.hoursOpen = false;\n\n return;\n }\n\n this.hour = value as unknown as number;\n \n if(event)\n {\n this.hoursOpen = false;\n }\n\n if(this.displayDate)\n {\n this._value =\n {\n from: this.displayDate?.value,\n to: this.displayDate?.value\n };\n\n this._valueChange.next();\n }\n }\n\n /**\n * Sets minute\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as minute\n * @returns \n */\n public setMinute<TData = any>(event: MouseEvent|null, value: TData): void\n {\n if(!this.minutesOpen && event)\n {\n return;\n }\n\n event?.stopPropagation();\n event?.preventDefault();\n\n if(this.minute == value as unknown as number)\n {\n return;\n }\n\n this.minute = value as unknown as number;\n \n if(event)\n {\n this.minutesOpen = false;\n }\n\n if(this.displayDate)\n {\n this._value =\n {\n from: this.displayDate?.value,\n to: this.displayDate?.value\n };\n\n this._valueChange.next();\n }\n }\n}","<div class=\"flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canGoUp\" (mousedown)=\"goUp($event)\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (click)=\"hoursOpen = !hoursOpen\">\n <div *ngFor=\"let hour of hours | slice: -14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (click)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours\"\n [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (click)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours | slice: 0: 14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (click)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (click)=\"minutesOpen = !minutesOpen\">\n <div *ngFor=\"let minute of minutes | slice: -14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (click)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes\"\n [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (click)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes | slice: 0: 14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (click)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n </div>\n </div>\n</div>\n"]}
1
+ {"version":3,"file":"rollerTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.ts","../../../../../../src/legacy/picker/components/rollerTimePicker/rollerTimePicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAMjE,OAAO,EAAC,uBAAuB,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAC,KAAK,EAAE,OAAO,EAAC,MAAM,yBAAyB,CAAC;;;;;;;AAGvD;;GAEG;AAQH,MAAM,OAAO,iCAA+C,SAAQ,uBAA0D;IAP9H;;QASI,2FAA2F;QAE3F;;WAEG;QACI,UAAK,GAAqB,KAAK,CAAC;QAEvC;;WAEG;QACI,YAAO,GAAqB,OAAO,CAAC;QAE3C;;WAEG;QACI,gBAAW,GAAY,KAAK,CAAC;QAEpC;;WAEG;QACI,cAAS,GAAY,KAAK,CAAC;KAgJrC;IA9IG;;OAEG;IACH,IAAW,IAAI;;QAEX,OAAO,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,EAAE,mCAAI,CAAC,CAAC;IACzC,CAAC;IACD,IAAW,IAAI,CAAC,KAAa;;QAEzB,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;;QAEb,OAAO,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,MAAM,EAAE,mCAAI,CAAC,CAAC;IAC3C,CAAC;IACD,IAAW,MAAM,CAAC,KAAa;;QAE3B,MAAA,IAAI,CAAC,WAAW,0CAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,4GAA4G;IAE5G;;OAEG;IACI,O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L,KAAK,uBAAL,KAAK,CAAE,eAAe,EAAE,CAAC;QACzB,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,EAAE,CAAC;QAExB,IAAG,IAAI,CAAC,MAAM,IAAI,KAA0B,EAC5C;YACI,OAAO;SACV;QAED,IAAI,CAAC,MAAM,GAAG,KAA0B,CAAC;QAEzC,IAAG,KAAK,EACR;YACI,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;SAC5B;QAED,IAAG,IAAI,CAAC,WAAW,EACnB;YACI,IAAI,CAAC,MAAM;gBACX;oBACI,IAAI,EAAE,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK;oBAC7B,EAAE,EAAE,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK;iBAC9B,CAAC;YAEF,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;SAC5B;IACL,CAAC;;8HArKQ,iCAAiC;kHAAjC,iCAAiC,2FCpB9C,oyFAmEA;2FD/Ca,iCAAiC;kBAP7C,SAAS;+BAEI,8BAA8B,mBAGvB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\n\nimport {DateTimeValue} from '../../../../interfaces/dateTime/datetime.interface';\nimport {DateApiObject} from '../../../../services';\nimport {LoopScrollData} from '../../directives';\nimport {DateTimeLegacyPicker} from '../../interfaces';\nimport {PickerImplBaseComponent} from '../pickerImplBase.component';\nimport {hours, minutes} from './rollerTimePicker.data';\nimport {RollerTimePickerCssClasses} from './rollerTimePicker.interface';\n\n/**\n * Component used for rendering roller time picker\n */\n@Component(\n{\n selector: 'date-time-roller-time-picker',\n templateUrl: 'rollerTimePicker.component.html',\n styleUrls: ['rollerTimePicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeRollerTimePickerComponent<TDate = any> extends PickerImplBaseComponent<TDate, RollerTimePickerCssClasses> implements DateTimeLegacyPicker<TDate, RollerTimePickerCssClasses>\n{\n //######################### public properties - template bindings #########################\n\n /**\n * Array of available hours\n */\n public hours: LoopScrollData[] = hours;\n\n /**\n * Array of available minutes\n */\n public minutes: LoopScrollData[] = minutes;\n\n /**\n * Indication whether are minutes open\n */\n public minutesOpen: boolean = false;\n\n /**\n * Indication whether are hours open\n */\n public hoursOpen: boolean = false;\n\n /**\n * Current value of hour\n */\n public get hour(): number\n {\n return this.displayDate?.hour() ?? 0;\n }\n public set hour(value: number)\n {\n this.displayDate?.hour(value);\n }\n\n /**\n * Current value of minute\n */\n public get minute(): number\n {\n return this.displayDate?.minute() ?? 0;\n }\n public set minute(value: number)\n {\n this.displayDate?.minute(value);\n }\n\n //######################### public methods - implementation of PickerBaseComponent #########################\n \n /**\n * @inheritdoc\n */\n public display(value: DateApiObject<TDate>): void\n {\n this.displayDate = value;\n }\n\n /**\n * @inheritdoc\n */\n public setMinValue(_value: TDate | null): void\n {\n }\n\n /**\n * @inheritdoc\n */\n public setMaxValue(_value: TDate | null): void\n {\n }\n\n /**\n * @inheritdoc\n */\n public setValue(value: DateTimeValue<TDate> | null): void\n {\n if(value)\n {\n this.displayDate = this._dateApi.getValue(value.from!);\n }\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Sets hour\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as hour\n * @returns \n */\n public setHour<TData = any>(event: MouseEvent|null, value: TData): void\n {\n if(!this.hoursOpen && event)\n {\n return;\n }\n\n event?.stopPropagation();\n event?.preventDefault();\n\n if(this.hour == value as unknown as number)\n {\n this.hoursOpen = false;\n\n return;\n }\n\n this.hour = value as unknown as number;\n \n if(event)\n {\n this.hoursOpen = false;\n }\n\n if(this.displayDate)\n {\n this._value =\n {\n from: this.displayDate?.value,\n to: this.displayDate?.value\n };\n\n this._valueChange.next();\n }\n }\n\n /**\n * Sets minute\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as minute\n * @returns \n */\n public setMinute<TData = any>(event: MouseEvent|null, value: TData): void\n {\n if(!this.minutesOpen && event)\n {\n return;\n }\n\n event?.stopPropagation();\n event?.preventDefault();\n\n if(this.minute == value as unknown as number)\n {\n return;\n }\n\n this.minute = value as unknown as number;\n \n if(event)\n {\n this.minutesOpen = false;\n }\n\n if(this.displayDate)\n {\n this._value =\n {\n from: this.displayDate?.value,\n to: this.displayDate?.value\n };\n\n this._valueChange.next();\n }\n }\n}","<div class=\"flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canGoUp\" (mousedown)=\"goUp($event)\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (click)=\"hoursOpen = !hoursOpen\">\n <div *ngFor=\"let hour of hours | slice: -14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (click)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours\"\n [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (click)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n\n <div *ngFor=\"let hour of hours | slice: 0: 14\"\n [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (click)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (click)=\"minutesOpen = !minutesOpen\">\n <div *ngFor=\"let minute of minutes | slice: -14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (click)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes\"\n [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (click)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n\n <div *ngFor=\"let minute of minutes | slice: 0: 14\"\n [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (click)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n </div>\n </div>\n</div>\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"yearPicker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/yearPicker/yearPicker.component.ts","../../../../../../src/legacy/picker/components/yearPicker/yearPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;;;;AAG5D;;GAEG;AACH,MAAM,aAAa,GACnB;IACI,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,6BAA6B;IAC7C,UAAU,EAAE,8BAA8B;IAC1C,WAAW,EAAE,cAAc;IAC3B,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,wBAAwB;IACrC,SAAS,EAAE,WAAW;CACzB,CAAC;AAEF;;GAEG;AAQH,MAAM,OAAO,2BAAyC,SAAQ,mBAAiE;IAU3H,iEAAiE;IACjE,YAA8B,OAAuB,EACzC,cAAiC;QAEzC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAZnC,2FAA2F;QAE3F;;;WAGG;QACI,WAAM,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;+BAEI,uBAAuB,mBAGhB,uBAAuB,CAAC,MAAM;;0BAalC,MAAM;2BAAC,QAAQ","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef} from '@angular/core';\nimport {extend} from '@jscrpt/common';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../../services/dateApi/dateApi.interface';\nimport {DateTimePicker, PeriodData, YearData} from '../../misc/datetimePicker.interface';\nimport {PickerBaseComponent} from '../pickerBase.component';\nimport {YearPickerCssClasses} from './yearPicker.interfaces';\n\n/**\n * Default styles for picker\n */\nconst defaultStyles: YearPickerCssClasses =\n{\n periodSelection: 'period',\n previousPeriod: 'fas fa-angle-left clickable',\n nextPeriod: 'fas fa-angle-right clickable',\n periodValue: 'period-value',\n periodData: 'period-data',\n periodDatum: 'period-datum clickable',\n clickable: 'clickable'\n};\n\n/**\n * Component used for displaying year picker\n */\n@Component(\n{\n selector: 'date-time-year-picker',\n templateUrl: 'yearPicker.component.html',\n styleUrls: ['yearPicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeYearPickerComponent<TDate = any> extends PickerBaseComponent<TDate, YearData<TDate>, YearPickerCssClasses> implements DateTimePicker<TDate, YearPickerCssClasses>\n{\n //######################### public properties - template bindings #########################\n\n /**\n * Displayed decade period\n * @internal\n */\n public period: string = '';\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n changeDetector: ChangeDetectorRef)\n {\n super(dateApi, changeDetector);\n\n this.cssClasses = extend(true, {}, defaultStyles);\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed decade to next decade\n * @param event - Event that occured\n * @internal\n */\n public nextDecade(event: Event)\n {\n event.preventDefault();\n this.displayDate!.addYears(10);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Changes displayed decade to previous decade\n * @param event - Event that occured\n * @internal\n */\n public previousDecade(event: Event)\n {\n event.preventDefault();\n this.displayDate!.subtractYears(10);\n\n this.display(this.displayDate!);\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n public display(value: DateApiObject<TDate>): void\n {\n this.displayDate = value;\n\n let year = this.displayDate.startOfYear().year();\n\n while(year % 10 !== 0)\n {\n year--;\n }\n\n this.displayDate.year(year).updateOriginal();\n\n this.periodData = [];\n\n for(let x = 0; x < 10; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n value: year\n });\n\n year++;\n this.displayDate.addYears(1);\n }\n\n this.displayDate.resetOriginal();\n this._updateMinMax();\n this.period = `${this.displayDate.year()} - ${this.displayDate.year() + 10}`;\n\n //set value if exists\n if(this._value && (this.displayDate.isSameDecade(this._value.from!) || this.displayDate.isSameDecade(this._value.to!)))\n {\n this.setValue(this._value);\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Obtains end of period\n * @param period - Period for which should be end obtained\n */\n protected _endOfPeriod(period: PeriodData<TDate>): TDate\n {\n return this._dateApi.getValue(period.date).endOfYear().value;\n }\n\n /**\n * Tests whether provided value is in same period as displayed picker\n * @param val - Tested value for same period as displayed picker\n */\n protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean\n {\n return val.isSameDecade(this.displayDate!.value);\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameYear(target);\n }\n\n /**\n * Gets period data for specified value\n * @param val - Value for which is period data obtained\n */\n protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>\n {\n return this.periodData[val.year() % 10];\n }\n}","<div [ngClass]=\"cssClasses.periodSelection | asRequired\">\r\n <div [ngClass]=\"cssClasses.previousPeriod | asRequired\" (mousedown)=\"previousDecade($event)\"></div>\r\n <div [ngClass]=\"cssClasses.periodValue | asRequired\" [class.clickable]=\"canGoUp\" (mousedown)=\"goUp($event)\">{{period}}</div>\r\n <div [ngClass]=\"cssClasses.nextPeriod | asRequired\" (mousedown)=\"nextDecade($event)\"></div>\r\n</div>\r\n\r\n<div [ngClass]=\"cssClasses.periodData | asRequired\">\r\n <div *ngFor=\"let year of periodData\"\r\n [ngClass]=\"cssClasses.periodDatum | asRequired\"\r\n [class.active]=\"year.active\"\r\n [class.disabled]=\"year.disabled\"\r\n (mousedown)=\"select($event, year)\">{{year.value}}</div>\r\n</div>"]}
1
+ {"version":3,"file":"yearPicker.component.js","sourceRoot":"","sources":["../../../../../../src/legacy/picker/components/yearPicker/yearPicker.component.ts","../../../../../../src/legacy/picker/components/yearPicker/yearPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;;;;AAG5D;;GAEG;AACH,MAAM,aAAa,GACnB;IACI,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,6BAA6B;IAC7C,UAAU,EAAE,8BAA8B;IAC1C,WAAW,EAAE,cAAc;IAC3B,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,wBAAwB;IACrC,SAAS,EAAE,WAAW;CACzB,CAAC;AAEF;;GAEG;AAQH,MAAM,OAAO,2BAAyC,SAAQ,mBAAiE;IAU3H,iEAAiE;IACjE,YAA8B,OAAuB,EACzC,cAAiC;QAEzC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAZnC,2FAA2F;QAE3F;;;WAGG;QACI,WAAM,GAAW,EAAE,CAAC;QAQvB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC;I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, Inject, ChangeDetectorRef} from '@angular/core';\nimport {extend} from '@jscrpt/common';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi, DateApiObject} from '../../../../services/dateApi/dateApi.interface';\nimport {DateTimeLegacyPicker, PeriodData, YearData} from '../../misc/datetimePicker.interface';\nimport {PickerBaseComponent} from '../pickerBase.component';\nimport {YearPickerCssClasses} from './yearPicker.interfaces';\n\n/**\n * Default styles for picker\n */\nconst defaultStyles: YearPickerCssClasses =\n{\n periodSelection: 'period',\n previousPeriod: 'fas fa-angle-left clickable',\n nextPeriod: 'fas fa-angle-right clickable',\n periodValue: 'period-value',\n periodData: 'period-data',\n periodDatum: 'period-datum clickable',\n clickable: 'clickable'\n};\n\n/**\n * Component used for displaying year picker\n */\n@Component(\n{\n selector: 'date-time-year-picker',\n templateUrl: 'yearPicker.component.html',\n styleUrls: ['yearPicker.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimeYearPickerComponent<TDate = any> extends PickerBaseComponent<TDate, YearData<TDate>, YearPickerCssClasses> implements DateTimeLegacyPicker<TDate, YearPickerCssClasses>\n{\n //######################### public properties - template bindings #########################\n\n /**\n * Displayed decade period\n * @internal\n */\n public period: string = '';\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) dateApi: DateApi<TDate>,\n changeDetector: ChangeDetectorRef)\n {\n super(dateApi, changeDetector);\n\n this.cssClasses = extend(true, {}, defaultStyles);\n }\n\n //######################### public methods - template bindings #########################\n\n /**\n * Changes displayed decade to next decade\n * @param event - Event that occured\n * @internal\n */\n public nextDecade(event: Event)\n {\n event.preventDefault();\n this.displayDate!.addYears(10);\n\n this.display(this.displayDate!);\n }\n\n /**\n * Changes displayed decade to previous decade\n * @param event - Event that occured\n * @internal\n */\n public previousDecade(event: Event)\n {\n event.preventDefault();\n this.displayDate!.subtractYears(10);\n\n this.display(this.displayDate!);\n }\n\n //######################### public methods - implementation of DateTimePicker #########################\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n public display(value: DateApiObject<TDate>): void\n {\n this.displayDate = value;\n\n let year = this.displayDate.startOfYear().year();\n\n while(year % 10 !== 0)\n {\n year--;\n }\n\n this.displayDate.year(year).updateOriginal();\n\n this.periodData = [];\n\n for(let x = 0; x < 10; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n value: year\n });\n\n year++;\n this.displayDate.addYears(1);\n }\n\n this.displayDate.resetOriginal();\n this._updateMinMax();\n this.period = `${this.displayDate.year()} - ${this.displayDate.year() + 10}`;\n\n //set value if exists\n if(this._value && (this.displayDate.isSameDecade(this._value.from!) || this.displayDate.isSameDecade(this._value.to!)))\n {\n this.setValue(this._value);\n }\n }\n\n //######################### protected methods #########################\n\n /**\n * Obtains end of period\n * @param period - Period for which should be end obtained\n */\n protected _endOfPeriod(period: PeriodData<TDate>): TDate\n {\n return this._dateApi.getValue(period.date).endOfYear().value;\n }\n\n /**\n * Tests whether provided value is in same period as displayed picker\n * @param val - Tested value for same period as displayed picker\n */\n protected _isSamePeriodAsDisplayed(val: DateApiObject<TDate>): boolean\n {\n return val.isSameDecade(this.displayDate!.value);\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected _isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameYear(target);\n }\n\n /**\n * Gets period data for specified value\n * @param val - Value for which is period data obtained\n */\n protected _getPeriodData(val: DateApiObject<TDate>): PeriodData<TDate>\n {\n return this.periodData[val.year() % 10];\n }\n}","<div [ngClass]=\"cssClasses.periodSelection | asRequired\">\r\n <div [ngClass]=\"cssClasses.previousPeriod | asRequired\" (mousedown)=\"previousDecade($event)\"></div>\r\n <div [ngClass]=\"cssClasses.periodValue | asRequired\" [class.clickable]=\"canGoUp\" (mousedown)=\"goUp($event)\">{{period}}</div>\r\n <div [ngClass]=\"cssClasses.nextPeriod | asRequired\" (mousedown)=\"nextDecade($event)\"></div>\r\n</div>\r\n\r\n<div [ngClass]=\"cssClasses.periodData | asRequired\">\r\n <div *ngFor=\"let year of periodData\"\r\n [ngClass]=\"cssClasses.periodDatum | asRequired\"\r\n [class.active]=\"year.active\"\r\n [class.disabled]=\"year.disabled\"\r\n (mousedown)=\"select($event, year)\">{{year.value}}</div>\r\n</div>"]}
@@ -1 +1 @@
1
- {"version":3,"file":"datetimePicker.interface.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/misc/datetimePicker.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\nimport {Dictionary} from '@jscrpt/common';\nimport {Observable} from 'rxjs';\n\nimport {DateTimeValue} from '../../../interfaces/dateTime/datetime.interface';\nimport {DateApiObject} from '../../../services/dateApi/dateApi.interface';\n\n/**\n * Shared css classes for all pickers\n */\nexport interface CommonPickerCssClasses\n{\n /**\n * Period selection element wrapping displayed period and previous, next buttons\n */\n periodSelection: string;\n\n /**\n * Element used for switching period to previous one\n */\n previousPeriod: string;\n\n /**\n * Element used for switching period to next one\n */\n nextPeriod: string;\n\n /**\n * Element representing currently displayed period\n */\n periodValue: string;\n\n /**\n * Element wrapping displayed period data\n */\n periodData: string;\n\n /**\n * Element representing single datum for period item\n */\n periodDatum: string;\n\n /**\n * Name of css class that represents clickable items in picker\n */\n clickable: string;\n}\n\n/**\n * Css classes applied to datetime picker\n */\nexport interface DateTimePickerCssClasses\n{\n /**\n * Shared css classes for all pickers\n */\n pickerShared?: CommonPickerCssClasses;\n\n /**\n * Custom css classes specific for each picker type\n */\n pickerCustom?: Dictionary<object>;\n}\n\n/**\n * Defintion of datetime picker component options\n */\nexport interface DateTimePickerOptions<TPicker = any>\n{\n /**\n * Order of pickers, it's possible use less pickers as is defined in pickerPeriodsDefinition for example 'month,year'\n */\n pickerPeriodsOrder: string[]|string|null;\n\n /**\n * Definition of types for each period type for picker\n */\n pickerPeriodsDefinition: Dictionary<Type<TPicker>>;\n\n /**\n * Name of default period for picker that is displayed\n */\n defaultPeriod: string;\n\n /**\n * Css classes for date time picker\n */\n cssClasses: DateTimePickerCssClasses;\n}\n\n/**\n * Describes datetime picker component used for displaying and selecting value\n */\nexport interface DateTimePicker<TDate = any, TCssClasses = object>\n{\n /**\n * Gets current value of datetime\n */\n readonly value: DateTimeValue<TDate>|null;\n\n /**\n * Occurs when value changes\n */\n readonly valueChange: Observable<void>;\n\n /**\n * Occurs when user scales up\n */\n readonly scaleUp: Observable<TDate>;\n\n /**\n * Occurs when user scales down\n */\n readonly scaleDown: Observable<TDate>;\n\n /**\n * Sets css classes for picker, allowing to override defaults\n * @param cssClasses - Css classes to be set for picker\n */\n setCssClasses(cssClasses: TCssClasses): void;\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 setMinValue(value: TDate|null): void;\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 setMaxValue(value: TDate|null): void;\n\n /**\n * Sets value of datetime picker\n * @param value - Value to be set to this picker\n */\n setValue(value: DateTimeValue<TDate>|null): void;\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n display(value: DateApiObject<TDate>): void;\n\n /**\n * Sets indication whether can go down\n * @param value - Indication whether can go down in period\n */\n setCanGoDown(value: boolean): void;\n\n /**\n * Sets indication whether can go up\n * @param value - Indication whether can go up in period\n */\n setCanGoUp(value: boolean): void;\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n invalidateVisuals(): void;\n}\n\n/**\n * Data that represents data for any picker type\n */\nexport interface PeriodData<TDate = any>\n{\n /**\n * Indication that this period item is active and selected\n */\n active: boolean;\n\n /**\n * Indication that this period item is disabled\n */\n disabled: boolean;\n\n /**\n * Date for this period item\n */\n date: TDate;\n}\n\n/**\n * Data that represents day in date picker\n */\nexport interface DayData<TDate = any> extends PeriodData<TDate>\n{\n /**\n * Indication that range is selected and this day is between selected dates\n */\n betweenActive: boolean;\n\n /**\n * Indication that this day is out of currently selected month\n */\n otherMonth: boolean;\n\n /**\n * Indication that this day is today\n */\n today: boolean;\n\n /**\n * Indication that this day is weekend day\n */\n weekend: boolean;\n\n /**\n * Day number of month\n */\n day: number;\n}\n\n/**\n * Data that represents month in date picker\n */\nexport interface MonthData<TDate = any> extends PeriodData<TDate>\n{\n /**\n * Name of month\n */\n name: string;\n}\n\n/**\n * Data that represents year in date picker\n */\nexport interface YearData<TDate = any> extends PeriodData<TDate>\n{\n /**\n * Value of year\n */\n value: number;\n}\n"]}
1
+ {"version":3,"file":"datetimePicker.interface.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/misc/datetimePicker.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\nimport {Dictionary} from '@jscrpt/common';\nimport {Observable} from 'rxjs';\n\nimport {DateTimeValue} from '../../../interfaces/dateTime/datetime.interface';\nimport {DateApiObject} from '../../../services/dateApi/dateApi.interface';\n\n/**\n * Shared css classes for all pickers\n */\nexport interface CommonPickerCssClasses\n{\n /**\n * Period selection element wrapping displayed period and previous, next buttons\n */\n periodSelection: string;\n\n /**\n * Element used for switching period to previous one\n */\n previousPeriod: string;\n\n /**\n * Element used for switching period to next one\n */\n nextPeriod: string;\n\n /**\n * Element representing currently displayed period\n */\n periodValue: string;\n\n /**\n * Element wrapping displayed period data\n */\n periodData: string;\n\n /**\n * Element representing single datum for period item\n */\n periodDatum: string;\n\n /**\n * Name of css class that represents clickable items in picker\n */\n clickable: string;\n}\n\n/**\n * Css classes applied to datetime picker\n */\nexport interface DateTimePickerCssClasses\n{\n /**\n * Shared css classes for all pickers\n */\n pickerShared?: CommonPickerCssClasses;\n\n /**\n * Custom css classes specific for each picker type\n */\n pickerCustom?: Dictionary<object>;\n}\n\n/**\n * Defintion of datetime picker component options\n */\nexport interface DateTimePickerLegacyOptions<TPicker = any>\n{\n /**\n * Order of pickers, it's possible use less pickers as is defined in pickerPeriodsDefinition for example 'month,year'\n */\n pickerPeriodsOrder: string[]|string|null;\n\n /**\n * Definition of types for each period type for picker\n */\n pickerPeriodsDefinition: Dictionary<Type<TPicker>>;\n\n /**\n * Name of default period for picker that is displayed\n */\n defaultPeriod: string;\n\n /**\n * Css classes for date time picker\n */\n cssClasses: DateTimePickerCssClasses;\n}\n\n/**\n * Describes datetime picker component used for displaying and selecting value\n */\nexport interface DateTimeLegacyPicker<TDate = any, TCssClasses = object>\n{\n /**\n * Gets current value of datetime\n */\n readonly value: DateTimeValue<TDate>|null;\n\n /**\n * Occurs when value changes\n */\n readonly valueChange: Observable<void>;\n\n /**\n * Occurs when user scales up\n */\n readonly scaleUp: Observable<TDate>;\n\n /**\n * Occurs when user scales down\n */\n readonly scaleDown: Observable<TDate>;\n\n /**\n * Sets css classes for picker, allowing to override defaults\n * @param cssClasses - Css classes to be set for picker\n */\n setCssClasses(cssClasses: TCssClasses): void;\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 setMinValue(value: TDate|null): void;\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 setMaxValue(value: TDate|null): void;\n\n /**\n * Sets value of datetime picker\n * @param value - Value to be set to this picker\n */\n setValue(value: DateTimeValue<TDate>|null): void;\n\n /**\n * Set displays date to be displayed\n * @param value - Value that identifies period that is going to be displayed\n */\n display(value: DateApiObject<TDate>): void;\n\n /**\n * Sets indication whether can go down\n * @param value - Indication whether can go down in period\n */\n setCanGoDown(value: boolean): void;\n\n /**\n * Sets indication whether can go up\n * @param value - Indication whether can go up in period\n */\n setCanGoUp(value: boolean): void;\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n invalidateVisuals(): void;\n}\n\n/**\n * Data that represents data for any picker type\n */\nexport interface PeriodData<TDate = any>\n{\n /**\n * Indication that this period item is active and selected\n */\n active: boolean;\n\n /**\n * Indication that this period item is disabled\n */\n disabled: boolean;\n\n /**\n * Date for this period item\n */\n date: TDate;\n}\n\n/**\n * Data that represents day in date picker\n */\nexport interface DayData<TDate = any> extends PeriodData<TDate>\n{\n\n /**\n * Indication that this day is out of currently selected month\n */\n otherMonth: boolean;\n\n /**\n * Indication that this day is today\n */\n today: boolean;\n\n /**\n * Indication that this day is weekend day\n */\n weekend: boolean;\n\n /**\n * Day number of month\n */\n day: number;\n}\n\n/**\n * Data that represents month in date picker\n */\nexport interface MonthData<TDate = any> extends PeriodData<TDate>\n{\n /**\n * Name of month\n */\n name: string;\n}\n\n/**\n * Data that represents year in date picker\n */\nexport interface YearData<TDate = any> extends PeriodData<TDate>\n{\n /**\n * Value of year\n */\n value: number;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAI7C;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAA+C,IAAI,cAAc,CAA6B,gCAAgC,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {DateTimePickerOptions} from './datetimePicker.interface';\n\n/**\n * Injection token used for obtaining datetime picker configuration\n */\nexport const DATE_TIME_PICKER_CONFIGURATION: InjectionToken<DateTimePickerOptions<any>> = new InjectionToken<DateTimePickerOptions<any>>('DATE_TIME_PICKER_CONFIGURATION');"]}
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../src/legacy/picker/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAI7C;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAqD,IAAI,cAAc,CAAmC,gCAAgC,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {DateTimePickerLegacyOptions} from './datetimePicker.interface';\n\n/**\n * Injection token used for obtaining datetime picker configuration\n */\nexport const DATE_TIME_PICKER_CONFIGURATION: InjectionToken<DateTimePickerLegacyOptions<any>> = new InjectionToken<DateTimePickerLegacyOptions<any>>('DATE_TIME_PICKER_CONFIGURATION');"]}