@itwin/components-react 3.5.0-dev.7 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -1
- package/lib/cjs/components-react/UiComponents.d.ts +1 -1
- package/lib/cjs/components-react/UiComponents.js +2 -2
- package/lib/cjs/components-react/UiComponents.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts +2 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js +2 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js +2 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +1 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js +3 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/cjs/components-react/table/SimpleTableDataProvider.d.ts +1 -0
- package/lib/cjs/components-react/table/SimpleTableDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/table/SimpleTableDataProvider.js +2 -0
- package/lib/cjs/components-react/table/SimpleTableDataProvider.js.map +1 -1
- package/lib/cjs/components-react/table/TableDataProvider.d.ts +8 -0
- package/lib/cjs/components-react/table/TableDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/table/TableDataProvider.js +3 -0
- package/lib/cjs/components-react/table/TableDataProvider.js.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.d.ts +16 -0
- package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.d.ts.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.js +7 -0
- package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.js.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/ColumnFilteringUtilities.d.ts.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/ColumnFilteringUtilities.js +1 -0
- package/lib/cjs/components-react/table/columnfiltering/ColumnFilteringUtilities.js.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/FilterableColumnBase.d.ts.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/FilterableColumnBase.js +1 -0
- package/lib/cjs/components-react/table/columnfiltering/FilterableColumnBase.js.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/TableColumnFilterDescriptor.d.ts.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/TableColumnFilterDescriptor.js +1 -0
- package/lib/cjs/components-react/table/columnfiltering/TableColumnFilterDescriptor.js.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptor.d.ts.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptor.js +1 -0
- package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptor.js.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptorCollection.d.ts.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptorCollection.js +1 -0
- package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptorCollection.js.map +1 -1
- package/lib/cjs/components-react/table/component/ColumnDragLayer.d.ts +1 -1
- package/lib/cjs/components-react/table/component/ColumnDragLayer.js +1 -1
- package/lib/cjs/components-react/table/component/ColumnDragLayer.js.map +1 -1
- package/lib/cjs/components-react/table/component/Table.d.ts +16 -8
- package/lib/cjs/components-react/table/component/Table.d.ts.map +1 -1
- package/lib/cjs/components-react/table/component/Table.js +4 -2
- package/lib/cjs/components-react/table/component/Table.js.map +1 -1
- package/lib/cjs/components-react/table/component/TableCell.d.ts +10 -4
- package/lib/cjs/components-react/table/component/TableCell.d.ts.map +1 -1
- package/lib/cjs/components-react/table/component/TableCell.js +5 -2
- package/lib/cjs/components-react/table/component/TableCell.js.map +1 -1
- package/lib/cjs/components-react/table/component/TableColumn.d.ts +2 -1
- package/lib/cjs/components-react/table/component/TableColumn.d.ts.map +1 -1
- package/lib/cjs/components-react/table/component/TableColumn.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Items.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/Items.js +1 -1
- package/lib/cjs/components-react/toolbar/Items.js.map +1 -1
- package/lib/cjs/components-react/tree/TreeDataProvider.d.ts +1 -0
- package/lib/cjs/components-react/tree/TreeDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.js +17 -16
- package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModel.d.ts +2 -0
- package/lib/cjs/components-react/tree/controlled/TreeModel.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModel.js +1 -0
- package/lib/cjs/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/esm/components-react/UiComponents.d.ts +1 -1
- package/lib/esm/components-react/UiComponents.js +2 -2
- package/lib/esm/components-react/UiComponents.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts +2 -0
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.js +2 -2
- package/lib/esm/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js +2 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +1 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js +3 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/esm/components-react/table/SimpleTableDataProvider.d.ts +1 -0
- package/lib/esm/components-react/table/SimpleTableDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/table/SimpleTableDataProvider.js +2 -0
- package/lib/esm/components-react/table/SimpleTableDataProvider.js.map +1 -1
- package/lib/esm/components-react/table/TableDataProvider.d.ts +8 -0
- package/lib/esm/components-react/table/TableDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/table/TableDataProvider.js +3 -0
- package/lib/esm/components-react/table/TableDataProvider.js.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.d.ts +16 -0
- package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.d.ts.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.js +7 -0
- package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.js.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/ColumnFilteringUtilities.d.ts.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/ColumnFilteringUtilities.js +1 -0
- package/lib/esm/components-react/table/columnfiltering/ColumnFilteringUtilities.js.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/FilterableColumnBase.d.ts.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/FilterableColumnBase.js +1 -0
- package/lib/esm/components-react/table/columnfiltering/FilterableColumnBase.js.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/TableColumnFilterDescriptor.d.ts.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/TableColumnFilterDescriptor.js +1 -0
- package/lib/esm/components-react/table/columnfiltering/TableColumnFilterDescriptor.js.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptor.d.ts.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptor.js +1 -0
- package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptor.js.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptorCollection.d.ts.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptorCollection.js +1 -0
- package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptorCollection.js.map +1 -1
- package/lib/esm/components-react/table/component/ColumnDragLayer.d.ts +1 -1
- package/lib/esm/components-react/table/component/ColumnDragLayer.js +1 -1
- package/lib/esm/components-react/table/component/ColumnDragLayer.js.map +1 -1
- package/lib/esm/components-react/table/component/Table.d.ts +16 -8
- package/lib/esm/components-react/table/component/Table.d.ts.map +1 -1
- package/lib/esm/components-react/table/component/Table.js +4 -2
- package/lib/esm/components-react/table/component/Table.js.map +1 -1
- package/lib/esm/components-react/table/component/TableCell.d.ts +10 -4
- package/lib/esm/components-react/table/component/TableCell.d.ts.map +1 -1
- package/lib/esm/components-react/table/component/TableCell.js +5 -2
- package/lib/esm/components-react/table/component/TableCell.js.map +1 -1
- package/lib/esm/components-react/table/component/TableColumn.d.ts +2 -1
- package/lib/esm/components-react/table/component/TableColumn.d.ts.map +1 -1
- package/lib/esm/components-react/table/component/TableColumn.js.map +1 -1
- package/lib/esm/components-react/toolbar/Items.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/Items.js +2 -2
- package/lib/esm/components-react/toolbar/Items.js.map +1 -1
- package/lib/esm/components-react/tree/TreeDataProvider.d.ts +1 -0
- package/lib/esm/components-react/tree/TreeDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.js +17 -16
- package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModel.d.ts +2 -0
- package/lib/esm/components-react/tree/controlled/TreeModel.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModel.js +1 -0
- package/lib/esm/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/package.json +12 -12
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.TableDataChangeEvent = exports.FilterRenderer = void 0;
|
|
11
11
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
|
+
/* eslint-disable deprecation/deprecation */
|
|
12
13
|
// cSpell:ignore columnfiltering
|
|
13
14
|
/** Filter Renderer for a Table column
|
|
15
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
14
16
|
* @public
|
|
15
17
|
*/
|
|
16
18
|
var FilterRenderer;
|
|
@@ -22,6 +24,7 @@ var FilterRenderer;
|
|
|
22
24
|
FilterRenderer[FilterRenderer["MultiValue"] = 5] = "MultiValue";
|
|
23
25
|
})(FilterRenderer = exports.FilterRenderer || (exports.FilterRenderer = {}));
|
|
24
26
|
/** An event broadcasted on table data changes
|
|
27
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
|
|
25
28
|
* @public
|
|
26
29
|
*/
|
|
27
30
|
class TableDataChangeEvent extends core_bentley_1.BeEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/table/TableDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8C;AAM9C,gCAAgC;AAEhC
|
|
1
|
+
{"version":3,"file":"TableDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/table/TableDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8C;AAM9C,4CAA4C;AAC5C,gCAAgC;AAEhC;;;GAGG;AACH,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,yDAAW,CAAA;IACX,iEAAW,CAAA;IACX,mEAAY,CAAA;IACZ,mDAAI,CAAA;IACJ,+DAAU,CAAA;AACZ,CAAC,EANW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAMzB;AA8GD;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,sBAAiC;CAAI;AAA/E,oDAA+E","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { PropertyDescription, PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { HorizontalAlignment, SortDirection } from \"@itwin/core-react\";\r\nimport { ItemColorOverrides, ItemStyle } from \"../properties/ItemStyle\";\r\nimport { CompositeFilterDescriptorCollection, DistinctValueCollection } from \"./columnfiltering/ColumnFiltering\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n// cSpell:ignore columnfiltering\r\n\r\n/** Filter Renderer for a Table column\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport enum FilterRenderer {\r\n Numeric = 1,\r\n MultiSelect,\r\n SingleSelect,\r\n Text,\r\n MultiValue,\r\n}\r\n\r\n/**\r\n * Column definition provided to Table.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface ColumnDescription {\r\n /** A unique key for this column. */\r\n key: string;\r\n\r\n /** Column header label */\r\n label: string;\r\n /** Property description for all cells in the column */\r\n propertyDescription?: PropertyDescription;\r\n\r\n /** Preferred initial width of the column */\r\n width?: number;\r\n\r\n /** Indicates whether the cells in the column are editable. Defaults to false. */\r\n editable?: boolean;\r\n /** Indicates whether the column is resizable. Defaults to false. */\r\n resizable?: boolean;\r\n /** Indicates whether the display value for the cell is treated as an icon spec. Defaults to false. */\r\n icon?: boolean;\r\n\r\n /** Indicates whether the column is sortable. Defaults to false. */\r\n sortable?: boolean;\r\n /** Specifies a secondary sort column to use when cell values are the same. */\r\n secondarySortColumn?: number;\r\n /** Indicates whether the column sorting ignores case. Defaults to false. */\r\n sortIgnoreCase?: boolean;\r\n\r\n /** Indicates whether the column is filterable. Defaults to false. */\r\n filterable?: boolean;\r\n /** Specifies the filter renderer for the column. */\r\n filterRenderer?: FilterRenderer;\r\n\r\n /** Show field filters in Multi-Value column filtering popup. Defaults to true. */\r\n showFieldFilters?: boolean;\r\n /** Show distinct value checkboxes in Multi-Value column filtering popup. Defaults to true. */\r\n showDistinctValueFilters?: boolean;\r\n /** Filtering is case-sensitive in Multi-Value column filtering popup. Defaults to false. */\r\n filterCaseSensitive?: boolean;\r\n\r\n /** Sort type for react-table */\r\n sortType?: string;\r\n}\r\n\r\n/**\r\n * Cell definition provided to Table.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface CellItem {\r\n /** Key for the column containing the cell */\r\n key: string;\r\n /** Property record for the cell */\r\n record?: PropertyRecord;\r\n\r\n /** Indicates whether the cell is disabled */\r\n isDisabled?: boolean;\r\n /** Specifies the horizontal alignment of the contents of the cell */\r\n alignment?: HorizontalAlignment;\r\n\r\n /** Style properties for the contents of the cell */\r\n style?: ItemStyle;\r\n\r\n /**\r\n * Property to specify how many cells were merged to create this cell.\r\n * Default value is 1.\r\n * @alpha\r\n */\r\n mergedCellsCount?: number;\r\n}\r\n\r\n/**\r\n * Row definition provided to Table.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface RowItem {\r\n /** A unique key for this row */\r\n key: string;\r\n /** Array of cells in the row */\r\n cells: CellItem[];\r\n /** Indicates whether the row is disabled */\r\n isDisabled?: boolean;\r\n /** Color overrides for all cells in the row */\r\n colorOverrides?: ItemColorOverrides;\r\n\r\n /**\r\n * A key-value pairs data structure that can be used by data provider\r\n * to store some custom data for this node item.\r\n */\r\n extendedData?: { [key: string]: any };\r\n\r\n /**\r\n * Get the value from the cell for filtering purposes.\r\n * If not specified and the value is a primitive, the recordValue.value is returned.\r\n */\r\n getValueFromCell?: (columnKey: string) => any;\r\n}\r\n\r\n/** An interface table data change listeners\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this type.\r\n * @public\r\n */\r\nexport declare type TableDataChangesListener = () => void;\r\n\r\n/** An event broadcasted on table data changes\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.\r\n * @public\r\n */\r\nexport class TableDataChangeEvent extends BeEvent<TableDataChangesListener> { }\r\n\r\n/**\r\n * TableDataProvider provides data to the Table.\r\n * It also provides support for data Sorting & Filtering.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface TableDataProvider {\r\n /** Event emitted by the data provider when column data changes */\r\n onColumnsChanged: TableDataChangeEvent;\r\n /** Event emitted by the data provider when row data changes */\r\n onRowsChanged: TableDataChangeEvent;\r\n\r\n /** Retrieves the column descriptions */\r\n getColumns(): Promise<ColumnDescription[]>;\r\n /** Retrieves the row count */\r\n getRowsCount(): Promise<number>;\r\n /** Retrieves a specific row by index */\r\n getRow(rowIndex: number, unfiltered?: boolean): Promise<RowItem>;\r\n\r\n /** Sorts the rows based on the value in a specific column */\r\n sort(columnIndex: number, sortDirection: SortDirection): Promise<void>;\r\n\r\n // Column Filtering methods\r\n\r\n /** Apply a filter descriptor collection\r\n */\r\n applyFilterDescriptors?: (filterDescriptors: CompositeFilterDescriptorCollection) => Promise<void>;\r\n\r\n /** Gets distinct values in a column\r\n */\r\n getDistinctValues?: (columnKey: string, maximumValueCount?: number) => Promise<DistinctValueCollection>;\r\n\r\n /** Gets property display value expression\r\n * @alpha\r\n */\r\n getPropertyDisplayValueExpression?: (property: string) => string;\r\n}\r\n\r\n/**\r\n * MutableTableDataProvider provides mutation methods for data in the Table.\r\n * Useful for Drag & Drop processing.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface MutableTableDataProvider extends TableDataProvider {\r\n /** Adds a row to the end */\r\n addRow(rowItem: RowItem): number;\r\n /** Inserts a row at a given row index */\r\n insertRow(rowItem: RowItem, index: number): number;\r\n /** Deletes a row */\r\n deleteRow(rowItem: RowItem): void;\r\n /** Moves a row to a new row index */\r\n moveRow(rowItem: RowItem, newIndex: number): number;\r\n}\r\n"]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { Primitives } from "@itwin/appui-abstract";
|
|
5
5
|
import { RowItem } from "../TableDataProvider";
|
|
6
6
|
/** Operator used in FilterDescriptor
|
|
7
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this enum.
|
|
7
8
|
* @public
|
|
8
9
|
*/
|
|
9
10
|
export declare enum FilterOperator {
|
|
@@ -26,6 +27,7 @@ export declare enum FilterOperator {
|
|
|
26
27
|
IsNotNull = 16
|
|
27
28
|
}
|
|
28
29
|
/** Logical operator used for filter descriptor composition
|
|
30
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this enum.
|
|
29
31
|
* @public
|
|
30
32
|
*/
|
|
31
33
|
export declare enum FilterCompositionLogicalOperator {
|
|
@@ -33,6 +35,7 @@ export declare enum FilterCompositionLogicalOperator {
|
|
|
33
35
|
Or = 1
|
|
34
36
|
}
|
|
35
37
|
/** FilterableTable contains the properties and methods provided by a filterable Table.
|
|
38
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
36
39
|
* @public
|
|
37
40
|
*/
|
|
38
41
|
export interface FilterableTable {
|
|
@@ -42,6 +45,7 @@ export interface FilterableTable {
|
|
|
42
45
|
getPropertyDisplayValueExpression(property: string): string;
|
|
43
46
|
}
|
|
44
47
|
/** Represents a column that is filterable.
|
|
48
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
45
49
|
* @public
|
|
46
50
|
*/
|
|
47
51
|
export interface FilterableColumn {
|
|
@@ -67,6 +71,7 @@ export interface FilterableColumn {
|
|
|
67
71
|
getDistinctValues(maximumValueCount?: number): Promise<DistinctValueCollection>;
|
|
68
72
|
}
|
|
69
73
|
/** A filtering abstraction that knows how to create predicate filtering expression.
|
|
74
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
70
75
|
* @public
|
|
71
76
|
*/
|
|
72
77
|
export interface FilterDescriptor {
|
|
@@ -83,6 +88,7 @@ export interface FilterDescriptor {
|
|
|
83
88
|
getFilterExpression(): string;
|
|
84
89
|
}
|
|
85
90
|
/** An abstraction for all filter descriptors that have an operator and a value
|
|
91
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
86
92
|
* @public
|
|
87
93
|
*/
|
|
88
94
|
export interface OperatorValueFilterDescriptor extends FilterDescriptor {
|
|
@@ -98,6 +104,7 @@ export interface OperatorValueFilterDescriptor extends FilterDescriptor {
|
|
|
98
104
|
isCaseSensitive: boolean;
|
|
99
105
|
}
|
|
100
106
|
/** Represents the distinct filter descriptor of a column filter descriptor.
|
|
107
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
101
108
|
* @public
|
|
102
109
|
*/
|
|
103
110
|
export interface DistinctValuesFilterDescriptor extends FilterDescriptor {
|
|
@@ -117,6 +124,7 @@ export interface DistinctValuesFilterDescriptor extends FilterDescriptor {
|
|
|
117
124
|
distinctValuesComparisonOperator: FilterOperator;
|
|
118
125
|
}
|
|
119
126
|
/** Represents the field filter descriptor of a column filter descriptor.
|
|
127
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
120
128
|
* @public
|
|
121
129
|
*/
|
|
122
130
|
export interface FieldFilterDescriptor extends FilterDescriptor {
|
|
@@ -132,6 +140,7 @@ export interface FieldFilterDescriptor extends FilterDescriptor {
|
|
|
132
140
|
logicalOperator: FilterCompositionLogicalOperator;
|
|
133
141
|
}
|
|
134
142
|
/** Represents a column filter descriptor associated with a specific column.
|
|
143
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
135
144
|
* @public
|
|
136
145
|
*/
|
|
137
146
|
export interface ColumnFilterDescriptor extends FilterDescriptor {
|
|
@@ -141,6 +150,7 @@ export interface ColumnFilterDescriptor extends FilterDescriptor {
|
|
|
141
150
|
fieldFilter: FieldFilterDescriptor;
|
|
142
151
|
}
|
|
143
152
|
/** Distinct Value for Table filtering purposes
|
|
153
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
144
154
|
* @public
|
|
145
155
|
*/
|
|
146
156
|
export interface TableDistinctValue {
|
|
@@ -148,6 +158,7 @@ export interface TableDistinctValue {
|
|
|
148
158
|
label: string;
|
|
149
159
|
}
|
|
150
160
|
/** A set of distinct values for a column.
|
|
161
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
151
162
|
* @public
|
|
152
163
|
*/
|
|
153
164
|
export declare class DistinctValueCollection {
|
|
@@ -158,6 +169,7 @@ export declare class DistinctValueCollection {
|
|
|
158
169
|
}
|
|
159
170
|
/** Represents a composite filtering abstraction which has a collection of
|
|
160
171
|
* filter descriptors combined together by a logical operator.
|
|
172
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
161
173
|
* @public
|
|
162
174
|
*/
|
|
163
175
|
export interface CompositeFilterDescriptor extends FilterDescriptor {
|
|
@@ -167,6 +179,7 @@ export interface CompositeFilterDescriptor extends FilterDescriptor {
|
|
|
167
179
|
filterDescriptorCollection: FilterDescriptorCollection;
|
|
168
180
|
}
|
|
169
181
|
/** Collection of FilterDescriptor objects composed together by a logical operator.
|
|
182
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
170
183
|
* @public
|
|
171
184
|
*/
|
|
172
185
|
export interface CompositeFilterDescriptorCollection {
|
|
@@ -189,6 +202,7 @@ export interface CompositeFilterDescriptorCollection {
|
|
|
189
202
|
getFilterExpression(): string;
|
|
190
203
|
}
|
|
191
204
|
/** Collection of filter descriptors.
|
|
205
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
192
206
|
* @public
|
|
193
207
|
*/
|
|
194
208
|
export declare abstract class FilterDescriptorCollectionBase<TDescriptor extends FilterDescriptor> {
|
|
@@ -214,11 +228,13 @@ export declare abstract class FilterDescriptorCollectionBase<TDescriptor extends
|
|
|
214
228
|
get count(): number;
|
|
215
229
|
}
|
|
216
230
|
/** Collection of filter descriptors.
|
|
231
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
217
232
|
* @public
|
|
218
233
|
*/
|
|
219
234
|
export declare class FilterDescriptorCollection extends FilterDescriptorCollectionBase<FilterDescriptor> {
|
|
220
235
|
}
|
|
221
236
|
/** Collection of OperatorValue filter descriptors.
|
|
237
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
222
238
|
* @public
|
|
223
239
|
*/
|
|
224
240
|
export declare class OperatorValueFilterDescriptorCollection extends FilterDescriptorCollectionBase<OperatorValueFilterDescriptor> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnFiltering.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/ColumnFiltering.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ColumnFiltering.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/ColumnFiltering.ts"],"names":[],"mappings":"AAKA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oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAEjD,8CAA8C;IAC9C,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS,CAAC;IAEjF,iDAAiD;IACjD,GAAG,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAElC,oCAAoC;IACpC,KAAK,IAAI,IAAI,CAAC;IAEd;gBACY;IACZ,mBAAmB,IAAI,MAAM,CAAC;CAC/B;AAED;;;GAGG;AACH,8BAAsB,8BAA8B,CAAC,WAAW,SAAS,gBAAgB;IACvF,OAAO,CAAC,YAAY,CAAgB;;IAMpC,IAAW,WAAW,kBAAgC;IAEtD;;OAEG;IACI,GAAG,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAInC;;OAEG;IACI,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO;IASzC;OACG;IACI,KAAK,IAAI,IAAI;IAIpB;OACG;IACH,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED;OACG;IACH,IAAW,KAAK,IAAI,MAAM,CAEzB;CACF;AAED;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,8BAA8B,CAAC,gBAAgB,CAAC;CAC/F;AAED;;;GAGG;AACH,qBAAa,uCAAwC,SAAQ,8BAA8B,CAAC,6BAA6B,CAAC;CACzH"}
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.OperatorValueFilterDescriptorCollection = exports.FilterDescriptorCollection = exports.FilterDescriptorCollectionBase = exports.DistinctValueCollection = exports.FilterCompositionLogicalOperator = exports.FilterOperator = void 0;
|
|
8
|
+
/* eslint-disable deprecation/deprecation */
|
|
8
9
|
/** Operator used in FilterDescriptor
|
|
10
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this enum.
|
|
9
11
|
* @public
|
|
10
12
|
*/
|
|
11
13
|
var FilterOperator;
|
|
@@ -33,6 +35,7 @@ var FilterOperator;
|
|
|
33
35
|
FilterOperator[FilterOperator["IsNotNull"] = 16] = "IsNotNull";
|
|
34
36
|
})(FilterOperator = exports.FilterOperator || (exports.FilterOperator = {}));
|
|
35
37
|
/** Logical operator used for filter descriptor composition
|
|
38
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this enum.
|
|
36
39
|
* @public
|
|
37
40
|
*/
|
|
38
41
|
var FilterCompositionLogicalOperator;
|
|
@@ -41,6 +44,7 @@ var FilterCompositionLogicalOperator;
|
|
|
41
44
|
FilterCompositionLogicalOperator[FilterCompositionLogicalOperator["Or"] = 1] = "Or";
|
|
42
45
|
})(FilterCompositionLogicalOperator = exports.FilterCompositionLogicalOperator || (exports.FilterCompositionLogicalOperator = {}));
|
|
43
46
|
/** A set of distinct values for a column.
|
|
47
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
44
48
|
* @public
|
|
45
49
|
*/
|
|
46
50
|
class DistinctValueCollection {
|
|
@@ -52,6 +56,7 @@ class DistinctValueCollection {
|
|
|
52
56
|
}
|
|
53
57
|
exports.DistinctValueCollection = DistinctValueCollection;
|
|
54
58
|
/** Collection of filter descriptors.
|
|
59
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
55
60
|
* @public
|
|
56
61
|
*/
|
|
57
62
|
class FilterDescriptorCollectionBase {
|
|
@@ -94,12 +99,14 @@ class FilterDescriptorCollectionBase {
|
|
|
94
99
|
}
|
|
95
100
|
exports.FilterDescriptorCollectionBase = FilterDescriptorCollectionBase;
|
|
96
101
|
/** Collection of filter descriptors.
|
|
102
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
97
103
|
* @public
|
|
98
104
|
*/
|
|
99
105
|
class FilterDescriptorCollection extends FilterDescriptorCollectionBase {
|
|
100
106
|
}
|
|
101
107
|
exports.FilterDescriptorCollection = FilterDescriptorCollection;
|
|
102
108
|
/** Collection of OperatorValue filter descriptors.
|
|
109
|
+
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
|
|
103
110
|
* @public
|
|
104
111
|
*/
|
|
105
112
|
class OperatorValueFilterDescriptorCollection extends FilterDescriptorCollectionBase {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnFiltering.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/ColumnFiltering.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAS/F;;GAEG;AACH,IAAY,cAyBX;AAzBD,WAAY,cAAc;IACxB,uBAAuB;IACvB,6DAAS,CAAA;IACT,mEAAY,CAAA;IAEZ,8DAA8D;IAC9D,+DAAU,CAAA;IACV,iFAAmB,CAAA;IACnB,qEAAa,CAAA;IACb,uFAAsB,CAAA;IACtB,qDAAK,CAAA;IAEL,UAAU;IACV,+DAAU,CAAA;IACV,2DAAQ,CAAA;IACR,2DAAQ,CAAA;IACR,wEAAc,CAAA;IACd,sEAAa,CAAA;IACb,4EAAgB,CAAA;IAChB,0DAAO,CAAA;IACP,gEAAU,CAAA;IAEV,iCAAiC;IACjC,wDAAM,CAAA;IACN,8DAAS,CAAA;AACX,CAAC,EAzBW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAyBzB;AAED;;GAEG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC1C,qFAAG,CAAA;IACH,mFAAE,CAAA;AACJ,CAAC,EAHW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAG3C;AA0JD;;GAEG;AACH,MAAa,uBAAuB;IAGlC;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,KAAK,EAAsB,CAAC;IACjD,CAAC;IAED,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,IAAW,MAAM,CAAC,MAA4B,IAAI,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;CAC3E;AATD,0DASC;AA4CD;;GAEG;AACH,MAAsB,8BAA8B;IAGlD;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,KAAK,EAAe,CAAC;IAC/C,CAAC;IAED,IAAW,WAAW,KAAK,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtD;;OAEG;IACI,GAAG,CAAC,IAAiB;QAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,IAAiB;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAClC,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;OACG;IACI,KAAK;QACV,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC;IAED;OACG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IAED;OACG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;IACjC,CAAC;CACF;AA7CD,wEA6CC;AAED;;GAEG;AACH,MAAa,0BAA2B,SAAQ,8BAAgD;CAC/F;AADD,gEACC;AAED;;GAEG;AACH,MAAa,uCAAwC,SAAQ,8BAA6D;CACzH;AADD,0FACC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport { Primitives } from \"@itwin/appui-abstract\";\r\nimport { RowItem } from \"../TableDataProvider\";\r\n\r\n/** Operator used in FilterDescriptor\r\n * @public\r\n */\r\nexport enum FilterOperator {\r\n // All filterable types\r\n IsEqualTo,\r\n IsNotEqualTo,\r\n\r\n // Numeric types, Date, all types that implement these methods\r\n IsLessThan,\r\n IsLessThanOrEqualTo,\r\n IsGreaterThan,\r\n IsGreaterThanOrEqualTo,\r\n Range,\r\n\r\n // Strings\r\n StartsWith,\r\n EndsWith,\r\n Contains,\r\n DoesNotContain,\r\n IsContainedIn,\r\n IsNotContainedIn,\r\n IsEmpty,\r\n IsNotEmpty,\r\n\r\n // All filterable null-able types\r\n IsNull,\r\n IsNotNull,\r\n}\r\n\r\n/** Logical operator used for filter descriptor composition\r\n * @public\r\n */\r\nexport enum FilterCompositionLogicalOperator {\r\n And,\r\n Or,\r\n}\r\n\r\n/** FilterableTable contains the properties and methods provided by a filterable Table.\r\n * @public\r\n */\r\nexport interface FilterableTable {\r\n /** Gets the filter descriptors for the table. */\r\n filterDescriptors: CompositeFilterDescriptorCollection;\r\n\r\n /** Gets ECExpression to get property display value. */\r\n getPropertyDisplayValueExpression(property: string): string;\r\n}\r\n\r\n/** Represents a column that is filterable.\r\n * @public\r\n */\r\nexport interface FilterableColumn {\r\n /** Gets the owning Table for this column. */\r\n filterableTable: FilterableTable;\r\n\r\n /** Gets the filter descriptor. */\r\n columnFilterDescriptor: ColumnFilterDescriptor;\r\n\r\n /** Gets the member (key). */\r\n filterMemberKey: string;\r\n\r\n /** Gets the member type. */\r\n filterMemberType: string;\r\n\r\n /** Determines if the filter for this column is active. */\r\n isFilterActive: boolean;\r\n\r\n /** Determines if the filter should show distinct values as a filter option */\r\n showDistinctValueFilters: boolean;\r\n\r\n /** Determines if the filter should show field filter options */\r\n showFieldFilters: boolean;\r\n\r\n /** Determines if the filter is case-sensitive */\r\n filterCaseSensitive: boolean;\r\n\r\n /** Allows the column to create a filter descriptor for use in the filter descriptor collection. */\r\n createSimpleFilterDescriptor(value: any, filterOperator: FilterOperator): OperatorValueFilterDescriptor;\r\n\r\n /** Gets the distinct values within the columns in the table. */\r\n getDistinctValues(maximumValueCount?: number): Promise<DistinctValueCollection>;\r\n}\r\n\r\n/** A filtering abstraction that knows how to create predicate filtering expression.\r\n * @public\r\n */\r\nexport interface FilterDescriptor {\r\n /** Gets a value indicating whether this filter is active. */\r\n isActive: boolean;\r\n\r\n /** Clears the filter descriptor and sets it to inactive. */\r\n clear(): void;\r\n\r\n /** Evaluates a row for filtering. */\r\n evaluateRow(row: RowItem): boolean;\r\n\r\n /** Determines if this filter is for a particular column. */\r\n isFilterForColumn(columnKey: string): boolean;\r\n\r\n /** Returns filter as ECExpression.\r\n * @alpha */\r\n getFilterExpression(): string;\r\n}\r\n\r\n/** An abstraction for all filter descriptors that have an operator and a value\r\n * @public\r\n */\r\nexport interface OperatorValueFilterDescriptor extends FilterDescriptor {\r\n /** Gets the operator for the filter. */\r\n operator: FilterOperator;\r\n\r\n /** Gets the value for the filter. */\r\n value: any;\r\n\r\n /** Gets the member (key). */\r\n memberKey: string;\r\n\r\n /** Gets the member type. */\r\n memberType: string;\r\n\r\n /** Determines if the filtering is case sensitive. */\r\n isCaseSensitive: boolean;\r\n}\r\n\r\n/** Represents the distinct filter descriptor of a column filter descriptor.\r\n * @public\r\n */\r\nexport interface DistinctValuesFilterDescriptor extends FilterDescriptor {\r\n /** Gets the distinct values. */\r\n distinctValues: DistinctValueCollection;\r\n\r\n /** Gets the filter descriptors. */\r\n filterDescriptorCollection: OperatorValueFilterDescriptorCollection;\r\n\r\n /** Tries to find descriptor. */\r\n tryFindDescriptor(distinctValue: any): FilterDescriptor | undefined;\r\n\r\n /** Adds the distinct value. */\r\n addDistinctValue(distinctValue: any): void;\r\n\r\n /** Removes the distinct value. */\r\n removeDistinctValue(distinctValue: any): boolean;\r\n\r\n /** Gets or sets the FilterOperator used for comparing actual data values with checked distinct values.\r\n * The default is FilterOperator.IsEqualTo.\r\n */\r\n distinctValuesComparisonOperator: FilterOperator;\r\n}\r\n\r\n/** Represents the field filter descriptor of a column filter descriptor.\r\n * @public\r\n */\r\nexport interface FieldFilterDescriptor extends FilterDescriptor {\r\n\r\n /** Gets the filter descriptors. */\r\n filterDescriptorCollection: OperatorValueFilterDescriptorCollection;\r\n\r\n /** Tries to find descriptor. */\r\n tryFindDescriptor(fieldValue: any, operator: FilterOperator): FilterDescriptor | undefined;\r\n\r\n /** Adds the field value. */\r\n addFieldValue(fieldValue: any, operator: FilterOperator, isCaseSensitive?: boolean): void;\r\n\r\n /** Removes the field value. */\r\n removeFieldValue(fieldValue: any, operator: FilterOperator): boolean;\r\n\r\n /** Gets or sets the logical operator. */\r\n logicalOperator: FilterCompositionLogicalOperator;\r\n}\r\n\r\n/** Represents a column filter descriptor associated with a specific column.\r\n * @public\r\n */\r\nexport interface ColumnFilterDescriptor extends FilterDescriptor {\r\n /** Gets the Distinct Values filter descriptor. */\r\n distinctFilter: DistinctValuesFilterDescriptor;\r\n\r\n /** Gets the Field filter descriptor. */\r\n fieldFilter: FieldFilterDescriptor;\r\n}\r\n\r\n/** Distinct Value for Table filtering purposes\r\n * @public\r\n */\r\nexport interface TableDistinctValue {\r\n value: Primitives.Value;\r\n label: string;\r\n}\r\n\r\n/** A set of distinct values for a column.\r\n * @public\r\n */\r\nexport class DistinctValueCollection {\r\n private _values: TableDistinctValue[];\r\n\r\n constructor() {\r\n this._values = new Array<TableDistinctValue>();\r\n }\r\n\r\n public get values() { return this._values; }\r\n public set values(values: TableDistinctValue[]) { this._values = values; }\r\n}\r\n\r\n/** Represents a composite filtering abstraction which has a collection of\r\n * filter descriptors combined together by a logical operator.\r\n * @public\r\n */\r\nexport interface CompositeFilterDescriptor extends FilterDescriptor {\r\n /** Gets or sets the logical operator. */\r\n logicalOperator: FilterCompositionLogicalOperator;\r\n\r\n /** Gets filter descriptors that will be used for composition. */\r\n filterDescriptorCollection: FilterDescriptorCollection;\r\n}\r\n\r\n/** Collection of FilterDescriptor objects composed together by a logical operator.\r\n * @public\r\n */\r\nexport interface CompositeFilterDescriptorCollection {\r\n /** Gets the number of filter descriptors in the collection */\r\n count: number;\r\n\r\n /** Gets and sets the logical operator. */\r\n logicalOperator: FilterCompositionLogicalOperator;\r\n\r\n /** Evaluates a row for filtering */\r\n evaluateRow(row: RowItem): boolean;\r\n\r\n /** Determines if a filter is active for a particular column */\r\n isColumnFilterActive(columnKey: string): boolean;\r\n\r\n /** Gets the filter for a particular column */\r\n getColumnFilterDescriptor(columnKey: string): ColumnFilterDescriptor | undefined;\r\n\r\n /** Adds a filter descriptor to the collection */\r\n add(item: FilterDescriptor): void;\r\n\r\n /** Clears the filter descriptor. */\r\n clear(): void;\r\n\r\n /** Returns filter as ECExpression.\r\n * @alpha */\r\n getFilterExpression(): string;\r\n}\r\n\r\n/** Collection of filter descriptors.\r\n * @public\r\n */\r\nexport abstract class FilterDescriptorCollectionBase<TDescriptor extends FilterDescriptor> {\r\n private _descriptors: TDescriptor[];\r\n\r\n constructor() {\r\n this._descriptors = new Array<TDescriptor>();\r\n }\r\n\r\n public get descriptors() { return this._descriptors; }\r\n\r\n /** Adds an FilterDescriptor to the collection.\r\n * @param item The FilterDescriptor to add.\r\n */\r\n public add(item: TDescriptor): void {\r\n this.descriptors.push(item);\r\n }\r\n\r\n /** Removes a particular FilterDescriptor from the collection.\r\n * @param item The FilterDescriptor to remove.\r\n */\r\n public remove(item: TDescriptor): boolean {\r\n const index = this.descriptors.indexOf(item);\r\n if (index >= 0) {\r\n this.descriptors.splice(index, 1);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** Clears the collection.\r\n */\r\n public clear(): void {\r\n this.descriptors.splice(0);\r\n }\r\n\r\n /** Determines if the collection is active.\r\n */\r\n public get isActive(): boolean {\r\n return this.descriptors.some((fd: TDescriptor) => fd.isActive);\r\n }\r\n\r\n /** Gets the count of items in the collection.\r\n */\r\n public get count(): number {\r\n return this.descriptors.length;\r\n }\r\n}\r\n\r\n/** Collection of filter descriptors.\r\n * @public\r\n */\r\nexport class FilterDescriptorCollection extends FilterDescriptorCollectionBase<FilterDescriptor> {\r\n}\r\n\r\n/** Collection of OperatorValue filter descriptors.\r\n * @public\r\n */\r\nexport class OperatorValueFilterDescriptorCollection extends FilterDescriptorCollectionBase<OperatorValueFilterDescriptor> {\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ColumnFiltering.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/ColumnFiltering.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAQ/F,4CAA4C;AAE5C;;;GAGG;AACH,IAAY,cAyBX;AAzBD,WAAY,cAAc;IACxB,uBAAuB;IACvB,6DAAS,CAAA;IACT,mEAAY,CAAA;IAEZ,8DAA8D;IAC9D,+DAAU,CAAA;IACV,iFAAmB,CAAA;IACnB,qEAAa,CAAA;IACb,uFAAsB,CAAA;IACtB,qDAAK,CAAA;IAEL,UAAU;IACV,+DAAU,CAAA;IACV,2DAAQ,CAAA;IACR,2DAAQ,CAAA;IACR,wEAAc,CAAA;IACd,sEAAa,CAAA;IACb,4EAAgB,CAAA;IAChB,0DAAO,CAAA;IACP,gEAAU,CAAA;IAEV,iCAAiC;IACjC,wDAAM,CAAA;IACN,8DAAS,CAAA;AACX,CAAC,EAzBW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAyBzB;AAED;;;GAGG;AACH,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC1C,qFAAG,CAAA;IACH,mFAAE,CAAA;AACJ,CAAC,EAHW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAG3C;AAkKD;;;GAGG;AACH,MAAa,uBAAuB;IAGlC;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,KAAK,EAAsB,CAAC;IACjD,CAAC;IAED,IAAW,MAAM,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,IAAW,MAAM,CAAC,MAA4B,IAAI,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;CAC3E;AATD,0DASC;AA8CD;;;GAGG;AACH,MAAsB,8BAA8B;IAGlD;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,KAAK,EAAe,CAAC;IAC/C,CAAC;IAED,IAAW,WAAW,KAAK,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtD;;OAEG;IACI,GAAG,CAAC,IAAiB;QAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,IAAiB;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAClC,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;OACG;IACI,KAAK;QACV,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC;IAED;OACG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IAED;OACG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;IACjC,CAAC;CACF;AA7CD,wEA6CC;AAED;;;GAGG;AACH,MAAa,0BAA2B,SAAQ,8BAAgD;CAC/F;AADD,gEACC;AAED;;;GAGG;AACH,MAAa,uCAAwC,SAAQ,8BAA6D;CACzH;AADD,0FACC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport { Primitives } from \"@itwin/appui-abstract\";\r\nimport { RowItem } from \"../TableDataProvider\";\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** Operator used in FilterDescriptor\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this enum.\r\n * @public\r\n */\r\nexport enum FilterOperator {\r\n // All filterable types\r\n IsEqualTo,\r\n IsNotEqualTo,\r\n\r\n // Numeric types, Date, all types that implement these methods\r\n IsLessThan,\r\n IsLessThanOrEqualTo,\r\n IsGreaterThan,\r\n IsGreaterThanOrEqualTo,\r\n Range,\r\n\r\n // Strings\r\n StartsWith,\r\n EndsWith,\r\n Contains,\r\n DoesNotContain,\r\n IsContainedIn,\r\n IsNotContainedIn,\r\n IsEmpty,\r\n IsNotEmpty,\r\n\r\n // All filterable null-able types\r\n IsNull,\r\n IsNotNull,\r\n}\r\n\r\n/** Logical operator used for filter descriptor composition\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this enum.\r\n * @public\r\n */\r\nexport enum FilterCompositionLogicalOperator {\r\n And,\r\n Or,\r\n}\r\n\r\n/** FilterableTable contains the properties and methods provided by a filterable Table.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface FilterableTable {\r\n /** Gets the filter descriptors for the table. */\r\n filterDescriptors: CompositeFilterDescriptorCollection;\r\n\r\n /** Gets ECExpression to get property display value. */\r\n getPropertyDisplayValueExpression(property: string): string;\r\n}\r\n\r\n/** Represents a column that is filterable.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface FilterableColumn {\r\n /** Gets the owning Table for this column. */\r\n filterableTable: FilterableTable;\r\n\r\n /** Gets the filter descriptor. */\r\n columnFilterDescriptor: ColumnFilterDescriptor;\r\n\r\n /** Gets the member (key). */\r\n filterMemberKey: string;\r\n\r\n /** Gets the member type. */\r\n filterMemberType: string;\r\n\r\n /** Determines if the filter for this column is active. */\r\n isFilterActive: boolean;\r\n\r\n /** Determines if the filter should show distinct values as a filter option */\r\n showDistinctValueFilters: boolean;\r\n\r\n /** Determines if the filter should show field filter options */\r\n showFieldFilters: boolean;\r\n\r\n /** Determines if the filter is case-sensitive */\r\n filterCaseSensitive: boolean;\r\n\r\n /** Allows the column to create a filter descriptor for use in the filter descriptor collection. */\r\n createSimpleFilterDescriptor(value: any, filterOperator: FilterOperator): OperatorValueFilterDescriptor;\r\n\r\n /** Gets the distinct values within the columns in the table. */\r\n getDistinctValues(maximumValueCount?: number): Promise<DistinctValueCollection>;\r\n}\r\n\r\n/** A filtering abstraction that knows how to create predicate filtering expression.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface FilterDescriptor {\r\n /** Gets a value indicating whether this filter is active. */\r\n isActive: boolean;\r\n\r\n /** Clears the filter descriptor and sets it to inactive. */\r\n clear(): void;\r\n\r\n /** Evaluates a row for filtering. */\r\n evaluateRow(row: RowItem): boolean;\r\n\r\n /** Determines if this filter is for a particular column. */\r\n isFilterForColumn(columnKey: string): boolean;\r\n\r\n /** Returns filter as ECExpression.\r\n * @alpha */\r\n getFilterExpression(): string;\r\n}\r\n\r\n/** An abstraction for all filter descriptors that have an operator and a value\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface OperatorValueFilterDescriptor extends FilterDescriptor {\r\n /** Gets the operator for the filter. */\r\n operator: FilterOperator;\r\n\r\n /** Gets the value for the filter. */\r\n value: any;\r\n\r\n /** Gets the member (key). */\r\n memberKey: string;\r\n\r\n /** Gets the member type. */\r\n memberType: string;\r\n\r\n /** Determines if the filtering is case sensitive. */\r\n isCaseSensitive: boolean;\r\n}\r\n\r\n/** Represents the distinct filter descriptor of a column filter descriptor.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface DistinctValuesFilterDescriptor extends FilterDescriptor {\r\n /** Gets the distinct values. */\r\n distinctValues: DistinctValueCollection;\r\n\r\n /** Gets the filter descriptors. */\r\n filterDescriptorCollection: OperatorValueFilterDescriptorCollection;\r\n\r\n /** Tries to find descriptor. */\r\n tryFindDescriptor(distinctValue: any): FilterDescriptor | undefined;\r\n\r\n /** Adds the distinct value. */\r\n addDistinctValue(distinctValue: any): void;\r\n\r\n /** Removes the distinct value. */\r\n removeDistinctValue(distinctValue: any): boolean;\r\n\r\n /** Gets or sets the FilterOperator used for comparing actual data values with checked distinct values.\r\n * The default is FilterOperator.IsEqualTo.\r\n */\r\n distinctValuesComparisonOperator: FilterOperator;\r\n}\r\n\r\n/** Represents the field filter descriptor of a column filter descriptor.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface FieldFilterDescriptor extends FilterDescriptor {\r\n\r\n /** Gets the filter descriptors. */\r\n filterDescriptorCollection: OperatorValueFilterDescriptorCollection;\r\n\r\n /** Tries to find descriptor. */\r\n tryFindDescriptor(fieldValue: any, operator: FilterOperator): FilterDescriptor | undefined;\r\n\r\n /** Adds the field value. */\r\n addFieldValue(fieldValue: any, operator: FilterOperator, isCaseSensitive?: boolean): void;\r\n\r\n /** Removes the field value. */\r\n removeFieldValue(fieldValue: any, operator: FilterOperator): boolean;\r\n\r\n /** Gets or sets the logical operator. */\r\n logicalOperator: FilterCompositionLogicalOperator;\r\n}\r\n\r\n/** Represents a column filter descriptor associated with a specific column.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface ColumnFilterDescriptor extends FilterDescriptor {\r\n /** Gets the Distinct Values filter descriptor. */\r\n distinctFilter: DistinctValuesFilterDescriptor;\r\n\r\n /** Gets the Field filter descriptor. */\r\n fieldFilter: FieldFilterDescriptor;\r\n}\r\n\r\n/** Distinct Value for Table filtering purposes\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface TableDistinctValue {\r\n value: Primitives.Value;\r\n label: string;\r\n}\r\n\r\n/** A set of distinct values for a column.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport class DistinctValueCollection {\r\n private _values: TableDistinctValue[];\r\n\r\n constructor() {\r\n this._values = new Array<TableDistinctValue>();\r\n }\r\n\r\n public get values() { return this._values; }\r\n public set values(values: TableDistinctValue[]) { this._values = values; }\r\n}\r\n\r\n/** Represents a composite filtering abstraction which has a collection of\r\n * filter descriptors combined together by a logical operator.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface CompositeFilterDescriptor extends FilterDescriptor {\r\n /** Gets or sets the logical operator. */\r\n logicalOperator: FilterCompositionLogicalOperator;\r\n\r\n /** Gets filter descriptors that will be used for composition. */\r\n filterDescriptorCollection: FilterDescriptorCollection;\r\n}\r\n\r\n/** Collection of FilterDescriptor objects composed together by a logical operator.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport interface CompositeFilterDescriptorCollection {\r\n /** Gets the number of filter descriptors in the collection */\r\n count: number;\r\n\r\n /** Gets and sets the logical operator. */\r\n logicalOperator: FilterCompositionLogicalOperator;\r\n\r\n /** Evaluates a row for filtering */\r\n evaluateRow(row: RowItem): boolean;\r\n\r\n /** Determines if a filter is active for a particular column */\r\n isColumnFilterActive(columnKey: string): boolean;\r\n\r\n /** Gets the filter for a particular column */\r\n getColumnFilterDescriptor(columnKey: string): ColumnFilterDescriptor | undefined;\r\n\r\n /** Adds a filter descriptor to the collection */\r\n add(item: FilterDescriptor): void;\r\n\r\n /** Clears the filter descriptor. */\r\n clear(): void;\r\n\r\n /** Returns filter as ECExpression.\r\n * @alpha */\r\n getFilterExpression(): string;\r\n}\r\n\r\n/** Collection of filter descriptors.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport abstract class FilterDescriptorCollectionBase<TDescriptor extends FilterDescriptor> {\r\n private _descriptors: TDescriptor[];\r\n\r\n constructor() {\r\n this._descriptors = new Array<TDescriptor>();\r\n }\r\n\r\n public get descriptors() { return this._descriptors; }\r\n\r\n /** Adds an FilterDescriptor to the collection.\r\n * @param item The FilterDescriptor to add.\r\n */\r\n public add(item: TDescriptor): void {\r\n this.descriptors.push(item);\r\n }\r\n\r\n /** Removes a particular FilterDescriptor from the collection.\r\n * @param item The FilterDescriptor to remove.\r\n */\r\n public remove(item: TDescriptor): boolean {\r\n const index = this.descriptors.indexOf(item);\r\n if (index >= 0) {\r\n this.descriptors.splice(index, 1);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** Clears the collection.\r\n */\r\n public clear(): void {\r\n this.descriptors.splice(0);\r\n }\r\n\r\n /** Determines if the collection is active.\r\n */\r\n public get isActive(): boolean {\r\n return this.descriptors.some((fd: TDescriptor) => fd.isActive);\r\n }\r\n\r\n /** Gets the count of items in the collection.\r\n */\r\n public get count(): number {\r\n return this.descriptors.length;\r\n }\r\n}\r\n\r\n/** Collection of filter descriptors.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport class FilterDescriptorCollection extends FilterDescriptorCollectionBase<FilterDescriptor> {\r\n}\r\n\r\n/** Collection of OperatorValue filter descriptors.\r\n * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.\r\n * @public\r\n */\r\nexport class OperatorValueFilterDescriptorCollection extends FilterDescriptorCollectionBase<OperatorValueFilterDescriptor> {\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnFilteringUtilities.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/ColumnFilteringUtilities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAuB,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ColumnFilteringUtilities.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/ColumnFilteringUtilities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAuB,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;GAEG;AACH,qBAAa,wBAAwB;WAErB,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;WAIlE,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,GAAG;WAU1D,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,GAAG,SAAS;CAWtF"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.ColumnFilteringUtilities = void 0;
|
|
11
11
|
const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
12
|
+
/* eslint-disable deprecation/deprecation */
|
|
12
13
|
/** Column Filtering utility methods
|
|
13
14
|
* @internal
|
|
14
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnFilteringUtilities.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/ColumnFilteringUtilities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0DAAwF;
|
|
1
|
+
{"version":3,"file":"ColumnFilteringUtilities.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/ColumnFilteringUtilities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0DAAwF;AAExF,4CAA4C;AAE5C;;GAEG;AACH,MAAa,wBAAwB;IAE5B,MAAM,CAAC,OAAO,CAAC,OAAgB,EAAE,SAAiB;QACvD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC;IAChF,CAAC;IAEM,MAAM,CAAC,gBAAgB,CAAC,OAAgB,EAAE,SAAiB;QAChE,MAAM,QAAQ,GAAG,wBAAwB,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAEtE,uBAAuB;QACvB,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS;YACzD,OAAO,SAAS,CAAC;QAEnB,OAAO,wBAAwB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrE,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,MAAsB;QACpD,IAAI,cAA4C,CAAC;QACjD,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;QAEjC,uBAAuB;QACvB,IAAI,WAAW,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS;YAC3D,cAAc,GAAG,WAAW,CAAC,KAAK,CAAC;QAErC,OAAO,cAAc,CAAC;IACxB,CAAC;CAEF;AA3BD,4DA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport { Primitives, PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport { CellItem, RowItem } from \"../TableDataProvider\";\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** Column Filtering utility methods\r\n * @internal\r\n */\r\nexport class ColumnFilteringUtilities {\r\n\r\n public static getCell(rowItem: RowItem, columnKey: string): CellItem | undefined {\r\n return rowItem.cells.find((cellItem: CellItem) => cellItem.key === columnKey);\r\n }\r\n\r\n public static getValueFromCell(rowItem: RowItem, columnKey: string): any {\r\n const cellItem = ColumnFilteringUtilities.getCell(rowItem, columnKey);\r\n\r\n // istanbul ignore next\r\n if (cellItem === undefined || cellItem.record === undefined)\r\n return undefined;\r\n\r\n return ColumnFilteringUtilities.getPrimitiveValue(cellItem.record);\r\n }\r\n\r\n public static getPrimitiveValue(record: PropertyRecord): Primitives.Value | undefined {\r\n let primitiveValue: Primitives.Value | undefined;\r\n const recordValue = record.value;\r\n\r\n // istanbul ignore else\r\n if (recordValue.valueFormat === PropertyValueFormat.Primitive)\r\n primitiveValue = recordValue.value;\r\n\r\n return primitiveValue;\r\n }\r\n\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterableColumnBase.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/FilterableColumnBase.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEvI,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"FilterableColumnBase.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/FilterableColumnBase.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEvI,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;GAEG;AACH,8BAAsB,oBAAqB,YAAW,gBAAgB;IACpE,OAAO,CAAC,kBAAkB,CAAoB;IAE9C,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,iBAAiB,CAAU;IACnC,OAAO,CAAC,yBAAyB,CAAU;IAC3C,OAAO,CAAC,oBAAoB,CAAU;IAEtC,OAAO,CAAC,gBAAgB,CAAkB;gBAE9B,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB;IAkB5E;OACG;IACH,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED;OACG;IACH,IAAW,eAAe,IAAI,eAAe,CAE5C;IAED;OACG;IACH,IAAW,iBAAiB,IAAI,iBAAiB,CAEhD;IAED;;OAEG;IACH,IAAW,sBAAsB,IAAI,sBAAsB,CAS1D;IAED;;OAEG;IACH,SAAS,CAAC,4BAA4B,IAAI,sBAAsB;IAIhE;;OAEG;IACI,4BAA4B,CAAC,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,cAAc,GAAG,qBAAqB;IAItG;OACG;IACH,IAAW,eAAe,IAAI,MAAM,CAEnC;IAED;OACG;IACH,IAAW,gBAAgB,IAAI,MAAM,CAMpC;IAED,wCAAwC;IACxC,IAAW,cAAc,IAAI,OAAO,CAEnC;IAED,8EAA8E;IAC9E,IAAW,wBAAwB,IAAI,OAAO,CAE7C;IAED,gEAAgE;IAChE,IAAW,gBAAgB,IAAI,OAAO,CAErC;IAED,iDAAiD;IACjD,IAAW,mBAAmB,IAAI,OAAO,CAExC;IAED;;OAEG;aACa,iBAAiB,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAE/F"}
|
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.FilterableColumnBase = void 0;
|
|
11
11
|
const TableColumnFilterDescriptor_1 = require("./TableColumnFilterDescriptor");
|
|
12
12
|
const TableFilterDescriptor_1 = require("./TableFilterDescriptor");
|
|
13
|
+
/* eslint-disable deprecation/deprecation */
|
|
13
14
|
/** Filterable Column base class.
|
|
14
15
|
* @internal
|
|
15
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterableColumnBase.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/FilterableColumnBase.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,+EAA4E;AAC5E,mEAAgE;
|
|
1
|
+
{"version":3,"file":"FilterableColumnBase.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/FilterableColumnBase.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,+EAA4E;AAC5E,mEAAgE;AAChE,4CAA4C;AAE5C;;GAEG;AACH,MAAsB,oBAAoB;IAUxC,YAAY,eAAgC,EAAE,WAA8B;QAPpE,gBAAW,GAAY,KAAK,CAAC;QAQnC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAAG,WAAW,CAAC;QAEtC,IAAI,CAAC,WAAW,GAAG,CAAC,WAAW,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC;QAC3F,IAAI,CAAC,iBAAiB,GAAG,CAAC,WAAW,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,gBAAgB,CAAC;QAC5G,IAAI,CAAC,yBAAyB,GAAG,CAAC,WAAW,CAAC,wBAAwB,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC;QACpI,IAAI,CAAC,oBAAoB,GAAG,CAAC,WAAW,CAAC,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CA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IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC;IACrC,CAAC;IAED;OACG;IACH,IAAW,gBAAgB;QACzB,IAAI,UAAU,GAAG,EAAE,CAAC;QACpB,uBAAuB;QACvB,IAAI,IAAI,CAAC,kBAAkB,CAAC,mBAAmB;YAC7C,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,QAAQ,CAAC;QACpE,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,wCAAwC;IACxC,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC5F,CAAC;IAED,8EAA8E;IAC9E,IAAW,wBAAwB;QACjC,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACxC,CAAC;IAED,gEAAgE;IAChE,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED,iDAAiD;IACjD,IAAW,mBAAmB;QAC5B,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;CAOF;AAnHD,oDAmHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport { ColumnDescription } from \"../TableDataProvider\";\r\nimport { ColumnFilterDescriptor, DistinctValueCollection, FilterableColumn, FilterableTable, FilterOperator } from \"./ColumnFiltering\";\r\nimport { TableColumnFilterDescriptor } from \"./TableColumnFilterDescriptor\";\r\nimport { TableFilterDescriptor } from \"./TableFilterDescriptor\";\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** Filterable Column base class.\r\n * @internal\r\n */\r\nexport abstract class FilterableColumnBase implements FilterableColumn {\r\n private _columnDescription: ColumnDescription;\r\n\r\n private _filterable: boolean = false;\r\n private _showFieldFilters: boolean;\r\n private _showDistinctValueFilters: boolean;\r\n private _filterCaseSensitive: boolean;\r\n\r\n private _filterableTable: FilterableTable;\r\n\r\n constructor(filterableTable: FilterableTable, description: ColumnDescription) {\r\n this._filterableTable = filterableTable;\r\n this._columnDescription = description;\r\n\r\n this._filterable = (description.filterable === undefined) ? false : description.filterable;\r\n this._showFieldFilters = (description.showFieldFilters === undefined) ? true : description.showFieldFilters;\r\n this._showDistinctValueFilters = (description.showDistinctValueFilters === undefined) ? true : description.showDistinctValueFilters;\r\n this._filterCaseSensitive = (description.filterCaseSensitive === undefined) ? false : description.filterCaseSensitive;\r\n\r\n if (!this._columnDescription.propertyDescription) {\r\n this._columnDescription.propertyDescription = {\r\n name: \"\",\r\n displayLabel: \"\",\r\n typename: \"\",\r\n };\r\n }\r\n }\r\n\r\n /** Indicates whether column is filterable.\r\n */\r\n public get filterable(): boolean {\r\n return this._filterable;\r\n }\r\n\r\n /** Gets the owning filterable Table.\r\n */\r\n public get filterableTable(): FilterableTable {\r\n return this._filterableTable;\r\n }\r\n\r\n /** Gets the Column Description.\r\n */\r\n public get columnDescription(): ColumnDescription {\r\n return this._columnDescription;\r\n }\r\n\r\n /** Gets the column filter descriptor.\r\n * @return A class implementing IColumnFilterDescriptor.\r\n */\r\n public get columnFilterDescriptor(): ColumnFilterDescriptor {\r\n let columnFilterDescriptor = this._filterableTable.filterDescriptors.getColumnFilterDescriptor(this.filterMemberKey);\r\n\r\n if (undefined === columnFilterDescriptor) {\r\n columnFilterDescriptor = this.createColumnFilterDescriptor();\r\n this._filterableTable.filterDescriptors.add(columnFilterDescriptor);\r\n }\r\n\r\n return columnFilterDescriptor;\r\n }\r\n\r\n /** Creates the column filter descriptor.\r\n * @return A new class implementing ColumnFilterDescriptor.\r\n */\r\n protected createColumnFilterDescriptor(): ColumnFilterDescriptor {\r\n return new TableColumnFilterDescriptor(this, this.filterMemberKey, this.filterMemberType);\r\n }\r\n\r\n /** Creates a basic filter descriptor for use .\r\n * @return A new FilterDescriptor.\r\n */\r\n public createSimpleFilterDescriptor(value: any, filterOperator: FilterOperator): TableFilterDescriptor {\r\n return new TableFilterDescriptor(this._filterableTable, this.filterMemberKey, this.filterMemberType, filterOperator, value, this._filterCaseSensitive);\r\n }\r\n\r\n /** Gets the filter member key.\r\n */\r\n public get filterMemberKey(): string {\r\n return this._columnDescription.key;\r\n }\r\n\r\n /** Gets the filter member type.\r\n */\r\n public get filterMemberType(): string {\r\n let memberType = \"\";\r\n // istanbul ignore else\r\n if (this._columnDescription.propertyDescription)\r\n memberType = this._columnDescription.propertyDescription.typename;\r\n return memberType;\r\n }\r\n\r\n /** Determines if a filter is active. */\r\n public get isFilterActive(): boolean {\r\n return this._filterableTable.filterDescriptors.isColumnFilterActive(this.filterMemberKey);\r\n }\r\n\r\n /** Determines if the filter should show distinct values as a filter option */\r\n public get showDistinctValueFilters(): boolean {\r\n return this._showDistinctValueFilters;\r\n }\r\n\r\n /** Determines if the filter should show field filter options */\r\n public get showFieldFilters(): boolean {\r\n return this._showFieldFilters;\r\n }\r\n\r\n /** Determines if the filter is case-sensitive */\r\n public get filterCaseSensitive(): boolean {\r\n return this._filterCaseSensitive;\r\n }\r\n\r\n /** Gets the distinct values for a column.\r\n * @return The distinct values.\r\n */\r\n public abstract getDistinctValues(maximumValueCount: number): Promise<DistinctValueCollection>;\r\n\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableColumnFilterDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/TableColumnFilterDescriptor.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACL,sBAAsB,EAAsD,8BAA8B,EAAE,qBAAqB,EAAE,gBAAgB,EAGpJ,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"TableColumnFilterDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/TableColumnFilterDescriptor.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACL,sBAAsB,EAAsD,8BAA8B,EAAE,qBAAqB,EAAE,gBAAgB,EAGpJ,MAAM,mBAAmB,CAAC;AAG3B;;GAEG;AACH,qBAAa,2BAA4B,YAAW,sBAAsB;IACxE,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,gBAAgB,CAAgC;IACxD,OAAO,CAAC,eAAe,CAAqC;IAC5D,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,WAAW,CAAS;IAE5B;;;;OAIG;gBACgB,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAclF;OACG;IACH,IAAW,cAAc,IAAI,8BAA8B,CAE1D;IAED;OACG;IACH,IAAW,WAAW,IAAI,qBAAqB,CAE9C;IAED;OACG;IACH,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED;OACG;IACH,IAAW,MAAM,IAAI,gBAAgB,CAEpC;IAED;OACG;IACI,KAAK,IAAI,IAAI;IAOpB;OACG;IACI,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO;IAIzC;OACG;IACI,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI7C,mBAAmB,IAAI,MAAM;IAIpC;OACG;IACH,IAAW,SAAS,IAAI,MAAM,CAE7B;IAED;OACG;IACH,IAAW,SAAS,CAAC,KAAK,EAAE,MAAM,EAOjC;IAED;OACG;IACH,IAAW,UAAU,IAAI,MAAM,CAE9B;IAED;OACG;IACH,IAAW,UAAU,CAAC,KAAK,EAAE,MAAM,EAOlC;CACF"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.TableColumnFilterDescriptor = void 0;
|
|
11
11
|
const ColumnFiltering_1 = require("./ColumnFiltering");
|
|
12
|
+
/* eslint-disable deprecation/deprecation */
|
|
12
13
|
/** A ColumnFilterDescriptor for TableColumn.
|
|
13
14
|
* @internal
|
|
14
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableColumnFilterDescriptor.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/TableColumnFilterDescriptor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,uDAI2B;AAE3B;;GAEG;AACH,MAAa,2BAA2B;IAQtC;;;;OAIG;IACH,YAAmB,MAAwB,EAAE,SAAiB,EAAE,UAAkB;QAChF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAE9B,IAAI,CAAC,eAAe,GAAG,IAAI,kCAAkC,CAAC,MAAM,CAAC,CAAC;QACtE,IAAI,CAAC,YAAY,GAAG,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;QAE1D,IAAI,CAAC,gBAAgB,GAAG,IAAI,6BAA6B,EAAE,CAAC;QAC5D,IAAI,CAAC,gBAAgB,CAAC,eAAe,GAAG,kDAAgC,CAAC,GAAG,CAAC;QAC7E,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC3E,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1E,CAAC;IAED;OACG;IACH,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED;OACG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;OACG;IACH,IAAW,QAAQ;QACjB,OAA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AiB,CAAC,SAAiB;QACxC,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC;IACvE,CAAC;IAEM,mBAAmB;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,CAAC;IACrD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport { RowItem } from \"../TableDataProvider\";\r\nimport {\r\n ColumnFilterDescriptor, CompositeFilterDescriptor, DistinctValueCollection, DistinctValuesFilterDescriptor, FieldFilterDescriptor, FilterableColumn,\r\n FilterCompositionLogicalOperator, FilterDescriptorCollection, FilterOperator, OperatorValueFilterDescriptor,\r\n OperatorValueFilterDescriptorCollection,\r\n} from \"./ColumnFiltering\";\r\n\r\n/** A ColumnFilterDescriptor for TableColumn.\r\n * @internal\r\n */\r\nexport class TableColumnFilterDescriptor implements ColumnFilterDescriptor {\r\n private _column: FilterableColumn;\r\n private _compositeFilter: CompositeFilterDescriptorImpl;\r\n private _distinctFilter: DistinctValuesFilterDescriptorImpl;\r\n private _fieldFilter: FieldFilterDescriptor;\r\n private _memberKey: string;\r\n private _memberType: string;\r\n\r\n /** Initializes a new instance of the ColumnFilterDescriptor class.\r\n * @param column The column.\r\n * @param memberKey The member (key).\r\n * @param memberType The member type.\r\n */\r\n public constructor(column: FilterableColumn, memberKey: string, memberType: string) {\r\n this._column = column;\r\n this._memberKey = memberKey;\r\n this._memberType = memberType;\r\n\r\n this._distinctFilter = new DistinctValuesFilterDescriptorImpl(column);\r\n this._fieldFilter = new FieldFilterDescriptorImpl(column);\r\n\r\n this._compositeFilter = new CompositeFilterDescriptorImpl();\r\n this._compositeFilter.logicalOperator = FilterCompositionLogicalOperator.And;\r\n this._compositeFilter.filterDescriptorCollection.add(this._distinctFilter);\r\n this._compositeFilter.filterDescriptorCollection.add(this._fieldFilter);\r\n }\r\n\r\n /** Gets the distinct values filter descriptor.\r\n */\r\n public get distinctFilter(): DistinctValuesFilterDescriptor {\r\n return this._distinctFilter;\r\n }\r\n\r\n /** Gets the field filter descriptor.\r\n */\r\n public get fieldFilter(): FieldFilterDescriptor {\r\n return this._fieldFilter;\r\n }\r\n\r\n /** Determines if the filter descriptor is active.\r\n */\r\n public get isActive(): boolean {\r\n return this._compositeFilter.isActive;\r\n }\r\n\r\n /** Gets the column.\r\n */\r\n public get column(): FilterableColumn {\r\n return this._column;\r\n }\r\n\r\n /** Clears the filter descriptor.\r\n */\r\n public clear(): void {\r\n this._distinctFilter.clear();\r\n this._fieldFilter.clear();\r\n\r\n // Do NOT call this._compositeFilter.clear() here. That removes the filters from the composite.\r\n }\r\n\r\n /** Evaluates a row for filtering\r\n */\r\n public evaluateRow(row: RowItem): boolean {\r\n return this._compositeFilter.evaluateRow(row);\r\n }\r\n\r\n /** Determines if this filter is for a particular column.\r\n */\r\n public isFilterForColumn(columnKey: string): boolean {\r\n return (this.isActive && this._column.filterMemberKey === columnKey);\r\n }\r\n\r\n public getFilterExpression(): string {\r\n return this._compositeFilter.getFilterExpression();\r\n }\r\n\r\n /** Gets the member (key).\r\n */\r\n public get memberKey(): string {\r\n return this._memberKey;\r\n }\r\n\r\n /** Sets the member (key).\r\n */\r\n public set memberKey(value: string) {\r\n if (value !== this.memberKey) {\r\n this._memberKey = value;\r\n\r\n this.distinctFilter.filterDescriptorCollection.descriptors.forEach((fd: OperatorValueFilterDescriptor) => fd.memberKey = value);\r\n this.fieldFilter.filterDescriptorCollection.descriptors.forEach((fd: OperatorValueFilterDescriptor) => fd.memberKey = value);\r\n }\r\n }\r\n\r\n /** Gets the member type.\r\n */\r\n public get memberType(): string {\r\n return this._memberType;\r\n }\r\n\r\n /** Sets the member type.\r\n */\r\n public set memberType(value: string) {\r\n if (value !== this.memberType) {\r\n this._memberType = value;\r\n\r\n this.distinctFilter.filterDescriptorCollection.descriptors.forEach((fd: OperatorValueFilterDescriptor) => fd.memberType = value);\r\n this.fieldFilter.filterDescriptorCollection.descriptors.forEach((fd: OperatorValueFilterDescriptor) => fd.memberType = value);\r\n }\r\n }\r\n}\r\n\r\n/** Filtering descriptor which serves as a container for one or more child filtering descriptors.\r\n * @internal\r\n */\r\nclass CompositeFilterDescriptorImpl implements CompositeFilterDescriptor {\r\n private _filterDescriptors?: FilterDescriptorCollection;\r\n private _logicalOperator: FilterCompositionLogicalOperator = FilterCompositionLogicalOperator.And;\r\n\r\n /** Gets the logical operator.\r\n */\r\n public get logicalOperator(): FilterCompositionLogicalOperator { return this._logicalOperator; }\r\n\r\n /** Sets the logical operator.\r\n */\r\n public set logicalOperator(value: FilterCompositionLogicalOperator) {\r\n if (this._logicalOperator !== value) {\r\n this._logicalOperator = value;\r\n }\r\n }\r\n\r\n /** Gets the filter descriptors that will be used for composition.\r\n */\r\n public get filterDescriptorCollection(): FilterDescriptorCollection {\r\n if (!this._filterDescriptors) {\r\n this._filterDescriptors = new FilterDescriptorCollection();\r\n }\r\n return this._filterDescriptors;\r\n }\r\n\r\n /** Determines if the filter descriptor is active.\r\n */\r\n public get isActive(): boolean {\r\n let active = false;\r\n // istanbul ignore else\r\n if (this._filterDescriptors)\r\n active = this._filterDescriptors.isActive;\r\n return active;\r\n }\r\n\r\n /** Clears the filter descriptor.\r\n */\r\n /* istanbul ignore next */\r\n public clear(): void {\r\n if (this._filterDescriptors)\r\n this._filterDescriptors.clear();\r\n }\r\n\r\n /** Evaluates a row for filtering\r\n */\r\n public evaluateRow(row: RowItem): boolean {\r\n let passed: boolean = true;\r\n\r\n for (const fd of this.filterDescriptorCollection.descriptors) {\r\n /* istanbul ignore next */\r\n if (!fd.isActive)\r\n continue;\r\n\r\n passed = fd.evaluateRow(row);\r\n\r\n if (passed && FilterCompositionLogicalOperator.Or === this.logicalOperator)\r\n return true;\r\n else if (!passed && FilterCompositionLogicalOperator.And === this.logicalOperator)\r\n return false;\r\n }\r\n\r\n return passed;\r\n }\r\n\r\n /** Determines if this filter is for a particular column.\r\n */\r\n public isFilterForColumn(columnKey: string): boolean {\r\n for (const fd of this.filterDescriptorCollection.descriptors) {\r\n /* istanbul ignore next */\r\n if (!fd.isActive)\r\n continue;\r\n\r\n if (fd.isFilterForColumn(columnKey))\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Returns filter as ECExpression */\r\n public getFilterExpression(): string {\r\n let result: string = \"\";\r\n for (let i = 0; i < this.filterDescriptorCollection.descriptors.length; i++) {\r\n if (!this.filterDescriptorCollection.descriptors[i].isActive)\r\n continue;\r\n\r\n if (i > 0 && result !== \"\") {\r\n switch (this.logicalOperator) {\r\n case FilterCompositionLogicalOperator.And:\r\n result += (\" And \");\r\n break;\r\n case FilterCompositionLogicalOperator.Or:\r\n result += (\" Or \");\r\n break;\r\n }\r\n }\r\n result += (`(${this.filterDescriptorCollection.descriptors[i].getFilterExpression()})`);\r\n }\r\n return result;\r\n }\r\n}\r\n\r\n/** The default implementation of DistinctValuesFilterDescriptor.\r\n * @internal\r\n */\r\nclass DistinctValuesFilterDescriptorImpl implements DistinctValuesFilterDescriptor {\r\n private _column: FilterableColumn;\r\n private _compositeFilter: CompositeFilterDescriptorImpl;\r\n private _distinctValuesComparisonOperator: FilterOperator = FilterOperator.IsEqualTo;\r\n\r\n public constructor(column: FilterableColumn) {\r\n this._column = column;\r\n\r\n this._compositeFilter = new CompositeFilterDescriptorImpl();\r\n this._compositeFilter.logicalOperator = FilterCompositionLogicalOperator.Or;\r\n }\r\n\r\n /** Gets the distinct values from the collection as an Array.\r\n */\r\n public get distinctValues(): DistinctValueCollection {\r\n const distinctValues = new DistinctValueCollection();\r\n\r\n for (const fd of this.filterDescriptorCollection.descriptors) {\r\n distinctValues.values.push(fd.value);\r\n }\r\n\r\n return distinctValues;\r\n }\r\n\r\n /** Gets the collection of distinct values.\r\n */\r\n public get filterDescriptorCollection(): OperatorValueFilterDescriptorCollection {\r\n return this._compositeFilter.filterDescriptorCollection as OperatorValueFilterDescriptorCollection;\r\n }\r\n\r\n /** Determines if the filter descriptor is active.\r\n */\r\n public get isActive(): boolean {\r\n return this.filterDescriptorCollection.descriptors.some((fd: OperatorValueFilterDescriptor) => fd.isActive);\r\n }\r\n\r\n /** Tries to find a distinct value in the collection.\r\n */\r\n public tryFindDescriptor(distinctValue: any): OperatorValueFilterDescriptor | undefined {\r\n return this.filterDescriptorCollection.descriptors.find((fd: OperatorValueFilterDescriptor) => fd.value === distinctValue);\r\n }\r\n\r\n /** Adds a distinct value to the collection.\r\n */\r\n public addDistinctValue(distinctValue: any): void {\r\n const existing = this.tryFindDescriptor(distinctValue);\r\n\r\n if (existing) {\r\n return;\r\n }\r\n\r\n const newFilterDescriptor = this._column.createSimpleFilterDescriptor(distinctValue, this.distinctValuesComparisonOperator);\r\n newFilterDescriptor.isCaseSensitive = true;\r\n this.filterDescriptorCollection.add(newFilterDescriptor);\r\n }\r\n\r\n /** Removes a distinct value from the collection.\r\n */\r\n public removeDistinctValue(distinctValue: any): boolean {\r\n const existing = this.tryFindDescriptor(distinctValue);\r\n\r\n if (existing) {\r\n return this.filterDescriptorCollection.remove(existing);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Clears the filter descriptor.\r\n */\r\n public clear(): void {\r\n this.filterDescriptorCollection.clear();\r\n }\r\n\r\n /** Gets the distinct values comparison operator.\r\n */\r\n public get distinctValuesComparisonOperator(): FilterOperator { return this._distinctValuesComparisonOperator; }\r\n\r\n /** Sets the distinct values comparison operator.\r\n */\r\n public set distinctValuesComparisonOperator(value: FilterOperator) {\r\n // istanbul ignore else\r\n if (this._distinctValuesComparisonOperator !== value) {\r\n this._distinctValuesComparisonOperator = value;\r\n }\r\n }\r\n\r\n /** Evaluates a row for filtering\r\n */\r\n public evaluateRow(row: RowItem): boolean {\r\n return this._compositeFilter.evaluateRow(row);\r\n }\r\n\r\n /** Determines if this filter is for a particular column.\r\n */\r\n public isFilterForColumn(columnKey: string): boolean {\r\n return this._compositeFilter.isFilterForColumn(columnKey);\r\n }\r\n\r\n public getFilterExpression(): string {\r\n return this._compositeFilter.getFilterExpression();\r\n }\r\n}\r\n\r\n/** The default implementation of IFieldFilterDescriptor.\r\n * @internal\r\n */\r\nclass FieldFilterDescriptorImpl implements FieldFilterDescriptor {\r\n private _column: FilterableColumn;\r\n private _compositeFilter: CompositeFilterDescriptorImpl;\r\n\r\n public constructor(column: FilterableColumn) {\r\n this._column = column;\r\n\r\n this._compositeFilter = new CompositeFilterDescriptorImpl();\r\n this._compositeFilter.logicalOperator = FilterCompositionLogicalOperator.Or;\r\n }\r\n\r\n /** Gets the logical operator.\r\n */\r\n public get logicalOperator(): FilterCompositionLogicalOperator {\r\n return this._compositeFilter.logicalOperator;\r\n }\r\n\r\n /** Sets the logical operator.\r\n */\r\n public set logicalOperator(value: FilterCompositionLogicalOperator) {\r\n this._compositeFilter.logicalOperator = value;\r\n }\r\n\r\n /** Determines if the filter descriptor is active.\r\n */\r\n public get isActive(): boolean {\r\n return this.filterDescriptorCollection.descriptors.some((fd: OperatorValueFilterDescriptor) => fd.isActive);\r\n }\r\n\r\n /** Gets the collection of distinct values.\r\n */\r\n public get filterDescriptorCollection(): OperatorValueFilterDescriptorCollection {\r\n return this._compositeFilter.filterDescriptorCollection as OperatorValueFilterDescriptorCollection;\r\n }\r\n\r\n /** Tries to find a field value in the collection.\r\n */\r\n public tryFindDescriptor(fieldValue: any, operator: FilterOperator): OperatorValueFilterDescriptor | undefined {\r\n return this.filterDescriptorCollection.descriptors.find((fd: OperatorValueFilterDescriptor) => {\r\n return fd.value === fieldValue && fd.operator === operator;\r\n });\r\n }\r\n\r\n /** Adds a field value to the collection.\r\n */\r\n public addFieldValue(fieldValue: any, operator: FilterOperator, isCaseSensitive: boolean = false): void {\r\n const existing = this.tryFindDescriptor(fieldValue, operator);\r\n\r\n if (existing) {\r\n return;\r\n }\r\n\r\n const newFilterDescriptor = this._column.createSimpleFilterDescriptor(fieldValue, operator);\r\n newFilterDescriptor.isCaseSensitive = isCaseSensitive;\r\n this.filterDescriptorCollection.add(newFilterDescriptor);\r\n }\r\n\r\n /** Removes a distinct value from the collection.\r\n */\r\n public removeFieldValue(fieldValue: any, operator: FilterOperator): boolean {\r\n const existing = this.tryFindDescriptor(fieldValue, operator);\r\n\r\n if (existing) {\r\n return this.filterDescriptorCollection.remove(existing);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Clears the filter descriptor.\r\n */\r\n public clear(): void {\r\n this.logicalOperator = FilterCompositionLogicalOperator.And;\r\n\r\n this.filterDescriptorCollection.clear();\r\n }\r\n\r\n /** Evaluates a row for filtering\r\n */\r\n public evaluateRow(row: RowItem): boolean {\r\n let result = true;\r\n\r\n for (const fd of this.filterDescriptorCollection.descriptors) {\r\n /* istanbul ignore next */\r\n if (!fd.isActive)\r\n continue;\r\n\r\n result = fd.evaluateRow(row);\r\n if (result && this.logicalOperator === FilterCompositionLogicalOperator.Or)\r\n return true;\r\n else if (!result && this.logicalOperator === FilterCompositionLogicalOperator.And)\r\n return false;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /** Determines if this filter is for a particular column.\r\n */\r\n public isFilterForColumn(columnKey: string): boolean {\r\n return (this.isActive && this._column.filterMemberKey === columnKey);\r\n }\r\n\r\n public getFilterExpression(): string {\r\n return this._compositeFilter.getFilterExpression();\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"TableColumnFilterDescriptor.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/TableColumnFilterDescriptor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,uDAI2B;AAC3B,4CAA4C;AAE5C;;GAEG;AACH,MAAa,2BAA2B;IAQtC;;;;OAIG;IACH,YAAmB,MAAwB,EAAE,SAAiB,EAAE,UAAkB;QAChF,IAAI,CAAC,OAAO,GAA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,CAAC,0BAA0B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SACzD;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED;OACG;IACI,KAAK;QACV,IAAI,CAAC,eAAe,GAAG,kDAAgC,CAAC,GAAG,CAAC;QAE5D,IAAI,CAAC,0BAA0B,CAAC,KAAK,EAAE,CAAC;IAC1C,CAAC;IAED;OACG;IACI,WAAW,CAAC,GAAY;QAC7B,IAAI,MAAM,GAAG,IAAI,CAAC;QAElB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,0BAA0B,CAAC,WAAW,EAAE;YAC5D,0BAA0B;YAC1B,IAAI,CAAC,EAAE,CAAC,QAAQ;gBACd,SAAS;YAEX,MAAM,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,MAAM,IAAI,IAAI,CAAC,eAAe,KAAK,kDAAgC,CAAC,EAAE;gBACxE,OAAO,IAAI,CAAC;iBACT,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,eAAe,KAAK,kDAAgC,CAAC,GAAG;gBAC/E,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;OACG;IACI,iBAAiB,CAAC,SAAiB;QACxC,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC;IACvE,CAAC;IAEM,mBAAmB;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,CAAC;IACrD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport { RowItem } from \"../TableDataProvider\";\r\nimport {\r\n ColumnFilterDescriptor, CompositeFilterDescriptor, DistinctValueCollection, DistinctValuesFilterDescriptor, FieldFilterDescriptor, FilterableColumn,\r\n FilterCompositionLogicalOperator, FilterDescriptorCollection, FilterOperator, OperatorValueFilterDescriptor,\r\n OperatorValueFilterDescriptorCollection,\r\n} from \"./ColumnFiltering\";\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** A ColumnFilterDescriptor for TableColumn.\r\n * @internal\r\n */\r\nexport class TableColumnFilterDescriptor implements ColumnFilterDescriptor {\r\n private _column: FilterableColumn;\r\n private _compositeFilter: CompositeFilterDescriptorImpl;\r\n private _distinctFilter: DistinctValuesFilterDescriptorImpl;\r\n private _fieldFilter: FieldFilterDescriptor;\r\n private _memberKey: string;\r\n private _memberType: string;\r\n\r\n /** Initializes a new instance of the ColumnFilterDescriptor class.\r\n * @param column The column.\r\n * @param memberKey The member (key).\r\n * @param memberType The member type.\r\n */\r\n public constructor(column: FilterableColumn, memberKey: string, memberType: string) {\r\n this._column = column;\r\n this._memberKey = memberKey;\r\n this._memberType = memberType;\r\n\r\n this._distinctFilter = new DistinctValuesFilterDescriptorImpl(column);\r\n this._fieldFilter = new FieldFilterDescriptorImpl(column);\r\n\r\n this._compositeFilter = new CompositeFilterDescriptorImpl();\r\n this._compositeFilter.logicalOperator = FilterCompositionLogicalOperator.And;\r\n this._compositeFilter.filterDescriptorCollection.add(this._distinctFilter);\r\n this._compositeFilter.filterDescriptorCollection.add(this._fieldFilter);\r\n }\r\n\r\n /** Gets the distinct values filter descriptor.\r\n */\r\n public get distinctFilter(): DistinctValuesFilterDescriptor {\r\n return this._distinctFilter;\r\n }\r\n\r\n /** Gets the field filter descriptor.\r\n */\r\n public get fieldFilter(): FieldFilterDescriptor {\r\n return this._fieldFilter;\r\n }\r\n\r\n /** Determines if the filter descriptor is active.\r\n */\r\n public get isActive(): boolean {\r\n return this._compositeFilter.isActive;\r\n }\r\n\r\n /** Gets the column.\r\n */\r\n public get column(): FilterableColumn {\r\n return this._column;\r\n }\r\n\r\n /** Clears the filter descriptor.\r\n */\r\n public clear(): void {\r\n this._distinctFilter.clear();\r\n this._fieldFilter.clear();\r\n\r\n // Do NOT call this._compositeFilter.clear() here. That removes the filters from the composite.\r\n }\r\n\r\n /** Evaluates a row for filtering\r\n */\r\n public evaluateRow(row: RowItem): boolean {\r\n return this._compositeFilter.evaluateRow(row);\r\n }\r\n\r\n /** Determines if this filter is for a particular column.\r\n */\r\n public isFilterForColumn(columnKey: string): boolean {\r\n return (this.isActive && this._column.filterMemberKey === columnKey);\r\n }\r\n\r\n public getFilterExpression(): string {\r\n return this._compositeFilter.getFilterExpression();\r\n }\r\n\r\n /** Gets the member (key).\r\n */\r\n public get memberKey(): string {\r\n return this._memberKey;\r\n }\r\n\r\n /** Sets the member (key).\r\n */\r\n public set memberKey(value: string) {\r\n if (value !== this.memberKey) {\r\n this._memberKey = value;\r\n\r\n this.distinctFilter.filterDescriptorCollection.descriptors.forEach((fd: OperatorValueFilterDescriptor) => fd.memberKey = value);\r\n this.fieldFilter.filterDescriptorCollection.descriptors.forEach((fd: OperatorValueFilterDescriptor) => fd.memberKey = value);\r\n }\r\n }\r\n\r\n /** Gets the member type.\r\n */\r\n public get memberType(): string {\r\n return this._memberType;\r\n }\r\n\r\n /** Sets the member type.\r\n */\r\n public set memberType(value: string) {\r\n if (value !== this.memberType) {\r\n this._memberType = value;\r\n\r\n this.distinctFilter.filterDescriptorCollection.descriptors.forEach((fd: OperatorValueFilterDescriptor) => fd.memberType = value);\r\n this.fieldFilter.filterDescriptorCollection.descriptors.forEach((fd: OperatorValueFilterDescriptor) => fd.memberType = value);\r\n }\r\n }\r\n}\r\n\r\n/** Filtering descriptor which serves as a container for one or more child filtering descriptors.\r\n * @internal\r\n */\r\nclass CompositeFilterDescriptorImpl implements CompositeFilterDescriptor {\r\n private _filterDescriptors?: FilterDescriptorCollection;\r\n private _logicalOperator: FilterCompositionLogicalOperator = FilterCompositionLogicalOperator.And;\r\n\r\n /** Gets the logical operator.\r\n */\r\n public get logicalOperator(): FilterCompositionLogicalOperator { return this._logicalOperator; }\r\n\r\n /** Sets the logical operator.\r\n */\r\n public set logicalOperator(value: FilterCompositionLogicalOperator) {\r\n if (this._logicalOperator !== value) {\r\n this._logicalOperator = value;\r\n }\r\n }\r\n\r\n /** Gets the filter descriptors that will be used for composition.\r\n */\r\n public get filterDescriptorCollection(): FilterDescriptorCollection {\r\n if (!this._filterDescriptors) {\r\n this._filterDescriptors = new FilterDescriptorCollection();\r\n }\r\n return this._filterDescriptors;\r\n }\r\n\r\n /** Determines if the filter descriptor is active.\r\n */\r\n public get isActive(): boolean {\r\n let active = false;\r\n // istanbul ignore else\r\n if (this._filterDescriptors)\r\n active = this._filterDescriptors.isActive;\r\n return active;\r\n }\r\n\r\n /** Clears the filter descriptor.\r\n */\r\n /* istanbul ignore next */\r\n public clear(): void {\r\n if (this._filterDescriptors)\r\n this._filterDescriptors.clear();\r\n }\r\n\r\n /** Evaluates a row for filtering\r\n */\r\n public evaluateRow(row: RowItem): boolean {\r\n let passed: boolean = true;\r\n\r\n for (const fd of this.filterDescriptorCollection.descriptors) {\r\n /* istanbul ignore next */\r\n if (!fd.isActive)\r\n continue;\r\n\r\n passed = fd.evaluateRow(row);\r\n\r\n if (passed && FilterCompositionLogicalOperator.Or === this.logicalOperator)\r\n return true;\r\n else if (!passed && FilterCompositionLogicalOperator.And === this.logicalOperator)\r\n return false;\r\n }\r\n\r\n return passed;\r\n }\r\n\r\n /** Determines if this filter is for a particular column.\r\n */\r\n public isFilterForColumn(columnKey: string): boolean {\r\n for (const fd of this.filterDescriptorCollection.descriptors) {\r\n /* istanbul ignore next */\r\n if (!fd.isActive)\r\n continue;\r\n\r\n if (fd.isFilterForColumn(columnKey))\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Returns filter as ECExpression */\r\n public getFilterExpression(): string {\r\n let result: string = \"\";\r\n for (let i = 0; i < this.filterDescriptorCollection.descriptors.length; i++) {\r\n if (!this.filterDescriptorCollection.descriptors[i].isActive)\r\n continue;\r\n\r\n if (i > 0 && result !== \"\") {\r\n switch (this.logicalOperator) {\r\n case FilterCompositionLogicalOperator.And:\r\n result += (\" And \");\r\n break;\r\n case FilterCompositionLogicalOperator.Or:\r\n result += (\" Or \");\r\n break;\r\n }\r\n }\r\n result += (`(${this.filterDescriptorCollection.descriptors[i].getFilterExpression()})`);\r\n }\r\n return result;\r\n }\r\n}\r\n\r\n/** The default implementation of DistinctValuesFilterDescriptor.\r\n * @internal\r\n */\r\nclass DistinctValuesFilterDescriptorImpl implements DistinctValuesFilterDescriptor {\r\n private _column: FilterableColumn;\r\n private _compositeFilter: CompositeFilterDescriptorImpl;\r\n private _distinctValuesComparisonOperator: FilterOperator = FilterOperator.IsEqualTo;\r\n\r\n public constructor(column: FilterableColumn) {\r\n this._column = column;\r\n\r\n this._compositeFilter = new CompositeFilterDescriptorImpl();\r\n this._compositeFilter.logicalOperator = FilterCompositionLogicalOperator.Or;\r\n }\r\n\r\n /** Gets the distinct values from the collection as an Array.\r\n */\r\n public get distinctValues(): DistinctValueCollection {\r\n const distinctValues = new DistinctValueCollection();\r\n\r\n for (const fd of this.filterDescriptorCollection.descriptors) {\r\n distinctValues.values.push(fd.value);\r\n }\r\n\r\n return distinctValues;\r\n }\r\n\r\n /** Gets the collection of distinct values.\r\n */\r\n public get filterDescriptorCollection(): OperatorValueFilterDescriptorCollection {\r\n return this._compositeFilter.filterDescriptorCollection as OperatorValueFilterDescriptorCollection;\r\n }\r\n\r\n /** Determines if the filter descriptor is active.\r\n */\r\n public get isActive(): boolean {\r\n return this.filterDescriptorCollection.descriptors.some((fd: OperatorValueFilterDescriptor) => fd.isActive);\r\n }\r\n\r\n /** Tries to find a distinct value in the collection.\r\n */\r\n public tryFindDescriptor(distinctValue: any): OperatorValueFilterDescriptor | undefined {\r\n return this.filterDescriptorCollection.descriptors.find((fd: OperatorValueFilterDescriptor) => fd.value === distinctValue);\r\n }\r\n\r\n /** Adds a distinct value to the collection.\r\n */\r\n public addDistinctValue(distinctValue: any): void {\r\n const existing = this.tryFindDescriptor(distinctValue);\r\n\r\n if (existing) {\r\n return;\r\n }\r\n\r\n const newFilterDescriptor = this._column.createSimpleFilterDescriptor(distinctValue, this.distinctValuesComparisonOperator);\r\n newFilterDescriptor.isCaseSensitive = true;\r\n this.filterDescriptorCollection.add(newFilterDescriptor);\r\n }\r\n\r\n /** Removes a distinct value from the collection.\r\n */\r\n public removeDistinctValue(distinctValue: any): boolean {\r\n const existing = this.tryFindDescriptor(distinctValue);\r\n\r\n if (existing) {\r\n return this.filterDescriptorCollection.remove(existing);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Clears the filter descriptor.\r\n */\r\n public clear(): void {\r\n this.filterDescriptorCollection.clear();\r\n }\r\n\r\n /** Gets the distinct values comparison operator.\r\n */\r\n public get distinctValuesComparisonOperator(): FilterOperator { return this._distinctValuesComparisonOperator; }\r\n\r\n /** Sets the distinct values comparison operator.\r\n */\r\n public set distinctValuesComparisonOperator(value: FilterOperator) {\r\n // istanbul ignore else\r\n if (this._distinctValuesComparisonOperator !== value) {\r\n this._distinctValuesComparisonOperator = value;\r\n }\r\n }\r\n\r\n /** Evaluates a row for filtering\r\n */\r\n public evaluateRow(row: RowItem): boolean {\r\n return this._compositeFilter.evaluateRow(row);\r\n }\r\n\r\n /** Determines if this filter is for a particular column.\r\n */\r\n public isFilterForColumn(columnKey: string): boolean {\r\n return this._compositeFilter.isFilterForColumn(columnKey);\r\n }\r\n\r\n public getFilterExpression(): string {\r\n return this._compositeFilter.getFilterExpression();\r\n }\r\n}\r\n\r\n/** The default implementation of IFieldFilterDescriptor.\r\n * @internal\r\n */\r\nclass FieldFilterDescriptorImpl implements FieldFilterDescriptor {\r\n private _column: FilterableColumn;\r\n private _compositeFilter: CompositeFilterDescriptorImpl;\r\n\r\n public constructor(column: FilterableColumn) {\r\n this._column = column;\r\n\r\n this._compositeFilter = new CompositeFilterDescriptorImpl();\r\n this._compositeFilter.logicalOperator = FilterCompositionLogicalOperator.Or;\r\n }\r\n\r\n /** Gets the logical operator.\r\n */\r\n public get logicalOperator(): FilterCompositionLogicalOperator {\r\n return this._compositeFilter.logicalOperator;\r\n }\r\n\r\n /** Sets the logical operator.\r\n */\r\n public set logicalOperator(value: FilterCompositionLogicalOperator) {\r\n this._compositeFilter.logicalOperator = value;\r\n }\r\n\r\n /** Determines if the filter descriptor is active.\r\n */\r\n public get isActive(): boolean {\r\n return this.filterDescriptorCollection.descriptors.some((fd: OperatorValueFilterDescriptor) => fd.isActive);\r\n }\r\n\r\n /** Gets the collection of distinct values.\r\n */\r\n public get filterDescriptorCollection(): OperatorValueFilterDescriptorCollection {\r\n return this._compositeFilter.filterDescriptorCollection as OperatorValueFilterDescriptorCollection;\r\n }\r\n\r\n /** Tries to find a field value in the collection.\r\n */\r\n public tryFindDescriptor(fieldValue: any, operator: FilterOperator): OperatorValueFilterDescriptor | undefined {\r\n return this.filterDescriptorCollection.descriptors.find((fd: OperatorValueFilterDescriptor) => {\r\n return fd.value === fieldValue && fd.operator === operator;\r\n });\r\n }\r\n\r\n /** Adds a field value to the collection.\r\n */\r\n public addFieldValue(fieldValue: any, operator: FilterOperator, isCaseSensitive: boolean = false): void {\r\n const existing = this.tryFindDescriptor(fieldValue, operator);\r\n\r\n if (existing) {\r\n return;\r\n }\r\n\r\n const newFilterDescriptor = this._column.createSimpleFilterDescriptor(fieldValue, operator);\r\n newFilterDescriptor.isCaseSensitive = isCaseSensitive;\r\n this.filterDescriptorCollection.add(newFilterDescriptor);\r\n }\r\n\r\n /** Removes a distinct value from the collection.\r\n */\r\n public removeFieldValue(fieldValue: any, operator: FilterOperator): boolean {\r\n const existing = this.tryFindDescriptor(fieldValue, operator);\r\n\r\n if (existing) {\r\n return this.filterDescriptorCollection.remove(existing);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Clears the filter descriptor.\r\n */\r\n public clear(): void {\r\n this.logicalOperator = FilterCompositionLogicalOperator.And;\r\n\r\n this.filterDescriptorCollection.clear();\r\n }\r\n\r\n /** Evaluates a row for filtering\r\n */\r\n public evaluateRow(row: RowItem): boolean {\r\n let result = true;\r\n\r\n for (const fd of this.filterDescriptorCollection.descriptors) {\r\n /* istanbul ignore next */\r\n if (!fd.isActive)\r\n continue;\r\n\r\n result = fd.evaluateRow(row);\r\n if (result && this.logicalOperator === FilterCompositionLogicalOperator.Or)\r\n return true;\r\n else if (!result && this.logicalOperator === FilterCompositionLogicalOperator.And)\r\n return false;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /** Determines if this filter is for a particular column.\r\n */\r\n public isFilterForColumn(columnKey: string): boolean {\r\n return (this.isActive && this._column.filterMemberKey === columnKey);\r\n }\r\n\r\n public getFilterExpression(): string {\r\n return this._compositeFilter.getFilterExpression();\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFilterDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/TableFilterDescriptor.ts"],"names":[],"mappings":"AAIA;;GAEG;AASH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"TableFilterDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/TableFilterDescriptor.ts"],"names":[],"mappings":"AAIA;;GAEG;AASH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAKnG;;GAEG;AACH,qBAAa,qBAAsB,YAAW,6BAA6B;IACzE,OAAO,CAAC,gBAAgB,CAAkB;IAC1C,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,kBAAkB,CAAC,CAAS;IACpC,OAAO,CAAC,SAAS,CAA4C;IAC7D,OAA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C,OAAO,CAAC,mBAAmB;IAwD3B,qCAAqC;IAC9B,mBAAmB,IAAI,MAAM;IAwCpC,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,qBAAqB;CAoJ9B"}
|
|
@@ -15,6 +15,7 @@ const TypeConverterManager_1 = require("../../converters/TypeConverterManager");
|
|
|
15
15
|
const UiComponents_1 = require("../../UiComponents");
|
|
16
16
|
const ColumnFiltering_1 = require("./ColumnFiltering");
|
|
17
17
|
const ColumnFilteringUtilities_1 = require("./ColumnFilteringUtilities");
|
|
18
|
+
/* eslint-disable deprecation/deprecation */
|
|
18
19
|
/** Represents a filtering descriptor.
|
|
19
20
|
* @internal
|
|
20
21
|
*/
|