@datarailsshared/datarailsshared 1.6.31 → 1.6.35

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 (19) hide show
  1. package/datarailsshared-datarailsshared-1.6.35.tgz +0 -0
  2. package/esm2022/lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component.mjs +31 -21
  3. package/esm2022/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.mjs +2 -2
  4. package/esm2022/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.mjs +12 -9
  5. package/esm2022/lib/dr-inputs/date-pickers/dr-fiscal-month-calendar-picker/dr-fiscal-month-calendar-header.component.mjs +136 -0
  6. package/esm2022/lib/dr-inputs/date-pickers/dr-fiscal-month-calendar-picker/dr-fiscal-month-calendar-picker.component.mjs +148 -0
  7. package/esm2022/lib/dr-inputs/dr-inputs.module.mjs +11 -3
  8. package/esm2022/lib/dr-inputs/dr-select/dr-select.component.mjs +2 -2
  9. package/esm2022/public-api.mjs +3 -1
  10. package/fesm2022/datarailsshared-datarailsshared.mjs +402 -121
  11. package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
  12. package/lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component.d.ts +3 -1
  13. package/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.d.ts +7 -5
  14. package/lib/dr-inputs/date-pickers/dr-fiscal-month-calendar-picker/dr-fiscal-month-calendar-header.component.d.ts +9 -0
  15. package/lib/dr-inputs/date-pickers/dr-fiscal-month-calendar-picker/dr-fiscal-month-calendar-picker.component.d.ts +23 -0
  16. package/lib/dr-inputs/dr-inputs.module.d.ts +12 -10
  17. package/package.json +1 -1
  18. package/public-api.d.ts +2 -0
  19. package/datarailsshared-datarailsshared-1.6.31.tgz +0 -0
@@ -37,7 +37,7 @@ export declare class DrDatePickerComponent implements ControlValueAccessor, Afte
37
37
  get active(): boolean;
38
38
  protected readonly destroyed$: Subject<void>;
39
39
  protected readonly calendarViewsTimeframeMapping: any;
40
- customHeader: typeof DrDatePickerCustomHeaderComponent;
40
+ readonly customHeader: typeof DrDatePickerCustomHeaderComponent;
41
41
  readonly: boolean;
42
42
  _min: Moment;
43
43
  _max: Moment;
@@ -84,6 +84,8 @@ export declare class DrDatePickerComponent implements ControlValueAccessor, Afte
84
84
  * @param timestamp
85
85
  */
86
86
  protected setValue(timestamp: number): void;
87
+ protected transformDisplayedValue(value: Moment, timeframe: TimeframeOption): Moment;
88
+ protected updateFormat(): void;
87
89
  onOpen(): void;
88
90
  onCLose(): void;
89
91
  static ɵfac: i0.ɵɵFactoryDeclaration<DrDatePickerComponent, never>;
@@ -1,16 +1,17 @@
1
1
  import { OnDestroy, ChangeDetectorRef, OnInit } from '@angular/core';
2
+ import { Subject } from 'rxjs';
2
3
  import { MatCalendar } from '@angular/material/datepicker';
3
4
  import { DateAdapter } from '@angular/material/core';
4
5
  import { CalendarView, CustomDateFormat, ITimeframeOption, TCalendarView } from '../../../models/datePicker';
