@coreui/angular-pro 4.7.3 → 5.0.0-alpha.1

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/esm2022/lib/avatar/avatar.component.mjs +8 -5
  2. package/esm2022/lib/badge/badge.component.mjs +8 -4
  3. package/esm2022/lib/breadcrumb/breadcrumb-router/breadcrumb-router.service.mjs +6 -6
  4. package/esm2022/lib/button/button-close.directive.mjs +9 -3
  5. package/esm2022/lib/calendar/calendar/calendar.component.mjs +148 -69
  6. package/esm2022/lib/calendar/calendar-month/calendar-class-day.pipe.mjs +2 -1
  7. package/esm2022/lib/calendar/calendar-month/calendar-class-month.pipe.mjs +2 -2
  8. package/esm2022/lib/calendar/calendar-month/calendar-class-row.pipe.mjs +26 -0
  9. package/esm2022/lib/calendar/calendar-month/calendar-day.directive.mjs +101 -58
  10. package/esm2022/lib/calendar/calendar-month/calendar-month.component.mjs +253 -90
  11. package/esm2022/lib/calendar/calendar-month/calendar-row.directive.mjs +117 -0
  12. package/esm2022/lib/calendar/calendar-navigation/calendar-navigation.component.mjs +26 -22
  13. package/esm2022/lib/calendar/calendar.module.mjs +7 -4
  14. package/esm2022/lib/calendar/calendar.service.mjs +5 -2
  15. package/esm2022/lib/calendar/calendar.utils.mjs +100 -17
  16. package/esm2022/lib/card/card.component.mjs +10 -6
  17. package/esm2022/lib/carousel/carousel/carousel.component.mjs +35 -34
  18. package/esm2022/lib/coreui.types.mjs +1 -1
  19. package/esm2022/lib/date-picker/date-picker.component.mjs +5 -9
  20. package/esm2022/lib/date-range-picker/date-range-picker/date-range-picker.component.mjs +166 -161
  21. package/esm2022/lib/dropdown/dropdown/dropdown.component.mjs +5 -18
  22. package/esm2022/lib/dropdown/dropdown-item/dropdown-item.directive.mjs +10 -2
  23. package/esm2022/lib/dropdown/dropdown-menu/dropdown-menu.directive.mjs +76 -40
  24. package/esm2022/lib/dropdown/dropdown.service.mjs +2 -2
  25. package/esm2022/lib/modal/modal/modal.component.mjs +1 -1
  26. package/esm2022/lib/multi-select/multi-select/multi-select.component.mjs +9 -6
  27. package/esm2022/lib/multi-select/multi-select-tag/multi-select-tag.component.mjs +3 -3
  28. package/esm2022/lib/nav/nav.component.mjs +3 -3
  29. package/esm2022/lib/navbar/navbar.component.mjs +7 -11
  30. package/esm2022/lib/offcanvas/offcanvas/offcanvas.component.mjs +8 -4
  31. package/esm2022/lib/popover/popover.directive.mjs +2 -2
  32. package/esm2022/lib/shared/public_api.mjs +2 -1
  33. package/esm2022/lib/shared/shared.module.mjs +5 -12
  34. package/esm2022/lib/shared/theme.directive.mjs +44 -0
  35. package/esm2022/lib/sidebar/sidebar/sidebar.component.mjs +3 -2
  36. package/esm2022/lib/sidebar/sidebar-nav/sidebar-nav-link.component.mjs +3 -3
  37. package/esm2022/lib/sidebar/sidebar-nav/sidebar-nav.component.mjs +19 -15
  38. package/esm2022/lib/sidebar/sidebar-toggler/sidebar-toggler.component.mjs +11 -2
  39. package/esm2022/lib/smart-table/smart-table/smart-table.component.mjs +88 -123
  40. package/esm2022/lib/smart-table/smart-table-head/smart-table-column-label.pipe.mjs +3 -11
  41. package/esm2022/lib/smart-table/smart-table-head/smart-table-head.component.mjs +46 -35
  42. package/esm2022/lib/smart-table/smart-table.type.mjs +1 -1
  43. package/esm2022/lib/smart-table/smart-table.utils.mjs +181 -0
  44. package/esm2022/lib/table/table.type.mjs +1 -1
  45. package/esm2022/lib/tabs/tab-pane/tab-pane.component.mjs +3 -5
  46. package/esm2022/lib/time-picker/time-picker-roll-col/time-picker-roll-am-pm.component.mjs +11 -5
  47. package/esm2022/lib/time-picker/time-picker-roll-col/time-picker-roll-col.component.mjs +17 -10
  48. package/esm2022/lib/time-picker/time-picker.component.mjs +87 -113
  49. package/esm2022/lib/tooltip/tooltip.directive.mjs +2 -2
  50. package/esm2022/lib/widget/widget-stat-a/widget-stat-a.component.mjs +2 -2
  51. package/esm2022/lib/widget/widget-stat-b/widget-stat-b.component.mjs +4 -4
  52. package/esm2022/lib/widget/widget-stat-c/widget-stat-c.component.mjs +14 -16
  53. package/esm2022/lib/widget/widget-stat-d/widget-stat-d.component.mjs +3 -3
  54. package/esm2022/lib/widget/widget-stat-e/widget-stat-e.component.mjs +2 -2
  55. package/esm2022/lib/widget/widget-stat-f/widget-stat-f.component.mjs +2 -2
  56. package/fesm2022/coreui-angular-pro.mjs +2185 -1472
  57. package/fesm2022/coreui-angular-pro.mjs.map +1 -1
  58. package/lib/avatar/avatar.component.d.ts +4 -3
  59. package/lib/badge/badge.component.d.ts +5 -3
  60. package/lib/breadcrumb/breadcrumb-router/breadcrumb-router.service.d.ts +1 -1
  61. package/lib/button/button-close.directive.d.ts +3 -1
  62. package/lib/calendar/calendar/calendar.component.d.ts +46 -19
  63. package/lib/calendar/calendar-month/calendar-class-row.pipe.d.ts +23 -0
  64. package/lib/calendar/calendar-month/calendar-day.directive.d.ts +16 -26
  65. package/lib/calendar/calendar-month/calendar-month.component.d.ts +45 -27
  66. package/lib/calendar/calendar-month/calendar-row.directive.d.ts +44 -0
  67. package/lib/calendar/calendar-navigation/calendar-navigation.component.d.ts +7 -6
  68. package/lib/calendar/calendar.module.d.ts +2 -1
  69. package/lib/calendar/calendar.service.d.ts +5 -1
  70. package/lib/calendar/calendar.utils.d.ts +25 -6
  71. package/lib/card/card.component.d.ts +3 -1
  72. package/lib/carousel/carousel/carousel.component.d.ts +10 -14
  73. package/lib/coreui.types.d.ts +4 -1
  74. package/lib/date-picker/date-picker.component.d.ts +2 -2
  75. package/lib/date-range-picker/date-range-picker/date-range-picker.component.d.ts +75 -41
  76. package/lib/dropdown/dropdown/dropdown.component.d.ts +2 -9
  77. package/lib/dropdown/dropdown-item/dropdown-item.directive.d.ts +5 -1
  78. package/lib/dropdown/dropdown-menu/dropdown-menu.directive.d.ts +13 -16
  79. package/lib/dropdown/dropdown.service.d.ts +0 -1
  80. package/lib/multi-select/multi-select/multi-select.component.d.ts +1 -2
  81. package/lib/nav/nav.component.d.ts +2 -2
  82. package/lib/navbar/navbar.component.d.ts +2 -5
  83. package/lib/offcanvas/offcanvas/offcanvas.component.d.ts +2 -1
  84. package/lib/shared/public_api.d.ts +1 -0
  85. package/lib/shared/shared.module.d.ts +2 -1
  86. package/lib/shared/theme.directive.d.ts +19 -0
  87. package/lib/sidebar/sidebar-nav/sidebar-nav.component.d.ts +5 -2
  88. package/lib/sidebar/sidebar-toggler/sidebar-toggler.component.d.ts +1 -0
  89. package/lib/smart-table/smart-table/smart-table.component.d.ts +36 -51
  90. package/lib/smart-table/smart-table-head/smart-table-column-label.pipe.d.ts +0 -1
  91. package/lib/smart-table/smart-table-head/smart-table-head.component.d.ts +21 -11
  92. package/lib/smart-table/smart-table.type.d.ts +49 -34
  93. package/lib/smart-table/smart-table.utils.d.ts +29 -0
  94. package/lib/table/table.type.d.ts +5 -6
  95. package/lib/time-picker/time-picker-roll-col/time-picker-roll-am-pm.component.d.ts +2 -1
  96. package/lib/time-picker/time-picker-roll-col/time-picker-roll-col.component.d.ts +3 -2
  97. package/lib/time-picker/time-picker.component.d.ts +17 -28
  98. package/lib/widget/widget-stat-a/widget-stat-a.component.d.ts +1 -1
  99. package/lib/widget/widget-stat-b/widget-stat-b.component.d.ts +3 -3
  100. package/lib/widget/widget-stat-c/widget-stat-c.component.d.ts +15 -13
  101. package/lib/widget/widget-stat-e/widget-stat-e.component.d.ts +1 -1
  102. package/lib/widget/widget-stat-f/widget-stat-f.component.d.ts +1 -1
  103. package/package.json +3 -2
