@anglr/datetime 8.1.0 → 9.0.0-beta.20241007050425

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 (173) hide show
  1. package/changelog.md +68 -1
  2. package/date-fns/src/services/dateFnsDateApi.service.d.ts +62 -130
  3. package/date-fns/src/services/dateFnsDateApi.service.d.ts.map +1 -1
  4. package/es2022/date-fns/src/services/dateFnsDateApi.service.js +71 -143
  5. package/es2022/date-fns/src/services/dateFnsDateApi.service.js.map +1 -1
  6. package/es2022/moment/src/services/momentDateApi.service.js +64 -140
  7. package/es2022/moment/src/services/momentDateApi.service.js.map +1 -1
  8. package/es2022/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.js +17 -30
  9. package/es2022/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.js.map +1 -1
  10. package/es2022/src/directives/datePickerInput/datePickerInput.directive.js +9 -9
  11. package/es2022/src/directives/datePickerInput/datePickerInput.directive.js.map +1 -1
  12. package/es2022/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js +16 -26
  13. package/es2022/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js.map +1 -1
  14. package/es2022/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js +8 -8
  15. package/es2022/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js.map +1 -1
  16. package/es2022/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js +9 -9
  17. package/es2022/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +1 -1
  18. package/es2022/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js +7 -11
  19. package/es2022/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +1 -1
  20. package/es2022/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js +8 -8
  21. package/es2022/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +1 -1
  22. package/es2022/src/directives/withNow/withNow.directive.js +11 -11
  23. package/es2022/src/directives/withNow/withNow.directive.js.map +1 -1
  24. package/es2022/src/directives/withTime/withTime.directive.js +10 -10
  25. package/es2022/src/directives/withTime/withTime.directive.js.map +1 -1
  26. package/es2022/src/directives/withToday/withToday.directive.js +11 -11
  27. package/es2022/src/directives/withToday/withToday.directive.js.map +1 -1
  28. package/es2022/src/interfaces/dateTimeInput/dateTimeInput.interface.js.map +1 -1
  29. package/es2022/src/misc/enums.js +8 -4
  30. package/es2022/src/misc/enums.js.map +1 -1
  31. package/es2022/src/misc/utils.js +7 -6
  32. package/es2022/src/misc/utils.js.map +1 -1
  33. package/es2022/src/misc/validators.js.map +1 -1
  34. package/es2022/src/modules/calendar/components/monthCalendar/monthCalendar.component.js +40 -68
  35. package/es2022/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +1 -1
  36. package/es2022/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js +5 -5
  37. package/es2022/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +1 -1
  38. package/es2022/src/modules/calendar/modules/monthCalendar.module.js +7 -11
  39. package/es2022/src/modules/calendar/modules/monthCalendar.module.js.map +1 -1
  40. package/es2022/src/modules/calendar/services/eventParser/eventParser.service.js +3 -4
  41. package/es2022/src/modules/calendar/services/eventParser/eventParser.service.js.map +1 -1
  42. package/es2022/src/modules/datePipes.module.js +6 -6
  43. package/es2022/src/modules/datePipes.module.js.map +1 -1
  44. package/es2022/src/modules/dateTime/directives/dateTime/dateTime.directive.js +41 -72
  45. package/es2022/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +1 -1
  46. package/es2022/src/modules/dateTime/directives/dateTimeBase.js +21 -25
  47. package/es2022/src/modules/dateTime/directives/dateTimeBase.js.map +1 -1
  48. package/es2022/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +36 -16
  49. package/es2022/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -1
  50. package/es2022/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +18 -26
  51. package/es2022/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -1
  52. package/es2022/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +12 -13
  53. package/es2022/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -1
  54. package/es2022/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +12 -13
  55. package/es2022/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -1
  56. package/es2022/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +12 -13
  57. package/es2022/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -1
  58. package/es2022/src/modules/dateTime/modules/dateTime.module.js +27 -27
  59. package/es2022/src/modules/dateTime/modules/dateTime.module.js.map +1 -1
  60. package/es2022/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js +39 -58
  61. package/es2022/src/modules/dateTimePicker/components/dateTimePeriodPickerBase.js.map +1 -1
  62. package/es2022/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +21 -57
  63. package/es2022/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -1
  64. package/es2022/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +17 -20
  65. package/es2022/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +1 -1
  66. package/es2022/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js +6 -10
  67. package/es2022/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +1 -1
  68. package/es2022/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js +31 -29
  69. package/es2022/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -1
  70. package/es2022/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js +13 -13
  71. package/es2022/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +1 -1
  72. package/es2022/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +11 -40
  73. package/es2022/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +1 -1
  74. package/es2022/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js +40 -55
  75. package/es2022/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +1 -1
  76. package/es2022/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js +8 -14
  77. package/es2022/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +1 -1
  78. package/es2022/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.js.map +1 -1
  79. package/es2022/src/modules/dateTimePicker/modules/dateTimePicker.module.js +9 -10
  80. package/es2022/src/modules/dateTimePicker/modules/dateTimePicker.module.js.map +1 -1
  81. package/es2022/src/pipes/dateConvert.pipe.js +4 -5
  82. package/es2022/src/pipes/dateConvert.pipe.js.map +1 -1
  83. package/es2022/src/pipes/dateFormat.pipe.js +4 -6
  84. package/es2022/src/pipes/dateFormat.pipe.js.map +1 -1
  85. package/es2022/src/services/dateApi/dateApi.interface.js.map +1 -1
  86. package/es2022/src/services/datePositionParser/datePositionParser.service.js +16 -17
  87. package/es2022/src/services/datePositionParser/datePositionParser.service.js.map +1 -1
  88. package/es2022/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js +3 -9
  89. package/es2022/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js.map +1 -1
  90. package/es2022/src/services/dateValueProvider/dateValueProvider.service.js +3 -5
  91. package/es2022/src/services/dateValueProvider/dateValueProvider.service.js.map +1 -1
  92. package/lerna.json +4 -0
  93. package/moment/src/services/momentDateApi.service.d.ts +63 -132
  94. package/moment/src/services/momentDateApi.service.d.ts.map +1 -1
  95. package/package.json +41 -43
  96. package/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.d.ts +3 -3
  97. package/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.d.ts.map +1 -1
  98. package/src/directives/datePickerInput/datePickerInput.directive.d.ts +3 -3
  99. package/src/directives/datePickerInput/datePickerInput.directive.d.ts.map +1 -1
  100. package/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.d.ts +7 -7
  101. package/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.d.ts.map +1 -1
  102. package/src/directives/dateTimePickerInput/dateTimePickerInput.directive.d.ts +3 -3
  103. package/src/directives/dateTimePickerInput/dateTimePickerInput.directive.d.ts.map +1 -1
  104. package/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.d.ts +3 -3
  105. package/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.d.ts.map +1 -1
  106. package/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.d.ts +7 -7
  107. package/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.d.ts.map +1 -1
  108. package/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.d.ts +3 -3
  109. package/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.d.ts.map +1 -1
  110. package/src/directives/withNow/withNow.directive.d.ts +5 -5
  111. package/src/directives/withNow/withNow.directive.d.ts.map +1 -1
  112. package/src/directives/withTime/withTime.directive.d.ts +5 -5
  113. package/src/directives/withTime/withTime.directive.d.ts.map +1 -1
  114. package/src/directives/withToday/withToday.directive.d.ts +5 -5
  115. package/src/directives/withToday/withToday.directive.d.ts.map +1 -1
  116. package/src/interfaces/dateTimeInput/dateTimeInput.interface.d.ts +1 -1
  117. package/src/misc/enums.d.ts +8 -4
  118. package/src/misc/enums.d.ts.map +1 -1
  119. package/src/misc/utils.d.ts +3 -3
  120. package/src/misc/utils.d.ts.map +1 -1
  121. package/src/modules/calendar/components/monthCalendar/monthCalendar.component.d.ts +1 -1
  122. package/src/modules/calendar/components/monthCalendar/monthCalendar.component.d.ts.map +1 -1
  123. package/src/modules/calendar/components/monthCalendar/monthCalendar.component.html +17 -9
  124. package/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.d.ts +1 -1
  125. package/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.d.ts.map +1 -1
  126. package/src/modules/calendar/modules/monthCalendar.module.d.ts +3 -4
  127. package/src/modules/calendar/modules/monthCalendar.module.d.ts.map +1 -1
  128. package/src/modules/datePipes.module.d.ts +1 -1
  129. package/src/modules/dateTime/directives/dateTime/dateTime.directive.d.ts +3 -3
  130. package/src/modules/dateTime/directives/dateTime/dateTime.directive.d.ts.map +1 -1
  131. package/src/modules/dateTime/directives/dateTimeBase.d.ts +3 -3
  132. package/src/modules/dateTime/directives/dateTimeBase.d.ts.map +1 -1
  133. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts +6 -4
  134. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts.map +1 -1
  135. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts +3 -3
  136. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts.map +1 -1
  137. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts +3 -3
  138. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts.map +1 -1
  139. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts +3 -3
  140. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts.map +1 -1
  141. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts +3 -3
  142. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts.map +1 -1
  143. package/src/modules/dateTime/modules/dateTime.module.d.ts +1 -1
  144. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts +4 -4
  145. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts.map +1 -1
  146. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.html +1 -1
  147. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.d.ts +3 -3
  148. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  149. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.html +21 -12
  150. package/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.d.ts +3 -3
  151. package/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  152. package/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.html +7 -5
  153. package/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.d.ts +3 -3
  154. package/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.d.ts.map +1 -1
  155. package/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.html +41 -29
  156. package/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.d.ts +3 -3
  157. package/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  158. package/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.html +7 -5
  159. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts +5 -5
  160. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts.map +1 -1
  161. package/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.d.ts +7 -7
  162. package/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.d.ts.map +1 -1
  163. package/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.d.ts +3 -3
  164. package/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.d.ts.map +1 -1
  165. package/src/modules/dateTimePicker/interfaces/periodData/periodData.interface.d.ts.map +1 -1
  166. package/src/modules/dateTimePicker/modules/dateTimePicker.module.d.ts +3 -3
  167. package/src/modules/dateTimePicker/modules/dateTimePicker.module.d.ts.map +1 -1
  168. package/src/pipes/dateConvert.pipe.d.ts +1 -1
  169. package/src/pipes/dateFormat.pipe.d.ts +1 -1
  170. package/src/services/dateApi/dateApi.interface.d.ts +11 -1
  171. package/src/services/dateApi/dateApi.interface.d.ts.map +1 -1
  172. package/src/services/dateValueProvider/dateValueProvider.service.d.ts.map +1 -1
  173. package/version.bak +1 -1
