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

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 (63) hide show
  1. package/changelog.md +16 -13
  2. package/es2015/src/modules/dateTime/directives/dateTime/dateTime.directive.js +221 -0
  3. package/es2015/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +1 -0
  4. package/es2015/src/modules/dateTime/directives/dateTimeBase.js +25 -41
  5. package/es2015/src/modules/dateTime/directives/dateTimeBase.js.map +1 -1
  6. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +16 -17
  7. package/es2015/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -1
  8. package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +10 -13
  9. package/es2015/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -1
  10. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +9 -11
  11. package/es2015/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -1
  12. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +6 -8
  13. package/es2015/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -1
  14. package/es2015/src/modules/dateTime/directives/index.js +1 -1
  15. package/es2015/src/modules/dateTime/directives/index.js.map +1 -1
  16. package/es2015/src/modules/dateTime/modules/dateTime.module.js +7 -3
  17. package/es2015/src/modules/dateTime/modules/dateTime.module.js.map +1 -1
  18. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +5 -22
  19. package/es2015/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -1
  20. package/es2020/src/modules/dateTime/directives/dateTime/dateTime.directive.js +218 -0
  21. package/es2020/src/modules/dateTime/directives/dateTime/dateTime.directive.js.map +1 -0
  22. package/es2020/src/modules/dateTime/directives/dateTimeBase.js +25 -41
  23. package/es2020/src/modules/dateTime/directives/dateTimeBase.js.map +1 -1
  24. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js +16 -17
  25. package/es2020/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.js.map +1 -1
  26. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js +10 -13
  27. package/es2020/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.js.map +1 -1
  28. package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js +9 -11
  29. package/es2020/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.js.map +1 -1
  30. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js +6 -8
  31. package/es2020/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.js.map +1 -1
  32. package/es2020/src/modules/dateTime/directives/index.js +1 -1
  33. package/es2020/src/modules/dateTime/directives/index.js.map +1 -1
  34. package/es2020/src/modules/dateTime/modules/dateTime.module.js +7 -3
  35. package/es2020/src/modules/dateTime/modules/dateTime.module.js.map +1 -1
  36. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js +5 -22
  37. package/es2020/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/modules/dateTime/directives/dateTime/dateTime.directive.d.ts +120 -0
  40. package/src/modules/dateTime/directives/dateTime/dateTime.directive.d.ts.map +1 -0
  41. package/src/modules/dateTime/directives/dateTimeBase.d.ts +19 -27
  42. package/src/modules/dateTime/directives/dateTimeBase.d.ts.map +1 -1
  43. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts +3 -2
  44. package/src/modules/dateTime/directives/dateTimeInput/dateTimeInput.directive.d.ts.map +1 -1
  45. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts +4 -4
  46. package/src/modules/dateTime/directives/dateTimeMaxValidator/dateTimeMaxValidator.directive.d.ts.map +1 -1
  47. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts +4 -4
  48. package/src/modules/dateTime/directives/dateTimeMinValidator/dateTimeMinValidator.directive.d.ts.map +1 -1
  49. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts +2 -2
  50. package/src/modules/dateTime/directives/dateTimeValidator/dateTimeValidator.directive.d.ts.map +1 -1
  51. package/src/modules/dateTime/directives/index.d.ts +1 -1
  52. package/src/modules/dateTime/directives/index.d.ts.map +1 -1
  53. package/src/modules/dateTime/modules/dateTime.module.d.ts +7 -6
  54. package/src/modules/dateTime/modules/dateTime.module.d.ts.map +1 -1
  55. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts +6 -8
  56. package/src/modules/dateTimePicker/components/dateTimePicker/dateTimePicker.component.d.ts.map +1 -1
  57. package/version.bak +1 -1
  58. package/es2015/src/modules/dateTime/directives/dateTimeRestrictedBase.js +0 -152
  59. package/es2015/src/modules/dateTime/directives/dateTimeRestrictedBase.js.map +0 -1
  60. package/es2020/src/modules/dateTime/directives/dateTimeRestrictedBase.js +0 -149
  61. package/es2020/src/modules/dateTime/directives/dateTimeRestrictedBase.js.map +0 -1
  62. package/src/modules/dateTime/directives/dateTimeRestrictedBase.d.ts +0 -74
  63. package/src/modules/dateTime/directives/dateTimeRestrictedBase.d.ts.map +0 -1
@@ -1,18 +1,18 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
3
- import { FormatProvider } from '../../../../interfaces';
4
3
  import { DateApi } from '../../../../services';
5
- import { DateTimeRestrictedBase } from '../dateTimeRestrictedBase';
4
+ import { DateTimeBase } from '../dateTimeBase';
6
5
  import * as i0 from "@angular/core";
7
6
  /**
8
7
  * Applies validator for date time max value
9
8
  */