5
6
  import { DrDatePickerService } from '../services/dr-date-picker.service';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class DrDatePickerCustomHeaderComponent<Moment> implements OnDestroy, OnInit {
8
- private _calendar;
9
- private _dateAdapter;
10
- private _dateFormats;
11
- private cdr;
9
+ protected _calendar: MatCalendar<any>;
10
+ protected _dateAdapter: DateAdapter<Moment>;
11
+ protected _dateFormats: CustomDateFormat;
12
+ protected cdr: ChangeDetectorRef;
12
13
  datePickerService: DrDatePickerService;
13
- private _destroyed;
14
+ protected _destroyed: Subject<void>;
14
15
  quarters: number[];
15
16
  selectedQuarter: number;
16
17
  timeframeOptions: ITimeframeOption[];
@@ -46,6 +47,7 @@ export declare class DrDatePickerCustomHeaderComponent<Moment> implements OnDest
46
47
  onSelectPresetTag(tag: any): void;
47
48
  goToCurrentDateInViewByFY(): void;
48
49
  isQuarterDisabled(quarterNumber: number): boolean;
50
+ protected listenToCalendarViewChanges(): void;
49
51
  private insertWeekSelector;
50
52
  static ɵfac: i0.ɵɵFactoryDeclaration<DrDatePickerCustomHeaderComponent<any>, never>;
51
53
  static ɵcmp: i0.ɵɵComponentDeclaration<DrDatePickerCustomHeaderComponent<any>, "dr-date-picker_custom-header.component", never, {}, {}, never, never, false, never>;
@@ -0,0 +1,9 @@
1
+ import { DrDatePickerCustomHeaderComponent } from '../dr-date-picker_custom-header/dr-date-picker_custom-header.component';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DrFiscalMonthCalendarHeaderComponent<Moment> extends DrDatePickerCustomHeaderComponent<Moment> {
4
+ ngOnInit(): void;
5
+ transformDateInFiscalMonthViewAccordingToFY(): void;
6
+ protected listenToCalendarViewChanges(): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<DrFiscalMonthCalendarHeaderComponent<any>, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<DrFiscalMonthCalendarHeaderComponent<any>, "dr-fiscal-month-calendar-header.component", never, {}, {}, never, never, false, never>;
9
+ }
@@ -0,0 +1,23 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { DrDatePickerService } from '../services/dr-date-picker.service';
3
+ import { CustomDateAdapter, DrDatePickerComponent } from '../dr-date-picker/dr-date-picker.component';
4
+ import * as moment from 'moment';
5
+ import { TimeframeOption } from '../../../models/datePicker';
6
+ import { MatDatepicker } from '@angular/material/datepicker';
7
+ import { DrFiscalMonthCalendarHeaderComponent } from './dr-fiscal-month-calendar-header.component';
8
+ import * as i0 from "@angular/core";
9
+ export declare class FiscalMonthAdapter extends CustomDateAdapter {
10
+ readonly datePickerService: DrDatePickerService;
11
+ getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
12
+ format(date: moment.Moment, displayFormat: string): string | any;
13
+ today(): moment.Moment;
14
+ }
15
+ export declare class DrFiscalMonthCalendarPickerComponent extends DrDatePickerComponent implements OnInit {
16
+ readonly customHeader: typeof DrFiscalMonthCalendarHeaderComponent;
17
+ format: TimeframeOption;
18
+ ngOnInit(): void;
19
+ chosenPeriodHandler(chosenDate: moment.Moment, timeframe: TimeframeOption, picker: MatDatepicker<any>): void;
20
+ protected transformDisplayedValue(value: moment.Moment, timeframe: TimeframeOption): moment.Moment;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<DrFiscalMonthCalendarPickerComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<DrFiscalMonthCalendarPickerComponent, "dr-fiscal-month-picker", never, {}, {}, never, never, false, never>;
23
+ }
@@ -16,17 +16,19 @@ import * as i14 from "./dr-model-debounce-change.directive";
16
16
  import * as i15 from "./date-pickers/dr-show-timeframe.pipe";
17
17
  import * as i16 from "./dr-select-add-item/dr-select-add-item.component";
18
18
  import * as i17 from "./dr-link/dr-link.component";
19
- import * as i18 from "ngx-mask";
20
- import * as i19 from "@angular/forms";
21
- import * as i20 from "@angular/common";
22
- import * as i21 from "@ng-select/ng-select";
23
- import * as i22 from "@angular/material/core";
24
- import * as i23 from "@angular/material/datepicker";
25
- import * as i24 from "../dr-tooltip/dr-tooltip.module";
26
- import * as i25 from "../dr-spinner/dr-spinner.module";
27
- import * as i26 from "./date-pickers/week-selector/week-selector.component";
19
+ import * as i18 from "./date-pickers/dr-fiscal-month-calendar-picker/dr-fiscal-month-calendar-picker.component";
20
+ import * as i19 from "./date-pickers/dr-fiscal-month-calendar-picker/dr-fiscal-month-calendar-header.component";
21
+ import * as i20 from "ngx-mask";
22
+ import * as i21 from "@angular/forms";
23
+ import * as i22 from "@angular/common";
24
+ import * as i23 from "@ng-select/ng-select";
25
+ import * as i24 from "@angular/material/core";
26
+ import * as i25 from "@angular/material/datepicker";
27
+ import * as i26 from "../dr-tooltip/dr-tooltip.module";
28
+ import * as i27 from "../dr-spinner/dr-spinner.module";
29
+ import * as i28 from "./date-pickers/week-selector/week-selector.component";
28
30
  export declare class DrInputsModule {
29
31
  static ɵfac: i0.ɵɵFactoryDeclaration<DrInputsModule, never>;
30
- static ɵmod: i0.ɵɵNgModuleDeclaration<DrInputsModule, [typeof i1.DrButtonComponent, typeof i2.RadioButtonComponent, typeof i3.RadioGroupComponent, typeof i4.CheckboxComponent, typeof i5.DrInputComponent, typeof i6.DrSelectComponent, typeof i7.DrToggleComponent, typeof i8.DrToggleButtonComponent, typeof i9.DrDatePickerComponent, typeof i10.DrDatePickerWithTimeframeComponent, typeof i11.DrDatePickerFormatDirective, typeof i12.DrDatePickerCustomHeaderComponent, typeof i13.DrDatePickerRangeComponent, typeof i14.DrModelDebounceChangeDirective, typeof i15.DrShowTimeframePipe, typeof i16.DrSelectAddItemComponent, typeof i17.DrLinkComponent], [typeof i18.NgxMaskDirective, typeof i19.FormsModule, typeof i19.ReactiveFormsModule, typeof i20.CommonModule, typeof i21.NgSelectModule, typeof i22.MatNativeDateModule, typeof i23.MatDatepickerModule, typeof i24.DrTooltipModule, typeof i25.DrSpinnerModule, typeof i26.WeekSelectorComponent], [typeof i1.DrButtonComponent, typeof i2.RadioButtonComponent, typeof i3.RadioGroupComponent, typeof i4.CheckboxComponent, typeof i5.DrInputComponent, typeof i6.DrSelectComponent, typeof i7.DrToggleComponent, typeof i8.DrToggleButtonComponent, typeof i9.DrDatePickerComponent, typeof i10.DrDatePickerWithTimeframeComponent, typeof i11.DrDatePickerFormatDirective, typeof i12.DrDatePickerCustomHeaderComponent, typeof i13.DrDatePickerRangeComponent, typeof i14.DrModelDebounceChangeDirective, typeof i15.DrShowTimeframePipe, typeof i16.DrSelectAddItemComponent, typeof i17.DrLinkComponent]>;
32
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DrInputsModule, [typeof i1.DrButtonComponent, typeof i2.RadioButtonComponent, typeof i3.RadioGroupComponent, typeof i4.CheckboxComponent, typeof i5.DrInputComponent, typeof i6.DrSelectComponent, typeof i7.DrToggleComponent, typeof i8.DrToggleButtonComponent, typeof i9.DrDatePickerComponent, typeof i10.DrDatePickerWithTimeframeComponent, typeof i11.DrDatePickerFormatDirective, typeof i12.DrDatePickerCustomHeaderComponent, typeof i13.DrDatePickerRangeComponent, typeof i14.DrModelDebounceChangeDirective, typeof i15.DrShowTimeframePipe, typeof i16.DrSelectAddItemComponent, typeof i17.DrLinkComponent, typeof i18.DrFiscalMonthCalendarPickerComponent, typeof i19.DrFiscalMonthCalendarHeaderComponent], [typeof i20.NgxMaskDirective, typeof i21.FormsModule, typeof i21.ReactiveFormsModule, typeof i22.CommonModule, typeof i23.NgSelectModule, typeof i24.MatNativeDateModule, typeof i25.MatDatepickerModule, typeof i26.DrTooltipModule, typeof i27.DrSpinnerModule, typeof i28.WeekSelectorComponent], [typeof i1.DrButtonComponent, typeof i2.RadioButtonComponent, typeof i3.RadioGroupComponent, typeof i4.CheckboxComponent, typeof i5.DrInputComponent, typeof i6.DrSelectComponent, typeof i7.DrToggleComponent, typeof i8.DrToggleButtonComponent, typeof i9.DrDatePickerComponent, typeof i10.DrDatePickerWithTimeframeComponent, typeof i11.DrDatePickerFormatDirective, typeof i12.DrDatePickerCustomHeaderComponent, typeof i13.DrDatePickerRangeComponent, typeof i14.DrModelDebounceChangeDirective, typeof i15.DrShowTimeframePipe, typeof i16.DrSelectAddItemComponent, typeof i17.DrLinkComponent, typeof i18.DrFiscalMonthCalendarPickerComponent, typeof i19.DrFiscalMonthCalendarHeaderComponent]>;
31
33
  static ɵinj: i0.ɵɵInjectorDeclaration<DrInputsModule>;
32
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/datarailsshared",
3
- "version": "1.6.31",
3
+ "version": "1.6.35",
4
4
  "description": "DataRails shared components",
5
5
  "keywords": [
6
6
  "angular",
package/public-api.d.ts CHANGED
@@ -18,6 +18,8 @@ export * from './lib/dr-inputs/dr-input/dr-input.component';
18
18
  export * from './lib/dr-inputs/dr-link/dr-link.component';
19
19
  export * from './lib/dr-inputs/dr-select/dr-select.component';
20
20
  export * from './lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component';
21
+ export * from './lib/dr-inputs/date-pickers/dr-fiscal-month-calendar-picker/dr-fiscal-month-calendar-header.component';
22
+ export * from './lib/dr-inputs/date-pickers/dr-fiscal-month-calendar-picker/dr-fiscal-month-calendar-picker.component';
21
23
  export * from './lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component';
22
24
  export * from './lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component';
23
25
  export * from './lib/dr-inputs/date-pickers/dr-date-picker-range/dr-date-picker-range.component';