@@ -7,17 +7,16 @@ import * as i0 from "@angular/core";
7
7
  /**
8
8
  * Applies validator for date time max value
9
9
  */
10
- export class DateTimeMaxValidatorSADirective extends DateTimeBase {
11
- dateApi;
12
- //######################### private fields #########################
13
- /**
14
- * Function used for validations
15
- */
16
- _validator = () => null;
10
+ export class DateTimeMaxValidatorDirective extends DateTimeBase {
17
11
  //######################### constructor #########################
18
12
  constructor(dateApi) {
19
13
  super();
20
14
  this.dateApi = dateApi;
15
+ //######################### private fields #########################
16
+ /**
17
+ * Function used for validations
18
+ */
19
+ this._validator = () => null;
21
20
  }
22
21
  //######################### public methods - implementation of OnInit #########################
23
22
  /**
@@ -42,23 +41,23 @@ export class DateTimeMaxValidatorSADirective extends DateTimeBase {
42
41
  onMaxDateTimeChange() {
43
42
  this._validator = datetimeMaxValidator(this.dateApi, this.dateTimeData.maxDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);
44
43
  }
45
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimeMaxValidatorSADirective, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
46
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: DateTimeMaxValidatorSADirective, isStandalone: true, selector: "[dateTime][maxDateTime][validate]", providers: [
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeMaxValidatorDirective, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive }); }
45
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: DateTimeMaxValidatorDirective, isStandalone: true, selector: "[dateTime][maxDateTime][validate]", providers: [
47
46
  {
48
47
  provide: NG_VALIDATORS,
49
- useExisting: forwardRef(() => DateTimeMaxValidatorSADirective),
48
+ useExisting: forwardRef(() => DateTimeMaxValidatorDirective),
50
49
  multi: true
51
50
  },
52
- ], usesInheritance: true, ngImport: i0 });
51
+ ], usesInheritance: true, ngImport: i0 }); }
53
52
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimeMaxValidatorSADirective, decorators: [{
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeMaxValidatorDirective, decorators: [{
55
54
  type: Directive,
56
55
  args: [{
57
56
  selector: '[dateTime][maxDateTime][validate]',
58
57
  providers: [
59
58
  {
60
59
  provide: NG_VALIDATORS,
61
- useExisting: forwardRef(() => DateTimeMaxValidatorSADirective),
60
+ useExisting: forwardRef(() => DateTimeMaxValidatorDirective),
62
61
  multi: true
63
62
  },
64
63
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeMaxValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AAeH,MAAM,OAAO,+BA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C,CAAC;4BAC9D,KAAK,EAAE,IAAI;yBACd;qBACJ;oBACD,UAAU,EAAE,IAAI;iBACnB;;0BAWgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {datetimeMaxValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Applies validator for date time max value\n */\n@Directive(\n{\n selector: '[dateTime][maxDateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeMaxValidatorSADirective),\n multi: true\n },\n ],\n standalone: true,\n})\nexport class DateTimeMaxValidatorSADirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n super();\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeMaxValidator(this.dateApi, this.dateTimeData.maxDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected override onMaxDateTimeChange(): void\n {\n this._validator = datetimeMaxValidator(this.dateApi, this.dateTimeData.maxDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n}"]}
1
+ {"version":3,"file":"dateTimeMaxValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AAeH,MAAM,OAAO,6BAA+C,SAAQ,YAAmB;IASnF,iEAAiE;IACjE,YAAwC,OAAuB;QAE3D,KAAK,EAAE,CAAC;QAF4B,YAAO,GAAP,OAAO,CAAgB;QAR/D,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;IAM7C,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACrL,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACgB,mBAAmB;QAElC,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACrL,CAAC;8GA7CQ,6BAA6B,kBAUlB,QAAQ;kGAVnB,6BAA6B,gFAVtC;YAEI;gBACI,OAAO,EAAE,aAAa;gBACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;gBAC5D,KAAK,EAAE,IAAI;aACd;SACJ;;2FAGQ,6BAA6B;kBAdzC,SAAS;mBACV;oBACI,QAAQ,EAAE,mCAAmC;oBAC7C,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,8BAA8B,CAAC;4BAC5D,KAAK,EAAE,IAAI;yBACd;qBACJ;oBACD,UAAU,EAAE,IAAI;iBACnB;;0BAWgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {datetimeMaxValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Applies validator for date time max value\n */\n@Directive(\n{\n selector: '[dateTime][maxDateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeMaxValidatorDirective),\n multi: true\n },\n ],\n standalone: true,\n})\nexport class DateTimeMaxValidatorDirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n super();\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeMaxValidator(this.dateApi, this.dateTimeData.maxDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected override onMaxDateTimeChange(): void\n {\n this._validator = datetimeMaxValidator(this.dateApi, this.dateTimeData.maxDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n}"]}
@@ -7,17 +7,16 @@ import * as i0 from "@angular/core";
7
7
  /**
8
8
  * Applies validator for date time min value
9
9
  */
10
- export class DateTimeMinValidatorSADirective extends DateTimeBase {
11
- dateApi;
12
- //######################### private fields #########################
13
- /**
14
- * Function used for validations
15
- */
16
- _validator = () => null;
10
+ export class DateTimeMinValidatorDirective extends DateTimeBase {
17
11
  //######################### constructor #########################
18
12
  constructor(dateApi) {
19
13
  super();
20
14
  this.dateApi = dateApi;
15
+ //######################### private fields #########################
16
+ /**
17
+ * Function used for validations
18
+ */
19
+ this._validator = () => null;
21
20
  }
22
21
  //######################### public methods - implementation of OnInit #########################
23
22
  /**
@@ -42,23 +41,23 @@ export class DateTimeMinValidatorSADirective extends DateTimeBase {
42
41
  onMinDateTimeChange() {
43
42
  this._validator = datetimeMinValidator(this.dateApi, this.dateTimeData.minDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);
44
43
  }
45
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimeMinValidatorSADirective, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
46
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: DateTimeMinValidatorSADirective, isStandalone: true, selector: "[dateTime][minDateTime][validate]", providers: [
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeMinValidatorDirective, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive }); }
45
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: DateTimeMinValidatorDirective, isStandalone: true, selector: "[dateTime][minDateTime][validate]", providers: [
47
46
  {
48
47
  provide: NG_VALIDATORS,
49
- useExisting: forwardRef(() => DateTimeMinValidatorSADirective),
48
+ useExisting: forwardRef(() => DateTimeMinValidatorDirective),
50
49
  multi: true
51
50
  },
52
- ], usesInheritance: true, ngImport: i0 });
51
+ ], usesInheritance: true, ngImport: i0 }); }
53
52
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimeMinValidatorSADirective, decorators: [{
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeMinValidatorDirective, decorators: [{
55
54
  type: Directive,
56
55
  args: [{
57
56
  selector: '[dateTime][minDateTime][validate]',
58
57
  providers: [
59
58
  {
60
59
  provide: NG_VALIDATORS,
61
- useExisting: forwardRef(() => DateTimeMinValidatorSADirective),
60
+ useExisting: forwardRef(() => DateTimeMinValidatorDirective),
62
61
  multi: true
63
62
  },
64
63
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeMinValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAA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SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,gCAAgC,CAAC;4BAC9D,KAAK,EAAE,IAAI;yBACd;qBACJ;oBACD,UAAU,EAAE,IAAI;iBACnB;;0BAWgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {datetimeMinValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Applies validator for date time min value\n */\n@Directive(\n{\n selector: '[dateTime][minDateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeMinValidatorSADirective),\n multi: true\n },\n ],\n standalone: true,\n})\nexport class DateTimeMinValidatorSADirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n super();\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeMinValidator(this.dateApi, this.dateTimeData.minDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected override onMinDateTimeChange(): void\n {\n this._validator = datetimeMinValidator(this.dateApi, this.dateTimeData.minDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n}"]}
1
+ {"version":3,"file":"dateTimeMinValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AAeH,MAAM,OAAO,6BAA+C,SAAQ,YAAmB;IASnF,iEAAiE;IACjE,YAAwC,OAAuB;QAE3D,KAAK,EAAE,CAAC;QAF4B,YAAO,GAAP,OAAO,CAAgB;QAR/D,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;IAM7C,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACrL,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACgB,mBAAmB;QAElC,IAAI,CAAC,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACrL,CAAC;8GA7CQ,6BAA6B,kBAUlB,QAAQ;kGAVnB,6BAA6B,gFAVtC;YAEI;gBACI,OAAO,EAAE,aAAa;gBACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;gBAC5D,KAAK,EAAE,IAAI;aACd;SACJ;;2FAGQ,6BAA6B;kBAdzC,SAAS;mBACV;oBACI,QAAQ,EAAE,mCAAmC;oBAC7C,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,8BAA8B,CAAC;4BAC5D,KAAK,EAAE,IAAI;yBACd;qBACJ;oBACD,UAAU,EAAE,IAAI;iBACnB;;0BAWgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {datetimeMinValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Applies validator for date time min value\n */\n@Directive(\n{\n selector: '[dateTime][minDateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeMinValidatorDirective),\n multi: true\n },\n ],\n standalone: true,\n})\nexport class DateTimeMinValidatorDirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n super();\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeMinValidator(this.dateApi, this.dateTimeData.minDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected override onMinDateTimeChange(): void\n {\n this._validator = datetimeMinValidator(this.dateApi, this.dateTimeData.minDateTime, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n}"]}
@@ -7,17 +7,16 @@ import * as i0 from "@angular/core";
7
7
  /**
8
8
  * Applies validator for date time
9
9
  */
10
- export class DateTimeValidatorSADirective extends DateTimeBase {
11
- dateApi;
12
- //######################### private fields #########################
13
- /**
14
- * Function used for validations
15
- */
16
- _validator = () => null;
10
+ export class DateTimeValidatorDirective extends DateTimeBase {
17
11
  //######################### constructor #########################
18
12
  constructor(dateApi) {
19
13
  super();
20
14
  this.dateApi = dateApi;
15
+ //######################### private fields #########################
16
+ /**
17
+ * Function used for validations
18
+ */
19
+ this._validator = () => null;
21
20
  }
22
21
  //######################### public methods - implementation of OnInit #########################
23
22
  /**
@@ -35,23 +34,23 @@ export class DateTimeValidatorSADirective extends DateTimeBase {
35
34
  validate(control) {
36
35
  return this._validator(control);
37
36
  }
38
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimeValidatorSADirective, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive });
39
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: DateTimeValidatorSADirective, isStandalone: true, selector: "[dateTime][validate]", providers: [
37
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeValidatorDirective, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive }); }
38
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: DateTimeValidatorDirective, isStandalone: true, selector: "[dateTime][validate]", providers: [
40
39
  {
41
40
  provide: NG_VALIDATORS,
42
- useExisting: forwardRef(() => DateTimeValidatorSADirective),
41
+ useExisting: forwardRef(() => DateTimeValidatorDirective),
43
42
  multi: true
44
43
  },
45
- ], usesInheritance: true, ngImport: i0 });
44
+ ], usesInheritance: true, ngImport: i0 }); }
46
45
  }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimeValidatorSADirective, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeValidatorDirective, decorators: [{
48
47
  type: Directive,
49
48
  args: [{
50
49
  selector: '[dateTime][validate]',
51
50
  providers: [
52
51
  {
53
52
  provide: NG_VALIDATORS,
54
- useExisting: forwardRef(() => DateTimeValidatorSADirective),
53
+ useExisting: forwardRef(() => DateTimeValidatorDirective),
55
54
  multi: true
56
55
  },
57
56
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AAeH,MAAM,OAAO,4BAA8C,SAAQ,YAAmB;IAU1C;IARxC,oEAAoE;IAEpE;;OAEG;IACK,UAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;IAE7C,iEAAiE;IACjE,YAAwC,OAAuB;QAE3D,KAAK,EAAE,CAAC;QAF4B,YAAO,GAAP,OAAO,CAAgB;IAG/D,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACnJ,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;uGAnCQ,4BAA4B,kBAUjB,QAAQ;2FAVnB,4BAA4B,mEAVrC;YAEI;gBACI,OAAO,EAAE,aAAa;gBACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;gBAC3D,KAAK,EAAE,IAAI;aACd;SACJ;;2FAGQ,4BAA4B;kBAdxC,SAAS;mBACV;oBACI,QAAQ,EAAE,sBAAsB;oBAChC,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,6BAA6B,CAAC;4BAC3D,KAAK,EAAE,IAAI;yBACd;qBACJ;oBACD,UAAU,EAAE,IAAI;iBACnB;;0BAWgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {datetimeValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Applies validator for date time\n */\n@Directive(\n{\n selector: '[dateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeValidatorSADirective),\n multi: true\n },\n ],\n standalone: true,\n})\nexport class DateTimeValidatorSADirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n super();\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeValidator(this.dateApi, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n}"]}
1
+ {"version":3,"file":"dateTimeValidator.directive.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAoB,UAAU,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AACtF,OAAO,EAAkB,aAAa,EAA2C,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AAeH,MAAM,OAAO,0BAA4C,SAAQ,YAAmB;IAShF,iEAAiE;IACjE,YAAwC,OAAuB;QAE3D,KAAK,EAAE,CAAC;QAF4B,YAAO,GAAP,OAAO,CAAgB;QAR/D,oEAAoE;QAEpE;;WAEG;QACK,eAAU,GAAgB,GAAG,EAAE,CAAC,IAAI,CAAC;IAM7C,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACnJ,CAAC;IAED,kGAAkG;IAElG;;;;OAIG;IACI,QAAQ,CAAC,OAAwB;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;8GAnCQ,0BAA0B,kBAUf,QAAQ;kGAVnB,0BAA0B,mEAVnC;YAEI;gBACI,OAAO,EAAE,aAAa;gBACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;gBACzD,KAAK,EAAE,IAAI;aACd;SACJ;;2FAGQ,0BAA0B;kBAdtC,SAAS;mBACV;oBACI,QAAQ,EAAE,sBAAsB;oBAChC,SAAS,EACT;wBAEI;4BACI,OAAO,EAAE,aAAa;4BACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,2BAA2B,CAAC;4BACzD,KAAK,EAAE,IAAI;yBACd;qBACJ;oBACD,UAAU,EAAE,IAAI;iBACnB;;0BAWgB,MAAM;2BAAC,QAAQ","sourcesContent":["import {Directive, ExistingProvider, forwardRef, Inject, OnInit} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn} from '@angular/forms';\n\nimport {DATE_API} from '../../../../misc/tokens';\nimport {datetimeValidator} from '../../../../misc/validators';\nimport {DateApi} from '../../../../services';\nimport {DateTimeBase} from '../dateTimeBase';\n\n/**\n * Applies validator for date time\n */\n@Directive(\n{\n selector: '[dateTime][validate]',\n providers:\n [\n <ExistingProvider>\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DateTimeValidatorDirective),\n multi: true\n },\n ],\n standalone: true,\n})\nexport class DateTimeValidatorDirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit\n{\n //######################### private fields #########################\n\n /**\n * Function used for validations\n */\n private _validator: ValidatorFn = () => null;\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,)\n {\n super();\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._validator = datetimeValidator(this.dateApi, this.dateTimeData.valueFormat, this.dateTimeData.customFormat, this.dateTimeData.dataFormat);\n }\n\n //######################### public methods - implementation of Validator #########################\n\n /**\n * Validates input and returns validation result\n * @param control - Control that is being validated\n * @returns validation results\n */\n public validate(control: AbstractControl): ValidationErrors|null\n {\n return this._validator(control);\n }\n}"]}
@@ -1,42 +1,42 @@
1
1
  import { NgModule } from '@angular/core';
2
- import { DateTimeControlValueAccessorSADirective, DateTimeSADirective, DateTimeInputSADirective, DateTimeMaxValidatorSADirective, DateTimeMinValidatorSADirective, DateTimeValidatorSADirective } from '../directives';
2
+ import { DateTimeControlValueAccessorDirective, DateTimeDirective, DateTimeInputDirective, DateTimeMaxValidatorDirective, DateTimeMinValidatorDirective, DateTimeValidatorDirective } from '../directives';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Module for basic date time directives, components, pipes
6
6
  */
7
7
  export class DateTimeModule {
8
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.1", ngImport: i0, type: DateTimeModule, imports: [DateTimeSADirective,
10
- DateTimeControlValueAccessorSADirective,
11
- DateTimeInputSADirective,
12
- DateTimeMaxValidatorSADirective,
13
- DateTimeMinValidatorSADirective,
14
- DateTimeValidatorSADirective], exports: [DateTimeSADirective,
15
- DateTimeControlValueAccessorSADirective,
16
- DateTimeInputSADirective,
17
- DateTimeMaxValidatorSADirective,
18
- DateTimeMinValidatorSADirective,
19
- DateTimeValidatorSADirective] });
20
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimeModule });
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
9
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: DateTimeModule, imports: [DateTimeDirective,
10
+ DateTimeControlValueAccessorDirective,
11
+ DateTimeInputDirective,
12
+ DateTimeMaxValidatorDirective,
13
+ DateTimeMinValidatorDirective,
14
+ DateTimeValidatorDirective], exports: [DateTimeDirective,
15
+ DateTimeControlValueAccessorDirective,
16
+ DateTimeInputDirective,
17
+ DateTimeMaxValidatorDirective,
18
+ DateTimeMinValidatorDirective,
19
+ DateTimeValidatorDirective] }); }
20
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeModule }); }
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimeModule, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeModule, decorators: [{
23
23
  type: NgModule,
24
24
  args: [{
25
25
  imports: [
26
- DateTimeSADirective,
27
- DateTimeControlValueAccessorSADirective,
28
- DateTimeInputSADirective,
29
- DateTimeMaxValidatorSADirective,
30
- DateTimeMinValidatorSADirective,
31
- DateTimeValidatorSADirective,
26
+ DateTimeDirective,
27
+ DateTimeControlValueAccessorDirective,
28
+ DateTimeInputDirective,
29
+ DateTimeMaxValidatorDirective,
30
+ DateTimeMinValidatorDirective,
31
+ DateTimeValidatorDirective,
32
32
  ],
33
33
  exports: [
34
- DateTimeSADirective,
35
- DateTimeControlValueAccessorSADirective,
36
- DateTimeInputSADirective,
37
- DateTimeMaxValidatorSADirective,
38
- DateTimeMinValidatorSADirective,
39
- DateTimeValidatorSADirective,
34
+ DateTimeDirective,
35
+ DateTimeControlValueAccessorDirective,
36
+ DateTimeInputDirective,
37
+ DateTimeMaxValidatorDirective,
38
+ DateTimeMinValidatorDirective,
39
+ DateTimeValidatorDirective,
40
40
  ],
41
41
  }]
42
42
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"dateTime.module.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/modules/dateTime.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,uCAAuC,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,4BAA4B,EAAC,MAAM,eAAe,CAAC;;AAErN;;GAEG;AAsBH,MAAM,OAAO,cAAc;uGAAd,cAAc;wGAAd,cAAc,YAjBnB,mBAAmB;YACnB,uCAAuC;YACvC,wBAAwB;YACxB,+BAA+B;YAC/B,+BAA+B;YAC/B,4BAA4B,aAI5B,mBAAmB;YACnB,uCAAuC;YACvC,wBAAwB;YACxB,+BAA+B;YAC/B,+BAA+B;YAC/B,4BAA4B;wGAGvB,cAAc;;2FAAd,cAAc;kBArB1B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,mBAAmB;wBACnB,uCAAuC;wBACvC,wBAAwB;wBACxB,+BAA+B;wBAC/B,+BAA+B;wBAC/B,4BAA4B;qBAC/B;oBACD,OAAO,EACP;wBACI,mBAAmB;wBACnB,uCAAuC;wBACvC,wBAAwB;wBACxB,+BAA+B;wBAC/B,+BAA+B;wBAC/B,4BAA4B;qBAC/B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DateTimeControlValueAccessorSADirective, DateTimeSADirective, DateTimeInputSADirective, DateTimeMaxValidatorSADirective, DateTimeMinValidatorSADirective, DateTimeValidatorSADirective} from '../directives';\n\n/**\n * Module for basic date time directives, components, pipes\n */\n@NgModule(\n{\n imports:\n [\n DateTimeSADirective,\n DateTimeControlValueAccessorSADirective,\n DateTimeInputSADirective,\n DateTimeMaxValidatorSADirective,\n DateTimeMinValidatorSADirective,\n DateTimeValidatorSADirective,\n ],\n exports:\n [\n DateTimeSADirective,\n DateTimeControlValueAccessorSADirective,\n DateTimeInputSADirective,\n DateTimeMaxValidatorSADirective,\n DateTimeMinValidatorSADirective,\n DateTimeValidatorSADirective,\n ],\n})\nexport class DateTimeModule\n{\n}"]}
1
+ {"version":3,"file":"dateTime.module.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/modules/dateTime.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,qCAAqC,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,0BAA0B,EAAC,MAAM,eAAe,CAAC;;AAEzM;;GAEG;AAsBH,MAAM,OAAO,cAAc;8GAAd,cAAc;+GAAd,cAAc,YAjBnB,iBAAiB;YACjB,qCAAqC;YACrC,sBAAsB;YACtB,6BAA6B;YAC7B,6BAA6B;YAC7B,0BAA0B,aAI1B,iBAAiB;YACjB,qCAAqC;YACrC,sBAAsB;YACtB,6BAA6B;YAC7B,6BAA6B;YAC7B,0BAA0B;+GAGrB,cAAc;;2FAAd,cAAc;kBArB1B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,iBAAiB;wBACjB,qCAAqC;wBACrC,sBAAsB;wBACtB,6BAA6B;wBAC7B,6BAA6B;wBAC7B,0BAA0B;qBAC7B;oBACD,OAAO,EACP;wBACI,iBAAiB;wBACjB,qCAAqC;wBACrC,sBAAsB;wBACtB,6BAA6B;wBAC7B,6BAA6B;wBAC7B,0BAA0B;qBAC7B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {DateTimeControlValueAccessorDirective, DateTimeDirective, DateTimeInputDirective, DateTimeMaxValidatorDirective, DateTimeMinValidatorDirective, DateTimeValidatorDirective} from '../directives';\n\n/**\n * Module for basic date time directives, components, pipes\n */\n@NgModule(\n{\n imports:\n [\n DateTimeDirective,\n DateTimeControlValueAccessorDirective,\n DateTimeInputDirective,\n DateTimeMaxValidatorDirective,\n DateTimeMinValidatorDirective,\n DateTimeValidatorDirective,\n ],\n exports:\n [\n DateTimeDirective,\n DateTimeControlValueAccessorDirective,\n DateTimeInputDirective,\n DateTimeMaxValidatorDirective,\n DateTimeMinValidatorDirective,\n DateTimeValidatorDirective,\n ],\n})\nexport class DateTimeModule\n{\n}"]}
@@ -5,39 +5,45 @@ import { DATE_API } from '../../../misc/tokens';
5
5
  * Base abstract class for each date time period picker
