@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.ts","../../../../../../src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,SAAS,EAAE,gBAAgB,EAAQ,YAAY,EAAE,MAAM,EAAE,KAAK,EAA4B,MAAM,EAAE,QAAQ,EAA0B,MAAM,eAAe,CAAC;AACtM,OAAO,EAAW,QAAQ,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAIlC,OAAO,EAAC,wBAAwB,EAAC,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AAItE,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAC,cAAc,EAAE,aAAa,E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K,CAAC,qBAAqB,CAAC,CAAC;SAC1C;QAED,IAAG,KAAK,IAAI,CAAC,EACb;YACI,OAAO,IAAI,CAAC,mBAAmB,CAAC;SACnC;QAED,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC9C,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAErF,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACpC,CAAC;;oHA3OQ,uBAAuB,kBA+EZ,QAAQ,aACR,QAAQ,aACR,eAAe,aACf,wBAAwB;wGAlFnC,uBAAuB,0OAkCD,gBAAgB,uFC7EnD,0CAAwC;2FD2C3B,uBAAuB;kBANnC,SAAS;+BAEI,kBAAkB,mBAEX,uBAAuB,CAAC,MAAM;;0BAiFlC,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,wBAAwB;;0BAAG,QAAQ;4CA/C7C,eAAe;sBADxB,SAAS;uBAAC,WAAW,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAC;gBAS1C,KAAK;sBADxB,KAAK;gBAcK,OAAO;sBADjB,KAAK;gBAqBU,WAAW;sBAD1B,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, ViewChild, ViewContainerRef, Type, EventEmitter, Output, Input, OnChanges, SimpleChanges, Inject, Optional, OnDestroy, ComponentRef} from '@angular/core';\nimport {Position, POSITION} from '@anglr/common';\nimport {extend, isBlank, nameof} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInputValue, FormatProvider} from '../../../../interfaces';\nimport {DateTimeInputOutputValue} from '../../../../misc/types';\nimport {DATE_TIME_PICKER_OPTIONS} from '../../misc/tokens';\nimport {DayPickerSAComponent} from '../dayPicker/dayPicker.component';\nimport {DateTimePickerOptions} from './dateTimePicker.interface';\nimport {DateTimePicker} from '../../interfaces';\nimport {DateApi} from '../../../../services';\nimport {DATE_API, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {formatDateTime, parseDateTime} from '../../../../misc/utils';\nimport {DateTimeValueFormat} from '../../../../misc/enums';\nimport {DateTimeRestrictedBase} from '../../../dateTime/directives/dateTimeRestrictedBase';\n\n/**\n * Text to be displayed when configuration, options are corrupted\n */\nconst CORRUPTED_CONFIG_TEXT = 'DateTime: Corrupted configuration for DateTimePicker!';\n\n/**\n * Default options for date time picker\n */\nconst defaultOptions: DateTimePickerOptions = \n{\n defaultPeriod: 'day',\n periodsDefinition:\n {\n 'day': DayPickerSAComponent,\n },\n};\n\n/**\n * Component used for displaying date time picker\n */\n@Component(\n{\n selector: 'date-time-picker',\n templateUrl: 'dateTimePicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimePickerComponent<TDate = unknown> extends DateTimeRestrictedBase<TDate> implements DateTimeInputValue<TDate>, OnChanges, OnDestroy\n{\n //######################### protected properties #########################\n \n /**\n * Subscription for changes in date time period picker\n */\n protected periodChangesSubscription: Subscription|undefined|null;\n\n /**\n * Options for date time picker\n */\n protected ɵOptions: DateTimePickerOptions<TDate>;\n\n /**\n * Currently displayed period type\n */\n protected displayedPeriodType: Type<DateTimePicker<TDate>>;\n\n /**\n * Name of period which is currently displayed\n */\n protected displayedPeriodName: string;\n\n /**\n * Instance of created date time period picker\n */\n protected component: ComponentRef<DateTimePicker<TDate>>|undefined|null;\n \n //######################### protected properties - children #########################\n\n /**\n * Container used for displaying pickers for specific date time part\n */\n @ViewChild('container', {read: ViewContainerRef, static: true})\n protected pickerContainer: ViewContainerRef|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * @inheritdoc\n */\n @Input()\n public override get value(): DateTimeInputOutputValue<TDate>|undefined|null\n {\n return this.ɵValue;\n }\n public override set value(value: DateTimeInputOutputValue<TDate>|undefined|null)\n {\n this.ɵValue = value;\n }\n\n /**\n * Options for date time picker\n */\n @Input()\n public get options(): Partial<DateTimePickerOptions<TDate>>\n {\n return this.ɵOptions;\n }\n public set options(value: Partial<DateTimePickerOptions<TDate>>)\n {\n this.ɵOptions = extend(true, {}, defaultOptions, value);\n\n if(value?.periodsDefinition)\n {\n this.ɵOptions.periodsDefinition = value.periodsDefinition;\n }\n }\n\n //######################### public properties - outputs #########################\n\n /**\n * @inheritdoc\n */\n @Output()\n public override valueChange: EventEmitter<void> = new EventEmitter<void>();\n\n //######################### constructor #########################\n constructor(@Inject(POSITION) protected position: Position,\n @Inject(DATE_API) dateApi: DateApi<TDate>,\n @Inject(FORMAT_PROVIDER) formatProvider: FormatProvider,\n @Inject(DATE_TIME_PICKER_OPTIONS) @Optional() options?: DateTimePickerOptions<TDate>,)\n {\n super(dateApi, formatProvider);\n\n this.ɵOptions = extend(true, {}, defaultOptions, options);\n \n if(options?.periodsDefinition)\n {\n this.ɵOptions.periodsDefinition = options.periodsDefinition;\n }\n\n this.displayedPeriodName = this.ɵOptions.defaultPeriod;\n this.displayedPeriodType = this.ɵOptions.periodsDefinition[this.displayedPeriodName];\n\n if(!this.displayedPeriodType)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n }\n\n //######################### public methods - implementation of OnChanges #########################\n \n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if(nameof<DateTimePickerComponent>('value') in changes)\n {\n //empty value show now\n if(isBlank(this.value))\n {\n const now = this.dateApi.now();\n\n this.showPicker(this.displayedPeriodType, now.value);\n\n return;\n }\n\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public override ngOnDestroy(): void\n {\n super.ngOnDestroy();\n\n this.component?.destroy();\n this.component = null;\n\n this.periodChangesSubscription?.unsubscribe();\n this.periodChangesSubscription = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Shows picker\n * @param type - Type of period that should be displayed\n * @param displayDate - Display date to be shown\n */\n protected showPicker(type: Type<DateTimePicker<TDate>>, displayDate: TDate): void\n {\n if(!this.pickerContainer)\n {\n return;\n }\n\n //create new component and destroy previous one\n if(!this.component || (this.component && type != this.displayedPeriodType))\n {\n this.periodChangesSubscription?.unsubscribe();\n this.periodChangesSubscription = new Subscription();\n this.component?.destroy();\n this.component = this.pickerContainer.createComponent(type);\n\n this.periodChangesSubscription.add(this.component.instance.valueChange.subscribe(() =>\n {\n const component = this.component?.instance;\n\n if(!component)\n {\n return;\n }\n\n this.value = formatDateTime(component.value, DateTimeValueFormat.DateInstance, null);\n this.valueChange.emit();\n }));\n\n this.periodChangesSubscription.add(this.component.instance.scaleUp.subscribe(date => this.showPicker(this.getUpperType(), date)));\n this.periodChangesSubscription.add(this.component.instance.scaleDown.subscribe(date => this.showPicker(this.getLowerType(), date)));\n }\n\n const component = this.component.instance;\n\n component.canScaleDown = false,\n component.canScaleUp = false;\n component.display = displayDate;\n // component.options\n //TODO: maybe add support for format!\n component.value = parseDateTime(this.value, this.dateApi, null, null);\n }\n\n /**\n * Gets type that is above current period picker\n */\n protected getUpperType(): Type<DateTimePicker<TDate>>\n {\n const periods = Object.keys(this.ɵOptions.periodsDefinition);\n const index = periods.indexOf(this.displayedPeriodName);\n\n if(index < 0)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n\n if(index >= periods.length)\n {\n return this.displayedPeriodType;\n }\n\n this.displayedPeriodName = periods[index + 1];\n this.displayedPeriodType = this.ɵOptions.periodsDefinition[this.displayedPeriodName];\n\n return this.displayedPeriodType;\n }\n\n /**\n * Gets type that is below current period picker\n */\n protected getLowerType(): Type<DateTimePicker<TDate>>\n {\n const periods = Object.keys(this.ɵOptions.periodsDefinition);\n const index = periods.indexOf(this.displayedPeriodName);\n\n if(index < 0)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n\n if(index <= 0)\n {\n return this.displayedPeriodType;\n }\n\n this.displayedPeriodName = periods[index - 1];\n this.displayedPeriodType = this.ɵOptions.periodsDefinition[this.displayedPeriodName];\n\n return this.displayedPeriodType;\n }\n}","<ng-container #container></ng-container>"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dateTimePicker.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimePicker.interface.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\nimport {Dictionary} from '@jscrpt/common';\n\nimport {DateTimePicker} from '../../interfaces';\n\n/**\n * Defintion of date time picker component options\n */\nexport interface DateTimePickerOptions<TDate = unknown>\n{\n /**\n * Definition of types for each period type for picker\n */\n periodsDefinition: Dictionary<Type<DateTimePicker<TDate>>>;\n\n /**\n * Name of default period for picker that is displayed after opening\n */\n defaultPeriod: string;\n}"]}
@@ -0,0 +1,78 @@
1
+ import { Component, ChangeDetectionStrategy, Inject } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { DateTimePeriodPickerBase } from '../dateTimePeriodPickerBase';
4
+ import { DatePipesModule } from '../../../datePipes.module';
5
+ import { DATE_API } from '../../../../misc/tokens';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@angular/common";
8
+ import * as i2 from "../../../../pipes/dateFormat.pipe";
9
+ /**
10
+ * Component used for displaying day picker
11
+ */
12
+ export class DayPickerSAComponent extends DateTimePeriodPickerBase {
13
+ //######################### constructor #########################
14
+ constructor(dateApi) {
15
+ super();
16
+ this.dateApi = dateApi;
17
+ //######################### protected properties - template bindings #########################
18
+ /**
19
+ * Names of days
20
+ */
21
+ this.weekdays = [];
22
+ /**
23
+ * Array of period data to be displayed
24
+ * @internal
25
+ */
26
+ this.periodData = [];
27
+ }
28
+ //######################### protected methods - template bindings #########################
29
+ selectDay(dayData) {
30
+ var _a, _b, _c;
31
+ if (!this.value) {
32
+ this.value = (_b = (_a = this.displayDate) === null || _a === void 0 ? void 0 : _a.clone()) !== null && _b !== void 0 ? _b : this.dateApi.getValue((_c = this.display) !== null && _c !== void 0 ? _c : new Date());
33
+ }
34
+ //single value
35
+ if (!Array.isArray(this.value)) {
36
+ this.value.dayOfMonth(dayData.day);
37
+ this.value.updateOriginal();
38
+ this.valueChangeSubject.next();
39
+ }
40
+ }
41
+ /**
42
+ * Changes displayed month to next month
43
+ * @param event - Event that occured
44
+ */
45
+ nextMonth(event) {
46
+ var _a;
47
+ event.preventDefault();
48
+ event.stopPropagation();
49
+ (_a = this.displayDate) === null || _a === void 0 ? void 0 : _a.addMonths(1);
50
+ // this.display(this.displayDate);
51
+ }
52
+ /**
53
+ * Changes displayed month to previous month
54
+ * @param event - Event that occured
55
+ */
56
+ previousMonth(event) {
57
+ var _a;
58
+ event.preventDefault();
59
+ event.stopPropagation();
60
+ (_a = this.displayDate) === null || _a === void 0 ? void 0 : _a.subtractMonths(1);
61
+ // this.display(this.displayDate!);
62
+ }
63
+ }
64
+ DayPickerSAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DayPickerSAComponent, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Component });
65
+ DayPickerSAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: DayPickerSAComponent, isStandalone: true, selector: "day-picker", host: { properties: { "class.date-time-period": "true" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth($event)\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"$event.stopPropagation(); $event.preventDefault(); displayDate ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'monthName'}} {{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextMonth($event)\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n <div class=\"weekday\" *ngFor=\"let weekday of weekdays\">{{weekday}}</div>\r\n <div *ngFor=\"let day of periodData\"\r\n class=\"period-datum clickable\"\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 (click)=\"$event.stopPropagation(); $event.preventDefault(); selectDay(day)\">{{day.day}}</div>\r\n</div>\r\n\r\n<div class=\"go-down-button\" style=\"justify-content: center; border-top: 1px solid #FFF;\" *ngIf=\"canScaleDown\">\r\n <!-- <div [class.clickable]=\"canScaleDown\" (mousedown)=\"$event.stopPropagation(); $event.preventDefault(); displayDate ? goDownSubject.next(displayDate.value) : undefined\">{{timeValue?.from | dateFormat: 'time'}}</div> -->\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i2.DateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DayPickerSAComponent, decorators: [{
67
+ type: Component,
68
+ args: [{ selector: 'day-picker', host: {
69
+ '[class.date-time-period]': 'true',
70
+ }, standalone: true, imports: [
71
+ CommonModule,
72
+ DatePipesModule,
73
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth($event)\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"$event.stopPropagation(); $event.preventDefault(); displayDate ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'monthName'}} {{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextMonth($event)\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n <div class=\"weekday\" *ngFor=\"let weekday of weekdays\">{{weekday}}</div>\r\n <div *ngFor=\"let day of periodData\"\r\n class=\"period-datum clickable\"\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 (click)=\"$event.stopPropagation(); $event.preventDefault(); selectDay(day)\">{{day.day}}</div>\r\n</div>\r\n\r\n<div class=\"go-down-button\" style=\"justify-content: center; border-top: 1px solid #FFF;\" *ngIf=\"canScaleDown\">\r\n <!-- <div [class.clickable]=\"canScaleDown\" (mousedown)=\"$event.stopPropagation(); $event.preventDefault(); displayDate ? goDownSubject.next(displayDate.value) : undefined\">{{timeValue?.from | dateFormat: 'time'}}</div> -->\r\n</div>" }]
74
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
75
+ type: Inject,
76
+ args: [DATE_API]
77
+ }] }]; } });
78
+ //# sourceMappingURL=dayPicker.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dayPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/dayPicker/dayPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/dayPicker/dayPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACzE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;;;;AAGjD;;GAEG;AAiBH,M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AQ;qGAhBnB,oBAAoB,yJC7BjC,65CAoBM,2CDIE,YAAY,+PACZ,eAAe;2FAIV,oBAAoB;kBAhBhC,SAAS;+BAEI,YAAY,QAGtB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,cACW,IAAI,WAEhB;wBACI,YAAY;wBACZ,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM;;0BAkBlC,MAAM;2BAAC,QAAQ","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {DateTimePicker} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {DayData} from '../../../../legacy/picker/interfaces';\nimport {DATE_API} from '../../../../misc/tokens';\nimport {DateApi} from '../../../../services';\n\n/**\n * Component used for displaying day picker\n */\n@Component(\n{\n selector: 'day-picker',\n templateUrl: 'dayPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n standalone: true,\n imports:\n [\n CommonModule,\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayPickerSAComponent<TDate = unknown> extends DateTimePeriodPickerBase<TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Names of days\n */\n protected weekdays: string[] = [];\n\n /**\n * Array of period data to be displayed\n * @internal\n */\n public periodData: DayData<TDate>[] = [];\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n super();\n }\n\n //######################### protected methods - template bindings #########################\n\n protected selectDay(dayData: DayData): void\n {\n if(!this.value)\n {\n this.value = this.displayDate?.clone() ?? this.dateApi.getValue(this.display ?? new Date());\n }\n\n //single value\n if(!Array.isArray(this.value))\n {\n this.value.dayOfMonth(dayData.day);\n this.value.updateOriginal();\n\n this.valueChangeSubject.next();\n }\n }\n\n /**\n * Changes displayed month to next month\n * @param event - Event that occured\n */\n protected nextMonth(event: Event): void\n {\n event.preventDefault();\n event.stopPropagation();\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 */\n protected previousMonth(event: Event): void\n {\n event.preventDefault();\n event.stopPropagation();\n this.displayDate?.subtractMonths(1);\n\n // this.display(this.displayDate!);\n }\n}","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth($event)\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"$event.stopPropagation(); $event.preventDefault(); displayDate ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'monthName'}} {{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextMonth($event)\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n <div class=\"weekday\" *ngFor=\"let weekday of weekdays\">{{weekday}}</div>\r\n <div *ngFor=\"let day of periodData\"\r\n class=\"period-datum clickable\"\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 (click)=\"$event.stopPropagation(); $event.preventDefault(); selectDay(day)\">{{day.day}}</div>\r\n</div>\r\n\r\n<div class=\"go-down-button\" style=\"justify-content: center; border-top: 1px solid #FFF;\" *ngIf=\"canScaleDown\">\r\n <!-- <div [class.clickable]=\"canScaleDown\" (mousedown)=\"$event.stopPropagation(); $event.preventDefault(); displayDate ? goDownSubject.next(displayDate.value) : undefined\">{{timeValue?.from | dateFormat: 'time'}}</div> -->\r\n</div>"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dayPicker.interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dayPicker.interfaces.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/dayPicker/dayPicker.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import {CommonPickerCssClasses} from '../../../../legacy/picker/interfaces';\n\n/**\n * Specific css classes for day picker\n */\nexport interface DayPickerCssClasses extends CommonPickerCssClasses\n{\n /**\n * Element displaying weekday name\n */\n weekdayName?: string;\n}"]}
@@ -0,0 +1,5 @@
1
+ export * from './dateTimePeriodPickerBase';
2
+ export * from './dateTimePicker/dateTimePicker.component';
3
+ export * from './dateTimePicker/dateTimePicker.interface';
4
+ export * from './dayPicker/dayPicker.component';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dateTimePicker/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './dateTimePeriodPickerBase';\nexport * from './dateTimePicker/dateTimePicker.component';\nexport * from './dateTimePicker/dateTimePicker.interface';\nexport * from './dayPicker/dayPicker.component';\n"]}
@@ -0,0 +1,195 @@
1
+ import { __awaiter, __decorate, __metadata } from "tslib";
2
+ import { Directive, ElementRef, Inject, Input, Optional, ViewContainerRef } from '@angular/core';
3
+ import { DOCUMENT } from '@angular/common';
4
+ import { POSITION, applyPositionResult, PositionPlacement } from '@anglr/common';
5
+ import { extend, nameof, isDescendant, BindThis } from '@jscrpt/common';
6
+ import { lastValueFrom, Subscription } from 'rxjs';
7
+ import { DATE_TIME_INPUT } from '../../../../misc/tokens';
8
+ import { DateTimePickerComponent } from '../../components';
9
+ import { DATE_TIME_PICKER_DIRECTIVE_OPTIONS } from '../../misc/tokens';
10
+ import * as i0 from "@angular/core";
11
+ /**
12
+ * Default options for date time picker directive
13
+ */
14
+ const defaultOptions = {
15
+ absolute: true,
16
+ alwaysVisible: false,
17
+ closeOnValueSelect: true,
18
+ disabled: false,
19
+ positionOptions: PositionPlacement.BottomStart,
20
+ showOnFocus: true,
21
+ };
22
+ /**
23
+ * Directive that is used for displaying and attaching date time picker
24
+ */
25
+ export class DateTimePickerDirective {
26
+ //######################### constructor #########################
27
+ constructor(viewContainer, element, input, document, position, options) {
28
+ this.viewContainer = viewContainer;
29
+ this.element = element;
30
+ this.input = input;
31
+ this.document = document;
32
+ this.position = position;
33
+ //######################### protected properties #########################
34
+ /**
35
+ * Indication whether is value changes disabled
36
+ */
37
+ this.valueChangeDisabled = false;
38
+ /**
39
+ * Subscriptions created during initialization
40
+ */
41
+ this.initSubscriptions = new Subscription();
42
+ this.ɵWithPickerOptions = extend(true, {}, defaultOptions, options);
43
+ }
44
+ //######################### public properties - inputs #########################
45
+ /**
46
+ * Gets or sets options for date time picker directive
47
+ */
48
+ get withPickerOptions() {
49
+ return this.ɵWithPickerOptions;
50
+ }
51
+ set withPickerOptions(value) {
52
+ this.ɵWithPickerOptions = extend(true, {}, this.ɵWithPickerOptions, value);
53
+ }
54
+ //######################### public methods - implementation of OnInit #########################
55
+ /**
56
+ * Initialize component
57
+ */
58
+ ngOnInit() {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ if (this.withPickerOptions.alwaysVisible) {
61
+ this.showPicker();
62
+ }
63
+ this.initSubscriptions.add(this.input.valueChange.subscribe(() => {
64
+ var _a;
65
+ this.setPickerValue();
66
+ (_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.changeDetectorRef.detectChanges();
67
+ }));
68
+ this.initSubscriptions.add(this.input.focus.subscribe(() => {
69
+ if (this.withPickerOptions.showOnFocus) {
70
+ this.showPicker();
71
+ }
72
+ }));
73
+ });
74
+ }
75
+ //######################### public methods - implementation of OnDestroy #########################
76
+ /**
77
+ * Called when component is destroyed
78
+ */
79
+ ngOnDestroy() {
80
+ this.hidePicker();
81
+ this.initSubscriptions.unsubscribe();
82
+ }
83
+ //######################### public methods #########################
84
+ /**
85
+ * Hides date time picker
86
+ */
87
+ showPicker() {
88
+ var _a;
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ if (this.withPickerOptions.disabled || this.componentRef) {
91
+ return;
92
+ }
93
+ this.componentRef = this.viewContainer.createComponent((DateTimePickerComponent));
94
+ this.componentElement = ((_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.hostView).rootNodes[0];
95
+ this.component = this.componentRef.instance;
96
+ if (this.withPickerOptions.absolute) {
97
+ this.document.body.append(this.componentElement);
98
+ }
99
+ this.valueChangeSubscription = this.component.valueChange.subscribe(() => {
100
+ if (this.component) {
101
+ this.valueChangeDisabled = true;
102
+ this.input.value = this.component.value;
103
+ this.input.valueChange.emit();
104
+ this.valueChangeDisabled = false;
105
+ }
106
+ });
107
+ this.document.addEventListener('click', this.handleClickOutside);
108
+ const result = yield lastValueFrom(this.position.placeElement(this.componentElement, this.element.nativeElement, {
109
+ placement: this.withPickerOptions.positionOptions,
110
+ }));
111
+ applyPositionResult(result);
112
+ this.setPickerValue();
113
+ // this.componentRef.setInput(nameof<DateTimePickerComponent>('valueFormat'), this.input.);
114
+ // this.componentRef.setInput(nameof<DateTimePickerComponent>('value'), this.input.value);
115
+ // this.componentRef.setInput(nameof<DateTimePickerComponent>('value'), this.input.value);
116
+ this.componentRef.changeDetectorRef.detectChanges();
117
+ });
118
+ }
119
+ /**
120
+ * Shows date time picker
121
+ */
122
+ hidePicker() {
123
+ var _a, _b, _c;
124
+ if (this.withPickerOptions.alwaysVisible) {
125
+ return;
126
+ }
127
+ (_a = this.valueChangeSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
128
+ this.valueChangeSubscription = null;
129
+ this.component = null;
130
+ (_b = this.componentRef) === null || _b === void 0 ? void 0 : _b.destroy();
131
+ this.componentRef = null;
132
+ (_c = this.componentElement) === null || _c === void 0 ? void 0 : _c.remove();
133
+ this.componentElement = null;
134
+ this.document.removeEventListener('click', this.handleClickOutside);
135
+ }
136
+ //######################### protected methods #########################
137
+ /**
138
+ * Sets all picker value
139
+ */
140
+ setPickerValue() {
141
+ if (this.valueChangeDisabled) {
142
+ return;
143
+ }
144
+ if (this.componentRef) {
145
+ this.componentRef.setInput(nameof('value'), this.input.value);
146
+ }
147
+ }
148
+ /**
149
+ * Handles clicking outside of picker
150
+ * @param event - Event that occured
151
+ */
152
+ handleClickOutside(event) {
153
+ if (!this.componentElement) {
154
+ return;
155
+ }
156
+ if (this.componentElement != event.target &&
157
+ !isDescendant(this.componentElement, event.target) &&
158
+ (!this.input.element || (this.input.element != event.target &&
159
+ !isDescendant(this.input.element, event.target)))) {
160
+ this.hidePicker();
161
+ }
162
+ }
163
+ }
164
+ DateTimePickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: DATE_TIME_INPUT }, { token: DOCUMENT }, { token: POSITION }, { token: DATE_TIME_PICKER_DIRECTIVE_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
165
+ DateTimePickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimePickerDirective, selector: "[dateTime][withPicker]", inputs: { withPickerOptions: "withPickerOptions" }, exportAs: ["dateTimePicker"], ngImport: i0 });
166
+ __decorate([
167
+ BindThis,
168
+ __metadata("design:type", Function),
169
+ __metadata("design:paramtypes", [MouseEvent]),
170
+ __metadata("design:returntype", void 0)
171
+ ], DateTimePickerDirective.prototype, "handleClickOutside", null);
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerDirective, decorators: [{
173
+ type: Directive,
174
+ args: [{
175
+ selector: '[dateTime][withPicker]',
176
+ exportAs: 'dateTimePicker'
177
+ }]
178
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: undefined, decorators: [{
179
+ type: Inject,
180
+ args: [DATE_TIME_INPUT]
181
+ }] }, { type: Document, decorators: [{
182
+ type: Inject,
183
+ args: [DOCUMENT]
184
+ }] }, { type: undefined, decorators: [{
185
+ type: Inject,
186
+ args: [POSITION]
187
+ }] }, { type: undefined, decorators: [{
188
+ type: Inject,
189
+ args: [DATE_TIME_PICKER_DIRECTIVE_OPTIONS]
190
+ }, {
191
+ type: Optional
192
+ }] }]; }, propDecorators: { withPickerOptions: [{
193
+ type: Input
194
+ }], handleClickOutside: [] } });
195
+ //# sourceMappingURL=dateTimePicker.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimePicker.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAe,SAAS,EAAE,UAAU,EAAmB,MAAM,EAAE,KAAK,EAAqB,QAAQ,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACjJ,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAW,QAAQ,EAAE,mBAAmB,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AACzF,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,MAAM,CAAC;AAGjD,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAC,kCAAkC,EAAC,MAAM,mBAAmB,CAAC;;AAErE;;GAEG;AACH,MAAM,cAAc,GACpB;IACI,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,KAAK;IACpB,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,iBAAiB,CAAC,WAAW;IAC9C,WAAW,EAAE,IAAI;CACpB,CAAC;AAEF;;GAEG;AAMH,MAAM,OAAO,uBAAuB;IAsDhC,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0B,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1F;IACL,CAAC;IAED;;;OAGG;IAEO,kBAAkB,CAAC,KAAiB;QAE1C,IAAG,CAAC,IAAI,CAAC,gBAAgB,EACzB;YACI,OAAO;SACV;QAED,IAAG,IAAI,CAAC,gBAAgB,IAAI,KAAK,CAAC,MAAM;YACrC,CAAC,YAAY,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,MAAqB,CAAC;YACjE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM;gBAClC,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,MAAqB,CAAC,CAAC,CAAC,EAC5F;YACI,IAAI,CAAC,UAAU,EAAE,CAAC;SACrB;IACL,CAAC;;oHAnNQ,uBAAuB,4EAyDZ,eAAe,aACf,QAAQ,aACR,QAAQ,aACR,kCAAkC;wGA5D7C,uBAAuB;;IAoM/B,QAAQ;;qCAC2B,UAAU;;iEAc7C;2FAnNQ,uBAAuB;kBALnC,SAAS;mBACV;oBACI,QAAQ,EAAE,wBAAwB;oBAClC,QAAQ,EAAE,gBAAgB;iBAC7B;;0BA0DgB,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,kCAAkC;;0BAAG,QAAQ;4CAftD,iBAAiB;sBAD3B,KAAK;gBAyJI,kBAAkB","sourcesContent":["import {ComponentRef, Directive, ElementRef, EmbeddedViewRef, Inject, Input, OnDestroy, OnInit, Optional, ViewContainerRef} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Position, POSITION, applyPositionResult, PositionPlacement} from '@anglr/common';\nimport {extend, nameof, isDescendant, BindThis} from '@jscrpt/common';\nimport {lastValueFrom, Subscription} from 'rxjs';\n\nimport {DateTimeInput} from '../../../../interfaces';\nimport {DATE_TIME_INPUT} from '../../../../misc/tokens';\nimport {DateTimePickerComponent} from '../../components';\nimport {DateTimePickerDirectiveOptions} from './dateTimePicker.interface';\nimport {DATE_TIME_PICKER_DIRECTIVE_OPTIONS} from '../../misc/tokens';\n\n/**\n * Default options for date time picker directive\n */\nconst defaultOptions: DateTimePickerDirectiveOptions =\n{\n absolute: true,\n alwaysVisible: false,\n closeOnValueSelect: true,\n disabled: false,\n positionOptions: PositionPlacement.BottomStart,\n showOnFocus: true,\n};\n\n/**\n * Directive that is used for displaying and attaching date time picker\n */\n@Directive(\n{\n selector: '[dateTime][withPicker]',\n exportAs: 'dateTimePicker'\n})\nexport class DateTimePickerDirective<TDate = unknown> implements OnInit, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Indication whether is value changes disabled\n */\n protected valueChangeDisabled: boolean = false;\n\n /**\n * Options for date time picker directive\n */\n protected ɵWithPickerOptions: DateTimePickerDirectiveOptions;\n\n /**\n * Subscriptions created during initialization\n */\n protected initSubscriptions: Subscription = new Subscription();\n\n /**\n * Date time picker component reference\n */\n protected componentRef: ComponentRef<DateTimePickerComponent<TDate>>|undefined|null;\n\n /**\n * Instance of date time picker component\n */\n protected component: DateTimePickerComponent<TDate>|undefined|null;\n\n /**\n * Instance of date time picker element\n */\n protected componentElement: HTMLElement|undefined|null;\n\n /**\n * Subscription for value changes in picker\n */\n protected valueChangeSubscription: Subscription|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets options for date time picker directive\n */\n @Input()\n public get withPickerOptions(): Partial<DateTimePickerDirectiveOptions>\n {\n return this.ɵWithPickerOptions;\n }\n public set withPickerOptions(value: Partial<DateTimePickerDirectiveOptions>)\n {\n this.ɵWithPickerOptions = extend(true, {}, this.ɵWithPickerOptions, value);\n }\n\n //######################### constructor #########################\n constructor(protected viewContainer: ViewContainerRef,\n protected element: ElementRef<HTMLElement>,\n @Inject(DATE_TIME_INPUT) protected input: DateTimeInput<TDate>,\n @Inject(DOCUMENT) protected document: Document,\n @Inject(POSITION) protected position: Position,\n @Inject(DATE_TIME_PICKER_DIRECTIVE_OPTIONS) @Optional() options?: DateTimePickerDirectiveOptions,)\n {\n this.ɵWithPickerOptions = extend(true, {}, defaultOptions, options);\n }\n\n //######################### public methods - implementation of OnInit #########################\n\n /**\n * Initialize component\n */\n public async ngOnInit(): Promise<void>\n {\n if(this.withPickerOptions.alwaysVisible)\n {\n this.showPicker();\n }\n\n this.initSubscriptions.add(this.input.valueChange.subscribe(() =>\n {\n this.setPickerValue();\n this.componentRef?.changeDetectorRef.detectChanges();\n }));\n\n this.initSubscriptions.add(this.input.focus.subscribe(() =>\n {\n if(this.withPickerOptions.showOnFocus)\n {\n this.showPicker();\n }\n }));\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.hidePicker();\n this.initSubscriptions.unsubscribe();\n }\n\n //######################### public methods #########################\n\n /**\n * Hides date time picker\n */\n public async showPicker(): Promise<void>\n {\n if(this.withPickerOptions.disabled || this.componentRef)\n {\n return;\n }\n\n this.componentRef = this.viewContainer.createComponent(DateTimePickerComponent<TDate>);\n this.componentElement = (this.componentRef?.hostView as EmbeddedViewRef<DateTimePickerComponent<TDate>>).rootNodes[0] as HTMLElement;\n this.component = this.componentRef.instance;\n\n if(this.withPickerOptions.absolute)\n {\n this.document.body.append(this.componentElement);\n }\n\n this.valueChangeSubscription = this.component.valueChange.subscribe(() =>\n {\n if(this.component)\n {\n this.valueChangeDisabled = true;\n this.input.value = this.component.value;\n this.input.valueChange.emit();\n this.valueChangeDisabled = false;\n }\n });\n\n this.document.addEventListener('click', this.handleClickOutside);\n\n const result = await lastValueFrom(this.position.placeElement(this.componentElement, this.element.nativeElement,\n {\n placement: this.withPickerOptions.positionOptions,\n }));\n\n applyPositionResult(result);\n this.setPickerValue();\n // this.componentRef.setInput(nameof<DateTimePickerComponent>('valueFormat'), this.input.);\n // this.componentRef.setInput(nameof<DateTimePickerComponent>('value'), this.input.value);\n // this.componentRef.setInput(nameof<DateTimePickerComponent>('value'), this.input.value);\n this.componentRef.changeDetectorRef.detectChanges();\n }\n\n /**\n * Shows date time picker\n */\n public hidePicker(): void\n {\n if(this.withPickerOptions.alwaysVisible)\n {\n return;\n }\n\n this.valueChangeSubscription?.unsubscribe();\n this.valueChangeSubscription = null;\n\n this.component = null;\n\n this.componentRef?.destroy();\n this.componentRef = null;\n\n this.componentElement?.remove();\n this.componentElement = null;\n\n this.document.removeEventListener('click', this.handleClickOutside);\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets all picker value\n */\n protected setPickerValue(): void\n {\n if(this.valueChangeDisabled)\n {\n return;\n }\n\n if(this.componentRef)\n {\n this.componentRef.setInput(nameof<DateTimePickerComponent>('value'), this.input.value);\n }\n }\n\n /**\n * Handles clicking outside of picker\n * @param event - Event that occured\n */\n @BindThis\n protected handleClickOutside(event: MouseEvent): void\n {\n if(!this.componentElement)\n {\n return;\n }\n\n if(this.componentElement != event.target &&\n !isDescendant(this.componentElement, event.target as HTMLElement) &&\n (!this.input.element || (this.input.element != event.target &&\n !isDescendant(this.input.element, event.target as HTMLElement))))\n {\n this.hidePicker();\n }\n }\n}"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dateTimePicker.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimePicker.interface.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {PositionPlacement} from '@anglr/common';\n\n/**\n * Defintion of date time picker directive options\n */\nexport interface DateTimePickerDirectiveOptions\n{\n /**\n * Indication whether close picker on value selection\n */\n closeOnValueSelect: boolean;\n\n /**\n * Indication whether display picker when date time input gets focus\n */\n showOnFocus: boolean;\n\n /**\n * Indication whether is picker always visible, mostly used for debugging\n */\n alwaysVisible: boolean;\n\n /**\n * Indication whether picker is disabled, if true, you cant display picker\n */\n disabled: boolean;\n\n /**\n * Indication whether use absolute global positioning of picker\n */\n absolute: boolean;\n\n /**\n * Position options that are used to position picker\n */\n positionOptions: Partial<PositionPlacement>;\n}"]}
@@ -0,0 +1,3 @@
1
+ export * from './dateTimePicker/dateTimePicker.directive';
2
+ export * from './dateTimePicker/dateTimePicker.interface';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dateTimePicker/directives/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC","sourcesContent":["export * from './dateTimePicker/dateTimePicker.directive';\nexport * from './dateTimePicker/dateTimePicker.interface';\n"]}
@@ -0,0 +1,6 @@
1
+ export * from './components';
2
+ export * from './directives';
3
+ export * from './interfaces';
4
+ export * from './misc/tokens';
5
+ export * from './modules';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dateTimePicker/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC","sourcesContent":["export * from './components';\nexport * from './directives';\nexport * from './interfaces';\nexport * from './misc/tokens';\nexport * from './modules';\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dateTimePicker.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimePicker.interface.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/interfaces/dateTimePicker/dateTimePicker.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Observable} from 'rxjs';\n\nimport {DateTimeObjectValue} from '../../../../misc/types';\n\n/**\n * Describes date time picker API for each date time period\n */\nexport interface DateTimePicker<TDate = unknown, TOptions = unknown>\n{\n /**\n * Value of date time picker\n */\n value: DateTimeObjectValue<TDate>|undefined|null;\n\n /**\n * Options for date time picker period\n */\n options: TOptions|undefined|null;\n\n /**\n * Date that describes which date should be displayed\n */\n display: TDate|undefined|null;\n\n /**\n * Max allowed date\n */\n maxDate: TDate|undefined|null;\n\n /**\n * Min allowed date to be selected\n */\n minDate: TDate|undefined|null;\n\n /**\n * Indication whether picker can display scale date time period up\n */\n canScaleUp: boolean;\n\n /**\n * Indication whether picker can display scale date time period down\n */\n canScaleDown: boolean;\n\n /**\n * Occurs when date time picker value changes\n */\n readonly valueChange: Observable<void>; \n\n /**\n * Occurs when period should be scaled up\n */\n readonly scaleUp: Observable<TDate>;\n\n /**\n * Occurs when period should be scaled down\n */\n readonly scaleDown: Observable<TDate>;\n}"]}
@@ -0,0 +1,2 @@
1
+ export * from './dateTimePicker/dateTimePicker.interface';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dateTimePicker/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC","sourcesContent":["export * from './dateTimePicker/dateTimePicker.interface';\n"]}
@@ -0,0 +1,10 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ /**
3
+ * Injection token for global options for date time picker directive
4
+ */
5
+ export const DATE_TIME_PICKER_DIRECTIVE_OPTIONS = new InjectionToken('DATE_TIME_PICKER_DIRECTIVE_OPTIONS');
6
+ /**
7
+ * Injection token for global options for date time picker component
8
+ */
9
+ export const DATE_TIME_PICKER_OPTIONS = new InjectionToken('DATE_TIME_PICKER_OPTIONS');
10
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../src/modules/dateTimePicker/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAK7C;;GAEG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAA4D,IAAI,cAAc,CAA0C,oCAAoC,CAAC,CAAC;AAE7M;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAmD,IAAI,cAAc,CAAiC,0BAA0B,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {DateTimePickerOptions} from '../components/dateTimePicker/dateTimePicker.interface';\nimport {DateTimePickerDirectiveOptions} from '../directives/dateTimePicker/dateTimePicker.interface';\n\n/**\n * Injection token for global options for date time picker directive\n */\nexport const DATE_TIME_PICKER_DIRECTIVE_OPTIONS: InjectionToken<Partial<DateTimePickerDirectiveOptions>> = new InjectionToken<Partial<DateTimePickerDirectiveOptions>>('DATE_TIME_PICKER_DIRECTIVE_OPTIONS');\n\n/**\n * Injection token for global options for date time picker component\n */\nexport const DATE_TIME_PICKER_OPTIONS: InjectionToken<Partial<DateTimePickerOptions>> = new InjectionToken<Partial<DateTimePickerOptions>>('DATE_TIME_PICKER_OPTIONS');"]}
@@ -0,0 +1,28 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { DateTimePickerComponent } from '../components';
3
+ import { DateTimePickerDirective } from '../directives';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Module for components that are used as date time picker
7
+ */
8
+ export class DateTimePickerModule {
9
+ }
10
+ DateTimePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11
+ DateTimePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerModule, declarations: [DateTimePickerComponent,
12
+ DateTimePickerDirective], exports: [DateTimePickerComponent,
13
+ DateTimePickerDirective] });
14
+ DateTimePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerModule });
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimePickerModule, decorators: [{
16
+ type: NgModule,
17
+ args: [{
18
+ declarations: [
19
+ DateTimePickerComponent,
20
+ DateTimePickerDirective,
21
+ ],
22
+ exports: [
23
+ DateTimePickerComponent,
24
+ DateTimePickerDirective,
25
+ ],
26
+ }]
27
+ }] });
28
+ //# sourceMappingURL=dateTimePicker.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateTimePicker.module.js","sourceRoot":"","sources":["../../../../../src/modules/dateTimePicker/modules/dateTimePicker.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,uBAAuB,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,EAAC,uBAAuB,EAAC,MAAM,eAAe,CAAC;;AAEtD;;GAEG;AAcH,MAAM,OAAO,oBAAoB;;iHAApB,oBAAoB;kHAApB,oBAAoB,iBATzB,uBAAuB;QACvB,uBAAuB,aAIvB,uBAAuB;QACvB,uBAAuB;kHAGlB,oBAAoB;2FAApB,oBAAoB;kBAbhC,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,uBAAuB;wBACvB,uBAAuB;qBAC1B;oBACD,OAAO,EACP;wBACI,uBAAuB;wBACvB,uBAAuB;qBAC1B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DateTimePickerComponent} from '../components';\nimport {DateTimePickerDirective} from '../directives';\n\n/**\n * Module for components that are used as date time picker\n */\n@NgModule(\n{\n declarations:\n [\n DateTimePickerComponent,\n DateTimePickerDirective,\n ],\n exports:\n [\n DateTimePickerComponent,\n DateTimePickerDirective,\n ],\n})\nexport class DateTimePickerModule\n{\n}"]}
@@ -0,0 +1,2 @@
1
+ export * from './dateTimePicker.module';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dateTimePicker/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './dateTimePicker.module';\n"]}
@@ -1,3 +1,4 @@
1
1
  export * from './datePipes.module';
