@itwin/components-react 5.0.5 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -12
- package/lib/cjs/components-react/editors/DateTimeEditor.scss +0 -1
- package/lib/components-react/UiComponents.js +2 -2
- package/lib/components-react/UiComponents.js.map +1 -1
- package/lib/components-react/common/CheckBoxState.js.map +1 -1
- package/lib/components-react/common/HighlightedText.js +1 -1
- package/lib/components-react/common/HighlightedText.js.map +1 -1
- package/lib/components-react/common/ImageRenderer.js +4 -4
- package/lib/components-react/common/ImageRenderer.js.map +1 -1
- package/lib/components-react/common/Links.d.ts.map +1 -1
- package/lib/components-react/common/Links.js +0 -1
- package/lib/components-react/common/Links.js.map +1 -1
- package/lib/components-react/common/Orientation.js.map +1 -1
- package/lib/components-react/common/TimeFormat.js +1 -1
- package/lib/components-react/common/TimeFormat.js.map +1 -1
- package/lib/components-react/common/UseContextWithMandatoryProvider.js +1 -1
- package/lib/components-react/common/UseContextWithMandatoryProvider.js.map +1 -1
- package/lib/components-react/converters/DateTimeTypeConverter.d.ts.map +1 -1
- package/lib/components-react/converters/DateTimeTypeConverter.js +0 -1
- package/lib/components-react/converters/DateTimeTypeConverter.js.map +1 -1
- package/lib/components-react/converters/PointTypeConverter.d.ts.map +1 -1
- package/lib/components-react/converters/PointTypeConverter.js +0 -1
- package/lib/components-react/converters/PointTypeConverter.js.map +1 -1
- package/lib/components-react/converters/TypeConverter.d.ts.map +1 -1
- package/lib/components-react/converters/TypeConverter.js.map +1 -1
- package/lib/components-react/datepicker/DateField.js +2 -2
- package/lib/components-react/datepicker/DateField.js.map +1 -1
- package/lib/components-react/datepicker/DatePicker.js +1 -1
- package/lib/components-react/datepicker/DatePicker.js.map +1 -1
- package/lib/components-react/datepicker/DatePickerPopupButton.js +1 -1
- package/lib/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
- package/lib/components-react/datepicker/IntlFormatter.d.ts.map +1 -1
- package/lib/components-react/datepicker/TimeField.js +1 -1
- package/lib/components-react/datepicker/TimeField.js.map +1 -1
- package/lib/components-react/editors/BooleanEditor.d.ts +1 -0
- package/lib/components-react/editors/BooleanEditor.d.ts.map +1 -1
- package/lib/components-react/editors/BooleanEditor.js +1 -0
- package/lib/components-react/editors/BooleanEditor.js.map +1 -1
- package/lib/components-react/editors/CustomNumberEditor.d.ts.map +1 -1
- package/lib/components-react/editors/CustomNumberEditor.js +2 -3
- package/lib/components-react/editors/CustomNumberEditor.js.map +1 -1
- package/lib/components-react/editors/DateTimeEditor.d.ts.map +1 -1
- package/lib/components-react/editors/DateTimeEditor.js +1 -1
- package/lib/components-react/editors/DateTimeEditor.js.map +1 -1
- package/lib/components-react/editors/DateTimeEditor.scss +0 -1
- package/lib/components-react/editors/EditorContainer.js +1 -1
- package/lib/components-react/editors/EditorContainer.js.map +1 -1
- package/lib/components-react/editors/EnumButtonGroupEditor.d.ts +1 -0
- package/lib/components-react/editors/EnumButtonGroupEditor.d.ts.map +1 -1
- package/lib/components-react/editors/EnumButtonGroupEditor.js +1 -0
- package/lib/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/components-react/editors/EnumEditor.d.ts +1 -0
- package/lib/components-react/editors/EnumEditor.d.ts.map +1 -1
- package/lib/components-react/editors/EnumEditor.js +1 -0
- package/lib/components-react/editors/EnumEditor.js.map +1 -1
- package/lib/components-react/editors/IconEditor.d.ts.map +1 -1
- package/lib/components-react/editors/IconEditor.js.map +1 -1
- package/lib/components-react/editors/ImageCheckBoxEditor.d.ts +1 -0
- package/lib/components-react/editors/ImageCheckBoxEditor.d.ts.map +1 -1
- package/lib/components-react/editors/ImageCheckBoxEditor.js +2 -1
- package/lib/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
- package/lib/components-react/editors/NumericInputEditor.d.ts +1 -0
- package/lib/components-react/editors/NumericInputEditor.d.ts.map +1 -1
- package/lib/components-react/editors/NumericInputEditor.js +2 -1
- package/lib/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/components-react/editors/PopupButton.js +3 -3
- package/lib/components-react/editors/PopupButton.js.map +1 -1
- package/lib/components-react/editors/SliderEditor.d.ts +1 -0
- package/lib/components-react/editors/SliderEditor.d.ts.map +1 -1
- package/lib/components-react/editors/SliderEditor.js +3 -2
- package/lib/components-react/editors/SliderEditor.js.map +1 -1
- package/lib/components-react/editors/TextEditor.d.ts +1 -0
- package/lib/components-react/editors/TextEditor.d.ts.map +1 -1
- package/lib/components-react/editors/TextEditor.js +3 -2
- package/lib/components-react/editors/TextEditor.js.map +1 -1
- package/lib/components-react/editors/TextareaEditor.d.ts +1 -0
- package/lib/components-react/editors/TextareaEditor.d.ts.map +1 -1
- package/lib/components-react/editors/TextareaEditor.js +1 -0
- package/lib/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/components-react/editors/ToggleEditor.d.ts +1 -0
- package/lib/components-react/editors/ToggleEditor.d.ts.map +1 -1
- package/lib/components-react/editors/ToggleEditor.js +1 -0
- package/lib/components-react/editors/ToggleEditor.js.map +1 -1
- package/lib/components-react/favorite/FavoritePropertyList.js +1 -1
- package/lib/components-react/favorite/FavoritePropertyList.js.map +1 -1
- package/lib/components-react/filter-builder/FilterBuilderState.js +1 -1
- package/lib/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/components-react/filtering/FilteringInput.d.ts +1 -0
- package/lib/components-react/filtering/FilteringInput.d.ts.map +1 -1
- package/lib/components-react/filtering/FilteringInput.js +1 -0
- package/lib/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/components-react/filtering/ResultSelector.d.ts +1 -0
- package/lib/components-react/filtering/ResultSelector.d.ts.map +1 -1
- package/lib/components-react/filtering/ResultSelector.js +1 -0
- package/lib/components-react/filtering/ResultSelector.js.map +1 -1
- package/lib/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/components-react/inputs/ParsedInput.js +1 -1
- package/lib/components-react/inputs/ParsedInput.js.map +1 -1
- package/lib/components-react/l10n/LocalizationProvider.js +2 -2
- package/lib/components-react/l10n/LocalizationProvider.js.map +1 -1
- package/lib/components-react/properties/LinkHandler.d.ts +2 -2
- package/lib/components-react/properties/LinkHandler.d.ts.map +1 -1
- package/lib/components-react/properties/LinkHandler.js +2 -2
- package/lib/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/components-react/properties/renderers/PropertyView.js +1 -1
- package/lib/components-react/properties/renderers/PropertyView.js.map +1 -1
- package/lib/components-react/properties/renderers/value/WithContextStyle.d.ts.map +1 -1
- package/lib/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js +1 -1
- package/lib/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js.map +1 -1
- package/lib/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- 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/component/PropertyList.js.map +1 -1
- package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +1 -0
- package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
- package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.js +1 -0
- package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +1 -1
- package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts.map +1 -1
- package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
- package/lib/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +4 -4
- package/lib/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts.map +1 -1
- package/lib/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +8 -8
- package/lib/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
- package/lib/components-react/selectable-content/SelectableContent.js +2 -2
- package/lib/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/components-react/toolbar/InternalToolbarComponent.d.ts +1 -1
- package/lib/components-react/toolbar/InternalToolbarComponent.d.ts.map +1 -1
- package/lib/components-react/toolbar/InternalToolbarComponent.js +11 -11
- package/lib/components-react/toolbar/InternalToolbarComponent.js.map +1 -1
- package/lib/components-react/toolbar/Item.js.map +1 -1
- package/lib/components-react/toolbar/ItemWrapper.js.map +1 -1
- package/lib/components-react/toolbar/Items.js.map +1 -1
- package/lib/components-react/toolbar/Overflow.d.ts +1 -1
- package/lib/components-react/toolbar/Overflow.d.ts.map +1 -1
- package/lib/components-react/toolbar/Overflow.js.map +1 -1
- package/lib/components-react/toolbar/OverflowPanel.js.map +1 -1
- package/lib/components-react/toolbar/PopupItem.js.map +1 -1
- package/lib/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
- package/lib/components-react/toolbar/PopupItemsPanel.js +2 -2
- package/lib/components-react/toolbar/PopupItemsPanel.js.map +1 -1
- 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.js +1 -1
- package/lib/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/components-react/toolbar/groupPanel/BackArrow.js.map +1 -1
- package/lib/components-react/toolbar/groupPanel/Column.js.map +1 -1
- package/lib/components-react/toolbar/groupPanel/Columns.js.map +1 -1
- package/lib/components-react/toolbar/groupPanel/Panel.js.map +1 -1
- package/lib/components-react/toolbar/groupPanel/Title.js.map +1 -1
- package/lib/components-react/toolbar/groupPanel/tool/Expander.js.map +1 -1
- package/lib/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
- package/lib/components-react/toolbar/useConditionalSynchedItems.d.ts +1 -1
- package/lib/components-react/toolbar/useConditionalSynchedItems.d.ts.map +1 -1
- package/lib/components-react/toolbar/useConditionalSynchedItems.js +3 -3
- package/lib/components-react/toolbar/useConditionalSynchedItems.js.map +1 -1
- package/lib/components-react/toolbar/useDragInteraction.d.ts.map +1 -1
- package/lib/components-react/toolbar/useDragInteraction.js +1 -1
- package/lib/components-react/toolbar/useDragInteraction.js.map +1 -1
- package/lib/components-react/tree/TreeDataProvider.d.ts.map +1 -1
- package/lib/components-react/tree/controlled/Observable.js.map +1 -1
- package/lib/components-react/tree/controlled/TreeHooks.js +2 -2
- package/lib/components-react/tree/controlled/TreeHooks.js.map +1 -1
- package/lib/components-react/tree/controlled/TreeModel.js +3 -3
- package/lib/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/components-react/tree/controlled/TreeModelSource.js +2 -2
- package/lib/components-react/tree/controlled/TreeModelSource.js.map +1 -1
- package/lib/components-react/tree/controlled/TreeNodeLoader.js +1 -1
- package/lib/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
- package/lib/components-react/tree/controlled/component/ControlledTree.js +1 -1
- package/lib/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/components-react/tree/controlled/component/NodeContent.js +2 -2
- package/lib/components-react/tree/controlled/component/NodeContent.js.map +1 -1
- package/lib/components-react/tree/controlled/component/TreeNodeRenderer.js +3 -3
- package/lib/components-react/tree/controlled/component/TreeNodeRenderer.js.map +1 -1
- package/lib/components-react/tree/controlled/component/TreeRenderer.js +4 -4
- package/lib/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/components-react.js +1 -1
- package/lib/components-react.js.map +1 -1
- package/lib/esm/components-react/editors/DateTimeEditor.scss +0 -1
- package/package.json +11 -11
|
@@ -6,12 +6,12 @@ import type { LinkElementsInfo } from "@itwin/appui-abstract";
|
|
|
6
6
|
/** Renders anchor tag by wrapping or splitting provided text
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export declare const renderLinks: (text: string, links: LinkElementsInfo, highlight?: (
|
|
9
|
+
export declare const renderLinks: (text: string, links: LinkElementsInfo, highlight?: (text: string) => React.ReactNode) => React.ReactNode;
|
|
10
10
|
/** If record has links, wraps stringValue in them, otherwise returns unchanged stringValue
|
|
11
11
|
* Optionally it can highlight text
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
export declare const withLinks: (stringValue: string, links?: LinkElementsInfo, highlight?: (
|
|
14
|
+
export declare const withLinks: (stringValue: string, links?: LinkElementsInfo, highlight?: (text: string) => React.ReactNode) => React.ReactNode;
|
|
15
15
|
/**
|
|
16
16
|
* Properties for [[LinksRenderer]] component.
|
|
17
17
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../src/components-react/properties/LinkHandler.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA2F9D;;GAEG;AACH,eAAO,MAAM,WAAW,SAChB,MAAM,SACL,gBAAgB,
|
|
1
|
+
{"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../src/components-react/properties/LinkHandler.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA2F9D;;GAEG;AACH,eAAO,MAAM,WAAW,SAChB,MAAM,SACL,gBAAgB,cACX,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,KAC5C,KAAK,CAAC,SAER,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,gBACP,MAAM,UACX,gBAAgB,cACZ,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,KAC5C,KAAK,CAAC,SAIR,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CACjD;AAED;;;GAGG;AAEH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAEtD"}
|
|
@@ -11,7 +11,7 @@ import { UnderlinedButton } from "@itwin/core-react";
|
|
|
11
11
|
/** Render a single anchor tag */
|
|
12
12
|
function renderTag(text, links, highlight) {
|
|
13
13
|
return (
|
|
14
|
-
// eslint-disable-next-line
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
15
15
|
React.createElement(UnderlinedButton, { onClick: (e) => {
|
|
16
16
|
e.preventDefault();
|
|
17
17
|
e.stopPropagation();
|
|
@@ -76,7 +76,7 @@ export const withLinks = (stringValue, links, highlight) => {
|
|
|
76
76
|
* React component for rendering string with links.
|
|
77
77
|
* @public
|
|
78
78
|
*/
|
|
79
|
-
// eslint-disable-next-line
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
80
80
|
export function LinksRenderer(props) {
|
|
81
81
|
return React.createElement(React.Fragment, null, withLinks(props.value, props.links, props.highlighter));
|
|
82
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../src/components-react/properties/LinkHandler.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,iCAAiC;AACjC,SAAS,SAAS,CAChB,IAAY,EACZ,KAAuB,EACvB,SAA6C;IAE7C,OAAO;IACL,
|
|
1
|
+
{"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../src/components-react/properties/LinkHandler.tsx"],"names":[],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WAAW,GAAG,CACzB,IAAY,EACZ,KAAuB,EACvB,SAA6C,EAC5B,EAAE;IACnB,OAAO,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,WAAmB,EACnB,KAAwB,EACxB,SAA6C,EAC5B,EAAE;IACnB,IAAI,KAAK;QAAE,OAAO,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,IAAI,SAAS;QAAE,OAAO,iBAAiB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAChE,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAaF;;;GAGG;AACH,4DAA4D;AAC5D,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,OAAO,0CAAG,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,CAAI,CAAC;AACvE,CAAC","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 Properties\n */\n\nimport * as React from \"react\";\nimport { BentleyError, BentleyStatus } from \"@itwin/core-bentley\";\nimport type { LinkElementsInfo } from \"@itwin/appui-abstract\";\nimport { UnderlinedButton } from \"@itwin/core-react\";\n\n/** Render a single anchor tag */\nfunction renderTag(\n text: string,\n links: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n) {\n return (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <UnderlinedButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n links.onClick(text);\n }}\n >\n {highlight ? highlight(text) : text}\n </UnderlinedButton>\n );\n}\n\ninterface Match {\n start: number;\n end: number;\n}\n\nfunction matchComparison(matchA: Match, matchB: Match) {\n if (matchA.start > matchB.start) return 1;\n if (matchB.start > matchA.start) return -1;\n return 0;\n}\n\nfunction renderTextPart(\n text: string,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode {\n return highlight ? highlight(text) : text;\n}\n\nfunction renderText(\n text: string,\n links: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode {\n const { matcher } = links;\n\n if (!matcher) return renderTag(text, links, highlight);\n\n const matches = matcher(text);\n\n // Sort just to be sure\n matches.sort(matchComparison);\n\n const parts: React.ReactNode[] = [];\n let lastIndex = 0;\n for (const match of matches) {\n // If matches overlap there must be something wrong with the matcher\n if (lastIndex > match.start)\n throw new BentleyError(\n BentleyStatus.ERROR,\n \"renderText: matcher returned overlapping matches\"\n );\n\n if (lastIndex < match.start)\n parts.push(\n renderTextPart(text.substring(lastIndex, match.start), highlight)\n );\n\n const anchorText = text.substring(match.start, match.end);\n parts.push(renderTag(anchorText, links, highlight));\n\n lastIndex = match.end;\n }\n if (text.length > lastIndex)\n parts.push(renderTextPart(text.substring(lastIndex), highlight));\n\n // Need to map, because React complains about the lack of keys\n return parts.map((part, index) => (\n <React.Fragment key={index}>{part}</React.Fragment>\n ));\n}\n\nfunction renderHighlighted(\n text: string,\n highlight: (text: string) => React.ReactNode\n) {\n return highlight(text);\n}\n\n/** Renders anchor tag by wrapping or splitting provided text\n * @public\n */\nexport const renderLinks = (\n text: string,\n links: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode => {\n return renderText(text, links, highlight);\n};\n\n/** If record has links, wraps stringValue in them, otherwise returns unchanged stringValue\n * Optionally it can highlight text\n * @public\n */\nexport const withLinks = (\n stringValue: string,\n links?: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode => {\n if (links) return renderLinks(stringValue, links, highlight);\n if (highlight) return renderHighlighted(stringValue, highlight);\n return stringValue;\n};\n\n/**\n * Properties for [[LinksRenderer]] component.\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof LinksRenderer>`\n */\nexport interface LinksRendererProps {\n value: string;\n links?: LinkElementsInfo;\n highlighter?: (text: string) => React.ReactNode;\n}\n\n/**\n * React component for rendering string with links.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function LinksRenderer(props: LinksRendererProps) {\n return <>{withLinks(props.value, props.links, props.highlighter)}</>;\n}\n"]}
|
|
@@ -67,7 +67,7 @@ export class PropertyView extends React.Component {
|
|
|
67
67
|
return (React.createElement("div", { style: columnsStyleProvider.getStyle(this.props.orientation, needActionButtons, ratio, needElementSeparator), className: this.getClassName(this.props), onClick: this._onClick, onContextMenu: this._onContextMenu, onMouseEnter: this._onMouseEnter, onMouseLeave: this._onMouseLeave, role: "presentation" },
|
|
68
68
|
React.createElement("div", { className: "components-property-record-label" }, this.props.labelElement),
|
|
69
69
|
needElementSeparator ? (
|
|
70
|
-
// eslint-disable-next-line
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
71
71
|
React.createElement(ElementSeparator, { style: { margin: 0 }, movableArea: this.props.width, onRatioChanged: this.props.onColumnRatioChanged, ratio: ratio, orientation: this.props.orientation, isResizeHandleHovered: this.props.isResizeHandleHovered, onResizeHandleHoverChanged: this.props.onResizeHandleHoverChanged, isResizeHandleBeingDragged: this.props.isResizeHandleBeingDragged, onResizeHandleDragChanged: this.props.onResizeHandleDragChanged })) : undefined,
|
|
72
72
|
renderValueElement ? (React.createElement("div", { className: "components-property-record-value" },
|
|
73
73
|
React.createElement("span", null, this.props.valueElementRenderer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyView.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PropertyView.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC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AK,CAAC,WAAW,EACtB,iBAAiB,EACjB,KAAK,EACL,oBAAoB,CACrB,EACD,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EACxC,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,aAAa,EAAE,IAAI,CAAC,cAAc,EAClC,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,IAAI,EAAC,cAAc;YAEnB,6BAAK,SAAS,EAAC,kCAAkC,IAC9C,IAAI,CAAC,KAAK,CAAC,YAAY,CACpB;YACL,oBAAoB,CAAC,CAAC,CAAC;YACtB,
|
|
1
|
+
{"version":3,"file":"PropertyView.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PropertyView.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAmB1D;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,SAGvC;IACC,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAMP,aAAQ,GAAG,GAAG,EAAE;YACtB,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO;gBACpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACxE,CAAC,CAAC;QAEM,kBAAa,GAAG,GAAG,EAAE;YAC3B,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW;gBA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AAK,CAAC,oBAAoB,EAC/C,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,yBAAyB,EAAE,IAAI,CAAC,KAAK,CAAC,yBAAyB,GAC/D,CACH,CAAC,CAAC,CAAC,SAAS;YACZ,kBAAkB,CAAC,CAAC,CAAC,CACpB,6BAAK,SAAS,EAAC,kCAAkC;gBAC/C,kCACG,IAAI,CAAC,KAAK,CAAC,oBAAoB;oBAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE;oBACnC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CACtB,CACH,CACP,CAAC,CAAC,CAAC,SAAS;YACZ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAClC,oBAAC,gBAAgB,IACf,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EACnC,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EACvC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,GACvD,CACH,CAAC,CAAC,CAAC,SAAS,CACT,CACP,CAAC;IACJ,CAAC;CACF","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 Properties\n */\n\nimport \"./PropertyView.scss\";\nimport * as React from \"react\";\nimport { ElementSeparator } from \"@itwin/core-react\";\nimport { ActionButtonList } from \"./ActionButtonList.js\";\nimport { PropertyGridColumnStyleProvider } from \"./PropertyGridColumns.js\";\nimport type { SharedRendererProps } from \"./PropertyRenderer.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties of [[PropertyView]] React component\n * @public\n */\nexport interface PropertyViewProps extends SharedRendererProps {\n /** Property label as a React element */\n labelElement: React.ReactNode;\n /** Property value as a React element */\n valueElement?: React.ReactNode;\n /** Render callback for property value. If specified, `valueElement` is ignored */\n valueElementRenderer?: () => React.ReactNode;\n}\n\n/** @internal */\ninterface PropertyViewState {\n isHovered: boolean;\n}\n\n/**\n * A React component that renders property as label/value pair\n * @public\n */\nexport class PropertyView extends React.Component<\n PropertyViewProps,\n PropertyViewState\n> {\n constructor(props: PropertyViewProps) {\n super(props);\n this.state = {\n isHovered: false,\n };\n }\n\n private _onClick = () => {\n if (this.props.onClick)\n this.props.onClick(this.props.propertyRecord, this.props.uniqueKey);\n };\n\n private _onMouseEnter = () => {\n if (this.props.isHoverable) this.setState({ isHovered: true });\n };\n\n private _onMouseLeave = () => {\n if (this.props.isHoverable) this.setState({ isHovered: false });\n };\n\n private _onContextMenu = (e: React.MouseEvent) => {\n if (this.props.onContextMenu) {\n this.props.onContextMenu(this.props.propertyRecord, e);\n e.preventDefault();\n }\n if (this.props.onRightClick) {\n this.props.onRightClick(this.props.propertyRecord, this.props.uniqueKey);\n e.preventDefault();\n }\n return false;\n };\n\n private getClassName(props: PropertyViewProps) {\n let propertyRecordClassName =\n props.orientation === Orientation.Horizontal\n ? \"components-property-record--horizontal\"\n : \"components-property-record--vertical\";\n if (props.isSelected) propertyRecordClassName += \" components--selected\";\n if (props.onClick) propertyRecordClassName += \" components--clickable\";\n if (props.isHoverable) propertyRecordClassName += \" components--hoverable\";\n return propertyRecordClassName;\n }\n\n public override render() {\n const ratio = this.props.columnRatio ? this.props.columnRatio : 0.25;\n const needElementSeparator =\n this.props.orientation === Orientation.Horizontal &&\n !!this.props.onColumnRatioChanged;\n const needActionButtons = !!this.props.actionButtonRenderers;\n const columnsStyleProvider = new PropertyGridColumnStyleProvider(\n this.props.columnInfo\n );\n const renderValueElement = !!(\n this.props.valueElement || this.props.valueElementRenderer\n );\n\n return (\n <div\n style={columnsStyleProvider.getStyle(\n this.props.orientation,\n needActionButtons,\n ratio,\n needElementSeparator\n )}\n className={this.getClassName(this.props)}\n onClick={this._onClick}\n onContextMenu={this._onContextMenu}\n onMouseEnter={this._onMouseEnter}\n onMouseLeave={this._onMouseLeave}\n role=\"presentation\"\n >\n <div className=\"components-property-record-label\">\n {this.props.labelElement}\n </div>\n {needElementSeparator ? (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <ElementSeparator\n style={{ margin: 0 }}\n movableArea={this.props.width}\n onRatioChanged={this.props.onColumnRatioChanged}\n ratio={ratio}\n orientation={this.props.orientation}\n isResizeHandleHovered={this.props.isResizeHandleHovered}\n onResizeHandleHoverChanged={this.props.onResizeHandleHoverChanged}\n isResizeHandleBeingDragged={this.props.isResizeHandleBeingDragged}\n onResizeHandleDragChanged={this.props.onResizeHandleDragChanged}\n />\n ) : undefined}\n {renderValueElement ? (\n <div className=\"components-property-record-value\">\n <span>\n {this.props.valueElementRenderer\n ? this.props.valueElementRenderer()\n : this.props.valueElement}\n </span>\n </div>\n ) : undefined}\n {this.props.actionButtonRenderers ? (\n <ActionButtonList\n orientation={this.props.orientation}\n property={this.props.propertyRecord}\n isPropertyHovered={this.state.isHovered}\n actionButtonRenderers={this.props.actionButtonRenderers}\n />\n ) : undefined}\n </div>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithContextStyle.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/value/WithContextStyle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SACrB,
|
|
1
|
+
{"version":3,"file":"WithContextStyle.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/value/WithContextStyle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SACrB,KAAK,CAAC,SAAS,YACX,4BAA4B,iGAIvC,CAAC"}
|
|
@@ -55,7 +55,7 @@ export class TableNonPrimitiveValueRenderer extends React.PureComponent {
|
|
|
55
55
|
// }
|
|
56
56
|
render() {
|
|
57
57
|
return (
|
|
58
|
-
// eslint-disable-next-line
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
59
59
|
React.createElement(UnderlinedButton
|
|
60
60
|
// ref={this._buttonRef}
|
|
61
61
|
, {
|
package/lib/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonPrimitiveValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAwCrD;;;;GAIG;AACH,MAAM,OAAO,8BAA+B,SAAQ,KAAK,CAAC,aAAkD;IAA5G;QACE,6DAA6D;;QAErD,aAAQ,GAAG,GAAG,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY;gBAAE,OAAO;YAErC,MAAM,WAAW,GAAwB;gBACvC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc;gBAClC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;aAC9B,CAAC;YAEF,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IAkDJ,CAAC;IAhDC,2CAA2C;IAC3C,8DAA8D;IAC9D,mFAAmF;IACnF,6CAA6C;IAC7C,iCAAiC;IACjC,iCAAiC;IACjC,cAAc;IAEd,mDAAmD;IAEnD,wBAAwB;IACxB,cAAc;IAEd,6DAA6D;IAE7D,6CAA6C;IAC7C,uBAAuB;IACvB,iCAAiC;IACjC,oDAAoD;IACpD,SAAS;IACT,eAAe;IACf,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,OAAO;IACP,wCAAwC;IACxC,IAAI;IAEJ,iCAAiC;IACjC,gCAAgC;IAChC,gCAAgC;IAChC,IAAI;IAEY,MAAM;QACpB,OAAO;QACL,
|
|
1
|
+
{"version":3,"file":"NonPrimitiveValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAwCrD;;;;GAIG;AACH,MAAM,OAAO,8BAA+B,SAAQ,KAAK,CAAC,aAAkD;IAA5G;QACE,6DAA6D;;QAErD,aAAQ,GAAG,GAAG,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY;gBAAE,OAAO;YAErC,MAAM,WAAW,GAAwB;gBACvC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc;gBAClC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;aAC9B,CAAC;YAEF,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IAkDJ,CAAC;IAhDC,2CAA2C;IAC3C,8DAA8D;IAC9D,mFAAmF;IACnF,6CAA6C;IAC7C,iCAAiC;IACjC,iCAAiC;IACjC,cAAc;IAEd,mDAAmD;IAEnD,wBAAwB;IACxB,cAAc;IAEd,6DAA6D;IAE7D,6CAA6C;IAC7C,uBAAuB;IACvB,iCAAiC;IACjC,oDAAoD;IACpD,SAAS;IACT,eAAe;IACf,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,OAAO;IACP,wCAAwC;IACxC,IAAI;IAEJ,iCAAiC;IACjC,gCAAgC;IAChC,gCAAgC;IAChC,IAAI;IAEY,MAAM;QACpB,OAAO;QACL,4DAA4D;QAC5D,oBAAC,gBAAgB;QACf,wBAAwB;;YAAxB,wBAAwB;YACxB,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,mCAAmC;YACnC,mCAAmC;YACnC,KAAK,EAAE,QAAQ,IAAI,CAAC,KAAK,CAAC,WAAW,kBAAkB,IAEtD,IAAI,CAAC,KAAK,CAAC,WAAW,CACN,CACpB,CAAC;IACJ,CAAC;CACF","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 Properties\n */\n\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { UnderlinedButton } from \"@itwin/core-react\";\nimport type { PropertyDialogState } from \"../../../ValueRendererManager.js\";\nimport type { Orientation } from \"../../../../common/Orientation.js\";\n\n/** Properties for [[TableArrayValueRenderer]] and [[TableStructValueRenderer]] React component\n * @public\n */\nexport interface TableSpecificValueRendererProps\n extends SharedTableNonPrimitiveValueRendererProps {\n /** Property record */\n propertyRecord: PropertyRecord;\n /** Orientation of the rendered property */\n orientation: Orientation;\n}\n\n/** Shared properties between table non-primitive value renderers\n * @public\n */\nexport interface SharedTableNonPrimitiveValueRendererProps {\n // /** Callback to request for a Popup to be shown. */\n // onPopupShow?: (popupState: PropertyPopupState) => void;\n // /** Callback to request for a Popup to be hidden. */\n // onPopupHide?: () => void;\n /** Callback to request for dialog to be opened. */\n onDialogOpen?: (dialogState: PropertyDialogState) => void;\n}\n\n/** Properties for [[TableNonPrimitiveValueRenderer]] React component\n * @public\n */\nexport interface TableNonPrimitiveValueRendererProps\n extends SharedTableNonPrimitiveValueRendererProps {\n /** Title of the dialog that shows property in more detail. */\n dialogTitle: string;\n /** Contents of the dialog. Should be the property record shown in more detail. */\n dialogContents: React.ReactNode;\n /** Text that will be rendered in the table cell, in other words - Property value */\n buttonLabel: string;\n}\n\n/**\n * A React component that renders non primitive values as a button with text.\n * When clicked, a dialog appears that shows the value in greater detail.\n * @public\n */\nexport class TableNonPrimitiveValueRenderer extends React.PureComponent<TableNonPrimitiveValueRendererProps> {\n // private _buttonRef = React.createRef<HTMLButtonElement>();\n\n private _onClick = () => {\n if (!this.props.onDialogOpen) return;\n\n const dialogState: PropertyDialogState = {\n content: this.props.dialogContents,\n title: this.props.dialogTitle,\n };\n\n this.props.onDialogOpen(dialogState);\n };\n\n // TODO: Enable, when table gets refactored\n // Disabled fancy tooltips, because table controls it's state.\n // But, because everything is in table state and there is no shouldComponentUpdate,\n // tooltips cause rerender of the whole table\n // private _showTooltip = () => {\n // if (!this.props.onPopupShow)\n // return;\n\n // const buttonElement = this._buttonRef.current;\n\n // if (!buttonElement)\n // return;\n\n // const buttonBox = buttonElement.getBoundingClientRect();\n\n // const popupState: PropertyPopupState = {\n // fixedPosition: {\n // top: buttonBox.top - 10,\n // left: buttonBox.left + buttonBox.width / 2,\n // },\n // content:\n // <span className=\"components-table-value-popup\">\n // {`View ${this.props.buttonLabel} in more detail.`}\n // </span>,\n // };\n // this.props.onPopupShow(popupState);\n // }\n\n // private _hideTooltip = () => {\n // if (this.props.onPopupHide)\n // this.props.onPopupHide();\n // }\n\n public override render() {\n return (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <UnderlinedButton\n // ref={this._buttonRef}\n className=\"components-table-value-button\"\n onClick={this._onClick}\n // onMouseEnter={this._showTooltip}\n // onMouseLeave={this._hideTooltip}\n title={`View ${this.props.buttonLabel} in more detail.`}\n >\n {this.props.buttonLabel}\n </UnderlinedButton>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAoBlE;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK,CAAC,SAAqC;IACpF,YAAY,KAAiC;QAC3C,KAAK,CAAC,KAAK,CAAC,CAAC;QAQP,kBAAa,GAAG,CAAC,YAAqB,EAAQ,EAAE;YACtD,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC,CAAC;IATF,CAAC;IAEO,eAAe;QACrB,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB;YAC/B,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAMe,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GACnE,IAAI,CAAC,KAAK,CAAC;QACb,MAAM,gBAAgB,GACpB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI;YACxB,SAAS,EAAE,eAAe,EAAE,yBAAyB;YACnD,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,cAAc;YAC1C,CAAC,CAAC,SAAS,CAAC;QAChB,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CACxB,oBAAC,eAAe,IACd,IAAI,EAAE,QAAQ,CAAC,KAAK,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,SAAS,CAAC,eAAe,GACrC,CACH,CAAC,CAAC,CAAC,CACF,QAAQ,CAAC,KAAK,CACf,CAAC;QACF,OAAO,CACL,oBAAC,eAAe,CAAC,OAAO,IACtB,UAAU,EAAE,QAAQ,CAAC,MAAM,EAC3B,QAAQ,EAAE,IAAI,CAAC,aAAa,EAC5B,IAAI,EAAC,OAAO,KACR,KAAK;YAET,oBAAC,eAAe,CAAC,OAAO,IAAC,KAAK,EAAE,KAAK,GAAI;YACzC,oBAAC,eAAe,CAAC,OAAO,IAAC,SAAS,EAAC,+BAA+B,IAC/D,QAAQ,CAAC,MAAM,IAAI,QAAQ,CACJ,CACF,CAC3B,CAAC;IACJ,CAAC;CACF","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 PropertyGrid\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport { HighlightedText } from \"../../common/HighlightedText.js\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\n\n/**\n * Properties for the [[PropertyCategoryBlock]] React component\n * @public\n */\n// eslint-disable-next-line
|
|
1
|
+
{"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAoBlE;;;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AAC,MAAM,IAAI,QAAQ,CACJ,CACF,CAC3B,CAAC;IACJ,CAAC;CACF","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 PropertyGrid\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport { HighlightedText } from \"../../common/HighlightedText.js\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\n\n/**\n * Properties for the [[PropertyCategoryBlock]] React component\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface PropertyCategoryBlockProps extends CommonProps {\n /** Category of the properties */\n category: PropertyCategory;\n /** Callback to when PropertyCategoryBlock gets expended or collapsed */\n onExpansionToggled?: (categoryName: string) => void;\n /** Properties used for highlighting */\n highlight?: HighlightingComponentProps;\n /** Content */\n children?: React.ReactNode;\n}\n\n/**\n * PropertyCategoryBlock React component\n * @public\n */\nexport class PropertyCategoryBlock extends React.Component<PropertyCategoryBlockProps> {\n constructor(props: PropertyCategoryBlockProps) {\n super(props);\n }\n\n private toggleExpansion() {\n if (this.props.onExpansionToggled)\n this.props.onExpansionToggled(this.props.category.name);\n }\n\n private _handleToggle = (_isExpanding: boolean): void => {\n this.toggleExpansion();\n };\n\n public override render() {\n const { highlight, category, children, onExpansionToggled, ...other } =\n this.props;\n const activeMatchIndex =\n this.props.category.name ===\n highlight?.activeHighlight?.highlightedItemIdentifier\n ? highlight.activeHighlight.highlightIndex\n : undefined;\n const label = highlight ? (\n <HighlightedText\n text={category.label}\n activeMatchIndex={activeMatchIndex}\n searchText={highlight.highlightedText}\n />\n ) : (\n category.label\n );\n return (\n <ExpandableBlock.Wrapper\n isExpanded={category.expand}\n onToggle={this._handleToggle}\n size=\"small\"\n {...other}\n >\n <ExpandableBlock.Trigger label={label} />\n <ExpandableBlock.Content className=\"components-expandable-content\">\n {category.expand && children}\n </ExpandableBlock.Content>\n </ExpandableBlock.Wrapper>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyGridCommons.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAE7F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,mCAAmC;IACnC,cAAc,EAAE,cAAc,CAAC;IAC/B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,mCAAmC;IACnC,cAAc,EAAE,cAAc,CAAC;IAC/B,sDAAsD;IACtD,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC;CACzB;AAED;;;GAGG;AAEH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,iGAAiG;IACjG,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,gDAAgD;IACh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AAmB;WAChB,qBAAqB,CACjC,KAAK,EAAE,MAAM,EACb,oBAAoB,CAAC,EAAE,WAAW,EAClC,kBAAkB,CAAC,EAAE,OAAO,EAC5B,6BAA6B,CAAC,EAAE,MAAM,GACrC,WAAW;IAWd;;;OAGG;WACW,eAAe,CAAC,IAAI,EAAE,MAAM;IAW1C;;;OAGG;IACH,OAAc,QAAQ,UACb,MAAM,KACZ,
|
|
1
|
+
{"version":3,"file":"PropertyGridCommons.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAE7F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,mCAAmC;IACnC,cAAc,EAAE,cAAc,CAAC;IAC/B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,mCAAmC;IACnC,cAAc,EAAE,cAAc,CAAC;IAC/B,sDAAsD;IACtD,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC;CACzB;AAED;;;GAGG;AAEH,MAAM,WAAW,uBAAwB,SA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OAGG;IACH,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;CAChC;AAED,gBAAgB;AAChB,qBAAa,mBAAmB;WAChB,qBAAqB,CACjC,KAAK,EAAE,MAAM,EACb,oBAAoB,CAAC,EAAE,WAAW,EAClC,kBAAkB,CAAC,EAAE,OAAO,EAC5B,6BAA6B,CAAC,EAAE,MAAM,GACrC,WAAW;IAWd;;;OAGG;WACW,eAAe,CAAC,IAAI,EAAE,MAAM;IAW1C;;;OAGG;IACH,OAAc,QAAQ,UACb,MAAM,KACZ,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAMtC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyGridCommons.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAKH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM7D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AA8F1D,gBAAgB;AAChB,MAAM,OAAO,mBAAmB;IACvB,MAAM,CAAC,qBAAqB,CACjC,KAAa,EACb,oBAAkC,EAClC,kBAA4B,EAC5B,6BAAsC;QAEtC,MAAM,WAAW,GAAG,oBAAoB,IAAI,WAAW,CAAC,UAAU,CAAC;QACnE,IAAI,kBAAkB;YAAE,OAAO,WAAW,CAAC;QAE3C,6BAA6B,GAAG,6BAA6B,IAAI,GAAG,CAAC;QACrE,wCAAwC;QACxC,IAAI,KAAK,GAAG,6BAA6B;YAAE,OAAO,WAAW,CAAC,QAAQ,CAAC;QAEvE,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO;QACnC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;YACjC,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;;AAED;;;GAGG;AACW,4BAAQ,GAAG,CACvB,KAAa,EAC0B,EAAE;IACzC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAC1B,CAAC,QAA8C,EAAE,EAAE;QACjD,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC,CAAC","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 PropertyGrid\n */\n\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps.js\";\nimport { matchLinks, openLink } from \"../../common/Links.js\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Arguments for the Property Editing event callback\n * @public\n */\nexport interface PropertyEditingArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** Unique key of currently edited property */\n propertyKey?: string;\n}\n\n/** Arguments for `PropertyGridProps.onPropertyContextMenu` callback\n * @public\n */\nexport interface PropertyGridContextMenuArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** An event which caused the context menu callback */\n event: React.MouseEvent;\n}\n\n/**\n * Common Property Grid Props to be used by Property Grid Variants\n * @public\n */\n// eslint-disable-next-line
|
|
1
|
+
{"version":3,"file":"PropertyGridCommons.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAKH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM7D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AA8F1D,gBAAgB;AAChB,MAAM,OAAO,mBAAmB;IACvB,MAAM,CAAC,qBAAqB,CACjC,KAAa,EACb,oBAAkC,EAClC,kBAA4B,EAC5B,6BAAsC;QAEtC,MAAM,WAAW,GAAG,oBAAoB,IAAI,WAAW,CAAC,UAAU,CAAC;QACnE,IAAI,kBAAkB;YAAE,OAAO,WAAW,CAAC;QAE3C,6BAA6B,GAAG,6BAA6B,IAAI,GAAG,CAAC;QACrE,wCAAwC;QACxC,IAAI,KAAK,GAAG,6BAA6B;YAAE,OAAO,WAAW,CAAC,QAAQ,CAAC;QAEvE,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO;QACnC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;YACjC,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;;AAED;;;GAGG;AACW,4BAAQ,GAAG,CACvB,KAAa,EAC0B,EAAE;IACzC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAC1B,CAAC,QAA8C,EAAE,EAAE;QACjD,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC,CAAC","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 PropertyGrid\n */\n\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps.js\";\nimport { matchLinks, openLink } from \"../../common/Links.js\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Arguments for the Property Editing event callback\n * @public\n */\nexport interface PropertyEditingArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** Unique key of currently edited property */\n propertyKey?: string;\n}\n\n/** Arguments for `PropertyGridProps.onPropertyContextMenu` callback\n * @public\n */\nexport interface PropertyGridContextMenuArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** An event which caused the context menu callback */\n event: React.MouseEvent;\n}\n\n/**\n * Common Property Grid Props to be used by Property Grid Variants\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface CommonPropertyGridProps extends CommonProps {\n /** Grid orientation. When not defined, it is chosen automatically based on width of the grid. */\n orientation?: Orientation;\n\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n\n /** Called to show a context menu when properties are right-clicked */\n onPropertyContextMenu?: (args: PropertyGridContextMenuArgs) => void;\n\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property selection with right click */\n isPropertySelectionOnRightClickEnabled?: boolean;\n /** Callback to property selection */\n onPropertySelectionChanged?: (property: PropertyRecord) => void;\n\n /** Enables/disables property editing */\n isPropertyEditingEnabled?: boolean;\n /** Callback for when properties are being edited */\n onPropertyEditing?: (\n args: PropertyEditingArgs,\n category: PropertyCategory\n ) => void;\n /** Callback for when properties are updated */\n onPropertyUpdated?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => Promise<boolean>;\n\n /** Custom property value renderer manager */\n propertyValueRendererManager?: PropertyValueRendererManager;\n\n /** Indicates whether the orientation is fixed and does not auto-switch to Vertical when the width is too narrow. Defaults to false. */\n isOrientationFixed?: boolean;\n /** The minimum width before the auto-switch to Vertical when the width is too narrow. Defaults to 300. */\n horizontalOrientationMinWidth?: number;\n\n /** Minimum allowed label column width, after which resizing stops */\n minLabelWidth?: number;\n /** Minimum allowed value column width, after which resizing stops */\n minValueWidth?: number;\n /** Fixed action button column width */\n actionButtonWidth?: number;\n\n /**\n * Array of action button renderers. Each renderer is called for each property and can decide\n * to render an action button for the property or not.\n */\n actionButtonRenderers?: ActionButtonRenderer[];\n /** Callback to determine which editors should be always visible */\n alwaysShowEditor?: (property: PropertyRecord) => boolean;\n}\n\n/**\n * Properties for highlighting text in property grid.\n * @public\n */\nexport interface PropertyGridContentHighlightProps\n extends HighlightingComponentProps {\n /**\n * Specifies what the highlighting should be applied on - category labels, property labels and / or property values.\n * Defaults to \"nowhere\".\n */\n filteredTypes?: FilteredType[];\n}\n\n/** @internal */\nexport class PropertyGridCommons {\n public static getCurrentOrientation(\n width: number,\n preferredOrientation?: Orientation,\n isOrientationFixed?: boolean,\n horizontalOrientationMinWidth?: number\n ): Orientation {\n const orientation = preferredOrientation ?? Orientation.Horizontal;\n if (isOrientationFixed) return orientation;\n\n horizontalOrientationMinWidth = horizontalOrientationMinWidth ?? 300;\n // Switch to Vertical if width too small\n if (width < horizontalOrientationMinWidth) return Orientation.Vertical;\n\n return orientation;\n }\n\n /**\n * Helper method to handle link clicks\n * @internal\n */\n public static handleLinkClick(text: string) {\n const linksArray = matchLinks(text);\n if (linksArray.length <= 0) return;\n const foundLink = linksArray[0];\n if (!foundLink || !foundLink.url) {\n return;\n }\n\n openLink(foundLink.url);\n }\n\n /**\n * A helper method to get links from string.\n * @internal\n */\n public static getLinks = (\n value: string\n ): Array<{ start: number; end: number }> => {\n return matchLinks(value).map(\n (linkInfo: { index: number; lastIndex: number }) => {\n return { start: linkInfo.index, end: linkInfo.lastIndex };\n }\n );\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyList.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyList.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAkD1D;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,gBAAkC,EAClC,cAA8B;IAE9B,OAAO,gBAAgB,CAAC,IAAI,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,SAA4B;IAClE,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAGP,aAAQ,GAA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Ac,CAAC,KAAK,CAAC,WAAW;oBAChC,mBAAmB,CAAC,SAAS;oBAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB;oBAC9B,CAAC,CAAC,SAAS,EAEf,YAAY,EACV,cAAc,CAAC,KAAK,CAAC,WAAW;oBAChC,mBAAmB,CAAC,SAAS;oBAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB;oBACnC,CAAC,CAAC,SAAS,EAEf,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAC/C,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,EAChD,4BAA4B,EAC1B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EAEzC,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAChD,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,yBAAyB,EAAE,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAC/D,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GACjC,CACH,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;IACJ,CAAC;CACF","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 PropertyGrid\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport { PropertyRenderer } from \"../../properties/renderers/PropertyRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties of [[PropertyList]] React component\n * @public\n */\n// eslint-disable-next-line
|
|
1
|
+
{"version":3,"file":"PropertyList.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyList.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAkD1D;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,gBAAkC,EAClC,cAA8B;IAE9B,OAAO,gBAAgB,CAAC,IAAI,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,SAA4B;IAClE,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAGP,aAAQ,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QAE7C,kBAAa,GAAG,CAAC,IAAyB,EAAE,EAAE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AI,CAAC,KAAK,CAAC,iBAAiB;oBAC9B,CAAC,CAAC,SAAS,EAEf,YAAY,EACV,cAAc,CAAC,KAAK,CAAC,WAAW;oBAChC,mBAAmB,CAAC,SAAS;oBAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB;oBACnC,CAAC,CAAC,SAAS,EAEf,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAC/C,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,EAChD,4BAA4B,EAC1B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EAEzC,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAChD,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,yBAAyB,EAAE,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAC/D,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GACjC,CACH,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;IACJ,CAAC;CACF","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 PropertyGrid\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport { PropertyRenderer } from \"../../properties/renderers/PropertyRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties of [[PropertyList]] React component\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface PropertyListProps extends CommonProps {\n orientation: Orientation;\n width: number;\n category?: PropertyCategory;\n properties: PropertyRecord[];\n selectedPropertyKey?: string;\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => void;\n columnRatio?: number;\n /** Callback to column ratio changed event */\n onColumnChanged?: (ratio: number) => void | {\n ratio: number;\n };\n propertyValueRendererManager?: PropertyValueRendererManager;\n editingPropertyKey?: string;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n onEditCancel?: () => void;\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property right click selection */\n isPropertyRightClickSelectionEnabled?: boolean;\n /** Array of action button renderers */\n actionButtonRenderers?: ActionButtonRenderer[];\n /** Is resize handle hovered */\n isResizeHandleHovered?: boolean;\n /** Callback to hover event change */\n onResizeHandleHoverChanged?: (isHovered: boolean) => void;\n /** Is resize handle being dragged */\n isResizeHandleBeingDragged?: boolean;\n /** Callback to drag event change */\n onResizeHandleDragChanged?: (isDragStarted: boolean) => void;\n /** Information for styling property grid columns */\n columnInfo?: PropertyGridColumnInfo;\n}\n\n/**\n * Get unique key for property record\n * @internal\n */\nexport function getPropertyKey(\n propertyCategory: PropertyCategory,\n propertyRecord: PropertyRecord\n) {\n return propertyCategory.name + propertyRecord.property.name;\n}\n\n/** A React component that renders multiple properties within a category as a list.\n * @public\n */\nexport class PropertyList extends React.Component<PropertyListProps> {\n constructor(props: PropertyListProps) {\n super(props);\n }\n\n private _listRef = React.createRef<HTMLDivElement>();\n\n private _onEditCommit = (args: PropertyUpdatedArgs) => {\n if (this.props.onEditCommit && this.props.category)\n this.props.onEditCommit(args, this.props.category);\n };\n\n public override render() {\n const propertyListClassName = classnames(\n this.props.orientation === Orientation.Horizontal\n ? \"components-property-list--horizontal\"\n : \"components-property-list--vertical\",\n this.props.className\n );\n\n return (\n <div\n className={propertyListClassName}\n style={this.props.style}\n ref={this._listRef}\n >\n {this.props.properties.map((propertyRecord: PropertyRecord) => {\n const key = this.props.category\n ? getPropertyKey(this.props.category, propertyRecord)\n : propertyRecord.property.name;\n return (\n <PropertyRenderer\n key={key}\n uniqueKey={key}\n isHoverable={this.props.isPropertyHoverEnabled}\n isSelectable={this.props.isPropertySelectionEnabled}\n isSelected={key === this.props.selectedPropertyKey}\n propertyRecord={propertyRecord}\n orientation={this.props.orientation}\n onClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyClicked\n : undefined\n }\n onRightClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyRightClicked\n : undefined\n }\n onContextMenu={this.props.onPropertyContextMenu}\n columnRatio={this.props.columnRatio}\n onColumnRatioChanged={this.props.onColumnChanged}\n propertyValueRendererManager={\n this.props.propertyValueRendererManager\n }\n isEditing={key === this.props.editingPropertyKey}\n onEditCommit={this._onEditCommit}\n onEditCancel={this.props.onEditCancel}\n width={this.props.width}\n actionButtonRenderers={this.props.actionButtonRenderers}\n isResizeHandleHovered={this.props.isResizeHandleHovered}\n onResizeHandleHoverChanged={this.props.onResizeHandleHoverChanged}\n isResizeHandleBeingDragged={this.props.isResizeHandleBeingDragged}\n onResizeHandleDragChanged={this.props.onResizeHandleDragChanged}\n columnInfo={this.props.columnInfo}\n />\n );\n })}\n </div>\n );\n }\n}\n"]}
|
|
@@ -99,6 +99,7 @@ export interface VirtualizedPropertyGridContext {
|
|
|
99
99
|
export declare class VirtualizedPropertyGrid extends React.Component<VirtualizedPropertyGridProps, VirtualizedPropertyGridState> {
|
|
100
100
|
private _listRef;
|
|
101
101
|
constructor(props: VirtualizedPropertyGridProps);
|
|
102
|
+
/** @internal */
|
|
102
103
|
componentDidUpdate(prevProps: VirtualizedPropertyGridProps): void;
|
|
103
104
|
/** @internal */
|
|
104
105
|
static getDerivedStateFromProps(props: VirtualizedPropertyGridProps, state: VirtualizedPropertyGridState): VirtualizedPropertyGridState | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedPropertyGrid.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAE7F,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,wCAAwC,CAAC;AAMhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC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E,MAAM,CAAC;KACf,CAAC;IACF,yBAAyB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,0BAA0B,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAExD,SAAS,CAAC,EAAE,iCAAiC,CAAC;CAC/C;AAeD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAC1D,4BAA4B,EAC5B,4BAA4B,CAC7B;IACC,OAAO,CAAC,QAAQ,CAAuC;gBAE3C,KAAK,EAAE,4BAA4B;IAgB/
|
|
1
|
+
{"version":3,"file":"VirtualizedPropertyGrid.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAE7F,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,wCAAwC,CAAC;AAMhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EACV,uBAAuB,EACvB,iCAAiC,EAClC,MAAM,0BAA0B,C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;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAC1D,4BAA4B,EAC5B,4BAA4B,CAC7B;IACC,OAAO,CAAC,QAAQ,CAAuC;gBAE3C,KAAK,EAAE,4BAA4B;IAgB/C,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,4BAA4B;IAyC1E,gBAAgB;WACF,wBAAwB,CACpC,KAAK,EAAE,4BAA4B,EACnC,KAAK,EAAE,4BAA4B,GAClC,4BAA4B,GAAG,IAAI;IAOtC,OAAO,CAAC,iBAAiB;IAgBzB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAuB3B,OAAO,CAAC,uBAAuB,CAqB7B;IAEF,OAAO,CAAC,2BAA2B,CAGjC;IAEF,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,WAAW,CAGjB;IAEF,OAAO,CAAC,gBAAgB,CAQtB;IAEc,MAAM;CA6GvB;AAoCD;;;;GAIG;AACH,wBAAgB,uCAAuC,CAAC,CAAC,SAAS,OAAO;;;;EAExE"}
|
|
@@ -73,6 +73,7 @@ export class VirtualizedPropertyGrid extends React.Component {
|
|
|
73
73
|
dynamicNodeHeights: new Map(),
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
+
/** @internal */
|
|
76
77
|
componentDidUpdate(prevProps) {
|
|
77
78
|
if (this.props.orientation !== prevProps.orientation ||
|
|
78
79
|
this.props.isOrientationFixed !== prevProps.isOrientationFixed ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedPropertyGrid.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AACH,OAAO,gCAAgC,CAAC;AACxC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,cA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E,CACb,CACF,CACF,CACP,CAAC;AACJ,CAAC,EACD,QAAQ,CACT,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AASlD,MAAM,qBAAqB,GAAyC,CAAC,KAAK,EAAE,EAAE;IAC5E,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE;QACzB,MAAM,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;QAChC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;QACpE,eAAe,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC;IAErD,OAAO,6BAAK,GAAG,EAAE,MAAM,IAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAO,CAAC;AAC9E,CAAC,CAAC","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\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport \"./VirtualizedPropertyGrid.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type {\n ListChildComponentProps,\n VariableSizeListProps,\n} from \"react-window\";\nimport { areEqual, VariableSizeList } from \"react-window\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { createContextWithMandatoryProvider } from \"../../common/UseContextWithMandatoryProvider.js\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase.js\";\nimport type {\n FlatGridItem,\n GridCategoryItem,\n} from \"../internal/flat-items/FlatGridItem.js\";\nimport { MutableCategorizedPrimitiveProperty } from \"../internal/flat-items/MutableCategorizedPrimitiveProperty.js\";\nimport { MutableCustomGridCategory } from \"../internal/flat-items/MutableCustomGridCategory.js\";\nimport { FlatGridItemType } from \"../internal/flat-items/MutableFlatGridItem.js\";\nimport { MutableGridCategory } from \"../internal/flat-items/MutableGridCategory.js\";\nimport { FlatPropertyRenderer } from \"../internal/flat-properties/FlatPropertyRenderer.js\";\nimport type { IPropertyGridEventHandler } from \"../internal/PropertyGridEventHandler.js\";\nimport type { IPropertyGridModel } from \"../internal/PropertyGridModel.js\";\nimport type { PropertyCategoryRendererProps } from \"../PropertyCategoryRendererManager.js\";\nimport { PropertyCategoryRendererManager } from \"../PropertyCategoryRendererManager.js\";\nimport type {\n IPropertyDataProvider,\n PropertyCategory,\n} from \"../PropertyDataProvider.js\";\nimport { ColumnResizingPropertyListPropsSupplier } from \"./ColumnResizingPropertyListPropsSupplier.js\";\nimport { FlatItemNestedBorderWrapper } from \"./FlatItemNestedBorderWrapper.js\";\nimport { PropertyCategoryBlock } from \"./PropertyCategoryBlock.js\";\nimport type {\n CommonPropertyGridProps,\n PropertyGridContentHighlightProps,\n} from \"./PropertyGridCommons.js\";\nimport { PropertyGridCommons } from \"./PropertyGridCommons.js\";\nimport { PropertyGridEventsRelatedPropsSupplier } from \"./PropertyGridEventsRelatedPropsSupplier.js\";\nimport { useElementsScrollStorage } from \"../../common/UseElementsScrollStorage.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties for [[VirtualizedPropertyGrid]] React component\n * @public\n */\nexport interface VirtualizedPropertyGridProps extends CommonPropertyGridProps {\n /** Property grid view model that defines what needs to be rendered */\n model: IPropertyGridModel;\n /** Handler of the events raised from the property grid */\n eventHandler: IPropertyGridEventHandler;\n /** Property data provider used by the property grid */\n dataProvider: IPropertyDataProvider;\n /** Properties for highlighting property data in the grid. */\n highlight?: PropertyGridContentHighlightProps;\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n /** Width of the property grid component. */\n width: number;\n /** Height of the property grid component. */\n height: number;\n}\n\n/** State of [[VirtualizedPropertyGrid]] React component\n * @internal\n */\ninterface VirtualizedPropertyGridState {\n /** List of PropertyGrid categories */\n gridItems: FlatGridItem[];\n /** Actual orientation used by the property grid */\n orientation: Orientation;\n /** Keeps record of dynamic node heights */\n dynamicNodeHeights: Map<string, number>;\n}\n\n/**\n * Context of [[VirtualizedPropertyGrid]] component.\n * @internal\n */\nexport interface PropertyGridInternalContext {\n gridItems: FlatGridItem[];\n gridEventHandler: IPropertyGridEventHandler;\n gridModel: IPropertyGridModel;\n\n style?: React.CSSProperties;\n className?: string;\n gridContext: VirtualizedPropertyGridContext;\n onItemHeightChanged: (index: number, key: string, height: number) => void;\n}\n\n/**\n * Context of the surrounding [VirtualizedPropertyGrid]($components-react) component.\n * @public\n */\nexport interface VirtualizedPropertyGridContext {\n orientation: Orientation;\n gridWidth: number;\n\n isPropertyHoverEnabled: boolean;\n isPropertySelectionEnabled: boolean;\n selectedPropertyKey?: string;\n isPropertyEditingEnabled?: boolean;\n\n alwaysShowEditor?: (property: PropertyRecord) => boolean;\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => void;\n\n editingPropertyKey?: string;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n onEditCancel?: () => void;\n\n eventHandler: IPropertyGridEventHandler;\n dataProvider: IPropertyDataProvider;\n\n actionButtonRenderers?: ActionButtonRenderer[];\n propertyValueRendererManager?: PropertyValueRendererManager;\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n\n columnRatio: number;\n columnInfo: PropertyGridColumnInfo;\n isResizeHandleBeingDragged: boolean;\n isResizeHandleHovered: boolean;\n onColumnRatioChanged: (ratio: number) => void | {\n ratio: number;\n };\n onResizeHandleDragChanged: (newValue: boolean) => void;\n onResizeHandleHoverChanged: (newValue: boolean) => void;\n\n highlight?: PropertyGridContentHighlightProps;\n}\n\nconst [\n PropertyGridInternalContextProvider,\n _PropertyGridInternalContextConsumer,\n usePropertyGridInternalContext,\n] = createContextWithMandatoryProvider<PropertyGridInternalContext>(\n \"PropertyGridInternalContext\"\n);\n\nconst ACTION_BUTTON_DEFAULT_WIDTH = 90;\nconst CATEGORY_HEADER_HEIGHT = 42;\nconst CATEGORY_PROPERTY_HEIGHT = 28;\nconst VERTICAL_CATEGORY_PROPERTY_HEIGHT = 48;\n\n/**\n * VirtualizedPropertyGrid React component.\n * @public\n */\nexport class VirtualizedPropertyGrid extends React.Component<\n VirtualizedPropertyGridProps,\n VirtualizedPropertyGridState\n> {\n private _listRef = React.createRef<VariableSizeList>();\n\n constructor(props: VirtualizedPropertyGridProps) {\n super(props);\n this.state = {\n gridItems: [],\n orientation:\n props.orientation ??\n PropertyGridCommons.getCurrentOrientation(\n props.width,\n undefined,\n props.isOrientationFixed,\n props.horizontalOrientationMinWidth\n ),\n dynamicNodeHeights: new Map(),\n };\n }\n\n public override componentDidUpdate(prevProps: VirtualizedPropertyGridProps) {\n if (\n this.props.orientation !== prevProps.orientation ||\n this.props.isOrientationFixed !== prevProps.isOrientationFixed ||\n this.props.horizontalOrientationMinWidth !==\n prevProps.horizontalOrientationMinWidth ||\n this.props.width !== prevProps.width\n )\n this.updateOrientation(this.props.width);\n\n if (this.props.model !== prevProps.model) {\n if (this._listRef.current) this._listRef.current.resetAfterIndex(0);\n }\n\n if (\n this.props.highlight !== prevProps.highlight &&\n this.props.highlight?.activeHighlight &&\n this.state.gridItems.length !== 0\n ) {\n let index = 0;\n let foundMatchingItem = false;\n for (const item of this.state.gridItems) {\n if (\n (item instanceof MutableCategorizedPrimitiveProperty &&\n this.props.highlight.activeHighlight.highlightedItemIdentifier ===\n item.derivedRecord.property.name) ||\n (item instanceof MutableGridCategory &&\n this.props.highlight.activeHighlight.highlightedItemIdentifier ===\n item.name)\n ) {\n foundMatchingItem = true;\n break;\n }\n index++;\n }\n if (foundMatchingItem) {\n if (this._listRef.current) this._listRef.current.scrollToItem(index);\n }\n }\n }\n\n /** @internal */\n public static getDerivedStateFromProps(\n props: VirtualizedPropertyGridProps,\n state: VirtualizedPropertyGridState\n ): VirtualizedPropertyGridState | null {\n return {\n ...state,\n gridItems: props.model.getVisibleFlatGrid(),\n };\n }\n\n private updateOrientation(width: number) {\n const { orientation, isOrientationFixed, horizontalOrientationMinWidth } = {\n ...this.props,\n };\n const currentOrientation = PropertyGridCommons.getCurrentOrientation(\n width,\n orientation,\n isOrientationFixed,\n horizontalOrientationMinWidth\n );\n\n if (currentOrientation !== this.state.orientation) {\n this.setState({ orientation: currentOrientation });\n }\n }\n\n /**\n * Calculate given node height depending on it's type, position in category, parent category depth and current orientation.\n * @param node FlatGridItem node for which to calculate height\n * @returns current height of node.\n */\n private calculateNodeHeight(node: FlatGridItem) {\n return getPropertyHeight(this.state);\n\n function getPropertyHeight(state: VirtualizedPropertyGridState) {\n const dynamicHeight = state.dynamicNodeHeights.get(node.key);\n if (dynamicHeight !== undefined) {\n if (node instanceof MutableCustomGridCategory) {\n return CATEGORY_HEADER_HEIGHT + (node.isExpanded ? dynamicHeight : 0);\n }\n\n return dynamicHeight;\n }\n\n if (node.type === FlatGridItemType.Category) {\n return CATEGORY_HEADER_HEIGHT;\n }\n\n return state.orientation === Orientation.Vertical\n ? VERTICAL_CATEGORY_PROPERTY_HEIGHT\n : CATEGORY_PROPERTY_HEIGHT;\n }\n }\n\n private _handleNodeHeightChange = (\n index: number,\n key: string,\n newHeight: number\n ) => {\n if (this.state.dynamicNodeHeights.get(key) === newHeight) {\n return;\n }\n\n this.setState(\n (state) => {\n return {\n ...state,\n dynamicNodeHeights: new Map(state.dynamicNodeHeights).set(\n key,\n newHeight\n ),\n };\n },\n () => this._listRef.current!.resetAfterIndex(index)\n );\n };\n\n private _calculateNodeHeightByIndex = (index: number) => {\n const node = this.state.gridItems[index];\n return this.calculateNodeHeight(node);\n };\n\n private calculateEstimatedHeight() {\n let sum = 0;\n for (const node of this.state.gridItems)\n sum += this.calculateNodeHeight(node);\n\n return Math.ceil(sum / this.state.gridItems.length);\n }\n\n private _getNodeKey = (index: number) => {\n const node = this.state.gridItems[index];\n return node.key;\n };\n\n private _getMaxItemDepth = () => {\n let depth = 0;\n for (const item of this.state.gridItems) {\n if (depth < item.depth) {\n depth = item.depth;\n }\n }\n return depth + 1;\n };\n\n public override render() {\n const defaultActionButtonWidth =\n (this.props.actionButtonRenderers?.length ?? 0) > 0\n ? ACTION_BUTTON_DEFAULT_WIDTH\n : undefined;\n\n return (\n <ColumnResizingPropertyListPropsSupplier\n orientation={this.state.orientation}\n width={this.props.width}\n minLabelWidth={this.props.minLabelWidth}\n minValueWidth={this.props.minValueWidth}\n actionButtonWidth={\n this.props.actionButtonWidth !== undefined\n ? this.props.actionButtonWidth\n : defaultActionButtonWidth\n }\n maxPropertyDepth={this._getMaxItemDepth()}\n >\n {(columnResizeContext) => (\n <PropertyGridEventsRelatedPropsSupplier\n isPropertySelectionEnabled={\n this.props.isPropertySelectionEnabled ?? false\n }\n isPropertySelectionOnRightClickEnabled={\n this.props.isPropertySelectionOnRightClickEnabled\n }\n isPropertyEditingEnabled={this.props.isPropertyEditingEnabled}\n onPropertyContextMenu={this.props.onPropertyContextMenu}\n onPropertyUpdated={this.props.onPropertyUpdated}\n onPropertySelectionChanged={this.props.onPropertySelectionChanged}\n isPropertyHoverEnabled={this.props.isPropertyHoverEnabled ?? false}\n >\n {(selectionContext) => {\n const gridContext: VirtualizedPropertyGridContext = {\n orientation: columnResizeContext.orientation,\n gridWidth: this.props.width,\n\n isPropertyHoverEnabled: selectionContext.isPropertyHoverEnabled,\n isPropertySelectionEnabled:\n selectionContext.isPropertySelectionEnabled,\n selectedPropertyKey: selectionContext.selectedPropertyKey,\n isPropertyEditingEnabled: this.props.isPropertyEditingEnabled,\n\n alwaysShowEditor: this.props.alwaysShowEditor,\n onPropertyClicked: selectionContext.onPropertyClicked,\n onPropertyRightClicked: selectionContext.onPropertyRightClicked,\n onPropertyContextMenu: selectionContext.onPropertyContextMenu,\n\n editingPropertyKey: selectionContext.editingPropertyKey,\n onEditCommit: selectionContext.onEditCommit,\n onEditCancel: selectionContext.onEditCancel,\n\n eventHandler: this.props.eventHandler,\n dataProvider: this.props.dataProvider,\n\n actionButtonRenderers: this.props.actionButtonRenderers,\n propertyValueRendererManager:\n this.props.propertyValueRendererManager,\n propertyCategoryRendererManager:\n this.props.propertyCategoryRendererManager,\n\n columnRatio: columnResizeContext.columnRatio,\n columnInfo: columnResizeContext.columnInfo,\n isResizeHandleBeingDragged:\n columnResizeContext.isResizeHandleBeingDragged,\n isResizeHandleHovered:\n columnResizeContext.isResizeHandleHovered,\n onColumnRatioChanged: columnResizeContext.onColumnChanged,\n onResizeHandleDragChanged:\n columnResizeContext.onResizeHandleDragChanged,\n onResizeHandleHoverChanged:\n columnResizeContext.onResizeHandleHoverChanged,\n\n highlight: this.props.highlight,\n };\n\n const renderContext: PropertyGridInternalContext = {\n gridItems: this.state.gridItems,\n gridEventHandler: this.props.eventHandler,\n gridModel: this.props.model,\n style: this.props.style,\n className: this.props.className,\n onItemHeightChanged: this._handleNodeHeightChange,\n gridContext,\n };\n\n return (\n <PropertyGridInternalContextProvider value={renderContext}>\n <VirtualizedPropertyGridInternal\n width={this.props.width}\n height={this.props.height}\n itemCount={this.state.gridItems.length}\n itemSize={this._calculateNodeHeightByIndex}\n estimatedItemSize={this.calculateEstimatedHeight()}\n overscanCount={10}\n layout=\"vertical\"\n style={this.props.style}\n itemKey={this._getNodeKey}\n ref={this._listRef}\n />\n </PropertyGridInternalContextProvider>\n );\n }}\n </PropertyGridEventsRelatedPropsSupplier>\n )}\n </ColumnResizingPropertyListPropsSupplier>\n );\n }\n}\n\nconst VirtualizedPropertyGridInternal = React.forwardRef(\n function VirtualizedPropertyGridInternal(\n props: Omit<VariableSizeListProps, \"children\">,\n ref: React.ForwardedRef<VariableSizeList>\n ) {\n const { gridContext } = usePropertyGridInternalContext(FlatGridItemNode);\n\n React.useEffect(() => {\n return gridContext.dataProvider.onDataChanged.addListener(() => {\n gridContext.onEditCancel?.();\n });\n }, [gridContext]);\n\n return (\n <div\n className={classnames(\n \"components-virtualized-property-grid\",\n \"components-smallEditor-host\"\n )}\n >\n <VariableSizeList\n {...props}\n className={classnames(\n \"components-property-grid-wrapper\",\n \"ReactWindow__VariableSizeList\",\n props.className\n )}\n ref={ref}\n >\n {FlatGridItemNode}\n </VariableSizeList>\n </div>\n );\n }\n);\n\n/**\n * Returns callbacks for persisting and restoring [[VirtualizedPropertyGrid]] layout state.\n * Returned `ref` should be set on container containing [[VirtualizedPropertyGrid]].\n * @public\n */\nexport function useVirtualizedPropertyGridLayoutStorage<T extends Element>() {\n return useElementsScrollStorage<T>(\"ReactWindow__VariableSizeList\");\n}\n\nconst FlatGridItemNode = React.memo(\n ({ index, style: virtualizedListStyle }: ListChildComponentProps) => {\n const {\n gridItems,\n gridEventHandler,\n gridModel,\n gridContext,\n className,\n style,\n onItemHeightChanged,\n } = usePropertyGridInternalContext(FlatGridItemNode);\n const node = gridItems[index];\n const divRef = React.useRef<HTMLDivElement>(null);\n const previousHeightRef = React.useRef(0);\n\n const onExpansionToggled = React.useCallback(\n () => gridEventHandler.onExpansionToggled(node.selectionKey),\n [gridEventHandler, node.selectionKey]\n );\n const onHeightChanged = React.useCallback(\n (newHeight: number) => onItemHeightChanged(index, node.key, newHeight),\n [onItemHeightChanged, index, node.key]\n );\n\n const minHeight = React.useMemo(() => {\n if (node.type === FlatGridItemType.Category)\n return CATEGORY_HEADER_HEIGHT;\n\n return gridContext.orientation === Orientation.Vertical\n ? VERTICAL_CATEGORY_PROPERTY_HEIGHT\n : CATEGORY_PROPERTY_HEIGHT;\n }, [gridContext.orientation, node.type]);\n\n React.useLayoutEffect(() => {\n assert(divRef.current !== null);\n const refHeight = divRef.current.getBoundingClientRect().height;\n const currentHeight = Math.max(refHeight, minHeight);\n\n if (currentHeight !== previousHeightRef.current) {\n onHeightChanged(currentHeight);\n previousHeightRef.current = currentHeight;\n }\n });\n\n function getDisplayNode() {\n const lastInNumberOfCategories = node.lastInNumberOfCategories;\n switch (node.type) {\n case FlatGridItemType.Category:\n const categoryRendererManager =\n gridContext.propertyCategoryRendererManager ??\n PropertyCategoryRendererManager.defaultManager;\n const customRenderer =\n categoryRendererManager.getCategoryComponent(node);\n const wrapperClassName = classnames(\n \"virtualized-grid-node-content\",\n customRenderer !== undefined\n ? \"virtualized-grid-node-custom-category\"\n : \"virtualized-grid-node-category\"\n );\n return (\n <FlatItemNestedBorderWrapper\n borderCount={node.depth}\n bottomBorderCount={lastInNumberOfCategories}\n className={wrapperClassName}\n >\n <PropertyCategoryBlock\n className={className}\n style={style}\n category={node.derivedCategory}\n onExpansionToggled={onExpansionToggled}\n highlight={\n gridContext.highlight?.filteredTypes?.includes(\n FilteredType.Category\n )\n ? gridContext.highlight\n : undefined\n }\n >\n {customRenderer !== undefined && (\n <CustomCategoryContent\n renderer={customRenderer}\n categoryItem={node}\n gridContext={gridContext}\n onHeightChanged={onHeightChanged}\n />\n )}\n </PropertyCategoryBlock>\n </FlatItemNestedBorderWrapper>\n );\n case FlatGridItemType.Array:\n case FlatGridItemType.Struct:\n case FlatGridItemType.Primitive:\n const selectionKey = node.selectionKey;\n const parentCategoryItem = gridModel.getItem(\n node.parentCategorySelectionKey\n ) as GridCategoryItem;\n\n return (\n <FlatItemNestedBorderWrapper\n borderCount={parentCategoryItem.depth + 1}\n bottomBorderCount={lastInNumberOfCategories}\n className=\"virtualized-grid-node-content\"\n >\n <FlatPropertyRenderer\n key={node.key}\n uniqueKey={selectionKey}\n propertyRecord={node.derivedRecord}\n orientation={gridContext.orientation}\n indentation={node.depth}\n width={gridContext.gridWidth}\n isHoverable={gridContext.isPropertyHoverEnabled}\n isSelectable={gridContext.isPropertySelectionEnabled}\n isSelected={selectionKey === gridContext.selectedPropertyKey}\n onClick={gridContext.onPropertyClicked}\n onRightClick={gridContext.onPropertyRightClicked}\n onContextMenu={gridContext.onPropertyContextMenu}\n category={parentCategoryItem.derivedCategory}\n isEditing={selectionKey === gridContext.editingPropertyKey}\n isPropertyEditingEnabled={gridContext.isPropertyEditingEnabled}\n alwaysShowEditor={gridContext.alwaysShowEditor}\n onEditCommit={gridContext.onEditCommit}\n onEditCancel={gridContext.onEditCancel}\n isExpanded={node.isExpanded}\n onExpansionToggled={onExpansionToggled}\n onHeightChanged={onHeightChanged}\n actionButtonRenderers={gridContext.actionButtonRenderers}\n propertyValueRendererManager={\n gridContext.propertyValueRendererManager\n }\n columnRatio={gridContext.columnRatio}\n columnInfo={gridContext.columnInfo}\n isResizeHandleBeingDragged={\n gridContext.isResizeHandleBeingDragged\n }\n isResizeHandleHovered={gridContext.isResizeHandleHovered}\n onColumnRatioChanged={gridContext.onColumnRatioChanged}\n onResizeHandleDragChanged={\n gridContext.onResizeHandleDragChanged\n }\n onResizeHandleHoverChanged={\n gridContext.onResizeHandleHoverChanged\n }\n highlight={\n gridContext.highlight\n ? {\n applyOnLabel:\n gridContext.highlight.filteredTypes?.includes(\n FilteredType.Label\n ) ?? false,\n applyOnValue:\n gridContext.highlight.filteredTypes?.includes(\n FilteredType.Value\n ) ?? false,\n ...gridContext.highlight,\n }\n : undefined\n }\n />\n </FlatItemNestedBorderWrapper>\n );\n }\n }\n\n return (\n <div className=\"virtualized-grid-node\" style={virtualizedListStyle}>\n <div\n className=\"virtualized-grid-node-content-wrapper\"\n style={{\n minHeight: `${minHeight}px`,\n display: \"grid\",\n }}\n >\n <div\n ref={divRef}\n className=\"virtualized-grid-node-content-wrapper-item\"\n >\n {getDisplayNode()}\n </div>\n </div>\n </div>\n );\n },\n areEqual\n);\n\nFlatGridItemNode.displayName = \"FlatGridItemNode\";\n\ninterface CustomCategoryContentProps {\n categoryItem: GridCategoryItem;\n renderer: React.ComponentType<PropertyCategoryRendererProps>;\n gridContext: VirtualizedPropertyGridContext;\n onHeightChanged: (newHeight: number) => void;\n}\n\nconst CustomCategoryContent: React.FC<CustomCategoryContentProps> = (props) => {\n const { onHeightChanged } = props;\n const divRef = React.useRef<HTMLDivElement>(null);\n\n React.useLayoutEffect(() => {\n assert(divRef.current !== null);\n const contentHeight = divRef.current.getBoundingClientRect().height;\n onHeightChanged(contentHeight);\n }, [props.gridContext.orientation, onHeightChanged]);\n\n return <div ref={divRef}>{React.createElement(props.renderer, props)}</div>;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"VirtualizedPropertyGrid.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AACH,OAAO,gCAAgC,CAAC;AACxC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kCAAkC,EAAE,MAAM,iDAAiD,CAAC;AAKrG,OAAO,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC;AAKtF,OAAO,EAAE,mCAAmC,EAAE,MAAM,+DAA+D,CAAC;AACpH,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+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AAK,IAAI,CAAC,CAAC;QAChC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;QACpE,eAAe,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC;IAErD,OAAO,6BAAK,GAAG,EAAE,MAAM,IAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAO,CAAC;AAC9E,CAAC,CAAC","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\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport \"./VirtualizedPropertyGrid.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type {\n ListChildComponentProps,\n VariableSizeListProps,\n} from \"react-window\";\nimport { areEqual, VariableSizeList } from \"react-window\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { createContextWithMandatoryProvider } from \"../../common/UseContextWithMandatoryProvider.js\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase.js\";\nimport type {\n FlatGridItem,\n GridCategoryItem,\n} from \"../internal/flat-items/FlatGridItem.js\";\nimport { MutableCategorizedPrimitiveProperty } from \"../internal/flat-items/MutableCategorizedPrimitiveProperty.js\";\nimport { MutableCustomGridCategory } from \"../internal/flat-items/MutableCustomGridCategory.js\";\nimport { FlatGridItemType } from \"../internal/flat-items/MutableFlatGridItem.js\";\nimport { MutableGridCategory } from \"../internal/flat-items/MutableGridCategory.js\";\nimport { FlatPropertyRenderer } from \"../internal/flat-properties/FlatPropertyRenderer.js\";\nimport type { IPropertyGridEventHandler } from \"../internal/PropertyGridEventHandler.js\";\nimport type { IPropertyGridModel } from \"../internal/PropertyGridModel.js\";\nimport type { PropertyCategoryRendererProps } from \"../PropertyCategoryRendererManager.js\";\nimport { PropertyCategoryRendererManager } from \"../PropertyCategoryRendererManager.js\";\nimport type {\n IPropertyDataProvider,\n PropertyCategory,\n} from \"../PropertyDataProvider.js\";\nimport { ColumnResizingPropertyListPropsSupplier } from \"./ColumnResizingPropertyListPropsSupplier.js\";\nimport { FlatItemNestedBorderWrapper } from \"./FlatItemNestedBorderWrapper.js\";\nimport { PropertyCategoryBlock } from \"./PropertyCategoryBlock.js\";\nimport type {\n CommonPropertyGridProps,\n PropertyGridContentHighlightProps,\n} from \"./PropertyGridCommons.js\";\nimport { PropertyGridCommons } from \"./PropertyGridCommons.js\";\nimport { PropertyGridEventsRelatedPropsSupplier } from \"./PropertyGridEventsRelatedPropsSupplier.js\";\nimport { useElementsScrollStorage } from \"../../common/UseElementsScrollStorage.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties for [[VirtualizedPropertyGrid]] React component\n * @public\n */\nexport interface VirtualizedPropertyGridProps extends CommonPropertyGridProps {\n /** Property grid view model that defines what needs to be rendered */\n model: IPropertyGridModel;\n /** Handler of the events raised from the property grid */\n eventHandler: IPropertyGridEventHandler;\n /** Property data provider used by the property grid */\n dataProvider: IPropertyDataProvider;\n /** Properties for highlighting property data in the grid. */\n highlight?: PropertyGridContentHighlightProps;\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n /** Width of the property grid component. */\n width: number;\n /** Height of the property grid component. */\n height: number;\n}\n\n/** State of [[VirtualizedPropertyGrid]] React component\n * @internal\n */\ninterface VirtualizedPropertyGridState {\n /** List of PropertyGrid categories */\n gridItems: FlatGridItem[];\n /** Actual orientation used by the property grid */\n orientation: Orientation;\n /** Keeps record of dynamic node heights */\n dynamicNodeHeights: Map<string, number>;\n}\n\n/**\n * Context of [[VirtualizedPropertyGrid]] component.\n * @internal\n */\nexport interface PropertyGridInternalContext {\n gridItems: FlatGridItem[];\n gridEventHandler: IPropertyGridEventHandler;\n gridModel: IPropertyGridModel;\n\n style?: React.CSSProperties;\n className?: string;\n gridContext: VirtualizedPropertyGridContext;\n onItemHeightChanged: (index: number, key: string, height: number) => void;\n}\n\n/**\n * Context of the surrounding [VirtualizedPropertyGrid]($components-react) component.\n * @public\n */\nexport interface VirtualizedPropertyGridContext {\n orientation: Orientation;\n gridWidth: number;\n\n isPropertyHoverEnabled: boolean;\n isPropertySelectionEnabled: boolean;\n selectedPropertyKey?: string;\n isPropertyEditingEnabled?: boolean;\n\n alwaysShowEditor?: (property: PropertyRecord) => boolean;\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => void;\n\n editingPropertyKey?: string;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n onEditCancel?: () => void;\n\n eventHandler: IPropertyGridEventHandler;\n dataProvider: IPropertyDataProvider;\n\n actionButtonRenderers?: ActionButtonRenderer[];\n propertyValueRendererManager?: PropertyValueRendererManager;\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n\n columnRatio: number;\n columnInfo: PropertyGridColumnInfo;\n isResizeHandleBeingDragged: boolean;\n isResizeHandleHovered: boolean;\n onColumnRatioChanged: (ratio: number) => void | {\n ratio: number;\n };\n onResizeHandleDragChanged: (newValue: boolean) => void;\n onResizeHandleHoverChanged: (newValue: boolean) => void;\n\n highlight?: PropertyGridContentHighlightProps;\n}\n\nconst [\n PropertyGridInternalContextProvider,\n _PropertyGridInternalContextConsumer,\n usePropertyGridInternalContext,\n] = createContextWithMandatoryProvider<PropertyGridInternalContext>(\n \"PropertyGridInternalContext\"\n);\n\nconst ACTION_BUTTON_DEFAULT_WIDTH = 90;\nconst CATEGORY_HEADER_HEIGHT = 42;\nconst CATEGORY_PROPERTY_HEIGHT = 28;\nconst VERTICAL_CATEGORY_PROPERTY_HEIGHT = 48;\n\n/**\n * VirtualizedPropertyGrid React component.\n * @public\n */\nexport class VirtualizedPropertyGrid extends React.Component<\n VirtualizedPropertyGridProps,\n VirtualizedPropertyGridState\n> {\n private _listRef = React.createRef<VariableSizeList>();\n\n constructor(props: VirtualizedPropertyGridProps) {\n super(props);\n this.state = {\n gridItems: [],\n orientation:\n props.orientation ??\n PropertyGridCommons.getCurrentOrientation(\n props.width,\n undefined,\n props.isOrientationFixed,\n props.horizontalOrientationMinWidth\n ),\n dynamicNodeHeights: new Map(),\n };\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: VirtualizedPropertyGridProps) {\n if (\n this.props.orientation !== prevProps.orientation ||\n this.props.isOrientationFixed !== prevProps.isOrientationFixed ||\n this.props.horizontalOrientationMinWidth !==\n prevProps.horizontalOrientationMinWidth ||\n this.props.width !== prevProps.width\n )\n this.updateOrientation(this.props.width);\n\n if (this.props.model !== prevProps.model) {\n if (this._listRef.current) this._listRef.current.resetAfterIndex(0);\n }\n\n if (\n this.props.highlight !== prevProps.highlight &&\n this.props.highlight?.activeHighlight &&\n this.state.gridItems.length !== 0\n ) {\n let index = 0;\n let foundMatchingItem = false;\n for (const item of this.state.gridItems) {\n if (\n (item instanceof MutableCategorizedPrimitiveProperty &&\n this.props.highlight.activeHighlight.highlightedItemIdentifier ===\n item.derivedRecord.property.name) ||\n (item instanceof MutableGridCategory &&\n this.props.highlight.activeHighlight.highlightedItemIdentifier ===\n item.name)\n ) {\n foundMatchingItem = true;\n break;\n }\n index++;\n }\n if (foundMatchingItem) {\n if (this._listRef.current) this._listRef.current.scrollToItem(index);\n }\n }\n }\n\n /** @internal */\n public static getDerivedStateFromProps(\n props: VirtualizedPropertyGridProps,\n state: VirtualizedPropertyGridState\n ): VirtualizedPropertyGridState | null {\n return {\n ...state,\n gridItems: props.model.getVisibleFlatGrid(),\n };\n }\n\n private updateOrientation(width: number) {\n const { orientation, isOrientationFixed, horizontalOrientationMinWidth } = {\n ...this.props,\n };\n const currentOrientation = PropertyGridCommons.getCurrentOrientation(\n width,\n orientation,\n isOrientationFixed,\n horizontalOrientationMinWidth\n );\n\n if (currentOrientation !== this.state.orientation) {\n this.setState({ orientation: currentOrientation });\n }\n }\n\n /**\n * Calculate given node height depending on it's type, position in category, parent category depth and current orientation.\n * @param node FlatGridItem node for which to calculate height\n * @returns current height of node.\n */\n private calculateNodeHeight(node: FlatGridItem) {\n return getPropertyHeight(this.state);\n\n function getPropertyHeight(state: VirtualizedPropertyGridState) {\n const dynamicHeight = state.dynamicNodeHeights.get(node.key);\n if (dynamicHeight !== undefined) {\n if (node instanceof MutableCustomGridCategory) {\n return CATEGORY_HEADER_HEIGHT + (node.isExpanded ? dynamicHeight : 0);\n }\n\n return dynamicHeight;\n }\n\n if (node.type === FlatGridItemType.Category) {\n return CATEGORY_HEADER_HEIGHT;\n }\n\n return state.orientation === Orientation.Vertical\n ? VERTICAL_CATEGORY_PROPERTY_HEIGHT\n : CATEGORY_PROPERTY_HEIGHT;\n }\n }\n\n private _handleNodeHeightChange = (\n index: number,\n key: string,\n newHeight: number\n ) => {\n if (this.state.dynamicNodeHeights.get(key) === newHeight) {\n return;\n }\n\n this.setState(\n (state) => {\n return {\n ...state,\n dynamicNodeHeights: new Map(state.dynamicNodeHeights).set(\n key,\n newHeight\n ),\n };\n },\n () => this._listRef.current!.resetAfterIndex(index)\n );\n };\n\n private _calculateNodeHeightByIndex = (index: number) => {\n const node = this.state.gridItems[index];\n return this.calculateNodeHeight(node);\n };\n\n private calculateEstimatedHeight() {\n let sum = 0;\n for (const node of this.state.gridItems)\n sum += this.calculateNodeHeight(node);\n\n return Math.ceil(sum / this.state.gridItems.length);\n }\n\n private _getNodeKey = (index: number) => {\n const node = this.state.gridItems[index];\n return node.key;\n };\n\n private _getMaxItemDepth = () => {\n let depth = 0;\n for (const item of this.state.gridItems) {\n if (depth < item.depth) {\n depth = item.depth;\n }\n }\n return depth + 1;\n };\n\n public override render() {\n const defaultActionButtonWidth =\n (this.props.actionButtonRenderers?.length ?? 0) > 0\n ? ACTION_BUTTON_DEFAULT_WIDTH\n : undefined;\n\n return (\n <ColumnResizingPropertyListPropsSupplier\n orientation={this.state.orientation}\n width={this.props.width}\n minLabelWidth={this.props.minLabelWidth}\n minValueWidth={this.props.minValueWidth}\n actionButtonWidth={\n this.props.actionButtonWidth !== undefined\n ? this.props.actionButtonWidth\n : defaultActionButtonWidth\n }\n maxPropertyDepth={this._getMaxItemDepth()}\n >\n {(columnResizeContext) => (\n <PropertyGridEventsRelatedPropsSupplier\n isPropertySelectionEnabled={\n this.props.isPropertySelectionEnabled ?? false\n }\n isPropertySelectionOnRightClickEnabled={\n this.props.isPropertySelectionOnRightClickEnabled\n }\n isPropertyEditingEnabled={this.props.isPropertyEditingEnabled}\n onPropertyContextMenu={this.props.onPropertyContextMenu}\n onPropertyUpdated={this.props.onPropertyUpdated}\n onPropertySelectionChanged={this.props.onPropertySelectionChanged}\n isPropertyHoverEnabled={this.props.isPropertyHoverEnabled ?? false}\n >\n {(selectionContext) => {\n const gridContext: VirtualizedPropertyGridContext = {\n orientation: columnResizeContext.orientation,\n gridWidth: this.props.width,\n\n isPropertyHoverEnabled: selectionContext.isPropertyHoverEnabled,\n isPropertySelectionEnabled:\n selectionContext.isPropertySelectionEnabled,\n selectedPropertyKey: selectionContext.selectedPropertyKey,\n isPropertyEditingEnabled: this.props.isPropertyEditingEnabled,\n\n alwaysShowEditor: this.props.alwaysShowEditor,\n onPropertyClicked: selectionContext.onPropertyClicked,\n onPropertyRightClicked: selectionContext.onPropertyRightClicked,\n onPropertyContextMenu: selectionContext.onPropertyContextMenu,\n\n editingPropertyKey: selectionContext.editingPropertyKey,\n onEditCommit: selectionContext.onEditCommit,\n onEditCancel: selectionContext.onEditCancel,\n\n eventHandler: this.props.eventHandler,\n dataProvider: this.props.dataProvider,\n\n actionButtonRenderers: this.props.actionButtonRenderers,\n propertyValueRendererManager:\n this.props.propertyValueRendererManager,\n propertyCategoryRendererManager:\n this.props.propertyCategoryRendererManager,\n\n columnRatio: columnResizeContext.columnRatio,\n columnInfo: columnResizeContext.columnInfo,\n isResizeHandleBeingDragged:\n columnResizeContext.isResizeHandleBeingDragged,\n isResizeHandleHovered:\n columnResizeContext.isResizeHandleHovered,\n onColumnRatioChanged: columnResizeContext.onColumnChanged,\n onResizeHandleDragChanged:\n columnResizeContext.onResizeHandleDragChanged,\n onResizeHandleHoverChanged:\n columnResizeContext.onResizeHandleHoverChanged,\n\n highlight: this.props.highlight,\n };\n\n const renderContext: PropertyGridInternalContext = {\n gridItems: this.state.gridItems,\n gridEventHandler: this.props.eventHandler,\n gridModel: this.props.model,\n style: this.props.style,\n className: this.props.className,\n onItemHeightChanged: this._handleNodeHeightChange,\n gridContext,\n };\n\n return (\n <PropertyGridInternalContextProvider value={renderContext}>\n <VirtualizedPropertyGridInternal\n width={this.props.width}\n height={this.props.height}\n itemCount={this.state.gridItems.length}\n itemSize={this._calculateNodeHeightByIndex}\n estimatedItemSize={this.calculateEstimatedHeight()}\n overscanCount={10}\n layout=\"vertical\"\n style={this.props.style}\n itemKey={this._getNodeKey}\n ref={this._listRef}\n />\n </PropertyGridInternalContextProvider>\n );\n }}\n </PropertyGridEventsRelatedPropsSupplier>\n )}\n </ColumnResizingPropertyListPropsSupplier>\n );\n }\n}\n\nconst VirtualizedPropertyGridInternal = React.forwardRef<\n VariableSizeList,\n Omit<VariableSizeListProps, \"children\">\n>(function VirtualizedPropertyGridInternal(props, ref) {\n const { gridContext } = usePropertyGridInternalContext(FlatGridItemNode);\n\n React.useEffect(() => {\n return gridContext.dataProvider.onDataChanged.addListener(() => {\n gridContext.onEditCancel?.();\n });\n }, [gridContext]);\n\n return (\n <div\n className={classnames(\n \"components-virtualized-property-grid\",\n \"components-smallEditor-host\"\n )}\n >\n <VariableSizeList\n {...props}\n className={classnames(\n \"components-property-grid-wrapper\",\n \"ReactWindow__VariableSizeList\",\n props.className\n )}\n ref={ref}\n >\n {FlatGridItemNode}\n </VariableSizeList>\n </div>\n );\n});\n\n/**\n * Returns callbacks for persisting and restoring [[VirtualizedPropertyGrid]] layout state.\n * Returned `ref` should be set on container containing [[VirtualizedPropertyGrid]].\n * @public\n */\nexport function useVirtualizedPropertyGridLayoutStorage<T extends Element>() {\n return useElementsScrollStorage<T>(\"ReactWindow__VariableSizeList\");\n}\n\nconst FlatGridItemNode = React.memo(\n ({ index, style: virtualizedListStyle }: ListChildComponentProps) => {\n const {\n gridItems,\n gridEventHandler,\n gridModel,\n gridContext,\n className,\n style,\n onItemHeightChanged,\n } = usePropertyGridInternalContext(FlatGridItemNode);\n const node = gridItems[index];\n const divRef = React.useRef<HTMLDivElement>(null);\n const previousHeightRef = React.useRef(0);\n\n const onExpansionToggled = React.useCallback(\n () => gridEventHandler.onExpansionToggled(node.selectionKey),\n [gridEventHandler, node.selectionKey]\n );\n const onHeightChanged = React.useCallback(\n (newHeight: number) => onItemHeightChanged(index, node.key, newHeight),\n [onItemHeightChanged, index, node.key]\n );\n\n const minHeight = React.useMemo(() => {\n if (node.type === FlatGridItemType.Category)\n return CATEGORY_HEADER_HEIGHT;\n\n return gridContext.orientation === Orientation.Vertical\n ? VERTICAL_CATEGORY_PROPERTY_HEIGHT\n : CATEGORY_PROPERTY_HEIGHT;\n }, [gridContext.orientation, node.type]);\n\n React.useLayoutEffect(() => {\n assert(divRef.current !== null);\n const refHeight = divRef.current.getBoundingClientRect().height;\n const currentHeight = Math.max(refHeight, minHeight);\n\n if (currentHeight !== previousHeightRef.current) {\n onHeightChanged(currentHeight);\n previousHeightRef.current = currentHeight;\n }\n });\n\n function getDisplayNode() {\n const lastInNumberOfCategories = node.lastInNumberOfCategories;\n switch (node.type) {\n case FlatGridItemType.Category:\n const categoryRendererManager =\n gridContext.propertyCategoryRendererManager ??\n PropertyCategoryRendererManager.defaultManager;\n const customRenderer =\n categoryRendererManager.getCategoryComponent(node);\n const wrapperClassName = classnames(\n \"virtualized-grid-node-content\",\n customRenderer !== undefined\n ? \"virtualized-grid-node-custom-category\"\n : \"virtualized-grid-node-category\"\n );\n return (\n <FlatItemNestedBorderWrapper\n borderCount={node.depth}\n bottomBorderCount={lastInNumberOfCategories}\n className={wrapperClassName}\n >\n <PropertyCategoryBlock\n className={className}\n style={style}\n category={node.derivedCategory}\n onExpansionToggled={onExpansionToggled}\n highlight={\n gridContext.highlight?.filteredTypes?.includes(\n FilteredType.Category\n )\n ? gridContext.highlight\n : undefined\n }\n >\n {customRenderer !== undefined && (\n <CustomCategoryContent\n renderer={customRenderer}\n categoryItem={node}\n gridContext={gridContext}\n onHeightChanged={onHeightChanged}\n />\n )}\n </PropertyCategoryBlock>\n </FlatItemNestedBorderWrapper>\n );\n case FlatGridItemType.Array:\n case FlatGridItemType.Struct:\n case FlatGridItemType.Primitive:\n const selectionKey = node.selectionKey;\n const parentCategoryItem = gridModel.getItem(\n node.parentCategorySelectionKey\n ) as GridCategoryItem;\n\n return (\n <FlatItemNestedBorderWrapper\n borderCount={parentCategoryItem.depth + 1}\n bottomBorderCount={lastInNumberOfCategories}\n className=\"virtualized-grid-node-content\"\n >\n <FlatPropertyRenderer\n key={node.key}\n uniqueKey={selectionKey}\n propertyRecord={node.derivedRecord}\n orientation={gridContext.orientation}\n indentation={node.depth}\n width={gridContext.gridWidth}\n isHoverable={gridContext.isPropertyHoverEnabled}\n isSelectable={gridContext.isPropertySelectionEnabled}\n isSelected={selectionKey === gridContext.selectedPropertyKey}\n onClick={gridContext.onPropertyClicked}\n onRightClick={gridContext.onPropertyRightClicked}\n onContextMenu={gridContext.onPropertyContextMenu}\n category={parentCategoryItem.derivedCategory}\n isEditing={selectionKey === gridContext.editingPropertyKey}\n isPropertyEditingEnabled={gridContext.isPropertyEditingEnabled}\n alwaysShowEditor={gridContext.alwaysShowEditor}\n onEditCommit={gridContext.onEditCommit}\n onEditCancel={gridContext.onEditCancel}\n isExpanded={node.isExpanded}\n onExpansionToggled={onExpansionToggled}\n onHeightChanged={onHeightChanged}\n actionButtonRenderers={gridContext.actionButtonRenderers}\n propertyValueRendererManager={\n gridContext.propertyValueRendererManager\n }\n columnRatio={gridContext.columnRatio}\n columnInfo={gridContext.columnInfo}\n isResizeHandleBeingDragged={\n gridContext.isResizeHandleBeingDragged\n }\n isResizeHandleHovered={gridContext.isResizeHandleHovered}\n onColumnRatioChanged={gridContext.onColumnRatioChanged}\n onResizeHandleDragChanged={\n gridContext.onResizeHandleDragChanged\n }\n onResizeHandleHoverChanged={\n gridContext.onResizeHandleHoverChanged\n }\n highlight={\n gridContext.highlight\n ? {\n applyOnLabel:\n gridContext.highlight.filteredTypes?.includes(\n FilteredType.Label\n ) ?? false,\n applyOnValue:\n gridContext.highlight.filteredTypes?.includes(\n FilteredType.Value\n ) ?? false,\n ...gridContext.highlight,\n }\n : undefined\n }\n />\n </FlatItemNestedBorderWrapper>\n );\n }\n }\n\n return (\n <div className=\"virtualized-grid-node\" style={virtualizedListStyle}>\n <div\n className=\"virtualized-grid-node-content-wrapper\"\n style={{\n minHeight: `${minHeight}px`,\n display: \"grid\",\n }}\n >\n <div\n ref={divRef}\n className=\"virtualized-grid-node-content-wrapper-item\"\n >\n {getDisplayNode()}\n </div>\n </div>\n </div>\n );\n },\n areEqual\n);\n\nFlatGridItemNode.displayName = \"FlatGridItemNode\";\n\ninterface CustomCategoryContentProps {\n categoryItem: GridCategoryItem;\n renderer: React.ComponentType<PropertyCategoryRendererProps>;\n gridContext: VirtualizedPropertyGridContext;\n onHeightChanged: (newHeight: number) => void;\n}\n\nconst CustomCategoryContent: React.FC<CustomCategoryContentProps> = (props) => {\n const { onHeightChanged } = props;\n const divRef = React.useRef<HTMLDivElement>(null);\n\n React.useLayoutEffect(() => {\n assert(divRef.current !== null);\n const contentHeight = divRef.current.getBoundingClientRect().height;\n onHeightChanged(contentHeight);\n }, [props.gridContext.orientation, onHeightChanged]);\n\n return <div ref={divRef}>{React.createElement(props.renderer, props)}</div>;\n};\n"]}
|
package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js
CHANGED
|
@@ -15,7 +15,7 @@ import { ProgressRadial } from "@itwin/itwinui-react";
|
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
17
|
export function VirtualizedPropertyGridWithDataProvider(
|
|
18
|
-
/* eslint-disable-next-line
|
|
18
|
+
/* eslint-disable-next-line @typescript-eslint/no-deprecated */
|
|
19
19
|
props) {
|
|
20
20
|
const { modelSource, inProgress } = useTrackedPropertyGridModelSource({
|
|
21
21
|
dataProvider: props.dataProvider,
|
package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedPropertyGridWithDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,iCAAiC,GAClC,MAAM,kCAAkC,CAAC;AAO1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAoBtD;;;;GAIG;AACH,MAAM,UAAU,uCAAuC;AACrD
|
|
1
|
+
{"version":3,"file":"VirtualizedPropertyGridWithDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.tsx"],"names":[],"mappings":"AAAA;;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CAAC;QAER,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEzB,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CACpB,0CAAG,QAAQ,CAAI,CAChB,CAAC,CAAC,CAAC,CACF,6BAAK,SAAS,EAAC,6CAA6C;QAC1D,oBAAC,cAAc,IAAC,aAAa,QAAC,IAAI,EAAE,OAAO,GAAI,CAC3C,CACP,CAAC;AACJ,CAAC","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\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport React, { useEffect, useState } from \"react\";\nimport {\n usePropertyGridEventHandler,\n usePropertyGridModel,\n useTrackedPropertyGridModelSource,\n} from \"../internal/PropertyGridHooks.js\";\nimport type { PropertyCategoryRendererManager } from \"../PropertyCategoryRendererManager.js\";\nimport type { IPropertyDataProvider } from \"../PropertyDataProvider.js\";\nimport type {\n CommonPropertyGridProps,\n PropertyGridContentHighlightProps,\n} from \"./PropertyGridCommons.js\";\nimport { VirtualizedPropertyGrid } from \"./VirtualizedPropertyGrid.js\";\nimport { ProgressRadial } from \"@itwin/itwinui-react\";\n\n/** Properties for [[VirtualizedPropertyGridWithDataProvider]] React component\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof VirtualizedPropertyGridWithDataProvider>`\n */\nexport interface VirtualizedPropertyGridWithDataProviderProps\n extends CommonPropertyGridProps {\n /** Property data provider used by the property grid */\n dataProvider: IPropertyDataProvider;\n /** Properties for highlighting property data in the grid. */\n highlight?: PropertyGridContentHighlightProps;\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n /** Width of the property grid component. */\n width: number;\n /** Height of the property grid component. */\n height: number;\n}\n\n/**\n * [[VirtualizedPropertyGrid]] React Component which takes a data provider and\n * sets up default implementations for `IPropertyGridModelSource` and `IPropertyGridEventHandler`\n * @public\n */\nexport function VirtualizedPropertyGridWithDataProvider(\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n props: VirtualizedPropertyGridWithDataProviderProps\n) {\n const { modelSource, inProgress } = useTrackedPropertyGridModelSource({\n dataProvider: props.dataProvider,\n });\n\n const model = usePropertyGridModel({ modelSource });\n const eventHandler = usePropertyGridEventHandler({ modelSource });\n\n return (\n <DelayedLoaderRenderer shouldRenderLoader={inProgress || !model}>\n {model && (\n <VirtualizedPropertyGrid\n {...props}\n model={model}\n eventHandler={eventHandler}\n />\n )}\n </DelayedLoaderRenderer>\n );\n}\n\ninterface DelayedLoaderRendererProps {\n shouldRenderLoader: boolean;\n}\n\nfunction DelayedLoaderRenderer({\n children,\n shouldRenderLoader,\n}: React.PropsWithChildren<DelayedLoaderRendererProps>) {\n const [showSpinner, setShowSpinner] = useState(shouldRenderLoader);\n useEffect(() => {\n if (!shouldRenderLoader) {\n setShowSpinner(shouldRenderLoader);\n return;\n }\n\n // only set a timeout when shouldRenderLoader is set to `true`\n const timeout = setTimeout(() => {\n setShowSpinner(shouldRenderLoader);\n }, 250);\n\n return () => clearTimeout(timeout);\n }, [shouldRenderLoader]);\n\n return !showSpinner ? (\n <>{children}</>\n ) : (\n <div className=\"components-virtualized-property-grid-loader\">\n <ProgressRadial indeterminate size={\"large\"} />\n </div>\n );\n}\n"]}
|