cleek 3.0.7 → 3.0.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.
@@ -1,4 +1,4 @@
1
- import { ColumnItem, TableColumnView, TableExpandMode, TableRowId, TableSort } from '../../types/table';
1
+ import { ColumnItem, TableColumnView, TableExpandMode, TableRowClass, TableRowId, TableSort } from '../../types/table';
2
2
  import { Color, Layout, TableVersion } from '../../cleek-options/cleek-options.types';
3
3
  import { SelectedRows } from '../index';
4
4
  type Columns = ColumnItem[] | object;
@@ -12,6 +12,7 @@ type __VLS_Props = {
12
12
  selectionItemsLabel?: string;
13
13
  expandMode?: TableExpandMode;
14
14
  isRowExpandable?: (row: any) => boolean;
15
+ rowClassFn?: (row: any, rowIndex: number) => TableRowClass;
15
16
  currentPage?: number;
16
17
  itemsPerPage?: number;
17
18
  listLength?: number;
@@ -39,7 +40,7 @@ type __VLS_Props = {
39
40
  type __VLS_PublicProps = {
40
41
  'selectedRows'?: SelectedRows;
41
42
  'expandedRows'?: TableRowId[];
42
- 'sort'?: TableSort | null;
43
+ 'sortBy'?: TableSort | null;
43
44
  'selectedColumnViewId'?: string | null;
44
45
  } & __VLS_Props;
45
46
  declare function __VLS_template(): {
@@ -73,7 +74,7 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
73
74
  declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
74
75
  "update:selectedRows": (value: SelectedRows) => any;
75
76
  "update:expandedRows": (value: TableRowId[]) => any;
76
- "update:sort": (value: TableSort) => any;
77
+ "update:sortBy": (value: TableSort) => any;
77
78
  "update:selectedColumnViewId": (value: string) => any;
78
79
  } & {
79
80
  refreshList: (pageChange: boolean) => any;
@@ -91,7 +92,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
91
92
  onColumnViewColumnsChanged?: (columnNames: string[]) => any;
92
93
  "onUpdate:selectedRows"?: (value: SelectedRows) => any;
93
94
  "onUpdate:expandedRows"?: (value: TableRowId[]) => any;
94
- "onUpdate:sort"?: (value: TableSort) => any;
95
+ "onUpdate:sortBy"?: (value: TableSort) => any;
95
96
  "onUpdate:selectedColumnViewId"?: (value: string) => any;
96
97
  }>, {
97
98
  darkMode: boolean;
@@ -5,7 +5,7 @@ type __VLS_Props = {
5
5
  minWidth: string;
6
6
  textColor?: Color;
7
7
  backgroundColor?: Color;
8
- isSortable?: boolean;
8
+ sortable?: boolean;
9
9
  sortDirection?: TableSortDirection | null;
10
10
  };
11
11
  declare function __VLS_template(): {
@@ -1,8 +1,10 @@
1
+ import { TableRowClass } from '../../../types/table';
1
2
  type __VLS_Props = {
2
3
  isExpandable: boolean;
3
4
  isExpanded: boolean;
4
5
  isSelected: boolean;
5
6
  columnsCount: number;
7
+ rowClass?: TableRowClass;
6
8
  };
7
9
  declare function __VLS_template(): {
8
10
  attrs: Partial<{}>;
@@ -46,7 +46,7 @@ export declare class TableData {
46
46
  isLoading: boolean;
47
47
  isEmpty: boolean;
48
48
  hasLoadedOnce: boolean;
49
- sort: TableSort | null;
49
+ sortBy: TableSort | null;
50
50
  constructor(itemsPerPage: number);
51
51
  }
52
52
  type RowId = number;
@@ -6,7 +6,7 @@ export type ColumnItem = {
6
6
  unchangeable: boolean;
7
7
  isDisplayed: boolean;
8
8
  neverDisplay?: boolean;
9
- sortKey?: string;
9
+ sortable?: boolean;
10
10
  nowrap?: boolean;
11
11
  block?: boolean;
12
12
  overflowAuto?: boolean;
@@ -24,9 +24,10 @@ export type TableColumnView = {
24
24
  columnNames: string[];
25
25
  };
26
26
  export type TableRowId = string | number;
27
+ export type TableRowClass = string | string[] | undefined;
27
28
  export type TableSortDirection = 'asc' | 'desc';
28
29
  export type TableSort = {
29
- key: string;
30
+ column: string;
30
31
  direction: TableSortDirection;
31
32
  };
32
33
  export type TableExpandMode = 'single' | 'multiple';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cleek",
3
3
  "description": "Complete UX Vue library",
4
- "version": "3.0.7",
4
+ "version": "3.0.9",
5
5
  "author": "Quantic Onion",
6
6
  "license": "MIT",
7
7
  "repository": "github:quantic-core/cleek",