2
2
  export * from './dateTime';
3
+ export * from './dateTimePicker';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC","sourcesContent":["export * from './datePipes.module';\nexport * from './dateTime';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './datePipes.module';\nexport * from './dateTime';\nexport * from './dateTimePicker';\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Inject, Pipe } from '@angular/core';
2
- import { nameof } from '@jscrpt/common';
2
+ import { isString, nameof } from '@jscrpt/common';
3
3
  import { DATE_API, FORMAT_PROVIDER } from '../misc/tokens';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
@@ -11,14 +11,8 @@ export class DateFormatPipe {
11
11
  this._formatProvider = _formatProvider;
12
12
  this._dateApi = _dateApi;
13
13
  }
14
- //######################### public methods - implementation of PipeTransform #########################
15
- /**
16
- * Formats provided date into formatted string
17
- * @param value - value to be transformed
18
- * @param format - Format that is used for formatting, can be also 'FormatProvider' key
19
- * @param parseFormat - format used for parsing string date
20
- */
21
- transform(value, format = nameof('date'), parseFormat) {
14
+ transform(value, format = nameof('date'), parseFormatOrCustomFormat, _customFormat) {
15
+ const parseFormat = isString(parseFormatOrCustomFormat) ? parseFormatOrCustomFormat : undefined;
22
16
  //format provider value
23
17
  if (format in this._formatProvider) {
24
18
  format = this._formatProvider[format];
@@ -1 +1 @@
1
- {"version":3,"file":"dateFormat.pipe.js","sourceRoot":"","sources":["../../../src/pipes/dateFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGtC,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;;AAGzD;;GAEG;AAEH,MAAM,OAAO,cAAc;IAEvB,kEAAkE;IAClE,YAA6C,eAA+B,EACtC,QAAwB;QADjB,oBAAe,GAAf,eAAe,CAAgB;QACtC,aAAQ,GAAR,QAAQ,CAAgB;IAE9D,CAAC;IAED,sGAAsG;IAEtG;;;;;OAKG;IACI,SAAS,CAAC,KAAsB,EAAE,SAAsC,MAAM,CAAiB,MAAM,CAAC,EAAE,WAAoB;QAE/H,uBAAuB;QACvB,IAAG,MAAM,IAAI,IAAI,CAAC,eAAe,EACjC;YACI,MAAM,GAAS,IAAI,CAAC,eAAgB,CAAC,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE3D,IAAG,OAAO,CAAC,OAAO,EAAE,EACpB;YACI,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;SAC1D;QAED,OAAO,EAAE,CAAC;IACd,CAAC;;2GAhCQ,cAAc,kBAGH,eAAe,aACf,QAAQ;yGAJnB,cAAc;2FAAd,cAAc;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,YAAY,EAAC;;0BAIT,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {nameof} from '@jscrpt/common';\n\nimport {FormatProvider} from '../interfaces';\nimport {DATE_API, FORMAT_PROVIDER} from '../misc/tokens';\nimport {DateApi, DateValue} from '../services';\n\n/**\n * Pipe that is used for formatting date\n */\n@Pipe({name: 'dateFormat'})\nexport class DateFormatPipe<TDate = any> implements PipeTransform\n{\n //######################### constructors #########################\n constructor(@Inject(FORMAT_PROVIDER) private _formatProvider: FormatProvider,\n @Inject(DATE_API) private _dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - Format that is used for formatting, can be also 'FormatProvider' key\n * @param parseFormat - format used for parsing string date\n */\n public transform(value: TDate|DateValue, format: string|keyof FormatProvider = nameof<FormatProvider>('date'), parseFormat?: string): string\n {\n //format provider value\n if(format in this._formatProvider)\n {\n format = (<any>this._formatProvider)[format];\n }\n\n const dateObj = this._dateApi.getValue(value, parseFormat);\n\n if(dateObj.isValid())\n {\n return dateObj.format(this._dateApi.getFormat(format));\n }\n\n return '';\n }\n}"]}
1
+ {"version":3,"file":"dateFormat.pipe.js","sourceRoot":"","sources":["../../../src/pipes/dateFormat.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;;AAGzD;;GAEG;AAEH,MAAM,OAAO,cAAc;IAEvB,kEAAkE;IAClE,YAA6C,eAA+B,EACtC,QAAwB;QADjB,oBAAe,GAAf,eAAe,CAAgB;QACtC,aAAQ,GAAR,QAAQ,CAAgB;IAE9D,CAAC;IAqCM,SAAS,CAAC,KAAsB,EAAE,SAAsC,MAAM,CAAiB,MAAM,CAAC,EAAE,yBAA0C,EAAE,aAAuB;QAE9K,MAAM,WAAW,GAAqB,QAAQ,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;QAElH,uBAAuB;QACvB,IAAG,MAAM,IAAI,IAAI,CAAC,eAAe,EACjC;YACI,MAAM,GAAS,IAAI,CAAC,eAAgB,CAAC,MAAM,CAAC,CAAC;SAChD;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE3D,IAAG,OAAO,CAAC,OAAO,EAAE,EACpB;YACI,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;SAC1D;QAED,OAAO,EAAE,CAAC;IACd,CAAC;;2GA7DQ,cAAc,kBAGH,eAAe,aACf,QAAQ;yGAJnB,cAAc;2FAAd,cAAc;kBAD1B,IAAI;mBAAC,EAAC,IAAI,EAAE,YAAY,EAAC;;0BAIT,MAAM;2BAAC,eAAe;;0BACtB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Inject, Pipe, PipeTransform} from '@angular/core';\nimport {isString, nameof} from '@jscrpt/common';\n\nimport {FormatProvider} from '../interfaces';\nimport {DATE_API, FORMAT_PROVIDER} from '../misc/tokens';\nimport {DateApi, DateValue} from '../services';\n\n/**\n * Pipe that is used for formatting date\n */\n@Pipe({name: 'dateFormat'})\nexport class DateFormatPipe<TDate = any> implements PipeTransform\n{\n //######################### constructors #########################\n constructor(@Inject(FORMAT_PROVIDER) private _formatProvider: FormatProvider,\n @Inject(DATE_API) private _dateApi: DateApi<TDate>)\n {\n }\n\n //######################### public methods - implementation of PipeTransform #########################\n\n /**\n * Formats provided date into formatted string, with default format 'date'\n * @param value - value to be transformed\n */\n public transform(value: TDate|DateValue): string\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - predefined format that is used for formatting, one of 'FormatProvider' keys\n */\n public transform(value: TDate|DateValue, format: keyof FormatProvider): string\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - predefined format that is used for formatting, one of 'FormatProvider' keys\n * @param parseFormat - format used for parsing string date\n */\n public transform(value: TDate|DateValue, format: keyof FormatProvider, parseFormat: string): string\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - format that is used for formatting\n * @param customFormat - indication that custom format is used\n */\n public transform(value: TDate|DateValue, format: string, customFormat: true): string\n /**\n * Formats provided date into formatted string\n * @param value - value to be transformed\n * @param format - format that is used for formatting\n * @param parseFormat - format used for parsing string date\n * @param customFormat - indication that custom format is used\n */\n public transform(value: TDate|DateValue, format: string, parseFormat: string, customFormat: true): string\n public transform(value: TDate|DateValue, format: string|keyof FormatProvider = nameof<FormatProvider>('date'), parseFormatOrCustomFormat?: string|boolean, _customFormat?: boolean): string\n {\n const parseFormat: string|undefined = isString(parseFormatOrCustomFormat) ? parseFormatOrCustomFormat : undefined;\n \n //format provider value\n if(format in this._formatProvider)\n {\n format = (<any>this._formatProvider)[format];\n }\n\n const dateObj = this._dateApi.getValue(value, parseFormat);\n\n if(dateObj.isValid())\n {\n return dateObj.format(this._dateApi.getFormat(format));\n }\n\n return '';\n }\n}"]}
@@ -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),