@itwin/components-react 3.0.0-dev.72 → 3.0.0-dev.78
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/lib/components-react/UiComponents.d.ts +10 -10
- package/lib/components-react/UiComponents.d.ts.map +1 -1
- package/lib/components-react/UiComponents.js +18 -18
- package/lib/components-react/UiComponents.js.map +1 -1
- package/lib/components-react/common/HighlightedText.d.ts +2 -2
- package/lib/components-react/common/HighlightedText.js +1 -1
- package/lib/components-react/common/HighlightedText.js.map +1 -1
- package/lib/components-react/common/HighlightingComponentProps.d.ts +2 -2
- package/lib/components-react/common/HighlightingComponentProps.js.map +1 -1
- package/lib/components-react/common/UseAsyncValue.d.ts +1 -1
- package/lib/components-react/common/UseAsyncValue.js +1 -1
- package/lib/components-react/common/UseAsyncValue.js.map +1 -1
- package/lib/components-react/datepicker/DatePicker.js +28 -28
- package/lib/components-react/datepicker/DatePicker.js.map +1 -1
- package/lib/components-react/editors/BooleanEditor.d.ts +2 -2
- package/lib/components-react/editors/BooleanEditor.js +2 -2
- package/lib/components-react/editors/BooleanEditor.js.map +1 -1
- package/lib/components-react/editors/EnumButtonGroupEditor.d.ts +2 -2
- package/lib/components-react/editors/EnumButtonGroupEditor.js +2 -2
- package/lib/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/components-react/editors/EnumEditor.d.ts +2 -2
- package/lib/components-react/editors/EnumEditor.js +2 -2
- package/lib/components-react/editors/EnumEditor.js.map +1 -1
- package/lib/components-react/editors/ImageCheckBoxEditor.d.ts +2 -2
- package/lib/components-react/editors/ImageCheckBoxEditor.js +2 -2
- package/lib/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
- package/lib/components-react/editors/NumericInputEditor.d.ts +2 -2
- package/lib/components-react/editors/NumericInputEditor.js +2 -2
- package/lib/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/components-react/editors/PropertyEditorManager.d.ts +7 -7
- package/lib/components-react/editors/PropertyEditorManager.js +4 -4
- package/lib/components-react/editors/PropertyEditorManager.js.map +1 -1
- package/lib/components-react/editors/SliderEditor.d.ts +2 -2
- package/lib/components-react/editors/SliderEditor.js +2 -2
- package/lib/components-react/editors/SliderEditor.js.map +1 -1
- package/lib/components-react/editors/TextEditor.d.ts +1 -1
- package/lib/components-react/editors/TextEditor.js +1 -1
- package/lib/components-react/editors/TextEditor.js.map +1 -1
- package/lib/components-react/editors/TextareaEditor.d.ts +2 -2
- package/lib/components-react/editors/TextareaEditor.js +2 -2
- package/lib/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/components-react/editors/ThemedEnumEditor.d.ts +3 -3
- package/lib/components-react/editors/ThemedEnumEditor.d.ts.map +1 -1
- package/lib/components-react/editors/ThemedEnumEditor.js +3 -2
- package/lib/components-react/editors/ThemedEnumEditor.js.map +1 -1
- package/lib/components-react/editors/ToggleEditor.d.ts +2 -2
- package/lib/components-react/editors/ToggleEditor.js +2 -2
- package/lib/components-react/editors/ToggleEditor.js.map +1 -1
- package/lib/components-react/favorite/FavoritePropertiesRenderer.d.ts +1 -1
- package/lib/components-react/favorite/FavoritePropertiesRenderer.js +1 -1
- package/lib/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
- package/lib/components-react/filtering/FilteringInput.d.ts +1 -2
- package/lib/components-react/filtering/FilteringInput.d.ts.map +1 -1
- package/lib/components-react/filtering/FilteringInput.js +1 -1
- package/lib/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/components-react/inputs/ParsedInput.d.ts +2 -2
- package/lib/components-react/inputs/ParsedInput.js +1 -1
- package/lib/components-react/inputs/ParsedInput.js.map +1 -1
- package/lib/components-react/properties/renderers/ActionButtonList.d.ts +2 -2
- package/lib/components-react/properties/renderers/ActionButtonList.js +1 -1
- package/lib/components-react/properties/renderers/ActionButtonList.js.map +1 -1
- package/lib/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts +0 -1
- package/lib/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts.map +1 -1
- package/lib/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
- package/lib/components-react/properties/renderers/PropertyRenderer.d.ts +5 -10
- package/lib/components-react/properties/renderers/PropertyRenderer.d.ts.map +1 -1
- package/lib/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
- package/lib/components-react/properties/renderers/label/PropertyLabelRenderer.d.ts +1 -3
- package/lib/components-react/properties/renderers/label/PropertyLabelRenderer.d.ts.map +1 -1
- package/lib/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
- package/lib/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.d.ts +1 -1
- package/lib/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +1 -1
- package/lib/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
- package/lib/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +1 -1
- package/lib/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/components-react/propertygrid/PropertyDataProvider.d.ts +1 -3
- package/lib/components-react/propertygrid/PropertyDataProvider.d.ts.map +1 -1
- package/lib/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/components-react/propertygrid/component/PropertyCategoryBlock.d.ts +1 -3
- package/lib/components-react/propertygrid/component/PropertyCategoryBlock.d.ts.map +1 -1
- package/lib/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- package/lib/components-react/propertygrid/component/PropertyGridCommons.d.ts +0 -2
- package/lib/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
- package/lib/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts +13 -4
- package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.js +9 -2
- package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.d.ts +2 -2
- package/lib/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js +2 -2
- package/lib/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.d.ts +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.d.ts +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.js +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.js.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.d.ts +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.js +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.js.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.d.ts +17 -14
- package/lib/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.d.ts.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js +10 -8
- package/lib/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js.map +1 -1
- package/lib/components-react/propertygrid/internal/PropertyGridHooks.d.ts +4 -4
- package/lib/components-react/propertygrid/internal/PropertyGridHooks.js +5 -5
- package/lib/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/components-react/selectable-content/SelectableContent.d.ts +5 -5
- package/lib/components-react/selectable-content/SelectableContent.d.ts.map +1 -1
- package/lib/components-react/selectable-content/SelectableContent.js +3 -2
- package/lib/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/components-react/table/SimpleTableDataProvider.d.ts +2 -2
- package/lib/components-react/table/SimpleTableDataProvider.js +2 -2
- package/lib/components-react/table/SimpleTableDataProvider.js.map +1 -1
- package/lib/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.d.ts.map +1 -1
- package/lib/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.js +1 -0
- package/lib/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.js.map +1 -1
- package/lib/components-react/table/component/Table.d.ts +4 -7
- package/lib/components-react/table/component/Table.d.ts.map +1 -1
- package/lib/components-react/table/component/Table.js.map +1 -1
- package/lib/components-react/toolbar/Item.d.ts +2 -2
- package/lib/components-react/toolbar/Item.js +1 -1
- package/lib/components-react/toolbar/Item.js.map +1 -1
- package/lib/components-react/toolbar/PopupItem.d.ts +2 -2
- package/lib/components-react/toolbar/PopupItem.js +1 -1
- package/lib/components-react/toolbar/PopupItem.js.map +1 -1
- package/lib/components-react/toolbar/PopupItemWithDrag.d.ts +2 -2
- package/lib/components-react/toolbar/PopupItemWithDrag.js +1 -1
- package/lib/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
- package/lib/components-react/toolbar/Toolbar.d.ts +2 -2
- package/lib/components-react/toolbar/Toolbar.js +1 -1
- package/lib/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/components-react/toolbar/ToolbarWithOverflow.d.ts +6 -6
- package/lib/components-react/toolbar/ToolbarWithOverflow.js +3 -3
- package/lib/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/components-react/toolbar/utilities/Direction.d.ts +1 -1
- package/lib/components-react/toolbar/utilities/Direction.js +1 -1
- package/lib/components-react/toolbar/utilities/Direction.js.map +1 -1
- package/lib/components-react/tree/HighlightingEngine.d.ts +1 -1
- package/lib/components-react/tree/HighlightingEngine.js +1 -1
- package/lib/components-react/tree/HighlightingEngine.js.map +1 -1
- package/lib/components-react/tree/TreeDataProvider.d.ts +1 -1
- package/lib/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/components-react/tree/controlled/TreeHooks.d.ts +3 -4
- package/lib/components-react/tree/controlled/TreeHooks.d.ts.map +1 -1
- package/lib/components-react/tree/controlled/TreeHooks.js +3 -4
- package/lib/components-react/tree/controlled/TreeHooks.js.map +1 -1
- package/lib/components-react/tree/controlled/component/ControlledTree.d.ts +1 -1
- package/lib/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/components-react/tree/controlled/component/TreeNodeEditor.d.ts +9 -6
- package/lib/components-react/tree/controlled/component/TreeNodeEditor.d.ts.map +1 -1
- package/lib/components-react/tree/controlled/component/TreeNodeEditor.js +3 -2
- package/lib/components-react/tree/controlled/component/TreeNodeEditor.js.map +1 -1
- package/lib/components-react/tree/controlled/component/TreeNodeRenderer.d.ts +12 -16
- package/lib/components-react/tree/controlled/component/TreeNodeRenderer.d.ts.map +1 -1
- package/lib/components-react/tree/controlled/component/TreeNodeRenderer.js +1 -1
- package/lib/components-react/tree/controlled/component/TreeNodeRenderer.js.map +1 -1
- package/lib/components-react/tree/controlled/component/TreeRenderer.d.ts +5 -54
- package/lib/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
- package/lib/components-react/tree/controlled/component/TreeRenderer.js +13 -28
- package/lib/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/public/locales/en/UiComponents.json +1 -8
- package/package.json +16 -15
|
@@ -6,7 +6,7 @@ import * as React from "react";
|
|
|
6
6
|
/**
|
|
7
7
|
* A definition for content displayed in [[ControlledSelectableContent]] and
|
|
8
8
|
* [[SelectableContent]] components.
|
|
9
|
-
* @
|
|
9
|
+
* @public
|
|
10
10
|
*/
|
|
11
11
|
export interface SelectableContentDefinition {
|
|
12
12
|
id: string;
|
|
@@ -15,7 +15,7 @@ export interface SelectableContentDefinition {
|
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* [[ControlledSelectableContent]] component properties
|
|
18
|
-
* @
|
|
18
|
+
* @public
|
|
19
19
|
*/
|
|
20
20
|
export interface ControlledSelectableContentProps {
|
|
21
21
|
selectedContentId: string;
|
|
@@ -27,12 +27,12 @@ export interface ControlledSelectableContentProps {
|
|
|
27
27
|
* A fully-controlled component that accepts a list of child components with ids and labels and
|
|
28
28
|
* renders a select box at the top, allowing to choose which of the provided child components
|
|
29
29
|
* should be rendered at the bottom.
|
|
30
|
-
* @
|
|
30
|
+
* @public
|
|
31
31
|
*/
|
|
32
32
|
export declare function ControlledSelectableContent(props: ControlledSelectableContentProps): JSX.Element;
|
|
33
33
|
/**
|
|
34
34
|
* [[SelectableContent]] component properties
|
|
35
|
-
* @
|
|
35
|
+
* @public
|
|
36
36
|
*/
|
|
37
37
|
export interface SelectableContentProps {
|
|
38
38
|
defaultSelectedContentId: string;
|
|
@@ -43,7 +43,7 @@ export interface SelectableContentProps {
|
|
|
43
43
|
* An uncontrolled component that accepts a list of child components with ids and labels and
|
|
44
44
|
* renders a select box at the top, allowing to choose which of the provided child components
|
|
45
45
|
* should be rendered at the bottom.
|
|
46
|
-
* @
|
|
46
|
+
* @public
|
|
47
47
|
*/
|
|
48
48
|
export declare function SelectableContent(props: SelectableContentProps): JSX.Element;
|
|
49
49
|
//# sourceMappingURL=SelectableContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectableContent.d.ts","sourceRoot":"","sources":["../../../src/components-react/selectable-content/SelectableContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectableContent.d.ts","sourceRoot":"","sources":["../../../src/components-react/selectable-content/SelectableContent.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAC/C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,QAAQ,EAAE,2BAA2B,EAAE,CAAC;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gCAAgC,eAwBlF;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,wBAAwB,EAAE,MAAM,CAAC;IACjC,QAAQ,EAAE,2BAA2B,EAAE,CAAC;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAU9D"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/* eslint-disable deprecation/deprecation */
|
|
6
7
|
/** @packageDocumentation
|
|
7
8
|
* @module SelectableContent
|
|
8
9
|
*/
|
|
@@ -34,7 +35,7 @@ const core_react_1 = require("@itwin/core-react");
|
|
|
34
35
|
* A fully-controlled component that accepts a list of child components with ids and labels and
|
|
35
36
|
* renders a select box at the top, allowing to choose which of the provided child components
|
|
36
37
|
* should be rendered at the bottom.
|
|
37
|
-
* @
|
|
38
|
+
* @public
|
|
38
39
|
*/
|
|
39
40
|
function ControlledSelectableContent(props) {
|
|
40
41
|
var _a;
|
|
@@ -56,7 +57,7 @@ exports.ControlledSelectableContent = ControlledSelectableContent;
|
|
|
56
57
|
* An uncontrolled component that accepts a list of child components with ids and labels and
|
|
57
58
|
* renders a select box at the top, allowing to choose which of the provided child components
|
|
58
59
|
* should be rendered at the bottom.
|
|
59
|
-
* @
|
|
60
|
+
* @public
|
|
60
61
|
*/
|
|
61
62
|
function SelectableContent(props) {
|
|
62
63
|
const [selectedContentId, setSelectedContentId] = React.useState(props.defaultSelectedContentId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectableContent.js","sourceRoot":"","sources":["../../../src/components-react/selectable-content/SelectableContent.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,oCAAkC;AAClC,6CAA+B;AAE/B,kDAA6D;AAwB7D;;;;;GAKG;AACH,SAAgB,2BAA2B,CAAC,KAAuC;;IACjF,MAAM,EAAE,0BAA0B,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,mBAAmB,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAA4B,EAAE,MAA8B,EAAE,EAAE;QAC7G,0BAA0B,IAAI,MAAM,CAAC,MAAM,KAAK,eAAe,IAAI,KAAK,IAAI,0BAA0B,CAAE,KAAoB,CAAC,KAAK,CAAC,CAAC;IACtI,CAAC,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC;IACjC,MAAM,eAAe,GAAG,MAAA,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,KAAK,CAAC,iBAAiB,CAAC,mCAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5H,OAAO,CACL,6BAAK,SAAS,EAAC,+BAA+B;QAC5C,6BAAK,SAAS,EAAC,sCAAsC;YACnD,oBAAC,yBAAY,IAAC,eAAe,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAC5G,SAAS,EAAC,wCAAwC,gBACtC,KAAK,CAAC,eAAe,EACjC,KAAK,EAAE,EAAE,KAAK,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,KAAK,EAAE,KAAK,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,EAAE,EAAE,EACpE,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;oBAC7C,KAAK,EAAE,YAAY,CAAC,KAAK;oBACzB,KAAK,EAAE,YAAY,CAAC,EAAE;iBACvB,CAAC,CAAC,GACH,CACE;QACN,6BAAK,SAAS,EAAC,uCAAuC,IACnD,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,EAAE,CACtB,CACF,CACP,CAAC;AACJ,CAAC;AAxBD,kEAwBC;AAYD;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACjG,MAAM,0BAA0B,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,EAAU,EAAE,EAAE;QAClE,oBAAoB,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CACL,oBAAC,2BAA2B,IAAC,iBAAiB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,eAAe,EAAE,KAAK,CAAC,eAAe,IAC9J,KAAK,CAAC,QAAQ,CACa,CAC/B,CAAC;AACJ,CAAC;AAVD,8CAUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module SelectableContent\n */\n\nimport \"./SelectableContent.scss\";\nimport * as React from \"react\";\nimport { ActionMeta, ValueType } from \"react-select/src/types\";\nimport { OptionType, ThemedSelect } from \"@itwin/core-react\";\n\n/**\n * A definition for content displayed in [[ControlledSelectableContent]] and\n * [[SelectableContent]] components.\n * @
|
|
1
|
+
{"version":3,"file":"SelectableContent.js","sourceRoot":"","sources":["../../../src/components-react/selectable-content/SelectableContent.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,oCAAkC;AAClC,6CAA+B;AAE/B,kDAA6D;AAwB7D;;;;;GAKG;AACH,SAAgB,2BAA2B,CAAC,KAAuC;;IACjF,MAAM,EAAE,0BAA0B,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,mBAAmB,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,KAA4B,EAAE,MAA8B,EAAE,EAAE;QAC7G,0BAA0B,IAAI,MAAM,CAAC,MAAM,KAAK,eAAe,IAAI,KAAK,IAAI,0BAA0B,CAAE,KAAoB,CAAC,KAAK,CAAC,CAAC;IACtI,CAAC,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC;IACjC,MAAM,eAAe,GAAG,MAAA,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,KAAK,CAAC,iBAAiB,CAAC,mCAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5H,OAAO,CACL,6BAAK,SAAS,EAAC,+BAA+B;QAC5C,6BAAK,SAAS,EAAC,sCAAsC;YACnD,oBAAC,yBAAY,IAAC,eAAe,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAC5G,SAAS,EAAC,wCAAwC,gBACtC,KAAK,CAAC,eAAe,EACjC,KAAK,EAAE,EAAE,KAAK,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,KAAK,EAAE,KAAK,EAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,EAAE,EAAE,EACpE,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;oBAC7C,KAAK,EAAE,YAAY,CAAC,KAAK;oBACzB,KAAK,EAAE,YAAY,CAAC,EAAE;iBACvB,CAAC,CAAC,GACH,CACE;QACN,6BAAK,SAAS,EAAC,uCAAuC,IACnD,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,EAAE,CACtB,CACF,CACP,CAAC;AACJ,CAAC;AAxBD,kEAwBC;AAYD;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACjG,MAAM,0BAA0B,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,EAAU,EAAE,EAAE;QAClE,oBAAoB,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CACL,oBAAC,2BAA2B,IAAC,iBAAiB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,eAAe,EAAE,KAAK,CAAC,eAAe,IAC9J,KAAK,CAAC,QAAQ,CACa,CAC/B,CAAC;AACJ,CAAC;AAVD,8CAUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/* eslint-disable deprecation/deprecation */\n/** @packageDocumentation\n * @module SelectableContent\n */\n\nimport \"./SelectableContent.scss\";\nimport * as React from \"react\";\nimport { ActionMeta, ValueType } from \"react-select/src/types\";\nimport { OptionType, ThemedSelect } from \"@itwin/core-react\";\n\n/**\n * A definition for content displayed in [[ControlledSelectableContent]] and\n * [[SelectableContent]] components.\n * @public\n */\nexport interface SelectableContentDefinition {\n id: string;\n label: string;\n render: () => React.ReactNode;\n}\n\n/**\n * [[ControlledSelectableContent]] component properties\n * @public\n */\nexport interface ControlledSelectableContentProps {\n selectedContentId: string;\n onSelectedContentIdChanged?: (contentId: string) => void;\n children: SelectableContentDefinition[];\n selectAriaLabel?: string;\n}\n\n/**\n * A fully-controlled component that accepts a list of child components with ids and labels and\n * renders a select box at the top, allowing to choose which of the provided child components\n * should be rendered at the bottom.\n * @public\n */\nexport function ControlledSelectableContent(props: ControlledSelectableContentProps) {\n const { onSelectedContentIdChanged } = props;\n const onContentIdSelected = React.useCallback((value: ValueType<OptionType>, action: ActionMeta<OptionType>) => {\n onSelectedContentIdChanged && action.action === \"select-option\" && value && onSelectedContentIdChanged((value as OptionType).value);\n }, [onSelectedContentIdChanged]);\n const selectedContent = props.children.find((contentDef) => contentDef.id === props.selectedContentId) ?? props.children[0];\n return (\n <div className=\"components-selectable-content\">\n <div className=\"components-selectable-content-header\">\n <ThemedSelect openMenuOnClick={true} openMenuOnFocus={true} isSearchable={false} onChange={onContentIdSelected}\n className=\"components-selectable-content-selector\"\n aria-label={props.selectAriaLabel}\n value={{ label: selectedContent?.label, value: selectedContent?.id }}\n options={props.children.map((componentDef) => ({\n label: componentDef.label,\n value: componentDef.id,\n }))}\n />\n </div>\n <div className=\"components-selectable-content-wrapper\">\n {selectedContent?.render()}\n </div>\n </div>\n );\n}\n\n/**\n * [[SelectableContent]] component properties\n * @public\n */\nexport interface SelectableContentProps {\n defaultSelectedContentId: string;\n children: SelectableContentDefinition[];\n selectAriaLabel?: string;\n}\n\n/**\n * An uncontrolled component that accepts a list of child components with ids and labels and\n * renders a select box at the top, allowing to choose which of the provided child components\n * should be rendered at the bottom.\n * @public\n */\nexport function SelectableContent(props: SelectableContentProps) {\n const [selectedContentId, setSelectedContentId] = React.useState(props.defaultSelectedContentId);\n const onSelectedContentIdChanged = React.useCallback((id: string) => {\n setSelectedContentId(id);\n }, []);\n return (\n <ControlledSelectableContent selectedContentId={selectedContentId} onSelectedContentIdChanged={onSelectedContentIdChanged} selectAriaLabel={props.selectAriaLabel}>\n {props.children}\n </ControlledSelectableContent>\n );\n}\n"]}
|
|
@@ -37,11 +37,11 @@ export declare class SimpleTableDataProvider implements MutableTableDataProvider
|
|
|
37
37
|
private getPrimitiveValue;
|
|
38
38
|
private sortRows;
|
|
39
39
|
/** Gets distinct values in a column
|
|
40
|
-
* @
|
|
40
|
+
* @public
|
|
41
41
|
*/
|
|
42
42
|
getDistinctValues(columnKey: string, maximumValueCount?: number): Promise<DistinctValueCollection>;
|
|
43
43
|
/** Apply a filter descriptor collection
|
|
44
|
-
* @
|
|
44
|
+
* @public
|
|
45
45
|
*/
|
|
46
46
|
applyFilterDescriptors(filterDescriptors: CompositeFilterDescriptorCollection): Promise<void>;
|
|
47
47
|
/** Adds a row to the end */
|
|
@@ -145,7 +145,7 @@ class SimpleTableDataProvider {
|
|
|
145
145
|
return result;
|
|
146
146
|
}
|
|
147
147
|
/** Gets distinct values in a column
|
|
148
|
-
* @
|
|
148
|
+
* @public
|
|
149
149
|
*/
|
|
150
150
|
async getDistinctValues(columnKey, maximumValueCount) {
|
|
151
151
|
var _a;
|
|
@@ -192,7 +192,7 @@ class SimpleTableDataProvider {
|
|
|
192
192
|
return distinctValues;
|
|
193
193
|
}
|
|
194
194
|
/** Apply a filter descriptor collection
|
|
195
|
-
* @
|
|
195
|
+
* @public
|
|
196
196
|
*/
|
|
197
197
|
async applyFilterDescriptors(filterDescriptors) {
|
|
198
198
|
this._filterDescriptors = filterDescriptors;
|
|
@@ -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,0DAAiG;AACjG,kDAAkD;AAClD,6EAA0E;AAC1E,kDAA+C;AAC/C,uEAAqI;AACrI,2DAAiH;AAEjH,gCAAgC;AAEhC;;;GAGG;AACH,MAAa,uBAAuB;IAclC,YAAY,OAA4B;QAThC,mBAAc,GAAkB,0BAAa,CAAC,MAAM,CAA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AAC,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;AApSD,0DAoSC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Table\n */\n\nimport { Primitives, PropertyRecord, PropertyValueFormat, UiError } from \"@itwin/appui-abstract\";\nimport { SortDirection } from \"@itwin/core-react\";\nimport { TypeConverterManager } from \"../converters/TypeConverterManager\";\nimport { UiComponents } from \"../UiComponents\";\nimport { CompositeFilterDescriptorCollection, DistinctValueCollection, TableDistinctValue } from \"./columnfiltering/ColumnFiltering\";\nimport { ColumnDescription, MutableTableDataProvider, RowItem, TableDataChangeEvent } from \"./TableDataProvider\";\n\n// cSpell:ignore columnfiltering\n\n/**\n * A Table Data Provider using an array of items.\n * @public\n */\nexport class SimpleTableDataProvider implements MutableTableDataProvider {\n private _items: RowItem[];\n private _rowItemIndices: number[]; // Used for both filtering and sorting\n private _columns: ColumnDescription[];\n private _secondarySortColumnStack?: number[];\n private _sortDirection: SortDirection = SortDirection.NoSort;\n private _sortColumnIndex: number = -1;\n private _filterDescriptors?: CompositeFilterDescriptorCollection;\n\n /** Event emitted by the data provider when column data changes */\n public onColumnsChanged = new TableDataChangeEvent();\n /** Event emitted by the data provider when row data changes */\n public onRowsChanged = new TableDataChangeEvent();\n\n constructor(columns: ColumnDescription[]) {\n this._columns = columns;\n this._items = [];\n this._rowItemIndices = [];\n this._secondarySortColumnStack = [];\n }\n\n /** Sets the row items based on an array */\n public setItems(items: RowItem[]): void {\n this._items = items;\n this._rowItemIndices = [];\n this.resetRowIndices();\n this.onRowsChanged.raiseEvent();\n }\n\n private resetRowIndices(): void {\n this._rowItemIndices.splice(0);\n\n for (let rowIndex = 0; rowIndex < this._items.length; rowIndex++) {\n this._rowItemIndices.push(rowIndex);\n }\n }\n\n /** Retrieves the column descriptions */\n public async getColumns(): Promise<ColumnDescription[]> {\n return this._columns;\n }\n\n /** Retrieves the row count */\n public async getRowsCount(): Promise<number> {\n return this._rowItemIndices.length;\n }\n\n /** Retrieves a specific row by index */\n public async getRow(rowIndex: number, unfiltered?: boolean): Promise<RowItem> {\n let realRowIndex: number = -1;\n\n if (unfiltered) {\n // istanbul ignore else\n if (0 <= rowIndex && rowIndex < this._items.length)\n realRowIndex = rowIndex;\n } else {\n if (0 <= rowIndex && rowIndex < this._rowItemIndices.length)\n realRowIndex = this.getRowIndexFromFilteredRowIndex(rowIndex);\n }\n\n if (0 <= realRowIndex && realRowIndex < this._items.length)\n return this._items[realRowIndex];\n\n throw new UiError(UiComponents.loggerCategory(this), `getRow: Invalid row index - ${rowIndex}`);\n }\n\n private getRowIndexFromFilteredRowIndex(filteredRowIndex: number): number {\n // istanbul ignore next\n if (filteredRowIndex === undefined)\n return filteredRowIndex;\n\n // istanbul ignore next\n if (filteredRowIndex < 0 || filteredRowIndex >= this._rowItemIndices.length)\n return -1;\n\n return this._rowItemIndices[filteredRowIndex];\n }\n\n /** Sorts the rows based on the value in a specific column */\n public async sort(columnIndex: number, sortDirection: SortDirection): Promise<void> {\n // istanbul ignore next\n if (columnIndex < 0 || columnIndex >= this._columns.length)\n return;\n\n this._sortColumnIndex = columnIndex;\n this._sortDirection = sortDirection;\n\n if (sortDirection === SortDirection.NoSort) {\n if (this._filterDescriptors)\n await this.applyFilterDescriptors(this._filterDescriptors);\n else\n this.resetRowIndices();\n return;\n }\n\n this._secondarySortColumnStack = [];\n this._secondarySortColumnStack.push(columnIndex);\n\n // Sort by the column\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const dataProvider = this;\n this._rowItemIndices.sort((a: number, b: number) => {\n return dataProvider.sortDispatcher(dataProvider._items[a], dataProvider._items[b], columnIndex, sortDirection);\n });\n\n delete this._secondarySortColumnStack;\n\n return;\n }\n\n private sortDispatcher(a: RowItem, b: RowItem, columnIndex: number, sortDirection: SortDirection): number {\n let result = this.sortRows(a, b, columnIndex, sortDirection);\n\n if (result !== 0)\n return result;\n\n // Secondary sort column support\n // istanbul ignore else\n const column = this._columns[columnIndex];\n if (this._secondarySortColumnStack !== undefined &&\n column.secondarySortColumn !== undefined &&\n column.secondarySortColumn !== columnIndex &&\n this._secondarySortColumnStack.indexOf(column.secondarySortColumn) < 0) {\n\n this._secondarySortColumnStack.push(column.secondarySortColumn);\n result = this.sortDispatcher(a, b, column.secondarySortColumn, sortDirection);\n this._secondarySortColumnStack.pop();\n }\n\n return result;\n }\n\n private getPrimitiveValue(record: PropertyRecord) {\n let primitiveValue: Primitives.Value | undefined;\n const recordValue = record.value;\n // istanbul ignore else\n if (recordValue.valueFormat === PropertyValueFormat.Primitive)\n primitiveValue = recordValue.value;\n return primitiveValue;\n }\n\n private sortRows(a: RowItem, b: RowItem, columnIndex: number, sortDirection: SortDirection): number {\n const aCell = a.cells[columnIndex];\n const bCell = b.cells[columnIndex];\n\n let result: number = 0;\n const column = this._columns[columnIndex];\n\n const propertyDescription = column.propertyDescription;\n const valueA = this.getPrimitiveValue(aCell.record as PropertyRecord);\n const valueB = this.getPrimitiveValue(bCell.record as PropertyRecord);\n // istanbul ignore else\n if (valueA !== undefined && valueB !== undefined && propertyDescription)\n result = TypeConverterManager.getConverter(propertyDescription.typename, propertyDescription.converter?.name).sortCompare(valueA, valueB, column.sortIgnoreCase);\n\n if (sortDirection === SortDirection.Descending)\n result *= -1;\n\n return result;\n }\n\n /** Gets distinct values in a column\n * @beta\n */\n public async getDistinctValues(columnKey: string, maximumValueCount?: number): Promise<DistinctValueCollection> {\n const distinctValues = new DistinctValueCollection();\n const columnIndex = this._columns.findIndex((description: ColumnDescription) => description.key === columnKey);\n if (columnIndex < 0 || columnIndex >= this._columns.length)\n return distinctValues;\n\n const columnDescription = this._columns[columnIndex];\n const propertyDescription = columnDescription.propertyDescription;\n const uniqueKeysMap: { [key: string]: TableDistinctValue } = {};\n const uniqueValues: any[] = [];\n\n // istanbul ignore next\n if (!propertyDescription)\n return distinctValues;\n\n for (const row of this._items) {\n const cell = row.cells[columnIndex];\n const record = cell.record;\n\n // istanbul ignore next\n if (record === undefined)\n continue;\n\n const value = this.getPrimitiveValue(record);\n const displayValue = await TypeConverterManager\n .getConverter(propertyDescription.typename, propertyDescription.converter?.name)\n .convertPropertyToString(propertyDescription, value);\n\n // istanbul ignore next\n if (value === undefined || typeof displayValue !== \"string\")\n continue;\n\n const valueKey = value.toString();\n if (!uniqueKeysMap.hasOwnProperty(valueKey)) {\n const propertyValue: TableDistinctValue = { value, label: displayValue };\n\n uniqueKeysMap[valueKey] = propertyValue;\n uniqueValues.push(propertyValue);\n }\n }\n\n distinctValues.values = uniqueValues;\n\n distinctValues.values.sort((a: TableDistinctValue, b: TableDistinctValue) => {\n if (a.value && b.value)\n return TypeConverterManager.getConverter(propertyDescription.typename, propertyDescription.converter?.name).sortCompare(a.value, b.value);\n return 0;\n });\n\n if (maximumValueCount !== undefined && distinctValues.values.length > maximumValueCount)\n distinctValues.values.splice(maximumValueCount);\n\n return distinctValues;\n }\n\n /** Apply a filter descriptor collection\n * @beta\n */\n public async applyFilterDescriptors(filterDescriptors: CompositeFilterDescriptorCollection): Promise<void> {\n this._filterDescriptors = filterDescriptors;\n\n this._rowItemIndices.splice(0);\n\n this._items.forEach((row: RowItem, i: number) => {\n if (filterDescriptors.evaluateRow(row))\n this._rowItemIndices.push(i);\n });\n\n if (this._sortDirection !== SortDirection.NoSort) {\n await this.sort(this._sortColumnIndex, this._sortDirection);\n }\n }\n\n /** Adds a row to the end */\n public addRow(rowItem: RowItem): number {\n return this.insertRow(rowItem, -1);\n }\n\n /** Inserts a row at a given row index */\n public insertRow(rowItem: RowItem, index: number): number {\n let newIdx = index;\n\n if (index < 0 || index >= this._items.length)\n newIdx = this._items.push(rowItem) - 1;\n else\n this._items.splice(newIdx, 0, rowItem);\n\n this.resetRowIndices();\n this.onRowsChanged.raiseEvent();\n\n return newIdx;\n }\n\n /** Deletes a row */\n public deleteRow(rowItem: RowItem, raiseRowsChangedEvent: boolean = true): void {\n const rowIndex = this.findRowIndex(rowItem);\n if (rowIndex >= 0) {\n this._items.splice(rowIndex, 1);\n\n this.resetRowIndices();\n\n if (raiseRowsChangedEvent)\n this.onRowsChanged.raiseEvent();\n }\n }\n\n /** Moves a row to a new row index */\n public moveRow(rowItem: RowItem, newIndex: number): number {\n const oldIndex = this.findRowIndex(rowItem);\n if (oldIndex >= 0) {\n this.deleteRow(rowItem, false);\n\n if (newIndex > oldIndex)\n newIndex--; // removing the row will shrink the count by 1\n\n return this.insertRow(rowItem, newIndex);\n }\n\n return -1;\n }\n\n private findRowIndex(item: RowItem): number {\n for (let i = 0; i < this._items.length; i++) {\n if (item === this._items[i])\n return i;\n }\n return -1;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SimpleTableDataProvider.js","sourceRoot":"","sources":["../../../src/components-react/table/SimpleTableDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0DAAiG;AACjG,kDAAkD;AAClD,6EAA0E;AAC1E,kDAA+C;AAC/C,uEAAqI;AACrI,2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AAC;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;AApSD,0DAoSC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Table\n */\n\nimport { Primitives, PropertyRecord, PropertyValueFormat, UiError } from \"@itwin/appui-abstract\";\nimport { SortDirection } from \"@itwin/core-react\";\nimport { TypeConverterManager } from \"../converters/TypeConverterManager\";\nimport { UiComponents } from \"../UiComponents\";\nimport { CompositeFilterDescriptorCollection, DistinctValueCollection, TableDistinctValue } from \"./columnfiltering/ColumnFiltering\";\nimport { ColumnDescription, MutableTableDataProvider, RowItem, TableDataChangeEvent } from \"./TableDataProvider\";\n\n// cSpell:ignore columnfiltering\n\n/**\n * A Table Data Provider using an array of items.\n * @public\n */\nexport class SimpleTableDataProvider implements MutableTableDataProvider {\n private _items: RowItem[];\n private _rowItemIndices: number[]; // Used for both filtering and sorting\n private _columns: ColumnDescription[];\n private _secondarySortColumnStack?: number[];\n private _sortDirection: SortDirection = SortDirection.NoSort;\n private _sortColumnIndex: number = -1;\n private _filterDescriptors?: CompositeFilterDescriptorCollection;\n\n /** Event emitted by the data provider when column data changes */\n public onColumnsChanged = new TableDataChangeEvent();\n /** Event emitted by the data provider when row data changes */\n public onRowsChanged = new TableDataChangeEvent();\n\n constructor(columns: ColumnDescription[]) {\n this._columns = columns;\n this._items = [];\n this._rowItemIndices = [];\n this._secondarySortColumnStack = [];\n }\n\n /** Sets the row items based on an array */\n public setItems(items: RowItem[]): void {\n this._items = items;\n this._rowItemIndices = [];\n this.resetRowIndices();\n this.onRowsChanged.raiseEvent();\n }\n\n private resetRowIndices(): void {\n this._rowItemIndices.splice(0);\n\n for (let rowIndex = 0; rowIndex < this._items.length; rowIndex++) {\n this._rowItemIndices.push(rowIndex);\n }\n }\n\n /** Retrieves the column descriptions */\n public async getColumns(): Promise<ColumnDescription[]> {\n return this._columns;\n }\n\n /** Retrieves the row count */\n public async getRowsCount(): Promise<number> {\n return this._rowItemIndices.length;\n }\n\n /** Retrieves a specific row by index */\n public async getRow(rowIndex: number, unfiltered?: boolean): Promise<RowItem> {\n let realRowIndex: number = -1;\n\n if (unfiltered) {\n // istanbul ignore else\n if (0 <= rowIndex && rowIndex < this._items.length)\n realRowIndex = rowIndex;\n } else {\n if (0 <= rowIndex && rowIndex < this._rowItemIndices.length)\n realRowIndex = this.getRowIndexFromFilteredRowIndex(rowIndex);\n }\n\n if (0 <= realRowIndex && realRowIndex < this._items.length)\n return this._items[realRowIndex];\n\n throw new UiError(UiComponents.loggerCategory(this), `getRow: Invalid row index - ${rowIndex}`);\n }\n\n private getRowIndexFromFilteredRowIndex(filteredRowIndex: number): number {\n // istanbul ignore next\n if (filteredRowIndex === undefined)\n return filteredRowIndex;\n\n // istanbul ignore next\n if (filteredRowIndex < 0 || filteredRowIndex >= this._rowItemIndices.length)\n return -1;\n\n return this._rowItemIndices[filteredRowIndex];\n }\n\n /** Sorts the rows based on the value in a specific column */\n public async sort(columnIndex: number, sortDirection: SortDirection): Promise<void> {\n // istanbul ignore next\n if (columnIndex < 0 || columnIndex >= this._columns.length)\n return;\n\n this._sortColumnIndex = columnIndex;\n this._sortDirection = sortDirection;\n\n if (sortDirection === SortDirection.NoSort) {\n if (this._filterDescriptors)\n await this.applyFilterDescriptors(this._filterDescriptors);\n else\n this.resetRowIndices();\n return;\n }\n\n this._secondarySortColumnStack = [];\n this._secondarySortColumnStack.push(columnIndex);\n\n // Sort by the column\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const dataProvider = this;\n this._rowItemIndices.sort((a: number, b: number) => {\n return dataProvider.sortDispatcher(dataProvider._items[a], dataProvider._items[b], columnIndex, sortDirection);\n });\n\n delete this._secondarySortColumnStack;\n\n return;\n }\n\n private sortDispatcher(a: RowItem, b: RowItem, columnIndex: number, sortDirection: SortDirection): number {\n let result = this.sortRows(a, b, columnIndex, sortDirection);\n\n if (result !== 0)\n return result;\n\n // Secondary sort column support\n // istanbul ignore else\n const column = this._columns[columnIndex];\n if (this._secondarySortColumnStack !== undefined &&\n column.secondarySortColumn !== undefined &&\n column.secondarySortColumn !== columnIndex &&\n this._secondarySortColumnStack.indexOf(column.secondarySortColumn) < 0) {\n\n this._secondarySortColumnStack.push(column.secondarySortColumn);\n result = this.sortDispatcher(a, b, column.secondarySortColumn, sortDirection);\n this._secondarySortColumnStack.pop();\n }\n\n return result;\n }\n\n private getPrimitiveValue(record: PropertyRecord) {\n let primitiveValue: Primitives.Value | undefined;\n const recordValue = record.value;\n // istanbul ignore else\n if (recordValue.valueFormat === PropertyValueFormat.Primitive)\n primitiveValue = recordValue.value;\n return primitiveValue;\n }\n\n private sortRows(a: RowItem, b: RowItem, columnIndex: number, sortDirection: SortDirection): number {\n const aCell = a.cells[columnIndex];\n const bCell = b.cells[columnIndex];\n\n let result: number = 0;\n const column = this._columns[columnIndex];\n\n const propertyDescription = column.propertyDescription;\n const valueA = this.getPrimitiveValue(aCell.record as PropertyRecord);\n const valueB = this.getPrimitiveValue(bCell.record as PropertyRecord);\n // istanbul ignore else\n if (valueA !== undefined && valueB !== undefined && propertyDescription)\n result = TypeConverterManager.getConverter(propertyDescription.typename, propertyDescription.converter?.name).sortCompare(valueA, valueB, column.sortIgnoreCase);\n\n if (sortDirection === SortDirection.Descending)\n result *= -1;\n\n return result;\n }\n\n /** Gets distinct values in a column\n * @public\n */\n public async getDistinctValues(columnKey: string, maximumValueCount?: number): Promise<DistinctValueCollection> {\n const distinctValues = new DistinctValueCollection();\n const columnIndex = this._columns.findIndex((description: ColumnDescription) => description.key === columnKey);\n if (columnIndex < 0 || columnIndex >= this._columns.length)\n return distinctValues;\n\n const columnDescription = this._columns[columnIndex];\n const propertyDescription = columnDescription.propertyDescription;\n const uniqueKeysMap: { [key: string]: TableDistinctValue } = {};\n const uniqueValues: any[] = [];\n\n // istanbul ignore next\n if (!propertyDescription)\n return distinctValues;\n\n for (const row of this._items) {\n const cell = row.cells[columnIndex];\n const record = cell.record;\n\n // istanbul ignore next\n if (record === undefined)\n continue;\n\n const value = this.getPrimitiveValue(record);\n const displayValue = await TypeConverterManager\n .getConverter(propertyDescription.typename, propertyDescription.converter?.name)\n .convertPropertyToString(propertyDescription, value);\n\n // istanbul ignore next\n if (value === undefined || typeof displayValue !== \"string\")\n continue;\n\n const valueKey = value.toString();\n if (!uniqueKeysMap.hasOwnProperty(valueKey)) {\n const propertyValue: TableDistinctValue = { value, label: displayValue };\n\n uniqueKeysMap[valueKey] = propertyValue;\n uniqueValues.push(propertyValue);\n }\n }\n\n distinctValues.values = uniqueValues;\n\n distinctValues.values.sort((a: TableDistinctValue, b: TableDistinctValue) => {\n if (a.value && b.value)\n return TypeConverterManager.getConverter(propertyDescription.typename, propertyDescription.converter?.name).sortCompare(a.value, b.value);\n return 0;\n });\n\n if (maximumValueCount !== undefined && distinctValues.values.length > maximumValueCount)\n distinctValues.values.splice(maximumValueCount);\n\n return distinctValues;\n }\n\n /** Apply a filter descriptor collection\n * @public\n */\n public async applyFilterDescriptors(filterDescriptors: CompositeFilterDescriptorCollection): Promise<void> {\n this._filterDescriptors = filterDescriptors;\n\n this._rowItemIndices.splice(0);\n\n this._items.forEach((row: RowItem, i: number) => {\n if (filterDescriptors.evaluateRow(row))\n this._rowItemIndices.push(i);\n });\n\n if (this._sortDirection !== SortDirection.NoSort) {\n await this.sort(this._sortColumnIndex, this._sortDirection);\n }\n }\n\n /** Adds a row to the end */\n public addRow(rowItem: RowItem): number {\n return this.insertRow(rowItem, -1);\n }\n\n /** Inserts a row at a given row index */\n public insertRow(rowItem: RowItem, index: number): number {\n let newIdx = index;\n\n if (index < 0 || index >= this._items.length)\n newIdx = this._items.push(rowItem) - 1;\n else\n this._items.splice(newIdx, 0, rowItem);\n\n this.resetRowIndices();\n this.onRowsChanged.raiseEvent();\n\n return newIdx;\n }\n\n /** Deletes a row */\n public deleteRow(rowItem: RowItem, raiseRowsChangedEvent: boolean = true): void {\n const rowIndex = this.findRowIndex(rowItem);\n if (rowIndex >= 0) {\n this._items.splice(rowIndex, 1);\n\n this.resetRowIndices();\n\n if (raiseRowsChangedEvent)\n this.onRowsChanged.raiseEvent();\n }\n }\n\n /** Moves a row to a new row index */\n public moveRow(rowItem: RowItem, newIndex: number): number {\n const oldIndex = this.findRowIndex(rowItem);\n if (oldIndex >= 0) {\n this.deleteRow(rowItem, false);\n\n if (newIndex > oldIndex)\n newIndex--; // removing the row will shrink the count by 1\n\n return this.insertRow(rowItem, newIndex);\n }\n\n return -1;\n }\n\n private findRowIndex(item: RowItem): number {\n for (let i = 0; i < this._items.length; i++) {\n if (item === this._items[i])\n return i;\n }\n return -1;\n }\n}\n"]}
|
package/lib/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoCompleteFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutoCompleteFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAIxD,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,UAAU,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,mBAAmB,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3E,MAAM,EAAE,mBAAmB,CAAC;IAC5B,oBAAoB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,GAAG,CAAC;CACf;AAGD,gBAAgB;AAChB,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,SAAS,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;IACvG,OAAO,CAAC,YAAY,CAAiD;gBAEzD,KAAK,EAAE,uBAAuB;IAQ1B,kBAAkB,CAAC,KAAK,EAAE,uBAAuB;IAMjE,OAAO,CAAC,WAAW,CAUjB;IAEF,OAAO,CAAC,aAAa,CAInB;IAEc,MAAM;CAavB"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/* eslint-disable deprecation/deprecation */
|
|
6
7
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
8
|
if (k2 === undefined) k2 = k;
|
|
8
9
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
package/lib/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoCompleteFilter.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F
|
|
1
|
+
{"version":3,"file":"AutoCompleteFilter.js","sourceRoot":"","sources":["../../../../../src/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;AAE5C;;;+FAG+F;AAE/F,0CAA4B;AAC5B,kDAA0B;AAC1B,kDAAiD;AACjD,wDAAqD;AAoBrD,0BAA0B;AAC1B,gBAAgB;AAChB,MAAa,kBAAmB,SAAQ,eAAK,CAAC,SAA2D;IAGvG,YAAY,KAA8B;QACxC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHP,iBAAY,GAAG,2BAAY,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;QAgB7D,gBAAW,GAAG,CAAC,QAAkC,EAAwB,EAAE;YACjF,MAAM,KAAK,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC;YACrC,IAAI,OAAO,GAAG,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC3D,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;gBAC/B,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;oBACzB,OAAO,EAAE,KAA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AK,EACpF,WAAW,EAAE,IAAI,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAI,CAChC,CAAC;IACJ,CAAC;CACF;AAhDD,gDAgDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/* eslint-disable deprecation/deprecation */\n\n/*---------------------------------------------------------------------------------------------\n* This code has been adapted from\n* [react-data-grid-addons](https://github.com/adazzle/react-data-grid/tree/master/packages/react-data-grid-addons).\n*--------------------------------------------------------------------------------------------*/\n\nimport * as _ from \"lodash\";\nimport React from \"react\";\nimport { ThemedSelect } from \"@itwin/core-react\";\nimport { UiComponents } from \"../../../UiComponents\";\nimport { ReactDataGridColumn } from \"../../component/TableColumn\";\nimport { TableDistinctValue } from \"../ColumnFiltering\";\n\n// cspell:ignore autosize\n\n/** @internal */\nexport interface AutoCompleteFilterProps {\n onChange: (args: { filterTerm: any, column: ReactDataGridColumn }) => void;\n column: ReactDataGridColumn;\n getValidFilterValues: (key: string) => any[];\n multiSelection?: boolean;\n placeholder?: string;\n}\n\ninterface AutoCompleteFilterState {\n options: TableDistinctValue[];\n filters?: any;\n}\n\n/* istanbul ignore next */\n/** @internal */\nexport class AutoCompleteFilter extends React.Component<AutoCompleteFilterProps, AutoCompleteFilterState> {\n private _placeholder = UiComponents.translate(\"button.label.filter\");\n\n constructor(props: AutoCompleteFilterProps) {\n super(props);\n\n this.state = {\n options: this._getOptions(),\n };\n }\n\n public override componentDidUpdate(props: AutoCompleteFilterProps) {\n const options = this._getOptions(props);\n if (!_.isEqual(options, this.state.options))\n this.setState({ options });\n }\n\n private _getOptions = (newProps?: AutoCompleteFilterProps): TableDistinctValue[] => {\n const props = newProps || this.props;\n let options = props.getValidFilterValues(props.column.key);\n options = options.map((o: any) => {\n if (typeof o === \"string\") {\n return { value: o, label: o };\n }\n return o;\n });\n return options;\n };\n\n private _handleChange = (value: any): void => {\n const filters = value;\n this.setState({ filters });\n this.props.onChange({ filterTerm: filters, column: this.props.column });\n };\n\n public override render() {\n return (\n <ThemedSelect\n name={`filter-${this.props.column.key}`}\n options={this.state.options}\n placeholder={this.props.placeholder || this._placeholder}\n onChange={this._handleChange}\n escapeClearsValue={true}\n isMulti={this.props.multiSelection !== undefined ? this.props.multiSelection : false}\n isClearable={true}\n value={this.state.filters} />\n );\n }\n}\n"]}
|
|
@@ -45,11 +45,9 @@ export interface TableProps extends CommonProps {
|
|
|
45
45
|
tableSelectionTarget?: TableSelectionTarget;
|
|
46
46
|
/** Specifies the selection mode. The default is Single. */
|
|
47
47
|
selectionMode?: SelectionMode;
|
|
48
|
-
/** Callback for when properties are being edited
|
|
49
|
-
* @beta */
|
|
48
|
+
/** Callback for when properties are being edited */
|
|
50
49
|
onPropertyEditing?: (args: TableCellEditorState) => void;
|
|
51
|
-
/** Callback for when properties are updated
|
|
52
|
-
* @beta */
|
|
50
|
+
/** Callback for when properties are updated */
|
|
53
51
|
onPropertyUpdated?: (propertyArgs: PropertyUpdatedArgs, cellArgs: TableCellUpdatedArgs) => Promise<boolean>;
|
|
54
52
|
/** @internal */
|
|
55
53
|
renderRow?: (item: RowItem, props: TableRowProps) => React.ReactNode;
|
|
@@ -81,8 +79,7 @@ export interface TableProps extends CommonProps {
|
|
|
81
79
|
onScrollToRow?: (rowIndex: number) => void;
|
|
82
80
|
/** @internal */
|
|
83
81
|
onApplyFilter?: () => void;
|
|
84
|
-
/** Called to show a context menu when a cell is right-clicked.
|
|
85
|
-
* @beta */
|
|
82
|
+
/** Called to show a context menu when a cell is right-clicked. */
|
|
86
83
|
onCellContextMenu?: (args: TableCellContextMenuArgs) => void;
|
|
87
84
|
/** Maximum number of distinct values for filtering */
|
|
88
85
|
maximumDistinctValues?: number;
|
|
@@ -127,7 +124,7 @@ export interface TableCellUpdatedArgs {
|
|
|
127
124
|
cellKey: string;
|
|
128
125
|
}
|
|
129
126
|
/** Arguments for `TableProps.onCellContextMenu` callback
|
|
130
|
-
* @
|
|
127
|
+
* @public
|
|
131
128
|
*/
|
|
132
129
|
export interface TableCellContextMenuArgs {
|
|
133
130
|
/** Index of the row clicked */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components-react/table/component/Table.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,cAAc,CAAC;AACtB,OAAO,yCAAyC,CAAC;AAIjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,WAAW,EACX,UAAU,EAAoB,iBAAiB,EAChD,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAGtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAC1G,OAAO,EAAE,mCAAmC,EAAoC,MAAM,oCAAoC,CAAC;AAO3H,OAAO,EAAE,QAAQ,EAAqC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG/G,OAAO,EAAuB,WAAW,EAAE,MAAM,eAAe,CAAC;AAWjE;;;GAGG;AACH,oBAAY,oBAAoB;IAC9B,GAAG,IAAA;IACH,IAAI,IAAA;CACL;AA6BD;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,kCAAkC;IAClC,YAAY,EAAE,iBAAiB,CAAC;IAChC,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,kCAAkC;IAClC,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAErE,kDAAkD;IAClD,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC;IAC1C,0CAA0C;IAC1C,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