@servicetitan/table 22.1.0 → 22.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +24 -0
- package/dist/demo/index.d.ts +4 -0
- package/dist/demo/index.d.ts.map +1 -0
- package/dist/demo/index.js +4 -0
- package/dist/demo/index.js.map +1 -0
- package/dist/demo/master-detail/detail-table.d.ts +4 -0
- package/dist/demo/master-detail/detail-table.d.ts.map +1 -0
- package/dist/demo/master-detail/detail-table.js +28 -0
- package/dist/demo/master-detail/detail-table.js.map +1 -0
- package/dist/demo/master-detail/detail-table.store.d.ts +14 -0
- package/dist/demo/master-detail/detail-table.store.d.ts.map +1 -0
- package/dist/demo/master-detail/detail-table.store.js +104 -0
- package/dist/demo/master-detail/detail-table.store.js.map +1 -0
- package/dist/demo/master-detail/index.d.ts +2 -0
- package/dist/demo/master-detail/index.d.ts.map +1 -0
- package/dist/demo/master-detail/index.js +2 -0
- package/dist/demo/master-detail/index.js.map +1 -0
- package/dist/demo/master-detail/master-table.store.d.ts +14 -0
- package/dist/demo/master-detail/master-table.store.d.ts.map +1 -0
- package/dist/demo/master-detail/master-table.store.js +103 -0
- package/dist/demo/master-detail/master-table.store.js.map +1 -0
- package/dist/demo/master-detail/product-detail.d.ts +8 -0
- package/dist/demo/master-detail/product-detail.d.ts.map +1 -0
- package/dist/demo/master-detail/product-detail.js +2 -0
- package/dist/demo/master-detail/product-detail.js.map +1 -0
- package/dist/demo/master-detail/product-details.d.ts +3 -0
- package/dist/demo/master-detail/product-details.d.ts.map +1 -0
- package/dist/demo/master-detail/product-details.js +55 -0
- package/dist/demo/master-detail/product-details.js.map +1 -0
- package/dist/demo/master-detail/product.d.ts +26 -0
- package/dist/demo/master-detail/product.d.ts.map +1 -0
- package/dist/demo/master-detail/product.js +16 -0
- package/dist/demo/master-detail/product.js.map +1 -0
- package/dist/demo/master-detail/products.d.ts +3 -0
- package/dist/demo/master-detail/products.d.ts.map +1 -0
- package/dist/demo/master-detail/products.js +117 -0
- package/dist/demo/master-detail/products.js.map +1 -0
- package/dist/demo/master-detail/table-master-detail.d.ts +3 -0
- package/dist/demo/master-detail/table-master-detail.d.ts.map +1 -0
- package/dist/demo/master-detail/table-master-detail.js +24 -0
- package/dist/demo/master-detail/table-master-detail.js.map +1 -0
- package/dist/demo/overview/actions-cell.d.ts +5 -0
- package/dist/demo/overview/actions-cell.d.ts.map +1 -0
- package/dist/demo/overview/actions-cell.js +38 -0
- package/dist/demo/overview/actions-cell.js.map +1 -0
- package/dist/demo/overview/index.d.ts +2 -0
- package/dist/demo/overview/index.d.ts.map +1 -0
- package/dist/demo/overview/index.js +2 -0
- package/dist/demo/overview/index.js.map +1 -0
- package/dist/demo/overview/product.d.ts +27 -0
- package/dist/demo/overview/product.d.ts.map +1 -0
- package/dist/demo/overview/product.js +16 -0
- package/dist/demo/overview/product.js.map +1 -0
- package/dist/demo/overview/products.d.ts +3 -0
- package/dist/demo/overview/products.d.ts.map +1 -0
- package/dist/demo/overview/products.js +127 -0
- package/dist/demo/overview/products.js.map +1 -0
- package/dist/demo/overview/table.d.ts +6 -0
- package/dist/demo/overview/table.d.ts.map +1 -0
- package/dist/demo/overview/table.js +44 -0
- package/dist/demo/overview/table.js.map +1 -0
- package/dist/demo/overview/table.store.d.ts +15 -0
- package/dist/demo/overview/table.store.d.ts.map +1 -0
- package/dist/demo/overview/table.store.js +92 -0
- package/dist/demo/overview/table.store.js.map +1 -0
- package/dist/demo/state-caching/beverages.d.ts +3 -0
- package/dist/demo/state-caching/beverages.d.ts.map +1 -0
- package/dist/demo/state-caching/beverages.js +48 -0
- package/dist/demo/state-caching/beverages.js.map +1 -0
- package/dist/demo/state-caching/index.d.ts +2 -0
- package/dist/demo/state-caching/index.d.ts.map +1 -0
- package/dist/demo/state-caching/index.js +2 -0
- package/dist/demo/state-caching/index.js.map +1 -0
- package/dist/demo/state-caching/product.d.ts +6 -0
- package/dist/demo/state-caching/product.d.ts.map +1 -0
- package/dist/demo/state-caching/product.js +2 -0
- package/dist/demo/state-caching/product.js.map +1 -0
- package/dist/demo/state-caching/products.d.ts +3 -0
- package/dist/demo/state-caching/products.d.ts.map +1 -0
- package/dist/demo/state-caching/products.js +53 -0
- package/dist/demo/state-caching/products.js.map +1 -0
- package/dist/demo/state-caching/state-caching-table.d.ts +3 -0
- package/dist/demo/state-caching/state-caching-table.d.ts.map +1 -0
- package/dist/demo/state-caching/state-caching-table.js +14 -0
- package/dist/demo/state-caching/state-caching-table.js.map +1 -0
- package/dist/demo/state-caching/state-caching-table.store.d.ts +13 -0
- package/dist/demo/state-caching/state-caching-table.store.d.ts.map +1 -0
- package/dist/demo/state-caching/state-caching-table.store.js +70 -0
- package/dist/demo/state-caching/state-caching-table.store.js.map +1 -0
- package/dist/editable-cell/boolean-editable-cell.d.ts +3 -0
- package/dist/editable-cell/boolean-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/boolean-editable-cell.js +14 -0
- package/dist/editable-cell/boolean-editable-cell.js.map +1 -0
- package/dist/editable-cell/date-editable-cell.d.ts +3 -0
- package/dist/editable-cell/date-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/date-editable-cell.js +14 -0
- package/dist/editable-cell/date-editable-cell.js.map +1 -0
- package/dist/editable-cell/get-action-cell.d.ts +13 -0
- package/dist/editable-cell/get-action-cell.d.ts.map +1 -0
- package/dist/editable-cell/get-action-cell.js +18 -0
- package/dist/editable-cell/get-action-cell.js.map +1 -0
- package/dist/editable-cell/get-editable-cell.d.ts +13 -0
- package/dist/editable-cell/get-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/get-editable-cell.js +18 -0
- package/dist/editable-cell/get-editable-cell.js.map +1 -0
- package/dist/editable-cell/get-select-editable-cell.d.ts +10 -0
- package/dist/editable-cell/get-select-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/get-select-editable-cell.js +19 -0
- package/dist/editable-cell/get-select-editable-cell.js.map +1 -0
- package/dist/editable-cell/index.d.ts +8 -0
- package/dist/editable-cell/index.d.ts.map +1 -0
- package/dist/editable-cell/index.js +8 -0
- package/dist/editable-cell/index.js.map +1 -0
- package/dist/editable-cell/numeric-editable-cell.d.ts +3 -0
- package/dist/editable-cell/numeric-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/numeric-editable-cell.js +15 -0
- package/dist/editable-cell/numeric-editable-cell.js.map +1 -0
- package/dist/editable-cell/text-editable-cell.d.ts +9 -0
- package/dist/editable-cell/text-editable-cell.d.ts.map +1 -0
- package/dist/editable-cell/text-editable-cell.js +20 -0
- package/dist/editable-cell/text-editable-cell.js.map +1 -0
- package/dist/export/export.d.ts +10 -0
- package/dist/export/export.d.ts.map +1 -0
- package/dist/export/export.js +6 -0
- package/dist/export/export.js.map +1 -0
- package/dist/export/index.d.ts +2 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/export/index.js +2 -0
- package/dist/export/index.js.map +1 -0
- package/dist/filters/column-menu-filters.d.ts +5 -0
- package/dist/filters/column-menu-filters.d.ts.map +1 -0
- package/dist/filters/column-menu-filters.js +9 -0
- package/dist/filters/column-menu-filters.js.map +1 -0
- package/dist/filters/datetime-filter/datetime-filter.d.ts +3 -0
- package/dist/filters/datetime-filter/datetime-filter.d.ts.map +1 -0
- package/dist/filters/datetime-filter/datetime-filter.js +71 -0
- package/dist/filters/datetime-filter/datetime-filter.js.map +1 -0
- package/dist/filters/field-values-filter.d.ts +6 -0
- package/dist/filters/field-values-filter.d.ts.map +1 -0
- package/dist/filters/field-values-filter.js +155 -0
- package/dist/filters/field-values-filter.js.map +1 -0
- package/dist/filters/index.d.ts +9 -0
- package/dist/filters/index.d.ts.map +1 -0
- package/dist/filters/index.js +9 -0
- package/dist/filters/index.js.map +1 -0
- package/dist/filters/multiselect-filter.d.ts +5 -0
- package/dist/filters/multiselect-filter.d.ts.map +1 -0
- package/dist/filters/multiselect-filter.js +107 -0
- package/dist/filters/multiselect-filter.js.map +1 -0
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts +6 -0
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts.map +1 -0
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.js +6 -0
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.js.map +1 -0
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts +3 -0
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts.map +1 -0
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js +27 -0
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js.map +1 -0
- package/dist/filters/range-filter/range-filter.d.ts +6 -0
- package/dist/filters/range-filter/range-filter.d.ts.map +1 -0
- package/dist/filters/range-filter/range-filter.js +117 -0
- package/dist/filters/range-filter/range-filter.js.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts +21 -0
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js +82 -0
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts +6 -0
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js +6 -0
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts +26 -0
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js +69 -0
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts +6 -0
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts.map +1 -0
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js +30 -0
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js.map +1 -0
- package/dist/filters/time-filter/time-filter.d.ts +3 -0
- package/dist/filters/time-filter/time-filter.d.ts.map +1 -0
- package/dist/filters/time-filter/time-filter.js +71 -0
- package/dist/filters/time-filter/time-filter.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/select-cell/index.d.ts +2 -0
- package/dist/select-cell/index.d.ts.map +1 -0
- package/dist/select-cell/index.js +2 -0
- package/dist/select-cell/index.js.map +1 -0
- package/dist/select-cell/select-cell.d.ts +25 -0
- package/dist/select-cell/select-cell.d.ts.map +1 -0
- package/dist/select-cell/select-cell.js +35 -0
- package/dist/select-cell/select-cell.js.map +1 -0
- package/dist/table-state.d.ts +161 -0
- package/dist/table-state.d.ts.map +1 -0
- package/dist/table-state.js +1106 -0
- package/dist/table-state.js.map +1 -0
- package/dist/table.d.ts +40 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +231 -0
- package/dist/table.js.map +1 -0
- package/package.json +6 -6
- package/src/select-cell/select-cell.tsx +16 -44
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table-state.js","sourceRoot":"","sources":["../src/table-state.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA0BzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AASnD,MAAM,UAAU,WAAW,CACvB,IAAwB,EACxB,MAAyB;IAEzB,MAAM,KAAK,GAAwB,IAAuB,CAAC,KAAK,CAAC;IAEjE,OAAO,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AAC1D,C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D;IADC,MAAM;;oDAsBL;AAkEF;IADC,MAAM;;sDAKL;AAGF;IADC,MAAM;;qDAOL;AAGF;IADC,MAAM;;sDA2BL;AAGF;IADC,MAAM;;oDAKL;AAGF;IADC,MAAM;;oDAWL;AA6FF;IADC,MAAM;;;;oDAeN;AAES;IAAT,QAAQ;;;uDAKR;AAES;IAAT,QAAQ;;;wDAER;AAES;IAAT,QAAQ;;;mDAMR;AAES;IAAT,QAAQ;;;oDAMR;AAgFD;IADC,MAAM;;;;6CAUN"}
|
package/dist/table.d.ts
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
import { Component, ReactNode, ReactElement, ComponentType } from 'react';
|
2
|
+
import { TableProps as AnvilTableProps, TableRowProps, TableColumnProps as AnvilTableColumnProps, TableCellProps as AnvilTableCellProps, TableHeaderSelectionChangeEvent, TableSelectionChangeEvent, TablePagerSettings } from '@servicetitan/design-system';
|
3
|
+
import { IdType } from '@servicetitan/data-query';
|
4
|
+
import { TableState } from './table-state';
|
5
|
+
import { SelectionControlType } from './select-cell/select-cell';
|
6
|
+
export interface TableCellProps<T = never, TId extends IdType = any, P = never, PId extends IdType = never> extends AnvilTableCellProps {
|
7
|
+
tableState?: TableState<T, TId, P, PId>;
|
8
|
+
}
|
9
|
+
interface TableColumnProps<T = never, TId extends IdType = any, P = never, PId extends IdType = never> extends AnvilTableColumnProps {
|
10
|
+
cell?: ComponentType<TableCellProps<T, TId, P, PId>>;
|
11
|
+
children?: ReactElement<TableColumnProps<T, TId, P, PId>>[];
|
12
|
+
}
|
13
|
+
declare type ExcludedTableProps = 'data' | 'editField' | 'filter' | 'onFilterChange' | 'group' | 'onGroupChange' | 'onExpandChange' | 'expandField' | 'sort' | 'onSortChange' | 'onHeaderSelectionChange' | 'onSelectionChange' | 'selectedField' | 'pageable' | 'pageSize' | 'skip' | 'onPageChange' | 'total' | 'selectable' | 'pager';
|
14
|
+
export interface TableProps<T, TId extends IdType = any, P = never, PId extends IdType = never> extends Omit<AnvilTableProps, ExcludedTableProps> {
|
15
|
+
selectable?: boolean;
|
16
|
+
exportable?: boolean;
|
17
|
+
hideSelectAll?: boolean;
|
18
|
+
exportFileName?: string;
|
19
|
+
tableState: TableState<T, TId, P, PId>;
|
20
|
+
selectionControl?: SelectionControlType;
|
21
|
+
pager?: TablePagerSettings;
|
22
|
+
}
|
23
|
+
export declare class Table<T, TId extends IdType = any, P = never, PId extends IdType = never> extends Component<TableProps<T, TId, P, PId>> {
|
24
|
+
private tableState;
|
25
|
+
private ref;
|
26
|
+
private lastSelection?;
|
27
|
+
private selectColumnCell;
|
28
|
+
private selectHeaderCell;
|
29
|
+
private withCellTableState;
|
30
|
+
rowRender: (row: ReactElement, rowProps: TableRowProps) => ReactNode;
|
31
|
+
applyToColumns(children: ReactNode, transformer: (column: ReactElement<TableColumnProps<T, TId, P, PId>>) => ReactElement<TableColumnProps<T, TId, P, PId>>): ReactNode;
|
32
|
+
handleHeaderSelectionChange: (ev: TableHeaderSelectionChangeEvent) => void;
|
33
|
+
handleSelectionChange: (ev: TableSelectionChangeEvent) => void;
|
34
|
+
scrollToBottom: () => void;
|
35
|
+
render(): JSX.Element;
|
36
|
+
private getPageable;
|
37
|
+
private table;
|
38
|
+
}
|
39
|
+
export {};
|
40
|
+
//# sourceMappingURL=table.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../src/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,SAAS,EAKT,SAAS,EACT,YAAY,EACZ,aAAa,EAEhB,MAAM,OAAO,CAAC;AACf,OAAO,EAGH,UAAU,IAAI,eAAe,EAC7B,aAAa,EAEb,gBAAgB,IAAI,qBAAqB,EACzC,cAAc,IAAI,mBAAmB,EAErC,+BAA+B,EAC/B,yBAAyB,EACzB,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAmB,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,UAAU,E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, target, key, desc) {
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
+
};
|
7
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
8
|
+
var t = {};
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
10
|
+
t[p] = s[p];
|
11
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
12
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
13
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
14
|
+
t[p[i]] = s[p[i]];
|
15
|
+
}
|
16
|
+
return t;
|
17
|
+
};
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
19
|
+
import { isValidElement, Component, createRef, cloneElement, Children, Fragment, } from 'react';
|
20
|
+
import { Announcement, Table as AnvilTable, TableColumn, } from '@servicetitan/design-system';
|
21
|
+
import { operators as kendoOperators } from '@progress/kendo-react-grid/dist/npm/filterCommon';
|
22
|
+
import { GridPDFExport as TablePDFExport } from '@progress/kendo-react-pdf';
|
23
|
+
import { ExcelExport } from '@progress/kendo-react-excel-export';
|
24
|
+
import { observer } from 'mobx-react';
|
25
|
+
import { AsyncDataSource } from '@servicetitan/data-query';
|
26
|
+
import { SelectColumnCell, SelectHeaderCell, } from './select-cell/select-cell';
|
27
|
+
import memoizeOne from 'memoize-one';
|
28
|
+
import classNames from 'classnames';
|
29
|
+
import * as Styles from './table.module.css';
|
30
|
+
const { text: textOperators } = kendoOperators, operators = __rest(kendoOperators, ["text"]);
|
31
|
+
operators.text = [
|
32
|
+
...textOperators.filter(o => o.operator !== 'isnull' && o.operator !== 'isnotnull'),
|
33
|
+
];
|
34
|
+
function isColumnElement(element) {
|
35
|
+
if (!isValidElement(element)) {
|
36
|
+
return false;
|
37
|
+
}
|
38
|
+
const elementType = element.type;
|
39
|
+
return elementType === TableColumn || elementType.originalType === TableColumn;
|
40
|
+
}
|
41
|
+
let Table = class Table extends Component {
|
42
|
+
constructor() {
|
43
|
+
super(...arguments);
|
44
|
+
Object.defineProperty(this, "tableState", {
|
45
|
+
enumerable: true,
|
46
|
+
configurable: true,
|
47
|
+
writable: true,
|
48
|
+
value: this.props.tableState
|
49
|
+
});
|
50
|
+
Object.defineProperty(this, "ref", {
|
51
|
+
enumerable: true,
|
52
|
+
configurable: true,
|
53
|
+
writable: true,
|
54
|
+
value: createRef()
|
55
|
+
});
|
56
|
+
Object.defineProperty(this, "lastSelection", {
|
57
|
+
enumerable: true,
|
58
|
+
configurable: true,
|
59
|
+
writable: true,
|
60
|
+
value: void 0
|
61
|
+
});
|
62
|
+
Object.defineProperty(this, "selectColumnCell", {
|
63
|
+
enumerable: true,
|
64
|
+
configurable: true,
|
65
|
+
writable: true,
|
66
|
+
value: observer((props) => (_jsx(SelectColumnCell, Object.assign({}, props, { isRowSelectable: this.tableState.isRowSelectable(props.dataItem), control: this.props.selectionControl }))))
|
67
|
+
});
|
68
|
+
Object.defineProperty(this, "selectHeaderCell", {
|
69
|
+
enumerable: true,
|
70
|
+
configurable: true,
|
71
|
+
writable: true,
|
72
|
+
value: observer((props) => {
|
73
|
+
if (this.props.hideSelectAll || this.tableState.selectionLimit !== Infinity) {
|
74
|
+
return null;
|
75
|
+
}
|
76
|
+
return (_jsx(SelectHeaderCell, Object.assign({}, props, { isSomeRowsSelected: this.props.scrollable !== 'virtual'
|
77
|
+
? this.tableState.isSomePageRowsSelected
|
78
|
+
: this.tableState.isSomeRowsSelected, control: this.props.selectionControl })));
|
79
|
+
})
|
80
|
+
});
|
81
|
+
// TODO: rid of "memoizeOne" after migration on React.FC
|
82
|
+
Object.defineProperty(this, "withCellTableState", {
|
83
|
+
enumerable: true,
|
84
|
+
configurable: true,
|
85
|
+
writable: true,
|
86
|
+
value: memoizeOne((children) => this.applyToColumns(children, column => {
|
87
|
+
const { cell: Cell } = column.props;
|
88
|
+
return cloneElement(column, {
|
89
|
+
cell: Cell &&
|
90
|
+
((props) => (_jsx(Cell, Object.assign({}, props, { tableState: this.tableState })))),
|
91
|
+
});
|
92
|
+
}))
|
93
|
+
});
|
94
|
+
Object.defineProperty(this, "rowRender", {
|
95
|
+
enumerable: true,
|
96
|
+
configurable: true,
|
97
|
+
writable: true,
|
98
|
+
value: (row, rowProps) => {
|
99
|
+
const overrides = {};
|
100
|
+
if (this.props.selectable &&
|
101
|
+
rowProps.rowType === 'data' &&
|
102
|
+
!this.tableState.isRowSelectable(rowProps.dataItem)) {
|
103
|
+
overrides.className = classNames(row.props.className, Styles.disabled);
|
104
|
+
}
|
105
|
+
const result = Object.keys(overrides).length ? cloneElement(row, overrides) : row;
|
106
|
+
return this.props.rowRender ? this.props.rowRender(result, rowProps) : result;
|
107
|
+
}
|
108
|
+
});
|
109
|
+
Object.defineProperty(this, "handleHeaderSelectionChange", {
|
110
|
+
enumerable: true,
|
111
|
+
configurable: true,
|
112
|
+
writable: true,
|
113
|
+
value: (ev) => {
|
114
|
+
const checked = ev.syntheticEvent.currentTarget.checked;
|
115
|
+
if (this.props.scrollable !== 'virtual') {
|
116
|
+
if (checked) {
|
117
|
+
this.tableState.selectPage();
|
118
|
+
}
|
119
|
+
else {
|
120
|
+
this.tableState.deselectPage();
|
121
|
+
}
|
122
|
+
}
|
123
|
+
else {
|
124
|
+
if (checked) {
|
125
|
+
this.tableState.selectAll();
|
126
|
+
}
|
127
|
+
else {
|
128
|
+
this.tableState.deselectAll();
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
});
|
133
|
+
Object.defineProperty(this, "handleSelectionChange", {
|
134
|
+
enumerable: true,
|
135
|
+
configurable: true,
|
136
|
+
writable: true,
|
137
|
+
value: (ev) => {
|
138
|
+
var _a, _b, _c, _d;
|
139
|
+
if (!ev.dataItem) {
|
140
|
+
return;
|
141
|
+
}
|
142
|
+
if (ev.nativeEvent.shiftKey && this.lastSelection) {
|
143
|
+
const rows = this.tableState
|
144
|
+
.getRowsBetween(this.lastSelection, ev.dataItem)
|
145
|
+
.filter(row => this.tableState.isRowSelectable(row));
|
146
|
+
const isAsc = ((_b = (_a = this.tableState.dataSource) === null || _a === void 0 ? void 0 : _a.idSelector) === null || _b === void 0 ? void 0 : _b.call(_a, this.lastSelection)) ===
|
147
|
+
((_d = (_c = this.tableState.dataSource) === null || _c === void 0 ? void 0 : _c.idSelector) === null || _d === void 0 ? void 0 : _d.call(_c, rows[0]));
|
148
|
+
const selection = !ev.dataItem.selected;
|
149
|
+
if (selection) {
|
150
|
+
const toBeSelected = [];
|
151
|
+
for (const row of isAsc ? rows : rows.reverse()) {
|
152
|
+
if (this.tableState.selectedCount + toBeSelected.length >=
|
153
|
+
this.tableState.selectionLimit) {
|
154
|
+
break;
|
155
|
+
}
|
156
|
+
if (row.selected) {
|
157
|
+
continue;
|
158
|
+
}
|
159
|
+
toBeSelected.push(row);
|
160
|
+
}
|
161
|
+
this.tableState.setRowsSelection(toBeSelected, selection);
|
162
|
+
}
|
163
|
+
else {
|
164
|
+
this.tableState.setRowsSelection(rows, selection);
|
165
|
+
}
|
166
|
+
}
|
167
|
+
else {
|
168
|
+
this.tableState.toggleRowSelection(ev.dataItem);
|
169
|
+
}
|
170
|
+
this.lastSelection = ev.dataItem;
|
171
|
+
}
|
172
|
+
});
|
173
|
+
Object.defineProperty(this, "scrollToBottom", {
|
174
|
+
enumerable: true,
|
175
|
+
configurable: true,
|
176
|
+
writable: true,
|
177
|
+
value: () => {
|
178
|
+
if (this.ref.current) {
|
179
|
+
const container = this.ref.current.getElementsByClassName('k-grid-content')[0];
|
180
|
+
container.scrollTop = container.scrollHeight - container.clientHeight * 2;
|
181
|
+
container.scroll({ top: container.scrollHeight, behavior: 'smooth' });
|
182
|
+
}
|
183
|
+
}
|
184
|
+
});
|
185
|
+
Object.defineProperty(this, "table", {
|
186
|
+
enumerable: true,
|
187
|
+
configurable: true,
|
188
|
+
writable: true,
|
189
|
+
value: () => {
|
190
|
+
const _a = this.props, { className, filterOperators, selectable, pager } = _a, props = __rest(_a, ["className", "filterOperators", "selectable", "pager"]);
|
191
|
+
return (_jsxs(AnvilTable, Object.assign({ ref: this.ref }, props, { data: [...this.tableState.data], rowRender: this.rowRender, editField: "inEdit", filter: this.tableState.filter, filterOperators: filterOperators !== null && filterOperators !== void 0 ? filterOperators : operators, onFilterChange: this.tableState.handleFilterChange, group: [...this.tableState.group], onGroupChange: this.tableState.handleGroupChange, onExpandChange: this.tableState.handleExpandChange, expandField: "expanded", sort: [...this.tableState.sort], onSortChange: this.tableState.handleSortChange, onHeaderSelectionChange: this.handleHeaderSelectionChange, onSelectionChange: this.handleSelectionChange, selectedField: "selected", pageable: this.getPageable(), pageSize: this.tableState.pageSize, skip: this.tableState.skip, onPageChange: this.tableState.handlePageChange, total: this.tableState.filteredCount, className: classNames(Styles.table, className), selectable: { enabled: selectable, mode: 'multiple' } }, { children: [selectable && (_jsx(TableColumn, { locked: true, field: "selected", width: "50px", filterable: false, resizable: false, headerSelectionValue: props.scrollable !== 'virtual'
|
192
|
+
? this.tableState.isAllPageRowsSelected
|
193
|
+
: this.tableState.isAllRowsSelected, headerCell: this.selectHeaderCell, cell: this.selectColumnCell, headerClassName: "lh-1-i ta-center-i", className: classNames(Styles.unselectable, 'lh-1-i', 'ta-center-i') })), this.withCellTableState(props.children)] })));
|
194
|
+
}
|
195
|
+
});
|
196
|
+
}
|
197
|
+
applyToColumns(children, transformer) {
|
198
|
+
return Children.map(children, child => {
|
199
|
+
if (!isColumnElement(child)) {
|
200
|
+
return child;
|
201
|
+
}
|
202
|
+
return child.props.children
|
203
|
+
? cloneElement(transformer(child), {
|
204
|
+
children: this.applyToColumns(child.props.children, transformer),
|
205
|
+
})
|
206
|
+
: transformer(child);
|
207
|
+
});
|
208
|
+
}
|
209
|
+
render() {
|
210
|
+
if (this.tableState.dataSource instanceof AsyncDataSource &&
|
211
|
+
this.props.scrollable === 'virtual' &&
|
212
|
+
this.props.selectable) {
|
213
|
+
return (_jsx(Announcement, { status: "critical", title: "AsyncDataSource doesn't support virtual scroll with selection." }));
|
214
|
+
}
|
215
|
+
const table = this.table();
|
216
|
+
return (_jsxs(Fragment, { children: [table, this.props.exportable && (_jsxs(Fragment, { children: [_jsxs(TablePDFExport, Object.assign({ ref: this.tableState.setTablePdfExportRef, fileName: sanitizeExportFileName(this.props.exportFileName) }, { children: [this.props.children, table] })), _jsx(ExcelExport, Object.assign({ ref: this.tableState.setTableExcelExportRef, fileName: sanitizeExportFileName(this.props.exportFileName) }, { children: this.props.children }))] }))] }));
|
217
|
+
}
|
218
|
+
getPageable() {
|
219
|
+
var _a;
|
220
|
+
if (this.props.scrollable === 'virtual' || !this.tableState.pageSize) {
|
221
|
+
return false;
|
222
|
+
}
|
223
|
+
return (_a = this.props.pager) !== null && _a !== void 0 ? _a : true;
|
224
|
+
}
|
225
|
+
};
|
226
|
+
Table = __decorate([
|
227
|
+
observer
|
228
|
+
], Table);
|
229
|
+
export { Table };
|
230
|
+
const sanitizeExportFileName = memoizeOne((fileName) => fileName === null || fileName === void 0 ? void 0 : fileName.replace(/\.+/g, '_'));
|
231
|
+
//# sourceMappingURL=table.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../src/table.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EACH,cAAc,EACd,SAAS,EACT,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,QAAQ,GAKX,MAAM,OAAO,CAAC;AACf,OAAO,EACH,YAAY,EACZ,KAAK,IAAI,UAAU,EAG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AAc,CAAC,gBAE1D,IAAI,CAAC,KAAK,CAAC,QAAQ,IACV,IACP,CACd,IACM,CACd,CAAC;IACN,CAAC;IAEO,WAAW;;QACf,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YAClE,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,mCAAI,IAAI,CAAC;IACpC,CAAC;CAsDJ,CAAA;AAnQY,KAAK;IADjB,QAAQ;GACI,KAAK,CAmQjB;SAnQY,KAAK;AAqQlB,MAAM,sBAAsB,GAAG,UAAU,CAAC,CAAC,QAA4B,EAAE,EAAE,CACvE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACjC,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@servicetitan/table",
|
3
|
-
"version": "22.1.
|
3
|
+
"version": "22.1.3",
|
4
4
|
"description": "",
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/table",
|
6
6
|
"repository": {
|
@@ -36,9 +36,9 @@
|
|
36
36
|
"memoize-one": "~6.0.0"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@servicetitan/data-query": "^22.1.
|
39
|
+
"@servicetitan/data-query": "^22.1.3",
|
40
40
|
"@servicetitan/design-system": "~11.8.0",
|
41
|
-
"@servicetitan/form": "^22.1.
|
41
|
+
"@servicetitan/form": "^22.1.3",
|
42
42
|
"@servicetitan/react-ioc": "^21.6.0",
|
43
43
|
"@servicetitan/suppress-warnings": "^21.6.0",
|
44
44
|
"@types/accounting": "~0.4.2",
|
@@ -52,9 +52,9 @@
|
|
52
52
|
"react": "~17.0.2"
|
53
53
|
},
|
54
54
|
"peerDependencies": {
|
55
|
-
"@servicetitan/data-query": "^22.1.
|
55
|
+
"@servicetitan/data-query": "^22.1.3",
|
56
56
|
"@servicetitan/design-system": "~11.8.0",
|
57
|
-
"@servicetitan/form": "^22.1.
|
57
|
+
"@servicetitan/form": "^22.1.3",
|
58
58
|
"@servicetitan/react-ioc": "^20.0.0",
|
59
59
|
"@servicetitan/suppress-warnings": "^20.0.0",
|
60
60
|
"accounting": "~0.4.1",
|
@@ -71,5 +71,5 @@
|
|
71
71
|
"cli": {
|
72
72
|
"webpack": false
|
73
73
|
},
|
74
|
-
"gitHead": "
|
74
|
+
"gitHead": "fedb27aae8e53d7e6da888025b8b15981a63b23d"
|
75
75
|
}
|
@@ -1,11 +1,10 @@
|
|
1
|
-
import { ComponentType, SyntheticEvent, FC
|
1
|
+
import { ComponentType, SyntheticEvent, FC } from 'react';
|
2
2
|
import {
|
3
3
|
TableCellProps,
|
4
4
|
TableHeaderCellProps,
|
5
5
|
Checkbox,
|
6
6
|
CheckboxProps,
|
7
7
|
} from '@servicetitan/design-system';
|
8
|
-
import classNames from 'classnames';
|
9
8
|
import * as Styles from './select-cell.module.css';
|
10
9
|
|
11
10
|
export type SelectionControlType = ComponentType<CheckboxProps<never>>;
|
@@ -33,60 +32,33 @@ export const SelectCell: FC<SelectCellProps> = ({
|
|
33
32
|
control: Control = Checkbox,
|
34
33
|
...props
|
35
34
|
}: SelectCellProps) => {
|
36
|
-
const onChange =
|
37
|
-
(
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
},
|
43
|
-
[selectionChange]
|
44
|
-
);
|
35
|
+
const onChange = (_0: never, _1: boolean, event: SyntheticEvent<HTMLInputElement>) => {
|
36
|
+
if (!selectionChange) {
|
37
|
+
return;
|
38
|
+
}
|
39
|
+
selectionChange({ syntheticEvent: event });
|
40
|
+
};
|
45
41
|
|
46
42
|
return <Control className={Styles.checkbox} onChange={onChange} {...props} />;
|
47
43
|
};
|
48
44
|
|
49
|
-
export const SelectColumnCell: FC<SelectColumnCellProps> = ({
|
50
|
-
|
51
|
-
rowType,
|
52
|
-
dataItem,
|
53
|
-
control,
|
54
|
-
isRowSelectable,
|
55
|
-
selectionChange,
|
56
|
-
className,
|
57
|
-
}: SelectColumnCellProps) => {
|
58
|
-
const onSelectionChange = useCallback(
|
59
|
-
(event: SyntheticEvent<HTMLTableCellElement>) => {
|
60
|
-
if (isRowSelectable && selectionChange) {
|
61
|
-
selectionChange({ syntheticEvent: event });
|
62
|
-
}
|
63
|
-
},
|
64
|
-
[selectionChange, isRowSelectable]
|
65
|
-
);
|
66
|
-
|
67
|
-
if (rowType === 'groupHeader') {
|
45
|
+
export const SelectColumnCell: FC<SelectColumnCellProps> = (props: SelectColumnCellProps) => {
|
46
|
+
if (props.rowType === 'groupHeader') {
|
68
47
|
return null;
|
69
48
|
}
|
70
49
|
|
71
|
-
if (rowType === 'groupFooter') {
|
50
|
+
if (props.rowType === 'groupFooter') {
|
72
51
|
return <td />;
|
73
52
|
}
|
74
53
|
|
75
54
|
return (
|
76
|
-
<td
|
77
|
-
style={style}
|
78
|
-
className={classNames(
|
79
|
-
isRowSelectable && selectionChange && 'cursor-pointer',
|
80
|
-
className
|
81
|
-
)}
|
82
|
-
onClick={onSelectionChange}
|
83
|
-
>
|
55
|
+
<td style={props.style} className={props.className}>
|
84
56
|
<SelectCell
|
85
|
-
checked={dataItem.selected}
|
86
|
-
disabled={!isRowSelectable}
|
87
|
-
selectionChange={selectionChange}
|
88
|
-
indeterminate={dataItem.indeterminate}
|
89
|
-
control={control}
|
57
|
+
checked={props.dataItem.selected}
|
58
|
+
disabled={!props.isRowSelectable}
|
59
|
+
selectionChange={props.selectionChange}
|
60
|
+
indeterminate={props.dataItem.indeterminate}
|
61
|
+
control={props.control}
|
90
62
|
/>
|
91
63
|
</td>
|
92
64
|
);
|