@servicetitan/table 21.7.2 → 22.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. package/CHANGELOG.md +566 -0
  2. package/package.json +10 -10
  3. package/src/select-cell/select-cell.tsx +44 -16
  4. package/dist/demo/index.d.ts +0 -4
  5. package/dist/demo/index.d.ts.map +0 -1
  6. package/dist/demo/index.js +0 -4
  7. package/dist/demo/index.js.map +0 -1
  8. package/dist/demo/master-detail/detail-table.d.ts +0 -4
  9. package/dist/demo/master-detail/detail-table.d.ts.map +0 -1
  10. package/dist/demo/master-detail/detail-table.js +0 -28
  11. package/dist/demo/master-detail/detail-table.js.map +0 -1
  12. package/dist/demo/master-detail/detail-table.store.d.ts +0 -14
  13. package/dist/demo/master-detail/detail-table.store.d.ts.map +0 -1
  14. package/dist/demo/master-detail/detail-table.store.js +0 -104
  15. package/dist/demo/master-detail/detail-table.store.js.map +0 -1
  16. package/dist/demo/master-detail/index.d.ts +0 -2
  17. package/dist/demo/master-detail/index.d.ts.map +0 -1
  18. package/dist/demo/master-detail/index.js +0 -2
  19. package/dist/demo/master-detail/index.js.map +0 -1
  20. package/dist/demo/master-detail/master-table.store.d.ts +0 -14
  21. package/dist/demo/master-detail/master-table.store.d.ts.map +0 -1
  22. package/dist/demo/master-detail/master-table.store.js +0 -103
  23. package/dist/demo/master-detail/master-table.store.js.map +0 -1
  24. package/dist/demo/master-detail/product-detail.d.ts +0 -8
  25. package/dist/demo/master-detail/product-detail.d.ts.map +0 -1
  26. package/dist/demo/master-detail/product-detail.js +0 -2
  27. package/dist/demo/master-detail/product-detail.js.map +0 -1
  28. package/dist/demo/master-detail/product-details.d.ts +0 -3
  29. package/dist/demo/master-detail/product-details.d.ts.map +0 -1
  30. package/dist/demo/master-detail/product-details.js +0 -55
  31. package/dist/demo/master-detail/product-details.js.map +0 -1
  32. package/dist/demo/master-detail/product.d.ts +0 -26
  33. package/dist/demo/master-detail/product.d.ts.map +0 -1
  34. package/dist/demo/master-detail/product.js +0 -16
  35. package/dist/demo/master-detail/product.js.map +0 -1
  36. package/dist/demo/master-detail/products.d.ts +0 -3
  37. package/dist/demo/master-detail/products.d.ts.map +0 -1
  38. package/dist/demo/master-detail/products.js +0 -117
  39. package/dist/demo/master-detail/products.js.map +0 -1
  40. package/dist/demo/master-detail/table-master-detail.d.ts +0 -3
  41. package/dist/demo/master-detail/table-master-detail.d.ts.map +0 -1
  42. package/dist/demo/master-detail/table-master-detail.js +0 -24
  43. package/dist/demo/master-detail/table-master-detail.js.map +0 -1
  44. package/dist/demo/overview/actions-cell.d.ts +0 -5
  45. package/dist/demo/overview/actions-cell.d.ts.map +0 -1
  46. package/dist/demo/overview/actions-cell.js +0 -38
  47. package/dist/demo/overview/actions-cell.js.map +0 -1
  48. package/dist/demo/overview/index.d.ts +0 -2
  49. package/dist/demo/overview/index.d.ts.map +0 -1
  50. package/dist/demo/overview/index.js +0 -2
  51. package/dist/demo/overview/index.js.map +0 -1
  52. package/dist/demo/overview/product.d.ts +0 -27
  53. package/dist/demo/overview/product.d.ts.map +0 -1
  54. package/dist/demo/overview/product.js +0 -16
  55. package/dist/demo/overview/product.js.map +0 -1
  56. package/dist/demo/overview/products.d.ts +0 -3
  57. package/dist/demo/overview/products.d.ts.map +0 -1
  58. package/dist/demo/overview/products.js +0 -127
  59. package/dist/demo/overview/products.js.map +0 -1
  60. package/dist/demo/overview/table.d.ts +0 -6
  61. package/dist/demo/overview/table.d.ts.map +0 -1
  62. package/dist/demo/overview/table.js +0 -44
  63. package/dist/demo/overview/table.js.map +0 -1
  64. package/dist/demo/overview/table.store.d.ts +0 -15
  65. package/dist/demo/overview/table.store.d.ts.map +0 -1
  66. package/dist/demo/overview/table.store.js +0 -92
  67. package/dist/demo/overview/table.store.js.map +0 -1
  68. package/dist/demo/state-caching/beverages.d.ts +0 -3
  69. package/dist/demo/state-caching/beverages.d.ts.map +0 -1
  70. package/dist/demo/state-caching/beverages.js +0 -48
  71. package/dist/demo/state-caching/beverages.js.map +0 -1
  72. package/dist/demo/state-caching/index.d.ts +0 -2
  73. package/dist/demo/state-caching/index.d.ts.map +0 -1
  74. package/dist/demo/state-caching/index.js +0 -2
  75. package/dist/demo/state-caching/index.js.map +0 -1
  76. package/dist/demo/state-caching/product.d.ts +0 -6
  77. package/dist/demo/state-caching/product.d.ts.map +0 -1
  78. package/dist/demo/state-caching/product.js +0 -2
  79. package/dist/demo/state-caching/product.js.map +0 -1
  80. package/dist/demo/state-caching/products.d.ts +0 -3
  81. package/dist/demo/state-caching/products.d.ts.map +0 -1
  82. package/dist/demo/state-caching/products.js +0 -53
  83. package/dist/demo/state-caching/products.js.map +0 -1
  84. package/dist/demo/state-caching/state-caching-table.d.ts +0 -3
  85. package/dist/demo/state-caching/state-caching-table.d.ts.map +0 -1
  86. package/dist/demo/state-caching/state-caching-table.js +0 -14
  87. package/dist/demo/state-caching/state-caching-table.js.map +0 -1
  88. package/dist/demo/state-caching/state-caching-table.store.d.ts +0 -13
  89. package/dist/demo/state-caching/state-caching-table.store.d.ts.map +0 -1
  90. package/dist/demo/state-caching/state-caching-table.store.js +0 -70
  91. package/dist/demo/state-caching/state-caching-table.store.js.map +0 -1
  92. package/dist/editable-cell/boolean-editable-cell.d.ts +0 -3
  93. package/dist/editable-cell/boolean-editable-cell.d.ts.map +0 -1
  94. package/dist/editable-cell/boolean-editable-cell.js +0 -14
  95. package/dist/editable-cell/boolean-editable-cell.js.map +0 -1
  96. package/dist/editable-cell/date-editable-cell.d.ts +0 -3
  97. package/dist/editable-cell/date-editable-cell.d.ts.map +0 -1
  98. package/dist/editable-cell/date-editable-cell.js +0 -14
  99. package/dist/editable-cell/date-editable-cell.js.map +0 -1
  100. package/dist/editable-cell/get-action-cell.d.ts +0 -13
  101. package/dist/editable-cell/get-action-cell.d.ts.map +0 -1
  102. package/dist/editable-cell/get-action-cell.js +0 -18
  103. package/dist/editable-cell/get-action-cell.js.map +0 -1
  104. package/dist/editable-cell/get-editable-cell.d.ts +0 -13
  105. package/dist/editable-cell/get-editable-cell.d.ts.map +0 -1
  106. package/dist/editable-cell/get-editable-cell.js +0 -18
  107. package/dist/editable-cell/get-editable-cell.js.map +0 -1
  108. package/dist/editable-cell/get-select-editable-cell.d.ts +0 -10
  109. package/dist/editable-cell/get-select-editable-cell.d.ts.map +0 -1
  110. package/dist/editable-cell/get-select-editable-cell.js +0 -19
  111. package/dist/editable-cell/get-select-editable-cell.js.map +0 -1
  112. package/dist/editable-cell/index.d.ts +0 -8
  113. package/dist/editable-cell/index.d.ts.map +0 -1
  114. package/dist/editable-cell/index.js +0 -8
  115. package/dist/editable-cell/index.js.map +0 -1
  116. package/dist/editable-cell/numeric-editable-cell.d.ts +0 -3
  117. package/dist/editable-cell/numeric-editable-cell.d.ts.map +0 -1
  118. package/dist/editable-cell/numeric-editable-cell.js +0 -15
  119. package/dist/editable-cell/numeric-editable-cell.js.map +0 -1
  120. package/dist/editable-cell/text-editable-cell.d.ts +0 -9
  121. package/dist/editable-cell/text-editable-cell.d.ts.map +0 -1
  122. package/dist/editable-cell/text-editable-cell.js +0 -20
  123. package/dist/editable-cell/text-editable-cell.js.map +0 -1
  124. package/dist/export/export.d.ts +0 -10
  125. package/dist/export/export.d.ts.map +0 -1
  126. package/dist/export/export.js +0 -6
  127. package/dist/export/export.js.map +0 -1
  128. package/dist/export/index.d.ts +0 -2
  129. package/dist/export/index.d.ts.map +0 -1
  130. package/dist/export/index.js +0 -2
  131. package/dist/export/index.js.map +0 -1
  132. package/dist/filters/column-menu-filters.d.ts +0 -5
  133. package/dist/filters/column-menu-filters.d.ts.map +0 -1
  134. package/dist/filters/column-menu-filters.js +0 -9
  135. package/dist/filters/column-menu-filters.js.map +0 -1
  136. package/dist/filters/datetime-filter/datetime-filter.d.ts +0 -3
  137. package/dist/filters/datetime-filter/datetime-filter.d.ts.map +0 -1
  138. package/dist/filters/datetime-filter/datetime-filter.js +0 -71
  139. package/dist/filters/datetime-filter/datetime-filter.js.map +0 -1
  140. package/dist/filters/field-values-filter.d.ts +0 -6
  141. package/dist/filters/field-values-filter.d.ts.map +0 -1
  142. package/dist/filters/field-values-filter.js +0 -155
  143. package/dist/filters/field-values-filter.js.map +0 -1
  144. package/dist/filters/index.d.ts +0 -9
  145. package/dist/filters/index.d.ts.map +0 -1
  146. package/dist/filters/index.js +0 -9
  147. package/dist/filters/index.js.map +0 -1
  148. package/dist/filters/multiselect-filter.d.ts +0 -5
  149. package/dist/filters/multiselect-filter.d.ts.map +0 -1
  150. package/dist/filters/multiselect-filter.js +0 -107
  151. package/dist/filters/multiselect-filter.js.map +0 -1
  152. package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts +0 -6
  153. package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts.map +0 -1
  154. package/dist/filters/numeric-filter-extended/numeric-extended-operators.js +0 -6
  155. package/dist/filters/numeric-filter-extended/numeric-extended-operators.js.map +0 -1
  156. package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts +0 -3
  157. package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts.map +0 -1
  158. package/dist/filters/numeric-filter-extended/numeric-filter-extended.js +0 -27
  159. package/dist/filters/numeric-filter-extended/numeric-filter-extended.js.map +0 -1
  160. package/dist/filters/range-filter/range-filter.d.ts +0 -6
  161. package/dist/filters/range-filter/range-filter.d.ts.map +0 -1
  162. package/dist/filters/range-filter/range-filter.js +0 -117
  163. package/dist/filters/range-filter/range-filter.js.map +0 -1
  164. package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts +0 -21
  165. package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts.map +0 -1
  166. package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js +0 -82
  167. package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js.map +0 -1
  168. package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts +0 -6
  169. package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts.map +0 -1
  170. package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js +0 -6
  171. package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js.map +0 -1
  172. package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts +0 -26
  173. package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts.map +0 -1
  174. package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js +0 -69
  175. package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js.map +0 -1
  176. package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts +0 -6
  177. package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts.map +0 -1
  178. package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js +0 -30
  179. package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js.map +0 -1
  180. package/dist/filters/time-filter/time-filter.d.ts +0 -3
  181. package/dist/filters/time-filter/time-filter.d.ts.map +0 -1
  182. package/dist/filters/time-filter/time-filter.js +0 -71
  183. package/dist/filters/time-filter/time-filter.js.map +0 -1
  184. package/dist/index.d.ts +0 -10
  185. package/dist/index.d.ts.map +0 -1
  186. package/dist/index.js +0 -9
  187. package/dist/index.js.map +0 -1
  188. package/dist/select-cell/index.d.ts +0 -2
  189. package/dist/select-cell/index.d.ts.map +0 -1
  190. package/dist/select-cell/index.js +0 -2
  191. package/dist/select-cell/index.js.map +0 -1
  192. package/dist/select-cell/select-cell.d.ts +0 -25
  193. package/dist/select-cell/select-cell.d.ts.map +0 -1
  194. package/dist/select-cell/select-cell.js +0 -35
  195. package/dist/select-cell/select-cell.js.map +0 -1
  196. package/dist/table-state.d.ts +0 -161
  197. package/dist/table-state.d.ts.map +0 -1
  198. package/dist/table-state.js +0 -1106
  199. package/dist/table-state.js.map +0 -1
  200. package/dist/table.d.ts +0 -40
  201. package/dist/table.d.ts.map +0 -1
  202. package/dist/table.js +0 -231
  203. package/dist/table.js.map +0 -1
