@coreui/angular-pro 4.2.40 → 4.2.41

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.
@@ -21,6 +21,6 @@ export declare const isStartDate: (date: Date | null, start: Date | null, end: D
21
21
  export declare const isToday: (date: Date) => boolean;
22
22
  export declare const isThisMonth: (date: Date, index: number) => boolean;
23
23
  export declare const isThisYear: (year: number) => boolean;
24
- export declare const isValidDate: (date: Date | string | number) => boolean;
24
+ export declare const isValidDate: (date: number | string | Date) => boolean;
25
25
  export declare const tryDate: (value: string | number | Date, propName?: string) => Date;
26
26
  export declare const isDateInRangeDisabled: (startDate?: Date | null, endDate?: Date | null, dates?: (Date | Date[])[]) => boolean;
@@ -1,3 +1,2 @@
1
- export { ICalendarRanges } from '../date-range-picker/date-range-picker/date-range-picker.component';
2
1
  export { DatePickerComponent } from './date-picker.component';
3
2
  export { DatePickerModule } from './date-picker.module';
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { TCustomRange } from '../date-range-picker.type';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CustomRangeKeyPipe implements PipeTransform {
5
+ transform(customRange: TCustomRange, ...args: unknown[]): unknown;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomRangeKeyPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<CustomRangeKeyPipe, "customRangeKey", false>;
8
+ }
@@ -7,11 +7,8 @@ import { Options } from '@popperjs/core';
7
7
  import { Colors } from '../../coreui.types';
8
8
  import { DateFilterType, DayFormatType, WeekdayFormatType } from '../../calendar/calendar.service';
9
9
  import { TemplateIdDirective } from '../../shared';
10
+ import { ICalendarRanges, TCustomRange } from '../date-range-picker.type';
10
11
  import * as i0 from "@angular/core";
11
- export interface ICalendarRanges {
12
- [key: string]: Date[];
13
- }
14
- export declare type TCustomRange = [string, Date[]];
15
12
  /** Must be a valid date string */
16
13
  export declare class DateRangePickerComponent implements OnInit, OnDestroy, ControlValueAccessor, AfterViewInit, OnChanges {
17
14
  #private;
@@ -51,7 +48,9 @@ export declare class DateRangePickerComponent implements OnInit, OnDestroy, Cont
51
48
  get closeOnSelect(): boolean;
52
49
  /**
53
50
  * Set date format.
54
- * We use date-fns to format dates. Visit https://date-fns.org/v2.28.0/docs/format to check accepted patterns.
51
+ * We use Angular formatDate() function, see:
52
+ * - https://angular.io/api/common/formatDate
53
+ * - https://angular.io/api/common/DatePipe#pre-defined-format-options
55
54
  */
56
55
  format?: string;
57
56
  /**
@@ -87,7 +86,7 @@ export declare class DateRangePickerComponent implements OnInit, OnDestroy, Cont
87
86
  * Predefined date ranges the user can select from.
88
87
  * @type ICalendarRanges
89
88
  */
90
- ranges?: object;
89
+ ranges?: ICalendarRanges;
91
90
  /**
92
91
  * Sets the color context of the cancel button to one of CoreUI’s themed colors.
93
92
  * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
@@ -96,9 +95,9 @@ export declare class DateRangePickerComponent implements OnInit, OnDestroy, Cont
96
95
  rangesButtonsColor?: Colors;
97
96
  /**
98
97
  * Size the ranges button small or large.
99
- * @type 'sm' | 'lg' | undefined
98
+ * @type 'sm' | 'lg' | ''
100
99
  */
101
- rangesButtonsSize?: 'sm' | 'lg';
100
+ rangesButtonsSize: 'sm' | 'lg' | '';
102
101
  /**
103
102
  * Set the ranges button variant to an outlined button or a ghost button.
104
103
  * @type 'outline' | 'ghost' | undefined
@@ -197,6 +196,7 @@ export declare class DateRangePickerComponent implements OnInit, OnDestroy, Cont
197
196
  onBlur(): void;
198
197
  isMobile: boolean;
199
198
  customRanges: TCustomRange[];
199
+ showRanges: boolean;
200
200
  set startDateValue(value: string);
201
201
  get startDateValue(): string;
202
202
  private _startDateValue;
@@ -219,7 +219,7 @@ export declare class DateRangePickerComponent implements OnInit, OnDestroy, Cont
219
219
  'is-valid': boolean;
220
220
  'is-invalid': boolean;
221
221
  };
222
- formatDate(date: Date): string;
222
+ formatDate(date: Date | null | undefined): string;
223
223
  ngOnInit(): void;
224
224
  ngOnDestroy(): void;
225
225
  ngAfterViewInit(): void;
@@ -1,15 +1,16 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./date-range-picker/date-range-picker.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "@angular/forms";
5
- import * as i4 from "../button/button.module";
6
- import * as i5 from "../calendar/calendar.module";
7
- import * as i6 from "../shared/shared.module";
8
- import * as i7 from "../form/form.module";
9
- import * as i8 from "../dropdown/dropdown.module";
10
- import * as i9 from "../time-picker/time-picker.module";
3
+ import * as i2 from "./date-range-picker/custom-range-key.pipe";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "../button/button.module";
7
+ import * as i6 from "../calendar/calendar.module";
8
+ import * as i7 from "../shared/shared.module";
9
+ import * as i8 from "../form/form.module";
10
+ import * as i9 from "../dropdown/dropdown.module";
11
+ import * as i10 from "../time-picker/time-picker.module";
11
12
  export declare class DateRangePickerModule {
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<DateRangePickerModule, [typeof i1.DateRangePickerComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.ButtonModule, typeof i5.CalendarModule, typeof i6.SharedModule, typeof i7.FormModule, typeof i8.DropdownModule, typeof i9.TimePickerModule], [typeof i1.DateRangePickerComponent]>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DateRangePickerModule, [typeof i1.DateRangePickerComponent, typeof i2.CustomRangeKeyPipe], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.ButtonModule, typeof i6.CalendarModule, typeof i7.SharedModule, typeof i8.FormModule, typeof i9.DropdownModule, typeof i10.TimePickerModule], [typeof i1.DateRangePickerComponent, typeof i2.CustomRangeKeyPipe]>;
14
15
  static ɵinj: i0.ɵɵInjectorDeclaration<DateRangePickerModule>;
15
16
  }
@@ -0,0 +1,4 @@
1
+ export interface ICalendarRanges {
2
+ [key: string]: Date[];
3
+ }
4
+ export declare type TCustomRange = [string, Date[]];
@@ -1,2 +1,4 @@
1
- export { DateRangePickerComponent, ICalendarRanges } from './date-range-picker/date-range-picker.component';
1
+ export { DateRangePickerComponent } from './date-range-picker/date-range-picker.component';
2
+ export { ICalendarRanges } from './date-range-picker.type';
3
+ export { CustomRangeKeyPipe } from './date-range-picker/custom-range-key.pipe';
2
4
  export { DateRangePickerModule } from './date-range-picker.module';
@@ -1,15 +1,15 @@
1
1
  export interface DateTimeFormatOptions {
2
- localeMatcher?: "best fit" | "lookup" | undefined;
3
- weekday?: "long" | "short" | "narrow" | undefined;
4
- era?: "long" | "short" | "narrow" | undefined;
5
- year?: "numeric" | "2-digit" | undefined;
6
- month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined;
7
- day?: "numeric" | "2-digit" | undefined;
8
- hour?: "numeric" | "2-digit" | undefined;
9
- minute?: "numeric" | "2-digit" | undefined;
10
- second?: "numeric" | "2-digit" | undefined;
11
- timeZoneName?: "long" | "short" | undefined;
12
- formatMatcher?: "best fit" | "basic" | undefined;
2
+ localeMatcher?: 'best fit' | 'lookup' | undefined;
3
+ weekday?: 'long' | 'short' | 'narrow' | undefined;
4
+ era?: 'long' | 'short' | 'narrow' | undefined;
5
+ year?: 'numeric' | '2-digit' | undefined;
6
+ month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow' | undefined;
7
+ day?: 'numeric' | '2-digit' | undefined;
8
+ hour?: 'numeric' | '2-digit' | undefined;
9
+ minute?: 'numeric' | '2-digit' | undefined;
10
+ second?: 'numeric' | '2-digit' | undefined;
11
+ timeZoneName?: 'long' | 'short' | undefined;
12
+ formatMatcher?: 'best fit' | 'basic' | undefined;
13
13
  hour12?: boolean | undefined;
14
14
  timeZone?: string | undefined;
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coreui/angular-pro",
3
- "version": "4.2.40",
3
+ "version": "4.2.41",
4
4
  "description": "CoreUI Pro Components Library for Angular",
5
5
  "copyright": "Copyright 2023 creativeLabs Łukasz Holeczek",
6
6
  "homepage": "https://coreui.io/angular",
@@ -18,7 +18,6 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "@popperjs/core": "~2.11.6",
21
- "date-fns": "^2.29.0",
22
21
  "tslib": "^2.3.0"
23
22
  },
24
23
  "peerDependencies": {