@coreui/angular-pro 4.2.40 → 4.2.42

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 (34) hide show
  1. package/esm2020/lib/calendar/calendar.service.mjs +3 -5
  2. package/esm2020/lib/calendar/calendar.utils.mjs +9 -6
  3. package/esm2020/lib/date-picker/date-picker.component.mjs +5 -4
  4. package/esm2020/lib/date-picker/public_api.mjs +1 -1
  5. package/esm2020/lib/date-range-picker/date-range-picker/custom-range-key.pipe.mjs +16 -0
  6. package/esm2020/lib/date-range-picker/date-range-picker/date-range-picker.component.mjs +51 -26
  7. package/esm2020/lib/date-range-picker/date-range-picker.module.mjs +10 -5
  8. package/esm2020/lib/date-range-picker/date-range-picker.type.mjs +2 -0
  9. package/esm2020/lib/date-range-picker/public_api.mjs +2 -1
  10. package/esm2020/lib/multi-select/multi-select/multi-select.component.mjs +3 -3
  11. package/esm2020/lib/smart-table/smart-table/smart-table.component.mjs +9 -4
  12. package/esm2020/lib/smart-table/smart-table-head/smart-table-column-label.pipe.mjs +25 -0
  13. package/esm2020/lib/smart-table/smart-table-head/smart-table-head.component.mjs +22 -22
  14. package/esm2020/lib/smart-table/smart-table.module.mjs +6 -3
  15. package/esm2020/lib/table/table.type.mjs +1 -1
  16. package/esm2020/lib/time-picker/time.utils.mjs +13 -13
  17. package/fesm2015/coreui-angular-pro.mjs +280 -208
  18. package/fesm2015/coreui-angular-pro.mjs.map +1 -1
  19. package/fesm2020/coreui-angular-pro.mjs +277 -204
  20. package/fesm2020/coreui-angular-pro.mjs.map +1 -1
  21. package/lib/calendar/calendar.utils.d.ts +1 -1
  22. package/lib/date-picker/public_api.d.ts +0 -1
  23. package/lib/date-range-picker/date-range-picker/custom-range-key.pipe.d.ts +8 -0
  24. package/lib/date-range-picker/date-range-picker/date-range-picker.component.d.ts +9 -9
  25. package/lib/date-range-picker/date-range-picker.module.d.ts +10 -9
  26. package/lib/date-range-picker/date-range-picker.type.d.ts +4 -0
  27. package/lib/date-range-picker/public_api.d.ts +3 -1
  28. package/lib/smart-table/smart-table/smart-table.component.d.ts +4 -0
  29. package/lib/smart-table/smart-table-head/smart-table-column-label.pipe.d.ts +9 -0
  30. package/lib/smart-table/smart-table-head/smart-table-head.component.d.ts +5 -6
  31. package/lib/smart-table/smart-table.module.d.ts +18 -17
  32. package/lib/table/table.type.d.ts +8 -5
  33. package/lib/time-picker/time.utils.d.ts +11 -11
  34. package/package.json +1 -2
@@ -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';
@@ -95,6 +95,7 @@ export declare class SmartTableComponent implements ISmartTable, AfterContentIni
95
95
  columnFilterTemplates: {
96
96
  [key: string]: (TemplateRef<any> | null);
97
97
  };
98
+ summaryRowTemplate: TemplateRef<unknown> | null;
98
99
  ngAfterContentInit(): void;
99
100
  get selectedAll(): boolean | "indeterminate";
100
101
  get tableFilterState(): string;
@@ -134,6 +135,9 @@ export declare class SmartTableComponent implements ISmartTable, AfterContentIni
134
135
  active?: boolean | undefined;
135
136
  align?: "top" | "bottom" | "middle" | undefined;
136
137
  color?: string | undefined;
138
+ _attributes?: {
139
+ [key: string]: any;
140
+ } | undefined;
137
141
  } | undefined;