@@ -1,35 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { Checkbox, } from '@servicetitan/design-system';
14
- import * as Styles from './select-cell.module.css';
15
- export const SelectCell = (_a) => {
16
- var { selectionChange, control: Control = Checkbox } = _a, props = __rest(_a, ["selectionChange", "control"]);
17
- const onChange = (_0, _1, event) => {
18
- if (!selectionChange) {
19
- return;
20
- }
21
- selectionChange({ syntheticEvent: event });
22
- };
23
- return _jsx(Control, Object.assign({ className: Styles.checkbox, onChange: onChange }, props));
24
- };
25
- export const SelectColumnCell = (props) => {
26
- if (props.rowType === 'groupHeader') {
27
- return null;
28
- }
29
- if (props.rowType === 'groupFooter') {
30
- return _jsx("td", {});
31
- }
32
- return (_jsx("td", Object.assign({ style: props.style, className: props.className }, { children: _jsx(SelectCell, { checked: props.dataItem.selected, disabled: !props.isRowSelectable, selectionChange: props.selectionChange, indeterminate: props.dataItem.indeterminate, control: props.control }) })));
33
- };
34
- export const SelectHeaderCell = (props) => (_jsx(SelectCell, { checked: props.selectionValue, indeterminate: props.isSomeRowsSelected, selectionChange: props.selectionChange, control: props.control }));
35
- //# sourceMappingURL=select-cell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select-cell.js","sourceRoot":"","sources":["../../src/select-cell/select-cell.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAGH,QAAQ,GAEX,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AAsBnD,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,EAI9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,EAAE,KAAK,CAAC,OAAO,GACxB,CACL,CAAC"}
@@ -1,161 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { AggregateDescriptor, CompositeFilterDescriptor, GroupDescriptor, SortDescriptor, DataResult, GroupResult, DataSource, IdType } from '@servicetitan/data-query';
3
- import { ExcelExport, ExcelExportData, ExcelExportColumnProps } from '@progress/kendo-react-excel-export';
4
- import { TableExpandChangeEvent, TableFilterChangeEvent, TableGroupChangeEvent, TablePageChangeEvent, TableSortChangeEvent } from '@servicetitan/design-system';
5
- import { GridPDFExport as TablePDFExport } from '@progress/kendo-react-pdf';
6
- import { WorkbookOptions } from '@progress/kendo-ooxml';
7
- import { FormState, FieldState } from 'formstate';
8
- export declare type Selectable<T> = {
9
- readonly selected: boolean | undefined;
10
- } & T;
11
- export declare type Editable<T> = {
12
- readonly inEdit: boolean | undefined;
13
- } & T;
14
- export declare type Expandable<T> = {
15
- readonly expanded: boolean | undefined;
16
- } & T;
17
- export declare type Materialized<T> = {
18
- readonly materializedPath: string;
19
- } & T;
20
- declare type Data<T> = DataResult<T>['data'];
21
- export declare function isGroupItem<T>(item: T | GroupResult<T>, groups: GroupDescriptor[]): item is GroupResult<T>;
22
- export declare type PossibleFormState<T> = FormState<{
23
- [P in keyof T]-?: FieldState<T[P]>;
24
- }>;
25
- export interface TableStateModel<TId extends IdType = never> {
26
- skip: number;
27
- selectedIds: TId[];
28
- expandedIds: TId[];
29
- collapsedGroups: string[];
30
- sort: SortDescriptor[];
31
- filter?: CompositeFilterDescriptor;
32
- aggregates: AggregateDescriptor[];
33
- group: GroupDescriptor[];
34
- }
35
- interface TableStateConstructorParams<T, TId extends IdType = never, P = never, PId extends IdType = never> {
36
- dataSource?: DataSource<T, TId> | null;
37
- pageSize?: number;
38
- /** For use with tables that enable selection only. Specifies if the item is selectable in the checkbox */
39
- isRowUnselectable?: (row: T) => boolean;
40
- selectionLimit?: number;
41
- getFormState?(row: T): PossibleFormState<T>;
42
- parent?: {
43
- row: P;
44
- tableState: TableState<P, PId>;
45
- };
46
- getDetailTableState?: (row: T) => TableState<any, any, any, any> | undefined;
47
- initialState?: TableStateModel<TId>;
48
- alwaysEditable?: boolean;
49
- }
50
- interface FetchDataParams {
51
- newSkip?: number;
52
- newSort?: SortDescriptor[];
53
- newFilter?: CompositeFilterDescriptor | null;
54
- newAggregates?: AggregateDescriptor[];
55
- newGroup?: GroupDescriptor[];
56
- }
57
- interface SelectionOptions {
58
- ignoreUnselectable?: boolean;
59
- recursive?: boolean;
60
- }
61
- interface SetDataSourceParams<TId extends IdType = never> {
62
- reset?: boolean;
63
- initialState?: TableStateModel<TId>;
64
- }
65
- interface EditingForm<T> {
66
- form: PossibleFormState<T>;
67
- field?: keyof T;
68
- }
69
- /** Interface for unit testing purposes.*/
70
- export interface ITableState<T, TId extends IdType = never> {
71
- totalCount?: number;
72
- selectedCount?: number;
73
- addToDataSource?: (row: T, select?: boolean | undefined) => Promise<void>;
74
- removeFromDataSource?: (id: TId) => Promise<T | undefined>;
75
- selectAll?: () => Promise<void>;
76
- deselectAll?: () => void;
77
- setDataSource?: (dataSource: DataSource<T, TId> | null, setDataSourceParams?: boolean | SetDataSourceParams<TId>) => Promise<void>;
78
- isRowUnselectable?: (row: T) => boolean;
79
- }
80
- export declare class TableState<T, TId extends IdType = never, P = never, PId extends IdType = never> {
81
- private innerDataSource;
82
- get dataSource(): DataSource<T, TId> | null;
83
- private traverse;
84
- private get originalData();
85
- parent?: {
86
- row: P;
87
- tableState: TableState<P, PId>;
88
- };
89
- getDetailTableState?: (row: T) => TableState<any, any, any, any> | undefined;
90
- selectedIds: Set<TId>;
91
- inEdit: Map<TId, EditingForm<T>>;
92
- expandedIds: Set<TId>;
93
- collapsedGroups: Set<string>;
94
- isRowUnselectable: (row: T) => boolean;
95
- selectionLimit: number;
96
- getFormState?(row: T): PossibleFormState<T>;
97
- data: Data<Selectable<T>>;
98
- totalCount: number;
99
- filteredCount: number;
100
- selectedCount: number;
101
- unselectableCount: number;
102
- get unselectedCount(): number;
103
- get selectableCount(): number;
104
- get filteredUnselectableCount(): number;
105
- get filteredSelectableCount(): number;
106
- private get totalFilteredSelectableCountPromise();
107
- get totalFilteredSelectableCount(): number;
108
- sort: SortDescriptor[];
109
- filter: CompositeFilterDescriptor | undefined;
110
- aggregates: AggregateDescriptor[];
111
- innerGroup: GroupDescriptor[];
112
- get group(): GroupDescriptor[];
113
- set group(value: GroupDescriptor[]);
114
- skip: number;
115
- pageSize?: number;
116
- private tablePdfExport;
117
- private tableExcelExport;
118
- alwaysEditable: boolean;
119
- constructor({ dataSource, pageSize, isRowUnselectable, selectionLimit, getFormState, parent, getDetailTableState, initialState, alwaysEditable, }?: TableStateConstructorParams<T, TId, P, PId>);
120
- addToDataSource(row: T, select?: boolean, index?: number): Promise<void>;
121
- removeFromDataSource(id: TId): Promise<T | undefined>;
122
- setRowsSelection(rows: T[], value: boolean, { ignoreUnselectable, recursive }?: SelectionOptions): Promise<void>;
123
- selectPage(options?: SelectionOptions): Promise<void>;
124
- deselectPage(options?: SelectionOptions): Promise<void>;
125
- private setAllSelection;
126
- selectAll(options?: SelectionOptions): Promise<void>;
127
- deselectAll(options?: SelectionOptions): Promise<void>;
128
- edit(row: T, field?: keyof T): void;
129
- saveEdit(row: T, beforeSave?: (changed: T, field?: keyof T) => Promise<void>): Promise<void>;
130
- cancelEdit(row: T): void;
131
- editAll(): Promise<void>;
132
- saveEditAll(beforeSave?: (changed: T[]) => Promise<void>): Promise<void>;
133
- cancelEditAll(): void;
134
- reset(): void;
135
- setDataSource(dataSource: DataSource<T, TId> | null, setDataSourceParams?: SetDataSourceParams<TId> | boolean): Promise<void>;
136
- private fetchInitialData;
137
- private addPropertiesToRows;
138
- handleFilterChange: (ev: TableFilterChangeEvent) => void;
139
- handleGroupChange: (ev: TableGroupChangeEvent) => void;
140
- handleExpandChange: ({ dataItem, value }: TableExpandChangeEvent) => void;
141
- handleSortChange: (ev: TableSortChangeEvent) => void;
142
- handlePageChange: (ev: TablePageChangeEvent) => void;
143
- /** Call without params if unchanged */
144
- fetchData: ({ newSkip, newSort, newFilter, newAggregates, newGroup, }?: FetchDataParams) => Promise<void>;
145
- isRowSelectable: (row: Selectable<T>) => boolean;
146
- toggleRowSelection(row: T, options?: SelectionOptions): Promise<void>;
147
- get isAllPageRowsSelected(): boolean;
148
- get isSomePageRowsSelected(): boolean;
149
- get isAllRowsSelected(): boolean;
150
- get isSomeRowsSelected(): boolean;
151
- setTablePdfExportRef: (el: TablePDFExport | null) => TablePDFExport | null;
152
- setTableExcelExportRef: (el: ExcelExport | null) => ExcelExport | null;
153
- exportPdf: () => Promise<void>;
154
- exportExcel: (data?: any[] | ExcelExportData | WorkbookOptions, columns?: ExcelExportColumnProps[] | ReactElement<ExcelExportColumnProps>[]) => Promise<void>;
155
- filteredSortedUnpaginatedData: () => Promise<DataResult<T>>;
156
- getRowsBetween: (start: Selectable<T>, end: Selectable<T>) => Selectable<T>[];
157
- exportState(): TableStateModel<TId>;
158
- importState(data: TableStateModel<TId>): void;
159
- }
160
- export {};
161
- //# sourceMappingURL=table-state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table-state.d.ts","sourceRoot":"","sources":["../src/table-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAGrC,OAAO,EACH,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,MAAM,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,WAAW,EACX,eAAe,EACf,sBAAsB,EACzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACH,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,uBA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