@servicetitan/table 21.7.1 → 22.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +550 -0
- package/package.json +8 -8
- package/dist/demo/index.d.ts +0 -4
- package/dist/demo/index.d.ts.map +0 -1
- package/dist/demo/index.js +0 -4
- package/dist/demo/index.js.map +0 -1
- package/dist/demo/master-detail/detail-table.d.ts +0 -4
- package/dist/demo/master-detail/detail-table.d.ts.map +0 -1
- package/dist/demo/master-detail/detail-table.js +0 -28
- package/dist/demo/master-detail/detail-table.js.map +0 -1
- package/dist/demo/master-detail/detail-table.store.d.ts +0 -14
- package/dist/demo/master-detail/detail-table.store.d.ts.map +0 -1
- package/dist/demo/master-detail/detail-table.store.js +0 -104
- package/dist/demo/master-detail/detail-table.store.js.map +0 -1
- package/dist/demo/master-detail/index.d.ts +0 -2
- package/dist/demo/master-detail/index.d.ts.map +0 -1
- package/dist/demo/master-detail/index.js +0 -2
- package/dist/demo/master-detail/index.js.map +0 -1
- package/dist/demo/master-detail/master-table.store.d.ts +0 -14
- package/dist/demo/master-detail/master-table.store.d.ts.map +0 -1
- package/dist/demo/master-detail/master-table.store.js +0 -103
- package/dist/demo/master-detail/master-table.store.js.map +0 -1
- package/dist/demo/master-detail/product-detail.d.ts +0 -8
- package/dist/demo/master-detail/product-detail.d.ts.map +0 -1
- package/dist/demo/master-detail/product-detail.js +0 -2
- package/dist/demo/master-detail/product-detail.js.map +0 -1
- package/dist/demo/master-detail/product-details.d.ts +0 -3
- package/dist/demo/master-detail/product-details.d.ts.map +0 -1
- package/dist/demo/master-detail/product-details.js +0 -55
- package/dist/demo/master-detail/product-details.js.map +0 -1
- package/dist/demo/master-detail/product.d.ts +0 -26
- package/dist/demo/master-detail/product.d.ts.map +0 -1
- package/dist/demo/master-detail/product.js +0 -16
- package/dist/demo/master-detail/product.js.map +0 -1
- package/dist/demo/master-detail/products.d.ts +0 -3
- package/dist/demo/master-detail/products.d.ts.map +0 -1
- package/dist/demo/master-detail/products.js +0 -117
- package/dist/demo/master-detail/products.js.map +0 -1
- package/dist/demo/master-detail/table-master-detail.d.ts +0 -3
- package/dist/demo/master-detail/table-master-detail.d.ts.map +0 -1
- package/dist/demo/master-detail/table-master-detail.js +0 -24
- package/dist/demo/master-detail/table-master-detail.js.map +0 -1
- package/dist/demo/overview/actions-cell.d.ts +0 -5
- package/dist/demo/overview/actions-cell.d.ts.map +0 -1
- package/dist/demo/overview/actions-cell.js +0 -38
- package/dist/demo/overview/actions-cell.js.map +0 -1
- package/dist/demo/overview/index.d.ts +0 -2
- package/dist/demo/overview/index.d.ts.map +0 -1
- package/dist/demo/overview/index.js +0 -2
- package/dist/demo/overview/index.js.map +0 -1
- package/dist/demo/overview/product.d.ts +0 -27
- package/dist/demo/overview/product.d.ts.map +0 -1
- package/dist/demo/overview/product.js +0 -16
- package/dist/demo/overview/product.js.map +0 -1
- package/dist/demo/overview/products.d.ts +0 -3
- package/dist/demo/overview/products.d.ts.map +0 -1
- package/dist/demo/overview/products.js +0 -127
- package/dist/demo/overview/products.js.map +0 -1
- package/dist/demo/overview/table.d.ts +0 -6
- package/dist/demo/overview/table.d.ts.map +0 -1
- package/dist/demo/overview/table.js +0 -44
- package/dist/demo/overview/table.js.map +0 -1
- package/dist/demo/overview/table.store.d.ts +0 -15
- package/dist/demo/overview/table.store.d.ts.map +0 -1
- package/dist/demo/overview/table.store.js +0 -92
- package/dist/demo/overview/table.store.js.map +0 -1
- package/dist/demo/state-caching/beverages.d.ts +0 -3
- package/dist/demo/state-caching/beverages.d.ts.map +0 -1
- package/dist/demo/state-caching/beverages.js +0 -48
- package/dist/demo/state-caching/beverages.js.map +0 -1
- package/dist/demo/state-caching/index.d.ts +0 -2
- package/dist/demo/state-caching/index.d.ts.map +0 -1
- package/dist/demo/state-caching/index.js +0 -2
- package/dist/demo/state-caching/index.js.map +0 -1
- package/dist/demo/state-caching/product.d.ts +0 -6
- package/dist/demo/state-caching/product.d.ts.map +0 -1
- package/dist/demo/state-caching/product.js +0 -2
- package/dist/demo/state-caching/product.js.map +0 -1
- package/dist/demo/state-caching/products.d.ts +0 -3
- package/dist/demo/state-caching/products.d.ts.map +0 -1
- package/dist/demo/state-caching/products.js +0 -53
- package/dist/demo/state-caching/products.js.map +0 -1
- package/dist/demo/state-caching/state-caching-table.d.ts +0 -3
- package/dist/demo/state-caching/state-caching-table.d.ts.map +0 -1
- package/dist/demo/state-caching/state-caching-table.js +0 -14
- package/dist/demo/state-caching/state-caching-table.js.map +0 -1
- package/dist/demo/state-caching/state-caching-table.store.d.ts +0 -13
- package/dist/demo/state-caching/state-caching-table.store.d.ts.map +0 -1
- package/dist/demo/state-caching/state-caching-table.store.js +0 -70
- package/dist/demo/state-caching/state-caching-table.store.js.map +0 -1
- package/dist/editable-cell/boolean-editable-cell.d.ts +0 -3
- package/dist/editable-cell/boolean-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/boolean-editable-cell.js +0 -14
- package/dist/editable-cell/boolean-editable-cell.js.map +0 -1
- package/dist/editable-cell/date-editable-cell.d.ts +0 -3
- package/dist/editable-cell/date-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/date-editable-cell.js +0 -14
- package/dist/editable-cell/date-editable-cell.js.map +0 -1
- package/dist/editable-cell/get-action-cell.d.ts +0 -13
- package/dist/editable-cell/get-action-cell.d.ts.map +0 -1
- package/dist/editable-cell/get-action-cell.js +0 -18
- package/dist/editable-cell/get-action-cell.js.map +0 -1
- package/dist/editable-cell/get-editable-cell.d.ts +0 -13
- package/dist/editable-cell/get-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/get-editable-cell.js +0 -18
- package/dist/editable-cell/get-editable-cell.js.map +0 -1
- package/dist/editable-cell/get-select-editable-cell.d.ts +0 -10
- package/dist/editable-cell/get-select-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/get-select-editable-cell.js +0 -19
- package/dist/editable-cell/get-select-editable-cell.js.map +0 -1
- package/dist/editable-cell/index.d.ts +0 -8
- package/dist/editable-cell/index.d.ts.map +0 -1
- package/dist/editable-cell/index.js +0 -8
- package/dist/editable-cell/index.js.map +0 -1
- package/dist/editable-cell/numeric-editable-cell.d.ts +0 -3
- package/dist/editable-cell/numeric-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/numeric-editable-cell.js +0 -15
- package/dist/editable-cell/numeric-editable-cell.js.map +0 -1
- package/dist/editable-cell/text-editable-cell.d.ts +0 -9
- package/dist/editable-cell/text-editable-cell.d.ts.map +0 -1
- package/dist/editable-cell/text-editable-cell.js +0 -20
- package/dist/editable-cell/text-editable-cell.js.map +0 -1
- package/dist/export/export.d.ts +0 -10
- package/dist/export/export.d.ts.map +0 -1
- package/dist/export/export.js +0 -6
- package/dist/export/export.js.map +0 -1
- package/dist/export/index.d.ts +0 -2
- package/dist/export/index.d.ts.map +0 -1
- package/dist/export/index.js +0 -2
- package/dist/export/index.js.map +0 -1
- package/dist/filters/column-menu-filters.d.ts +0 -5
- package/dist/filters/column-menu-filters.d.ts.map +0 -1
- package/dist/filters/column-menu-filters.js +0 -9
- package/dist/filters/column-menu-filters.js.map +0 -1
- package/dist/filters/datetime-filter/datetime-filter.d.ts +0 -3
- package/dist/filters/datetime-filter/datetime-filter.d.ts.map +0 -1
- package/dist/filters/datetime-filter/datetime-filter.js +0 -71
- package/dist/filters/datetime-filter/datetime-filter.js.map +0 -1
- package/dist/filters/field-values-filter.d.ts +0 -6
- package/dist/filters/field-values-filter.d.ts.map +0 -1
- package/dist/filters/field-values-filter.js +0 -155
- package/dist/filters/field-values-filter.js.map +0 -1
- package/dist/filters/index.d.ts +0 -9
- package/dist/filters/index.d.ts.map +0 -1
- package/dist/filters/index.js +0 -9
- package/dist/filters/index.js.map +0 -1
- package/dist/filters/multiselect-filter.d.ts +0 -5
- package/dist/filters/multiselect-filter.d.ts.map +0 -1
- package/dist/filters/multiselect-filter.js +0 -107
- package/dist/filters/multiselect-filter.js.map +0 -1
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts +0 -6
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.d.ts.map +0 -1
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.js +0 -6
- package/dist/filters/numeric-filter-extended/numeric-extended-operators.js.map +0 -1
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts +0 -3
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.d.ts.map +0 -1
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js +0 -27
- package/dist/filters/numeric-filter-extended/numeric-filter-extended.js.map +0 -1
- package/dist/filters/range-filter/range-filter.d.ts +0 -6
- package/dist/filters/range-filter/range-filter.d.ts.map +0 -1
- package/dist/filters/range-filter/range-filter.js +0 -117
- package/dist/filters/range-filter/range-filter.js.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts +0 -21
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.d.ts.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js +0 -82
- package/dist/filters/standard-filter-with-multiselect/filter-cell-ext.js.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts +0 -6
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.d.ts.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js +0 -6
- package/dist/filters/standard-filter-with-multiselect/multiselect-operators.js.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts +0 -26
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js +0 -69
- package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts +0 -6
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.d.ts.map +0 -1
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js +0 -30
- package/dist/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.js.map +0 -1
- package/dist/filters/time-filter/time-filter.d.ts +0 -3
- package/dist/filters/time-filter/time-filter.d.ts.map +0 -1
- package/dist/filters/time-filter/time-filter.js +0 -71
- package/dist/filters/time-filter/time-filter.js.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +0 -1
- package/dist/select-cell/index.d.ts +0 -2
- package/dist/select-cell/index.d.ts.map +0 -1
- package/dist/select-cell/index.js +0 -2
- package/dist/select-cell/index.js.map +0 -1
- package/dist/select-cell/select-cell.d.ts +0 -25
- package/dist/select-cell/select-cell.d.ts.map +0 -1
- package/dist/select-cell/select-cell.js +0 -35
- package/dist/select-cell/select-cell.js.map +0 -1
- package/dist/table-state.d.ts +0 -161
- package/dist/table-state.d.ts.map +0 -1
- package/dist/table-state.js +0 -1106
- package/dist/table-state.js.map +0 -1
- package/dist/table.d.ts +0 -40
- package/dist/table.d.ts.map +0 -1
- package/dist/table.js +0 -231
- package/dist/table.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"filter-cell-ext.js","sourceRoot":"","sources":["../../../src/filters/standard-filter-with-multiselect/filter-cell-ext.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEtF,OAAO,EACH,YAAY,EAEZ,WAAW,GAKd,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EACH,aAAa,EACb,kBAAkB,GACrB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAC;AAuBvD,kGAAkG;AAClG,MAAM,CAAC,MAAM,aAAa,GAA2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E,KAAK,CAAC,YAAY,EAClC,WAAW,EAAE,cAAc,EAC3B,IAAI,EAAE,KAAK,CAAC,qBAAqB,EACjC,SAAS,EAAC,MAAM,EAChB,WAAW,EAAC,OAAO,EACnB,MAAM,EAAE,cAAc,IAAI,cAAK,SAAS,EAAE,MAAM,CAAC,mBAAmB,GAAI,EACxE,MAAM,EACF,cAAc,CAAC,CAAC,CAAC,CACb,6BAAK,SAAS,EAAE,MAAM,CAAC,WAAW,iBAC9B,KAAC,IAAI,IAAC,IAAI,EAAC,iBAAiB,GAAG,yBAE7B,CACT,CAAC,CAAC,CAAC,CACA,KAAK,CAAC,eAAe,IAAI,CACrB,6BAAK,SAAS,EAAE,MAAM,CAAC,WAAW,2BACvB,KAAK,CAAC,eAAe,yBAAoB,cAAM,yCAEpD,CACT,CACJ,EAEL,UAAU,EAAE,qBAAqB,EACjC,SAAS,EAAE,oBAAoB,EAC/B,gBAAgB,EAAE,2BAA2B,GAC/C,CACL,CAAC,CAAC,CAAC,CACA,gBAAO,SAAS,EAAC,WAAW,EAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,iBAAiB,GAAI,CACnF,CAAC,IACJ,CACT,CAAC;AACN,CAAC,CAAC,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"multiselect-operators.d.ts","sourceRoot":"","sources":["../../../src/filters/standard-filter-with-multiselect/multiselect-operators.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;GAGhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,aAAc,MAAM,GAAG,QAAQ,YACN,CAAC"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
export const multiselectOperators = [
|
2
|
-
{ text: 'Is one of', operator: 'in' },
|
3
|
-
{ text: 'Is not one of', operator: 'notin' },
|
4
|
-
];
|
5
|
-
export const isMultiselectOperator = (operator) => multiselectOperators.some(o => o.operator === operator);
|
6
|
-
//# sourceMappingURL=multiselect-operators.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"multiselect-operators.js","sourceRoot":"","sources":["../../../src/filters/standard-filter-with-multiselect/multiselect-operators.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE;IACrC,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAA2B,EAAE,EAAE,CACjE,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC"}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { TableColumnMenuProps } from '@servicetitan/design-system';
|
3
|
-
import { IdType } from '@servicetitan/data-query';
|
4
|
-
import { TableState } from '../../table-state';
|
5
|
-
import { FilterCellExtProps } from './filter-cell-ext';
|
6
|
-
declare type AcceptableOption = string | number | {
|
7
|
-
value: any;
|
8
|
-
text: string;
|
9
|
-
};
|
10
|
-
interface OptionsConfig<T, TId extends IdType = never> {
|
11
|
-
tableState?: TableState<T, TId>;
|
12
|
-
maxExtractedLength?: number;
|
13
|
-
options?: AcceptableOption[];
|
14
|
-
}
|
15
|
-
interface FilterCellConfig {
|
16
|
-
maxFoundValues?: number;
|
17
|
-
allowCustomValues?: boolean;
|
18
|
-
handleCustomValuesAsNumber?: boolean;
|
19
|
-
onlyMultiselectAndEmptyOperators?: boolean;
|
20
|
-
multiselectItemRender?: FilterCellExtProps['multiselectItemRender'];
|
21
|
-
multiselectTagRender?: FilterCellExtProps['multiselectTagRender'];
|
22
|
-
multiselectListNoDataRender?: FilterCellExtProps['multiselectListNoDataRender'];
|
23
|
-
}
|
24
|
-
export declare function standardFilterWithMultiselect<T, TId extends IdType = never>(optionsConfig?: OptionsConfig<T, TId>, filterCellConfig?: FilterCellConfig): (props: TableColumnMenuProps) => JSX.Element;
|
25
|
-
export {};
|
26
|
-
//# sourceMappingURL=standard-filter-with-multiselect.d.ts.map
|
package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"standard-filter-with-multiselect.d.ts","sourceRoot":"","sources":["../../../src/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAiB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGtE,aAAK,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvE,UAAU,aAAa,CAAC,CAAC,EAAE,GAAG,SAAS,MAAM,GAAG,KAAK;IAEjD,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAEhC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAED,UAAU,gBAAgB;IAEtB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAE3C,qBAAqB,CAAC,EAAE,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;IAEpE,oBAAoB,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAElE,2BAA2B,CAAC,EAAE,kBAAkB,CAAC,6BAA6B,CAAC,CAAC;CACnF;AAOD,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,GAAG,SAAS,MAAM,GAAG,KAAK,EACvE,aAAa,GAAE,aAAa,CAAC,CAAC,EAAE,GAAG,CAAM,EACzC,gBAAgB,GAAE,gBAAqB,WA8GxB,oBAAoB,iBAGtC"}
|
@@ -1,69 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { observer, useLocalStore } from 'mobx-react';
|
3
|
-
import { fromPromise } from 'mobx-utils';
|
4
|
-
import { DropDownList } from '@progress/kendo-react-dropdowns';
|
5
|
-
import { TableColumnMenuFilterExt } from './table-column-menu-filter-ext';
|
6
|
-
import { FilterCellExt } from './filter-cell-ext';
|
7
|
-
/*
|
8
|
-
* StandardFilterWithMultiselect is like standard Kendo filter, but with additional operators 'Is one of' / 'Is not one of'.
|
9
|
-
* Intended to be used with string fields (though it's possible to adopt for number fields as well, if someone will have a need).
|
10
|
-
*/
|
11
|
-
export function standardFilterWithMultiselect(optionsConfig = {}, filterCellConfig = {}) {
|
12
|
-
const optionsConfigFull = Object.assign({ maxExtractedLength: 64, options: [] }, optionsConfig);
|
13
|
-
const filterCellConfigFull = Object.assign({ allowCustomValues: true, maxFoundValues: 1000 }, filterCellConfig);
|
14
|
-
// Filter UI with data fetcher
|
15
|
-
const FilterUIWithValues = observer(props => {
|
16
|
-
const store = useLocalStore(oprops => ({
|
17
|
-
get field() {
|
18
|
-
return oprops.firstFilterProps.field;
|
19
|
-
},
|
20
|
-
get itemsFromDataSource() {
|
21
|
-
var _a;
|
22
|
-
const dataSource = (_a = optionsConfigFull.tableState) === null || _a === void 0 ? void 0 : _a.dataSource;
|
23
|
-
return dataSource && this.field && fromPromise(dataSource.getData({}));
|
24
|
-
},
|
25
|
-
get valuesfromTableState() {
|
26
|
-
if (!this.itemsFromDataSource ||
|
27
|
-
!(this.itemsFromDataSource.state === 'fulfilled')) {
|
28
|
-
return [];
|
29
|
-
}
|
30
|
-
return this.itemsFromDataSource.value.data
|
31
|
-
.map(i => i[this.field])
|
32
|
-
.filter(v => typeof v === 'number' ||
|
33
|
-
(typeof v === 'string' &&
|
34
|
-
v.length > 0 &&
|
35
|
-
v.length <= optionsConfigFull.maxExtractedLength));
|
36
|
-
},
|
37
|
-
get options() {
|
38
|
-
return Array.from(new Set(this.valuesfromTableState.concat(optionsConfigFull.options))).map(v => {
|
39
|
-
switch (typeof v) {
|
40
|
-
case 'string':
|
41
|
-
return {
|
42
|
-
value: v,
|
43
|
-
text: v,
|
44
|
-
textLC: v.toLowerCase(),
|
45
|
-
};
|
46
|
-
case 'number':
|
47
|
-
return {
|
48
|
-
value: v,
|
49
|
-
text: v.toString(),
|
50
|
-
textLC: v.toString().toLowerCase(),
|
51
|
-
};
|
52
|
-
case 'object':
|
53
|
-
return {
|
54
|
-
value: v.value,
|
55
|
-
text: v.text,
|
56
|
-
textLC: v.text.toLowerCase(),
|
57
|
-
};
|
58
|
-
default:
|
59
|
-
throw 'Incompatible option type.';
|
60
|
-
}
|
61
|
-
});
|
62
|
-
},
|
63
|
-
}), props);
|
64
|
-
const { firstFilterProps, secondFilterProps, hideSecondFilter, logicData, logicValue, onLogicChange, } = props;
|
65
|
-
return (_jsxs("div", { children: [_jsx(FilterCellExt, Object.assign({}, firstFilterProps, { options: store.options }, filterCellConfigFull)), !hideSecondFilter && (_jsxs("div", { children: [_jsx(DropDownList, { data: logicData, value: logicValue, onChange: onLogicChange, className: "k-filter-and", textField: "text" }), _jsx(FilterCellExt, Object.assign({}, secondFilterProps, { options: store.options }, filterCellConfigFull))] }))] }));
|
66
|
-
});
|
67
|
-
return (props) => (_jsx(TableColumnMenuFilterExt, Object.assign({}, props, { filterUI: FilterUIWithValues, expanded: true })));
|
68
|
-
}
|
69
|
-
//# sourceMappingURL=standard-filter-with-multiselect.js.map
|
package/dist/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"standard-filter-with-multiselect.js","sourceRoot":"","sources":["../../../src/filters/standard-filter-with-multiselect/standard-filter-with-multiselect.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAO/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAsB,MAAM,mBAAmB,CAAC;AA+BtE;;;GAGG;AAEH,MAAM,UAAU,6BAA6B,CACzC,gBAAuC,EAAE,EACzC,mBAAqC,EAAE;IAEvC,MAAM,iBAAiB,mBACnB,kBAAkB,EAAE,EAAE,EACtB,OAAO,EAAE,EAAc,IACpB,aAAa,CACnB,CAAC;IAEF,MAAM,oBAAoB,mBACtB,iBAAiB,EAAE,IAAI,EACvB,cAAc,EAAE,IAAI,IACjB,gBAAgB,CACtB,CAAC;IAEF,8BAA8B;IAC9B,MAAM,kBAAkB,GAAqC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAC1E,MAAM,KAAK,GAAG,aAAa,CACvB,MAAM,CAAC,EAAE,CAAC,CAAC;YACP,IAAI,KAAK;gBACL,OAAO,MAAM,CAAC,gBAAgB,CAAC,KAAgB,CAAC;YACpD,CAAC;YACD,IAAI,mBAAmB;;gBACnB,MAAM,UAAU,GAAG,MAAA,iBAAiB,CAAC,UAAU,0CAAE,UAAU,CAAC;gBAC5D,OAAO,UAAU,IAAI,IAAI,CAAC,KAAK,IAAI,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3E,CAAC;YACD,IAAI,oBAAoB;gBACpB,IACI,CAAC,IAAI,CAAC,mBAAmB;oBACzB,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,KAAK,WAAW,CAAC,EACnD;oBACE,OAAO,EAAE,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B,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,aAAa,GAChB,GAAG,KAAK,CAAC;QAEV,OAAO,CACH,0BACI,KAAC,aAAa,oBACN,gBAAgB,IACpB,OAAO,EAAE,KAAK,CAAC,OAAO,IAClB,oBAAoB,EAC1B,EACD,CAAC,gBAAgB,IAAI,CAClB,0BACI,KAAC,YAAY,IACT,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAC,cAAc,EACxB,SAAS,EAAC,MAAM,GAClB,EACF,KAAC,aAAa,oBACN,iBAAiB,IACrB,OAAO,EAAE,KAAK,CAAC,OAAO,IAClB,oBAAoB,EAC1B,IACA,CACT,IACC,CACT,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,KAA2B,EAAE,EAAE,CAAC,CACpC,KAAC,wBAAwB,oBAAK,KAAK,IAAE,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,UAAG,CACjF,CAAC;AACN,CAAC"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { TableColumnMenuFilter } from '@servicetitan/design-system';
|
2
|
-
import { GridColumnMenuFilterProps as TableColumnMenuFilterProps } from '@progress/kendo-react-grid/dist/npm/columnMenu/GridColumnMenuFilter';
|
3
|
-
export declare class TableColumnMenuFilterExt extends TableColumnMenuFilter {
|
4
|
-
constructor(props: TableColumnMenuFilterProps);
|
5
|
-
}
|
6
|
-
//# sourceMappingURL=table-column-menu-filter-ext.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"table-column-menu-filter-ext.d.ts","sourceRoot":"","sources":["../../../src/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,yBAAyB,IAAI,0BAA0B,EAAE,MAAM,qEAAqE,CAAC;AAM9I,qBAAa,wBAAyB,SAAQ,qBAAqB;gBACnD,KAAK,EAAE,0BAA0B;CA8BhD"}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import { comparer } from 'mobx';
|
2
|
-
import { TableColumnMenuFilter } from '@servicetitan/design-system';
|
3
|
-
import { getDefaultOperator } from '@progress/kendo-react-grid/dist/npm/filterCommon';
|
4
|
-
import { multiselectOperators } from './multiselect-operators';
|
5
|
-
// constructor override: if state.filterGroup was filled with default, we override it with new default
|
6
|
-
export class TableColumnMenuFilterExt extends TableColumnMenuFilter {
|
7
|
-
constructor(props) {
|
8
|
-
var _a;
|
9
|
-
super(props);
|
10
|
-
const defaultOperator = getDefaultOperator(props.filterOperators, (_a = props.column.filter) !== null && _a !== void 0 ? _a : 'text');
|
11
|
-
// I know the check is a bit hacky, but that's compensated with its low criticality: even if it fails, nothing really bad happens
|
12
|
-
if (comparer.structural(this.state.filterGroup, {
|
13
|
-
logic: 'and',
|
14
|
-
filters: [
|
15
|
-
{ field: props.column.field, operator: defaultOperator },
|
16
|
-
{ field: props.column.field, operator: defaultOperator },
|
17
|
-
],
|
18
|
-
})) {
|
19
|
-
const newDefaultOperator = multiselectOperators[0].operator;
|
20
|
-
this.state = Object.assign(Object.assign({}, this.state), { filterGroup: {
|
21
|
-
logic: 'and',
|
22
|
-
filters: [
|
23
|
-
{ field: props.column.field, operator: newDefaultOperator },
|
24
|
-
{ field: props.column.field, operator: newDefaultOperator },
|
25
|
-
],
|
26
|
-
} });
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
30
|
-
//# sourceMappingURL=table-column-menu-filter-ext.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"table-column-menu-filter-ext.js","sourceRoot":"","sources":["../../../src/filters/standard-filter-with-multiselect/table-column-menu-filter-ext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,OAAO,EAAE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 +0,0 @@
|
|
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
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
11
|
-
import { Component, Fragment } from 'react';
|
12
|
-
import { observer } from 'mobx-react';
|
13
|
-
import { observable, action, makeObservable } from 'mobx';
|
14
|
-
import { DropDownList } from '@progress/kendo-react-dropdowns';
|
15
|
-
import { TimePicker } from '@progress/kendo-react-dateinputs';
|
16
|
-
import { IsUnaryFilter, cellOperatorChange, } from '@progress/kendo-react-grid/dist/npm/filterCommon';
|
17
|
-
import { renderCustomColumnMenuFilter } from '../column-menu-filters';
|
18
|
-
import * as Styles from './time-filter.module.css';
|
19
|
-
let TimeFilterCell = class TimeFilterCell extends Component {
|
20
|
-
constructor(props) {
|
21
|
-
var _a;
|
22
|
-
super(props);
|
23
|
-
Object.defineProperty(this, "operator", {
|
24
|
-
enumerable: true,
|
25
|
-
configurable: true,
|
26
|
-
writable: true,
|
27
|
-
value: (_a = this.props.operators.find(o => o.operator === this.props.operator)) !== null && _a !== void 0 ? _a : this.props.operators[0]
|
28
|
-
});
|
29
|
-
Object.defineProperty(this, "handleOperatorChange", {
|
30
|
-
enumerable: true,
|
31
|
-
configurable: true,
|
32
|
-
writable: true,
|
33
|
-
value: (event) => {
|
34
|
-
this.operator = event.target.value;
|
35
|
-
cellOperatorChange(event, this.props.value, this.props.onChange);
|
36
|
-
}
|
37
|
-
});
|
38
|
-
Object.defineProperty(this, "handleChange", {
|
39
|
-
enumerable: true,
|
40
|
-
configurable: true,
|
41
|
-
writable: true,
|
42
|
-
value: (event) => {
|
43
|
-
var _a;
|
44
|
-
const value = event.value;
|
45
|
-
this.props.onChange({
|
46
|
-
value: value ? new Date(2000, 0, 1, value.getHours(), value.getMinutes()) : null,
|
47
|
-
operator: (_a = this.props.operator) !== null && _a !== void 0 ? _a : '',
|
48
|
-
syntheticEvent: event.syntheticEvent,
|
49
|
-
});
|
50
|
-
}
|
51
|
-
});
|
52
|
-
makeObservable(this);
|
53
|
-
}
|
54
|
-
render() {
|
55
|
-
return (_jsxs(Fragment, { children: [_jsx(DropDownList, { value: this.operator, onChange: this.handleOperatorChange, data: this.props.operators, dataItemKey: "operator", textField: "text" }), !IsUnaryFilter(this.operator.operator) && (_jsx(TimePicker, { value: this.props.value, onChange: this.handleChange, className: Styles.timePicker }))] }));
|
56
|
-
}
|
57
|
-
};
|
58
|
-
__decorate([
|
59
|
-
observable,
|
60
|
-
__metadata("design:type", Object)
|
61
|
-
], TimeFilterCell.prototype, "operator", void 0);
|
62
|
-
__decorate([
|
63
|
-
action,
|
64
|
-
__metadata("design:type", Object)
|
65
|
-
], TimeFilterCell.prototype, "handleOperatorChange", void 0);
|
66
|
-
TimeFilterCell = __decorate([
|
67
|
-
observer,
|
68
|
-
__metadata("design:paramtypes", [Object])
|
69
|
-
], TimeFilterCell);
|
70
|
-
export const TimeColumnMenuFilter = renderCustomColumnMenuFilter(TimeFilterCell, true);
|
71
|
-
//# sourceMappingURL=time-filter.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"time-filter.js","sourceRoot":"","sources":["../../../src/filters/time-filter/time-filter.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM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AAE,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;oBAChF,QAAQ,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,EAAE;oBACnC,cAAc,EAAE,KAAK,CAAC,cAAc;iBACvC,CAAC,CAAC;YACP,CAAC;WAAC;QAjBE,cAAc,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAkBD,MAAM;QACF,OAAO,CACH,MAAC,QAAQ,eACL,KAAC,YAAY,IACT,KAAK,EAAE,IAAI,CAAC,QAAQ,EACpB,QAAQ,EAAE,IAAI,CAAC,oBAAoB,EACnC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC1B,WAAW,EAAC,UAAU,EACtB,SAAS,EAAC,MAAM,GAClB,EACD,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CACvC,KAAC,UAAU,IACP,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,SAAS,EAAE,MAAM,CAAC,UAAU,GAC9B,CACL,IACM,CACd,CAAC;IACN,CAAC;CACJ,CAAA;AA7Ce;IAAX,UAAU;;gDAEiB;AAQ5B;IADC,MAAM;;4DAIL;AAdA,cAAc;IADnB,QAAQ;;GACH,cAAc,CA8CnB;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,4BAA4B,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC"}
|
package/dist/index.d.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
export * from './table';
|
2
|
-
export * from './table-state';
|
3
|
-
export * from './editable-cell';
|
4
|
-
export * from './filters';
|
5
|
-
export * from './export';
|
6
|
-
export * from './select-cell';
|
7
|
-
export { TableColumn, TableColumnProps, TableColumnMenuProps, TableColumnMenuFilter, TableColumnReorderEvent, TableCell, TableHeaderCellProps, TableRowProps, TableRowClickEvent, TableDetailRow, TableDetailRowProps, TableExpandChangeEvent, TableToolbar, TableNoRecords, TableFilterCellProps, TableFilterChangeEvent, } from '@servicetitan/design-system';
|
8
|
-
export { GridColumnMenuFilterUIProps as TableColumnMenuFilterUIProps } from '@progress/kendo-react-grid/dist/npm/interfaces/GridColumnMenuFilterUIProps';
|
9
|
-
export { IdType, DataSource, InMemoryDataSource, AsyncDataSource } from '@servicetitan/data-query';
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
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;AAE9B,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"}
|
package/dist/index.js
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
export * from './table';
|
2
|
-
export * from './table-state';
|
3
|
-
export * from './editable-cell';
|
4
|
-
export * from './filters';
|
5
|
-
export * from './export';
|
6
|
-
export * from './select-cell';
|
7
|
-
export { TableColumn, TableColumnMenuFilter, TableCell, TableDetailRow, TableToolbar, TableNoRecords, } from '@servicetitan/design-system';
|
8
|
-
export { InMemoryDataSource, AsyncDataSource } from '@servicetitan/data-query';
|
9
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
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;AAE9B,OAAO,EACH,WAAW,EAGX,qBAAqB,EAErB,SAAS,EAIT,cAAc,EAGd,YAAY,EACZ,cAAc,GAGjB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAsB,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/select-cell/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/select-cell/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { ComponentType, SyntheticEvent, FC } from 'react';
|
2
|
-
import { TableCellProps, TableHeaderCellProps, CheckboxProps } from '@servicetitan/design-system';
|
3
|
-
export declare type SelectionControlType = ComponentType<CheckboxProps<never>>;
|
4
|
-
interface SelectColumnCellProps extends TableCellProps {
|
5
|
-
isRowSelectable?: boolean;
|
6
|
-
control?: SelectionControlType;
|
7
|
-
}
|
8
|
-
interface SelectHeaderCellProps extends TableHeaderCellProps {
|
9
|
-
isSomeRowsSelected?: boolean;
|
10
|
-
control?: SelectionControlType;
|
11
|
-
}
|
12
|
-
interface SelectCellProps {
|
13
|
-
checked: boolean;
|
14
|
-
disabled?: boolean;
|
15
|
-
indeterminate?: boolean;
|
16
|
-
selectionChange?: (event: {
|
17
|
-
syntheticEvent: SyntheticEvent<any>;
|
18
|
-
}) => void;
|
19
|
-
control?: SelectionControlType;
|
20
|
-
}
|
21
|
-
export declare const SelectCell: FC<SelectCellProps>;
|
22
|
-
export declare const SelectColumnCell: FC<SelectColumnCellProps>;
|
23
|
-
export declare const SelectHeaderCell: FC<SelectHeaderCellProps>;
|
24
|
-
export {};
|
25
|
-
//# sourceMappingURL=select-cell.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"select-cell.d.ts","sourceRoot":"","sources":["../../src/select-cell/select-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EACH,cAAc,EACd,oBAAoB,EAEpB,aAAa,EAChB,MAAM,6BAA6B,CAAC;AAGrC,oBAAY,oBAAoB,GAAG,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAEvE,UAAU,qBAAsB,SAAQ,cAAc;IAClD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAED,UAAU,qBAAsB,SAAQ,oBAAoB;IACxD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAED,UAAU,eAAe;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,cAAc,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3E,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAa1C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAoBtD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAOtD,CAAC"}
|
@@ -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,EAI9B,EAAE,EAAE;QAJ0B,EAC5C,eAAe,EACf,OAAO,EAAE,OAAO,GAAG,QAAQ,OAEb,EADX,KAAK,cAHoC,8BAI/C,CADW;IAER,MAAM,QAAQ,GAAG,CAAC,EAAS,EAAE,EAAW,EAAE,KAAuC,EAAE,EAAE;QACjF,IAAI,CAAC,eAAe,EAAE;YAClB,OAAO;SACV;QACD,eAAe,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC;IAEF,OAAO,KAAC,OAAO,kBAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,IAAM,KAAK,EAAI,CAAC;AAClF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,KAA4B,EAAE,EAAE;IACxF,IAAI,KAAK,CAAC,OAAO,KAAK,aAAa,EAAE;QACjC,OAAO,IAAI,CAAC;KACf;IAED,IAAI,KAAK,CAAC,OAAO,KAAK,aAAa,EAAE;QACjC,OAAO,cAAM,CAAC;KACjB;IAED,OAAO,CACH,2BAAI,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,gBAC9C,KAAC,UAAU,IACP,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAChC,QAAQ,EAAE,CAAC,KAAK,CAAC,eAAe,EAChC,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa,EAC3C,OAAO,EAAE,KAAK,CAAC,OAAO,GACxB,IACD,CACR,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,KAA4B,EAAE,EAAE,CAAC,CACzF,KAAC,UAAU,IACP,OAAO,EAAE,KAAK,CAAC,cAAc,EAC7B,aAAa,EAAE,KAAK,CAAC,kBAAkB,EACvC,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,OAAO,EAAE,KAAK,CAAC,OAAO,GACxB,CACL,CAAC"}
|
package/dist/table-state.d.ts
DELETED
@@ -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,EAC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