138
142
  tableDataCellClasses(item: IItem, colName: string): string | {
139
143
  [klass: string]: any;
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { IColumn } from '../smart-table.type';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SmartTableColumnLabelPipe implements PipeTransform {
5
+ transform(column: IColumn | string, ...args: unknown[]): unknown;
6
+ prettifyName(name: string): string;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableColumnLabelPipe, never>;
8
+ static ɵpipe: i0.ɵɵPipeDeclaration<SmartTableColumnLabelPipe, "columnLabel", false>;
9
+ }
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import { IColumn, IColumnFilter, IColumnFilterValue, ISorter, ISorterValue } from '../smart-table.type';
4
4
  import * as i0 from "@angular/core";
@@ -18,8 +18,9 @@ export declare class SmartTableHeadComponent implements OnInit {
18
18
  sorterValue?: ISorterValue;
19
19
  set columnFilterTemplates(value: any);
20
20
  get columnFilterTemplates(): any;
21
- _columnFilterTemplates?: any;
22
- indeterminate: BehaviorSubject<boolean>;
21
+ set summaryRowTemplate(value: TemplateRef<unknown> | null);
22
+ get summaryRowTemplate(): TemplateRef<unknown> | null;
23
+ readonly indeterminate$: BehaviorSubject<boolean>;
23
24
  readonly columnFilterStateChange: EventEmitter<any>;
24
25
  readonly sorterStateChange: EventEmitter<any>;
25
26
  readonly selectAllChange: EventEmitter<boolean>;
@@ -33,10 +34,8 @@ export declare class SmartTableHeadComponent implements OnInit {
33
34
  };
34
35
  tableHeaderCellColor(column: IColumn | string): string;
35
36
  tableHeaderCellStyles(column: IColumn | string): any;
36
- columnLabel(column: IColumn | string): string;
37
37
  columnKey(column: IColumn | string): string;
38
38
  getColumnSorterState(column: IColumn | string): string | number;
39
- prettifyName(name: string): string;
40
39
  handleSortClick(column: IColumn | string, i: number): void;
41
40
  columnFilterEnabled(column: IColumn | string): boolean | ((column: import("../smart-table.type").IItem, value: string) => boolean);
42
41
  columnSorterEnabled(column: IColumn | string): boolean | ((a: import("../smart-table.type").IItem, b: import("../smart-table.type").IItem) => number);
@@ -49,5 +48,5 @@ export declare class SmartTableHeadComponent implements OnInit {
49
48
  getColumnFilter(column: IColumn | string): string;
50
49
  get columnFilterEvent(): 'change' | 'input';
51
50
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableHeadComponent, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableHeadComponent, "c-smart-table-head", never, { "columnFilter": "columnFilter"; "columnFilterState": "columnFilterState"; "columnSorter": "columnSorter"; "component": "component"; "columns": "columns"; "selectable": "selectable"; "selectAll": "selectAll"; "selectedAll": "selectedAll"; "sorterValue": "sorterValue"; "columnFilterTemplates": "columnFilterTemplates"; }, { "columnFilterStateChange": "columnFilterStateChange"; "sorterStateChange": "sorterStateChange"; "selectAllChange": "selectAllChange"; }, never, never, false>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableHeadComponent, "c-smart-table-head", never, { "columnFilter": "columnFilter"; "columnFilterState": "columnFilterState"; "columnSorter": "columnSorter"; "component": "component"; "columns": "columns"; "selectable": "selectable"; "selectAll": "selectAll"; "selectedAll": "selectedAll"; "sorterValue": "sorterValue"; "columnFilterTemplates": "columnFilterTemplates"; "summaryRowTemplate": "summaryRowTemplate"; }, { "columnFilterStateChange": "columnFilterStateChange"; "sorterStateChange": "sorterStateChange"; "selectAllChange": "selectAllChange"; }, never, never, false>;
53
52
  }
@@ -1,22 +1,23 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./smart-table/smart-table.component";
3
- import * as i2 from "./smart-table-filter/smart-table-filter.component";
4
- import * as i3 from "./smart-table-items-per-page-selector/smart-table-items-per-page-selector.component";
5
- import * as i4 from "./smart-table-head/smart-table-head.component";
6
- import * as i5 from "./smart-table-filter/filter-input.directive";
7
- import * as i6 from "./smart-table-column-filter/smart-table-column-filter.component";
8
- import * as i7 from "@angular/common";
9
- import * as i8 from "../element-cover/element-cover.module";
10
- import * as i9 from "../table/table.module";
11
- import * as i10 from "../pagination/pagination.module";
12
- import * as i11 from "../smart-pagination/smart-pagination.module";
13
- import * as i12 from "../form/form.module";
14
- import * as i13 from "@angular/forms";
15
- import * as i14 from "../button/button.module";
16
- import * as i15 from "../shared/shared.module";
17
- import * as i16 from "../utilities/utilities.module";
2
+ import * as i1 from "./smart-table-head/smart-table-column-label.pipe";
3
+ import * as i2 from "./smart-table/smart-table.component";
4
+ import * as i3 from "./smart-table-filter/smart-table-filter.component";
5
+ import * as i4 from "./smart-table-items-per-page-selector/smart-table-items-per-page-selector.component";
6
+ import * as i5 from "./smart-table-head/smart-table-head.component";
7
+ import * as i6 from "./smart-table-filter/filter-input.directive";
8
+ import * as i7 from "./smart-table-column-filter/smart-table-column-filter.component";
9
+ import * as i8 from "@angular/common";
10
+ import * as i9 from "../element-cover/element-cover.module";
11
+ import * as i10 from "../table/table.module";
12
+ import * as i11 from "../pagination/pagination.module";
13
+ import * as i12 from "../smart-pagination/smart-pagination.module";
14
+ import * as i13 from "../form/form.module";
15
+ import * as i14 from "@angular/forms";
16
+ import * as i15 from "../button/button.module";
17
+ import * as i16 from "../shared/shared.module";
18
+ import * as i17 from "../utilities/utilities.module";
18
19
  export declare class SmartTableModule {
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableModule, never>;
20
- static ɵmod: i0.ɵɵNgModuleDeclaration<SmartTableModule, [typeof i1.SmartTableComponent, typeof i2.SmartTableFilterComponent, typeof i3.SmartTableItemsPerPageSelectorComponent, typeof i4.SmartTableHeadComponent, typeof i5.FilterInputDirective, typeof i6.SmartTableColumnFilterComponent], [typeof i7.CommonModule, typeof i8.ElementCoverModule, typeof i9.TableModule, typeof i10.PaginationModule, typeof i11.SmartPaginationModule, typeof i12.FormModule, typeof i13.FormsModule, typeof i14.ButtonModule, typeof i15.SharedModule, typeof i13.ReactiveFormsModule, typeof i16.UtilitiesModule], [typeof i1.SmartTableComponent, typeof i2.SmartTableFilterComponent]>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SmartTableModule, [typeof i1.SmartTableColumnLabelPipe, typeof i2.SmartTableComponent, typeof i3.SmartTableFilterComponent, typeof i4.SmartTableItemsPerPageSelectorComponent, typeof i5.SmartTableHeadComponent, typeof i6.FilterInputDirective, typeof i7.SmartTableColumnFilterComponent], [typeof i8.CommonModule, typeof i9.ElementCoverModule, typeof i10.TableModule, typeof i11.PaginationModule, typeof i12.SmartPaginationModule, typeof i13.FormModule, typeof i14.FormsModule, typeof i15.ButtonModule, typeof i16.SharedModule, typeof i14.ReactiveFormsModule, typeof i17.UtilitiesModule], [typeof i2.SmartTableComponent, typeof i3.SmartTableFilterComponent]>;
21
22
  static ɵinj: i0.ɵɵInjectorDeclaration<SmartTableModule>;
22
23
  }
@@ -15,12 +15,12 @@ export interface ITable {
15
15
  * Add borders on all sides of the table and cells.
16
16
  * @type boolean
17
17
  */
18
- bordered?: boolean;
18
+ bordered?: boolean | string;
19
19
  /**
20
20
  * Remove borders on all sides of the table and cells.
21
21
  * @type boolean
22
22
  */
23
- borderless?: boolean;
23
+ borderless?: boolean | string;
24
24
  /**
25
25
  * Put the `<caption>` on the top of the table.
26
26
  * @values 'top'
@@ -35,7 +35,7 @@ export interface ITable {
35
35
  * Enable a hover state on table rows within table body.
36
36
  * @type boolean
37
37
  */
38
- hover?: boolean;
38
+ hover?: boolean | string;
39
39
  /**
40
40
  * Make table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to.
41
41
  * @type: {boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'}
@@ -45,12 +45,12 @@ export interface ITable {
45
45
  * Make table more compact by cutting all cell `padding` in half.
46
46
  * @type boolean
47
47
  */
48
- small?: boolean;
48
+ small?: boolean | string;
49
49
  /**
50
50
  * Add zebra-striping to any table row within the table body`.
51
51
  * @type boolean
52
52
  */
53
- striped?: boolean;
53
+ striped?: boolean | string;
54
54
  attributes?: {
55
55
  [key: string]: any;
56
56
  };
@@ -66,6 +66,9 @@ export interface ITableElementProps {
66
66
  * @type Colors
67
67
  */
68
68
  color?: Colors;
69
+ _attributes?: {
70
+ [key: string]: any;
71
+ };
69
72
  }
70
73
  export interface ITableRowCellProps extends ITableElementProps {
71
74
  /**
@@ -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.42",
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": {