@itwin/components-react 3.5.0-dev.41 → 3.5.0-dev.45

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/components-react/table/SimpleTableDataProvider.d.ts +1 -0
  3. package/lib/cjs/components-react/table/SimpleTableDataProvider.d.ts.map +1 -1
  4. package/lib/cjs/components-react/table/SimpleTableDataProvider.js +2 -0
  5. package/lib/cjs/components-react/table/SimpleTableDataProvider.js.map +1 -1
  6. package/lib/cjs/components-react/table/TableDataProvider.d.ts +8 -0
  7. package/lib/cjs/components-react/table/TableDataProvider.d.ts.map +1 -1
  8. package/lib/cjs/components-react/table/TableDataProvider.js +3 -0
  9. package/lib/cjs/components-react/table/TableDataProvider.js.map +1 -1
  10. package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.d.ts +16 -0
  11. package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.d.ts.map +1 -1
  12. package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.js +7 -0
  13. package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.js.map +1 -1
  14. package/lib/cjs/components-react/table/columnfiltering/ColumnFilteringUtilities.d.ts.map +1 -1
  15. package/lib/cjs/components-react/table/columnfiltering/ColumnFilteringUtilities.js +1 -0
  16. package/lib/cjs/components-react/table/columnfiltering/ColumnFilteringUtilities.js.map +1 -1
  17. package/lib/cjs/components-react/table/columnfiltering/FilterableColumnBase.d.ts.map +1 -1
  18. package/lib/cjs/components-react/table/columnfiltering/FilterableColumnBase.js +1 -0
  19. package/lib/cjs/components-react/table/columnfiltering/FilterableColumnBase.js.map +1 -1
  20. package/lib/cjs/components-react/table/columnfiltering/TableColumnFilterDescriptor.d.ts.map +1 -1
  21. package/lib/cjs/components-react/table/columnfiltering/TableColumnFilterDescriptor.js +1 -0
  22. package/lib/cjs/components-react/table/columnfiltering/TableColumnFilterDescriptor.js.map +1 -1
  23. package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptor.d.ts.map +1 -1
  24. package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptor.js +1 -0
  25. package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptor.js.map +1 -1
  26. package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptorCollection.d.ts.map +1 -1
  27. package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptorCollection.js +1 -0
  28. package/lib/cjs/components-react/table/columnfiltering/TableFilterDescriptorCollection.js.map +1 -1
  29. package/lib/cjs/components-react/table/component/ColumnDragLayer.d.ts +1 -1
  30. package/lib/cjs/components-react/table/component/ColumnDragLayer.js +1 -1
  31. package/lib/cjs/components-react/table/component/ColumnDragLayer.js.map +1 -1
  32. package/lib/cjs/components-react/table/component/Table.d.ts +16 -8
  33. package/lib/cjs/components-react/table/component/Table.d.ts.map +1 -1
  34. package/lib/cjs/components-react/table/component/Table.js +4 -2
  35. package/lib/cjs/components-react/table/component/Table.js.map +1 -1
  36. package/lib/cjs/components-react/table/component/TableCell.d.ts +10 -4
  37. package/lib/cjs/components-react/table/component/TableCell.d.ts.map +1 -1
  38. package/lib/cjs/components-react/table/component/TableCell.js +5 -2
  39. package/lib/cjs/components-react/table/component/TableCell.js.map +1 -1
  40. package/lib/cjs/components-react/table/component/TableColumn.d.ts +2 -1
  41. package/lib/cjs/components-react/table/component/TableColumn.d.ts.map +1 -1
  42. package/lib/cjs/components-react/table/component/TableColumn.js.map +1 -1
  43. package/lib/esm/components-react/table/SimpleTableDataProvider.d.ts +1 -0
  44. package/lib/esm/components-react/table/SimpleTableDataProvider.d.ts.map +1 -1
  45. package/lib/esm/components-react/table/SimpleTableDataProvider.js +2 -0
  46. package/lib/esm/components-react/table/SimpleTableDataProvider.js.map +1 -1
  47. package/lib/esm/components-react/table/TableDataProvider.d.ts +8 -0
  48. package/lib/esm/components-react/table/TableDataProvider.d.ts.map +1 -1
  49. package/lib/esm/components-react/table/TableDataProvider.js +3 -0
  50. package/lib/esm/components-react/table/TableDataProvider.js.map +1 -1
  51. package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.d.ts +16 -0
  52. package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.d.ts.map +1 -1
  53. package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.js +7 -0
  54. package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.js.map +1 -1
  55. package/lib/esm/components-react/table/columnfiltering/ColumnFilteringUtilities.d.ts.map +1 -1
  56. package/lib/esm/components-react/table/columnfiltering/ColumnFilteringUtilities.js +1 -0
  57. package/lib/esm/components-react/table/columnfiltering/ColumnFilteringUtilities.js.map +1 -1
  58. package/lib/esm/components-react/table/columnfiltering/FilterableColumnBase.d.ts.map +1 -1
  59. package/lib/esm/components-react/table/columnfiltering/FilterableColumnBase.js +1 -0
  60. package/lib/esm/components-react/table/columnfiltering/FilterableColumnBase.js.map +1 -1
  61. package/lib/esm/components-react/table/columnfiltering/TableColumnFilterDescriptor.d.ts.map +1 -1
  62. package/lib/esm/components-react/table/columnfiltering/TableColumnFilterDescriptor.js +1 -0
  63. package/lib/esm/components-react/table/columnfiltering/TableColumnFilterDescriptor.js.map +1 -1
  64. package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptor.d.ts.map +1 -1
  65. package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptor.js +1 -0
  66. package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptor.js.map +1 -1
  67. package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptorCollection.d.ts.map +1 -1
  68. package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptorCollection.js +1 -0
  69. package/lib/esm/components-react/table/columnfiltering/TableFilterDescriptorCollection.js.map +1 -1
  70. package/lib/esm/components-react/table/component/ColumnDragLayer.d.ts +1 -1
  71. package/lib/esm/components-react/table/component/ColumnDragLayer.js +1 -1
  72. package/lib/esm/components-react/table/component/ColumnDragLayer.js.map +1 -1
  73. package/lib/esm/components-react/table/component/Table.d.ts +16 -8
  74. package/lib/esm/components-react/table/component/Table.d.ts.map +1 -1
  75. package/lib/esm/components-react/table/component/Table.js +4 -2
  76. package/lib/esm/components-react/table/component/Table.js.map +1 -1
  77. package/lib/esm/components-react/table/component/TableCell.d.ts +10 -4
  78. package/lib/esm/components-react/table/component/TableCell.d.ts.map +1 -1
  79. package/lib/esm/components-react/table/component/TableCell.js +5 -2
  80. package/lib/esm/components-react/table/component/TableCell.js.map +1 -1
  81. package/lib/esm/components-react/table/component/TableColumn.d.ts +2 -1
  82. package/lib/esm/components-react/table/component/TableColumn.d.ts.map +1 -1
  83. package/lib/esm/components-react/table/component/TableColumn.js.map +1 -1
  84. package/package.json +12 -12
@@ -9,7 +9,8 @@ import { PropertyDialogState, PropertyValueRendererManager } from "../../propert
9
9
  import { CellItem } from "../TableDataProvider";
10
10
  /**
11
11
  * Properties of the [[TableCell]] React component
12
- * @public @deprecated
12
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
13
+ * @public
13
14
  */
