@anglr/datetime 9.0.0-beta.20241007073342 → 9.0.0-beta.20250123122641

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 (103) hide show
  1. package/changelog.md +14 -5
  2. package/es2022/date-fns/src/services/dateFnsDateApi.service.js +3 -3
  3. package/es2022/moment/src/services/momentDateApi.service.js +3 -3
  4. package/es2022/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.js +3 -4
  5. package/es2022/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.js.map +1 -1
  6. package/es2022/src/directives/datePickerInput/datePickerInput.directive.js +3 -4
  7. package/es2022/src/directives/datePickerInput/datePickerInput.directive.js.map +1 -1
  8. package/es2022/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js +3 -4
  9. package/es2022/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.js.map +1 -1
  10. package/es2022/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js +3 -4
  11. package/es2022/src/directives/dateTimePickerInput/dateTimePickerInput.directive.js.map +1 -1
  12. package/es2022/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js +3 -4
  13. package/es2022/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.js.map +1 -1
  14. package/es2022/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js +3 -4
  15. package/es2022/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.js.map +1 -1
  16. package/es2022/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js +3 -4
  17. package/es2022/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.js.map +1 -1
  18. package/es2022/src/directives/withNow/withNow.directive.js +3 -4
  19. package/es2022/src/directives/withNow/withNow.directive.js.map +1 -1
  20. package/es2022/src/directives/withTime/withTime.directive.js +7 -8
  21. package/es2022/src/directives/withTime/withTime.directive.js.map +1 -1
  22. package/es2022/src/directives/withToday/withToday.directive.js +3 -4
  23. package/es2022/src/directives/withToday/withToday.directive.js.map +1 -1
  24. package/es2022/src/modules/calendar/components/monthCalendar/monthCalendar.component.js +4 -4
  25. package/es2022/src/modules/calendar/components/monthCalendar/monthCalendar.component.js.map +1 -1
  26. package/es2022/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js +3 -4
  27. package/es2022/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.js.map +1 -1
  28. package/es2022/src/modules/calendar/modules/monthCalendar.module.js +4 -4
  29. package/es2022/src/modules/calendar/services/eventParser/eventParser.service.js +3 -3
  30. package/es2022/src/modules/datePipes.module.js +4 -4
  31. package/es2022/src/modules/dateTime/directives/dateTime/dateTime.directive.js +3 -4
  32. package/es2022/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +1 -1
  33. package/es2022/src/modules/dateTime/directives/dateTimeBase.js +3 -3
  34. package/es2022/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js +3 -4
  35. package/es2022/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.js.map +1 -1
  36. package/es2022/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +3 -4
  37. package/es2022/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -1
  38. package/es2022/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +5 -6
  39. package/es2022/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -1
  40. package/es2022/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +5 -6
  41. package/es2022/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -1
  42. package/es2022/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +5 -6
  43. package/es2022/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -1
  44. package/es2022/src/modules/dateTime/modules/dateTime.module.js +4 -4
  45. package/es2022/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +11 -10
  46. package/es2022/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -1
  47. package/es2022/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js +4 -4
  48. package/es2022/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.js.map +1 -1
  49. package/es2022/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js +4 -4
  50. package/es2022/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.js.map +1 -1
  51. package/es2022/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js +6 -7
  52. package/es2022/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.js.map +1 -1
  53. package/es2022/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js +4 -4
  54. package/es2022/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.js.map +1 -1
  55. package/es2022/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js +5 -5
  56. package/es2022/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.js.map +1 -1
  57. package/es2022/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js +3 -4
  58. package/es2022/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.js.map +1 -1
  59. package/es2022/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js +3 -4
  60. package/es2022/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.js.map +1 -1
  61. package/es2022/src/modules/dateTimePicker/modules/dateTimePicker.module.js +4 -4
  62. package/es2022/src/pipes/dateConvert.pipe.js +8 -4
  63. package/es2022/src/pipes/dateConvert.pipe.js.map +1 -1
  64. package/es2022/src/pipes/dateFormat.pipe.js +9 -6
  65. package/es2022/src/pipes/dateFormat.pipe.js.map +1 -1
  66. package/es2022/src/services/datePositionParser/datePositionParser.service.js +3 -3
  67. package/es2022/src/services/dateTimeRelativeParser/dateTimeRelativeParser.service.js +3 -3
  68. package/es2022/src/services/dateValueProvider/dateValueProvider.service.js +3 -3
  69. package/package.json +35 -29
  70. package/src/directives/buttonDateTimeInput/buttonDateTimeInput.directive.d.ts.map +1 -1
  71. package/src/directives/datePickerInput/datePickerInput.directive.d.ts.map +1 -1
  72. package/src/directives/dateTimeInputHandler/dateTimeInputHandler.directive.d.ts.map +1 -1
  73. package/src/directives/dateTimePickerInput/dateTimePickerInput.directive.d.ts.map +1 -1
  74. package/src/directives/simpleDatePickerInput/simpleDatePickerInput.directive.d.ts.map +1 -1
  75. package/src/directives/simpleDateTimeInputHandler/simpleDateTimeInputHandler.directive.d.ts.map +1 -1
  76. package/src/directives/simpleDateTimePickerInput/simpleDateTimePickerInput.directive.d.ts.map +1 -1
  77. package/src/directives/withNow/withNow.directive.d.ts.map +1 -1
  78. package/src/directives/withTime/withTime.directive.d.ts.map +1 -1
  79. package/src/directives/withToday/withToday.directive.d.ts.map +1 -1
  80. package/src/modules/calendar/components/monthCalendar/monthCalendar.component.d.ts.map +1 -1
  81. package/src/modules/calendar/directives/calendarDayTemplate/calendarDayTemplate.directive.d.ts.map +1 -1
  82. package/src/modules/dateTime/directives/dateTime/dateTime.directive.d.ts.map +1 -1
  83. package/src/modules/dateTime/directives/dateTimeBase.d.ts +1 -1
  84. package/src/modules/dateTime/directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive.d.ts.map +1 -1
  85. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts.map +1 -1
  86. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts.map +1 -1
  87. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts.map +1 -1
  88. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts.map +1 -1
  89. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts.map +1 -1
  90. package/src/modules/dateTimePicker/components/dayPicker/dayPicker.component.d.ts.map +1 -1
  91. package/src/modules/dateTimePicker/components/monthPicker/monthPicker.component.d.ts.map +1 -1
  92. package/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.d.ts +0 -1
  93. package/src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.d.ts.map +1 -1
  94. package/src/modules/dateTimePicker/components/yearPicker/yearPicker.component.d.ts.map +1 -1
  95. package/src/modules/dateTimePicker/directives/dateTimePicker/dateTimePicker.directive.d.ts.map +1 -1
  96. package/src/modules/dateTimePicker/directives/loopScroll/loopScroll.directive.d.ts.map +1 -1
  97. package/src/modules/dateTimePicker/directives/loopScrollData/loopScrollData.directive.d.ts.map +1 -1
  98. package/src/pipes/dateConvert.pipe.d.ts +1 -1
  99. package/src/pipes/dateConvert.pipe.d.ts.map +1 -1
  100. package/src/pipes/dateFormat.pipe.d.ts +5 -5
  101. package/src/pipes/dateFormat.pipe.d.ts.map +1 -1
  102. package/version.bak +1 -1
  103. package/lerna.json +0 -4
@@ -34,16 +34,16 @@ export class DateTimeValidatorDirective extends DateTimeBase {
34
34
  validate(control) {
35
35
  return this._validator(control);
36
36
  }
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: [
37
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DateTimeValidatorDirective, deps: [{ token: DATE_API }], target: i0.ɵɵFactoryTarget.Directive }); }
38
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", type: DateTimeValidatorDirective, isStandalone: true, selector: "[dateTime][validate]", providers: [
39
39
  {
40
40
  provide: NG_VALIDATORS,
41
41
  useExisting: forwardRef(() => DateTimeValidatorDirective),
42
- multi: true
42
+ multi: true,
43
43
  },
44
44
  ], usesInheritance: true, ngImport: i0 }); }
