@coreui/angular-pro 4.0.0-alpha.8 → 4.0.0-alpha.9
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.
- package/README.md +11 -11
- package/esm2020/lib/accordion/accordion/accordion.component.mjs +3 -3
- package/esm2020/lib/accordion/accordion-button/accordion-button.directive.mjs +3 -3
- package/esm2020/lib/accordion/accordion-item/accordion-item.component.mjs +3 -3
- package/esm2020/lib/accordion/accordion.module.mjs +4 -4
- package/esm2020/lib/accordion/accordion.service.mjs +3 -3
- package/esm2020/lib/alert/alert-heading.directive.mjs +3 -3
- package/esm2020/lib/alert/alert-link.directive.mjs +3 -3
- package/esm2020/lib/alert/alert.component.mjs +3 -3
- package/esm2020/lib/alert/alert.module.mjs +4 -4
- package/esm2020/lib/avatar/avatar.component.mjs +3 -3
- package/esm2020/lib/avatar/avatar.module.mjs +4 -4
- package/esm2020/lib/backdrop/backdrop.service.mjs +3 -3
- package/esm2020/lib/badge/badge.component.mjs +3 -3
- package/esm2020/lib/badge/badge.module.mjs +4 -4
- package/esm2020/lib/breadcrumb/breadcrumb/breadcrumb.component.mjs +3 -3
- package/esm2020/lib/breadcrumb/breadcrumb-item/breadcrumb-item.component.mjs +3 -3
- package/esm2020/lib/breadcrumb/breadcrumb-router/breadcrumb-router.component.mjs +3 -3
- package/esm2020/lib/breadcrumb/breadcrumb-router/breadcrumb-router.service.mjs +4 -4
- package/esm2020/lib/breadcrumb/breadcrumb.module.mjs +4 -4
- package/esm2020/lib/button/button-close.directive.mjs +3 -3
- package/esm2020/lib/button/button.directive.mjs +3 -3
- package/esm2020/lib/button/button.module.mjs +4 -4
- package/esm2020/lib/button-group/button-group/button-group.component.mjs +3 -3
- package/esm2020/lib/button-group/button-group.module.mjs +4 -4
- package/esm2020/lib/button-group/button-toolbar/button-toolbar.component.mjs +3 -3
- package/esm2020/lib/callout/callout.component.mjs +3 -3
- package/esm2020/lib/callout/callout.module.mjs +4 -4
- package/esm2020/lib/card/card-body.component.mjs +3 -3
- package/esm2020/lib/card/card-footer.component.mjs +3 -3
- package/esm2020/lib/card/card-group.component.mjs +3 -3
- package/esm2020/lib/card/card-header-actions.component.mjs +3 -3
- package/esm2020/lib/card/card-header.component.mjs +3 -3
- package/esm2020/lib/card/card-img-overlay/card-img-overlay.component.mjs +3 -3
- package/esm2020/lib/card/card-img.directive.mjs +3 -3
- package/esm2020/lib/card/card-link.directive.mjs +3 -3
- package/esm2020/lib/card/card-subtitle.directive.mjs +3 -3
- package/esm2020/lib/card/card-text.directive.mjs +3 -3
- package/esm2020/lib/card/card-title.directive.mjs +3 -3
- package/esm2020/lib/card/card.component.mjs +3 -3
- package/esm2020/lib/card/card.module.mjs +4 -4
- package/esm2020/lib/carousel/carousel/carousel.component.mjs +3 -3
- package/esm2020/lib/carousel/carousel-caption/carousel-caption.component.mjs +3 -3
- package/esm2020/lib/carousel/carousel-control/carousel-control.component.mjs +3 -3
- package/esm2020/lib/carousel/carousel-indicators/carousel-indicators.component.mjs +3 -3
- package/esm2020/lib/carousel/carousel-inner/carousel-inner.component.mjs +3 -3
- package/esm2020/lib/carousel/carousel-item/carousel-item.component.mjs +3 -3
- package/esm2020/lib/carousel/carousel-state.mjs +3 -3
- package/esm2020/lib/carousel/carousel.config.mjs +3 -3
- package/esm2020/lib/carousel/carousel.module.mjs +4 -4
- package/esm2020/lib/carousel/carousel.service.mjs +3 -3
- package/esm2020/lib/collapse/collapse.animations.mjs +1 -1
- package/esm2020/lib/collapse/collapse.directive.mjs +11 -6
- package/esm2020/lib/collapse/collapse.module.mjs +4 -4
- package/esm2020/lib/dropdown/dropdown/dropdown.component.mjs +6 -6
- package/esm2020/lib/dropdown/dropdown-divider/dropdown-divider.directive.mjs +3 -3
- package/esm2020/lib/dropdown/dropdown-header/dropdown-header.directive.mjs +3 -3
- package/esm2020/lib/dropdown/dropdown-item/dropdown-item-plain.directive.mjs +3 -3
- package/esm2020/lib/dropdown/dropdown-item/dropdown-item.directive.mjs +3 -3
- package/esm2020/lib/dropdown/dropdown-menu/dropdown-menu.directive.mjs +3 -3
- package/esm2020/lib/dropdown/dropdown.module.mjs +4 -4
- package/esm2020/lib/dropdown/dropdown.service.mjs +3 -3
- package/esm2020/lib/element-cover/element-cover.component.mjs +71 -0
- package/esm2020/lib/element-cover/element-cover.module.mjs +30 -0
- package/esm2020/lib/element-cover/index.mjs +2 -0
- package/esm2020/lib/element-cover/public_api.mjs +3 -0
- package/esm2020/lib/footer/footer.component.mjs +3 -3
- package/esm2020/lib/footer/footer.module.mjs +4 -4
- package/esm2020/lib/form/form/form.directive.mjs +3 -3
- package/esm2020/lib/form/form-check/form-check-input.directive.mjs +7 -4
- package/esm2020/lib/form/form-check/form-check-label.directive.mjs +3 -3
- package/esm2020/lib/form/form-check/form-check.component.mjs +3 -3
- package/esm2020/lib/form/form-control/form-control.directive.mjs +3 -3
- package/esm2020/lib/form/form-feedback/form-feedback.component.mjs +3 -3
- package/esm2020/lib/form/form-floating/form-floating.directive.mjs +3 -3
- package/esm2020/lib/form/form-label/form-label.directive.mjs +3 -3
- package/esm2020/lib/form/form-select/form-select.directive.mjs +3 -3
- package/esm2020/lib/form/form-text/form-text.directive.mjs +3 -3
- package/esm2020/lib/form/form.module.mjs +4 -4
- package/esm2020/lib/form/input-group/input-group.component.mjs +3 -3
- package/esm2020/lib/form/input-group-text/input-group-text.directive.mjs +3 -3
- package/esm2020/lib/grid/col.component.mjs +3 -3
- package/esm2020/lib/grid/col.directive.mjs +3 -3
- package/esm2020/lib/grid/container.component.mjs +3 -3
- package/esm2020/lib/grid/grid.module.mjs +4 -4
- package/esm2020/lib/grid/gutter.directive.mjs +3 -3
- package/esm2020/lib/grid/row.component.mjs +3 -3
- package/esm2020/lib/grid/row.directive.mjs +3 -3
- package/esm2020/lib/header/header/header.component.mjs +3 -3
- package/esm2020/lib/header/header-brand/header-brand.component.mjs +3 -3
- package/esm2020/lib/header/header-divider/header-divider.component.mjs +3 -3
- package/esm2020/lib/header/header-nav/header-nav.component.mjs +3 -3
- package/esm2020/lib/header/header-text/header-text.component.mjs +3 -3
- package/esm2020/lib/header/header-toggler/header-toggler.directive.mjs +3 -3
- package/esm2020/lib/header/header.module.mjs +4 -4
- package/esm2020/lib/image/img.directive.mjs +3 -3
- package/esm2020/lib/image/img.module.mjs +4 -4
- package/esm2020/lib/list-group/list-group-item.directive.mjs +3 -3
- package/esm2020/lib/list-group/list-group.directive.mjs +3 -3
- package/esm2020/lib/list-group/list-group.module.mjs +4 -4
- package/esm2020/lib/loading-button/loading-button.component.mjs +3 -3
- package/esm2020/lib/loading-button/loading-button.module.mjs +4 -4
- package/esm2020/lib/modal/modal/modal.component.mjs +3 -3
- package/esm2020/lib/modal/modal-body/modal-body.component.mjs +3 -3
- package/esm2020/lib/modal/modal-content/modal-content.component.mjs +3 -3
- package/esm2020/lib/modal/modal-dialog/modal-dialog.component.mjs +3 -3
- package/esm2020/lib/modal/modal-dismiss/modal-toggle.directive.mjs +3 -3
- package/esm2020/lib/modal/modal-footer/modal-footer.component.mjs +3 -3
- package/esm2020/lib/modal/modal-header/modal-header.component.mjs +3 -3
- package/esm2020/lib/modal/modal-title/modal-title.directive.mjs +3 -3
- package/esm2020/lib/modal/modal.module.mjs +4 -4
- package/esm2020/lib/modal/modal.service.mjs +3 -3
- package/esm2020/lib/multi-select/multi-select/multi-select.component.mjs +3 -3
- package/esm2020/lib/multi-select/multi-select-native-select/multi-select-native-select.component.mjs +3 -3
- package/esm2020/lib/multi-select/multi-select-optgroup/multi-select-optgroup-label.component.mjs +3 -3
- package/esm2020/lib/multi-select/multi-select-optgroup/multi-select-optgroup.component.mjs +3 -3
- package/esm2020/lib/multi-select/multi-select-option/multi-select-option.component.mjs +3 -3
- package/esm2020/lib/multi-select/multi-select-tag/multi-select-tag.component.mjs +3 -3
- package/esm2020/lib/multi-select/multi-select.module.mjs +4 -4
- package/esm2020/lib/multi-select/multi-select.service.mjs +3 -3
- package/esm2020/lib/nav/nav-item.component.mjs +3 -3
- package/esm2020/lib/nav/nav-link.directive.mjs +3 -3
- package/esm2020/lib/nav/nav.component.mjs +5 -5
- package/esm2020/lib/nav/nav.module.mjs +4 -4
- package/esm2020/lib/navbar/navbar-brand/navbar-brand.directive.mjs +3 -3
- package/esm2020/lib/navbar/navbar-nav/navbar-nav.component.mjs +3 -3
- package/esm2020/lib/navbar/navbar-text/navbar-text.component.mjs +3 -3
- package/esm2020/lib/navbar/navbar-toggler/navbar-toggler.directive.mjs +3 -3
- package/esm2020/lib/navbar/navbar.component.mjs +3 -3
- package/esm2020/lib/navbar/navbar.module.mjs +4 -4
- package/esm2020/lib/offcanvas/offcanvas/offcanvas.component.mjs +3 -3
- package/esm2020/lib/offcanvas/offcanvas-body/offcanvas-body.component.mjs +3 -3
- package/esm2020/lib/offcanvas/offcanvas-header/offcanvas-header.component.mjs +3 -3
- package/esm2020/lib/offcanvas/offcanvas-title/offcanvas-title.directive.mjs +3 -3
- package/esm2020/lib/offcanvas/offcanvas-toggle/offcanvas-toggle.directive.mjs +3 -3
- package/esm2020/lib/offcanvas/offcanvas.module.mjs +4 -4
- package/esm2020/lib/offcanvas/offcanvas.service.mjs +3 -3
- package/esm2020/lib/pagination/page-item/page-item.component.mjs +3 -3
- package/esm2020/lib/pagination/page-item/page-item.directive.mjs +3 -3
- package/esm2020/lib/pagination/page-link/page-link.directive.mjs +3 -3
- package/esm2020/lib/pagination/pagination/pagination.component.mjs +3 -3
- package/esm2020/lib/pagination/pagination.module.mjs +5 -5
- package/esm2020/lib/pagination/public_api.mjs +1 -1
- package/esm2020/lib/popover/popover/popover.component.mjs +3 -3
- package/esm2020/lib/popover/popover.directive.mjs +3 -3
- package/esm2020/lib/popover/popover.module.mjs +4 -4
- package/esm2020/lib/progress/progress-bar.component.mjs +3 -3
- package/esm2020/lib/progress/progress.component.mjs +3 -3
- package/esm2020/lib/progress/progress.module.mjs +4 -4
- package/esm2020/lib/services/class-toggle.service.mjs +3 -3
- package/esm2020/lib/services/listeners.service.mjs +3 -3
- package/esm2020/lib/shared/html-attr.directive.mjs +3 -3
- package/esm2020/lib/shared/shared.module.mjs +4 -4
- package/esm2020/lib/shared/template-id.directive.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar/sidebar.component.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-backdrop/sidebar-backdrop.service.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-brand/sidebar-brand.component.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-footer/sidebar-footer.component.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-header/sidebar-header.component.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav-badge.pipe.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav-divider.component.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav-icon.pipe.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav-item-class.pipe.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav-label.component.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav-link.component.mjs +6 -6
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav-link.pipe.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav-title.component.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav.component.mjs +6 -6
- package/esm2020/lib/sidebar/sidebar-nav/sidebar-nav.service.mjs +6 -6
- package/esm2020/lib/sidebar/sidebar-toggle/sidebar-toggle.directive.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar-toggler/sidebar-toggler.component.mjs +3 -3
- package/esm2020/lib/sidebar/sidebar.module.mjs +4 -4
- package/esm2020/lib/sidebar/sidebar.service.mjs +3 -3
- package/esm2020/lib/smart-pagination/index.mjs +2 -0
- package/esm2020/lib/smart-pagination/public_api.mjs +3 -0
- package/esm2020/lib/smart-pagination/smart-pagination.component.mjs +196 -0
- package/esm2020/lib/smart-pagination/smart-pagination.module.mjs +30 -0
- package/esm2020/lib/smart-pagination/smart-pagination.type.mjs +2 -0
- package/esm2020/lib/smart-table/index.mjs +2 -0
- package/esm2020/lib/smart-table/public_api.mjs +3 -0
- package/esm2020/lib/smart-table/smart-table/smart-table.component.mjs +445 -0
- package/esm2020/lib/smart-table/smart-table-filter/smart-table-filter.component.mjs +46 -0
- package/esm2020/lib/smart-table/smart-table-head/smart-table-head.component.mjs +138 -0
- package/esm2020/lib/smart-table/smart-table-items-per-page-selector/smart-table-items-per-page-selector.component.mjs +46 -0
- package/esm2020/lib/smart-table/smart-table.module.mjs +72 -0
- package/esm2020/lib/smart-table/smart-table.type.mjs +2 -0
- package/esm2020/lib/spinner/spinner.component.mjs +3 -3
- package/esm2020/lib/spinner/spinner.module.mjs +4 -4
- package/esm2020/lib/table/table-active.directive.mjs +3 -3
- package/esm2020/lib/table/table-color.directive.mjs +3 -3
- package/esm2020/lib/table/table.directive.mjs +5 -5
- package/esm2020/lib/table/table.module.mjs +4 -4
- package/esm2020/lib/table/table.type.mjs +2 -0
- package/esm2020/lib/tabs/tab-content/tab-content.component.mjs +3 -3
- package/esm2020/lib/tabs/tab-content-ref.directive.mjs +3 -3
- package/esm2020/lib/tabs/tab-pane/tab-pane.component.mjs +3 -3
- package/esm2020/lib/tabs/tab.service.mjs +3 -3
- package/esm2020/lib/tabs/tabs.module.mjs +4 -4
- package/esm2020/lib/toast/toast/toast.component.mjs +3 -3
- package/esm2020/lib/toast/toast-body/toast-body.component.mjs +3 -3
- package/esm2020/lib/toast/toast-close.directive.mjs +3 -3
- package/esm2020/lib/toast/toast-header/toast-header.component.mjs +3 -3
- package/esm2020/lib/toast/toast.module.mjs +4 -4
- package/esm2020/lib/toast/toaster/toaster-host.directive.mjs +3 -3
- package/esm2020/lib/toast/toaster/toaster.component.mjs +3 -3
- package/esm2020/lib/toast/toaster/toaster.service.mjs +3 -3
- package/esm2020/lib/tooltip/tooltip/tooltip.component.mjs +3 -3
- package/esm2020/lib/tooltip/tooltip.directive.mjs +3 -3
- package/esm2020/lib/tooltip/tooltip.module.mjs +4 -4
- package/esm2020/lib/utilities/align.directive.mjs +3 -3
- package/esm2020/lib/utilities/bg-color.directive.mjs +3 -3
- package/esm2020/lib/utilities/border.directive.mjs +3 -3
- package/esm2020/lib/utilities/rounded.directive.mjs +3 -3
- package/esm2020/lib/utilities/text-color.directive.mjs +3 -3
- package/esm2020/lib/utilities/utilities.module.mjs +4 -4
- package/esm2020/lib/widget/widget-stat-a/widget-stat-a.component.mjs +3 -3
- package/esm2020/lib/widget/widget-stat-b/widget-stat-b.component.mjs +3 -3
- package/esm2020/lib/widget/widget-stat-c/widget-stat-c.component.mjs +3 -3
- package/esm2020/lib/widget/widget-stat-d/widget-stat-d.component.mjs +3 -3
- package/esm2020/lib/widget/widget-stat-e/widget-stat-e.component.mjs +3 -3
- package/esm2020/lib/widget/widget-stat-f/widget-stat-f.component.mjs +3 -3
- package/esm2020/lib/widget/widget.module.mjs +4 -4
- package/esm2020/public-api.mjs +5 -2
- package/fesm2015/coreui-angular-pro.mjs +2013 -997
- package/fesm2015/coreui-angular-pro.mjs.map +1 -1
- package/fesm2020/coreui-angular-pro.mjs +2021 -1010
- package/fesm2020/coreui-angular-pro.mjs.map +1 -1
- package/lib/collapse/collapse.directive.d.ts +3 -2
- package/lib/element-cover/element-cover.component.d.ts +27 -0
- package/lib/element-cover/element-cover.module.d.ts +9 -0
- package/lib/element-cover/index.d.ts +1 -0
- package/lib/element-cover/public_api.d.ts +2 -0
- package/lib/smart-pagination/index.d.ts +1 -0
- package/lib/smart-pagination/public_api.d.ts +2 -0
- package/lib/smart-pagination/smart-pagination.component.d.ts +109 -0
- package/lib/smart-pagination/smart-pagination.module.d.ts +9 -0
- package/lib/smart-pagination/smart-pagination.type.d.ts +79 -0
- package/lib/smart-table/index.d.ts +1 -0
- package/lib/smart-table/public_api.d.ts +2 -0
- package/lib/smart-table/smart-table/smart-table.component.d.ts +124 -0
- package/lib/smart-table/smart-table-filter/smart-table-filter.component.d.ts +14 -0
- package/lib/smart-table/smart-table-head/smart-table-head.component.d.ts +36 -0
- package/lib/smart-table/smart-table-items-per-page-selector/smart-table-items-per-page-selector.component.d.ts +14 -0
- package/lib/smart-table/smart-table.module.d.ts +20 -0
- package/lib/smart-table/smart-table.type.d.ts +272 -0
- package/lib/table/table.directive.d.ts +3 -2
- package/lib/table/table.type.d.ts +76 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -1
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { Colors } from '../coreui.types';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { ITable, ITableElementProps, ITableRowCellProps } from '../table/table.type';
|
|
4
|
+
export interface ISmartTable {
|
|
5
|
+
/**
|
|
6
|
+
* Sets active page. If 'pagination' prop is enabled, activePage is set only initially.
|
|
7
|
+
* @type number
|
|
8
|
+
* @default 1
|
|
9
|
+
*/
|
|
10
|
+
activePage?: number;
|
|
11
|
+
/**
|
|
12
|
+
* When set, displays table cleaner above table, next to the table filter (or in place of table filter if `tableFilter` prop is not set)
|
|
13
|
+
* Cleaner resets `tableFilterValue`, `columnFilterValue`, `sorterValue`.
|
|
14
|
+
* If clean is possible it is clickable (`tabIndex="0"` `role="button"`, `color="danger"`), otherwise it is not clickable and transparent.
|
|
15
|
+
* Cleaner can be customized through the `cleaner` slot.
|
|
16
|
+
* @type boolean
|
|
17
|
+
*/
|
|
18
|
+
cleaner?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Style table items as clickable.
|
|
21
|
+
* @type boolean
|
|
22
|
+
*/
|
|
23
|
+
clickableRows?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* When set, displays additional filter row between table header and items, allowing filtering by specific column.
|
|
26
|
+
* Column filter can be customized, by passing prop as object with additional options as keys. Available options:
|
|
27
|
+
* - external (Boolean) - Disables automatic filtering inside component.
|
|
28
|
+
* - lazy (Boolean) - Set to true to trigger filter updates only on change event.
|
|
29
|
+
* @type boolean | ColumnFilter
|
|
30
|
+
*/
|
|
31
|
+
columnFilter?: boolean | IColumnFilter;
|
|
32
|
+
/**
|
|
33
|
+
* Value of table filter. To set pass object where keys are column names and values are filter strings e.g.:
|
|
34
|
+
* { user: 'John', age: 12 }
|
|
35
|
+
*/
|
|
36
|
+
columnFilterValue?: IColumnFilterValue;
|
|
37
|
+
/**
|
|
38
|
+
* Prop for table columns configuration. If prop is not defined, table will display columns based on the first item keys, omitting keys that begin with underscore (e.g. '_classes')
|
|
39
|
+
*
|
|
40
|
+
* In columns prop each array item represents one column. Item might be specified in two ways:
|
|
41
|
+
* String: each item define column name equal to item value.
|
|
42
|
+
* Object: item is object with following keys available as column configuration:
|
|
43
|
+
* - key (required)(String) - define column name equal to item key.
|
|
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
|
|
46
|
+
* - _style (String/Array/Object) - adds styles to the column header (useful for defining widths)
|
|
47
|
+
* - sorter (Boolean) - disables sorting of the column when set to false
|
|
48
|
+
* - filter (Boolean) - removes filter from column when set to false.
|
|
49
|
+
*/
|
|
50
|
+
columns?: (string | IColumn)[];
|
|
51
|
+
/**
|
|
52
|
+
* Enables table sorting by column value. Sorting will be performed correctly if values in column are one of type: string (case-insensitive) or number.
|
|
53
|
+
*
|
|
54
|
+
* Sorter can be customized, by passing prop as object with additional options as keys. Available options:
|
|
55
|
+
* - external (Boolean) - Disables automatic sorting inside component.
|
|
56
|
+
* - resetable (Boolean) - If set to true clicking on sorter have three states: ascending, descending and null. That means that third click on sorter will reset sorting, and restore table to original order.
|
|
57
|
+
* @type boolean | Sorter
|
|
58
|
+
*/
|
|
59
|
+
columnSorter?: boolean | ISorter;
|
|
60
|
+
/**
|
|
61
|
+
* Displays table footer, which mirrors table header. (without column filter).
|
|
62
|
+
* @default false
|
|
63
|
+
* @type boolean
|
|
64
|
+
*/
|
|
65
|
+
footer?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Set to false to remove table header.
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
70
|
+
header?: boolean;
|
|
71
|
+
/**
|
|
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
|
+
*
|
|
74
|
+
* Example item:
|
|
75
|
+
* { name: 'John' , age: 12, _props: { color: 'success' }, _cellProps: { age: { className: 'fw-bold'}}}
|
|
76
|
+
* For column generation description see columns prop.
|
|
77
|
+
* @type Array<IItem>
|
|
78
|
+
*/
|
|
79
|
+
items?: IItem[];
|
|
80
|
+
/**
|
|
81
|
+
* Number of items per site, when pagination is enabled.
|
|
82
|
+
* @default 10
|
|
83
|
+
* @type number
|
|
84
|
+
*/
|
|
85
|
+
itemsPerPage?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Label for items per page selector.
|
|
88
|
+
* @default 'Items per page:'
|
|
89
|
+
* @type string
|
|
90
|
+
* todo or remove?
|
|
91
|
+
*/
|
|
92
|
+
itemsPerPageLabel?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Items per page selector options.
|
|
95
|
+
* @default [5, 10, 20, 50]
|
|
96
|
+
* @type number[]
|
|
97
|
+
* todo or remove?
|
|
98
|
+
*/
|
|
99
|
+
itemsPerPageOptions?: number[];
|
|
100
|
+
/**
|
|
101
|
+
* Adds select element over table, which is used for control items per page in pagination.
|
|
102
|
+
* 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
|
+
* - external (Boolean) - disables automatic 'itemsPerPage' change (use to change pages externally by 'pagination-change' event).
|
|
106
|
+
*/
|
|
107
|
+
itemsPerPageSelect?: boolean | ItemsPerPageSelect;
|
|
108
|
+
/**
|
|
109
|
+
* When set, table will have loading style: loading spinner and reduced opacity.
|
|
110
|
+
* When 'small' prop is enabled spinner will be also smaller.
|
|
111
|
+
* @type boolean
|
|
112
|
+
*/
|
|
113
|
+
loading?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* ReactNode or string for passing custom noItemsLabel texts.
|
|
116
|
+
* @default 'No items found'
|
|
117
|
+
*/
|
|
118
|
+
noItemsLabel?: string | TemplateRef<any>;
|
|
119
|
+
/**
|
|
120
|
+
* Enables default pagination. Set to true for default setup or pass an object with additional CPagination props.
|
|
121
|
+
* Default pagination will always have the computed number of pages that cannot be changed.
|
|
122
|
+
* The number of pages is generated based on the number of passed items and 'itemsPerPage' prop.
|
|
123
|
+
* If this restriction is an obstacle, you can make external CPagination instead.
|
|
124
|
+
*/
|
|
125
|
+
pagination?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Properties to `CSmartPagination` component.
|
|
128
|
+
* @link https://coreui.io/react/docs/4.0/components/smart-pagination#csmartpagination
|
|
129
|
+
* todo or remove?
|
|
130
|
+
*/
|
|
131
|
+
/**
|
|
132
|
+
* Scoped columns.
|
|
133
|
+
* @type ScopedColumns
|
|
134
|
+
* todo or remove?
|
|
135
|
+
*/
|
|
136
|
+
/**
|
|
137
|
+
* Add checkboxes to make table rows selectable.
|
|
138
|
+
* @type boolean
|
|
139
|
+
*/
|
|
140
|
+
selectable?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* State of the sorter. Name key is column name, direction can be 'asc' or 'desc'.
|
|
143
|
+
* @type ISorterValue
|
|
144
|
+
*/
|
|
145
|
+
sorterValue?: ISorterValue;
|
|
146
|
+
/**
|
|
147
|
+
* Sorter icon when items are unsorted.
|
|
148
|
+
* @default '<svg cIcon width="18" content={cilArrowTop} />
|
|
149
|
+
*/
|
|
150
|
+
sortingIcon?: TemplateRef<any>;
|
|
151
|
+
/**
|
|
152
|
+
* Sorter icon when items are sorted ascending.
|
|
153
|
+
* @default '<svg cIcon width="18" content={cilArrowTop} />
|
|
154
|
+
*/
|
|
155
|
+
sortingIconAscending?: TemplateRef<any>;
|
|
156
|
+
/**
|
|
157
|
+
* Sorter icon when items are sorted descending.
|
|
158
|
+
* @default '<svg cIcon width="18" content={cilArrowBottom} />
|
|
159
|
+
*/
|
|
160
|
+
sortingIconDescending?: TemplateRef<any>;
|
|
161
|
+
/**
|
|
162
|
+
* Properties to `CTableBody` component.
|
|
163
|
+
* @link https://coreui.io/react/docs/4.0/components/table/#ctablebody
|
|
164
|
+
* todo or remove?
|
|
165
|
+
*/
|
|
166
|
+
/**
|
|
167
|
+
* Properties to `CTableFoot` component.
|
|
168
|
+
* @link https://coreui.io/react/docs/4.0/components/table/#ctablefoot
|
|
169
|
+
* todo or remove?
|
|
170
|
+
*/
|
|
171
|
+
/**
|
|
172
|
+
* When set, displays table filter above table, allowing filtering by specific column.
|
|
173
|
+
*
|
|
174
|
+
* Column filter can be customized, by passing prop as object with additional options as keys. Available options:
|
|
175
|
+
* - placeholder (String) - Sets custom table filter placeholder.
|
|
176
|
+
* - label (String) - Sets custom table filter label.
|
|
177
|
+
* - external (Boolean) - Disables automatic filtering inside component.
|
|
178
|
+
* - lazy (Boolean) - Set to true to trigger filter updates only on change event.
|
|
179
|
+
*/
|
|
180
|
+
tableFilter?: boolean | ITableFilter;
|
|
181
|
+
/**
|
|
182
|
+
* The element represents a caption for a component.
|
|
183
|
+
* @default 'Filter:'
|
|
184
|
+
* todo or remove?
|
|
185
|
+
*/
|
|
186
|
+
tableFilterLabel?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Specifies a short hint that is visible in the search input.
|
|
189
|
+
* @default 'type string...'
|
|
190
|
+
* todo or remove?
|
|
191
|
+
*/
|
|
192
|
+
tableFilterPlaceholder?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Value of table filter. Set .sync modifier to track changes.
|
|
195
|
+
* @type string
|
|
196
|
+
*/
|
|
197
|
+
tableFilterValue?: string;
|
|
198
|
+
/**
|
|
199
|
+
* Properties to `CTableHead` component.
|
|
200
|
+
* @link https://coreui.io/react/docs/4.0/components/table/#ctablehead
|
|
201
|
+
* todo or remove?
|
|
202
|
+
*/
|
|
203
|
+
/**
|
|
204
|
+
* Properties to `CTable` component.
|
|
205
|
+
* @link https://coreui.io/react/docs/4.0/components/table/#ctable
|
|
206
|
+
*/
|
|
207
|
+
tableProps?: ITable;
|
|
208
|
+
}
|
|
209
|
+
export interface IColumnFilter {
|
|
210
|
+
lazy?: boolean;
|
|
211
|
+
external?: boolean;
|
|
212
|
+
}
|
|
213
|
+
export interface IColumnFilterValue {
|
|
214
|
+
[key: string]: any;
|
|
215
|
+
}
|
|
216
|
+
export interface IColumn {
|
|
217
|
+
filter?: boolean;
|
|
218
|
+
label?: string;
|
|
219
|
+
key: string;
|
|
220
|
+
sorter?: boolean;
|
|
221
|
+
_style?: any;
|
|
222
|
+
_props?: ITableHeaderCellProps;
|
|
223
|
+
}
|
|
224
|
+
export interface ITableHeaderCellProps {
|
|
225
|
+
/**
|
|
226
|
+
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
227
|
+
*
|
|
228
|
+
* @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
|
|
229
|
+
*/
|
|
230
|
+
color?: Colors;
|
|
231
|
+
}
|
|
232
|
+
export interface ISorter {
|
|
233
|
+
resetable?: boolean;
|
|
234
|
+
external?: boolean;
|
|
235
|
+
}
|
|
236
|
+
export interface IItem {
|
|
237
|
+
_props?: ITableRowCellProps;
|
|
238
|
+
_cellProps?: ITableCellProps;
|
|
239
|
+
_selected?: boolean;
|
|
240
|
+
[key: string]: number | string | any;
|
|
241
|
+
}
|
|
242
|
+
export interface ITableCellProps {
|
|
243
|
+
_all?: ITableRowCellProps;
|
|
244
|
+
_attributes?: {
|
|
245
|
+
[key: string]: any;
|
|
246
|
+
};
|
|
247
|
+
[key: string]: ITableRowCellProps | undefined;
|
|
248
|
+
}
|
|
249
|
+
export interface IItemInternal extends IItem {
|
|
250
|
+
_id?: number;
|
|
251
|
+
}
|
|
252
|
+
export interface ItemsPerPageSelect {
|
|
253
|
+
external?: boolean;
|
|
254
|
+
label?: string;
|
|
255
|
+
values?: Array<number>;
|
|
256
|
+
}
|
|
257
|
+
export interface ISorterValue {
|
|
258
|
+
column?: string;
|
|
259
|
+
state?: number | string;
|
|
260
|
+
}
|
|
261
|
+
export interface ITableFilter {
|
|
262
|
+
lazy?: boolean;
|
|
263
|
+
external?: boolean;
|
|
264
|
+
label?: string;
|
|
265
|
+
placeholder?: string;
|
|
266
|
+
value?: string | number;
|
|
267
|
+
}
|
|
268
|
+
export interface ITableGroupProps extends ITableElementProps {
|
|
269
|
+
attributes?: {
|
|
270
|
+
[key: string]: any;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ElementRef, OnInit, Renderer2 } from '@angular/core';
|
|
2
2
|
import { Breakpoints, Colors } from '../coreui.types';
|
|
3
3
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
+
import { ITable } from './table.type';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class TableDirective implements OnInit {
|
|
6
|
+
export declare class TableDirective implements ITable, OnInit {
|
|
6
7
|
private renderer;
|
|
7
8
|
private hostElement;
|
|
8
9
|
static ngAcceptInputType_bordered: BooleanInput;
|
|
@@ -76,5 +77,5 @@ export declare class TableDirective implements OnInit {
|
|
|
76
77
|
ngOnInit(): void;
|
|
77
78
|
setResponsiveWrapper(): void;
|
|
78
79
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableDirective, never>;
|
|
79
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TableDirective, "[cTable]", never, { "align": "align"; "borderColor": "borderColor"; "bordered": "bordered"; "borderless": "borderless"; "caption": "caption"; "color": "color"; "hover": "hover"; "responsive": "responsive"; "small": "small"; "striped": "striped"; }, {}, never>;
|
|
80
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TableDirective, "table[cTable]", never, { "align": "align"; "borderColor": "borderColor"; "bordered": "bordered"; "borderless": "borderless"; "caption": "caption"; "color": "color"; "hover": "hover"; "responsive": "responsive"; "small": "small"; "striped": "striped"; }, {}, never>;
|
|
80
81
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Breakpoints, Colors } from '../coreui.types';
|
|
2
|
+
export interface ITable {
|
|
3
|
+
/**
|
|
4
|
+
* Set the vertical alignment.
|
|
5
|
+
* @type string
|
|
6
|
+
* @values 'bottom' | 'middle' | 'top'
|
|
7
|
+
*/
|
|
8
|
+
align?: 'bottom' | 'middle' | 'top';
|
|
9
|
+
/**
|
|
10
|
+
* Sets the border color of the component to one of CoreUI’s themed colors.
|
|
11
|
+
* @type Colors
|
|
12
|
+
*/
|
|
13
|
+
borderColor?: Colors;
|
|
14
|
+
/**
|
|
15
|
+
* Add borders on all sides of the table and cells.
|
|
16
|
+
* @type boolean
|
|
17
|
+
*/
|
|
18
|
+
bordered?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Remove borders on all sides of the table and cells.
|
|
21
|
+
* @type boolean
|
|
22
|
+
*/
|
|
23
|
+
borderless?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Put the `<caption>` on the top of the table.
|
|
26
|
+
* @values 'top'
|
|
27
|
+
*/
|
|
28
|
+
caption?: 'top';
|
|
29
|
+
/**
|
|
30
|
+
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
31
|
+
* @type Colors
|
|
32
|
+
*/
|
|
33
|
+
color?: Colors;
|
|
34
|
+
/**
|
|
35
|
+
* Enable a hover state on table rows within table body.
|
|
36
|
+
* @type boolean
|
|
37
|
+
*/
|
|
38
|
+
hover?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Make table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to.
|
|
41
|
+
* @type: {boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'}
|
|
42
|
+
*/
|
|
43
|
+
responsive?: boolean | Omit<Breakpoints, 'xs'>;
|
|
44
|
+
/**
|
|
45
|
+
* Make table more compact by cutting all cell `padding` in half.
|
|
46
|
+
* @type boolean
|
|
47
|
+
*/
|
|
48
|
+
small?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Add zebra-striping to any table row within the table body`.
|
|
51
|
+
* @type boolean
|
|
52
|
+
*/
|
|
53
|
+
striped?: boolean;
|
|
54
|
+
attributes?: {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface ITableElementProps {
|
|
59
|
+
/**
|
|
60
|
+
* Set the vertical alignment.
|
|
61
|
+
@type string
|
|
62
|
+
*/
|
|
63
|
+
align?: 'bottom' | 'middle' | 'top';
|
|
64
|
+
/**
|
|
65
|
+
* Sets the color context of the component to one of CoreUI’s themed colors.
|
|
66
|
+
* @type Colors
|
|
67
|
+
*/
|
|
68
|
+
color?: Colors;
|
|
69
|
+
}
|
|
70
|
+
export interface ITableRowCellProps extends ITableElementProps {
|
|
71
|
+
/**
|
|
72
|
+
* Highlight a table row or cell
|
|
73
|
+
@type boolean
|
|
74
|
+
*/
|
|
75
|
+
active?: boolean;
|
|
76
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './lib/card';
|
|
|
12
12
|
export * from './lib/carousel';
|
|
13
13
|
export * from './lib/collapse';
|
|
14
14
|
export * from './lib/dropdown';
|
|
15
|
+
export * from './lib/element-cover';
|
|
15
16
|
export * from './lib/footer';
|
|
16
17
|
export * from './lib/form';
|
|
17
18
|
export * from './lib/grid';
|
|
@@ -28,8 +29,10 @@ export * from './lib/pagination';
|
|
|
28
29
|
export * from './lib/popover';
|
|
29
30
|
export * from './lib/progress';
|
|
30
31
|
export * from './lib/services';
|
|
31
|
-
export * from './lib/spinner';
|
|
32
32
|
export * from './lib/sidebar';
|
|
33
|
+
export * from './lib/smart-pagination';
|
|
34
|
+
export * from './lib/smart-table';
|
|
35
|
+
export * from './lib/spinner';
|
|
33
36
|
export * from './lib/table';
|
|
34
37
|
export * from './lib/tabs';
|
|
35
38
|
export * from './lib/toast';
|