14
15
  export interface TableCellProps extends CommonProps {
15
16
  /** Additional class name for the cell container */
@@ -29,14 +30,16 @@ export interface TableCellProps extends CommonProps {
29
30
  }
30
31
  /**
31
32
  * A React component that renders a table cell
32
- * @public @deprecated
33
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
34
+ * @public
33
35
  */
34
36
  export declare class TableCell extends React.PureComponent<TableCellProps> {
35
37
  /** @internal */
36
38
  render(): JSX.Element;
37
39
  }
38
40
  /** Properties of the [[TableCellContent]] React component
39
- * @public @deprecated
41
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
42
+ * @public
40
43
  */
41
44
  export interface TableCellContentProps extends CommonProps {
42
45
  /** Indicates, whether container cell is selected or not */
@@ -58,7 +61,8 @@ interface TableCellContentState {
58
61
  content: React.ReactNode;
59
62
  }
60
63
  /** A React component that renders table cell content
61
- * @public @deprecated
64
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
65
+ * @public
62
66
  */
63
67
  export declare class TableCellContent extends React.PureComponent<TableCellContentProps, TableCellContentState> {
64
68
  /** @internal */
@@ -77,6 +81,7 @@ export declare class TableCellContent extends React.PureComponent<TableCellConte
77
81
  render(): React.ReactNode;
78
82
  }
79
83
  /** Properties for the [[TableIconCellContent]] React component
84
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
80
85
  * @public
81
86
  */
82
87
  export interface TableIconCellContentProps {
@@ -85,6 +90,7 @@ export interface TableIconCellContentProps {
85
90
  }
86
91
  /**
87
92
  * A React component that renders table cell content as a Bentley icon
93
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
88
94
  * @public
89
95
  */
90
96
  export declare class TableIconCellContent extends React.PureComponent<TableIconCellContentProps> {
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableCell.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAQ,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAmB,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAEtF,OAAO,EACkB,mBAAmB,EAAgC,4BAA4B,EACvG,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI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AAK,CAAC,aAAa,CAAC,cAAc,CAAC;IAChE,gBAAgB;IACA,MAAM;CA8BvB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,2DAA2D;IAC3D,UAAU,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,EAAE,QAAQ,CAAC;IACnB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACpD,sCAAsC;IACtC,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D;AAED;;GAEG;AACH,UAAU,qBAAqB;IAC7B,uBAAuB;IACvB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,aAAa,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IACrG,gBAAgB;IAChB,SAAyB,KAAK,EAAE,qBAAqB,CAEnD;IAEF,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,QAAQ;YAUF,aAAa;IAkB3B,OAAO,CAAC,aAAa;IAOrB,gBAAgB;IACM,iBAAiB;IASvC,gBAAgB;IACA,oBAAoB;IAIpC,gBAAgB;IACM,kBAAkB,CAAC,SAAS,EAAE,qBAAqB;IASzE,gBAAgB;IACA,MAAM;CAGvB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC;IACtF,gBAAgB;IACA,MAAM;CAGvB"}
@@ -40,7 +40,8 @@ const ItemStyle_1 = require("../../properties/ItemStyle");
40
40
  const ValueRendererManager_1 = require("../../properties/ValueRendererManager");
41
41
  /**
42
42
  * A React component that renders a table cell
43
- * @public @deprecated
43
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
44
+ * @public
44
45
  */
45
46
  class TableCell extends React.PureComponent {
46
47
  /** @internal */
@@ -54,7 +55,8 @@ class TableCell extends React.PureComponent {
54
55
  }
55
56
  exports.TableCell = TableCell;
56
57
  /** A React component that renders table cell content
57
- * @public @deprecated
58
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
59
+ * @public
58
60
  */
59
61
  class TableCellContent extends React.PureComponent {
60
62
  constructor() {
@@ -122,6 +124,7 @@ class TableCellContent extends React.PureComponent {
122
124
  exports.TableCellContent = TableCellContent;
123
125
  /**
124
126
  * A React component that renders table cell content as a Bentley icon
127
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
125
128
  * @public
126
129
  */
127
130
  class TableIconCellContent extends React.PureComponent {
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableCell.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4BAA0B;AAC1B,4DAAoC;AACpC,6CAA+B;AAC/B,kDAA4D;AAC5D,mEAAsF;AACtF,0DAA+D;AAC/D,gFAE+C;AAwB/C;;;GAGG;AACH,MAAa,SAAU,SAAQ,KAAK,CAAC,aAA6B;IAChE,gBAAgB;IACA,MAAM;QAEpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BACE,SAAS,EAAE,IAAA,oBAAU,EAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EACpE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBAEvB,oBAAC,iCAAe,IACd,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,KACnB,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAC/B,CACE,CACP,CAAC;SACH;QA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,CAAC,kBAAkB,CAAC,SAAgC;QACvE,IAAI,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;YAC7C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAErD,IAAI,IAAI,CAAC,UAAU;gBACjB,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;SAC9B;IACH,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;IAC5B,CAAC;CACF;AAxED,4CAwEC;AAUD;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,KAAK,CAAC,aAAwC;IACtF,gBAAgB;IACA,MAAM;QACpB,OAAO,oBAAC,iBAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAI,CAAC;IACjD,CAAC;CACF;AALD,oDAKC","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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport \"./TableCell.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps, Icon, Omit } from \"@itwin/core-react\";\r\nimport { EditorContainer, EditorContainerProps } from \"../../editors/EditorContainer\";\r\nimport { ItemStyleProvider } from \"../../properties/ItemStyle\";\r\nimport {\r\n PropertyContainerType, PropertyDialogState, PropertyValueRendererContext, PropertyValueRendererManager,\r\n} from \"../../properties/ValueRendererManager\";\r\nimport { CellItem } from \"../TableDataProvider\";\r\n\r\n/**\r\n * Properties of the [[TableCell]] React component\r\n * @public @deprecated\r\n */\r\nexport interface TableCellProps extends CommonProps {\r\n /** Additional class name for the cell container */\r\n className?: string;\r\n /** Title of the cell container */\r\n title: string;\r\n /** Cell content */\r\n children?: React.ReactNode;\r\n /** Click event callback */\r\n onClick?: (e: React.MouseEvent) => void;\r\n /** MouseMove event callback */\r\n onMouseMove?: (e: React.MouseEvent) => void;\r\n /** MouseDown event callback */\r\n onMouseDown?: (e: React.MouseEvent) => void;\r\n /** Properties for [[EditorContainer]]. Activates cell editing and provides properties to the container */\r\n cellEditingProps?: Omit<EditorContainerProps, \"title\">;\r\n}\r\n\r\n/**\r\n * A React component that renders a table cell\r\n * @public @deprecated\r\n */\r\nexport class TableCell extends React.PureComponent<TableCellProps> {\r\n /** @internal */\r\n public override render() {\r\n\r\n if (this.props.cellEditingProps) {\r\n return (\r\n <div\r\n className={classnames(\"components-table-cell\", this.props.className)}\r\n style={this.props.style}\r\n >\r\n <EditorContainer\r\n title={this.props.title}\r\n {...this.props.cellEditingProps}\r\n />\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <div\r\n className={classnames(\"components-table-cell\", this.props.className)}\r\n style={this.props.style}\r\n title={this.props.title}\r\n onClick={this.props.onClick}\r\n onMouseMove={this.props.onMouseMove}\r\n onMouseDown={this.props.onMouseDown}\r\n role=\"presentation\"\r\n >\r\n {this.props.children}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\n/** Properties of the [[TableCellContent]] React component\r\n * @public @deprecated\r\n */\r\nexport interface TableCellContentProps extends CommonProps {\r\n /** Indicates, whether container cell is selected or not */\r\n isSelected: boolean;\r\n /** Props for the item that will be rendered */\r\n cellItem: CellItem;\r\n /** Height of the component */\r\n height?: number;\r\n /** Callback to DialogOpen event */\r\n onDialogOpen?: (state: PropertyDialogState) => void;\r\n /** Property value renderer manager */\r\n propertyValueRendererManager: PropertyValueRendererManager;\r\n}\r\n\r\n/** State of the [[TableCellContent]] React component\r\n * @internal @deprecated\r\n */\r\ninterface TableCellContentState {\r\n /** Rendered content */\r\n content: React.ReactNode;\r\n}\r\n\r\n/** A React component that renders table cell content\r\n * @public @deprecated\r\n */\r\nexport class TableCellContent extends React.PureComponent<TableCellContentProps, TableCellContentState> {\r\n /** @internal */\r\n public override readonly state: TableCellContentState = {\r\n content: <div className={this.props.className} style={this.getStyle(this.props.cellItem, this.props.isSelected, this.props.height)} />,\r\n };\r\n\r\n private _isMounted = false;\r\n\r\n private getStyle(cellItem: CellItem, isSelected: boolean, height?: number): React.CSSProperties {\r\n return {\r\n ...ItemStyleProvider.createStyle(cellItem.style ? cellItem.style : {}, isSelected),\r\n textAlign: cellItem.alignment,\r\n height,\r\n lineHeight: `${height}px`, // Centers text vertically\r\n ...this.props.style,\r\n };\r\n }\r\n\r\n private async renderContent(props: TableCellContentProps) {\r\n const style = this.getStyle(props.cellItem, props.isSelected, props.height);\r\n\r\n if (!props.cellItem.record)\r\n return <div className={this.props.className} style={style} />;\r\n\r\n const rendererContext: PropertyValueRendererContext = {\r\n containerType: PropertyContainerType.Table,\r\n onDialogOpen: this.props.onDialogOpen,\r\n style,\r\n // TODO: Enable, when table gets refactored. Explanation in ./../table/NonPrimitiveValueRenderer\r\n // onPopupShow: this._onPopupShow,\r\n // onPopupHide: this._onPopupHide,\r\n };\r\n\r\n return this.props.propertyValueRendererManager.render(props.cellItem.record, rendererContext);\r\n }\r\n\r\n private doPropsDiffer(props1: TableCellContentProps, props2: TableCellContentProps) {\r\n return props1.cellItem !== props2.cellItem\r\n || props1.isSelected !== props2.isSelected\r\n || props1.onDialogOpen !== props2.onDialogOpen\r\n || props1.propertyValueRendererManager !== props2.propertyValueRendererManager;\r\n }\r\n\r\n /** @internal */\r\n public override async componentDidMount() {\r\n this._isMounted = true;\r\n const content = await this.renderContent(this.props);\r\n\r\n // istanbul ignore else\r\n if (this._isMounted)\r\n this.setState({ content });\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n /** @internal */\r\n public override async componentDidUpdate(prevProps: TableCellContentProps) {\r\n if (this.doPropsDiffer(prevProps, this.props)) {\r\n const content = await this.renderContent(this.props);\r\n\r\n if (this._isMounted)\r\n this.setState({ content });\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override render() {\r\n return this.state.content;\r\n }\r\n}\r\n\r\n/** Properties for the [[TableIconCellContent]] React component\r\n * @public\r\n */\r\nexport interface TableIconCellContentProps {\r\n /** Icon name */\r\n iconName: string;\r\n}\r\n\r\n/**\r\n * A React component that renders table cell content as a Bentley icon\r\n * @public\r\n */\r\nexport class TableIconCellContent extends React.PureComponent<TableIconCellContentProps> {\r\n /** @internal */\r\n public override render() {\r\n return <Icon iconSpec={this.props.iconName} />;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableCell.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4BAA0B;AAC1B,4DAAoC;AACpC,6CAA+B;AAC/B,kDAA4D;AAC5D,mEAAsF;AACtF,0DAA+D;AAC/D,gFAE+C;AAyB/C;;;;GAIG;AACH,MAAa,SAAU,SAAQ,KAAK,CAAC,aAA6B;IAChE,gBAAgB;IACA,MAAM;QAEpB,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;YAC/B,OAAO,CACL,6BACE,SAAS,EAAE,IAAA,oBAAU,EAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EACpE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBAEvB,oBAAC,iCAAe,IACd,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,KACnB,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAC/B,CACE,CACP,CAAC;SACH;QAED,OAAO,CACL,6BACE,SAAS,EAAE,IAAA,oBAAU,EAAC,uBAAuB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EACpE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,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C,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAErD,IAAI,IAAI,CAAC,UAAU;gBACjB,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;SAC9B;IACH,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;IAC5B,CAAC;CACF;AAxED,4CAwEC;AAWD;;;;GAIG;AACH,MAAa,oBAAqB,SAAQ,KAAK,CAAC,aAAwC;IACtF,gBAAgB;IACA,MAAM;QACpB,OAAO,oBAAC,iBAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAI,CAAC;IACjD,CAAC;CACF;AALD,oDAKC","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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport \"./TableCell.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps, Icon, Omit } from \"@itwin/core-react\";\r\nimport { EditorContainer, EditorContainerProps } from \"../../editors/EditorContainer\";\r\nimport { ItemStyleProvider } from \"../../properties/ItemStyle\";\r\nimport {\r\n PropertyContainerType, PropertyDialogState, PropertyValueRendererContext, PropertyValueRendererManager,\r\n} from \"../../properties/ValueRendererManager\";\r\nimport { CellItem } from \"../TableDataProvider\";\r\n\r\n/**\r\n * Properties of the [[TableCell]] React component\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 TableCellProps extends CommonProps {\r\n /** Additional class name for the cell container */\r\n className?: string;\r\n /** Title of the cell container */\r\n title: string;\r\n /** Cell content */\r\n children?: React.ReactNode;\r\n /** Click event callback */\r\n onClick?: (e: React.MouseEvent) => void;\r\n /** MouseMove event callback */\r\n onMouseMove?: (e: React.MouseEvent) => void;\r\n /** MouseDown event callback */\r\n onMouseDown?: (e: React.MouseEvent) => void;\r\n /** Properties for [[EditorContainer]]. Activates cell editing and provides properties to the container */\r\n cellEditingProps?: Omit<EditorContainerProps, \"title\">;\r\n}\r\n\r\n/**\r\n * A React component that renders a table cell\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 TableCell extends React.PureComponent<TableCellProps> {\r\n /** @internal */\r\n public override render() {\r\n\r\n if (this.props.cellEditingProps) {\r\n return (\r\n <div\r\n className={classnames(\"components-table-cell\", this.props.className)}\r\n style={this.props.style}\r\n >\r\n <EditorContainer\r\n title={this.props.title}\r\n {...this.props.cellEditingProps}\r\n />\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <div\r\n className={classnames(\"components-table-cell\", this.props.className)}\r\n style={this.props.style}\r\n title={this.props.title}\r\n onClick={this.props.onClick}\r\n onMouseMove={this.props.onMouseMove}\r\n onMouseDown={this.props.onMouseDown}\r\n role=\"presentation\"\r\n >\r\n {this.props.children}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\n/** Properties of the [[TableCellContent]] React component\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 TableCellContentProps extends CommonProps {\r\n /** Indicates, whether container cell is selected or not */\r\n isSelected: boolean;\r\n /** Props for the item that will be rendered */\r\n cellItem: CellItem;\r\n /** Height of the component */\r\n height?: number;\r\n /** Callback to DialogOpen event */\r\n onDialogOpen?: (state: PropertyDialogState) => void;\r\n /** Property value renderer manager */\r\n propertyValueRendererManager: PropertyValueRendererManager;\r\n}\r\n\r\n/** State of the [[TableCellContent]] React component\r\n * @internal @deprecated\r\n */\r\ninterface TableCellContentState {\r\n /** Rendered content */\r\n content: React.ReactNode;\r\n}\r\n\r\n/** A React component that renders table cell content\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 TableCellContent extends React.PureComponent<TableCellContentProps, TableCellContentState> {\r\n /** @internal */\r\n public override readonly state: TableCellContentState = {\r\n content: <div className={this.props.className} style={this.getStyle(this.props.cellItem, this.props.isSelected, this.props.height)} />,\r\n };\r\n\r\n private _isMounted = false;\r\n\r\n private getStyle(cellItem: CellItem, isSelected: boolean, height?: number): React.CSSProperties {\r\n return {\r\n ...ItemStyleProvider.createStyle(cellItem.style ? cellItem.style : {}, isSelected),\r\n textAlign: cellItem.alignment,\r\n height,\r\n lineHeight: `${height}px`, // Centers text vertically\r\n ...this.props.style,\r\n };\r\n }\r\n\r\n private async renderContent(props: TableCellContentProps) {\r\n const style = this.getStyle(props.cellItem, props.isSelected, props.height);\r\n\r\n if (!props.cellItem.record)\r\n return <div className={this.props.className} style={style} />;\r\n\r\n const rendererContext: PropertyValueRendererContext = {\r\n containerType: PropertyContainerType.Table,\r\n onDialogOpen: this.props.onDialogOpen,\r\n style,\r\n // TODO: Enable, when table gets refactored. Explanation in ./../table/NonPrimitiveValueRenderer\r\n // onPopupShow: this._onPopupShow,\r\n // onPopupHide: this._onPopupHide,\r\n };\r\n\r\n return this.props.propertyValueRendererManager.render(props.cellItem.record, rendererContext);\r\n }\r\n\r\n private doPropsDiffer(props1: TableCellContentProps, props2: TableCellContentProps) {\r\n return props1.cellItem !== props2.cellItem\r\n || props1.isSelected !== props2.isSelected\r\n || props1.onDialogOpen !== props2.onDialogOpen\r\n || props1.propertyValueRendererManager !== props2.propertyValueRendererManager;\r\n }\r\n\r\n /** @internal */\r\n public override async componentDidMount() {\r\n this._isMounted = true;\r\n const content = await this.renderContent(this.props);\r\n\r\n // istanbul ignore else\r\n if (this._isMounted)\r\n this.setState({ content });\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n /** @internal */\r\n public override async componentDidUpdate(prevProps: TableCellContentProps) {\r\n if (this.doPropsDiffer(prevProps, this.props)) {\r\n const content = await this.renderContent(this.props);\r\n\r\n if (this._isMounted)\r\n this.setState({ content });\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override render() {\r\n return this.state.content;\r\n }\r\n}\r\n\r\n/** Properties for the [[TableIconCellContent]] React component\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 TableIconCellContentProps {\r\n /** Icon name */\r\n iconName: string;\r\n}\r\n\r\n/**\r\n * A React component that renders table cell content as a Bentley icon\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 TableIconCellContent extends React.PureComponent<TableIconCellContentProps> {\r\n /** @internal */\r\n public override render() {\r\n return <Icon iconSpec={this.props.iconName} />;\r\n }\r\n}\r\n"]}
@@ -6,7 +6,8 @@ import { DistinctValueCollection, FilterableColumn, FilterableTable } from "../c
6
6
  import { FilterableColumnBase } from "../columnfiltering/FilterableColumnBase";
7
7
  import { ColumnDescription, TableDataProvider } from "../TableDataProvider";
8
8
  /** ReactDataGrid.Column with additional properties
9
- * @public @deprecated
9
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
10
+ * @public
10
11
  */
11
12
  export interface ReactDataGridColumn extends ReactDataGrid.Column<any> {
12
13
  /** Indicates whether the display value for the cell is treated as an icon spec. */
@@ -1 +1 @@
1
- {"version":3,"file":"TableColumn.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableColumn.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAChH,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI5E;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAA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MAAM,CAAiC;IAElD,YAAY,CAAC,EAAE,iBAAiB,CAAC;IAEjC,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAEzD;;OAEG;IACU,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAK7F"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableColumn.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableColumn.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;AAGH,wEAAgH;AAChH,kFAA+E;AAe/E;;GAEG;AACH,MAAa,WAAY,SAAQ,2CAAoB;IAEnD,YAAY,eAAgC,EAAE,iBAAoC,EAAkB,mBAAwC;QAC1I,KAAK,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;QADwD,wBAAmB,GAAnB,mBAAmB,CAAqB;IAE5I,CAAC;IAED,IAAW,GAAG,KAAa,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAMzD;;OAEG;IACI,KAAK,CAAC,iBAAiB,CAAC,iBAA0B;QACvD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,iBAAiB;YAC1D,OAAO,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;QAC1E,OAAO,IAAI,yCAAuB,EAAE,CAAC;IACvC,CAAC;CACF;AApBD,kCAoBC","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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport ReactDataGrid from \"react-data-grid\";\r\nimport { DistinctValueCollection, FilterableColumn, FilterableTable } from \"../columnfiltering/ColumnFiltering\";\r\nimport { FilterableColumnBase } from \"../columnfiltering/FilterableColumnBase\";\r\nimport { ColumnDescription, TableDataProvider } from \"../TableDataProvider\";\r\n\r\n// cSpell:ignore columnfiltering\r\n\r\n/** ReactDataGrid.Column with additional properties\r\n * @public @deprecated\r\n */\r\nexport interface ReactDataGridColumn extends ReactDataGrid.Column<any> {\r\n /** Indicates whether the display value for the cell is treated as an icon spec. */\r\n icon?: boolean;\r\n /* Table column filtering info */\r\n filterableColumn?: FilterableColumn;\r\n}\r\n\r\n/** Table Column used by the [[Table]] component\r\n * @internal\r\n */\r\nexport class TableColumn extends FilterableColumnBase {\r\n\r\n constructor(filterableTable: FilterableTable, columnDescription: ColumnDescription, public readonly reactDataGridColumn: ReactDataGridColumn) {\r\n super(filterableTable, columnDescription);\r\n }\r\n\r\n public get key(): string { return this.filterMemberKey; }\r\n\r\n public dataProvider?: TableDataProvider;\r\n\r\n public distinctValueCollection?: DistinctValueCollection;\r\n\r\n /** Gets the distinct values for a column.\r\n * @return The distinct values.\r\n */\r\n public async getDistinctValues(maximumValueCount?: number): Promise<DistinctValueCollection> {\r\n if (this.dataProvider && this.dataProvider.getDistinctValues)\r\n return this.dataProvider.getDistinctValues(this.key, maximumValueCount);\r\n return new DistinctValueCollection();\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"TableColumn.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/TableColumn.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;AAGH,wEAAgH;AAChH,kFAA+E;AAgB/E;;GAEG;AACH,MAAa,WAAY,SAAQ,2CAAoB;IAEnD,YAAY,eAAgC,EAAE,iBAAoC,EAAkB,mBAAwC;QAC1I,KAAK,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;QADwD,wBAAmB,GAAnB,mBAAmB,CAAqB;IAE5I,CAAC;IAED,IAAW,GAAG,KAAa,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAMzD;;OAEG;IACI,KAAK,CAAC,iBAAiB,CAAC,iBAA0B;QACvD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,iBAAiB;YAC1D,OAAO,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;QAC1E,OAAO,IAAI,yCAAuB,EAAE,CAAC;IACvC,CAAC;CACF;AApBD,kCAoBC","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/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport ReactDataGrid from \"react-data-grid\";\r\nimport { DistinctValueCollection, FilterableColumn, FilterableTable } from \"../columnfiltering/ColumnFiltering\";\r\nimport { FilterableColumnBase } from \"../columnfiltering/FilterableColumnBase\";\r\nimport { ColumnDescription, TableDataProvider } from \"../TableDataProvider\";\r\n\r\n// cSpell:ignore columnfiltering\r\n\r\n/** ReactDataGrid.Column with additional properties\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 ReactDataGridColumn extends ReactDataGrid.Column<any> {\r\n /** Indicates whether the display value for the cell is treated as an icon spec. */\r\n icon?: boolean;\r\n /* Table column filtering info */\r\n filterableColumn?: FilterableColumn;\r\n}\r\n\r\n/** Table Column used by the [[Table]] component\r\n * @internal\r\n */\r\nexport class TableColumn extends FilterableColumnBase {\r\n\r\n constructor(filterableTable: FilterableTable, columnDescription: ColumnDescription, public readonly reactDataGridColumn: ReactDataGridColumn) {\r\n super(filterableTable, columnDescription);\r\n }\r\n\r\n public get key(): string { return this.filterMemberKey; }\r\n\r\n public dataProvider?: TableDataProvider;\r\n\r\n public distinctValueCollection?: DistinctValueCollection;\r\n\r\n /** Gets the distinct values for a column.\r\n * @return The distinct values.\r\n */\r\n public async getDistinctValues(maximumValueCount?: number): Promise<DistinctValueCollection> {\r\n if (this.dataProvider && this.dataProvider.getDistinctValues)\r\n return this.dataProvider.getDistinctValues(this.key, maximumValueCount);\r\n return new DistinctValueCollection();\r\n }\r\n}\r\n"]}
@@ -6,6 +6,7 @@ import { CompositeFilterDescriptorCollection, DistinctValueCollection } from "./
6
6
  import { ColumnDescription, MutableTableDataProvider, RowItem, TableDataChangeEvent } from "./TableDataProvider";
7
7
  /**
8
8
  * A Table Data Provider using an array of items.
9
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
9
10
  * @public
10
11
  */
11
12
  export declare class SimpleTableDataProvider implements MutableTableDataProvider {
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleTableDataProvider.d.ts","sourceRoot":"","sources":["../../../../src/components-react/table/SimpleTableDataProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,mCAAmC,EAAE,uBAAuB,EAAsB,MAAM,mCAAmC,CAAC;AACrI,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIjH;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,wBAAwB;IACtE,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,eAAe,CAAW;IAClC,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,yBAAyB,CAAC,CAAW;IAC7C,OAAO,CAAC,cAAc,CAAuC;IAC7D,OAAO,CAAC,gBAAgB,CAAc;IACtC,OAAO,CAAC,kBAAkB,CAAC,CAAsC;IAEjE,kEAAkE;IAC3D,gBAAgB,uBAA8B;IACrD,+DAA+D;IACxD,aAAa,uBAA8B;gBAEtC,OAAO,EAAE,iBAAiB,EAAE;IAOxC,2CAA2C;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,E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AuD/G;;OAEG;IACU,sBAAsB,CAAC,iBAAiB,EAAE,mCAAmC,GAAG,OAAO,CAAC,IAAI,CAAC;IAe1G,4BAA4B;IACrB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM;IAIvC,yCAAyC;IAClC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAczD,oBAAoB;IACb,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,qBAAqB,GAAE,OAAc,GAAG,IAAI;IAY/E,qCAAqC;IAC9B,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAc1D,OAAO,CAAC,YAAY;CAOrB"}
@@ -11,9 +11,11 @@ import { TypeConverterManager } from "../converters/TypeConverterManager";
11
11
  import { UiComponents } from "../UiComponents";
12
12
  import { DistinctValueCollection } from "./columnfiltering/ColumnFiltering";
13
13
  import { TableDataChangeEvent } from "./TableDataProvider";
14
+ /* eslint-disable deprecation/deprecation */
14
15
  // cSpell:ignore columnfiltering
15
16
  /**
16
17
  * A Table Data Provider using an array of items.
18
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
17
19
  * @public
18
20
  */
19
21
  export class SimpleTableDataProvider {
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleTableDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/table/SimpleTableDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAA8B,mBAAmB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAuC,uBAAuB,EAAsB,MAAM,mCAAmC,CAAC;AACrI,OAAO,EAAwD,oBAA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a,CAAC,UAAU,EAAE,CAAC;SACnC;IACH,CAAC;IAED,qCAAqC;IAC9B,OAAO,CAAC,OAAgB,EAAE,QAAgB;QAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,QAAQ,IAAI,CAAC,EAAE;YACjB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAE/B,IAAI,QAAQ,GAAG,QAAQ;gBACrB,QAAQ,EAAE,CAAC,CAAK,8CAA8C;YAEhE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;SAC1C;QAED,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;IAEO,YAAY,CAAC,IAAa;QAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3C,IAAI,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACzB,OAAO,CAAC,CAAC;SACZ;QACD,OAAO,CAAC,CAAC,CAAC;IACZ,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 { Primitives, PropertyRecord, PropertyValueFormat, UiError } from \"@itwin/appui-abstract\";\r\nimport { SortDirection } from \"@itwin/core-react\";\r\nimport { TypeConverterManager } from \"../converters/TypeConverterManager\";\r\nimport { UiComponents } from \"../UiComponents\";\r\nimport { CompositeFilterDescriptorCollection, DistinctValueCollection, TableDistinctValue } from \"./columnfiltering/ColumnFiltering\";\r\nimport { ColumnDescription, MutableTableDataProvider, RowItem, TableDataChangeEvent } from \"./TableDataProvider\";\r\n\r\n// cSpell:ignore columnfiltering\r\n\r\n/**\r\n * A Table Data Provider using an array of items.\r\n * @public\r\n */\r\nexport class SimpleTableDataProvider implements MutableTableDataProvider {\r\n private _items: RowItem[];\r\n private _rowItemIndices: number[]; // Used for both filtering and sorting\r\n private _columns: ColumnDescription[];\r\n private _secondarySortColumnStack?: number[];\r\n private _sortDirection: SortDirection = SortDirection.NoSort;\r\n private _sortColumnIndex: number = -1;\r\n private _filterDescriptors?: CompositeFilterDescriptorCollection;\r\n\r\n /** Event emitted by the data provider when column data changes */\r\n public onColumnsChanged = new TableDataChangeEvent();\r\n /** Event emitted by the data provider when row data changes */\r\n public onRowsChanged = new TableDataChangeEvent();\r\n\r\n constructor(columns: ColumnDescription[]) {\r\n this._columns = columns;\r\n this._items = [];\r\n this._rowItemIndices = [];\r\n this._secondarySortColumnStack = [];\r\n }\r\n\r\n /** Sets the row items based on an array */\r\n public setItems(items: RowItem[]): void {\r\n this._items = items;\r\n this._rowItemIndices = [];\r\n this.resetRowIndices();\r\n this.onRowsChanged.raiseEvent();\r\n }\r\n\r\n private resetRowIndices(): void {\r\n this._rowItemIndices.splice(0);\r\n\r\n for (let rowIndex = 0; rowIndex < this._items.length; rowIndex++) {\r\n this._rowItemIndices.push(rowIndex);\r\n }\r\n }\r\n\r\n /** Retrieves the column descriptions */\r\n public async getColumns(): Promise<ColumnDescription[]> {\r\n return this._columns;\r\n }\r\n\r\n /** Retrieves the row count */\r\n public async getRowsCount(): Promise<number> {\r\n return this._rowItemIndices.length;\r\n }\r\n\r\n /** Retrieves a specific row by index */\r\n public async getRow(rowIndex: number, unfiltered?: boolean): Promise<RowItem> {\r\n let realRowIndex: number = -1;\r\n\r\n if (unfiltered) {\r\n // istanbul ignore else\r\n if (0 <= rowIndex && rowIndex < this._items.length)\r\n realRowIndex = rowIndex;\r\n } else {\r\n if (0 <= rowIndex && rowIndex < this._rowItemIndices.length)\r\n realRowIndex = this.getRowIndexFromFilteredRowIndex(rowIndex);\r\n }\r\n\r\n if (0 <= realRowIndex && realRowIndex < this._items.length)\r\n return this._items[realRowIndex];\r\n\r\n throw new UiError(UiComponents.loggerCategory(this), `getRow: Invalid row index - ${rowIndex}`);\r\n }\r\n\r\n private getRowIndexFromFilteredRowIndex(filteredRowIndex: number): number {\r\n // istanbul ignore next\r\n if (filteredRowIndex === undefined)\r\n return filteredRowIndex;\r\n\r\n // istanbul ignore next\r\n if (filteredRowIndex < 0 || filteredRowIndex >= this._rowItemIndices.length)\r\n return -1;\r\n\r\n return this._rowItemIndices[filteredRowIndex];\r\n }\r\n\r\n /** Sorts the rows based on the value in a specific column */\r\n public async sort(columnIndex: number, sortDirection: SortDirection): Promise<void> {\r\n // istanbul ignore next\r\n if (columnIndex < 0 || columnIndex >= this._columns.length)\r\n return;\r\n\r\n this._sortColumnIndex = columnIndex;\r\n this._sortDirection = sortDirection;\r\n\r\n if (sortDirection === SortDirection.NoSort) {\r\n if (this._filterDescriptors)\r\n await this.applyFilterDescriptors(this._filterDescriptors);\r\n else\r\n this.resetRowIndices();\r\n return;\r\n }\r\n\r\n this._secondarySortColumnStack = [];\r\n this._secondarySortColumnStack.push(columnIndex);\r\n\r\n // Sort by the column\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n const dataProvider = this;\r\n this._rowItemIndices.sort((a: number, b: number) => {\r\n return dataProvider.sortDispatcher(dataProvider._items[a], dataProvider._items[b], columnIndex, sortDirection);\r\n });\r\n\r\n delete this._secondarySortColumnStack;\r\n\r\n return;\r\n }\r\n\r\n private sortDispatcher(a: RowItem, b: RowItem, columnIndex: number, sortDirection: SortDirection): number {\r\n let result = this.sortRows(a, b, columnIndex, sortDirection);\r\n\r\n if (result !== 0)\r\n return result;\r\n\r\n // Secondary sort column support\r\n // istanbul ignore else\r\n const column = this._columns[columnIndex];\r\n if (this._secondarySortColumnStack !== undefined &&\r\n column.secondarySortColumn !== undefined &&\r\n column.secondarySortColumn !== columnIndex &&\r\n this._secondarySortColumnStack.indexOf(column.secondarySortColumn) < 0) {\r\n\r\n this._secondarySortColumnStack.push(column.secondarySortColumn);\r\n result = this.sortDispatcher(a, b, column.secondarySortColumn, sortDirection);\r\n this._secondarySortColumnStack.pop();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private getPrimitiveValue(record: PropertyRecord) {\r\n let primitiveValue: Primitives.Value | undefined;\r\n const recordValue = record.value;\r\n // istanbul ignore else\r\n if (recordValue.valueFormat === PropertyValueFormat.Primitive)\r\n primitiveValue = recordValue.value;\r\n return primitiveValue;\r\n }\r\n\r\n private sortRows(a: RowItem, b: RowItem, columnIndex: number, sortDirection: SortDirection): number {\r\n const aCell = a.cells[columnIndex];\r\n const bCell = b.cells[columnIndex];\r\n\r\n let result: number = 0;\r\n const column = this._columns[columnIndex];\r\n\r\n const propertyDescription = column.propertyDescription;\r\n const valueA = this.getPrimitiveValue(aCell.record as PropertyRecord);\r\n const valueB = this.getPrimitiveValue(bCell.record as PropertyRecord);\r\n // istanbul ignore else\r\n if (valueA !== undefined && valueB !== undefined && propertyDescription)\r\n result = TypeConverterManager.getConverter(propertyDescription.typename, propertyDescription.converter?.name).sortCompare(valueA, valueB, column.sortIgnoreCase);\r\n\r\n if (sortDirection === SortDirection.Descending)\r\n result *= -1;\r\n\r\n return result;\r\n }\r\n\r\n /** Gets distinct values in a column\r\n * @public\r\n */\r\n public async getDistinctValues(columnKey: string, maximumValueCount?: number): Promise<DistinctValueCollection> {\r\n const distinctValues = new DistinctValueCollection();\r\n const columnIndex = this._columns.findIndex((description: ColumnDescription) => description.key === columnKey);\r\n if (columnIndex < 0 || columnIndex >= this._columns.length)\r\n return distinctValues;\r\n\r\n const columnDescription = this._columns[columnIndex];\r\n const propertyDescription = columnDescription.propertyDescription;\r\n const uniqueKeysMap: { [key: string]: TableDistinctValue } = {};\r\n const uniqueValues: any[] = [];\r\n\r\n // istanbul ignore next\r\n if (!propertyDescription)\r\n return distinctValues;\r\n\r\n for (const row of this._items) {\r\n const cell = row.cells[columnIndex];\r\n const record = cell.record;\r\n\r\n // istanbul ignore next\r\n if (record === undefined)\r\n continue;\r\n\r\n const value = this.getPrimitiveValue(record);\r\n const displayValue = await TypeConverterManager\r\n .getConverter(propertyDescription.typename, propertyDescription.converter?.name)\r\n .convertPropertyToString(propertyDescription, value);\r\n\r\n // istanbul ignore next\r\n if (value === undefined || typeof displayValue !== \"string\")\r\n continue;\r\n\r\n const valueKey = value.toString();\r\n if (!uniqueKeysMap.hasOwnProperty(valueKey)) {\r\n const propertyValue: TableDistinctValue = { value, label: displayValue };\r\n\r\n uniqueKeysMap[valueKey] = propertyValue;\r\n uniqueValues.push(propertyValue);\r\n }\r\n }\r\n\r\n distinctValues.values = uniqueValues;\r\n\r\n distinctValues.values.sort((a: TableDistinctValue, b: TableDistinctValue) => {\r\n if (a.value && b.value)\r\n return TypeConverterManager.getConverter(propertyDescription.typename, propertyDescription.converter?.name).sortCompare(a.value, b.value);\r\n return 0;\r\n });\r\n\r\n if (maximumValueCount !== undefined && distinctValues.values.length > maximumValueCount)\r\n distinctValues.values.splice(maximumValueCount);\r\n\r\n return distinctValues;\r\n }\r\n\r\n /** Apply a filter descriptor collection\r\n * @public\r\n */\r\n public async applyFilterDescriptors(filterDescriptors: CompositeFilterDescriptorCollection): Promise<void> {\r\n this._filterDescriptors = filterDescriptors;\r\n\r\n this._rowItemIndices.splice(0);\r\n\r\n this._items.forEach((row: RowItem, i: number) => {\r\n if (filterDescriptors.evaluateRow(row))\r\n this._rowItemIndices.push(i);\r\n });\r\n\r\n if (this._sortDirection !== SortDirection.NoSort) {\r\n await this.sort(this._sortColumnIndex, this._sortDirection);\r\n }\r\n }\r\n\r\n /** Adds a row to the end */\r\n public addRow(rowItem: RowItem): number {\r\n return this.insertRow(rowItem, -1);\r\n }\r\n\r\n /** Inserts a row at a given row index */\r\n public insertRow(rowItem: RowItem, index: number): number {\r\n let newIdx = index;\r\n\r\n if (index < 0 || index >= this._items.length)\r\n newIdx = this._items.push(rowItem) - 1;\r\n else\r\n this._items.splice(newIdx, 0, rowItem);\r\n\r\n this.resetRowIndices();\r\n this.onRowsChanged.raiseEvent();\r\n\r\n return newIdx;\r\n }\r\n\r\n /** Deletes a row */\r\n public deleteRow(rowItem: RowItem, raiseRowsChangedEvent: boolean = true): void {\r\n const rowIndex = this.findRowIndex(rowItem);\r\n if (rowIndex >= 0) {\r\n this._items.splice(rowIndex, 1);\r\n\r\n this.resetRowIndices();\r\n\r\n if (raiseRowsChangedEvent)\r\n this.onRowsChanged.raiseEvent();\r\n }\r\n }\r\n\r\n /** Moves a row to a new row index */\r\n public moveRow(rowItem: RowItem, newIndex: number): number {\r\n const oldIndex = this.findRowIndex(rowItem);\r\n if (oldIndex >= 0) {\r\n this.deleteRow(rowItem, false);\r\n\r\n if (newIndex > oldIndex)\r\n newIndex--; // removing the row will shrink the count by 1\r\n\r\n return this.insertRow(rowItem, newIndex);\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n private findRowIndex(item: RowItem): number {\r\n for (let i = 0; i < this._items.length; i++) {\r\n if (item === this._items[i])\r\n return i;\r\n }\r\n return -1;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"SimpleTableDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/table/SimpleTableDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAA8B,mBAAmB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAuC,uBAAuB,EAAsB,MAAM,mCAAmC,CAAC;AACrI,OAAO,EAAwD,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEjH,4CAA4C;AAC5C,gCAAgC;AAEhC;;;;GAIG;AACH,MAAM,OAAO,uBAAuB;IAclC,YAAY,OAA4B;QAThC,mBAAc,GAA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IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,QAAQ,IAAI,CAAC,EAAE;YACjB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAE/B,IAAI,QAAQ,GAAG,QAAQ;gBACrB,QAAQ,EAAE,CAAC,CAAK,8CAA8C;YAEhE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;SAC1C;QAED,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;IAEO,YAAY,CAAC,IAAa;QAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3C,IAAI,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBACzB,OAAO,CAAC,CAAC;SACZ;QACD,OAAO,CAAC,CAAC,CAAC;IACZ,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 { Primitives, PropertyRecord, PropertyValueFormat, UiError } from \"@itwin/appui-abstract\";\r\nimport { SortDirection } from \"@itwin/core-react\";\r\nimport { TypeConverterManager } from \"../converters/TypeConverterManager\";\r\nimport { UiComponents } from \"../UiComponents\";\r\nimport { CompositeFilterDescriptorCollection, DistinctValueCollection, TableDistinctValue } from \"./columnfiltering/ColumnFiltering\";\r\nimport { ColumnDescription, MutableTableDataProvider, RowItem, TableDataChangeEvent } from \"./TableDataProvider\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n// cSpell:ignore columnfiltering\r\n\r\n/**\r\n * A Table Data Provider using an array of items.\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 SimpleTableDataProvider implements MutableTableDataProvider {\r\n private _items: RowItem[];\r\n private _rowItemIndices: number[]; // Used for both filtering and sorting\r\n private _columns: ColumnDescription[];\r\n private _secondarySortColumnStack?: number[];\r\n private _sortDirection: SortDirection = SortDirection.NoSort;\r\n private _sortColumnIndex: number = -1;\r\n private _filterDescriptors?: CompositeFilterDescriptorCollection;\r\n\r\n /** Event emitted by the data provider when column data changes */\r\n public onColumnsChanged = new TableDataChangeEvent();\r\n /** Event emitted by the data provider when row data changes */\r\n public onRowsChanged = new TableDataChangeEvent();\r\n\r\n constructor(columns: ColumnDescription[]) {\r\n this._columns = columns;\r\n this._items = [];\r\n this._rowItemIndices = [];\r\n this._secondarySortColumnStack = [];\r\n }\r\n\r\n /** Sets the row items based on an array */\r\n public setItems(items: RowItem[]): void {\r\n this._items = items;\r\n this._rowItemIndices = [];\r\n this.resetRowIndices();\r\n this.onRowsChanged.raiseEvent();\r\n }\r\n\r\n private resetRowIndices(): void {\r\n this._rowItemIndices.splice(0);\r\n\r\n for (let rowIndex = 0; rowIndex < this._items.length; rowIndex++) {\r\n this._rowItemIndices.push(rowIndex);\r\n }\r\n }\r\n\r\n /** Retrieves the column descriptions */\r\n public async getColumns(): Promise<ColumnDescription[]> {\r\n return this._columns;\r\n }\r\n\r\n /** Retrieves the row count */\r\n public async getRowsCount(): Promise<number> {\r\n return this._rowItemIndices.length;\r\n }\r\n\r\n /** Retrieves a specific row by index */\r\n public async getRow(rowIndex: number, unfiltered?: boolean): Promise<RowItem> {\r\n let realRowIndex: number = -1;\r\n\r\n if (unfiltered) {\r\n // istanbul ignore else\r\n if (0 <= rowIndex && rowIndex < this._items.length)\r\n realRowIndex = rowIndex;\r\n } else {\r\n if (0 <= rowIndex && rowIndex < this._rowItemIndices.length)\r\n realRowIndex = this.getRowIndexFromFilteredRowIndex(rowIndex);\r\n }\r\n\r\n if (0 <= realRowIndex && realRowIndex < this._items.length)\r\n return this._items[realRowIndex];\r\n\r\n throw new UiError(UiComponents.loggerCategory(this), `getRow: Invalid row index - ${rowIndex}`);\r\n }\r\n\r\n private getRowIndexFromFilteredRowIndex(filteredRowIndex: number): number {\r\n // istanbul ignore next\r\n if (filteredRowIndex === undefined)\r\n return filteredRowIndex;\r\n\r\n // istanbul ignore next\r\n if (filteredRowIndex < 0 || filteredRowIndex >= this._rowItemIndices.length)\r\n return -1;\r\n\r\n return this._rowItemIndices[filteredRowIndex];\r\n }\r\n\r\n /** Sorts the rows based on the value in a specific column */\r\n public async sort(columnIndex: number, sortDirection: SortDirection): Promise<void> {\r\n // istanbul ignore next\r\n if (columnIndex < 0 || columnIndex >= this._columns.length)\r\n return;\r\n\r\n this._sortColumnIndex = columnIndex;\r\n this._sortDirection = sortDirection;\r\n\r\n if (sortDirection === SortDirection.NoSort) {\r\n if (this._filterDescriptors)\r\n await this.applyFilterDescriptors(this._filterDescriptors);\r\n else\r\n this.resetRowIndices();\r\n return;\r\n }\r\n\r\n this._secondarySortColumnStack = [];\r\n this._secondarySortColumnStack.push(columnIndex);\r\n\r\n // Sort by the column\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n const dataProvider = this;\r\n this._rowItemIndices.sort((a: number, b: number) => {\r\n return dataProvider.sortDispatcher(dataProvider._items[a], dataProvider._items[b], columnIndex, sortDirection);\r\n });\r\n\r\n delete this._secondarySortColumnStack;\r\n\r\n return;\r\n }\r\n\r\n private sortDispatcher(a: RowItem, b: RowItem, columnIndex: number, sortDirection: SortDirection): number {\r\n let result = this.sortRows(a, b, columnIndex, sortDirection);\r\n\r\n if (result !== 0)\r\n return result;\r\n\r\n // Secondary sort column support\r\n // istanbul ignore else\r\n const column = this._columns[columnIndex];\r\n if (this._secondarySortColumnStack !== undefined &&\r\n column.secondarySortColumn !== undefined &&\r\n column.secondarySortColumn !== columnIndex &&\r\n this._secondarySortColumnStack.indexOf(column.secondarySortColumn) < 0) {\r\n\r\n this._secondarySortColumnStack.push(column.secondarySortColumn);\r\n result = this.sortDispatcher(a, b, column.secondarySortColumn, sortDirection);\r\n this._secondarySortColumnStack.pop();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private getPrimitiveValue(record: PropertyRecord) {\r\n let primitiveValue: Primitives.Value | undefined;\r\n const recordValue = record.value;\r\n // istanbul ignore else\r\n if (recordValue.valueFormat === PropertyValueFormat.Primitive)\r\n primitiveValue = recordValue.value;\r\n return primitiveValue;\r\n }\r\n\r\n private sortRows(a: RowItem, b: RowItem, columnIndex: number, sortDirection: SortDirection): number {\r\n const aCell = a.cells[columnIndex];\r\n const bCell = b.cells[columnIndex];\r\n\r\n let result: number = 0;\r\n const column = this._columns[columnIndex];\r\n\r\n const propertyDescription = column.propertyDescription;\r\n const valueA = this.getPrimitiveValue(aCell.record as PropertyRecord);\r\n const valueB = this.getPrimitiveValue(bCell.record as PropertyRecord);\r\n // istanbul ignore else\r\n if (valueA !== undefined && valueB !== undefined && propertyDescription)\r\n result = TypeConverterManager.getConverter(propertyDescription.typename, propertyDescription.converter?.name).sortCompare(valueA, valueB, column.sortIgnoreCase);\r\n\r\n if (sortDirection === SortDirection.Descending)\r\n result *= -1;\r\n\r\n return result;\r\n }\r\n\r\n /** Gets distinct values in a column\r\n * @public\r\n */\r\n public async getDistinctValues(columnKey: string, maximumValueCount?: number): Promise<DistinctValueCollection> {\r\n const distinctValues = new DistinctValueCollection();\r\n const columnIndex = this._columns.findIndex((description: ColumnDescription) => description.key === columnKey);\r\n if (columnIndex < 0 || columnIndex >= this._columns.length)\r\n return distinctValues;\r\n\r\n const columnDescription = this._columns[columnIndex];\r\n const propertyDescription = columnDescription.propertyDescription;\r\n const uniqueKeysMap: { [key: string]: TableDistinctValue } = {};\r\n const uniqueValues: any[] = [];\r\n\r\n // istanbul ignore next\r\n if (!propertyDescription)\r\n return distinctValues;\r\n\r\n for (const row of this._items) {\r\n const cell = row.cells[columnIndex];\r\n const record = cell.record;\r\n\r\n // istanbul ignore next\r\n if (record === undefined)\r\n continue;\r\n\r\n const value = this.getPrimitiveValue(record);\r\n const displayValue = await TypeConverterManager\r\n .getConverter(propertyDescription.typename, propertyDescription.converter?.name)\r\n .convertPropertyToString(propertyDescription, value);\r\n\r\n // istanbul ignore next\r\n if (value === undefined || typeof displayValue !== \"string\")\r\n continue;\r\n\r\n const valueKey = value.toString();\r\n if (!uniqueKeysMap.hasOwnProperty(valueKey)) {\r\n const propertyValue: TableDistinctValue = { value, label: displayValue };\r\n\r\n uniqueKeysMap[valueKey] = propertyValue;\r\n uniqueValues.push(propertyValue);\r\n }\r\n }\r\n\r\n distinctValues.values = uniqueValues;\r\n\r\n distinctValues.values.sort((a: TableDistinctValue, b: TableDistinctValue) => {\r\n if (a.value && b.value)\r\n return TypeConverterManager.getConverter(propertyDescription.typename, propertyDescription.converter?.name).sortCompare(a.value, b.value);\r\n return 0;\r\n });\r\n\r\n if (maximumValueCount !== undefined && distinctValues.values.length > maximumValueCount)\r\n distinctValues.values.splice(maximumValueCount);\r\n\r\n return distinctValues;\r\n }\r\n\r\n /** Apply a filter descriptor collection\r\n * @public\r\n */\r\n public async applyFilterDescriptors(filterDescriptors: CompositeFilterDescriptorCollection): Promise<void> {\r\n this._filterDescriptors = filterDescriptors;\r\n\r\n this._rowItemIndices.splice(0);\r\n\r\n this._items.forEach((row: RowItem, i: number) => {\r\n if (filterDescriptors.evaluateRow(row))\r\n this._rowItemIndices.push(i);\r\n });\r\n\r\n if (this._sortDirection !== SortDirection.NoSort) {\r\n await this.sort(this._sortColumnIndex, this._sortDirection);\r\n }\r\n }\r\n\r\n /** Adds a row to the end */\r\n public addRow(rowItem: RowItem): number {\r\n return this.insertRow(rowItem, -1);\r\n }\r\n\r\n /** Inserts a row at a given row index */\r\n public insertRow(rowItem: RowItem, index: number): number {\r\n let newIdx = index;\r\n\r\n if (index < 0 || index >= this._items.length)\r\n newIdx = this._items.push(rowItem) - 1;\r\n else\r\n this._items.splice(newIdx, 0, rowItem);\r\n\r\n this.resetRowIndices();\r\n this.onRowsChanged.raiseEvent();\r\n\r\n return newIdx;\r\n }\r\n\r\n /** Deletes a row */\r\n public deleteRow(rowItem: RowItem, raiseRowsChangedEvent: boolean = true): void {\r\n const rowIndex = this.findRowIndex(rowItem);\r\n if (rowIndex >= 0) {\r\n this._items.splice(rowIndex, 1);\r\n\r\n this.resetRowIndices();\r\n\r\n if (raiseRowsChangedEvent)\r\n this.onRowsChanged.raiseEvent();\r\n }\r\n }\r\n\r\n /** Moves a row to a new row index */\r\n public moveRow(rowItem: RowItem, newIndex: number): number {\r\n const oldIndex = this.findRowIndex(rowItem);\r\n if (oldIndex >= 0) {\r\n this.deleteRow(rowItem, false);\r\n\r\n if (newIndex > oldIndex)\r\n newIndex--; // removing the row will shrink the count by 1\r\n\r\n return this.insertRow(rowItem, newIndex);\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n private findRowIndex(item: RowItem): number {\r\n for (let i = 0; i < this._items.length; i++) {\r\n if (item === this._items[i])\r\n return i;\r\n }\r\n return -1;\r\n }\r\n}\r\n"]}
@@ -7,6 +7,7 @@ import { HorizontalAlignment, SortDirection } from "@itwin/core-react";
7
7
  import { ItemColorOverrides, ItemStyle } from "../properties/ItemStyle";
8
8
  import { CompositeFilterDescriptorCollection, DistinctValueCollection } from "./columnfiltering/ColumnFiltering";
9
9
  /** Filter Renderer for a Table column
10
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
10
11
  * @public
11
12
  */
12
13
  export declare enum FilterRenderer {
@@ -18,6 +19,7 @@ export declare enum FilterRenderer {
18
19
  }
19
20
  /**
20
21
  * Column definition provided to Table.
22
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
21
23
  * @public
22
24
  */
23
25
  export interface ColumnDescription {
@@ -56,6 +58,7 @@ export interface ColumnDescription {
56
58
  }
57
59
  /**
58
60
  * Cell definition provided to Table.
61
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
59
62
  * @public
60
63
  */
61
64
  export interface CellItem {
@@ -78,6 +81,7 @@ export interface CellItem {
78
81
  }
79
82
  /**
80
83
  * Row definition provided to Table.
84
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
81
85
  * @public
82
86
  */
83
87
  export interface RowItem {
@@ -103,10 +107,12 @@ export interface RowItem {
103
107
  getValueFromCell?: (columnKey: string) => any;
104
108
  }
105
109
  /** An interface table data change listeners
110
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this type.
106
111
  * @public
107
112
  */
108
113
  export declare type TableDataChangesListener = () => void;
109
114
  /** An event broadcasted on table data changes
115
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
110
116
  * @public
111
117
  */
112
118
  export declare class TableDataChangeEvent extends BeEvent<TableDataChangesListener> {
@@ -114,6 +120,7 @@ export declare class TableDataChangeEvent extends BeEvent<TableDataChangesListen
114
120
  /**
115
121
  * TableDataProvider provides data to the Table.
116
122
  * It also provides support for data Sorting & Filtering.
123
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
117
124
  * @public
118
125
  */
119
126
  export interface TableDataProvider {
@@ -143,6 +150,7 @@ export interface TableDataProvider {
143
150
  /**
144
151
  * MutableTableDataProvider provides mutation methods for data in the Table.
145
152
  * Useful for Drag & Drop processing.
153
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
146
154
  * @public
147
155
  */
148
156
  export interface MutableTableDataProvider extends TableDataProvider {
@@ -1 +1 @@
1
- {"version":3,"file":"TableDataProvider.d.ts","sourceRoot":"","sources":["../../../../src/components-react/table/TableDataProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,yBAAyB,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AAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAIvE;OACG;IACH,sBAAsB,CAAC,EAAE,CAAC,iBAAiB,EAAE,mCAAmC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnG;OACG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAExG;;OAEG;IACH,iCAAiC,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;CAClE;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,4BAA4B;IAC5B,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,yCAAyC;IACzC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACnD,oBAAoB;IACpB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,qCAAqC;IACrC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CACrD"}
1
+ {"version":3,"file":"TableDataProvider.d.ts","sourceRoot":"","sources":["../../../../src/components-react/table/TableDataProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,mCAAmC,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAKjH;;;GAGG;AACH,oBAAY,cAAc;IACxB,OAAO,IAAI;IACX,WAAW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AAI,CAAC,CAAC;IAEnG;OACG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAExG;;OAEG;IACH,iCAAiC,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;CAClE;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,4BAA4B;IAC5B,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,yCAAyC;IACzC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACnD,oBAAoB;IACpB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,qCAAqC;IACrC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CACrD"}
@@ -6,8 +6,10 @@
6
6
  * @module Table
7
7
  */
8
8
  import { BeEvent } from "@itwin/core-bentley";
9
+ /* eslint-disable deprecation/deprecation */
9
10
  // cSpell:ignore columnfiltering
10
11
  /** Filter Renderer for a Table column
12
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this interface.
11
13
  * @public
12
14
  */
13
15
  export var FilterRenderer;
@@ -19,6 +21,7 @@ export var FilterRenderer;
19
21
  FilterRenderer[FilterRenderer["MultiValue"] = 5] = "MultiValue";
20
22
  })(FilterRenderer || (FilterRenderer = {}));
21
23
  /** An event broadcasted on table data changes
24
+ * @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
22
25
  * @public
23
26
  */
24
27
  export class TableDataChangeEvent extends 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,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAM9C,gCAAgC;AAEhC;;GAEG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,yDAAW,CAAA;IACX,iEAAW,CAAA;IACX,mEAAY,CAAA;IACZ,mDAAI,CAAA;IACJ,+DAAU,CAAA;AACZ,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AA0GD;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,OAAiC;CAAI","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// cSpell:ignore columnfiltering\r\n\r\n/** Filter Renderer for a Table column\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 * @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 * @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 * @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 * @public\r\n */\r\nexport declare type TableDataChangesListener = () => void;\r\n\r\n/** An event broadcasted on table data changes\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 * @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 * @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"]}
1
+ {"version":3,"file":"TableDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/table/TableDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAM9C,4CAA4C;AAC5C,gCAAgC;AAEhC;;;GAGG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,yDAAW,CAAA;IACX,iEAAW,CAAA;IACX,mEAAY,CAAA;IACZ,mDAAI,CAAA;IACJ,+DAAU,CAAA;AACZ,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AA8GD;;;GAGG;AACH,MAAM,OAAO,oBAAqB,SAAQ,OAAiC;CAAI","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;AAE/C;;GAEG;AACH,oBAAY,cAAc;IAExB,SAAS,IAAA;IACT,YAAY,IAAA;IAGZ,UAAU,IAAA;IACV,mBAAmB,IAAA;IACnB,aAAa,IAAA;IACb,sBAAsB,IAAA;IACtB,KAAK,IAAA;IAGL,UAAU,IAAA;IACV,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,cAAc,KAAA;IACd,aAAa,KAAA;IACb,gBAAgB,KAAA;IAChB,OAAO,KAAA;IACP,UAAU,KAAA;IAGV,MAAM,KAAA;IACN,SAAS,KAAA;CACV;AAED;;GAEG;AACH,oBAAY,gCAAgC;IAC1C,GAAG,IAAA;IACH,EAAE,IAAA;CACH;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,iBAAiB,EAAE,mCAAmC,CAAC;IAEvD,uDAAuD;IACvD,iCAAiC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7D;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,eAAe,EAAE,eAAe,CAAC;IAEjC,kCAAkC;IAClC,sBAAsB,EAAE,sBAAsB,CAAC;IAE/C,6BAA6B;IAC7B,eAAe,EAAE,MAA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