10
- export declare class DateTimeMaxValidatorDirective<TDate = unknown> extends DateTimeRestrictedBase<TDate> implements Validator, OnInit {
9
+ export declare class DateTimeMaxValidatorDirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit {
10
+ protected dateApi: DateApi<TDate>;
11
11
  /**
12
12
  * Function used for validations
13
13
  */
14
14
  private _validator;
15
- constructor(dateApi: DateApi<TDate>, formatProvider: FormatProvider);
15
+ constructor(dateApi: DateApi<TDate>);
16
16
  /**
17
17
  * Initialize component
18
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeMaxValidator.directive.d.ts","sourceRoot":"","sources":["dateTimeMaxValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,eAAe,EAAiB,gBAAgB,EAAE,SAAS,EAAc,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,sBAAsB,EAAC,MAAM,2BAA2B,CAAC;;AAEjE;;GAEG;AACH,qBAaa,6BAA6B,CAAC,KAAK,GAAG,OAAO,CAAE,SAAQ,sBAAsB,CAAC,KAAK,CAAG,YAAW,SAAS,EAAE,MAAM;IAI3H;;OAEG;IACH,OAAO,CAAC,UAAU,CAA2B;gBAGf,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,EAChB,cAAc,EAAE,cAAc;IAQnE;;OAEG;IACI,QAAQ,IAAI,IAAI;IAOvB;;;;OAIG;IACI,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,gBAAgB,GAAC,IAAI;IAOhE;;OAEG;cACgB,mBAAmB,IAAI,IAAI;yCA5CrC,6BAA6B;2CAA7B,6BAA6B;CAgDzC"}
1
+ {"version":3,"file":"dateTimeMaxValidator.directive.d.ts","sourceRoot":"","sources":["dateTimeMaxValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,eAAe,EAAiB,gBAAgB,EAAE,SAAS,EAAc,MAAM,gBAAgB,CAAC;AAIxG,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AACH,qBAaa,6BAA6B,CAAC,KAAK,GAAG,OAAO,CAAE,SAAQ,YAAY,CAAC,KAAK,CAAG,YAAW,SAAS,EAAE,MAAM;IAUnF,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;IAN/D;;OAEG;IACH,OAAO,CAAC,UAAU,CAA2B;gBAGL,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;IAO/D;;OAEG;IACI,QAAQ,IAAI,IAAI;IAOvB;;;;OAIG;IACI,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,gBAAgB,GAAC,IAAI;IAOhE;;OAEG;cACgB,mBAAmB,IAAI,IAAI;yCA1CrC,6BAA6B;2CAA7B,6BAA6B;CA8CzC"}
@@ -1,18 +1,18 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
3
- import { FormatProvider } from '../../../../interfaces';
4
3
  import { DateApi } from '../../../../services';
5
- import { DateTimeRestrictedBase } from '../dateTimeRestrictedBase';
4
+ import { DateTimeBase } from '../dateTimeBase';
6
5
  import * as i0 from "@angular/core";
7
6
  /**
8
7
  * Applies validator for date time min value
9
8
  */
10
- export declare class DateTimeMinValidatorDirective<TDate = unknown> extends DateTimeRestrictedBase<TDate> implements Validator, OnInit {
9
+ export declare class DateTimeMinValidatorDirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit {
10
+ protected dateApi: DateApi<TDate>;
11
11
  /**
12
12
  * Function used for validations
13
13
  */
14
14
  private _validator;
15
- constructor(dateApi: DateApi<TDate>, formatProvider: FormatProvider);
15
+ constructor(dateApi: DateApi<TDate>);
16
16
  /**
17
17
  * Initialize component
18
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeMinValidator.directive.d.ts","sourceRoot":"","sources":["dateTimeMinValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,eAAe,EAAiB,gBAAgB,EAAE,SAAS,EAAc,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,sBAAsB,EAAC,MAAM,2BAA2B,CAAC;;AAEjE;;GAEG;AACH,qBAaa,6BAA6B,CAAC,KAAK,GAAG,OAAO,CAAE,SAAQ,sBAAsB,CAAC,KAAK,CAAG,YAAW,SAAS,EAAE,MAAM;IAI3H;;OAEG;IACH,OAAO,CAAC,UAAU,CAA2B;gBAGf,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,EAChB,cAAc,EAAE,cAAc;IAOnE;;OAEG;IACI,QAAQ,IAAI,IAAI;IAOvB;;;;OAIG;IACI,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,gBAAgB,GAAC,IAAI;IAOhE;;OAEG;cACgB,mBAAmB,IAAI,IAAI;yCA3CrC,6BAA6B;2CAA7B,6BAA6B;CA+CzC"}
1
+ {"version":3,"file":"dateTimeMinValidator.directive.d.ts","sourceRoot":"","sources":["dateTimeMinValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,eAAe,EAAiB,gBAAgB,EAAE,SAAS,EAAc,MAAM,gBAAgB,CAAC;AAIxG,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;;AAE7C;;GAEG;AACH,qBAaa,6BAA6B,CAAC,KAAK,GAAG,OAAO,CAAE,SAAQ,YAAY,CAAC,KAAK,CAAG,YAAW,SAAS,EAAE,MAAM;IAUnF,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;IAN/D;;OAEG;IACH,OAAO,CAAC,UAAU,CAA2B;gBAGL,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;IAO/D;;OAEG;IACI,QAAQ,IAAI,IAAI;IAOvB;;;;OAIG;IACI,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,gBAAgB,GAAC,IAAI;IAOhE;;OAEG;cACgB,mBAAmB,IAAI,IAAI;yCA1CrC,6BAA6B;2CAA7B,6BAA6B;CA8CzC"}
@@ -1,6 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
3
- import { FormatProvider } from '../../../../interfaces';
4
3
  import { DateApi } from '../../../../services';
5
4
  import { DateTimeBase } from '../dateTimeBase';
6
5
  import * as i0 from "@angular/core";
@@ -8,11 +7,12 @@ import * as i0 from "@angular/core";
8
7
  * Applies validator for date time
9
8
  */
10
9
  export declare class DateTimeValidatorDirective<TDate = unknown> extends DateTimeBase<TDate> implements Validator, OnInit {
10
+ protected dateApi: DateApi<TDate>;
11
11
  /**
12
12
  * Function used for validations
13
13
  */
14
14
  private _validator;
15
- constructor(dateApi: DateApi<TDate>, formatProvider: FormatProvider);
15
+ constructor(dateApi: DateApi<TDate>);
16
16
  /**
17
17
  * Initialize component
18
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimeValidator.directive.d.ts","sourceRoot":"","sources":["dateTimeValidator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,MAAM,EAAC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,eAAe,EAAiB,gBAAgB,EAAE,SAAS,EAAc,MAAM,gBAA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,GAAG,gBAAgB,GAAC,IAAI;yCAhCvD,0BAA0B;2CAA1B,0BAA0B;CAoCtC"}
@@ -1,8 +1,8 @@
1
+ export * from './dateTime/dateTime.directive';
1
2
  export * from './dateTimeBase';
2
3
  export * from './dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive';
3
4
  export * from './dateTimeInput/dateTimeInput.directive';
4
5
  export * from './dateTimeMaxValidator/dateTimeMaxValidator.directive';
5
6
  export * from './dateTimeMinValidator/dateTimeMinValidator.directive';
6
- export * from './dateTimeRestrictedBase';
7
7
  export * from './dateTimeValidator/dateTimeValidator.directive';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uEAAuE,CAAC;AACtF,cAAc,yCAAyC,CAAC;AACxD,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,0BAA0B,CAAC;AACzC,cAAc,iDAAiD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uEAAuE,CAAC;AACtF,cAAc,yCAAyC,CAAC;AACxD,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,iDAAiD,CAAC"}
@@ -1,15 +1,16 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "../directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive";
3
- import * as i2 from "../directives/dateTimeInput/dateTimeInput.directive";
4
- import * as i3 from "../directives/dateTimeMaxValidator/dateTimeMaxValidator.directive";
5
- import * as i4 from "../directives/dateTimeMinValidator/dateTimeMinValidator.directive";
6
- import * as i5 from "../directives/dateTimeValidator/dateTimeValidator.directive";
2
+ import * as i1 from "../directives/dateTime/dateTime.directive";
3
+ import * as i2 from "../directives/dateTimeControlValueAccessor/dateTimeControlValueAccessor.directive";
4
+ import * as i3 from "../directives/dateTimeInput/dateTimeInput.directive";
5
+ import * as i4 from "../directives/dateTimeMaxValidator/dateTimeMaxValidator.directive";
6
+ import * as i5 from "../directives/dateTimeMinValidator/dateTimeMinValidator.directive";
7
+ import * as i6 from "../directives/dateTimeValidator/dateTimeValidator.directive";
7
8
  /**
8
9
  * Module for basic date time directives, components, pipes
9
10
  */
10
11
  export declare class DateTimeModule {
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<DateTimeModule, [typeof i1.DateTimeControlValueAccessorDirective, typeof i2.DateTimeInputDirective, typeof i3.DateTimeMaxValidatorDirective, typeof i4.DateTimeMinValidatorDirective, typeof i5.DateTimeValidatorDirective], never, [typeof i1.DateTimeControlValueAccessorDirective, typeof i2.DateTimeInputDirective, typeof i3.DateTimeMaxValidatorDirective, typeof i4.DateTimeMinValidatorDirective, typeof i5.DateTimeValidatorDirective]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DateTimeModule, [typeof i1.DateTimeDirective, typeof i2.DateTimeControlValueAccessorDirective, typeof i3.DateTimeInputDirective, typeof i4.DateTimeMaxValidatorDirective, typeof i5.DateTimeMinValidatorDirective, typeof i6.DateTimeValidatorDirective], never, [typeof i1.DateTimeDirective, typeof i2.DateTimeControlValueAccessorDirective, typeof i3.DateTimeInputDirective, typeof i4.DateTimeMaxValidatorDirective, typeof i5.DateTimeMinValidatorDirective, typeof i6.DateTimeValidatorDirective]>;
13
14
  static ɵinj: i0.ɵɵInjectorDeclaration<DateTimeModule>;
14
15
  }
15
16
  //# sourceMappingURL=dateTime.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateTime.module.d.ts","sourceRoot":"","sources":["dateTime.module.ts"],"names":[],"mappings":";;;;;;AAIA;;GAEG;AACH,qBAmBa,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAE1B"}
1
+ {"version":3,"file":"dateTime.module.d.ts","sourceRoot":"","sources":["dateTime.module.ts"],"names":[],"mappings":";;;;;;;AAIA;;GAEG;AACH,qBAqBa,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAE1B"}
@@ -1,17 +1,16 @@
1
1
  import { ViewContainerRef, Type, EventEmitter, OnChanges, SimpleChanges, OnDestroy, ComponentRef } from '@angular/core';
2
2
  import { Position } from '@anglr/common';
3
3
  import { Subscription } from 'rxjs';
4
- import { DateTimeInputValue, FormatProvider } from '../../../../interfaces';
4
+ import { DateTimeInputValue } from '../../../../interfaces';
5
5
  import { DateTimeInputOutputValue } from '../../../../misc/types';
6
6
  import { DateTimePickerOptions } from './dateTimePicker.interface';
7
7
  import { DateTimePicker } from '../../interfaces';
8
- import { DateApi } from '../../../../services';
9
- import { DateTimeRestrictedBase } from '../../../dateTime/directives/dateTimeRestrictedBase';
8
+ import { DateTimeDirective } from '../../../dateTime/directives';
10
9
  import * as i0 from "@angular/core";
11
10
  /**
12
11
  * Component used for displaying date time picker
13
12
  */
14
- export declare class DateTimePickerComponent<TDate = unknown> extends DateTimeRestrictedBase<TDate> implements DateTimeInputValue<TDate>, OnChanges, OnDestroy {
13
+ export declare class DateTimePickerComponent<TDate = unknown> extends DateTimeDirective<TDate> implements DateTimeInputValue<TDate>, OnChanges, OnDestroy {
15
14
  protected position: Position;
16
15
  /**
17
16
  * Subscription for changes in date time period picker
@@ -40,8 +39,7 @@ export declare class DateTimePickerComponent<TDate = unknown> extends DateTimeRe
40
39
  /**
41
40
  * @inheritdoc
42
41
  */
43
- get value(): DateTimeInputOutputValue<TDate> | undefined | null;
44
- set value(value: DateTimeInputOutputValue<TDate> | undefined | null);
42
+ value: DateTimeInputOutputValue<TDate> | undefined | null;
45
43
  /**
46
44
  * Options for date time picker
47
45
  */
@@ -51,7 +49,7 @@ export declare class DateTimePickerComponent<TDate = unknown> extends DateTimeRe
51
49
  * @inheritdoc
52
50
  */
53
51
  valueChange: EventEmitter<void>;
54
- constructor(position: Position, dateApi: DateApi<TDate>, formatProvider: FormatProvider, options?: DateTimePickerOptions<TDate>);
52
+ constructor(position: Position, options?: DateTimePickerOptions<TDate>);
55
53
  /**
56
54
  * Called when input value changes
57
55
  */
@@ -74,7 +72,7 @@ export declare class DateTimePickerComponent<TDate = unknown> extends DateTimeRe
74
72
  * Gets type that is below current period picker
75
73
  */
76
74
  protected getLowerType(): Type<DateTimePicker<TDate>>;
77
- static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerComponent<any>, [null, null, null, { optional: true; }]>;
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerComponent<any>, [null, { optional: true; }]>;
78
76
  static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePickerComponent<any>, "date-time-picker", never, { "value": "value"; "options": "options"; }, { "valueChange": "valueChange"; }, never, never, false>;
79
77
  }
80
78
  //# sourceMappingURL=dateTimePicker.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimePicker.component.d.ts","sourceRoot":"","sources":["dateTimePicker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,gBAAgB,EAAE,IAAI,EAAE,YAAY,EAAiB,SAAS,EAAE,aAAa,EAAoB,SAAS,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACtM,OAAO,EAAC,QAAQ,EAAW,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAC,wBAAwB,EAAC,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;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AG,IAAI;IA0CjF;;OAEG;IACH,SAAS,CAAC,YAAY,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAqBrD;;OAEG;IACH,SAAS,CAAC,YAAY,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;yCA/M5C,uBAAuB;2CAAvB,uBAAuB;CAmOnC"}
package/version.bak CHANGED
@@ -1 +1 @@
1
- 5.0.0-beta.20221019112435
1
+ 5.0.0-beta.20221020044622
@@ -1,152 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Directive, Input } from '@angular/core';
3
- import { BindThis, isBlank } from '@jscrpt/common';
4
- import { getSingleDateTimeValue } from '../../../misc/utils';
5
- import { DateTimeBase } from './dateTimeBase';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Base class for date time directives with value restrictions
9
- */
10
- export class DateTimeRestrictedBase extends DateTimeBase {
11
- //######################### public properties - inputs #########################
12
- /**
13
- * Gets or sets max allowed date for date time
14
- */
15
- get maxDateTime() {
16
- return this.ɵMaxDateTime;
17
- }
18
- set maxDateTime(value) {
19
- var _a;
20
- (_a = this._maxDateInstanceChange) === null || _a === void 0 ? void 0 : _a.unsubscribe();
21
- this._maxDateInstanceChange = null;
22
- if (isBlank(value)) {
23
- this.maxDateSet(value);
24
- return;
25
- }
26
- let val = value;
27
- if (value instanceof (DateTimeBase)) {
28
- this._maxDateInstanceChange = value.valueChange.subscribe(() => {
29
- const val = getSingleDateTimeValue(value.value);
30
- if (isBlank(val)) {
31
- this.maxDateSet(null);
32
- return;
33
- }
34
- this.setMinMaxValue(val, this.maxDateSet);
35
- });
36
- const v = getSingleDateTimeValue(value.value);
37
- if (isBlank(v)) {
38
- this.maxDateSet(null);
39
- return;
40
- }
41
- val = v;
42
- }
43
- this.setMinMaxValue(val, this.maxDateSet);
44
- }
45
- /**
46
- * Gets or sets min allowed date for date time
47
- */
48
- get minDateTime() {
49
- return this.ɵMinDateTime;
50
- }
51
- set minDateTime(value) {
52
- var _a;
53
- (_a = this._minDateInstanceChange) === null || _a === void 0 ? void 0 : _a.unsubscribe();
54
- this._minDateInstanceChange = null;
55
- if (isBlank(value)) {
56
- this.minDateSet(value);
57
- return;
58
- }
59
- let val = value;
60
- if (value instanceof (DateTimeBase)) {
61
- this._minDateInstanceChange = value.valueChange.subscribe(() => {
62
- const val = getSingleDateTimeValue(value.value);
63
- if (isBlank(val)) {
64
- this.minDateSet(null);
65
- return;
66
- }
67
- this.setMinMaxValue(val, this.minDateSet);
68
- });
69
- const v = getSingleDateTimeValue(value.value);
70
- if (isBlank(v)) {
71
- this.minDateSet(null);
72
- return;
73
- }
74
- val = v;
75
- }
76
- this.setMinMaxValue(val, this.minDateSet);
77
- }
78
- //######################### public methods - implementation of OnDestroy #########################
79
- /**
80
- * Called when component is destroyed
81
- */
82
- ngOnDestroy() {
83
- var _a, _b;
84
- (_a = this._maxDateInstanceChange) === null || _a === void 0 ? void 0 : _a.unsubscribe();
85
- this._maxDateInstanceChange = null;
86
- (_b = this._minDateInstanceChange) === null || _b === void 0 ? void 0 : _b.unsubscribe();
87
- this._minDateInstanceChange = null;
88
- }
89
- //######################### protected methods #########################
90
- /**
91
- * Called whenever max date time restriction changes
92
- */
93
- onMaxDateTimeChange() {
94
- }
95
- /**
96
- * Called whenever min date time restriction changes
97
- */
98
- onMinDateTimeChange() {
99
- }
100
- /**
101
- * Sets min date time and notifies about changes
102
- * @param value - Value to be set
103
- */
104
- minDateSet(value) {
105
- this.ɵMinDateTime = value;
106
- this.onMinDateTimeChange();
107
- }
108
- /**
109
- * Sets max date time and notifies about changes
110
- * @param value - Value to be set
111
- */
112
- maxDateSet(value) {
113
- this.ɵMaxDateTime = value;
114
- this.onMaxDateTimeChange();
115
- }
116
- /**
117
- * Sets min or max date time value
118
- * @param value - Value to be set
119
- * @param setter - Action used for setting value
120
- */
121
- setMinMaxValue(value, setter) {
122
- const val = this.dateApi.getValue(value, this.customFormat);
123
- if (val.isValid()) {
124
- setter(val.value);
125
- }
126
- else {
127
- setter(null);
128
- }
129
- }
130
- }
131
- DateTimeRestrictedBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRestrictedBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
132
- DateTimeRestrictedBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeRestrictedBase, inputs: { maxDateTime: "maxDateTime", minDateTime: "minDateTime" }, usesInheritance: true, ngImport: i0 });
133
- __decorate([
134
- BindThis,
135
- __metadata("design:type", Function),
136
- __metadata("design:paramtypes", [Object]),
137
- __metadata("design:returntype", void 0)
138
- ], DateTimeRestrictedBase.prototype, "minDateSet", null);
139
- __decorate([
140
- BindThis,
141
- __metadata("design:type", Function),
142
- __metadata("design:paramtypes", [Object]),
143
- __metadata("design:returntype", void 0)
144
- ], DateTimeRestrictedBase.prototype, "maxDateSet", null);
145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRestrictedBase, decorators: [{
146
- type: Directive
147
- }], propDecorators: { maxDateTime: [{
148
- type: Input
149
- }], minDateTime: [{
150
- type: Input
151
- }], minDateSet: [], maxDateSet: [] } });
152
- //# sourceMappingURL=dateTimeRestrictedBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dateTimeRestrictedBase.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/directives/dateTimeRestrictedBase.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAY,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAU,QAAQ,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAI1D,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;;AAE5C;;GAEG;AAEH,MAAM,OAAO,sBAAwC,SAAQ,YAA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;IACO,mBAAmB;IAE7B,CAAC;IAED;;;OAGG;IAEO,UAAU,CAAC,KAA2B;QAE5C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC/B,CAAC;IAED;;;OAGG;IAEO,UAAU,CAAC,KAA2B;QAE5C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACO,cAAc,CAAC,KAA+B,EAAE,MAAqC;QAE3F,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAE5D,IAAG,GAAG,CAAC,OAAO,EAAE,EAChB;YACI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACrB;aAED;YACI,MAAM,CAAC,IAAI,CAAC,CAAC;SAChB;IACL,CAAC;;mHA3MQ,sBAAsB;uGAAtB,sBAAsB;;IAwK9B,QAAQ;;;;wDAKR;;IAMA,QAAQ;;;;wDAKR;2FAxLQ,sBAAsB;kBADlC,SAAS;8BAiCK,WAAW;sBADrB,KAAK;gBAsDK,WAAW;sBADrB,KAAK;gBAqFI,UAAU,MAWV,UAAU","sourcesContent":["import {Directive, Input, OnDestroy} from '@angular/core';\nimport {Action1, BindThis, isBlank} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInputOutputValue} from '../../../misc/types';\nimport {getSingleDateTimeValue} from '../../../misc/utils';\nimport {DateTimeBase} from './dateTimeBase';\n\n/**\n * Base class for date time directives with value restrictions\n */\n@Directive()\nexport class DateTimeRestrictedBase<TDate = unknown> extends DateTimeBase<TDate> implements OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscription for max date instance value changes\n */\n private _maxDateInstanceChange: Subscription|undefined|null;\n\n /**\n * Subscription for min date instance value changes\n */\n private _minDateInstanceChange: Subscription|undefined|null;\n\n //######################### protected properties #########################\n\n /**\n * Max allowed value of date time\n */\n protected ɵMaxDateTime: TDate|undefined|null;\n\n /**\n * Min allowed value of date time\n */\n protected ɵMinDateTime: TDate|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets max allowed date for date time\n */\n @Input()\n public get maxDateTime(): TDate|undefined|null\n {\n return this.ɵMaxDateTime;\n }\n public set maxDateTime(value: TDate|undefined|null)\n {\n this._maxDateInstanceChange?.unsubscribe();\n this._maxDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.maxDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase<TDate>)\n {\n this._maxDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.maxDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n val = v;\n }\n \n this.setMinMaxValue(val, this.maxDateSet);\n }\n\n /**\n * Gets or sets min allowed date for date time\n */\n @Input()\n public get minDateTime(): TDate|undefined|null\n {\n return this.ɵMinDateTime;\n }\n public set minDateTime(value: TDate|undefined|null)\n {\n this._minDateInstanceChange?.unsubscribe();\n this._minDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.minDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase<TDate>)\n {\n this._minDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.minDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.minDateSet(null);\n\n return;\n }\n\n val = v;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._maxDateInstanceChange?.unsubscribe();\n this._maxDateInstanceChange = null;\n\n this._minDateInstanceChange?.unsubscribe();\n this._minDateInstanceChange = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Called whenever max date time restriction changes\n */\n protected onMaxDateTimeChange(): void\n {\n }\n\n /**\n * Called whenever min date time restriction changes\n */\n protected onMinDateTimeChange(): void\n {\n }\n\n /**\n * Sets min date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected minDateSet(value: TDate|undefined|null): void\n {\n this.ɵMinDateTime = value;\n this.onMinDateTimeChange();\n }\n\n /**\n * Sets max date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected maxDateSet(value: TDate|undefined|null): void\n {\n this.ɵMaxDateTime = value;\n this.onMaxDateTimeChange();\n }\n\n /**\n * Sets min or max date time value\n * @param value - Value to be set\n * @param setter - Action used for setting value\n */\n protected setMinMaxValue(value: string|number|TDate|Date, setter: Action1<TDate|undefined|null>): void\n {\n const val = this.dateApi.getValue(value, this.customFormat);\n\n if(val.isValid())\n {\n setter(val.value);\n }\n else\n {\n setter(null);\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `maxDateTime` input\n */\n public static ngAcceptInputType_maxDateTime: string|number|DateTimeBase|Date;\n\n /**\n * Custom input type for `minDateTime` input\n */\n public static ngAcceptInputType_minDateTime: string|number|DateTimeBase|Date;\n}\n"]}
@@ -1,149 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Directive, Input } from '@angular/core';
3
- import { BindThis, isBlank } from '@jscrpt/common';
4
- import { getSingleDateTimeValue } from '../../../misc/utils';
5
- import { DateTimeBase } from './dateTimeBase';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Base class for date time directives with value restrictions
9
- */
10
- export class DateTimeRestrictedBase extends DateTimeBase {
11
- //######################### public properties - inputs #########################
12
- /**
13
- * Gets or sets max allowed date for date time
14
- */
15
- get maxDateTime() {
16
- return this.ɵMaxDateTime;
17
- }
18
- set maxDateTime(value) {
19
- this._maxDateInstanceChange?.unsubscribe();
20
- this._maxDateInstanceChange = null;
21
- if (isBlank(value)) {
22
- this.maxDateSet(value);
23
- return;
24
- }
25
- let val = value;
26
- if (value instanceof (DateTimeBase)) {
27
- this._maxDateInstanceChange = value.valueChange.subscribe(() => {
28
- const val = getSingleDateTimeValue(value.value);
29
- if (isBlank(val)) {
30
- this.maxDateSet(null);
31
- return;
32
- }
33
- this.setMinMaxValue(val, this.maxDateSet);
34
- });
35
- const v = getSingleDateTimeValue(value.value);
36
- if (isBlank(v)) {
37
- this.maxDateSet(null);
38
- return;
39
- }
40
- val = v;
41
- }
42
- this.setMinMaxValue(val, this.maxDateSet);
43
- }
44
- /**
45
- * Gets or sets min allowed date for date time
46
- */
47
- get minDateTime() {
48
- return this.ɵMinDateTime;
49
- }
50
- set minDateTime(value) {
51
- this._minDateInstanceChange?.unsubscribe();
52
- this._minDateInstanceChange = null;
53
- if (isBlank(value)) {
54
- this.minDateSet(value);
55
- return;
56
- }
57
- let val = value;
58
- if (value instanceof (DateTimeBase)) {
59
- this._minDateInstanceChange = value.valueChange.subscribe(() => {
60
- const val = getSingleDateTimeValue(value.value);
61
- if (isBlank(val)) {
62
- this.minDateSet(null);
63
- return;
64
- }
65
- this.setMinMaxValue(val, this.minDateSet);
66
- });
67
- const v = getSingleDateTimeValue(value.value);
68
- if (isBlank(v)) {
69
- this.minDateSet(null);
70
- return;
71
- }
72
- val = v;
73
- }
74
- this.setMinMaxValue(val, this.minDateSet);
75
- }
76
- //######################### public methods - implementation of OnDestroy #########################
77
- /**
78
- * Called when component is destroyed
79
- */
80
- ngOnDestroy() {
81
- this._maxDateInstanceChange?.unsubscribe();
82
- this._maxDateInstanceChange = null;
83
- this._minDateInstanceChange?.unsubscribe();
84
- this._minDateInstanceChange = null;
85
- }
86
- //######################### protected methods #########################
87
- /**
88
- * Called whenever max date time restriction changes
89
- */
90
- onMaxDateTimeChange() {
91
- }
92
- /**
93
- * Called whenever min date time restriction changes
94
- */
95
- onMinDateTimeChange() {
96
- }
97
- /**
98
- * Sets min date time and notifies about changes
99
- * @param value - Value to be set
100
- */
101
- minDateSet(value) {
102
- this.ɵMinDateTime = value;
103
- this.onMinDateTimeChange();
104
- }
105
- /**
106
- * Sets max date time and notifies about changes
107
- * @param value - Value to be set
108
- */
109
- maxDateSet(value) {
110
- this.ɵMaxDateTime = value;
111
- this.onMaxDateTimeChange();
112
- }
113
- /**
114
- * Sets min or max date time value
115
- * @param value - Value to be set
116
- * @param setter - Action used for setting value
117
- */
118
- setMinMaxValue(value, setter) {
119
- const val = this.dateApi.getValue(value, this.customFormat);
120
- if (val.isValid()) {
121
- setter(val.value);
122
- }
123
- else {
124
- setter(null);
125
- }
126
- }
127
- }
128
- DateTimeRestrictedBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRestrictedBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
129
- DateTimeRestrictedBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.6", type: DateTimeRestrictedBase, inputs: { maxDateTime: "maxDateTime", minDateTime: "minDateTime" }, usesInheritance: true, ngImport: i0 });
130
- __decorate([
131
- BindThis,
132
- __metadata("design:type", Function),
133
- __metadata("design:paramtypes", [Object]),
134
- __metadata("design:returntype", void 0)
135
- ], DateTimeRestrictedBase.prototype, "minDateSet", null);
136
- __decorate([
137
- BindThis,
138
- __metadata("design:type", Function),
139
- __metadata("design:paramtypes", [Object]),
140
- __metadata("design:returntype", void 0)
141
- ], DateTimeRestrictedBase.prototype, "maxDateSet", null);
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: DateTimeRestrictedBase, decorators: [{
143
- type: Directive
144
- }], propDecorators: { maxDateTime: [{
145
- type: Input
146
- }], minDateTime: [{
147
- type: Input
148
- }], minDateSet: [], maxDateSet: [] } });
149
- //# sourceMappingURL=dateTimeRestrictedBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dateTimeRestrictedBase.js","sourceRoot":"","sources":["../../../../../src/modules/dateTime/directives/dateTimeRestrictedBase.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAY,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAU,QAAQ,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAI1D,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;;AAE5C;;GAEG;AAEH,MAAM,OAAO,sBAAwC,SAAQ,YAAmB;IA0B5E,gFAAgF;IAEhF;;OAEG;IACH,IACW,WAAW;QAElB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IACD,IAAW,WAAW,CAAC,KAA2B;QAE9C,IAAI,CAAC,sBAAsB,EAAE,WAAW,EAAE,CAAC;QAC3C,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QAEnC,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;YACI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAEvB,OAAO;SACV;QAED,IAAI,GAAG,GAAoC,KAAK,CAAC;QAEjD,IAAG,KAAK,aAAY,YAAmB,CAAA,EACvC;YACI,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE;gBAE3D,MAAM,GAAG,GAAG,sBAAsB,CAAQ,KAAK,CAAC,KAAK,CAAC,CAAC;gBAEvD,IAAG,OAAO,CAAC,GAAG,CAAC,EACf;oBACI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;oBAEtB,OAAO;iBACV;gBAED,IAAI,CAAC,cAAc,CAAC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sBADrB,KAAK;gBAsDK,WAAW;sBADrB,KAAK;gBAqFI,UAAU,MAWV,UAAU","sourcesContent":["import {Directive, Input, OnDestroy} from '@angular/core';\nimport {Action1, BindThis, isBlank} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {DateTimeInputOutputValue} from '../../../misc/types';\nimport {getSingleDateTimeValue} from '../../../misc/utils';\nimport {DateTimeBase} from './dateTimeBase';\n\n/**\n * Base class for date time directives with value restrictions\n */\n@Directive()\nexport class DateTimeRestrictedBase<TDate = unknown> extends DateTimeBase<TDate> implements OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscription for max date instance value changes\n */\n private _maxDateInstanceChange: Subscription|undefined|null;\n\n /**\n * Subscription for min date instance value changes\n */\n private _minDateInstanceChange: Subscription|undefined|null;\n\n //######################### protected properties #########################\n\n /**\n * Max allowed value of date time\n */\n protected ɵMaxDateTime: TDate|undefined|null;\n\n /**\n * Min allowed value of date time\n */\n protected ɵMinDateTime: TDate|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets max allowed date for date time\n */\n @Input()\n public get maxDateTime(): TDate|undefined|null\n {\n return this.ɵMaxDateTime;\n }\n public set maxDateTime(value: TDate|undefined|null)\n {\n this._maxDateInstanceChange?.unsubscribe();\n this._maxDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.maxDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase<TDate>)\n {\n this._maxDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.maxDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.maxDateSet(null);\n\n return;\n }\n\n val = v;\n }\n \n this.setMinMaxValue(val, this.maxDateSet);\n }\n\n /**\n * Gets or sets min allowed date for date time\n */\n @Input()\n public get minDateTime(): TDate|undefined|null\n {\n return this.ɵMinDateTime;\n }\n public set minDateTime(value: TDate|undefined|null)\n {\n this._minDateInstanceChange?.unsubscribe();\n this._minDateInstanceChange = null;\n\n if(isBlank(value))\n {\n this.minDateSet(value);\n\n return;\n }\n\n let val: DateTimeInputOutputValue<TDate> = value;\n\n if(value instanceof DateTimeBase<TDate>)\n {\n this._minDateInstanceChange = value.valueChange.subscribe(() =>\n {\n const val = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(val))\n {\n this.minDateSet(null);\n\n return;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n });\n\n const v = getSingleDateTimeValue<TDate>(value.value);\n\n if(isBlank(v))\n {\n this.minDateSet(null);\n\n return;\n }\n\n val = v;\n }\n\n this.setMinMaxValue(val, this.minDateSet);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._maxDateInstanceChange?.unsubscribe();\n this._maxDateInstanceChange = null;\n\n this._minDateInstanceChange?.unsubscribe();\n this._minDateInstanceChange = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Called whenever max date time restriction changes\n */\n protected onMaxDateTimeChange(): void\n {\n }\n\n /**\n * Called whenever min date time restriction changes\n */\n protected onMinDateTimeChange(): void\n {\n }\n\n /**\n * Sets min date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected minDateSet(value: TDate|undefined|null): void\n {\n this.ɵMinDateTime = value;\n this.onMinDateTimeChange();\n }\n\n /**\n * Sets max date time and notifies about changes\n * @param value - Value to be set\n */\n @BindThis\n protected maxDateSet(value: TDate|undefined|null): void\n {\n this.ɵMaxDateTime = value;\n this.onMaxDateTimeChange();\n }\n\n /**\n * Sets min or max date time value\n * @param value - Value to be set\n * @param setter - Action used for setting value\n */\n protected setMinMaxValue(value: string|number|TDate|Date, setter: Action1<TDate|undefined|null>): void\n {\n const val = this.dateApi.getValue(value, this.customFormat);\n\n if(val.isValid())\n {\n setter(val.value);\n }\n else\n {\n setter(null);\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `maxDateTime` input\n */\n public static ngAcceptInputType_maxDateTime: string|number|DateTimeBase|Date;\n\n /**\n * Custom input type for `minDateTime` input\n */\n public static ngAcceptInputType_minDateTime: string|number|DateTimeBase|Date;\n}\n"]}
@@ -1,74 +0,0 @@
1
- import { OnDestroy } from '@angular/core';
2
- import { Action1 } from '@jscrpt/common';
3
- import { DateTimeBase } from './dateTimeBase';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Base class for date time directives with value restrictions
7
- */
8
- export declare class DateTimeRestrictedBase<TDate = unknown> extends DateTimeBase<TDate> implements OnDestroy {
9
- /**
10
- * Subscription for max date instance value changes
11
- */
12
- private _maxDateInstanceChange;
13
- /**
14
- * Subscription for min date instance value changes
15
- */
16
- private _minDateInstanceChange;
17
- /**
18
- * Max allowed value of date time
19
- */
20
- protected ɵMaxDateTime: TDate | undefined | null;
21
- /**
22
- * Min allowed value of date time
23
- */
24
- protected ɵMinDateTime: TDate | undefined | null;
25
- /**
26
- * Gets or sets max allowed date for date time
27
- */
28
- get maxDateTime(): TDate | undefined | null;
29
- set maxDateTime(value: TDate | undefined | null);
30
- /**
31
- * Gets or sets min allowed date for date time
32
- */
33
- get minDateTime(): TDate | undefined | null;
34
- set minDateTime(value: TDate | undefined | null);
35
- /**
36
- * Called when component is destroyed
37
- */
38
- ngOnDestroy(): void;
39
- /**
40
- * Called whenever max date time restriction changes
41
- */
42
- protected onMaxDateTimeChange(): void;
43
- /**
44
- * Called whenever min date time restriction changes
45
- */
46
- protected onMinDateTimeChange(): void;
47
- /**
48
- * Sets min date time and notifies about changes
49
- * @param value - Value to be set
50
- */
51
- protected minDateSet(value: TDate | undefined | null): void;
52
- /**
53
- * Sets max date time and notifies about changes
54
- * @param value - Value to be set
55
- */
56
- protected maxDateSet(value: TDate | undefined | null): void;
57
- /**
58
- * Sets min or max date time value
59
- * @param value - Value to be set
60
- * @param setter - Action used for setting value
61
- */
62
- protected setMinMaxValue(value: string | number | TDate | Date, setter: Action1<TDate | undefined | null>): void;
63
- /**
64
- * Custom input type for `maxDateTime` input
65
- */
66
- static ngAcceptInputType_maxDateTime: string | number | DateTimeBase | Date;
67
- /**
68
- * Custom input type for `minDateTime` input
69
- */
70
- static ngAcceptInputType_minDateTime: string | number | DateTimeBase | Date;
71
- static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeRestrictedBase<any>, never>;
72
- static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimeRestrictedBase<any>, never, never, { "maxDateTime": "maxDateTime"; "minDateTime": "minDateTime"; }, {}, never, never, false>;
73
- }
74
- //# sourceMappingURL=dateTimeRestrictedBase.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dateTimeRestrictedBase.d.ts","sourceRoot":"","sources":["dateTimeRestrictedBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,SAAS,EAAC,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,OAAO,EAAoB,MAAM,gBAAgB,CAAC;AAK1D,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;;AAE5C;;GAEG;AACH,qBACa,sBAAsB,CAAC,KAAK,GAAG,OAAO,CAAE,SAAQ,YAAY,CAAC,KAAK,CAAE,YAAW,SAAS;IAIjG;;OAEG;IACH,OAAO,CAAC,sBAAsB,CAA8B;IAE5D;;OAEG;IACH,OAAO,CAAC,sBAAsB,CAA8B;IAI5D;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,KAAK,GAAC,SAAS,GAAC,IAAI,CAAC;IAE7C;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,KAAK,GAAC,SAAS,GAAC,IAAI,CAAC;IAI7C;;OAEG;IACH,IACW,WAAW,IAAI,KAAK,GAAC,SAAS,GAAC,IAAI,CAG7C;IACD,IAAW,WAAW,CAAC,KAAK,EAAE,KAAK,GAAC,SAAS,GAAC,IAAI,EA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