@@ -1,22 +1,19 @@
1
- import { AfterContentInit, EventEmitter, IterableDiffers, KeyValueDiffers, OnChanges, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
2
- import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
1
+ import { AfterContentInit, EventEmitter, IterableDiffers, KeyValueDiffers, OnChanges, QueryList, SimpleChanges, TemplateRef, WritableSignal } from '@angular/core';
3
2
  import { BehaviorSubject } from 'rxjs';
4
3
  import { ITable } from '../../table/table.type';
5
- import { IColumn, IColumnFilter, IColumnFilterValue, IItem, IItemInternal, ISmartTable, ISorter, ISorterValue, ITableFilter, ITableGroupProps, ItemsPerPageSelect } from '../smart-table.type';
4
+ import { IColumn, IColumnFilter, IColumnFilterValue, IGroup, IItem, IItemInternal, ISmartTable, ISorter, ISorterValue, ITableFilter, ITableSectionProps, ItemsPerPageSelect, SortOrder } from '../smart-table.type';
6
5
  import { TemplateIdDirective } from '../../shared';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class SmartTableComponent implements ISmartTable, AfterContentInit, OnChanges {
9
8
  private iterableDiffers;
10
9
  private keyValueDiffers;
11
- static ngAcceptInputType_activePage: NumberInput;
12
- static ngAcceptInputType_cleaner: BooleanInput;
13
- static ngAcceptInputType_clickableRows: BooleanInput;
14
- static ngAcceptInputType_footer: BooleanInput;
15
- static ngAcceptInputType_header: BooleanInput;
16
- static ngAcceptInputType_itemsPerPage: NumberInput;
17
- static ngAcceptInputType_pagination: BooleanInput;
18
- static ngAcceptInputType_selectable: BooleanInput;
19
10
  constructor(iterableDiffers: IterableDiffers, keyValueDiffers: KeyValueDiffers);
11
+ readonly getColumnKey: (column: string | IColumn) => string;
12
+ readonly getTableDataCellClass: (column: IColumn, item: IItem) => {
13
+ [x: string]: boolean;
14
+ };
15
+ readonly getTableDataCellProps: (column: IColumn, item: IItem) => {};
16
+ readonly getTableDataCellStyles: (column: IColumn, item: IItem) => Partial<CSSStyleDeclaration>;
20
17
  readonly selectedAllSubject: BehaviorSubject<boolean | "indeterminate">;
21
18
  private readonly itemsDiffer;
22
19
  private readonly itemsFilteredDiffer;
@@ -25,28 +22,23 @@ export declare class SmartTableComponent implements ISmartTable, AfterContentIni
25
22
  set activePage(value: number);
26
23
  get activePage(): number;
27
24
  private _activePage;
28
- set cleaner(value: boolean);
29
- get cleaner(): boolean;
30
- private _cleaner;
31
- set clickableRows(value: boolean);
32
- get clickableRows(): boolean;
33
- private _clickableRows;
34
- set columns(value: (string | IColumn)[]);
35
- get columns(): (string | IColumn)[];
36
- private _columns?;
25
+ cleaner: boolean;
26
+ clickableRows: boolean;
27
+ set columns(value: (string | IColumn | IGroup)[]);
28
+ get columns(): IColumn[];
29
+ columns$: WritableSignal<IColumn[]>;
30
+ columnGroups$: WritableSignal<IGroup[][]>;
31
+ showGroups$: import("@angular/core").Signal<boolean>;
37
32
  columnFilter?: boolean | IColumnFilter;
38
33
  set columnFilterValue(value: IColumnFilterValue);
39
34
  get columnFilterValue(): IColumnFilterValue;
40
35
  private _columnFilterValue;
41
36
  columnSorter?: boolean | ISorter;
42
- set footer(value: boolean);
43
- get footer(): boolean;
44
- private _footer;
45
- set header(value: boolean);
46
- get header(): boolean;
47
- private _header;
37
+ footer: boolean;
38
+ header: boolean;
48
39
  set items(value: IItem[]);
49
40
  get items(): IItem[];
41
+ items$: WritableSignal<IItemInternal[]>;
50
42
  private _items;
51
43
  set itemsPerPage(value: number);
52
44
  get itemsPerPage(): number;
@@ -56,15 +48,11 @@ export declare class SmartTableComponent implements ISmartTable, AfterContentIni
56
48
  itemsPerPageSelect?: boolean | ItemsPerPageSelect;
57
49
  loading?: boolean;
58
50
  noItemsLabel: string | TemplateRef<any>;
59
- set pagination(value: boolean);
60
- get pagination(): boolean;
61
- private _pagination;
51
+ pagination: boolean;
62
52
  set selectable(value: boolean);
63
53
  get selectable(): boolean;
64
54
  private _selectable;
65
- set selectAll(value: boolean);
66
- get selectAll(): boolean;
67
- private _selectAll;
55
+ selectAll: boolean;
68
56
  set sorterValue(value: ISorterValue);
69
57
  get sorterValue(): ISorterValue;
70
58
  private _sorterValue;
@@ -76,9 +64,9 @@ export declare class SmartTableComponent implements ISmartTable, AfterContentIni
76
64
  set tableFilterValue(value: string);
77
65
  get tableFilterValue(): string;
78
66
  private _tableFilterValue;
79
- tableBodyProps?: ITableGroupProps;
80
- tableFootProps?: ITableGroupProps;
81
- tableHeadProps?: ITableGroupProps;
67
+ tableBodyProps?: ITableSectionProps;
68
+ tableFootProps?: ITableSectionProps;
69
+ tableHeadProps?: ITableSectionProps;
82
70
  tableProps?: ITable;
83
71
  readonly selectedItemsChange: EventEmitter<IItem[]>;
84
72
  readonly sorterValueChange: EventEmitter<ISorterValue>;
@@ -105,9 +93,8 @@ export declare class SmartTableComponent implements ISmartTable, AfterContentIni
105
93
  get firstItemOnActivePageIndex(): number;
106
94
  get itemsOnActivePage(): IItemInternal[];
107
95
  get currentItems(): IItemInternal[];
108
- get genCols(): string[];
109
- get rawColumnNames(): string[];
110
- get itemsDataColumns(): string[];
96
+ rawColumnNames$: import("@angular/core").Signal<string[]>;
97
+ itemsDataColumns$: import("@angular/core").Signal<string[]>;
111
98
  get sortedItems(): IItemInternal[];
112
99
  get tableFilterEvent(): 'change' | 'input';
113
100
  private _columnFiltered;
@@ -118,9 +105,10 @@ export declare class SmartTableComponent implements ISmartTable, AfterContentIni
118
105
  handleSortChange($event: {
119
106
  columnKey: string;
120
107
  index: number;
108
+ order?: SortOrder;
121
109
  }): void;
122
110
  isSortable(i: number): boolean | undefined;
123
- handleSorterChange(column: string, index: number): void;
111
+ handleSorterChange(column: string, index: number, order?: SortOrder): void;
124
112
  setActivePage($event: number): void;
125
113
  handleColumnFilterChange($event: any): void;
126
114
  handleTableFilterChange($event: {
@@ -131,18 +119,6 @@ export declare class SmartTableComponent implements ISmartTable, AfterContentIni
131
119
  handleItemsPerPageChange(value: number): void;
132
120
  handleRowChecked($event: Event, item: IItemInternal): void;
133
121
  handleSelectAllChange($event: any): void;
134
- tableDataCellProps(item: IItem, colName: string): {
135
- active?: boolean | undefined;
136
- align?: "top" | "middle" | "bottom" | undefined;
137
- color?: string | undefined;
138
- _attributes?: {
139
- [key: string]: any;
140
- } | undefined;
141
- } | undefined;
142
- tableDataCellClasses(item: IItem, colName: string): string | string[] | Set<string> | {
143
- [klass: string]: any;
144
- } | undefined;
145
- getColumnName($event: MouseEvent): string;
146
122
  handleRowClick(param: {
147
123
  $event: MouseEvent;
148
124
  item: IItemInternal;
@@ -151,4 +127,13 @@ export declare class SmartTableComponent implements ISmartTable, AfterContentIni
151
127
  ngOnChanges(changes: SimpleChanges): void;
152
128
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableComponent, never>;
153
129
  static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableComponent, "c-smart-table", ["cSmartTable"], { "activePage": { "alias": "activePage"; "required": false; }; "cleaner": { "alias": "cleaner"; "required": false; }; "clickableRows": { "alias": "clickableRows"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "columnFilter": { "alias": "columnFilter"; "required": false; }; "columnFilterValue": { "alias": "columnFilterValue"; "required": false; }; "columnSorter": { "alias": "columnSorter"; "required": false; }; "footer": { "alias": "footer"; "required": false; }; "header": { "alias": "header"; "required": false; }; "items": { "alias": "items"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; "itemsPerPageLabel": { "alias": "itemsPerPageLabel"; "required": false; }; "itemsPerPageOptions": { "alias": "itemsPerPageOptions"; "required": false; }; "itemsPerPageSelect": { "alias": "itemsPerPageSelect"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "noItemsLabel": { "alias": "noItemsLabel"; "required": false; }; "pagination": { "alias": "pagination"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "sorterValue": { "alias": "sorterValue"; "required": false; }; "tableFilter": { "alias": "tableFilter"; "required": false; }; "tableFilterLabel": { "alias": "tableFilterLabel"; "required": false; }; "tableFilterPlaceholder": { "alias": "tableFilterPlaceholder"; "required": false; }; "tableFilterValue": { "alias": "tableFilterValue"; "required": false; }; "tableBodyProps": { "alias": "tableBodyProps"; "required": false; }; "tableFootProps": { "alias": "tableFootProps"; "required": false; }; "tableHeadProps": { "alias": "tableHeadProps"; "required": false; }; "tableProps": { "alias": "tableProps"; "required": false; }; }, { "selectedItemsChange": "selectedItemsChange"; "sorterValueChange": "sorterValueChange"; "activePageChange": "activePageChange"; "itemsPerPageChange": "itemsPerPageChange"; "rowClick": "rowClick"; "columnFilterValueChange": "columnFilterValueChange"; "filteredItemsChange": "filteredItemsChange"; "tableFilterValueChange": "tableFilterValueChange"; }, ["columnTemplates"], ["[customHeader]"], true, never>;
130
+ static ngAcceptInputType_activePage: unknown;
131
+ static ngAcceptInputType_cleaner: unknown;
132
+ static ngAcceptInputType_clickableRows: unknown;
133
+ static ngAcceptInputType_footer: unknown;
134
+ static ngAcceptInputType_header: unknown;
135
+ static ngAcceptInputType_itemsPerPage: unknown;
136
+ static ngAcceptInputType_pagination: unknown;
137
+ static ngAcceptInputType_selectable: unknown;
138
+ static ngAcceptInputType_selectAll: unknown;
154
139
  }
@@ -3,7 +3,6 @@ import { IColumn } from '../smart-table.type';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class SmartTableColumnLabelPipe implements PipeTransform {
5
5
  transform(column: IColumn | string, ...args: unknown[]): unknown;
6
- prettifyName(name: string): string;
7
6
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableColumnLabelPipe, never>;
8
7
  static ɵpipe: i0.ɵɵPipeDeclaration<SmartTableColumnLabelPipe, "columnLabel", true>;
9
8
  }
@@ -1,21 +1,31 @@
1
- import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
1
+ import { EventEmitter, OnInit, TemplateRef, WritableSignal } from '@angular/core';
2
2
  import { BehaviorSubject } from 'rxjs';
3
- import { IColumn, IColumnFilter, IColumnFilterValue, ISorter, ISorterValue } from '../smart-table.type';
3
+ import { IColumn, IColumnFilter, IColumnFilterValue, IGroup, ISorter, ISorterValue, SortOrder } from '../smart-table.type';
4
4
  import { Colors } from '../../coreui.types';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class SmartTableHeadComponent implements OnInit {
7
7
  #private;
8
8
  constructor();
9
+ protected readonly getTableHeaderCellStyles: (column: IColumn, columnSorter: boolean | ISorter | undefined) => Partial<CSSStyleDeclaration>;
10
+ protected readonly getTableHeaderCellProps: (column: string | IColumn) => {
11
+ [key: string]: any;
12
+ };
13
+ protected readonly getTableHeaderCellClass: (column: IColumn) => {
14
+ [x: string]: boolean;
15
+ };
9
16
  columnFilter?: boolean | IColumnFilter;
10
17
  columnFilterState: IColumnFilterValue;
11
18
  columnSorter?: boolean | ISorter;
12
19
  component?: string;
13
- columns?: (IColumn | string)[];
20
+ set columns(value: (IColumn | IGroup)[] | undefined);
21
+ get columns(): (IColumn | IGroup)[] | undefined;
22
+ set columnGroups(value: IGroup[][]);
23
+ columnGroups$: WritableSignal<IGroup[][]>;
14
24
  selectable?: boolean;
15
- set selectAll(value: boolean);
16
- get selectAll(): boolean;
25
+ selectAll: boolean;
17
26
  set selectedAll(value: boolean | 'indeterminate');
18
27
  get selectedAll(): boolean | 'indeterminate';
28
+ showGroups: boolean;
19
29
  sorterValue?: ISorterValue;
20
30
  set columnFilterTemplates(value: any);
21
31
  get columnFilterTemplates(): any;
@@ -30,14 +40,11 @@ export declare class SmartTableHeadComponent implements OnInit {
30
40
  tfoot: boolean;
31
41
  };
32
42
  ngOnInit(): void;
33
- tableHeaderCellProps(column: IColumn | string): {
34
- [key: string]: any;
35
- };
36
43
  tableHeaderCellColor(column: IColumn | string): Colors;
37
- tableHeaderCellStyles(column: IColumn | string): any;
38
44
  columnKey(column: IColumn | string): string;
39
45
  getColumnSorterState(column: IColumn | string): string | number;
40
- handleSortClick(column: IColumn | string, i: number): void;
46
+ handleSortClick(column: IColumn | string, i: number, order?: SortOrder): void;
47
+ handleSortKeyDown($event: KeyboardEvent, column: IColumn | string, i: number): void;
41
48
  columnFilterEnabled(column: IColumn | string): boolean | ((column: import("../smart-table.type").IItem, value: string) => boolean);
42
49
  columnSorterEnabled(column: IColumn | string): boolean | ((a: import("../smart-table.type").IItem, b: import("../smart-table.type").IItem) => number);
43
50
  handleColumnFilterValueChange($event: {
@@ -48,6 +55,9 @@ export declare class SmartTableHeadComponent implements OnInit {
48
55
  handleSelectAllChecked($event: Event): void;
49
56
  getColumnFilter(column: IColumn | string): string;
50
57
  get columnFilterEvent(): 'change' | 'input';
58
+ getAriaSort(column: IColumn | string): "ascending" | "descending" | null;
51
59
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartTableHeadComponent, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableHeadComponent, "c-smart-table-head", never, { "columnFilter": { "alias": "columnFilter"; "required": false; }; "columnFilterState": { "alias": "columnFilterState"; "required": false; }; "columnSorter": { "alias": "columnSorter"; "required": false; }; "component": { "alias": "component"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "selectedAll": { "alias": "selectedAll"; "required": false; }; "sorterValue": { "alias": "sorterValue"; "required": false; }; "columnFilterTemplates": { "alias": "columnFilterTemplates"; "required": false; }; "summaryRowTemplate": { "alias": "summaryRowTemplate"; "required": false; }; }, { "columnFilterStateChange": "columnFilterStateChange"; "sorterStateChange": "sorterStateChange"; "selectAllChange": "selectAllChange"; }, never, never, true, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<SmartTableHeadComponent, "c-smart-table-head", never, { "columnFilter": { "alias": "columnFilter"; "required": false; }; "columnFilterState": { "alias": "columnFilterState"; "required": false; }; "columnSorter": { "alias": "columnSorter"; "required": false; }; "component": { "alias": "component"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "columnGroups": { "alias": "columnGroups"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "selectedAll": { "alias": "selectedAll"; "required": false; }; "showGroups": { "alias": "showGroups"; "required": false; }; "sorterValue": { "alias": "sorterValue"; "required": false; }; "columnFilterTemplates": { "alias": "columnFilterTemplates"; "required": false; }; "summaryRowTemplate": { "alias": "summaryRowTemplate"; "required": false; }; }, { "columnFilterStateChange": "columnFilterStateChange"; "sorterStateChange": "sorterStateChange"; "selectAllChange": "selectAllChange"; }, never, never, true, never>;
61
+ static ngAcceptInputType_selectAll: unknown;
62
+ static ngAcceptInputType_showGroups: unknown;
53
63
  }
@@ -1,4 +1,4 @@
1
- import { Colors } from '../coreui.types';
1
+ import { Colors, NgCssClass } from '../coreui.types';
2
2
  import { TemplateRef } from '@angular/core';
3
3
  import { ITable, ITableElementProps, ITableRowCellProps } from '../table/table.type';
4
4
  export interface ISmartTable {
@@ -42,7 +42,7 @@ export interface ISmartTable {
42
42
  * Object: item is object with following keys available as column configuration:
43
43
  * - key (required)(String) - define column name equal to item key.
44
44
  * - label (String) - define visible label of column. If not defined, label will be generated automatically based on column name, by converting kebab-case and snake_case to individual words and capitalization of each word.
45
- * - _classes (String/Array/Object) - adds classes to all cels in column
45
+ * - _classes (String/Array/Object) - adds classes to all cells in a column
46
46
  * - _style (String/Array/Object) - adds styles to the column header (useful for defining widths)
47
47
  * - sorter (Boolean) - disables sorting of the column when set to false
48
48
  * - filter (Boolean) - removes filter from column when set to false.
@@ -64,7 +64,7 @@ export interface ISmartTable {
64
64
  */
65
65
  footer?: boolean;
66
66
  /**
67
- * Set to false to remove table header.
67
+ * Set false to remove table header.
68
68
  * @default true
69
69
  */
70
70
  header?: boolean;
@@ -72,7 +72,7 @@ export interface ISmartTable {
72
72
  * Array of objects, where each object represents one item - row in table. Additionally, you can add style classes to each row by passing them by '_classes' key and to single cell by '_cellClasses'.
73
73
  *
74
74
  * Example item:
75
- * { name: 'John' , age: 12, _props: { color: 'success' }, _cellProps: { age: { className: 'fw-bold'}}}
75
+ * { name: 'John' , age: 12, _props: { color: 'success' }, _cellProps: { age: { class: 'fw-bold'}}}
76
76
  * For column generation description see columns prop.
77
77
  * @type Array<IItem>
78
78
  */
@@ -87,21 +87,17 @@ export interface ISmartTable {
87
87
  * Label for items per page selector.
88
88
  * @default 'Items per page:'
89
89
  * @type string
90
- * todo or remove?
91
90
  */
92
91
  itemsPerPageLabel?: string;
93
92
  /**
94
93
  * Items per page selector options.
95
94
  * @default [5, 10, 20, 50]
96
95
  * @type number[]
97
- * todo or remove?
98
96
  */
99
97
  itemsPerPageOptions?: number[];
100
98
  /**
101
99
  * Adds select element over table, which is used for control items per page in pagination.
102
100
  * If you want to customize this element, pass an object with optional values:
103
- * - label (String) - replaces default label text
104
- * - values (Array) - custom array of pagination values
105
101
  * - external (Boolean) - disables automatic 'itemsPerPage' change (use to change pages externally by 'pagination-change' event).
106
102
  */
107
103
  itemsPerPageSelect?: boolean | ItemsPerPageSelect;
@@ -130,7 +126,7 @@ export interface ISmartTable {
130
126
  */
131
127
  /**
132
128
  * Scoped columns.
133
- * @type ScopedColumns
129
+ // * @type ScopedColumns
134
130
  * todo or remove?
135
131
  */
136
132
  /**
@@ -164,15 +160,15 @@ export interface ISmartTable {
164
160
  */
165
161
  sortingIconDescending?: TemplateRef<any>;
166
162
  /**
167
- * Properties to `CTableBody` component.
163
+ * Properties to `TableBody` component.
168
164
  * @link https://coreui.io/angular/docs/components/table/#ctablebody
169
- * todo or remove?
170
165
  */
166
+ tableBodyProps?: ITableSectionProps;
171
167
  /**
172
- * Properties to `CTableFoot` component.
168
+ * Properties to `TableFoot` component.
173
169
  * @link https://coreui.io/angular/docs/components/table/#ctablefoot
174
- * todo or remove?
175
170
  */
171
+ tableFootProps?: ITableSectionProps;
176
172
  /**
177
173
  * When set, displays table filter above table, allowing filtering by specific column.
178
174
  *
@@ -203,14 +199,19 @@ export interface ISmartTable {
203
199
  /**
204
200
  * Properties to `CTableHead` component.
205
201
  * @link https://coreui.io/angular/docs/components/table/#ctablehead
206
- * todo or remove?
207
202
  */
203
+ tableHeadProps?: ITableSectionProps;
208
204
  /**
209
205
  * Properties to `CTable` component.
210
206
  * @link https://coreui.io/angular/docs/components/table/#ctable
211
207
  */
212
208
  tableProps?: ITable;
213
209
  }
210
+ export interface ITableSectionProps extends ITableElementProps {
211
+ align?: 'bottom' | 'middle' | 'top';
212
+ color?: Colors;
213
+ attributes?: Partial<HTMLTableSectionElement>;
214
+ }
214
215
  export interface IColumnFilter {
215
216
  lazy?: boolean;
216
217
  external?: boolean;
@@ -219,15 +220,32 @@ export interface IColumnFilterValue {
219
220
  [key: string]: any;
220
221
  }
221
222
  export interface IColumn {
223
+ children?: IColumn[];
222
224
  filter?: boolean | ((column: IItem, value: string) => boolean);
223
- label?: string;
225
+ group?: string;
224
226
  key: string;
227
+ label?: string;
225
228
  sorter?: boolean | ((a: IItem, b: IItem) => number);
226
- _style?: any;
229
+ _attr?: Partial<HTMLTableCellElement>;
230
+ _style?: Partial<CSSStyleDeclaration>;
227
231
  _props?: ITableHeaderCellProps;
228
- _classes?: string | string[] | Set<string> | {
229
- [klass: string]: any;
230
- };
232
+ _classes?: NgCssClass;
233
+ _colAttr?: Partial<HTMLTableColElement>;
234
+ _colStyle?: Partial<CSSStyleDeclaration>;
235
+ _colProps?: ITableRowCellProps;
236
+ _colClass?: NgCssClass;
237
+ }
238
+ export interface IGroup {
239
+ children?: IGroup[] | IColumn[];
240
+ colspan?: number;
241
+ deep?: number;
242
+ group?: string;
243
+ key: string;
244
+ label?: string;
245
+ _attr?: Partial<HTMLTableCellElement>;
246
+ _class?: NgCssClass;
247
+ _props?: ITableHeaderCellProps;
248
+ _style?: Partial<CSSStyleDeclaration>;
231
249
  }
232
250
  export interface ITableHeaderCellProps {
233
251
  /**
@@ -243,26 +261,27 @@ export interface ISorter {
243
261
  external?: boolean;
244
262
  }
245
263
  export interface IItem {
264
+ _attr?: Partial<HTMLTableRowElement>;
265
+ _class?: NgCssClass;
246
266
  _props?: ITableRowCellProps;
247
- _cellProps?: ITableCellProps;
267
+ _style?: Partial<CSSStyleDeclaration>;
268
+ _cellAttr?: ITableCellProps<HTMLTableCellElement>;
269
+ _cellClass?: ITableCellProps<NgCssClass>;
270
+ _cellProps?: ITableCellProps<ITableRowCellProps>;
271
+ _cellStyle?: ITableCellProps<CSSStyleDeclaration>;
248
272
  _selected?: boolean;
249
273
  _selectable?: boolean;
250
274
  [key: string]: number | string | any;
251
275
  }
252
- export interface ITableCellProps {
253
- _all?: ITableRowCellProps;
254
- _attributes?: {
255
- [key: string]: any;
256
- };
257
- [key: string]: ITableRowCellProps | undefined;
276
+ export interface ITableCellProps<T> {
277
+ _all?: Partial<T>;
278
+ [key: string]: Partial<T> | undefined;
258
279
  }
259
280
  export interface IItemInternal extends IItem {
260
- _id?: number;
281
+ ___id?: number;
261
282
  }
262
283
  export interface ItemsPerPageSelect {
263
284
  external?: boolean;
264
- label?: string;
265
- values?: Array<number>;
266
285
  }
267
286
  export interface ISorterValue {
268
287
  column?: string;
@@ -275,8 +294,4 @@ export interface ITableFilter {
275
294
  placeholder?: string;
276
295
  value?: string | number;
277
296
  }
278
- export interface ITableGroupProps extends ITableElementProps {
279
- attributes?: {
280
- [key: string]: any;
281
- };
282
- }
297
+ export type SortOrder = 'asc' | 'desc' | 0 | undefined;
@@ -0,0 +1,29 @@
1
+ import { IColumn, IGroup, IItem, ISorter } from './smart-table.type';
2
+ export declare const getClickedColumnName: (target: HTMLTextAreaElement, columnNames: string[], selectable: boolean) => string;
3
+ export declare const getColumnKey: (column: IColumn | string) => string;
4
+ export declare const getColumnLabel: (column: IColumn | string) => string;
5
+ export declare const getColumnName: (column: IColumn | string) => string;
6
+ export declare const getColumnNames: (columns: (string | IColumn)[] | undefined, items: IItem[]) => string[];
7
+ export declare const getColumns: (_columns: (IColumn | IGroup)[]) => (IColumn)[];
8
+ export declare const countColumns: (columns: IColumn[], counter?: number) => number;
9
+ export declare const getColumnGroups: (columns: (string | IColumn)[] | undefined) => IGroup[][];
10
+ export declare const getColumnNamesFromItems: (items: IItem[]) => string[];
11
+ export declare const getColumnValues: (items: IItem[], key: string) => any[];
12
+ export declare const convertNgClassToObj: (value: string | Set<string> | string[] | {
13
+ [klass: string]: any;
14
+ } | null | undefined) => {
15
+ [klass: string]: boolean;
16
+ };
17
+ export declare const getTableDataCellClass: (column: IColumn, item: IItem) => {
18
+ [x: string]: boolean;
19
+ };
20
+ export declare const getTableDataCellProps: (column: IColumn, item: IItem) => {};
21
+ export declare const getTableDataCellStyles: (column: IColumn, item: IItem) => Partial<CSSStyleDeclaration>;
22
+ export declare const getTableHeaderCellProps: (column: IColumn | string) => {
23
+ [key: string]: any;
24
+ };
25
+ export declare const getTableHeaderCellClass: (column: IColumn) => {
26
+ [x: string]: boolean;
27
+ };
28
+ export declare const getTableHeaderCellStyles: (column: IColumn, columnSorter: boolean | ISorter | undefined) => Partial<CSSStyleDeclaration>;
29
+ export declare const prettifyName: (name: string) => string;
@@ -51,9 +51,7 @@ export interface ITable {
51
51
  * @type boolean
52
52
  */
53
53
  striped?: boolean | string;
54
- attributes?: {
55
- [key: string]: any;
56
- };
54
+ attributes?: Partial<HTMLTableElement>;
57
55
  }
58
56
  export interface ITableElementProps {
59
57
  /**
@@ -66,9 +64,8 @@ export interface ITableElementProps {
66
64
  * @type Colors
67
65
  */
68
66
  color?: Colors;
69
- _attributes?: {
70
- [key: string]: any;
71
- };
67
+ /** @deprecated */
68
+ _attributes?: Partial<HTMLTableElement>;
72
69
  }
73
70
  export interface ITableRowCellProps extends ITableElementProps {
74
71
  /**
@@ -76,4 +73,6 @@ export interface ITableRowCellProps extends ITableElementProps {
76
73
  @type boolean
77
74
  */
78
75
  active?: boolean;
76
+ /** @deprecated */
77
+ _attributes?: Partial<HTMLTableCellElement> | Partial<HTMLTableRowElement>;
79
78
  }
@@ -32,8 +32,9 @@ export declare class TimePickerRollAmPmComponent implements OnChanges, AfterView
32
32
  ngAfterViewInit(): void;
33
33
  ngOnChanges(changes: SimpleChanges): void;
34
34
  scrollToElement(element: any): void;
35
- handleElementClick($event: MouseEvent, element: any): void;
36
35
  trackByElement(index: number, element: IDayPeriod): string;
36
+ handleElementClick($event: MouseEvent, element: any): void;
37
+ handleElementKeyDown($event: KeyboardEvent, element: IDayPeriod): void;
37
38
  static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerRollAmPmComponent, never>;
38
39
  static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerRollAmPmComponent, "c-time-picker-roll-am-pm", never, { "disabled": { "alias": "disabled"; "required": false; }; "elements": { "alias": "elements"; "required": false; }; "onClick": { "alias": "onClick"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "refresh": { "alias": "refresh"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>;
39
40
  }
@@ -14,9 +14,9 @@ export declare class TimeElementDirective {
14
14
  static ɵdir: i0.ɵɵDirectiveDeclaration<TimeElementDirective, "[cTimeElement]", ["cTimeElement"], { "cTimeElement": { "alias": "cTimeElement"; "required": false; }; }, {}, never, never, true, never>;
15
15
  }
16
16
  export declare class TimePickerRollColComponent implements ITimePickerRollCol, OnChanges, AfterViewInit {
17
+ #private;
17
18
  elementRef: ElementRef;
18
19
  constructor(elementRef: ElementRef);
19
- private init;
20
20
  disabled: boolean;
21
21
  elements: ITimeValue[];
22
22
  onClick?: (value: number | string) => void;
@@ -31,8 +31,9 @@ export declare class TimePickerRollColComponent implements ITimePickerRollCol, O
31
31
  ngAfterViewInit(): void;
32
32
  ngOnChanges(changes: SimpleChanges): void;
33
33
  scrollToElement(element: any): void;
34
- handleElementClick($event: MouseEvent, element: any): void;
35
34
  trackByElement(index: number, element: ITimeValue): number;
35
+ handleElementClick($event: MouseEvent, element: any): void;
36
+ handleElementKeyDown($event: KeyboardEvent, element: ITimeValue): void;
36
37
  static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerRollColComponent, never>;
37
38
  static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerRollColComponent, "c-time-picker-roll-col", ["cTimePickerRollCol"], { "disabled": { "alias": "disabled"; "required": false; }; "elements": { "alias": "elements"; "required": false; }; "onClick": { "alias": "onClick"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "refresh": { "alias": "refresh"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>;
38
39
  }
@@ -1,26 +1,17 @@
1
1
  import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnInit, QueryList, SimpleChanges } from '@angular/core';
2
2
  import { ControlValueAccessor, FormControl, FormGroup } from '@angular/forms';
3
- import { BooleanInput } from '@angular/cdk/coercion';
4
3
  import { DateTimeFormatOptions, DayPeriod, ITimeValue } from './time.utils';
5
4
  import { TemplateIdDirective } from '../shared';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class TimePickerComponent implements OnChanges, OnInit, ControlValueAccessor, AfterViewInit {
8
7
  #private;
9
8
  constructor();
10
- static ngAcceptInputType_cleaner: BooleanInput;
11
- static ngAcceptInputType_disabled: BooleanInput;
12
- static ngAcceptInputType_indicator: BooleanInput;
13
- static ngAcceptInputType_inputReadOnly: BooleanInput;
14
- static ngAcceptInputType_seconds: BooleanInput;
15
- static ngAcceptInputType_visible: BooleanInput;
16
9
  /**
17
10
  * Toggle visibility or set the content of the cleaner button.
18
11
  * @type boolean
19
12
  * @default true
20
13
  */
21
- set cleaner(value: boolean);
22
- get cleaner(): boolean;
23
- private _cleaner;
14
+ cleaner: boolean;
24
15
  /**
25
16
  * Sets DateTime format options including timeZone
26
17
  * @type DateTimeFormatOptions
@@ -33,9 +24,7 @@ export declare class TimePickerComponent implements OnChanges, OnInit, ControlVa
33
24
  * @type boolean
34
25
  * @default false
35
26
  */
36
- set disabled(value: boolean);
37
- get disabled(): boolean;
38
- private _disabled;
27
+ disabled: boolean;
39
28
  /**
40
29
  * Filter available hours to pick.
41
30
  * @type (value: number) => boolean;
@@ -59,17 +48,13 @@ export declare class TimePickerComponent implements OnChanges, OnInit, ControlVa
59
48
  * @type boolean
60
49
  * @default true
61
50
  */
62
- set indicator(value: boolean);
63
- get indicator(): boolean;
64
- private _indicator;
51
+ indicator: boolean;
65
52
  /**
66
53
  * Toggle the readonly state for the component.
67
54
  * @type boolean
68
55
  * @default false
69
56
  */
70
- set inputReadOnly(value: boolean);
71
- get inputReadOnly(): boolean;
72
- private _inputReadOnly;
57
+ inputReadOnly: boolean;
73
58
  /**
74
59
  * Sets the default locale for components. If not set, it is inherited from the browser.
75
60
  * @type string
@@ -87,9 +72,7 @@ export declare class TimePickerComponent implements OnChanges, OnInit, ControlVa
87
72
  * @type boolean
88
73
  * @default false
89
74
  */
90
- set seconds(value: boolean);
91
- get seconds(): boolean;
92
- private _seconds;
75
+ seconds: boolean;
93
76
  /**
94
77
  * Size the component small or large.
95
78
  * @type 'sm' | 'lg' | undefined
@@ -122,9 +105,7 @@ export declare class TimePickerComponent implements OnChanges, OnInit, ControlVa
122
105
  * @type boolean
123
106
  * @default false
124
107
  */
125
- set visible(value: boolean);
126
- get visible(): boolean;
127
- private _visible;
108
+ visible: boolean;
128
109
  timeChange: EventEmitter<Date | undefined>;
129
110
  onBlur(): void;
130
111
  dropdownRef: ElementRef;
@@ -139,13 +120,17 @@ export declare class TimePickerComponent implements OnChanges, OnInit, ControlVa
139
120
  value: string;
140
121
  label: string;
141
122
  }[];
123
+ getListOfHours12(): ITimeValue[];
142
124
  set timeInputValue(value: string);
143
125
  get timeInputValue(): string;
144
126
  private _timeInputValue;
145
127
  get timePickerClasses(): {
128
+ [x: string]: boolean;
129
+ 'time-picker': boolean;
146
130
  'form-control': boolean;
147
131
  'is-valid': boolean;
148
132
  'is-invalid': boolean;
133
+ disabled: boolean;
149
134
  };
150
135
  selectTime: FormGroup<{
151
136
  selectHours: FormControl<number | null>;
@@ -177,9 +162,7 @@ export declare class TimePickerComponent implements OnChanges, OnInit, ControlVa
177
162
  closestTime(timeArray: ITimeValue[], timeSegment: number): ITimeValue;
178
163
  listOfTimeSegments(getListOfTimeSegments: (locale: string, dateTimeFormatOptions: DateTimeFormatOptions) => ITimeValue[], filterTimeSegments: ((timeSegmentValue: number) => boolean) | undefined): ITimeValue[];
179
164
  handleSelectDayPeriodChange(dayPeriod: DayPeriod): void;
180
- handleSelectHoursChange(hour: number): void;
181
- handleSelectMinutesChange(minute: number): void;
182
- handleSelectSecondsChange(second: number): void;
165
+ handleSelectTimeChange(value: number, segment: 'hour' | 'minute' | 'second'): void;
183
166
  patchSelectTimeValues(): void;
184
167
  trackByHour(index: number, hour: ITimeValue): ITimeValue;
185
168
  onChange: (value: Date | undefined) => void;
@@ -195,4 +178,10 @@ export declare class TimePickerComponent implements OnChanges, OnInit, ControlVa
195
178
  setChangeHandlers(): void;
196
179
  static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerComponent, never>;
197
180
  static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerComponent, "c-time-picker", ["cTimePicker"], { "cleaner": { "alias": "cleaner"; "required": false; }; "dateTimeFormatOptions": { "alias": "dateTimeFormatOptions"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "filterHours": { "alias": "filterHours"; "required": false; }; "filterMinutes": { "alias": "filterMinutes"; "required": false; }; "filterSeconds": { "alias": "filterSeconds"; "required": false; }; "indicator": { "alias": "indicator"; "required": false; }; "inputReadOnly": { "alias": "inputReadOnly"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "seconds": { "alias": "seconds"; "required": false; }; "size": { "alias": "size"; "required": false; }; "time": { "alias": "time"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "valid": { "alias": "valid"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; }, { "timeChange": "timeChange"; }, ["contentTemplates"], never, true, never>;
181
+ static ngAcceptInputType_cleaner: unknown;
182
+ static ngAcceptInputType_disabled: unknown;
183
+ static ngAcceptInputType_indicator: unknown;
184
+ static ngAcceptInputType_inputReadOnly: unknown;
185
+ static ngAcceptInputType_seconds: unknown;
186
+ static ngAcceptInputType_visible: unknown;
198
187
  }
@@ -23,7 +23,7 @@ export declare class WidgetStatAComponent implements AfterContentInit {
23
23
  get hostClasses(): {
24
24
  [x: string]: boolean;
25
25
  card: boolean;
26
- 'text-high-emphasis-inverse': boolean;
26
+ 'text-white': boolean;
27
27
  };
28
28
  get bodyClasses(): {
29
29
  'pb-0': boolean;