6
6
  */
7
7
  export class DateTimePeriodPickerBase {
8
- //######################### protected properties #########################
9
- /**
10
- * Array of period data to be displayed
11
- */
12
- periodData = [];
13
- /**
14
- * Subject used for emitting of value changes
15
- */
16
- valueChangeSubject = new Subject();
17
- /**
18
- * Subject used for scaling up
19
- */
20
- scaleUpSubject = new Subject();
21
- /**
22
- * Subject used for scaling down
23
- */
24
- scaleDownSubject = new Subject();
25
- /**
26
- * Date api instance for displayed date
27
- */
28
- displayDate;
29
- /**
30
- * Currently displayed date
31
- */
32
- displayedDate;
33
- /**
34
- * Date api instance for max date
35
- */
36
- maxDateObj;
37
- /**
38
- * Date api instance for min date
39
- */
40
- minDateObj;
8
+ constructor() {
9
+ //######################### protected properties #########################
10
+ /**
11
+ * Array of period data to be displayed
12
+ */
13
+ this.periodData = [];
14
+ /**
15
+ * Subject used for emitting of value changes
16
+ */
17
+ this.valueChangeSubject = new Subject();
18
+ /**
19
+ * Subject used for scaling up
20
+ */
21
+ this.scaleUpSubject = new Subject();
22
+ /**
23
+ * Subject used for scaling down
24
+ */
25
+ this.scaleDownSubject = new Subject();
26
+ /**
27
+ * Change detector instance
28
+ */
29
+ this.changeDetector = inject(ChangeDetectorRef);
30
+ /**
31
+ * Instance of date api for manipulation with date time
32
+ */
33
+ this.dateApi = inject(DATE_API);
34
+ /**
35
+ * @inheritdoc
36
+ */
37
+ this.canScaleUp = false;
38
+ /**
39
+ * @inheritdoc
40
+ */
41
+ this.canScaleDown = false;
42
+ /**
43
+ * @inheritdoc
44
+ */
45
+ this.ranged = false;
46
+ }
41
47
  /**
42
48
  * Gets or sets value as single value
43
49
  */
@@ -62,19 +68,6 @@ export class DateTimePeriodPickerBase {
62
68
  set rangeValue(value) {
63
69
  this.value = value;
64
70
  }
65
- /**
66
- * Change detector instance
67
- */
68
- changeDetector = inject(ChangeDetectorRef);
69
- /**
70
- * Instance of date api for manipulation with date time
71
- */
72
- dateApi = inject(DATE_API);
73
- //######################### public properties - implementation of DateTimePicker #########################
74
- /**
75
- * @inheritdoc
76
- */
77
- value;
78
71
  /**
79
72
  * @inheritdoc
80
73
  */
@@ -114,18 +107,6 @@ export class DateTimePeriodPickerBase {
114
107
  }
115
108
  this.minDateObj = this.dateApi.getValue(value);
116
109
  }
117
- /**
118
- * @inheritdoc
119
- */
120
- canScaleUp = false;
121
- /**
122
- * @inheritdoc
123
- */
124
- canScaleDown = false;
125
- /**
126
- * @inheritdoc
127
- */
128
- ranged = false;
129
110
  /**
130
111
  * @inheritdoc
131
112
  */
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimePeriodPickerBase.js","sourceRoot":"","sources":["../../../../../src/modules/dateTimePicker/components/dateTimePeriodPickerBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACxD,OAAO,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAK9C;;GAEG;AACH,MAAM,OAAgB,wBAAwB;IAE1C,0EAA0E;IAE1E;;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AC,KAAK,EACd;YACI,OAAO;SACV;QAED,IAAG,CAAC,IAAI,CAAC,MAAM,EACf;YACI,IAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,EAC9B;gBACI,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC;gBAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;gBAEtF,IAAG,IAAI,EACP;oBACI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;iBACtB;aACJ;SACJ;aAED;YACI,qBAAqB;SACxB;IACL,CAAC;CACJ","sourcesContent":["import {ChangeDetectorRef, inject} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateTimeObjectValue} from '../../../misc/types';\nimport {DateApi, DateApiObject} from '../../../services';\nimport {DateTimePicker, PeriodData} from '../interfaces';\n\n/**\n * Base abstract class for each date time period picker\n */\nexport abstract class DateTimePeriodPickerBase<TPeriod extends PeriodData<TDate>, TDate = unknown> implements DateTimePicker<TDate>\n{\n //######################### protected properties #########################\n\n /**\n * Array of period data to be displayed\n */\n protected periodData: TPeriod[] = [];\n\n /**\n * Subject used for emitting of value changes\n */\n protected valueChangeSubject: Subject<void> = new Subject<void>();\n\n /**\n * Subject used for scaling up\n */\n protected scaleUpSubject: Subject<TDate> = new Subject<TDate>();\n\n /**\n * Subject used for scaling down\n */\n protected scaleDownSubject: Subject<TDate> = new Subject<TDate>();\n\n /**\n * Date api instance for displayed date\n */\n protected displayDate: DateApiObject<TDate>|undefined|null;\n\n /**\n * Currently displayed date\n */\n protected displayedDate: TDate|undefined|null;\n\n /**\n * Date api instance for max date\n */\n protected maxDateObj: DateApiObject<TDate>|undefined|null;\n\n /**\n * Date api instance for min date\n */\n protected minDateObj: DateApiObject<TDate>|undefined|null;\n\n /**\n * Gets or sets value as single value\n */\n protected get singleValue(): DateApiObject<TDate>|undefined|null\n {\n if(Array.isArray(this.value))\n {\n return null;\n }\n\n return this.value;\n }\n protected set singleValue(value: DateApiObject<TDate>|undefined|null)\n {\n this.value = value;\n }\n\n /**\n * Gets or sets value as single value\n */\n protected get rangeValue(): [DateApiObject<TDate>|null, DateApiObject<TDate>|null]|undefined|null\n {\n if(!Array.isArray(this.value))\n {\n return null;\n }\n\n return this.value;\n }\n protected set rangeValue(value: [DateApiObject<TDate>|null, DateApiObject<TDate>|null]|undefined|null)\n {\n this.value = value;\n }\n\n /**\n * Change detector instance\n */\n protected changeDetector: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n /**\n * Instance of date api for manipulation with date time\n */\n protected dateApi: DateApi<TDate> = inject(DATE_API) as DateApi<TDate>;\n\n //######################### public properties - implementation of DateTimePicker #########################\n\n /**\n * @inheritdoc\n */\n public value: DateTimeObjectValue<TDate>|undefined|null;\n\n /**\n * @inheritdoc\n */\n public get display(): TDate|undefined|null\n {\n return this.displayDate?.value;\n }\n public set display(value: TDate|undefined|null)\n {\n if(!value)\n {\n this.displayDate = null;\n\n return;\n }\n\n this.displayDate = this.dateApi.getValue(value);\n }\n\n /**\n * @inheritdoc\n */\n public get maxDate(): TDate|undefined|null\n {\n return this.maxDateObj?.value;\n }\n public set maxDate(value: TDate|undefined|null)\n {\n if(!value)\n {\n this.maxDateObj = null;\n\n return;\n }\n\n this.maxDateObj = this.dateApi.getValue(value);\n }\n\n /**\n * @inheritdoc\n */\n public get minDate(): TDate|undefined|null\n {\n return this.minDateObj?.value;\n }\n public set minDate(value: TDate|undefined|null)\n {\n if(!value)\n {\n this.minDateObj = null;\n\n return;\n }\n\n this.minDateObj = this.dateApi.getValue(value);\n }\n\n /**\n * @inheritdoc\n */\n public canScaleUp: boolean = false;\n\n /**\n * @inheritdoc\n */\n public canScaleDown: boolean = false;\n\n /**\n * @inheritdoc\n */\n public ranged: boolean = false;\n\n /**\n * @inheritdoc\n */\n public get valueChange(): Observable<void>\n {\n return this.valueChangeSubject.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get scaleUp(): Observable<TDate>\n {\n return this.scaleUpSubject.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get scaleDown(): Observable<TDate>\n {\n return this.scaleDownSubject.asObservable();\n }\n\n //######################### public methods - implementation of invalidatable #########################\n\n /**\n * @inheritdoc\n */\n public invalidateVisuals(): void\n {\n this.onRender();\n\n this.changeDetector.detectChanges();\n }\n\n //######################### protected methods #########################\n\n /**\n * Method that is being called to render changes\n */\n protected abstract onRender(): void;\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 * 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.minDateObj && !this.maxDateObj)\n {\n this.periodData.forEach(itm => itm.disabled = false);\n\n return;\n }\n\n let restAfter = false;\n\n for(const period of this.periodData)\n {\n if(this.minDateObj?.isValid() && this.minDateObj.isAfter(period.dateObj.value) && !this.isSamePeriod(this.minDateObj, period.dateObj.value))\n {\n period.disabled = true;\n }\n\n if(restAfter || (this.maxDateObj?.isValid() && this.maxDateObj.isBefore(period.dateObj.value) && !this.isSamePeriod(this.maxDateObj, period.dateObj.value)))\n {\n restAfter = true;\n period.disabled = true;\n }\n }\n }\n\n /**\n * Sets active date\n */\n protected setActive(): void\n {\n this.periodData.forEach(itm => itm.active = false);\n\n if(!this.value)\n {\n return;\n }\n \n if(!this.ranged)\n {\n if(this.singleValue?.isValid())\n {\n const value = this.singleValue;\n const data = this.periodData.find(itm => this.isSamePeriod(itm.dateObj, value.value));\n\n if(data)\n {\n data.active = true;\n }\n }\n }\n else\n {\n //TODO: support range\n }\n }\n}"]}
1
+ {"version":3,"file":"dateTimePeriodPickerBase.js","sour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3J,CAAC;gBACG,SAAS,GAAG,IAAI,CAAC;gBACjB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC3B,CAAC;QACL,CAAC;IACL,CAAC;IAED;;OAEG;IACO,SAAS;QAEf,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;QAEnD,IAAG,CAAC,IAAI,CAAC,KAAK,EACd,CAAC;YACG,OAAO;QACX,CAAC;QAED,IAAG,CAAC,IAAI,CAAC,MAAM,EACf,CAAC;YACG,IAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,EAC9B,CAAC;gBACG,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC;gBAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;gBAEtF,IAAG,IAAI,EACP,CAAC;oBACG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;gBACvB,CAAC;YACL,CAAC;QACL,CAAC;aAED,CAAC;YACG,qBAAqB;QACzB,CAAC;IACL,CAAC;CACJ","sourcesContent":["import {ChangeDetectorRef, inject} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {DATE_API} from '../../../misc/tokens';\nimport {DateTimeObjectValue} from '../../../misc/types';\nimport {DateApi, DateApiObject} from '../../../services';\nimport {DateTimePicker, PeriodData} from '../interfaces';\n\n/**\n * Base abstract class for each date time period picker\n */\nexport abstract class DateTimePeriodPickerBase<TPeriod extends PeriodData<TDate>, TDate = unknown> implements DateTimePicker<TDate>\n{\n //######################### protected properties #########################\n\n /**\n * Array of period data to be displayed\n */\n protected periodData: TPeriod[] = [];\n\n /**\n * Subject used for emitting of value changes\n */\n protected valueChangeSubject: Subject<void> = new Subject<void>();\n\n /**\n * Subject used for scaling up\n */\n protected scaleUpSubject: Subject<TDate> = new Subject<TDate>();\n\n /**\n * Subject used for scaling down\n */\n protected scaleDownSubject: Subject<TDate> = new Subject<TDate>();\n\n /**\n * Date api instance for displayed date\n */\n protected displayDate: DateApiObject<TDate>|undefined|null;\n\n /**\n * Currently displayed date\n */\n protected displayedDate: TDate|undefined|null;\n\n /**\n * Date api instance for max date\n */\n protected maxDateObj: DateApiObject<TDate>|undefined|null;\n\n /**\n * Date api instance for min date\n */\n protected minDateObj: DateApiObject<TDate>|undefined|null;\n\n /**\n * Gets or sets value as single value\n */\n protected get singleValue(): DateApiObject<TDate>|undefined|null\n {\n if(Array.isArray(this.value))\n {\n return null;\n }\n\n return this.value;\n }\n protected set singleValue(value: DateApiObject<TDate>|undefined|null)\n {\n this.value = value;\n }\n\n /**\n * Gets or sets value as single value\n */\n protected get rangeValue(): [DateApiObject<TDate>|null, DateApiObject<TDate>|null]|undefined|null\n {\n if(!Array.isArray(this.value))\n {\n return null;\n }\n\n return this.value;\n }\n protected set rangeValue(value: [DateApiObject<TDate>|null, DateApiObject<TDate>|null]|undefined|null)\n {\n this.value = value;\n }\n\n /**\n * Change detector instance\n */\n protected changeDetector: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n /**\n * Instance of date api for manipulation with date time\n */\n protected dateApi: DateApi<TDate> = inject(DATE_API) as DateApi<TDate>;\n\n //######################### public properties - implementation of DateTimePicker #########################\n\n /**\n * @inheritdoc\n */\n public value: DateTimeObjectValue<TDate>|undefined|null;\n\n /**\n * @inheritdoc\n */\n public get display(): TDate|undefined|null\n {\n return this.displayDate?.value;\n }\n public set display(value: TDate|undefined|null)\n {\n if(!value)\n {\n this.displayDate = null;\n\n return;\n }\n\n this.displayDate = this.dateApi.getValue(value);\n }\n\n /**\n * @inheritdoc\n */\n public get maxDate(): TDate|undefined|null\n {\n return this.maxDateObj?.value;\n }\n public set maxDate(value: TDate|undefined|null)\n {\n if(!value)\n {\n this.maxDateObj = null;\n\n return;\n }\n\n this.maxDateObj = this.dateApi.getValue(value);\n }\n\n /**\n * @inheritdoc\n */\n public get minDate(): TDate|undefined|null\n {\n return this.minDateObj?.value;\n }\n public set minDate(value: TDate|undefined|null)\n {\n if(!value)\n {\n this.minDateObj = null;\n\n return;\n }\n\n this.minDateObj = this.dateApi.getValue(value);\n }\n\n /**\n * @inheritdoc\n */\n public canScaleUp: boolean = false;\n\n /**\n * @inheritdoc\n */\n public canScaleDown: boolean = false;\n\n /**\n * @inheritdoc\n */\n public ranged: boolean = false;\n\n /**\n * @inheritdoc\n */\n public get valueChange(): Observable<void>\n {\n return this.valueChangeSubject.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get scaleUp(): Observable<TDate>\n {\n return this.scaleUpSubject.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get scaleDown(): Observable<TDate>\n {\n return this.scaleDownSubject.asObservable();\n }\n\n //######################### public methods - implementation of invalidatable #########################\n\n /**\n * @inheritdoc\n */\n public invalidateVisuals(): void\n {\n this.onRender();\n\n this.changeDetector.detectChanges();\n }\n\n //######################### protected methods #########################\n\n /**\n * Method that is being called to render changes\n */\n protected abstract onRender(): void;\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 * 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.minDateObj && !this.maxDateObj)\n {\n this.periodData.forEach(itm => itm.disabled = false);\n\n return;\n }\n\n let restAfter = false;\n\n for(const period of this.periodData)\n {\n if(this.minDateObj?.isValid() && this.minDateObj.isAfter(period.dateObj.value) && !this.isSamePeriod(this.minDateObj, period.dateObj.value))\n {\n period.disabled = true;\n }\n\n if(restAfter || (this.maxDateObj?.isValid() && this.maxDateObj.isBefore(period.dateObj.value) && !this.isSamePeriod(this.maxDateObj, period.dateObj.value)))\n {\n restAfter = true;\n period.disabled = true;\n }\n }\n }\n\n /**\n * Sets active date\n */\n protected setActive(): void\n {\n this.periodData.forEach(itm => itm.active = false);\n\n if(!this.value)\n {\n return;\n }\n \n if(!this.ranged)\n {\n if(this.singleValue?.isValid())\n {\n const value = this.singleValue;\n const data = this.periodData.find(itm => this.isSamePeriod(itm.dateObj, value.value));\n\n if(data)\n {\n data.active = true;\n }\n }\n }\n else\n {\n //TODO: support range\n }\n }\n}"]}
@@ -3,11 +3,11 @@ import { POSITION } from '@anglr/common';
3
3
  import { extend, isBlank, nameof } from '@jscrpt/common';
4
4
  import { Subscription } from 'rxjs';
5
5
  import { DATE_TIME_PICKER_OPTIONS } from '../../misc/tokens';
6
- import { DayPickerSAComponent } from '../dayPicker/dayPicker.component';
7
- import { MonthPickerSAComponent } from '../monthPicker/monthPicker.component';
8
- import { YearPickerSAComponent } from '../yearPicker/yearPicker.component';
6
+ import { DayPickerComponent } from '../dayPicker/dayPicker.component';
7
+ import { MonthPickerComponent } from '../monthPicker/monthPicker.component';
8
+ import { YearPickerComponent } from '../yearPicker/yearPicker.component';
9
9
  import { formatDateTime, getInternalValue } from '../../../../misc/utils';
10
- import { DateTimeSADirective } from '../../../dateTime/directives';
10
+ import { DateTimeDirective } from '../../../dateTime/directives';
11
11
  import { DateValueProvider } from '../../../../services';
12
12
  import { DateTimeValueFormat } from '../../../../misc/enums';
13
13
  import * as i0 from "@angular/core";
@@ -23,51 +23,15 @@ const CORRUPTED_CONFIG_TEXT = 'DateTime: Corrupted configuration for DateTimePic
23
23
  const defaultOptions = {
24
24
  defaultPeriod: 'day',
25
25
  periodsDefinition: {
26
- 'day': DayPickerSAComponent,
27
- 'month': MonthPickerSAComponent,
28
- 'year': YearPickerSAComponent,
26
+ 'day': DayPickerComponent,
27
+ 'month': MonthPickerComponent,
28
+ 'year': YearPickerComponent,
29
29
  },
30
30
  };
31
31
  /**
32
32
  * Component used for displaying date time picker
33
33
  */
34
- export class DateTimePickerComponent extends DateTimeSADirective {
35
- position;
36
- valueProvider;
37
- //######################### protected properties #########################
38
- /**
39
- * Current value of date time, could be string, unix timestamp, Date, TDate object, or ranged DateTimeValue
40
- */
41
- ɵValue;
42
- /**
43
- * Internal representation of current date time value
44
- */
45
- internalValue;
46
- /**
47
- * Subscription for changes in date time period picker
48
- */
49
- periodChangesSubscription;
50
- /**
51
- * Options for date time picker
52
- */
53
- ɵOptions;
54
- /**
55
- * Currently displayed period type
56
- */
57
- displayedPeriodType;
58
- /**
59
- * Name of period which is currently displayed
60
- */
61
- displayedPeriodName;
62
- /**
63
- * Instance of created date time period picker
64
- */
65
- component;
66
- //######################### protected properties - children #########################
67
- /**
68
- * Container used for displaying pickers for specific date time part
69
- */
70
- pickerContainer;
34
+ export class DateTimePickerComponent extends DateTimeDirective {
71
35
  //######################### public properties - inputs #########################
72
36
  /**
73
37
  * @inheritdoc
@@ -91,20 +55,20 @@ export class DateTimePickerComponent extends DateTimeSADirective {
91
55
  this.ɵOptions = extend(true, {}, defaultOptions, value);
92
56
  this.setOptions(value);
93
57
  }
94
- //######################### public properties - outputs #########################
95
- /**
96
- * @inheritdoc
97
- */
98
- valueChange = new EventEmitter();
99
- /**
100
- * @inheritdoc
101
- */
102
- valueSet = new EventEmitter();
103
58
  //######################### constructor #########################
104
59
  constructor(position, valueProvider, options) {
105
60
  super();
106
61
  this.position = position;
107
62
  this.valueProvider = valueProvider;
63
+ //######################### public properties - outputs #########################
64
+ /**
65
+ * @inheritdoc
66
+ */
67
+ this.valueChange = new EventEmitter();
68
+ /**
69
+ * @inheritdoc
70
+ */
71
+ this.valueSet = new EventEmitter();
108
72
  this.ɵOptions = extend(true, {}, defaultOptions, options);
109
73
  this.setOptions(options);
110
74
  if (!this.displayedPeriodType) {
@@ -283,12 +247,12 @@ export class DateTimePickerComponent extends DateTimeSADirective {
283
247
  this.displayedPeriodName = this.ɵOptions.defaultPeriod;
284
248
  this.displayedPeriodType = this.ɵOptions.periodsDefinition[this.displayedPeriodName];
285
249
  }
286
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: POSITION }, { token: i1.DateValueProvider }, { token: DATE_TIME_PICKER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
287
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.1", type: DateTimePickerComponent, selector: "date-time-picker", inputs: { value: "value", options: "options" }, outputs: { valueChange: "valueChange", valueSet: "valueSet" }, viewQueries: [{ propertyName: "pickerContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container #container></ng-container>", changeDetection: i0.ChangeDetectionStrategy.OnPush });
250
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: POSITION }, { token: i1.DateValueProvider }, { token: DATE_TIME_PICKER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
251
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: DateTimePickerComponent, isStandalone: true, selector: "date-time-picker", inputs: { value: "value", options: "options" }, outputs: { valueChange: "valueChange", valueSet: "valueSet" }, viewQueries: [{ propertyName: "pickerContainer", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container #container/>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
288
252
  }
289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: DateTimePickerComponent, decorators: [{
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimePickerComponent, decorators: [{
290
254
  type: Component,
291
- args: [{ selector: 'date-time-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container #container></ng-container>" }]
255
+ args: [{ selector: 'date-time-picker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container #container/>" }]
292
256
  }], ctorParameters: () => [{ type: undefined, decorators: [{
293
257
  type: Inject,
294
258
  args: [POSITION]