45
45
  }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeValidatorDirective, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DateTimeValidatorDirective, decorators: [{
47
47
  type: Directive,
48
48
  args: [{
49
49
  selector: '[dateTime][validate]',
@@ -51,10 +51,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
51
51
  {
52
52
  provide: NG_VALIDATORS,
53
53
  useExisting: forwardRef(() => DateTimeValidatorDirective),
54
- multi: true
54
+ multi: true,
55
55
  },
56
56
  ],
57
- standalone: true,
58
57
  }]
59
58
  }], ctorParameters: () => [{ type: undefined, decorators: [{
60
59
  type: Inject,
@@ -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,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
+ {"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;AAcH,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,mEATnC;YAEI;gBACI,OAAO,EAAE,aAAa;gBACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;gBACzD,KAAK,EAAE,IAAI;aACd;SACJ;;2FAEQ,0BAA0B;kBAbtC,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;iBACJ;;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})\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}\n"]}
@@ -5,8 +5,8 @@ import * as i0 from "@angular/core";
5
5
  * Module for basic date time directives, components, pipes
6
6
  */
7
7
  export class 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,
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
9
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0", ngImport: i0, type: DateTimeModule, imports: [DateTimeDirective,
10
10
  DateTimeControlValueAccessorDirective,
11
11
  DateTimeInputDirective,
12
12
  DateTimeMaxValidatorDirective,
@@ -17,9 +17,9 @@ export class DateTimeModule {
17
17
  DateTimeMaxValidatorDirective,
18
18
  DateTimeMinValidatorDirective,
19
19
  DateTimeValidatorDirective] }); }
