@servicetitan/table 25.1.0 → 25.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/demo/filters/async-select-filter.js +1 -1
- package/dist/demo/filters/async-select-filter.js.map +1 -1
- package/dist/demo/filters/categories.d.ts.map +1 -1
- package/dist/demo/filters/categories.js +24 -0
- package/dist/demo/filters/categories.js.map +1 -1
- package/dist/demo/filters/multiselect-filter.d.ts.map +1 -1
- package/dist/demo/filters/multiselect-filter.js +2 -1
- package/dist/demo/filters/multiselect-filter.js.map +1 -1
- package/dist/demo/filters/select-filter.d.ts +6 -0
- package/dist/demo/filters/select-filter.d.ts.map +1 -0
- package/dist/demo/filters/select-filter.js +58 -0
- package/dist/demo/filters/select-filter.js.map +1 -0
- package/dist/demo/filters/single-select-filter.d.ts.map +1 -1
- package/dist/demo/filters/single-select-filter.js +2 -1
- package/dist/demo/filters/single-select-filter.js.map +1 -1
- package/dist/demo/filters/table.store.d.ts +8 -1
- package/dist/demo/filters/table.store.d.ts.map +1 -1
- package/dist/demo/filters/table.store.js +35 -1
- package/dist/demo/filters/table.store.js.map +1 -1
- package/dist/demo/overview/product.d.ts +5 -0
- package/dist/demo/overview/product.d.ts.map +1 -1
- package/dist/demo/overview/products.d.ts.map +1 -1
- package/dist/demo/overview/products.js +12 -0
- package/dist/demo/overview/products.js.map +1 -1
- package/dist/demo/overview/table.store.d.ts.map +1 -1
- package/dist/demo/overview/table.store.js +1 -0
- package/dist/demo/overview/table.store.js.map +1 -1
- package/dist/filters/async-select/async-select-filter.d.ts +7 -3
- package/dist/filters/async-select/async-select-filter.d.ts.map +1 -1
- package/dist/filters/async-select/async-select-filter.js +21 -6
- package/dist/filters/async-select/async-select-filter.js.map +1 -1
- package/dist/filters/column-menu-filters.d.ts +10 -1
- package/dist/filters/column-menu-filters.d.ts.map +1 -1
- package/dist/filters/column-menu-filters.js +11 -3
- package/dist/filters/column-menu-filters.js.map +1 -1
- package/dist/filters/index.d.ts +1 -0
- package/dist/filters/index.d.ts.map +1 -1
- package/dist/filters/index.js +1 -0
- package/dist/filters/index.js.map +1 -1
- package/dist/filters/multiselect-filter/multiselect-filter.d.ts +4 -3
- package/dist/filters/multiselect-filter/multiselect-filter.d.ts.map +1 -1
- package/dist/filters/multiselect-filter/multiselect-filter.js +7 -7
- package/dist/filters/multiselect-filter/multiselect-filter.js.map +1 -1
- package/dist/filters/select-filter/object-search.d.ts +2 -0
- package/dist/filters/select-filter/object-search.d.ts.map +1 -0
- package/dist/filters/select-filter/object-search.js +19 -0
- package/dist/filters/select-filter/object-search.js.map +1 -0
- package/dist/filters/select-filter/select-filter.d.ts +32 -0
- package/dist/filters/select-filter/select-filter.d.ts.map +1 -0
- package/dist/filters/select-filter/select-filter.js +214 -0
- package/dist/filters/select-filter/select-filter.js.map +1 -0
- package/dist/filters/select-filter/select-filter.stories.d.ts +8 -0
- package/dist/filters/select-filter/select-filter.stories.d.ts.map +1 -0
- package/dist/filters/select-filter/select-filter.stories.js +8 -0
- package/dist/filters/select-filter/select-filter.stories.js.map +1 -0
- package/dist/filters/select-filter/value-getter.d.ts +3 -0
- package/dist/filters/select-filter/value-getter.d.ts.map +1 -0
- package/dist/filters/select-filter/value-getter.js +10 -0
- package/dist/filters/select-filter/value-getter.js.map +1 -0
- package/dist/filters/single-select/single-select-filter.d.ts +3 -2
- package/dist/filters/single-select/single-select-filter.d.ts.map +1 -1
- package/dist/filters/single-select/single-select-filter.js +17 -7
- package/dist/filters/single-select/single-select-filter.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/demo/filters/async-select-filter.tsx +1 -1
- package/src/demo/filters/categories.tsx +24 -0
- package/src/demo/filters/multiselect-filter.tsx +15 -0
- package/src/demo/filters/select-filter.tsx +147 -0
- package/src/demo/filters/single-select-filter.tsx +2 -1
- package/src/demo/filters/table.store.ts +45 -2
- package/src/demo/overview/product.ts +6 -0
- package/src/demo/overview/products.ts +12 -0
- package/src/demo/overview/table.store.ts +1 -0
- package/src/filters/async-select/async-select-filter.tsx +26 -15
- package/src/filters/column-menu-filters.tsx +44 -21
- package/src/filters/index.ts +1 -0
- package/src/filters/multiselect-filter/multiselect-filter.tsx +16 -7
- package/src/filters/select-filter/__tests__/object-search.test.ts +32 -0
- package/src/filters/select-filter/object-search.ts +25 -0
- package/src/filters/select-filter/select-filter.stories.tsx +8 -0
- package/src/filters/select-filter/select-filter.tsx +320 -0
- package/src/filters/select-filter/value-getter.ts +13 -0
- package/src/filters/single-select/single-select-filter.tsx +18 -10
- package/src/index.ts +1 -0
package/dist/filters/index.d.ts
CHANGED
@@ -8,4 +8,5 @@ export * from './multiselect-filter/multiselect-filter';
|
|
8
8
|
export * from './numeric-filter-extended/numeric-filter-extended';
|
9
9
|
export * from './single-select/single-select-filter';
|
10
10
|
export * from './async-select/async-select-filter';
|
11
|
+
export * from './select-filter/select-filter';
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qEAAqE,CAAC;AACpF,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yCAAyC,CAAC;AACxD,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qEAAqE,CAAC;AACpF,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yCAAyC,CAAC;AACxD,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC"}
|
package/dist/filters/index.js
CHANGED
@@ -8,4 +8,5 @@ export * from './multiselect-filter/multiselect-filter';
|
|
8
8
|
export * from './numeric-filter-extended/numeric-filter-extended';
|
9
9
|
export * from './single-select/single-select-filter';
|
10
10
|
export * from './async-select/async-select-filter';
|
11
|
+
export * from './select-filter/select-filter';
|
11
12
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qEAAqE,CAAC;AACpF,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yCAAyC,CAAC;AACxD,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qEAAqE,CAAC;AACpF,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yCAAyC,CAAC;AACxD,cAAc,mDAAmD,CAAC;AAClE,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
|
-
|
3
|
-
export declare function
|
4
|
-
export declare function
|
2
|
+
import { CustomColumnMenuFilterSingleOpts } from '../column-menu-filters';
|
3
|
+
export declare function multiSelectColumnMenuFilter<T>(data: T[], renderItem?: (item: T) => ReactNode, opts?: CustomColumnMenuFilterSingleOpts): (props: import("@servicetitan/design-system").TableColumnMenuProps) => JSX.Element;
|
4
|
+
export declare function complexItemMultiSelectColumnMenuFilter<T>(data: T[], renderItem?: (item: T) => ReactNode, opts?: CustomColumnMenuFilterSingleOpts): (props: import("@servicetitan/design-system").TableColumnMenuProps) => JSX.Element;
|
5
|
+
export declare function multiItemMultiSelectColumnMenuFilter<T>(data: T[], renderItem?: (item: T) => ReactNode, opts?: CustomColumnMenuFilterSingleOpts): (props: import("@servicetitan/design-system").TableColumnMenuProps) => JSX.Element;
|
5
6
|
//# sourceMappingURL=multiselect-filter.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"multiselect-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/multiselect-filter/multiselect-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAM,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"multiselect-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/multiselect-filter/multiselect-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAM,MAAM,OAAO,CAAC;AAIjE,OAAO,EACH,gCAAgC,EAEnC,MAAM,wBAAwB,CAAC;AAmChC,wBAAgB,2BAA2B,CAAC,CAAC,EACzC,IAAI,EAAE,CAAC,EAAE,EACT,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,EACnC,IAAI,CAAC,EAAE,gCAAgC,sFAsB1C;AAED,wBAAgB,sCAAsC,CAAC,CAAC,EACpD,IAAI,EAAE,CAAC,EAAE,EACT,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,EACnC,IAAI,CAAC,EAAE,gCAAgC,sFAgC1C;AAED,wBAAgB,oCAAoC,CAAC,CAAC,EAClD,IAAI,EAAE,CAAC,EAAE,EACT,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,EACnC,IAAI,CAAC,EAAE,gCAAgC,sFAgC1C"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { Component } from 'react';
|
3
3
|
import { Checkbox } from '@servicetitan/design-system';
|
4
|
-
import { renderCustomColumnMenuFilter } from '../column-menu-filters';
|
4
|
+
import { renderCustomColumnMenuFilter, } from '../column-menu-filters';
|
5
5
|
class Selector extends Component {
|
6
6
|
constructor() {
|
7
7
|
super(...arguments);
|
@@ -25,7 +25,7 @@ class Selector extends Component {
|
|
25
25
|
_jsx("span", Object.assign({ className: "k-widget m-b-1-i d-b" }, { children: _jsx(Checkbox, { value: option, label: renderer ? renderer(option) : option, checked: (value !== null && value !== void 0 ? value : []).includes(option), onChange: this.handleChange }) }), index)));
|
26
26
|
}
|
27
27
|
}
|
28
|
-
export function multiSelectColumnMenuFilter(data, renderItem) {
|
28
|
+
export function multiSelectColumnMenuFilter(data, renderItem, opts) {
|
29
29
|
const FilterCell = ({ value, onChange }) => {
|
30
30
|
const handleChange = (value, event) => {
|
31
31
|
onChange({
|
@@ -36,9 +36,9 @@ export function multiSelectColumnMenuFilter(data, renderItem) {
|
|
36
36
|
};
|
37
37
|
return (_jsx(Selector, { options: data, value: value === '' ? undefined : value, onChange: handleChange, renderer: renderItem }));
|
38
38
|
};
|
39
|
-
return renderCustomColumnMenuFilter(FilterCell);
|
39
|
+
return renderCustomColumnMenuFilter(FilterCell, opts);
|
40
40
|
}
|
41
|
-
export function complexItemMultiSelectColumnMenuFilter(data, renderItem) {
|
41
|
+
export function complexItemMultiSelectColumnMenuFilter(data, renderItem, opts) {
|
42
42
|
class FilterCell extends Component {
|
43
43
|
constructor() {
|
44
44
|
super(...arguments);
|
@@ -69,9 +69,9 @@ export function complexItemMultiSelectColumnMenuFilter(data, renderItem) {
|
|
69
69
|
return (_jsx(Selector, { options: data, value: value === '' ? undefined : value, onChange: this.handleChange, renderer: renderItem }));
|
70
70
|
}
|
71
71
|
}
|
72
|
-
return renderCustomColumnMenuFilter(FilterCell);
|
72
|
+
return renderCustomColumnMenuFilter(FilterCell, opts);
|
73
73
|
}
|
74
|
-
export function multiItemMultiSelectColumnMenuFilter(data, renderItem) {
|
74
|
+
export function multiItemMultiSelectColumnMenuFilter(data, renderItem, opts) {
|
75
75
|
class FilterCell extends Component {
|
76
76
|
constructor() {
|
77
77
|
super(...arguments);
|
@@ -102,6 +102,6 @@ export function multiItemMultiSelectColumnMenuFilter(data, renderItem) {
|
|
102
102
|
return (_jsx(Selector, { options: data, value: value === '' ? undefined : value, onChange: this.handleChange, renderer: renderItem }));
|
103
103
|
}
|
104
104
|
}
|
105
|
-
return renderCustomColumnMenuFilter(FilterCell);
|
105
|
+
return renderCustomColumnMenuFilter(FilterCell, opts);
|
106
106
|
}
|
107
107
|
//# sourceMappingURL=multiselect-filter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"multiselect-filter.js","sourceRoot":"","sources":["../../../src/filters/multiselect-filter/multiselect-filter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAwB,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE7E,OAAO,
|
1
|
+
{"version":3,"file":"multiselect-filter.js","sourceRoot":"","sources":["../../../src/filters/multiselect-filter/multiselect-filter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAwB,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE7E,OAAO,EAEH,4BAA4B,GAC/B,MAAM,wBAAwB,CAAC;AAShC,MAAM,QAAY,SAAQ,SAA2B;IAArD;;QACI;;;;mBAAe,CAAC,MAAS,EAAE,OAAgB,EAAE,KAAuC,EAAE,EAAE;;gBACpF,MAAM,QAAQ,GAAG,OAAO;oBACpB,CAAC,CAAC,CAAC,MAAA,IAA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AAQ,EAAE,UAAU,GACtB,CACL,CAAC;QACN,CAAC;KACJ;IAED,OAAO,4BAA4B,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC1D,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"object-search.d.ts","sourceRoot":"","sources":["../../../src/filters/select-filter/object-search.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,WAAY,MAAM,YAGzB,GAAG,KAAG,OAqBvB,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export const objectSearch = (search) => {
|
2
|
+
const s = search.toLowerCase().trim();
|
3
|
+
return (item) => {
|
4
|
+
if (!s) {
|
5
|
+
return true;
|
6
|
+
}
|
7
|
+
if (item === null) {
|
8
|
+
return false;
|
9
|
+
}
|
10
|
+
if (typeof item === 'string') {
|
11
|
+
return item.toLowerCase().includes(s);
|
12
|
+
}
|
13
|
+
if (typeof item === 'object') {
|
14
|
+
return Object.values(item).some(value => typeof value === 'string' ? value.toLowerCase().includes(s) : false);
|
15
|
+
}
|
16
|
+
return false;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=object-search.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"object-search.js","sourceRoot":"","sources":["../../../src/filters/select-filter/object-search.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,EAAE;IAC3C,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IAEtC,OAAO,CAAC,IAAS,EAAW,EAAE;QAC1B,IAAI,CAAC,CAAC,EAAE;YACJ,OAAO,IAAI,CAAC;SACf;QAED,IAAI,IAAI,KAAK,IAAI,EAAE;YACf,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC1B,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;SACzC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC1B,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CACpC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CACtE,CAAC;SACL;QAED,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC;AACN,CAAC,CAAC"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { IdType } from '@servicetitan/data-query';
|
3
|
+
import { CustomColumnMenuFilterSingleOpts } from '../column-menu-filters';
|
4
|
+
export declare type SelectFilterDataFetcher<TO> = (opts: {
|
5
|
+
search?: string;
|
6
|
+
}) => Promise<{
|
7
|
+
data: TO[];
|
8
|
+
}>;
|
9
|
+
export interface SelectFilterSearchOptions<TO = any> {
|
10
|
+
placeholder?: string;
|
11
|
+
filter(search: string): (item: TO) => boolean | undefined;
|
12
|
+
}
|
13
|
+
export interface SelectFilterOptions<TO> extends CustomColumnMenuFilterSingleOpts {
|
14
|
+
/** Can select multiple options in filter */
|
15
|
+
multiple?: boolean;
|
16
|
+
/** Ability to search options in filter */
|
17
|
+
search?: boolean | Partial<SelectFilterSearchOptions>;
|
18
|
+
/** Static options to show in filter */
|
19
|
+
data?: TO[];
|
20
|
+
/** Method to fetch filter options asynchronously */
|
21
|
+
dataFetcher?: SelectFilterDataFetcher<TO>;
|
22
|
+
/** Search operator passed to table state */
|
23
|
+
operator?: ((value: any, options?: TO[]) => boolean) | ((value: any, options?: TO) => boolean);
|
24
|
+
/** Select item value (ex id) for complex items */
|
25
|
+
valueSelector?(item: TO): IdType;
|
26
|
+
/** Select row item value (from table source row field) for complex items */
|
27
|
+
rowValueSelector?(item: any): IdType | undefined;
|
28
|
+
/** Render option label */
|
29
|
+
renderItem?(item: TO): ReactNode;
|
30
|
+
}
|
31
|
+
export declare function selectColumnMenuFilter<TO>({ dataFetcher, data, search, multiple, valueSelector, rowValueSelector, renderItem, operator, ...opts }: SelectFilterOptions<TO>): (props: import("@servicetitan/design-system").TableColumnMenuProps) => JSX.Element;
|
32
|
+
//# sourceMappingURL=select-filter.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"select-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/select-filter/select-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAA+B,MAAM,OAAO,CAAC;AAU1F,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACH,gCAAgC,EAEnC,MAAM,wBAAwB,CAAC;AAMhC,oBAAY,uBAAuB,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC;IAAE,IAAI,EAAE,EAAE,EAAE,CAAA;CAAE,CAAC,CAAC;AAEjG,MAAM,WAAW,yBAAyB,CAAC,EAAE,GAAG,GAAG;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,KAAK,OAAO,GAAG,SAAS,CAAC;CAC7D;AAqLD,MAAM,WAAW,mBAAmB,CAAC,EAAE,CAAE,SAAQ,gCAAgC;IAC7E,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACtD,uCAAuC;IACvC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;IACZ,oDAAoD;IACpD,WAAW,CAAC,EAAE,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAC1C,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,OAAO,CAAC,CAAC;IAC/F,kDAAkD;IAClD,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,MAAM,CAAC;IACjC,4EAA4E;IAC5E,gBAAgB,CAAC,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAAC;IACjD,0BAA0B;IAC1B,UAAU,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,SAAS,CAAC;CACpC;AAMD,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,EACvC,WAAW,EACX,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,aAA8B,EAC9B,gBAAiC,EACjC,UAAU,EACV,QAAQ,EACR,GAAG,IAAI,EACV,EAAE,mBAAmB,CAAC,EAAE,CAAC,sFA+EzB"}
|
@@ -0,0 +1,214 @@
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, 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 __metadata = (this && this.__metadata) || function (k, v) {
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
9
|
+
};
|
10
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
13
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
14
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
15
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
16
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17
|
+
});
|
18
|
+
};
|
19
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
20
|
+
var t = {};
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
22
|
+
t[p] = s[p];
|
23
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
24
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
25
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
26
|
+
t[p[i]] = s[p[i]];
|
27
|
+
}
|
28
|
+
return t;
|
29
|
+
};
|
30
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
31
|
+
import { Component, Fragment } from 'react';
|
32
|
+
import { Checkbox, Radio, Input, Spinner, BodyText, } from '@servicetitan/design-system';
|
33
|
+
import { renderCustomColumnMenuFilter, } from '../column-menu-filters';
|
34
|
+
import { makeObservable, observable, runInAction, toJS } from 'mobx';
|
35
|
+
import { observer } from 'mobx-react';
|
36
|
+
import { getSimpleValue } from './value-getter';
|
37
|
+
import { objectSearch } from './object-search';
|
38
|
+
let SelectorAsync = class SelectorAsync extends Component {
|
39
|
+
constructor(props) {
|
40
|
+
super(props);
|
41
|
+
Object.defineProperty(this, "shownOptions", {
|
42
|
+
enumerable: true,
|
43
|
+
configurable: true,
|
44
|
+
writable: true,
|
45
|
+
value: []
|
46
|
+
});
|
47
|
+
Object.defineProperty(this, "search", {
|
48
|
+
enumerable: true,
|
49
|
+
configurable: true,
|
50
|
+
writable: true,
|
51
|
+
value: ''
|
52
|
+
});
|
53
|
+
Object.defineProperty(this, "error", {
|
54
|
+
enumerable: true,
|
55
|
+
configurable: true,
|
56
|
+
writable: true,
|
57
|
+
value: false
|
58
|
+
});
|
59
|
+
Object.defineProperty(this, "loading", {
|
60
|
+
enumerable: true,
|
61
|
+
configurable: true,
|
62
|
+
writable: true,
|
63
|
+
value: false
|
64
|
+
});
|
65
|
+
Object.defineProperty(this, "handleKeyDown", {
|
66
|
+
enumerable: true,
|
67
|
+
configurable: true,
|
68
|
+
writable: true,
|
69
|
+
value: (event) => {
|
70
|
+
if (event.key === 'Enter') {
|
71
|
+
event.stopPropagation();
|
72
|
+
}
|
73
|
+
}
|
74
|
+
});
|
75
|
+
Object.defineProperty(this, "handleSearch", {
|
76
|
+
enumerable: true,
|
77
|
+
configurable: true,
|
78
|
+
writable: true,
|
79
|
+
value: (_0, data) => {
|
80
|
+
runInAction(() => (this.search = data.value));
|
81
|
+
this.searchOptions().catch();
|
82
|
+
}
|
83
|
+
});
|
84
|
+
Object.defineProperty(this, "searchOptions", {
|
85
|
+
enumerable: true,
|
86
|
+
configurable: true,
|
87
|
+
writable: true,
|
88
|
+
value: () => __awaiter(this, void 0, void 0, function* () {
|
89
|
+
if (this.props.dataFetcher) {
|
90
|
+
runInAction(() => {
|
91
|
+
this.loading = true;
|
92
|
+
});
|
93
|
+
}
|
94
|
+
try {
|
95
|
+
const data = yield this.getData();
|
96
|
+
runInAction(() => {
|
97
|
+
this.shownOptions = data;
|
98
|
+
this.error = false;
|
99
|
+
this.loading = false;
|
100
|
+
});
|
101
|
+
}
|
102
|
+
catch (_a) {
|
103
|
+
runInAction(() => {
|
104
|
+
this.error = true;
|
105
|
+
this.loading = false;
|
106
|
+
});
|
107
|
+
}
|
108
|
+
})
|
109
|
+
});
|
110
|
+
Object.defineProperty(this, "getItemKey", {
|
111
|
+
enumerable: true,
|
112
|
+
configurable: true,
|
113
|
+
writable: true,
|
114
|
+
value: (item, index) => {
|
115
|
+
return `${index}__${this.props.valueSelector(item)}`;
|
116
|
+
}
|
117
|
+
});
|
118
|
+
makeObservable(this);
|
119
|
+
}
|
120
|
+
componentDidMount() {
|
121
|
+
this.searchOptions().catch();
|
122
|
+
}
|
123
|
+
render() {
|
124
|
+
var _a;
|
125
|
+
const selectedOptions = this.props.selected;
|
126
|
+
const selected = new Set(selectedOptions.map(opt => this.props.valueSelector(opt)));
|
127
|
+
const ItemComponent = this.props.itemComponent;
|
128
|
+
return (_jsxs(Fragment, { children: [!!this.props.search && (_jsx(Input, { className: "m-x-half m-t-half m-b-2", placeholder: (_a = this.props.search) === null || _a === void 0 ? void 0 : _a.placeholder, onChange: this.handleSearch, onKeyDown: this.handleKeyDown, size: "xsmall", value: this.search })), _jsxs("div", Object.assign({ className: "p-x-half position-relative", onKeyDown: this.handleKeyDown }, { children: [!!selectedOptions.length && (_jsx("div", Object.assign({ className: "border-bottom m-y-half" }, { children: selectedOptions.map((option, index) => (_jsx(ItemComponent, { option: option, checked: true, renderer: this.props.renderItem, onChange: this.props.onChange }, this.getItemKey(option, index)))) }))), this.error ? (_jsx(BodyText, Object.assign({ className: "c-red-500" }, { children: "Unable to load options" }))) : this.shownOptions.length ? (this.shownOptions
|
129
|
+
.filter(opt => !selected.has(this.props.valueSelector(opt)))
|
130
|
+
.map((option, index) => (_jsx(ItemComponent, { option: option, checked: false, renderer: this.props.renderItem, onChange: this.props.onChange }, this.getItemKey(option, index))))) : this.loading ? (_jsx(BodyText, { children: "\u00A0" })) : (_jsx(BodyText, Object.assign({ subdued: true }, { children: "No options match search criteria" }))), this.loading && (_jsx("div", Object.assign({ className: "position-absolute top-0 bottom-0 left-0 right-0 opacity-disabled bg-white d-f justify-content-center" }, { children: _jsx(Spinner, { size: "tiny" }) })))] }))] }));
|
131
|
+
}
|
132
|
+
getData() {
|
133
|
+
var _a, _b;
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
135
|
+
if (this.props.dataFetcher) {
|
136
|
+
const { data } = yield this.props.dataFetcher({
|
137
|
+
search: this.search,
|
138
|
+
});
|
139
|
+
return data;
|
140
|
+
}
|
141
|
+
let data = (_a = this.props.data) !== null && _a !== void 0 ? _a : [];
|
142
|
+
if ((_b = this.props.search) === null || _b === void 0 ? void 0 : _b.filter) {
|
143
|
+
data = data.filter(this.props.search.filter(this.search));
|
144
|
+
}
|
145
|
+
return data;
|
146
|
+
});
|
147
|
+
}
|
148
|
+
};
|
149
|
+
__decorate([
|
150
|
+
observable,
|
151
|
+
__metadata("design:type", Array)
|
152
|
+
], SelectorAsync.prototype, "shownOptions", void 0);
|
153
|
+
__decorate([
|
154
|
+
observable,
|
155
|
+
__metadata("design:type", Object)
|
156
|
+
], SelectorAsync.prototype, "search", void 0);
|
157
|
+
__decorate([
|
158
|
+
observable,
|
159
|
+
__metadata("design:type", Object)
|
160
|
+
], SelectorAsync.prototype, "error", void 0);
|
161
|
+
__decorate([
|
162
|
+
observable,
|
163
|
+
__metadata("design:type", Object)
|
164
|
+
], SelectorAsync.prototype, "loading", void 0);
|
165
|
+
SelectorAsync = __decorate([
|
166
|
+
observer,
|
167
|
+
__metadata("design:paramtypes", [Object])
|
168
|
+
], SelectorAsync);
|
169
|
+
const SelectorItemSingle = ({ option, renderer, checked, onChange, }) => {
|
170
|
+
var _a;
|
171
|
+
return (_jsx(Radio, { label: (_a = renderer === null || renderer === void 0 ? void 0 : renderer(option)) !== null && _a !== void 0 ? _a : `${option}`, checked: checked, onChange: (_, event) => onChange(option, true, event), className: "m-b-1" }));
|
172
|
+
};
|
173
|
+
const SelectorItemMultiple = ({ option, renderer, checked, onChange, }) => {
|
174
|
+
var _a;
|
175
|
+
return (_jsx(Checkbox, { label: (_a = renderer === null || renderer === void 0 ? void 0 : renderer(option)) !== null && _a !== void 0 ? _a : `${option}`, checked: checked, onChange: (_, checked, event) => onChange(option, checked, event), className: "m-b-1" }));
|
176
|
+
};
|
177
|
+
export function selectColumnMenuFilter(_a) {
|
178
|
+
var { dataFetcher, data, search, multiple, valueSelector = getSimpleValue, rowValueSelector = getSimpleValue, renderItem, operator } = _a, opts = __rest(_a, ["dataFetcher", "data", "search", "multiple", "valueSelector", "rowValueSelector", "renderItem", "operator"]);
|
179
|
+
const renderer = renderItem !== null && renderItem !== void 0 ? renderItem : (item => valueSelector(item));
|
180
|
+
const contains = (value, options) => options === null || options === void 0 ? void 0 : options.some(opt => valueSelector(opt) === rowValueSelector(value));
|
181
|
+
const equals = (value, option) => option === undefined ? false : valueSelector(option) === rowValueSelector(value);
|
182
|
+
const searchOptions = search
|
183
|
+
? Object.assign({ filter: objectSearch }, (typeof search === 'boolean' ? {} : search)) : undefined;
|
184
|
+
if (multiple) {
|
185
|
+
const FilterCell = ({ value, onChange }) => {
|
186
|
+
const handleChange = (option, checked, event) => {
|
187
|
+
const val = checked
|
188
|
+
? (value !== null && value !== void 0 ? value : []).concat(option)
|
189
|
+
: (value !== null && value !== void 0 ? value : []).filter(opt => valueSelector
|
190
|
+
? valueSelector(opt) !== valueSelector(option)
|
191
|
+
: option !== opt);
|
192
|
+
onChange({
|
193
|
+
value: val.length ? toJS(val) : undefined,
|
194
|
+
operator: val.length ? operator !== null && operator !== void 0 ? operator : contains : '',
|
195
|
+
syntheticEvent: event,
|
196
|
+
});
|
197
|
+
};
|
198
|
+
return (_jsx(SelectorAsync, { selected: value !== null && value !== void 0 ? value : [], itemComponent: SelectorItemMultiple, onChange: handleChange, search: searchOptions, renderItem: renderer, dataFetcher: dataFetcher, data: data, valueSelector: valueSelector }));
|
199
|
+
};
|
200
|
+
return renderCustomColumnMenuFilter(FilterCell, opts);
|
201
|
+
}
|
202
|
+
const FilterCell = ({ value, onChange }) => {
|
203
|
+
const handleChange = (option, _, event) => {
|
204
|
+
onChange({
|
205
|
+
value: toJS(option),
|
206
|
+
operator: operator !== null && operator !== void 0 ? operator : equals,
|
207
|
+
syntheticEvent: event,
|
208
|
+
});
|
209
|
+
};
|
210
|
+
return (_jsx(SelectorAsync, { selected: value ? [value] : [], onChange: handleChange, itemComponent: SelectorItemSingle, search: searchOptions, renderItem: renderer, dataFetcher: dataFetcher, data: data, valueSelector: valueSelector }));
|
211
|
+
};
|
212
|
+
return renderCustomColumnMenuFilter(FilterCell, opts);
|
213
|
+
}
|
214
|
+
//# sourceMappingURL=select-filter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"select-filter.js","sourceRoot":"","sources":["../../../src/filters/select-filter/select-filter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAA6B,QAAQ,EAAqB,MAAM,OAAO,CAAC;AAE1F,OAAO,EACH,QAAQ,EAER,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,GACX,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAEH,4BAA4B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA4B/C,IAAM,aAAa,GAAnB,MAAM,aAAkB,SAAQ,SAA4B;IAMxD,YAAY,KAAwB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;QANL;;;;mBAAqB,EAAE;WAAC;QACxB;;;;mBAAS,EAAE;WAAC;QACZ;;;;mBAAQ,KAAK;WAAC;QACd;;;;mBAAU,KAAK;WAAC;QAW5B;;;;mBAAgB,CAAC,KAAsC,EAAE,EAAE;gBACvD,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,EAAE;oBACvB,KAAK,CAAC,eAAe,EAAE,CAAC;iBAC3B;YACL,CAAC;WAAC;QAEF;;;;mBAAe,CAAC,EAAoC,EAAE,IAAuB,EAAE,EAAE;gBAC7E,WAAW,CAAC,GAAG,EAAE,CA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AAI,EACV,aAAa,EAAE,aAAa,GAC9B,CACL,CAAC;IACN,CAAC,CAAC;IAEF,OAAO,4BAA4B,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC1D,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare const _default: {
|
3
|
+
title: string;
|
4
|
+
};
|
5
|
+
export default _default;
|
6
|
+
export declare const AsyncSelect: () => JSX.Element;
|
7
|
+
export declare const SyncSelect: () => JSX.Element;
|
8
|
+
//# sourceMappingURL=select-filter.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"select-filter.stories.d.ts","sourceRoot":"","sources":["../../../src/filters/select-filter/select-filter.stories.tsx"],"names":[],"mappings":";;;;AAEA,wBAEE;AAEF,eAAO,MAAM,WAAW,mBAA+B,CAAC;AACxD,eAAO,MAAM,UAAU,mBAA8B,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { SelectAsyncExample, SelectSyncExample } from '../../demo/filters/select-filter';
|
3
|
+
export default {
|
4
|
+
title: 'Table/Filters/Select',
|
5
|
+
};
|
6
|
+
export const AsyncSelect = () => _jsx(SelectAsyncExample, {});
|
7
|
+
export const SyncSelect = () => _jsx(SelectSyncExample, {});
|
8
|
+
//# sourceMappingURL=select-filter.stories.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"select-filter.stories.js","sourceRoot":"","sources":["../../../src/filters/select-filter/select-filter.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAEzF,eAAe;IACX,KAAK,EAAE,sBAAsB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,KAAC,kBAAkB,KAAG,CAAC;AACxD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,KAAC,iBAAiB,KAAG,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"value-getter.d.ts","sourceRoot":"","sources":["../../../src/filters/select-filter/value-getter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAO,MAAM,cAAc,SAAU,GAAG,KAAG,MAU1C,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"value-getter.js","sourceRoot":"","sources":["../../../src/filters/select-filter/value-getter.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAS,EAAU,EAAE;IAChD,IAAI,IAAI,KAAK,IAAI,EAAE;QACf,OAAO,IAAI,CAAC;KACf;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;QACxD,OAAO,GAAG,IAAI,EAAE,CAAC;KACpB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC"}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
import { IdType } from '@servicetitan/data-query';
|
3
|
-
|
3
|
+
import { CustomColumnMenuFilterSingleOpts } from '../column-menu-filters';
|
4
|
+
export interface SingleSelectColumnMenuOptions<TV, TO = TV> extends CustomColumnMenuFilterSingleOpts {
|
4
5
|
options: TO[];
|
5
6
|
valueSelector?: (item: TO) => TV;
|
6
7
|
renderItem?: (item: TO) => ReactNode | string;
|
7
8
|
filterOperator?: (listItem: any, value: TV) => boolean;
|
8
9
|
}
|
9
|
-
export declare function singleSelectColumnMenuFilter<TV extends IdType, TO = TV>(
|
10
|
+
export declare function singleSelectColumnMenuFilter<TV extends IdType, TO = TV>({ options, valueSelector, renderItem, filterOperator, ...opts }: SingleSelectColumnMenuOptions<TV, TO>): (props: import("@servicetitan/design-system").TableColumnMenuProps) => JSX.Element;
|
10
11
|
//# sourceMappingURL=single-select-filter.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"single-select-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/single-select/single-select-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAM,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"single-select-filter.d.ts","sourceRoot":"","sources":["../../../src/filters/single-select/single-select-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAM,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACH,gCAAgC,EAEnC,MAAM,wBAAwB,CAAC;AA8BhC,MAAM,WAAW,6BAA6B,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CACtD,SAAQ,gCAAgC;IACxC,OAAO,EAAE,EAAE,EAAE,CAAC;IACd,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,SAAS,GAAG,MAAM,CAAC;IAC9C,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,KAAK,OAAO,CAAC;CAC1D;AAED,wBAAgB,4BAA4B,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EACrE,OAAO,EACP,aAAa,EACb,UAAU,EACV,cAAc,EACd,GAAG,IAAI,EACV,EAAE,6BAA6B,CAAC,EAAE,EAAE,EAAE,CAAC,sFA6BvC"}
|
@@ -1,7 +1,18 @@
|
|
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
|
+
};
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
13
|
import { Component } from 'react';
|
3
14
|
import { Radio } from '@servicetitan/design-system';
|
4
|
-
import { renderCustomColumnMenuFilter } from '../column-menu-filters';
|
15
|
+
import { renderCustomColumnMenuFilter, } from '../column-menu-filters';
|
5
16
|
class SelectorRadio extends Component {
|
6
17
|
render() {
|
7
18
|
const { options, value, renderer } = this.props;
|
@@ -13,21 +24,20 @@ class SelectorRadio extends Component {
|
|
13
24
|
});
|
14
25
|
}
|
15
26
|
}
|
16
|
-
export function singleSelectColumnMenuFilter(
|
27
|
+
export function singleSelectColumnMenuFilter(_a) {
|
28
|
+
var { options, valueSelector, renderItem, filterOperator } = _a, opts = __rest(_a, ["options", "valueSelector", "renderItem", "filterOperator"]);
|
17
29
|
const FilterCell = ({ value, onChange }) => {
|
18
|
-
var _a;
|
19
30
|
const handleChange = (value, event) => {
|
20
|
-
var _a;
|
21
31
|
const filter = value === undefined
|
22
32
|
? { value: '', operator: '' }
|
23
33
|
: {
|
24
34
|
value,
|
25
|
-
operator:
|
35
|
+
operator: filterOperator !== null && filterOperator !== void 0 ? filterOperator : 'equals',
|
26
36
|
};
|
27
37
|
onChange(Object.assign(Object.assign({}, filter), { syntheticEvent: event }));
|
28
38
|
};
|
29
|
-
return (_jsx(SelectorRadio, { options:
|
39
|
+
return (_jsx(SelectorRadio, { options: options, value: value === '' ? undefined : value, onChange: handleChange, renderer: renderItem, valueSelector: valueSelector !== null && valueSelector !== void 0 ? valueSelector : (option => option) }));
|
30
40
|
};
|
31
|
-
return renderCustomColumnMenuFilter(FilterCell);
|
41
|
+
return renderCustomColumnMenuFilter(FilterCell, opts);
|
32
42
|
}
|
33
43
|
//# sourceMappingURL=single-select-filter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"single-select-filter.js","sourceRoot":"","sources":["../../../src/filters/single-select/single-select-filter.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"single-select-filter.js","sourceRoot":"","sources":["../../../src/filters/single-select/single-select-filter.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAwB,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAEH,4BAA4B,GAC/B,MAAM,wBAAwB,CAAC;AAUhC,MAAM,aAAsB,SAAQ,SAAgC;IAChE,MAAM;QACF,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEhD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACjC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YACrD,OAAO;YACH,oDAAoD;YACpD,6BAAkB,SAAS,EAAC,sBAAsB,gBAC9C,KAAC,KAAK,IACF,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,EAChD,OAAO,EAAE,KAAK,KAAK,WAAW,EAC9B,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,GACjE,KALK,KAAK,CAMT,CACV,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAUD,MAAM,UAAU,4BAA4B,CAA6B,EAMjC;QANiC,EACrE,OAAO,EACP,aAAa,EACb,UAAU,EACV,cAAc,OAEsB,EADjC,IAAI,cAL8D,4DAMxE,CADU;IAEP,MAAM,UAAU,GAA6B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;QACjE,MAAM,YAAY,GAAG,CAAC,KAAqB,EAAE,KAAuC,EAAE,EAAE;YACpF,MAAM,MAAM,GACR,KAAK,KAAK,SAAS;gBACf,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;gBAC7B,CAAC,CAAC;oBACI,KAAK;oBACL,QAAQ,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,QAAQ;iBACvC,CAAC;YAEZ,QAAQ,iCACD,MAAM,KACT,cAAc,EAAE,KAAK,IACvB,CAAC;QACP,CAAC,CAAC;QAEF,OAAO,CACH,KAAC,aAAa,IACV,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EACvC,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,UAAU,EACpB,aAAa,EAAE,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GACpD,CACL,CAAC;IACN,CAAC,CAAC;IAEF,OAAO,4BAA4B,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC1D,CAAC"}
|
package/dist/index.d.ts
CHANGED
@@ -6,7 +6,7 @@ export * from './export';
|
|
6
6
|
export * from './select-cell';
|
7
7
|
export * from './use-observing-table-state';
|
8
8
|
export * from './utils/filters';
|
9
|
-
export { TableColumn, TableColumnProps, TableColumnMenuProps, TableColumnMenuFilter, TableColumnReorderEvent, TableCell, TableHeaderCellProps, TableRowProps, TableRowClickEvent, TableDetailRow, TableDetailRowProps, TableExpandChangeEvent, TableToolbar, TableNoRecords, TableFilterCellProps, TableFilterChangeEvent, } from '@servicetitan/design-system';
|
9
|
+
export { TableColumn, TableColumnProps, TableColumnMenuProps, TableColumnMenuFilter, TableColumnReorderEvent, TableCell, TableHeaderCellProps, TableHeaderCell, TableRowProps, TableRowClickEvent, TableDetailRow, TableDetailRowProps, TableExpandChangeEvent, TableToolbar, TableNoRecords, TableFilterCellProps, TableFilterChangeEvent, } from '@servicetitan/design-system';
|
10
10
|
export { GridColumnMenuFilterUIProps as TableColumnMenuFilterUIProps } from '@progress/kendo-react-grid/dist/npm/interfaces/GridColumnMenuFilterUIProps';
|
11
11
|
export { IdType, DataSource, InMemoryDataSource, AsyncDataSource } from '@servicetitan/data-query';
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,SAAS,EACT,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,sBAAsB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,2BAA2B,IAAI,4BAA4B,EAAE,MAAM,4EAA4E,CAAC;AAEzJ,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACH,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,SAAS,EACT,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,sBAAsB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,2BAA2B,IAAI,4BAA4B,EAAE,MAAM,4EAA4E,CAAC;AAEzJ,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
@@ -6,6 +6,6 @@ export * from './export';
|
|
6
6
|
export * from './select-cell';
|
7
7
|
export * from './use-observing-table-state';
|
8
8
|
export * from './utils/filters';
|
9
|
-
export { TableColumn, TableColumnMenuFilter, TableCell, TableDetailRow, TableToolbar, TableNoRecords, } from '@servicetitan/design-system';
|
9
|
+
export { TableColumn, TableColumnMenuFilter, TableCell, TableHeaderCell, TableDetailRow, TableToolbar, TableNoRecords, } from '@servicetitan/design-system';
|
10
10
|
export { InMemoryDataSource, AsyncDataSource } from '@servicetitan/data-query';
|
11
11
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACH,WAAW,EAGX,qBAAqB,EAErB,SAAS,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACH,WAAW,EAGX,qBAAqB,EAErB,SAAS,EAET,eAAe,EAGf,cAAc,EAGd,YAAY,EACZ,cAAc,GAGjB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAsB,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|