20
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeModule }); }
20
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DateTimeModule }); }
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimeModule, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DateTimeModule, decorators: [{
23
23
  type: NgModule,
24
24
  args: [{
25
25
  imports: [
@@ -1,6 +1,7 @@
1
1
  import { Component, ChangeDetectionStrategy, ViewChild, ViewContainerRef, EventEmitter, Output, Input, Inject, Optional } from '@angular/core';
2
2
  import { POSITION } from '@anglr/common';
3
- import { extend, isBlank, nameof } from '@jscrpt/common';
3
+ import { isBlank, nameof } from '@jscrpt/common';
4
+ import { extend } from '@jscrpt/common/extend';
4
5
  import { Subscription } from 'rxjs';
5
6
  import { DATE_TIME_PICKER_OPTIONS } from '../../misc/tokens';
6
7
  import { DayPickerComponent } from '../dayPicker/dayPicker.component';
@@ -23,9 +24,9 @@ const CORRUPTED_CONFIG_TEXT = 'DateTime: Corrupted configuration for DateTimePic
23
24
  const defaultOptions = {
24
25
  defaultPeriod: 'day',
25
26
  periodsDefinition: {
26
- 'day': DayPickerComponent,
27
- 'month': MonthPickerComponent,
28
- 'year': YearPickerComponent,
27
+ day: DayPickerComponent,
28
+ month: MonthPickerComponent,
29
+ year: YearPickerComponent,
29
30
  },
30
31
  };
31
32
  /**
@@ -172,8 +173,8 @@ export class DateTimePickerComponent extends DateTimeDirective {
172
173
  }
173
174
  const component = this.component.instance;
174
175
  component.ranged = this.valueFormat === DateTimeValueFormat.RangeOfDateInstances;
175
- component.canScaleDown = this.canScaleDown(),
176
- component.canScaleUp = this.canScaleUp();
176
+ component.canScaleDown = this.canScaleDown();
177
+ component.canScaleUp = this.canScaleUp();
177
178
  component.display = displayDate;
178
179
  component.maxDate = this.maxDateTime;
179
180
  component.minDate = this.minDateTime;
@@ -247,12 +248,12 @@ export class DateTimePickerComponent extends DateTimeDirective {
247
248
  this.displayedPeriodName = this.ɵOptions.defaultPeriod;
248
249
  this.displayedPeriodType = this.ɵOptions.periodsDefinition[this.displayedPeriodName];
249
250
  }
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 }); }
251
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: POSITION }, { token: i1.DateValueProvider }, { token: DATE_TIME_PICKER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
252
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0", 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 }); }
252
253
  }
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DateTimePickerComponent, decorators: [{
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DateTimePickerComponent, decorators: [{
254
255
  type: Component,
255
- args: [{ selector: 'date-time-picker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container #container/>" }]
256
+ args: [{ selector: 'date-time-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container #container/>" }]
256
257
  }], ctorParameters: () => [{ type: undefined, decorators: [{
257
258
  type: Inject,
258
259
  args: [POSITION]
@@ -1 +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,EAAkC,MAAM,eAAe,CAAC;AAC9M,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,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAC,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAC,mBAAmB,EAAC,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAC,cAAc,EAAE,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;;;AAE3D,kCAAkC;AAElC;;G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BAAC,WAAW,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAC;gBASnD,KAAK;sBADf,KAAK;gBAiBK,OAAO;sBADjB,KAAK;gBAkBC,WAAW;sBADjB,MAAM;gBAOA,QAAQ;sBADd,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, ViewChild, ViewContainerRef, Type, EventEmitter, Output, Input, OnChanges, SimpleChanges, Inject, Optional, OnDestroy, ComponentRef, OnInit} from '@angular/core';\nimport {Position, POSITION} from '@anglr/common';\nimport {extend, isBlank, nameof} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInputValue} from '../../../../interfaces';\nimport {DateTimeInputOutputValue, DateTimeObjectValue} from '../../../../misc/types';\nimport {DATE_TIME_PICKER_OPTIONS} from '../../misc/tokens';\nimport {DayPickerComponent} from '../dayPicker/dayPicker.component';\nimport {MonthPickerComponent} from '../monthPicker/monthPicker.component';\nimport {DateTimePickerOptions} from './dateTimePicker.interface';\nimport {YearPickerComponent} from '../yearPicker/yearPicker.component';\nimport {DateTimePicker} from '../../interfaces';\nimport {formatDateTime, getInternalValue} from '../../../../misc/utils';\nimport {DateTimeDirective} from '../../../dateTime/directives';\nimport {DateValueProvider} from '../../../../services';\nimport {DateTimeValueFormat} from '../../../../misc/enums';\n\n//TODO: use mixin for set internal\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': DayPickerComponent,\n 'month': MonthPickerComponent,\n 'year': YearPickerComponent,\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 standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DateTimePickerComponent<TDate = unknown> extends DateTimeDirective<TDate> implements DateTimeInputValue<TDate>, OnInit, OnChanges, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Current value of date time, could be string, timestamp, Date, TDate object, or ranged DateTimeValue\n */\n protected ɵValue: DateTimeInputOutputValue<TDate>|undefined|null;\n\n /**\n * Internal representation of current date time value\n */\n protected internalValue: DateTimeObjectValue<TDate>|undefined|null;\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 get value(): DateTimeInputOutputValue<TDate>|undefined|null\n {\n return this.ɵValue;\n }\n public set value(value: DateTimeInputOutputValue<TDate>|undefined|null)\n {\n //accepts all available formats\n this.setInternalValue(value);\n this.ɵValue = formatDateTime(this.internalValue, this.valueFormat, this.customFormat, this.dataFormat);\n this.valueSet.next();\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 this.setOptions(value);\n }\n\n //######################### public properties - outputs #########################\n\n /**\n * @inheritdoc\n */\n @Output()\n public valueChange: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * @inheritdoc\n */\n @Output()\n public valueSet: EventEmitter<void> = new EventEmitter<void>();\n\n //######################### constructor #########################\n constructor(@Inject(POSITION) protected position: Position,\n protected valueProvider: DateValueProvider<TDate>,\n @Inject(DATE_TIME_PICKER_OPTIONS) @Optional() options?: Partial<DateTimePickerOptions<TDate>>,)\n {\n super();\n\n this.ɵOptions = extend(true, {}, defaultOptions, options);\n \n this.setOptions(options);\n\n if(!this.displayedPeriodType)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\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 else\n {\n const val = (Array.isArray(this.internalValue) ? this.internalValue[0] : this.internalValue) ?? this.dateApi.now();\n\n this.showPicker(this.displayedPeriodType, val.isValid() ? val.value : this.dateApi.now().value);\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(!this.component)\n {\n return;\n }\n\n const component = this.component.instance;\n let invalidate: boolean = false;\n\n if(nameof<DateTimePickerComponent>('maxDateTime') in changes)\n {\n component.maxDate = this.maxDateTime;\n invalidate = true;\n }\n\n if(nameof<DateTimePickerComponent>('minDateTime') in changes)\n {\n component.minDate = this.minDateTime;\n invalidate = true;\n }\n\n if(nameof<DateTimePickerComponent>('value') in changes)\n {\n const val = (Array.isArray(this.internalValue) ? this.internalValue[0] : this.internalValue) ?? this.dateApi.now();\n\n component.display = val.isValid() ? val.value : this.dateApi.now().value;\n component.value = this.internalValue;\n invalidate = true;\n }\n\n if(this.component && invalidate)\n {\n this.component.instance.invalidateVisuals();\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 * Sets internal value and fix lowest time difference\n * @param value - Value to be set\n */\n protected setInternalValue(value: DateTimeInputOutputValue<TDate>|undefined|null): void\n {\n this.internalValue = getInternalValue(value, this.dateApi, this, this.valueProvider);\n }\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.displayedPeriodType = type;\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 if(!Array.isArray(component.value))\n {\n this.setInternalValue(component.value?.value);\n }\n else\n {\n //TODO: handle ranges\n }\n\n this.value = formatDateTime(this.internalValue, this.valueFormat, this.customFormat, this.dataFormat);\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.ranged = this.valueFormat === DateTimeValueFormat.RangeOfDateInstances;\n component.canScaleDown = this.canScaleDown(),\n component.canScaleUp = this.canScaleUp();\n component.display = displayDate;\n component.maxDate = this.maxDateTime;\n component.minDate = this.minDateTime;\n component.value = this.internalValue;\n component.invalidateVisuals();\n }\n\n /**\n * Gets indication whether current period can be scaled down\n * @param periods - Array of defined period names\n * @param index - Index of displayed period\n */\n protected canScaleDown(periods?: string[], index?: number): boolean\n {\n periods ??= Object.keys(this.ɵOptions.periodsDefinition);\n 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 false;\n }\n\n return true;\n }\n\n /**\n * Gets indication whether current period can be scaled up\n * @param periods - Array of defined period names\n * @param index - Index of displayed period\n */\n protected canScaleUp(periods?: string[], index?: number): boolean\n {\n periods ??= Object.keys(this.ɵOptions.periodsDefinition);\n index ??= periods.indexOf(this.displayedPeriodName);\n\n if(index < 0)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n\n if(index + 1 >= periods.length)\n {\n return false;\n }\n\n return true;\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(!this.canScaleUp(periods, index))\n {\n return this.displayedPeriodType;\n }\n\n this.displayedPeriodName = periods[index + 1];\n\n return this.ɵOptions.periodsDefinition[this.displayedPeriodName];\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(!this.canScaleDown(periods, index))\n {\n return this.displayedPeriodType;\n }\n\n this.displayedPeriodName = periods[index - 1];\n\n return this.ɵOptions.periodsDefinition[this.displayedPeriodName];\n }\n\n /**\n * Sets options and use them to set parameters of component\n * @param options - Options to be set\n */\n protected setOptions(options: Partial<DateTimePickerOptions<TDate>> | undefined): void\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}","<ng-container #container/>"]}
1
+ {"version":3,"file":"dateTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.ts","../../../../../../src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.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AAO,IAAI,CAAC,mBAAmB,CAAC;QACpC,CAAC;QAED,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAE9C,OAAO,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACO,UAAU,CAAC,OAA0D;QAE3E,IAAG,OAAO,EAAE,iBAAiB,EAC7B,CAAC;YACG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;QACvD,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACzF,CAAC;8GApWQ,uBAAuB,kBA+FZ,QAAQ,8CAER,wBAAwB;kGAjGnC,uBAAuB,oRA4CD,gBAAgB,uFC7FnD,4BAA0B;;2FDiDb,uBAAuB;kBANnC,SAAS;+BAEI,kBAAkB,mBAEX,uBAAuB,CAAC,MAAM;;0BAiGlC,MAAM;2BAAC,QAAQ;;0BAEf,MAAM;2BAAC,wBAAwB;;0BAAG,QAAQ;yCApD7C,eAAe;sBADxB,SAAS;uBAAC,WAAW,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAC;gBASnD,KAAK;sBADf,KAAK;gBAiBK,OAAO;sBADjB,KAAK;gBAkBC,WAAW;sBADjB,MAAM;gBAOA,QAAQ;sBADd,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, ViewChild, ViewContainerRef, Type, EventEmitter, Output, Input, OnChanges, SimpleChanges, Inject, Optional, OnDestroy, ComponentRef, OnInit} from '@angular/core';\nimport {Position, POSITION} from '@anglr/common';\nimport {isBlank, nameof} from '@jscrpt/common';\nimport {extend} from '@jscrpt/common/extend';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInputValue} from '../../../../interfaces';\nimport {DateTimeInputOutputValue, DateTimeObjectValue} from '../../../../misc/types';\nimport {DATE_TIME_PICKER_OPTIONS} from '../../misc/tokens';\nimport {DayPickerComponent} from '../dayPicker/dayPicker.component';\nimport {MonthPickerComponent} from '../monthPicker/monthPicker.component';\nimport {DateTimePickerOptions} from './dateTimePicker.interface';\nimport {YearPickerComponent} from '../yearPicker/yearPicker.component';\nimport {DateTimePicker} from '../../interfaces';\nimport {formatDateTime, getInternalValue} from '../../../../misc/utils';\nimport {DateTimeDirective} from '../../../dateTime/directives';\nimport {DateValueProvider} from '../../../../services';\nimport {DateTimeValueFormat} from '../../../../misc/enums';\n\n//TODO: use mixin for set internal\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: DayPickerComponent,\n month: MonthPickerComponent,\n year: YearPickerComponent,\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 DateTimeDirective<TDate> implements DateTimeInputValue<TDate>, OnInit, OnChanges, OnDestroy\n{\n //######################### protected properties #########################\n\n /**\n * Current value of date time, could be string, timestamp, Date, TDate object, or ranged DateTimeValue\n */\n protected ɵValue: DateTimeInputOutputValue<TDate>|undefined|null;\n\n /**\n * Internal representation of current date time value\n */\n protected internalValue: DateTimeObjectValue<TDate>|undefined|null;\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 get value(): DateTimeInputOutputValue<TDate>|undefined|null\n {\n return this.ɵValue;\n }\n public set value(value: DateTimeInputOutputValue<TDate>|undefined|null)\n {\n //accepts all available formats\n this.setInternalValue(value);\n this.ɵValue = formatDateTime(this.internalValue, this.valueFormat, this.customFormat, this.dataFormat);\n this.valueSet.next();\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 this.setOptions(value);\n }\n\n //######################### public properties - outputs #########################\n\n /**\n * @inheritdoc\n */\n @Output()\n public valueChange: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * @inheritdoc\n */\n @Output()\n public valueSet: EventEmitter<void> = new EventEmitter<void>();\n\n //######################### constructor #########################\n constructor(@Inject(POSITION) protected position: Position,\n protected valueProvider: DateValueProvider<TDate>,\n @Inject(DATE_TIME_PICKER_OPTIONS) @Optional() options?: Partial<DateTimePickerOptions<TDate>>,)\n {\n super();\n\n this.ɵOptions = extend(true, {}, defaultOptions, options);\n\n this.setOptions(options);\n\n if(!this.displayedPeriodType)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n\n /**\n * Initialize component\n */\n public ngOnInit(): void\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 else\n {\n const val = (Array.isArray(this.internalValue) ? this.internalValue[0] : this.internalValue) ?? this.dateApi.now();\n\n this.showPicker(this.displayedPeriodType, val.isValid() ? val.value : this.dateApi.now().value);\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(!this.component)\n {\n return;\n }\n\n const component = this.component.instance;\n let invalidate: boolean = false;\n\n if(nameof<DateTimePickerComponent>('maxDateTime') in changes)\n {\n component.maxDate = this.maxDateTime;\n invalidate = true;\n }\n\n if(nameof<DateTimePickerComponent>('minDateTime') in changes)\n {\n component.minDate = this.minDateTime;\n invalidate = true;\n }\n\n if(nameof<DateTimePickerComponent>('value') in changes)\n {\n const val = (Array.isArray(this.internalValue) ? this.internalValue[0] : this.internalValue) ?? this.dateApi.now();\n\n component.display = val.isValid() ? val.value : this.dateApi.now().value;\n component.value = this.internalValue;\n invalidate = true;\n }\n\n if(this.component && invalidate)\n {\n this.component.instance.invalidateVisuals();\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 * Sets internal value and fix lowest time difference\n * @param value - Value to be set\n */\n protected setInternalValue(value: DateTimeInputOutputValue<TDate>|undefined|null): void\n {\n this.internalValue = getInternalValue(value, this.dateApi, this, this.valueProvider);\n }\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.displayedPeriodType = type;\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 if(!Array.isArray(component.value))\n {\n this.setInternalValue(component.value?.value);\n }\n else\n {\n //TODO: handle ranges\n }\n\n this.value = formatDateTime(this.internalValue, this.valueFormat, this.customFormat, this.dataFormat);\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.ranged = this.valueFormat === DateTimeValueFormat.RangeOfDateInstances;\n component.canScaleDown = this.canScaleDown();\n component.canScaleUp = this.canScaleUp();\n component.display = displayDate;\n component.maxDate = this.maxDateTime;\n component.minDate = this.minDateTime;\n component.value = this.internalValue;\n component.invalidateVisuals();\n }\n\n /**\n * Gets indication whether current period can be scaled down\n * @param periods - Array of defined period names\n * @param index - Index of displayed period\n */\n protected canScaleDown(periods?: string[], index?: number): boolean\n {\n periods ??= Object.keys(this.ɵOptions.periodsDefinition);\n 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 false;\n }\n\n return true;\n }\n\n /**\n * Gets indication whether current period can be scaled up\n * @param periods - Array of defined period names\n * @param index - Index of displayed period\n */\n protected canScaleUp(periods?: string[], index?: number): boolean\n {\n periods ??= Object.keys(this.ɵOptions.periodsDefinition);\n index ??= periods.indexOf(this.displayedPeriodName);\n\n if(index < 0)\n {\n throw new Error(CORRUPTED_CONFIG_TEXT);\n }\n\n if(index + 1 >= periods.length)\n {\n return false;\n }\n\n return true;\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(!this.canScaleUp(periods, index))\n {\n return this.displayedPeriodType;\n }\n\n this.displayedPeriodName = periods[index + 1];\n\n return this.ɵOptions.periodsDefinition[this.displayedPeriodName];\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(!this.canScaleDown(periods, index))\n {\n return this.displayedPeriodType;\n }\n\n this.displayedPeriodName = periods[index - 1];\n\n return this.ɵOptions.periodsDefinition[this.displayedPeriodName];\n }\n\n /**\n * Sets options and use them to set parameters of component\n * @param options - Options to be set\n */\n protected setOptions(options: Partial<DateTimePickerOptions<TDate>> | undefined): void\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}\n","<ng-container #container/>"]}
@@ -130,14 +130,14 @@ export class DayPickerComponent extends DateTimePeriodPickerBase {
130
130
  isSamePeriod(val, target) {
131
131
  return val.isSameDay(target);
132
132
  }
133
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DayPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
134
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: DayPickerComponent, 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()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? 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()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(weekday of weekdays; track weekday)\r\n {\r\n <div class=\"weekday\">{{weekday}}</div>\r\n }\r\n\r\n @for(day of periodData; track day)\r\n {\r\n <div 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 (mousedown)=\"selectDay(day)\">{{day.day}}</div>\r\n }\r\n</div>\r\n\r\n@if(canScaleDown)\r\n{\r\n <div class=\"go-down-button\">\r\n <div [class.clickable]=\"canScaleDown\" (mousedown)=\"displayDate ? scaleDownSubject.next(displayDate.value) : undefined\">{{singleValue?.isValid() ? (singleValue?.value | dateFormat: 'time') : '0:00'}}</div>\r\n </div>\r\n}", dependencies: [{ kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i1.DateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
133
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DayPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
134
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0", type: DayPickerComponent, 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()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? 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()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(weekday of weekdays; track weekday)\r\n {\r\n <div class=\"weekday\">{{weekday}}</div>\r\n }\r\n\r\n @for(day of periodData; track day)\r\n {\r\n <div 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 (mousedown)=\"selectDay(day)\">{{day.day}}</div>\r\n }\r\n</div>\r\n\r\n@if(canScaleDown)\r\n{\r\n <div class=\"go-down-button\">\r\n <div [class.clickable]=\"canScaleDown\" (mousedown)=\"displayDate ? scaleDownSubject.next(displayDate.value) : undefined\">{{singleValue?.isValid() ? (singleValue?.value | dateFormat: 'time') : '0:00'}}</div>\r\n </div>\r\n}", dependencies: [{ kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i1.DateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
135
135
  }
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DayPickerComponent, decorators: [{
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DayPickerComponent, decorators: [{
137
137
  type: Component,
138
138
  args: [{ selector: 'day-picker', host: {
139
139
  '[class.date-time-period]': 'true',
140
- }, standalone: true, imports: [
140
+ }, imports: [
141
141
  DatePipesModule,
142
142
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? 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()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(weekday of weekdays; track weekday)\r\n {\r\n <div class=\"weekday\">{{weekday}}</div>\r\n }\r\n\r\n @for(day of periodData; track day)\r\n {\r\n <div 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 (mousedown)=\"selectDay(day)\">{{day.day}}</div>\r\n }\r\n</div>\r\n\r\n@if(canScaleDown)\r\n{\r\n <div class=\"go-down-button\">\r\n <div [class.clickable]=\"canScaleDown\" (mousedown)=\"displayDate ? scaleDownSubject.next(displayDate.value) : undefined\">{{singleValue?.isValid() ? (singleValue?.value | dateFormat: 'time') : '0:00'}}</div>\r\n </div>\r\n}" }]
143
143
  }], ctorParameters: () => [] });
@@ -1 +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,EAAC,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;;;AAG1D;;GAEG;AAgBH,MAAM,OAAO,kBAAoC,SAAQ,wBAA+C;IAgBpG,iEAAiE;IACjE;QAEI,KAAK,EAAE,CAAC;QAjBZ,0EAA0E;QAE1E;;WAEG;QACO,kBAAa,GAAqB,EAAE,CAAC;QAE/C,8FAA8F;QAE9F;;WAEG;QACO,aAAQ,GAAa,EAAE,CAAC;QAO9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ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AC,WAAW,CAAC,KAAK;oBAC5B,UAAU,EAAE,UAAU;oBACtB,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC;oBACxC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE;oBACrC,GAAG,EAAE,GAAG;oBACR,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;iBACpC,CAAC;gBAEF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAE3B,IAAG,CAAC,UAAU,EACd,CAAC;oBACG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAClC,CAAC;gBAED,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAChC,CAAC;QACL,CAAC,QACK,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE;QAEtD,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;QAEjC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;QAEd,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACO,YAAY,CAAC,GAAyB,EAAE,MAAa;QAE3D,OAAO,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;8GAhLQ,kBAAkB;kGAAlB,kBAAkB,yJCzB/B,k1CA6BC,2CDRO,eAAe;;2FAIV,kBAAkB;kBAf9B,SAAS;+BAEI,YAAY,QAGtB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,cACW,IAAI,WAEhB;wBACI,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\n\nimport {DateTimePicker, DayData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {DateApiObject} 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 DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayPickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<DayData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties #########################\n\n /**\n * Stored this picker month data\n */\n protected thisMonthData: DayData<TDate>[] = [];\n\n //######################### protected properties - template bindings #########################\n\n /**\n * Names of days\n */\n protected weekdays: string[] = [];\n\n //######################### constructor #########################\n constructor()\n {\n super();\n\n this.weekdays = this.dateApi.weekdays(true);\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects day as value of date time picker\n * @param dayData - Day data that were selected\n */\n protected selectDay(dayData: DayData<TDate>): void\n {\n if(dayData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(dayData.dateObj.year());\n this.singleValue.month(dayData.dateObj.month());\n this.singleValue.dayOfMonth(dayData.day);\n\n //other month was selected\n if(dayData.otherMonth)\n {\n this.displayDate?.month(dayData.dateObj.month());\n }\n\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n\n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed month to next month\n */\n protected nextMonth(): void\n {\n this.displayDate?.addMonths(1).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed month to previous month\n */\n protected previousMonth(): void\n {\n this.displayDate?.subtractMonths(1).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same month only data change\n if(this.displayedDate && this.displayDate?.isSameMonth(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n this.thisMonthData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n const currentMonthDate = this.displayDate.value;\n const today = this.dateApi.now().value;\n\n this.displayDate\n .startOfMonth()\n .updateOriginal()\n .startOfWeek();\n\n do\n {\n for(let x = 0; x < 7; x++)\n {\n const day = this.displayDate.dayOfMonth();\n const otherMonth = !this.displayDate.isSameMonth(currentMonthDate);\n\n const data: DayData<TDate> =\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n otherMonth: otherMonth,\n today: this.displayDate.isSameDay(today),\n weekend: this.displayDate.isWeekend(),\n day: day,\n dateObj: this.displayDate.clone(),\n };\n\n this.periodData.push(data);\n\n if(!otherMonth)\n {\n this.thisMonthData.push(data);\n }\n\n this.displayDate.addDays(1);\n }\n }\n while(this.displayDate.isSameMonth(currentMonthDate));\n\n this.displayDate.resetOriginal();\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameDay(target);\n }\n}","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? 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()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(weekday of weekdays; track weekday)\r\n {\r\n <div class=\"weekday\">{{weekday}}</div>\r\n }\r\n\r\n @for(day of periodData; track day)\r\n {\r\n <div 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 (mousedown)=\"selectDay(day)\">{{day.day}}</div>\r\n }\r\n</div>\r\n\r\n@if(canScaleDown)\r\n{\r\n <div class=\"go-down-button\">\r\n <div [class.clickable]=\"canScaleDown\" (mousedown)=\"displayDate ? scaleDownSubject.next(displayDate.value) : undefined\">{{singleValue?.isValid() ? (singleValue?.value | dateFormat: 'time') : '0:00'}}</div>\r\n </div>\r\n}"]}
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,EAAC,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;;;AAG1D;;GAEG;AAeH,MAAM,OAAO,kBAAoC,SAAQ,wBAA+C;IAgBpG,iEAAiE;IACjE;QAEI,KAAK,EAAE,CAAC;QAjBZ,0EAA0E;QAE1E;;WAEG;QACO,kBAAa,GAAqB,EAAE,CAAC;QAE/C,8FAA8F;QAE9F;;WAEG;QACO,aAAQ,GAAa,EAAE,CAAC;QAO9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,2FAA2F;IAE3F;;;OAGG;IACO,SAAS,CAAC,OAAuB;QAEvC,IAAG,OAAO,CAAC,QAAQ,EACnB,CAAC;YACG,OAAO;QACX,CAAC;QAED,cA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,EAAE;oBACrC,GAAG,EAAE,GAAG;oBACR,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;iBACpC,CAAC;gBAEF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAE3B,IAAG,CAAC,UAAU,EACd,CAAC;oBACG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAClC,CAAC;gBAED,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAChC,CAAC;QACL,CAAC,QACK,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE;QAEtD,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;QAEjC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;QAEd,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACO,YAAY,CAAC,GAAyB,EAAE,MAAa;QAE3D,OAAO,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;8GAhLQ,kBAAkB;kGAAlB,kBAAkB,yJCxB/B,k1CA6BC,2CDTO,eAAe;;2FAIV,kBAAkB;kBAd9B,SAAS;+BAEI,YAAY,QAGtB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,WAED;wBACI,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\n\nimport {DateTimePicker, DayData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {DateApiObject} 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 imports:\n [\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DayPickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<DayData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties #########################\n\n /**\n * Stored this picker month data\n */\n protected thisMonthData: DayData<TDate>[] = [];\n\n //######################### protected properties - template bindings #########################\n\n /**\n * Names of days\n */\n protected weekdays: string[] = [];\n\n //######################### constructor #########################\n constructor()\n {\n super();\n\n this.weekdays = this.dateApi.weekdays(true);\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects day as value of date time picker\n * @param dayData - Day data that were selected\n */\n protected selectDay(dayData: DayData<TDate>): void\n {\n if(dayData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(dayData.dateObj.year());\n this.singleValue.month(dayData.dateObj.month());\n this.singleValue.dayOfMonth(dayData.day);\n\n //other month was selected\n if(dayData.otherMonth)\n {\n this.displayDate?.month(dayData.dateObj.month());\n }\n\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n\n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed month to next month\n */\n protected nextMonth(): void\n {\n this.displayDate?.addMonths(1).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed month to previous month\n */\n protected previousMonth(): void\n {\n this.displayDate?.subtractMonths(1).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same month only data change\n if(this.displayedDate && this.displayDate?.isSameMonth(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n this.thisMonthData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n const currentMonthDate = this.displayDate.value;\n const today = this.dateApi.now().value;\n\n this.displayDate\n .startOfMonth()\n .updateOriginal()\n .startOfWeek();\n\n do\n {\n for(let x = 0; x < 7; x++)\n {\n const day = this.displayDate.dayOfMonth();\n const otherMonth = !this.displayDate.isSameMonth(currentMonthDate);\n\n const data: DayData<TDate> =\n {\n active: false,\n disabled: false,\n date: this.displayDate.value,\n otherMonth: otherMonth,\n today: this.displayDate.isSameDay(today),\n weekend: this.displayDate.isWeekend(),\n day: day,\n dateObj: this.displayDate.clone(),\n };\n\n this.periodData.push(data);\n\n if(!otherMonth)\n {\n this.thisMonthData.push(data);\n }\n\n this.displayDate.addDays(1);\n }\n }\n while(this.displayDate.isSameMonth(currentMonthDate));\n\n this.displayDate.resetOriginal();\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameDay(target);\n }\n}\n","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousMonth()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? 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()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(weekday of weekdays; track weekday)\r\n {\r\n <div class=\"weekday\">{{weekday}}</div>\r\n }\r\n\r\n @for(day of periodData; track day)\r\n {\r\n <div 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 (mousedown)=\"selectDay(day)\">{{day.day}}</div>\r\n }\r\n</div>\r\n\r\n@if(canScaleDown)\r\n{\r\n <div class=\"go-down-button\">\r\n <div [class.clickable]=\"canScaleDown\" (mousedown)=\"displayDate ? scaleDownSubject.next(displayDate.value) : undefined\">{{singleValue?.isValid() ? (singleValue?.value | dateFormat: 'time') : '0:00'}}</div>\r\n </div>\r\n}"]}
@@ -99,14 +99,14 @@ export class MonthPickerComponent extends DateTimePeriodPickerBase {
99
99
  isSamePeriod(val, target) {
100
100
  return val.isSameMonth(target);
101
101
  }
102
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: MonthPickerComponent, deps: [{ token: FORMAT_PROVIDER }], target: i0.ɵɵFactoryTarget.Component }); }
103
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: MonthPickerComponent, isStandalone: true, selector: "month-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)=\"previousYear()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextYear()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(month of periodData; track month)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(month.dateObj.value) : selectMonth(month)\">{{month.name}}</div>\r\n }\r\n</div>", dependencies: [{ kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i1.DateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: MonthPickerComponent, deps: [{ token: FORMAT_PROVIDER }], target: i0.ɵɵFactoryTarget.Component }); }
103
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0", type: MonthPickerComponent, isStandalone: true, selector: "month-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)=\"previousYear()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextYear()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(month of periodData; track month)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(month.dateObj.value) : selectMonth(month)\">{{month.name}}</div>\r\n }\r\n</div>", dependencies: [{ kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i1.DateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
104
104
  }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: MonthPickerComponent, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: MonthPickerComponent, decorators: [{
106
106
  type: Component,
107
107
  args: [{ selector: 'month-picker', host: {
108
108
  '[class.date-time-period]': 'true',
109
- }, standalone: true, imports: [
109
+ }, imports: [
110
110
  DatePipesModule,
111
111
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousYear()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextYear()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(month of periodData; track month)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(month.dateObj.value) : selectMonth(month)\">{{month.name}}</div>\r\n }\r\n</div>" }]
112
112
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"monthPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/monthPicker/monthPicker.component.ts","../../../../../../src/modules/dateTimePicker/components/monthPicker/monthPicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAGzE,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;;;AAGxD;;GAEG;AAgBH,MAAM,OAAO,oBAAsC,SAAQ,wBAAiD;IAExG,iEAAiE;IACjE,YAA+C,cAA8B;QAEzE,KAAK,EAAE,CAAC;QAFmC,mBAAc,GAAd,cAAc,CAAgB;IAG7E,CAAC;IAED,2FAA2F;IAE3F;;;OAGG;IACO,WAAW,CAAC,SAA2B;QAE7C,IAAG,SAAS,CAAC,QAAQ,EACrB,CAAC;YACG,OAAO;QACX,CAAC;QAED,cAAc;QACd,IAAG,CAAC,IAAI,CAAC,MAAM,EACf,CAAC;YACG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Ae;qBAClB,mBACgB,uBAAuB,CAAC,MAAM;;0BAKlC,MAAM;2BAAC,eAAe","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject} from '@angular/core';\n\nimport {DateTimePicker, MonthData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {DateApiObject} from '../../../../services';\nimport {FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {FormatProvider} from '../../../../interfaces';\n\n/**\n * Component used for displaying month picker\n */\n@Component(\n{\n selector: 'month-picker',\n templateUrl: 'monthPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n standalone: true,\n imports:\n [\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MonthPickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<MonthData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### constructor #########################\n constructor(@Inject(FORMAT_PROVIDER) protected formatProvider: FormatProvider,)\n {\n super();\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects month as value of day time picker\n * @param monthData - Month data that were selected\n */\n protected selectMonth(monthData: MonthData<TDate>): void\n {\n if(monthData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(monthData.dateObj.year());\n this.singleValue.month(monthData.dateObj.month());\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n\n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed year to next year\n */\n protected nextYear(): void\n {\n this.displayDate?.addYears(1).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed year to previous year\n */\n protected previousYear(): void\n {\n this.displayDate?.subtractYears(1).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same year only data change\n if(this.displayedDate && this.displayDate?.isSameYear(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n const monthOfYear = this.displayDate.startOfYear().updateOriginal();\n\n for(let x = 0; x < 12; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: monthOfYear.value,\n name: monthOfYear.format(this.dateApi.getFormat(this.formatProvider.monthNameShort)),\n dateObj: monthOfYear.clone(),\n });\n\n monthOfYear.addMonths(1);\n }\n\n this.displayDate.resetOriginal();\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameMonth(target);\n }\n}","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousYear()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextYear()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(month of periodData; track month)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(month.dateObj.value) : selectMonth(month)\">{{month.name}}</div>\r\n }\r\n</div>"]}
1
+ {"version":3,"file":"monthPicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/monthPicker/monthPicker.component.ts","../../../../../../src/modules/dateTimeP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EAAE;aAC/B,CAAC,CAAC;YAEH,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;QAEjC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;QAEd,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACO,YAAY,CAAC,GAAyB,EAAE,MAAa;QAE3D,OAAO,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;8GAhIQ,oBAAoB,kBAGT,eAAe;kGAH1B,oBAAoB,2JC1BjC,yzBAcM,2CDQE,eAAe;;2FAIV,oBAAoB;kBAdhC,SAAS;+BAEI,cAAc,QAGxB;wBACI,0BAA0B,EAAE,MAAM;qBACrC,WAED;wBACI,eAAe;qBAClB,mBACgB,uBAAuB,CAAC,MAAM;;0BAKlC,MAAM;2BAAC,eAAe","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject} from '@angular/core';\n\nimport {DateTimePicker, MonthData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {DateApiObject} from '../../../../services';\nimport {FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {FormatProvider} from '../../../../interfaces';\n\n/**\n * Component used for displaying month picker\n */\n@Component(\n{\n selector: 'month-picker',\n templateUrl: 'monthPicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n imports:\n [\n DatePipesModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MonthPickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<MonthData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### constructor #########################\n constructor(@Inject(FORMAT_PROVIDER) protected formatProvider: FormatProvider,)\n {\n super();\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Selects month as value of day time picker\n * @param monthData - Month data that were selected\n */\n protected selectMonth(monthData: MonthData<TDate>): void\n {\n if(monthData.disabled)\n {\n return;\n }\n\n //single value\n if(!this.ranged)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue.year(monthData.dateObj.year());\n this.singleValue.month(monthData.dateObj.month());\n this.singleValue.updateOriginal();\n }\n else\n {\n //TODO: range\n }\n\n this.valueChangeSubject.next();\n this.render();\n this.changeDetector.detectChanges();\n }\n\n /**\n * Changes displayed year to next year\n */\n protected nextYear(): void\n {\n this.displayDate?.addYears(1).updateOriginal();\n\n this.render();\n }\n\n /**\n * Changes displayed year to previous year\n */\n protected previousYear(): void\n {\n this.displayDate?.subtractYears(1).updateOriginal();\n\n this.render();\n }\n\n //######################### protected methods #########################\n\n /**\n * Renders current day picker data\n */\n protected render(): void\n {\n //same year only data change\n if(this.displayedDate && this.displayDate?.isSameYear(this.displayedDate))\n {\n this.setActive();\n this.updateMinMax();\n\n return;\n }\n\n this.displayedDate = this.displayDate?.value;\n this.periodData = [];\n\n if(!this.displayDate)\n {\n return;\n }\n\n const monthOfYear = this.displayDate.startOfYear().updateOriginal();\n\n for(let x = 0; x < 12; x++)\n {\n this.periodData.push(\n {\n active: false,\n disabled: false,\n date: monthOfYear.value,\n name: monthOfYear.format(this.dateApi.getFormat(this.formatProvider.monthNameShort)),\n dateObj: monthOfYear.clone(),\n });\n\n monthOfYear.addMonths(1);\n }\n\n this.displayDate.resetOriginal();\n\n this.setActive();\n this.updateMinMax();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n this.render();\n }\n\n /**\n * Tests whether provided value is in same period target value\n * @param val - Tested value\n * @param target - Target value to be tested against\n */\n protected isSamePeriod(val: DateApiObject<TDate>, target: TDate): boolean\n {\n return val.isSameMonth(target);\n }\n}\n","<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousYear()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'year'}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextYear()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(month of periodData; track month)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"month.active\"\r\n [class.disabled]=\"month.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(month.dateObj.value) : selectMonth(month)\">{{month.name}}</div>\r\n }\r\n</div>"]}
@@ -1,6 +1,6 @@
1
1
  import { Component, ChangeDetectionStrategy } from '@angular/core';
2
2
  import { SlicePipe } from '@angular/common';
3
- import { ClickOutsideSADirective } from '@anglr/common';
3
+ import { ClickOutsideDirective } from '@anglr/common';
4
4
  import { DatePipesModule } from '../../../datePipes.module';
5
5
  import { hours, minutes } from './rollerTimePicker.data';
6
6
  import { DateTimePeriodPickerBase } from '../dateTimePeriodPickerBase';
@@ -62,7 +62,6 @@ export class RollerTimePickerComponent extends DateTimePeriodPickerBase {
62
62
  * Sets hour
63
63
  * @param event - Mouse event that was triggered
64
64
  * @param value - Value to be set as hour
65
- * @returns
66
65
  */
67
66
  setHour(event, value) {
68
67
  if (!this.hoursOpen && event) {
@@ -111,17 +110,17 @@ export class RollerTimePickerComponent extends DateTimePeriodPickerBase {
111
110
  isSamePeriod() {
112
111
  return false;
113
112
  }
114
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RollerTimePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
115
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: RollerTimePickerComponent, isStandalone: true, selector: "roller-time-picker", host: { properties: { "class.date-time-period": "true" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"date-time-flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n @for(hour of hours | slice: -14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours | slice: 0: 14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n @for(minute of minutes | slice: -14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes | slice: 0: 14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: SlicePipe, name: "slice" }, { kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i1.DateFormatPipe, name: "dateFormat" }, { kind: "directive", type: ClickOutsideSADirective, selector: "[clickOutside]", inputs: ["clickOutside", "clickOutsideElement"], outputs: ["clickOutsideChange"] }, { kind: "directive", type: LoopScrollDataDirective, selector: "[loopScrollData]", inputs: ["loopScrollData", "clone"] }, { kind: "directive", type: LoopScrollDirective, selector: "[loopScroll]", inputs: ["loopScroll", "open"], outputs: ["loopScrollChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
113
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RollerTimePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
114
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0", type: RollerTimePickerComponent, isStandalone: true, selector: "roller-time-picker", host: { properties: { "class.date-time-period": "true" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"date-time-flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n @for(hour of hours | slice: -14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours | slice: 0: 14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n @for(minute of minutes | slice: -14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes | slice: 0: 14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: SlicePipe, name: "slice" }, { kind: "ngmodule", type: DatePipesModule }, { kind: "pipe", type: i1.DateFormatPipe, name: "dateFormat" }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutside", "clickOutsideElement"], outputs: ["clickOutsideChange"] }, { kind: "directive", type: LoopScrollDataDirective, selector: "[loopScrollData]", inputs: ["loopScrollData", "clone"] }, { kind: "directive", type: LoopScrollDirective, selector: "[loopScroll]", inputs: ["loopScroll", "open"], outputs: ["loopScrollChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
116
115
  }
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RollerTimePickerComponent, decorators: [{
116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RollerTimePickerComponent, decorators: [{
118
117
  type: Component,
119
118
  args: [{ selector: 'roller-time-picker', host: {
120
119
  '[class.date-time-period]': 'true',
121
- }, standalone: true, imports: [
120
+ }, imports: [
122
121
  SlicePipe,
123
122
  DatePipesModule,
124
- ClickOutsideSADirective,
123
+ ClickOutsideDirective,
125
124
  LoopScrollDataDirective,
126
125
  LoopScrollDirective,
127
126
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"date-time-flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n @for(hour of hours | slice: -14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours | slice: 0: 14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n @for(minute of minutes | slice: -14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes | slice: 0: 14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n </div>\n </div>\n</div>\n" }]
@@ -1 +1 @@
1
- {"version":3,"file":"rollerTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.ts","../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAC,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,KAAK,EAAE,OAAO,EAAC,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAiB,uBAAuB,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;;;AAE9F;;GAEG;AAoBH,MAAM,OAAO,yBAA2C,SAAQ,wBAAkD;IAnBlH;;QAqBI,8FAA8F;QAE9F;;WAEG;QACO,UAAK,GAAqB,KAAK,CAAC;QAE1C;;WAEG;QACO,YAAO,GAAqB,OAAO,CAAC;QAE9C;;WAEG;QACO,gBAAW,GAAY,KAAK,CAAC;QAEvC;;WAEG;QACO,cAAS,GAAY,KAAK,CAAC;KAoHxC;IAlHG;;OAEG;IACH,IAAc,IAAI;QAEd,OAAO,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IACD,IAAc,IAAI,CAAC,KAAa;QAE5B,uBAAuB;QACvB,IAAG,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,EAC/B,CAAC;YACG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QACtF,CAAC;QAED,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;I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AC;YACG,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,CAAC;QACnC,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;IAElB,CAAC;IAED;;OAEG;IACO,YAAY;QAElB,OAAO,KAAK,CAAC;IACjB,CAAC;8GAzIQ,yBAAyB;kGAAzB,yBAAyB,iKChCtC,ypGA+EA,uCDvDQ,SAAS,6CACT,eAAe,8FACf,uBAAuB,6IACvB,uBAAuB,kGACvB,mBAAmB;;2FAId,yBAAyB;kBAnBrC,SAAS;+BAEI,oBAAoB,QAG9B;wBACI,0BAA0B,EAAE,MAAM;qBACrC,cACW,IAAI,WAEhB;wBACI,SAAS;wBACT,eAAe;wBACf,uBAAuB;wBACvB,uBAAuB;wBACvB,mBAAmB;qBACtB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\nimport {SlicePipe} from '@angular/common';\nimport {ClickOutsideSADirective} from '@anglr/common';\n\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {hours, minutes} from './rollerTimePicker.data';\nimport {DateTimePicker, PeriodData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {LoopScrollData, LoopScrollDataDirective, LoopScrollDirective} from '../../directives';\n\n/**\n * Component used for rendering roller time picker\n */\n@Component(\n{\n selector: 'roller-time-picker',\n templateUrl: 'rollerTimePicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n standalone: true,\n imports:\n [\n SlicePipe,\n DatePipesModule,\n ClickOutsideSADirective,\n LoopScrollDataDirective,\n LoopScrollDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RollerTimePickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<PeriodData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Array of available hours\n */\n protected hours: LoopScrollData[] = hours;\n\n /**\n * Array of available minutes\n */\n protected minutes: LoopScrollData[] = minutes;\n\n /**\n * Indication whether are minutes open\n */\n protected minutesOpen: boolean = false;\n\n /**\n * Indication whether are hours open\n */\n protected hoursOpen: boolean = false;\n\n /**\n * Current value of hour\n */\n protected get hour(): number\n {\n return this.singleValue?.hour() ?? 0;\n }\n protected set hour(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.hour(value);\n }\n\n /**\n * Current value of minute\n */\n protected get minute(): number\n {\n return this.singleValue?.minute() ?? 0;\n }\n protected set minute(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.minute(value);\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Sets hour\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as hour\n * @returns \n */\n protected setHour<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.hoursOpen && event)\n {\n return;\n }\n\n if(this.hour == value as unknown as number)\n {\n this.hoursOpen = false;\n\n return;\n }\n\n this.hour = value as unknown as number;\n \n if(event)\n {\n this.hoursOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n /**\n * Sets minute\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as minute\n * @returns \n */\n protected setMinute<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.minutesOpen && event)\n {\n return;\n }\n\n if(this.minute == value as unknown as number)\n {\n return;\n }\n\n this.minute = value as unknown as number;\n \n if(event)\n {\n this.minutesOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n }\n\n /**\n * Tests whether provided value is in same period target value\n */\n protected isSamePeriod(): boolean\n {\n return false;\n }\n}","<div class=\"date-time-flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n @for(hour of hours | slice: -14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours | slice: 0: 14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n @for(minute of minutes | slice: -14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes | slice: 0: 14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n </div>\n </div>\n</div>\n"]}
1
+ {"version":3,"file":"rollerTimePicker.component.js","sourceRoot":"","sources":["../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.ts","../../../../../../src/modules/dateTimePicker/components/rollerTimePicker/rollerTimePicker.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,KAAK,EAAE,OAAO,EAAC,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAiB,uBAAuB,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;;;AAE9F;;GAEG;AAmBH,MAAM,OAAO,yBAA2C,SAAQ,wBAAkD;IAlBlH;;QAoBI,8FAA8F;QAE9F;;WAEG;QACO,UAAK,GAAqB,KAAK,CAAC;QAE1C;;WAEG;QACO,YAAO,GAAqB,OAAO,CAAC;QAE9C;;WAEG;QACO,gBAAW,GAAY,KAAK,CAAC;QAEvC;;WAEG;QACO,cAAS,GAAY,KAAK,CAAC;KAmHxC;IAjHG;;OAEG;IACH,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,GAAG,KAAK,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,CAAC;QACnC,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACO,SAAS,CAAkB,KAAsB,EAAE,KAAY;QAErE,IAAG,CAAC,IAAI,CAAC,WAAW,IAAI,KAAK,EAC7B,CAAC;YACG,OAAO;QACX,CAAC;QAED,IAAG,IAAI,CAAC,MAAM,IAAI,KAA0B,EAC5C,CAAC;YACG,OAAO;QACX,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,KAA0B,CAAC;QAEzC,IAAG,KAAK,EACR,CAAC;YACG,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,CAAC;QACnC,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;IAED,mFAAmF;IAEnF;;OAEG;IACO,QAAQ;IAElB,CAAC;IAED;;OAEG;IACO,YAAY;QAElB,OAAO,KAAK,CAAC;IACjB,CAAC;8GAxIQ,yBAAyB;kGAAzB,yBAAyB,iKC/BtC,ypGA+EA,uCDxDQ,SAAS,6CACT,eAAe,8FACf,qBAAqB,6IACrB,uBAAuB,kGACvB,mBAAmB;;2FAId,yBAAyB;kBAlBrC,SAAS;+BAEI,oBAAoB,QAG9B;wBACI,0BAA0B,EAAE,MAAM;qBACrC,WAED;wBACI,SAAS;wBACT,eAAe;wBACf,qBAAqB;wBACrB,uBAAuB;wBACvB,mBAAmB;qBACtB,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy} from '@angular/core';\nimport {SlicePipe} from '@angular/common';\nimport {ClickOutsideDirective} from '@anglr/common';\n\nimport {DatePipesModule} from '../../../datePipes.module';\nimport {hours, minutes} from './rollerTimePicker.data';\nimport {DateTimePicker, PeriodData} from '../../interfaces';\nimport {DateTimePeriodPickerBase} from '../dateTimePeriodPickerBase';\nimport {LoopScrollData, LoopScrollDataDirective, LoopScrollDirective} from '../../directives';\n\n/**\n * Component used for rendering roller time picker\n */\n@Component(\n{\n selector: 'roller-time-picker',\n templateUrl: 'rollerTimePicker.component.html',\n host:\n {\n '[class.date-time-period]': 'true',\n },\n imports:\n [\n SlicePipe,\n DatePipesModule,\n ClickOutsideDirective,\n LoopScrollDataDirective,\n LoopScrollDirective,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RollerTimePickerComponent<TDate = unknown> extends DateTimePeriodPickerBase<PeriodData<TDate>, TDate> implements DateTimePicker<TDate>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Array of available hours\n */\n protected hours: LoopScrollData[] = hours;\n\n /**\n * Array of available minutes\n */\n protected minutes: LoopScrollData[] = minutes;\n\n /**\n * Indication whether are minutes open\n */\n protected minutesOpen: boolean = false;\n\n /**\n * Indication whether are hours open\n */\n protected hoursOpen: boolean = false;\n\n /**\n * Current value of hour\n */\n protected get hour(): number\n {\n return this.singleValue?.hour() ?? 0;\n }\n protected set hour(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.hour(value);\n }\n\n /**\n * Current value of minute\n */\n protected get minute(): number\n {\n return this.singleValue?.minute() ?? 0;\n }\n protected set minute(value: number)\n {\n //no value selected yet\n if(!this.singleValue?.isValid())\n {\n this.singleValue = this.displayDate?.clone() ?? this.dateApi.getValue(new Date());\n }\n\n this.singleValue?.minute(value);\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Sets hour\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as hour\n */\n protected setHour<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.hoursOpen && event)\n {\n return;\n }\n\n if(this.hour == value as unknown as number)\n {\n this.hoursOpen = false;\n\n return;\n }\n\n this.hour = value as unknown as number;\n\n if(event)\n {\n this.hoursOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n /**\n * Sets minute\n * @param event - Mouse event that was triggered\n * @param value - Value to be set as minute\n * @returns\n */\n protected setMinute<TData = unknown>(event: MouseEvent|null, value: TData): void\n {\n if(!this.minutesOpen && event)\n {\n return;\n }\n\n if(this.minute == value as unknown as number)\n {\n return;\n }\n\n this.minute = value as unknown as number;\n\n if(event)\n {\n this.minutesOpen = false;\n }\n\n this.singleValue?.updateOriginal();\n this.valueChangeSubject.next();\n }\n\n //######################### protected methods - overrides #########################\n\n /**\n * @inheritdoc\n */\n protected onRender(): void\n {\n }\n\n /**\n * Tests whether provided value is in same period target value\n */\n protected isSamePeriod(): boolean\n {\n return false;\n }\n}\n","<div class=\"date-time-flex-row\" style=\"justify-content: center;\">\n <div [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{displayDate?.value | dateFormat: 'date'}}</div>\n</div>\n\n<div class=\"time-area\">\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"hoursOpen = false\"\n [clickOutsideElement]=\"hoursScroll\">\n <div #hoursScroll\n class=\"roller-scroll\"\n [class.open]=\"hoursOpen\"\n [loopScroll]=\"hour\"\n [open]=\"hoursOpen\"\n (loopScrollChange)=\"setHour(null, $event)\"\n (mousedown)=\"hoursOpen = !hoursOpen\">\n @for(hour of hours | slice: -14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n\n @for(hour of hours | slice: 0: 14; track hour)\n {\n <div [loopScrollData]=\"hour?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setHour($event, hour?.data)\">{{hour?.displayText}}</div>\n }\n </div>\n </div>\n\n <div class=\"minute-second-separator\">:</div>\n\n <div class=\"value-container\"\n [clickOutside]=\"true\"\n (clickOutsideChange)=\"minutesOpen = false\"\n [clickOutsideElement]=\"minutesScroll\">\n <div #minutesScroll\n class=\"roller-scroll\"\n [class.open]=\"minutesOpen\"\n [loopScroll]=\"minute\"\n [open]=\"minutesOpen\"\n (loopScrollChange)=\"setMinute(null, $event)\"\n (mousedown)=\"minutesOpen = !minutesOpen\">\n @for(minute of minutes | slice: -14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n\n @for(minute of minutes | slice: 0: 14; track minute)\n {\n <div [loopScrollData]=\"minute?.data\"\n [clone]=\"true\"\n class=\"roller-item\"\n (mousedown)=\"setMinute($event, minute?.data)\">{{minute?.displayText}}</div>\n }\n </div>\n </div>\n</div>\n"]}
@@ -105,14 +105,14 @@ export class YearPickerComponent extends DateTimePeriodPickerBase {
105
105
  isSamePeriod(val, target) {
106
106
  return val.isSameYear(target);
107
107
  }
108
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: YearPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
109
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: YearPickerComponent, isStandalone: true, selector: "year-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)=\"previousDecade()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{period}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextDecade()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(year of periodData; track year)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"year.active\"\r\n [class.disabled]=\"year.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(year.dateObj.value) : selectYear(year)\">{{year.value}}</div>\r\n }\r\n</div>", dependencies: [{ kind: "ngmodule", type: DatePipesModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: YearPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
109
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0", type: YearPickerComponent, isStandalone: true, selector: "year-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)=\"previousDecade()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{period}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextDecade()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(year of periodData; track year)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"year.active\"\r\n [class.disabled]=\"year.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(year.dateObj.value) : selectYear(year)\">{{year.value}}</div>\r\n }\r\n</div>", dependencies: [{ kind: "ngmodule", type: DatePipesModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
110
110
  }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: YearPickerComponent, decorators: [{
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: YearPickerComponent, decorators: [{
112
112
  type: Component,
113
113
  args: [{ selector: 'year-picker', host: {
114
114
  '[class.date-time-period]': 'true',
115
- }, standalone: true, imports: [
115
+ }, imports: [
116
116
  DatePipesModule,
117
117
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"period\">\r\n <div class=\"fas fa-angle-left clickable\" (mousedown)=\"previousDecade()\"></div>\r\n <div class=\"period-value\" [class.clickable]=\"canScaleUp\" (mousedown)=\"displayDate && canScaleUp ? scaleUpSubject.next(displayDate.value) : undefined\">{{period}}</div>\r\n <div class=\"fas fa-angle-right clickable\" (mousedown)=\"nextDecade()\"></div>\r\n</div>\r\n\r\n<div class=\"period-data\">\r\n @for(year of periodData; track year)\r\n {\r\n <div class=\"period-datum clickable\"\r\n [class.active]=\"year.active\"\r\n [class.disabled]=\"year.disabled\"\r\n (mousedown)=\"canScaleDown && displayDate ? scaleDownSubject.next(year.dateObj.value) : selectYear(year)\">{{year.value}}</div>\r\n }\r\n</div>" }]
118
118
  }] });