@itwin/components-react 3.0.0-dev.72 → 3.0.0-dev.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/lib/components-react/UiComponents.d.ts +10 -10
  2. package/lib/components-react/UiComponents.d.ts.map +1 -1
  3. package/lib/components-react/UiComponents.js +18 -18
  4. package/lib/components-react/UiComponents.js.map +1 -1
  5. package/lib/components-react/common/HighlightedText.d.ts +2 -2
  6. package/lib/components-react/common/HighlightedText.js +1 -1
  7. package/lib/components-react/common/HighlightedText.js.map +1 -1
  8. package/lib/components-react/common/HighlightingComponentProps.d.ts +2 -2
  9. package/lib/components-react/common/HighlightingComponentProps.js.map +1 -1
  10. package/lib/components-react/common/UseAsyncValue.d.ts +1 -1
  11. package/lib/components-react/common/UseAsyncValue.js +1 -1
  12. package/lib/components-react/common/UseAsyncValue.js.map +1 -1
  13. package/lib/components-react/datepicker/DatePicker.js +28 -28
  14. package/lib/components-react/datepicker/DatePicker.js.map +1 -1
  15. package/lib/components-react/editors/BooleanEditor.d.ts +2 -2
  16. package/lib/components-react/editors/BooleanEditor.js +2 -2
  17. package/lib/components-react/editors/BooleanEditor.js.map +1 -1
  18. package/lib/components-react/editors/EnumButtonGroupEditor.d.ts +2 -2
  19. package/lib/components-react/editors/EnumButtonGroupEditor.js +2 -2
  20. package/lib/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
  21. package/lib/components-react/editors/EnumEditor.d.ts +2 -2
  22. package/lib/components-react/editors/EnumEditor.js +2 -2
  23. package/lib/components-react/editors/EnumEditor.js.map +1 -1
  24. package/lib/components-react/editors/ImageCheckBoxEditor.d.ts +2 -2
  25. package/lib/components-react/editors/ImageCheckBoxEditor.js +2 -2
  26. package/lib/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
  27. package/lib/components-react/editors/NumericInputEditor.d.ts +2 -2
  28. package/lib/components-react/editors/NumericInputEditor.js +2 -2
  29. package/lib/components-react/editors/NumericInputEditor.js.map +1 -1
  30. package/lib/components-react/editors/PropertyEditorManager.d.ts +7 -7
  31. package/lib/components-react/editors/PropertyEditorManager.js +4 -4
  32. package/lib/components-react/editors/PropertyEditorManager.js.map +1 -1
  33. package/lib/components-react/editors/SliderEditor.d.ts +2 -2
  34. package/lib/components-react/editors/SliderEditor.js +2 -2
  35. package/lib/components-react/editors/SliderEditor.js.map +1 -1
  36. package/lib/components-react/editors/TextEditor.d.ts +1 -1
  37. package/lib/components-react/editors/TextEditor.js +1 -1
  38. package/lib/components-react/editors/TextEditor.js.map +1 -1
  39. package/lib/components-react/editors/TextareaEditor.d.ts +2 -2
  40. package/lib/components-react/editors/TextareaEditor.js +2 -2
  41. package/lib/components-react/editors/TextareaEditor.js.map +1 -1
  42. package/lib/components-react/editors/ThemedEnumEditor.d.ts +3 -3
  43. package/lib/components-react/editors/ThemedEnumEditor.d.ts.map +1 -1
  44. package/lib/components-react/editors/ThemedEnumEditor.js +3 -2
  45. package/lib/components-react/editors/ThemedEnumEditor.js.map +1 -1
  46. package/lib/components-react/editors/ToggleEditor.d.ts +2 -2
  47. package/lib/components-react/editors/ToggleEditor.js +2 -2
  48. package/lib/components-react/editors/ToggleEditor.js.map +1 -1
  49. package/lib/components-react/favorite/FavoritePropertiesRenderer.d.ts +1 -1
  50. package/lib/components-react/favorite/FavoritePropertiesRenderer.js +1 -1
  51. package/lib/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
  52. package/lib/components-react/filtering/FilteringInput.d.ts +1 -2
  53. package/lib/components-react/filtering/FilteringInput.d.ts.map +1 -1
  54. package/lib/components-react/filtering/FilteringInput.js +1 -1
  55. package/lib/components-react/filtering/FilteringInput.js.map +1 -1
  56. package/lib/components-react/inputs/ParsedInput.d.ts +2 -2
  57. package/lib/components-react/inputs/ParsedInput.js +1 -1
  58. package/lib/components-react/inputs/ParsedInput.js.map +1 -1
  59. package/lib/components-react/properties/renderers/ActionButtonList.d.ts +2 -2
  60. package/lib/components-react/properties/renderers/ActionButtonList.js +1 -1
  61. package/lib/components-react/properties/renderers/ActionButtonList.js.map +1 -1
  62. package/lib/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts +0 -1
  63. package/lib/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts.map +1 -1
  64. package/lib/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
  65. package/lib/components-react/properties/renderers/PropertyRenderer.d.ts +5 -10
  66. package/lib/components-react/properties/renderers/PropertyRenderer.d.ts.map +1 -1
  67. package/lib/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
  68. package/lib/components-react/properties/renderers/label/PropertyLabelRenderer.d.ts +1 -3
  69. package/lib/components-react/properties/renderers/label/PropertyLabelRenderer.d.ts.map +1 -1
  70. package/lib/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
  71. package/lib/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.d.ts +1 -1
  72. package/lib/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +1 -1
  73. package/lib/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
  74. package/lib/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +1 -1
  75. package/lib/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
  76. package/lib/components-react/propertygrid/PropertyDataProvider.d.ts +1 -3
  77. package/lib/components-react/propertygrid/PropertyDataProvider.d.ts.map +1 -1
  78. package/lib/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
  79. package/lib/components-react/propertygrid/component/PropertyCategoryBlock.d.ts +1 -3
  80. package/lib/components-react/propertygrid/component/PropertyCategoryBlock.d.ts.map +1 -1
  81. package/lib/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
  82. package/lib/components-react/propertygrid/component/PropertyGridCommons.d.ts +0 -2
  83. package/lib/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
  84. package/lib/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  85. package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts +13 -4
  86. package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts.map +1 -1
  87. package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.js +9 -2
  88. package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
  89. package/lib/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.d.ts +2 -2
  90. package/lib/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js +2 -2
  91. package/lib/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
  92. package/lib/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.d.ts +1 -1
  93. package/lib/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js +1 -1
  94. package/lib/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
  95. package/lib/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.d.ts +1 -1
  96. package/lib/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.js +1 -1
  97. package/lib/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.js.map +1 -1
  98. package/lib/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.d.ts +1 -1
  99. package/lib/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.js +1 -1
  100. package/lib/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.js.map +1 -1
  101. package/lib/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.d.ts +17 -14
  102. package/lib/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.d.ts.map +1 -1
  103. package/lib/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js +10 -8
  104. package/lib/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js.map +1 -1
  105. package/lib/components-react/propertygrid/internal/PropertyGridHooks.d.ts +4 -4
  106. package/lib/components-react/propertygrid/internal/PropertyGridHooks.js +5 -5
  107. package/lib/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
  108. package/lib/components-react/selectable-content/SelectableContent.d.ts +5 -5
  109. package/lib/components-react/selectable-content/SelectableContent.d.ts.map +1 -1
  110. package/lib/components-react/selectable-content/SelectableContent.js +3 -2
  111. package/lib/components-react/selectable-content/SelectableContent.js.map +1 -1
  112. package/lib/components-react/table/SimpleTableDataProvider.d.ts +2 -2
  113. package/lib/components-react/table/SimpleTableDataProvider.js +2 -2
  114. package/lib/components-react/table/SimpleTableDataProvider.js.map +1 -1
  115. package/lib/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.d.ts.map +1 -1
  116. package/lib/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.js +1 -0
  117. package/lib/components-react/table/columnfiltering/data-grid-addons/AutoCompleteFilter.js.map +1 -1
  118. package/lib/components-react/table/component/Table.d.ts +4 -7
  119. package/lib/components-react/table/component/Table.d.ts.map +1 -1
  120. package/lib/components-react/table/component/Table.js.map +1 -1
  121. package/lib/components-react/toolbar/Item.d.ts +2 -2
  122. package/lib/components-react/toolbar/Item.js +1 -1
  123. package/lib/components-react/toolbar/Item.js.map +1 -1
  124. package/lib/components-react/toolbar/PopupItem.d.ts +2 -2
  125. package/lib/components-react/toolbar/PopupItem.js +1 -1
  126. package/lib/components-react/toolbar/PopupItem.js.map +1 -1
  127. package/lib/components-react/toolbar/PopupItemWithDrag.d.ts +2 -2
  128. package/lib/components-react/toolbar/PopupItemWithDrag.js +1 -1
  129. package/lib/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
  130. package/lib/components-react/toolbar/Toolbar.d.ts +2 -2
  131. package/lib/components-react/toolbar/Toolbar.js +1 -1
  132. package/lib/components-react/toolbar/Toolbar.js.map +1 -1
  133. package/lib/components-react/toolbar/ToolbarWithOverflow.d.ts +6 -6
  134. package/lib/components-react/toolbar/ToolbarWithOverflow.js +3 -3
  135. package/lib/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
  136. package/lib/components-react/toolbar/utilities/Direction.d.ts +1 -1
  137. package/lib/components-react/toolbar/utilities/Direction.js +1 -1
  138. package/lib/components-react/toolbar/utilities/Direction.js.map +1 -1
  139. package/lib/components-react/tree/HighlightingEngine.d.ts +1 -1
  140. package/lib/components-react/tree/HighlightingEngine.js +1 -1
  141. package/lib/components-react/tree/HighlightingEngine.js.map +1 -1
  142. package/lib/components-react/tree/TreeDataProvider.d.ts +1 -1
  143. package/lib/components-react/tree/TreeDataProvider.js.map +1 -1
  144. package/lib/components-react/tree/controlled/TreeHooks.d.ts +3 -4
  145. package/lib/components-react/tree/controlled/TreeHooks.d.ts.map +1 -1
  146. package/lib/components-react/tree/controlled/TreeHooks.js +3 -4
  147. package/lib/components-react/tree/controlled/TreeHooks.js.map +1 -1
  148. package/lib/components-react/tree/controlled/component/ControlledTree.d.ts +1 -1
  149. package/lib/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
  150. package/lib/components-react/tree/controlled/component/TreeNodeEditor.d.ts +9 -6
  151. package/lib/components-react/tree/controlled/component/TreeNodeEditor.d.ts.map +1 -1
  152. package/lib/components-react/tree/controlled/component/TreeNodeEditor.js +3 -2
  153. package/lib/components-react/tree/controlled/component/TreeNodeEditor.js.map +1 -1
  154. package/lib/components-react/tree/controlled/component/TreeNodeRenderer.d.ts +12 -16
  155. package/lib/components-react/tree/controlled/component/TreeNodeRenderer.d.ts.map +1 -1
  156. package/lib/components-react/tree/controlled/component/TreeNodeRenderer.js +1 -1
  157. package/lib/components-react/tree/controlled/component/TreeNodeRenderer.js.map +1 -1
  158. package/lib/components-react/tree/controlled/component/TreeRenderer.d.ts +5 -54
  159. package/lib/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
  160. package/lib/components-react/tree/controlled/component/TreeRenderer.js +13 -28
  161. package/lib/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
  162. package/lib/public/locales/en/UiComponents.json +1 -8
  163. package/package.json +16 -15
@@ -1 +1 @@
1
- {"version":3,"file":"FilteringInput.js","sourceRoot":"","sources":["../../../src/components-react/filtering/FilteringInput.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAA+B;AAC/B,4DAAoC;AACpC,6CAA+B;AAC/B,6CAAkC;AAClC,kDAAwD;AACxD,wDAA6C;AAC7C,kDAA+C;AAC/C,qDAAuE;AA2CvE;;;GAGG;AACH,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,mCAAmC;IACnC,iFAAa,CAAA;IACb,gDAAgD;IAChD,6FAAmB,CAAA;IACnB,gDAAgD;IAChD,yFAAiB,CAAA;AACnB,CAAC,EAPW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAO/B;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,KAAK,CAAC,aAAuD;IAM/F,YAAY,KAA0B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QANP,kBAAa,GAAG,KAAK,CAAC,SAAS,EAAoB,CAAC;QACpD,iBAAY,GAAG,mBAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QAClD,iBAAY,GAAG,mBAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QACjD,gBAAW,GAAG,mBAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QAiBjD,yBAAoB,GAAG,GAAG,EAAE;YAClC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;gBAC1B,0DAA0D;gBAC1D,IAAI,CAAC,QAAQ,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;gBACxD,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;gBAC3B,OAAO;aACR;YAED,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,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AC,gBAAgB,CAAC,GAAI;gBAEpD,8BAAM,SAAS,EAAC,6CAA6C;oBAC1D,MAAM,KAAK,oBAAoB,CAAC,iBAAiB,IAAI,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;wBACpF,oBAAC,+BAAc,kBAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,IAAM,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAI,CAAC,CAAC,CAAC,SAAS;oBACtG,MAAM,KAAK,oBAAoB,CAAC,aAAa,CAAC,CAAC;wBAC9C,iEAAiE;wBACjE,8BAAM,SAAS,EAAC,kBAAkB,EAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EACnE,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,GAAI,CAAC,CAAC,CAAC,SAAS;oBACvE,MAAM,KAAK,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;wBACpD,iEAAiE;wBACjE,8BAAM,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAClE,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,GAAI,CAAC,CAAC,CAAC,SAAS;oBACvE,MAAM,KAAK,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;wBAClD,iEAAiE;wBACjE,8BAAM,SAAS,EAAC,kDAAkD,EAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAClG,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,GAAI,CAAC,CAAC,CAAC,SAAS,CAClE,CACF,CACH,CACP,CAAC;IACJ,CAAC;CACF;AA9GD,wCA8GC","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 Filtering\n */\n\nimport \"./FilteringInput.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport { CommonProps, UiCore } from \"@itwin/core-react\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { UiComponents } from \"../UiComponents\";\nimport { ResultSelector, ResultSelectorProps } from \"./ResultSelector\";\n\n/** [[FilteringInput]] React Component state\n * @internal\n */\ninterface FilteringInputState {\n /** A string which will be used for search */\n searchText: string;\n /**\n * Tells the component if the search was started.\n * Gets reset to false if search is canceled/cleared or searchText is changed.\n */\n searchStarted: boolean;\n /* Used for resetting the state of [[ResultSelector]] component */\n resultSelectorKey: number;\n}\n\n/**\n * [[FilteringInput]] React Component properties\n * @public\n */\nexport interface FilteringInputProps extends CommonProps {\n /** Filtering should start */\n onFilterStart: (searchText: string) => void;\n /** Filtering is canceled while still in progress */\n onFilterCancel: () => void;\n /** Filtering is cleared after everything's loaded */\n onFilterClear: () => void;\n /**\n * Tells the component what is the status of filtering.\n * @beta\n */\n status: FilteringInputStatus;\n /**\n * [[ResultSelector]] React Component properties.\n * Attribute should be memoized and updated when [[ResultSelector]] state needs to be reset.\n * This allows resetting the selected active match index back to 0.\n */\n resultSelectorProps?: ResultSelectorProps;\n /** Specify that the <input> element should automatically get focus */\n autoFocus?: boolean;\n}\n\n/**\n * Enumeration of possible component contexts\n * @beta\n */\nexport enum FilteringInputStatus {\n /** Component is ready to filter */\n ReadyToFilter,\n /** Component's parent is currently filtering */\n FilteringInProgress,\n /** Component's parent has finished filtering */\n FilteringFinished,\n}\n\n/** A helper component for filtering trees and stepping through results\n * @public\n */\nexport class FilteringInput extends React.PureComponent<FilteringInputProps, FilteringInputState> {\n private _inputElement = React.createRef<HTMLInputElement>();\n private _searchLabel = UiCore.translate(\"general.search\");\n private _cancelLabel = UiCore.translate(\"dialog.cancel\");\n private _clearLabel = UiCore.translate(\"general.search\");\n\n constructor(props: FilteringInputProps) {\n super(props);\n this.state = {\n searchText: \"\",\n searchStarted: false,\n resultSelectorKey: 0,\n };\n }\n\n private focus() {\n // istanbul ignore next\n if (this._inputElement.current)\n this._inputElement.current.focus();\n }\n\n private _onSearchButtonClick = () => {\n if (!this.state.searchText) {\n // Empty search string is the same as clearing the search.\n this.setState({ searchStarted: false, searchText: \"\" });\n this.props.onFilterClear();\n return;\n }\n\n this.props.onFilterStart(this.state.searchText);\n this.setState({ searchStarted: true });\n };\n\n private _onCancelButtonClick = () => {\n this.setState({ searchStarted: false, searchText: \"\" });\n this.props.onFilterCancel();\n this.focus();\n };\n\n private _onClearButtonClick = () => {\n this.setState({ searchStarted: false, searchText: \"\" });\n this.props.onFilterClear();\n this.focus();\n };\n\n private _onFilterKeyDown = (e: React.KeyboardEvent<HTMLElement>): void => {\n if (e.key !== Key.Enter)\n return;\n\n if (!this.state.searchText)\n return;\n\n this.props.onFilterStart(this.state.searchText);\n this.setState({ searchStarted: true });\n e.stopPropagation();\n };\n\n private _onInputChanged = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (this.state.searchStarted) {\n this.props.onFilterCancel();\n }\n this.setState({ searchText: e.target.value, searchStarted: false });\n };\n\n /** @internal */\n public override componentDidUpdate(prevProps: FilteringInputProps) {\n if (this.props.resultSelectorProps !== prevProps.resultSelectorProps) {\n this.setState((state) => ({ resultSelectorKey: state.resultSelectorKey + 1 }));\n }\n }\n\n public override render() {\n const status = this.props.status;\n return (\n // TODO: What is filtering-input-preload-images?\n <div className={classnames(\"components-filtering-input\", \"filtering-input-preload-images\", this.props.className)}\n style={this.props.style}\n onKeyDown={this._onFilterKeyDown}\n role=\"presentation\"\n >\n <span className=\"components-filtering-input-input\">\n <Input type=\"text\"\n placeholder={UiComponents.translate(\"filteringInput:placeholder\")}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.props.autoFocus}\n onKeyDown={this._onFilterKeyDown}\n value={this.state.searchText}\n onChange={this._onInputChanged}\n aria-label={UiCore.translate(\"general.search\")} />\n\n <span className=\"components-filtering-input-input-components\">\n {status === FilteringInputStatus.FilteringFinished && this.props.resultSelectorProps ?\n <ResultSelector key={this.state.resultSelectorKey} {...this.props.resultSelectorProps} /> : undefined}\n {status === FilteringInputStatus.ReadyToFilter ?\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <span className=\"icon icon-search\" onClick={this._onSearchButtonClick}\n role=\"button\" tabIndex={-1} title={this._searchLabel} /> : undefined}\n {status === FilteringInputStatus.FilteringInProgress ?\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <span className=\"icon icon-close\" onClick={this._onCancelButtonClick}\n role=\"button\" tabIndex={-1} title={this._cancelLabel} /> : undefined}\n {status === FilteringInputStatus.FilteringFinished ?\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <span className=\"components-filtering-input-clear icon icon-close\" onClick={this._onClearButtonClick}\n role=\"button\" tabIndex={-1} title={this._clearLabel} /> : undefined}\n </span>\n </span>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"FilteringInput.js","sourceRoot":"","sources":["../../../src/components-react/filtering/FilteringInput.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAA+B;AAC/B,4DAAoC;AACpC,6CAA+B;AAC/B,6CAAkC;AAClC,kDAAwD;AACxD,wDAA6C;AAC7C,kDAA+C;AAC/C,qDAAuE;AA0CvE;;;GAGG;AACH,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,mCAAmC;IACnC,iFAAa,CAAA;IACb,gDAAgD;IAChD,6FAAmB,CAAA;IACnB,gDAAgD;IAChD,yFAAiB,CAAA;AACnB,CAAC,EAPW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAO/B;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,KAAK,CAAC,aAAuD;IAM/F,YAAY,KAA0B;QACpC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,CAAC;wBACpD,iEAAiE;wBACjE,8BAAM,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAClE,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,GAAI,CAAC,CAAC,CAAC,SAAS;oBACvE,MAAM,KAAK,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;wBAClD,iEAAiE;wBACjE,8BAAM,SAAS,EAAC,kDAAkD,EAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAClG,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,GAAI,CAAC,CAAC,CAAC,SAAS,CAClE,CACF,CACH,CACP,CAAC;IACJ,CAAC;CACF;AA9GD,wCA8GC","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 Filtering\n */\n\nimport \"./FilteringInput.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Key } from \"ts-key-enum\";\nimport { CommonProps, UiCore } from \"@itwin/core-react\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { UiComponents } from \"../UiComponents\";\nimport { ResultSelector, ResultSelectorProps } from \"./ResultSelector\";\n\n/** [[FilteringInput]] React Component state\n * @internal\n */\ninterface FilteringInputState {\n /** A string which will be used for search */\n searchText: string;\n /**\n * Tells the component if the search was started.\n * Gets reset to false if search is canceled/cleared or searchText is changed.\n */\n searchStarted: boolean;\n /* Used for resetting the state of [[ResultSelector]] component */\n resultSelectorKey: number;\n}\n\n/**\n * [[FilteringInput]] React Component properties\n * @public\n */\nexport interface FilteringInputProps extends CommonProps {\n /** Filtering should start */\n onFilterStart: (searchText: string) => void;\n /** Filtering is canceled while still in progress */\n onFilterCancel: () => void;\n /** Filtering is cleared after everything's loaded */\n onFilterClear: () => void;\n /**\n * Tells the component what is the status of filtering.\n */\n status: FilteringInputStatus;\n /**\n * [[ResultSelector]] React Component properties.\n * Attribute should be memoized and updated when [[ResultSelector]] state needs to be reset.\n * This allows resetting the selected active match index back to 0.\n */\n resultSelectorProps?: ResultSelectorProps;\n /** Specify that the <input> element should automatically get focus */\n autoFocus?: boolean;\n}\n\n/**\n * Enumeration of possible component contexts\n * @public\n */\nexport enum FilteringInputStatus {\n /** Component is ready to filter */\n ReadyToFilter,\n /** Component's parent is currently filtering */\n FilteringInProgress,\n /** Component's parent has finished filtering */\n FilteringFinished,\n}\n\n/** A helper component for filtering trees and stepping through results\n * @public\n */\nexport class FilteringInput extends React.PureComponent<FilteringInputProps, FilteringInputState> {\n private _inputElement = React.createRef<HTMLInputElement>();\n private _searchLabel = UiCore.translate(\"general.search\");\n private _cancelLabel = UiCore.translate(\"dialog.cancel\");\n private _clearLabel = UiCore.translate(\"general.search\");\n\n constructor(props: FilteringInputProps) {\n super(props);\n this.state = {\n searchText: \"\",\n searchStarted: false,\n resultSelectorKey: 0,\n };\n }\n\n private focus() {\n // istanbul ignore next\n if (this._inputElement.current)\n this._inputElement.current.focus();\n }\n\n private _onSearchButtonClick = () => {\n if (!this.state.searchText) {\n // Empty search string is the same as clearing the search.\n this.setState({ searchStarted: false, searchText: \"\" });\n this.props.onFilterClear();\n return;\n }\n\n this.props.onFilterStart(this.state.searchText);\n this.setState({ searchStarted: true });\n };\n\n private _onCancelButtonClick = () => {\n this.setState({ searchStarted: false, searchText: \"\" });\n this.props.onFilterCancel();\n this.focus();\n };\n\n private _onClearButtonClick = () => {\n this.setState({ searchStarted: false, searchText: \"\" });\n this.props.onFilterClear();\n this.focus();\n };\n\n private _onFilterKeyDown = (e: React.KeyboardEvent<HTMLElement>): void => {\n if (e.key !== Key.Enter)\n return;\n\n if (!this.state.searchText)\n return;\n\n this.props.onFilterStart(this.state.searchText);\n this.setState({ searchStarted: true });\n e.stopPropagation();\n };\n\n private _onInputChanged = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (this.state.searchStarted) {\n this.props.onFilterCancel();\n }\n this.setState({ searchText: e.target.value, searchStarted: false });\n };\n\n /** @internal */\n public override componentDidUpdate(prevProps: FilteringInputProps) {\n if (this.props.resultSelectorProps !== prevProps.resultSelectorProps) {\n this.setState((state) => ({ resultSelectorKey: state.resultSelectorKey + 1 }));\n }\n }\n\n public override render() {\n const status = this.props.status;\n return (\n // TODO: What is filtering-input-preload-images?\n <div className={classnames(\"components-filtering-input\", \"filtering-input-preload-images\", this.props.className)}\n style={this.props.style}\n onKeyDown={this._onFilterKeyDown}\n role=\"presentation\"\n >\n <span className=\"components-filtering-input-input\">\n <Input type=\"text\"\n placeholder={UiComponents.translate(\"filteringInput:placeholder\")}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={this.props.autoFocus}\n onKeyDown={this._onFilterKeyDown}\n value={this.state.searchText}\n onChange={this._onInputChanged}\n aria-label={UiCore.translate(\"general.search\")} />\n\n <span className=\"components-filtering-input-input-components\">\n {status === FilteringInputStatus.FilteringFinished && this.props.resultSelectorProps ?\n <ResultSelector key={this.state.resultSelectorKey} {...this.props.resultSelectorProps} /> : undefined}\n {status === FilteringInputStatus.ReadyToFilter ?\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <span className=\"icon icon-search\" onClick={this._onSearchButtonClick}\n role=\"button\" tabIndex={-1} title={this._searchLabel} /> : undefined}\n {status === FilteringInputStatus.FilteringInProgress ?\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <span className=\"icon icon-close\" onClick={this._onCancelButtonClick}\n role=\"button\" tabIndex={-1} title={this._cancelLabel} /> : undefined}\n {status === FilteringInputStatus.FilteringFinished ?\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <span className=\"components-filtering-input-clear icon icon-close\" onClick={this._onClearButtonClick}\n role=\"button\" tabIndex={-1} title={this._clearLabel} /> : undefined}\n </span>\n </span>\n </div>\n );\n }\n}\n"]}
@@ -6,7 +6,7 @@ import { CommonProps } from "@itwin/core-react";
6
6
  import { ParseResults } from "@itwin/appui-abstract";
7
7
  import "./ParsedInput.scss";
8
8
  /** Props for [[ParsedInput]] control
9
- * @beta
9
+ * @public
10
10
  */
11
11
  export interface ParsedInputProps extends CommonProps {
12
12
  /** InitialValue which is used to restore input field if ESC is pressed */
@@ -23,7 +23,7 @@ export interface ParsedInputProps extends CommonProps {
23
23
  ref?: React.Ref<HTMLInputElement>;
24
24
  }
25
25
  /** Generic Input component that requires formatting and parsing functions to be passed in as props.
26
- * @beta
26
+ * @public
27
27
  */
28
28
  export declare const ParsedInput: (props: ParsedInputProps) => JSX.Element | null;
29
29
  //# sourceMappingURL=ParsedInput.d.ts.map
@@ -105,7 +105,7 @@ const ForwardRefParsedInput = React.forwardRef(function ForwardRefParsedInput({
105
105
  return React.createElement(itwinui_react_1.Input, { "data-testid": "components-parsed-input", ref: ref, style: style, className: classNames, onKeyDown: handleKeyDown, onBlur: handleBlur, onChange: handleChange, value: formattedValue, disabled: readonly });
106
106
  });
107
107
  /** Generic Input component that requires formatting and parsing functions to be passed in as props.
108
- * @beta
108
+ * @public
109
109
  */
110
110
  exports.ParsedInput = ForwardRefParsedInput;
111
111
  //# sourceMappingURL=ParsedInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ParsedInput.js","sourceRoot":"","sources":["../../../src/components-react/inputs/ParsedInput.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,4DAAoC;AACpC,wDAA6C;AAE7C,0DAAiE;AACjE,8BAA4B;AAoB5B,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,SAAS,qBAAqB,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,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F,uBAAuB;QACvB,IAAI,KAAK,CAAC,GAAG,KAAK,2BAAU,CAAC,KAAK,EAAE;YAClC,qBAAqB,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACjD,KAAK,CAAC,cAAc,EAAE,CAAC;SACxB;QACD,IAAI,KAAK,CAAC,GAAG,KAAK,2BAAU,CAAC,MAAM,EAAE;YACnC,iBAAiB,CAAC,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;YACxD,cAAc,CAAC,KAAK,CAAC,CAAC;YACtB,KAAK,CAAC,cAAc,EAAE,CAAC;SACxB;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAEzC,MAAM,UAAU,GAAG,IAAA,oBAAU,EAAC,SAAS,EAAE,yBAAyB,EAAE,WAAW,IAAI,mCAAmC,CAAC,CAAC;IAExH,OAAO,oBAAC,qBAAK,mBAAa,yBAAyB,EAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAC7I,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;AAC1E,CAAC,CACF,CAAC;AAEF;;GAEG;AACU,QAAA,WAAW,GAAoD,qBAAqB,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 Inputs\n */\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { ParseResults, SpecialKey } from \"@itwin/appui-abstract\";\nimport \"./ParsedInput.scss\";\n\n/** Props for [[ParsedInput]] control\n * @beta\n */\nexport interface ParsedInputProps extends CommonProps {\n /** InitialValue which is used to restore input field if ESC is pressed */\n initialValue: number;\n /** Function used to format the value */\n formatValue: (value: number) => string;\n /** Function used to parse user input into a value */\n parseString: (stringValue: string) => ParseResults;\n /** Function to call when value is changed */\n onChange?: (newValue: number) => void;\n /** if readonly then only the formatValue function is used. */\n readonly?: boolean;\n /** Provides ability to return reference to HTMLInputElement */\n ref?: React.Ref<HTMLInputElement>;\n}\n\nconst ForwardRefParsedInput = React.forwardRef<HTMLInputElement, ParsedInputProps>(\n function ForwardRefParsedInput({ initialValue, formatValue, parseString, readonly, className, style, onChange }, ref) {\n const currentValueRef = React.useRef(initialValue);\n const isMountedRef = React.useRef(false);\n const lastFormattedValueRef = React.useRef(formatValue(initialValue));\n const [formattedValue, setFormattedValue] = React.useState(() => lastFormattedValueRef.current);\n const [hasBadInput, setHasBadInput] = React.useState(false);\n\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n // See if new initialValue props have changed since component mounted\n React.useEffect(() => {\n currentValueRef.current = initialValue;\n const currentFormattedValue = formatValue(currentValueRef.current);\n if (currentFormattedValue !== lastFormattedValueRef.current) {\n lastFormattedValueRef.current = currentFormattedValue;\n setFormattedValue(lastFormattedValueRef.current);\n setHasBadInput(false);\n }\n }, [formatValue, initialValue]);\n\n const handleChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setFormattedValue(event.currentTarget.value);\n }, []);\n\n const updateValueFromString = React.useCallback((strVal: string) => {\n if (lastFormattedValueRef.current === strVal)\n return;\n\n const parseResults = (parseString(strVal));\n // istanbul ignore else\n if (!parseResults.parseError) {\n // istanbul ignore else\n if (undefined !== parseResults.value && typeof parseResults.value === \"number\") {\n const currentValue = parseResults.value;\n // istanbul ignore else\n if (currentValue !== currentValueRef.current) {\n currentValueRef.current = currentValue;\n onChange && onChange(currentValueRef.current);\n }\n // istanbul ignore else\n if (isMountedRef.current) {\n lastFormattedValueRef.current = formatValue(currentValue);\n setFormattedValue(lastFormattedValueRef.current);\n setHasBadInput(false);\n }\n }\n } else {\n setHasBadInput(true);\n }\n }, [formatValue, onChange, parseString]);\n\n const handleBlur = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\n updateValueFromString(event.target.value);\n }, [updateValueFromString]);\n\n const handleKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (event.key === SpecialKey.Enter) {\n updateValueFromString(event.currentTarget.value);\n event.preventDefault();\n }\n if (event.key === SpecialKey.Escape) {\n setFormattedValue(formatValue(currentValueRef.current));\n setHasBadInput(false);\n event.preventDefault();\n }\n }, [formatValue, updateValueFromString]);\n\n const classNames = classnames(className, \"components-parsed-input\", hasBadInput && \"components-parsed-input-has-error\");\n\n return <Input data-testid=\"components-parsed-input\" ref={ref} style={style} className={classNames} onKeyDown={handleKeyDown} onBlur={handleBlur}\n onChange={handleChange} value={formattedValue} disabled={readonly} />;\n }\n);\n\n/** Generic Input component that requires formatting and parsing functions to be passed in as props.\n * @beta\n */\nexport const ParsedInput: (props: ParsedInputProps) => JSX.Element | null = ForwardRefParsedInput;\n\n"]}
1
+ {"version":3,"file":"ParsedInput.js","sourceRoot":"","sources":["../../../src/components-react/inputs/ParsedInput.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,4DAAoC;AACpC,wDAA6C;AAE7C,0DAAiE;AACjE,8BAA4B;AAoB5B,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,SAAS,qBAAqB,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG;IAClH,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACnD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,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C;YACjD,KAAK,CAAC,cAAc,EAAE,CAAC;SACxB;QACD,IAAI,KAAK,CAAC,GAAG,KAAK,2BAAU,CAAC,MAAM,EAAE;YACnC,iBAAiB,CAAC,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;YACxD,cAAc,CAAC,KAAK,CAAC,CAAC;YACtB,KAAK,CAAC,cAAc,EAAE,CAAC;SACxB;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAEzC,MAAM,UAAU,GAAG,IAAA,oBAAU,EAAC,SAAS,EAAE,yBAAyB,EAAE,WAAW,IAAI,mCAAmC,CAAC,CAAC;IAExH,OAAO,oBAAC,qBAAK,mBAAa,yBAAyB,EAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAC7I,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;AAC1E,CAAC,CACF,CAAC;AAEF;;GAEG;AACU,QAAA,WAAW,GAAoD,qBAAqB,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 Inputs\n */\n\nimport * as React from \"react\";\nimport classnames from \"classnames\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { ParseResults, SpecialKey } from \"@itwin/appui-abstract\";\nimport \"./ParsedInput.scss\";\n\n/** Props for [[ParsedInput]] control\n * @public\n */\nexport interface ParsedInputProps extends CommonProps {\n /** InitialValue which is used to restore input field if ESC is pressed */\n initialValue: number;\n /** Function used to format the value */\n formatValue: (value: number) => string;\n /** Function used to parse user input into a value */\n parseString: (stringValue: string) => ParseResults;\n /** Function to call when value is changed */\n onChange?: (newValue: number) => void;\n /** if readonly then only the formatValue function is used. */\n readonly?: boolean;\n /** Provides ability to return reference to HTMLInputElement */\n ref?: React.Ref<HTMLInputElement>;\n}\n\nconst ForwardRefParsedInput = React.forwardRef<HTMLInputElement, ParsedInputProps>(\n function ForwardRefParsedInput({ initialValue, formatValue, parseString, readonly, className, style, onChange }, ref) {\n const currentValueRef = React.useRef(initialValue);\n const isMountedRef = React.useRef(false);\n const lastFormattedValueRef = React.useRef(formatValue(initialValue));\n const [formattedValue, setFormattedValue] = React.useState(() => lastFormattedValueRef.current);\n const [hasBadInput, setHasBadInput] = React.useState(false);\n\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n // See if new initialValue props have changed since component mounted\n React.useEffect(() => {\n currentValueRef.current = initialValue;\n const currentFormattedValue = formatValue(currentValueRef.current);\n if (currentFormattedValue !== lastFormattedValueRef.current) {\n lastFormattedValueRef.current = currentFormattedValue;\n setFormattedValue(lastFormattedValueRef.current);\n setHasBadInput(false);\n }\n }, [formatValue, initialValue]);\n\n const handleChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setFormattedValue(event.currentTarget.value);\n }, []);\n\n const updateValueFromString = React.useCallback((strVal: string) => {\n if (lastFormattedValueRef.current === strVal)\n return;\n\n const parseResults = (parseString(strVal));\n // istanbul ignore else\n if (!parseResults.parseError) {\n // istanbul ignore else\n if (undefined !== parseResults.value && typeof parseResults.value === \"number\") {\n const currentValue = parseResults.value;\n // istanbul ignore else\n if (currentValue !== currentValueRef.current) {\n currentValueRef.current = currentValue;\n onChange && onChange(currentValueRef.current);\n }\n // istanbul ignore else\n if (isMountedRef.current) {\n lastFormattedValueRef.current = formatValue(currentValue);\n setFormattedValue(lastFormattedValueRef.current);\n setHasBadInput(false);\n }\n }\n } else {\n setHasBadInput(true);\n }\n }, [formatValue, onChange, parseString]);\n\n const handleBlur = React.useCallback((event: React.FocusEvent<HTMLInputElement>) => {\n updateValueFromString(event.target.value);\n }, [updateValueFromString]);\n\n const handleKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (event.key === SpecialKey.Enter) {\n updateValueFromString(event.currentTarget.value);\n event.preventDefault();\n }\n if (event.key === SpecialKey.Escape) {\n setFormattedValue(formatValue(currentValueRef.current));\n setHasBadInput(false);\n event.preventDefault();\n }\n }, [formatValue, updateValueFromString]);\n\n const classNames = classnames(className, \"components-parsed-input\", hasBadInput && \"components-parsed-input-has-error\");\n\n return <Input data-testid=\"components-parsed-input\" ref={ref} style={style} className={classNames} onKeyDown={handleKeyDown} onBlur={handleBlur}\n onChange={handleChange} value={formattedValue} disabled={readonly} />;\n }\n);\n\n/** Generic Input component that requires formatting and parsing functions to be passed in as props.\n * @public\n */\nexport const ParsedInput: (props: ParsedInputProps) => JSX.Element | null = ForwardRefParsedInput;\n\n"]}
@@ -7,7 +7,7 @@ import { PropertyRecord } from "@itwin/appui-abstract";
7
7
  import { Orientation } from "@itwin/core-react";
8
8
  import { ActionButtonRenderer } from "./ActionButtonRenderer";
9
9
  /** Properties of [[ActionButtonList]] React component
10
- * @beta
10
+ * @public
11
11
  */
12
12
  export interface ActionButtonListProps {
13
13
  /** Orientation to use for displaying the action buttons */
@@ -20,7 +20,7 @@ export interface ActionButtonListProps {
20
20
  isPropertyHovered?: boolean;
21
21
  }
22
22
  /** ActionButtonList React component.
23
- * @beta
23
+ * @public
24
24
  */
25
25
  export declare class ActionButtonList extends React.PureComponent<ActionButtonListProps> {
26
26
  private getClassName;
@@ -31,7 +31,7 @@ require("./ActionButtonList.scss");
31
31
  const React = __importStar(require("react"));
32
32
  const core_react_1 = require("@itwin/core-react");
33
33
  /** ActionButtonList React component.
34
- * @beta
34
+ * @public
35
35
  */
36
36
  class ActionButtonList extends React.PureComponent {
37
37
  getClassName(orientation) {
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButtonList.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/ActionButtonList.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,mCAAiC;AACjC,6CAA+B;AAE/B,kDAAgD;AAiBhD;;GAEG;AACH,MAAa,gBAAiB,SAAQ,KAAK,CAAC,aAAoC;IACtE,YAAY,CAAC,WAAwB;QAC3C,OAAO,WAAW,KAAK,wBAAW,CAAC,UAAU;YAC3C,CAAC,CAAC,oDAAoD;YACtD,CAAC,CAAC,kDAAkD,CAAC;IACzD,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IACtD,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CACxD,oBAAC,qBAAqB,IACpB,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE;gBACb,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;gBAC7B,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB;aAChD,GACD,CACH,CACG,CACP,CAAC;IACJ,CAAC;CACF;AAxBD,4CAwBC;AAOD,SAAS,qBAAqB,CAAC,KAAiC;IAC9D,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACzD,IAAI,CAAC,YAAY;QACf,OAAO,IAAI,CAAC;IAEd,OAAO,CACL,6BAAK,SAAS,EAAC,oCAAoC,IAChD,YAAY,CACT,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/** @packageDocumentation\n * @module Properties\n */\n\nimport \"./ActionButtonList.scss\";\nimport * as React from \"react\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/core-react\";\nimport { ActionButtonRenderer, ActionButtonRendererProps } from \"./ActionButtonRenderer\";\n\n/** Properties of [[ActionButtonList]] React component\n * @beta\n */\nexport interface ActionButtonListProps {\n /** Orientation to use for displaying the action buttons */\n orientation: Orientation;\n /** Property that action buttons belong to */\n property: PropertyRecord;\n /** Array of action button renderers */\n actionButtonRenderers: ActionButtonRenderer[];\n /** Indicated whether a property is hovered */\n isPropertyHovered?: boolean;\n}\n\n/** ActionButtonList React component.\n * @beta\n */\nexport class ActionButtonList extends React.PureComponent<ActionButtonListProps> {\n private getClassName(orientation: Orientation) {\n return orientation === Orientation.Horizontal\n ? \"components-property-action-button-list--horizontal\"\n : \"components-property-action-button-list--vertical\";\n }\n\n /** @internal */\n public override render() {\n return (\n <div className={this.getClassName(this.props.orientation)}>\n {this.props.actionButtonRenderers.map((renderer, index) =>\n <ActionButtonContainer\n key={index}\n renderer={renderer}\n rendererProps={{\n property: this.props.property,\n isPropertyHovered: this.props.isPropertyHovered,\n }}\n />,\n )}\n </div>\n );\n }\n}\n\ninterface ActionButtonContainerProps {\n renderer: ActionButtonRenderer;\n rendererProps: ActionButtonRendererProps;\n}\n\nfunction ActionButtonContainer(props: ActionButtonContainerProps) {\n const actionButton = props.renderer(props.rendererProps);\n if (!actionButton)\n return null;\n\n return (\n <div className=\"components-action-button-container\">\n {actionButton}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ActionButtonList.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/ActionButtonList.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,mCAAiC;AACjC,6CAA+B;AAE/B,kDAAgD;AAiBhD;;GAEG;AACH,MAAa,gBAAiB,SAAQ,KAAK,CAAC,aAAoC;IACtE,YAAY,CAAC,WAAwB;QAC3C,OAAO,WAAW,KAAK,wBAAW,CAAC,UAAU;YAC3C,CAAC,CAAC,oDAAoD;YACtD,CAAC,CAAC,kDAAkD,CAAC;IACzD,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IACtD,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CACxD,oBAAC,qBAAqB,IACpB,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE;gBACb,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;gBAC7B,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB;aAChD,GACD,CACH,CACG,CACP,CAAC;IACJ,CAAC;CACF;AAxBD,4CAwBC;AAOD,SAAS,qBAAqB,CAAC,KAAiC;IAC9D,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACzD,IAAI,CAAC,YAAY;QACf,OAAO,IAAI,CAAC;IAEd,OAAO,CACL,6BAAK,SAAS,EAAC,oCAAoC,IAChD,YAAY,CACT,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/** @packageDocumentation\n * @module Properties\n */\n\nimport \"./ActionButtonList.scss\";\nimport * as React from \"react\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/core-react\";\nimport { ActionButtonRenderer, ActionButtonRendererProps } from \"./ActionButtonRenderer\";\n\n/** Properties of [[ActionButtonList]] React component\n * @public\n */\nexport interface ActionButtonListProps {\n /** Orientation to use for displaying the action buttons */\n orientation: Orientation;\n /** Property that action buttons belong to */\n property: PropertyRecord;\n /** Array of action button renderers */\n actionButtonRenderers: ActionButtonRenderer[];\n /** Indicated whether a property is hovered */\n isPropertyHovered?: boolean;\n}\n\n/** ActionButtonList React component.\n * @public\n */\nexport class ActionButtonList extends React.PureComponent<ActionButtonListProps> {\n private getClassName(orientation: Orientation) {\n return orientation === Orientation.Horizontal\n ? \"components-property-action-button-list--horizontal\"\n : \"components-property-action-button-list--vertical\";\n }\n\n /** @internal */\n public override render() {\n return (\n <div className={this.getClassName(this.props.orientation)}>\n {this.props.actionButtonRenderers.map((renderer, index) =>\n <ActionButtonContainer\n key={index}\n renderer={renderer}\n rendererProps={{\n property: this.props.property,\n isPropertyHovered: this.props.isPropertyHovered,\n }}\n />,\n )}\n </div>\n );\n }\n}\n\ninterface ActionButtonContainerProps {\n renderer: ActionButtonRenderer;\n rendererProps: ActionButtonRendererProps;\n}\n\nfunction ActionButtonContainer(props: ActionButtonContainerProps) {\n const actionButton = props.renderer(props.rendererProps);\n if (!actionButton)\n return null;\n\n return (\n <div className=\"components-action-button-container\">\n {actionButton}\n </div>\n );\n}\n"]}
@@ -15,7 +15,6 @@ export interface PrimitiveRendererProps extends SharedRendererProps {
15
15
  /** Multiplier of how much the property is indented to the right */
16
16
  indentation?: number;
17
17
  /** Properties used for highlighting
18
- * @beta
19
18
  */
20
19
  highlight?: HighlightingComponentProps;
21
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PrimitivePropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PrimitivePropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAGrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,wCAAwC;IACxC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IAC7C,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;MAEE;IACF,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC;gBACxE,KAAK,EAAE,sBAAsB;IAIzC,gBAAgB;IACA,MAAM;CAoBvB"}
1
+ {"version":3,"file":"PrimitivePropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PrimitivePropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAGrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,wCAAwC;IACxC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IAC7C,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;MACE;IACF,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC;gBACxE,KAAK,EAAE,sBAAsB;IAIzC,gBAAgB;IACA,MAAM;CAoBvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrimitivePropertyRenderer.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PrimitivePropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;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M,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,wBAAW,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,IAClI,KAAK,CACyB,IACnC,CACH,CAAC;IACJ,CAAC;CACF;AA1BD,8DA0BC","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 { Orientation } from \"@itwin/core-react\";\nimport { HighlightedText } from \"../../common/HighlightedText\";\nimport { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport { CommonPropertyRenderer } from \"./CommonPropertyRenderer\";\nimport { PrimitivePropertyLabelRenderer } from \"./label/PrimitivePropertyLabelRenderer\";\nimport { SharedRendererProps } from \"./PropertyRenderer\";\nimport { PropertyView } from \"./PropertyView\";\n\n/** Properties of [[PrimitivePropertyRenderer]] React component\n * @public\n */\nexport interface PrimitiveRendererProps extends SharedRendererProps {\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 /** Multiplier of how much the property is indented to the right */\n indentation?: number;\n /** Properties used for highlighting\n * @beta\n */\n highlight?: HighlightingComponentProps;\n}\n\n/** React Component that renders primitive properties\n * @public\n */\nexport class PrimitivePropertyRenderer extends React.Component<PrimitiveRendererProps> {\n constructor(props: PrimitiveRendererProps) {\n super(props);\n }\n\n /** @internal */\n public override render() {\n const { children, indentation, highlight, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\n const displayLabel = this.props.propertyRecord.property.displayLabel;\n const offset = CommonPropertyRenderer.getLabelOffset(indentation, props.orientation, props.width, props.columnRatio, props.columnInfo?.minLabelWidth);\n\n const activeMatchIndex = this.props.propertyRecord.property.name === highlight?.activeHighlight?.highlightedItemIdentifier ? highlight.activeHighlight.highlightIndex : undefined;\n const label = highlight ?\n (HighlightedText({ text: displayLabel, searchText: highlight.highlightedText, activeMatchIndex })) :\n displayLabel;\n\n return (\n <PropertyView\n {...props}\n labelElement={\n <PrimitivePropertyLabelRenderer offset={offset} renderColon={this.props.orientation === Orientation.Horizontal} tooltip={displayLabel}>\n {label}\n </PrimitivePropertyLabelRenderer>}\n />\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PrimitivePropertyRenderer.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PrimitivePropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,kDAAgD;AAChD,kEAA+D;AAE/D,qEAAkE;AAClE,2FAAwF;AAExF,iDAA8C;AAiB9C;;GAEG;AACH,MAAa,yBAA0B,SAAQ,KAAK,CAAC,SAAiC;IACpF,YAAY,KAA6B;QACvC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAED,gBAAgB;IACA,MAAM;;QACpB,MAAM,KAAiD,IAAI,CAAC,KAAK,EAA3D,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,OAAyB,EAApB,KAAK,cAA5C,wCAA8C,CAAa,CAAC,CAAC,wDAAwD;QAC3H,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC;QACrE,MAAM,MAAM,GAAG,+CAAsB,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE,MAAA,KAAK,CAAC,UAAU,0CAAE,aAAa,CAAC,CAAC;QAEtJ,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,MAAK,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,eAAe,0CAAE,yBAAyB,CAAA,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;QAClL,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC;YACvB,CAAC,IAAA,iCAAe,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,CAAC,eAAe,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC;YACpG,YAAY,CAAC;QAEf,OAAO,CACL,oBAAC,2BAAY,oBACP,KAAK,IACT,YAAY,EACV,oBAAC,+DAA8B,IAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,wBAAW,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,IAClI,KAAK,CACyB,IACnC,CACH,CAAC;IACJ,CAAC;CACF;AA1BD,8DA0BC","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 { Orientation } from \"@itwin/core-react\";\nimport { HighlightedText } from \"../../common/HighlightedText\";\nimport { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport { CommonPropertyRenderer } from \"./CommonPropertyRenderer\";\nimport { PrimitivePropertyLabelRenderer } from \"./label/PrimitivePropertyLabelRenderer\";\nimport { SharedRendererProps } from \"./PropertyRenderer\";\nimport { PropertyView } from \"./PropertyView\";\n\n/** Properties of [[PrimitivePropertyRenderer]] React component\n * @public\n */\nexport interface PrimitiveRendererProps extends SharedRendererProps {\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 /** Multiplier of how much the property is indented to the right */\n indentation?: number;\n /** Properties used for highlighting\n */\n highlight?: HighlightingComponentProps;\n}\n\n/** React Component that renders primitive properties\n * @public\n */\nexport class PrimitivePropertyRenderer extends React.Component<PrimitiveRendererProps> {\n constructor(props: PrimitiveRendererProps) {\n super(props);\n }\n\n /** @internal */\n public override render() {\n const { children, indentation, highlight, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\n const displayLabel = this.props.propertyRecord.property.displayLabel;\n const offset = CommonPropertyRenderer.getLabelOffset(indentation, props.orientation, props.width, props.columnRatio, props.columnInfo?.minLabelWidth);\n\n const activeMatchIndex = this.props.propertyRecord.property.name === highlight?.activeHighlight?.highlightedItemIdentifier ? highlight.activeHighlight.highlightIndex : undefined;\n const label = highlight ?\n (HighlightedText({ text: displayLabel, searchText: highlight.highlightedText, activeMatchIndex })) :\n displayLabel;\n\n return (\n <PropertyView\n {...props}\n labelElement={\n <PrimitivePropertyLabelRenderer offset={offset} renderColon={this.props.orientation === Orientation.Horizontal} tooltip={displayLabel}>\n {label}\n </PrimitivePropertyLabelRenderer>}\n />\n );\n }\n}\n"]}
@@ -37,8 +37,7 @@ export interface SharedRendererProps {
37
37
  isSelectable?: boolean;
38
38
  /** Width of the whole property element */
39
39
  width?: number;
40
- /** Array of action button renderers
41
- * @beta */
40
+ /** Array of action button renderers */
42
41
  actionButtonRenderers?: ActionButtonRenderer[];
43
42
  /** Is resize handle hovered */
44
43
  isResizeHandleHovered?: boolean;
@@ -59,17 +58,13 @@ export interface PropertyRendererProps extends SharedRendererProps {
59
58
  propertyValueRendererManager?: PropertyValueRendererManager;
60
59
  /** Multiplier of how much the property is indented to the right */
61
60
  indentation?: number;
62
- /** Indicates property is being edited
63
- * @beta */
61
+ /** Indicates property is being edited */
64
62
  isEditing?: boolean;
65
- /** Called when property edit is committed.
66
- * @beta */
63
+ /** Called when property edit is committed. */
67
64
  onEditCommit?: (args: PropertyUpdatedArgs) => void;
68
- /** Called when property edit is cancelled.
69
- * @beta */
65
+ /** Called when property edit is cancelled. */
70
66
  onEditCancel?: () => void;
71
- /** Props used for highlighting.
72
- * @beta */
67
+ /** Props used for highlighting. */
73
68
  highlight?: HighlightingComponentProps;
74
69
  }
75
70
  /** State of [[PropertyRenderer]] React component
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAuB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAmB,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAErF,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,+BAA+B;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,qHAAqH;IACrH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,WAAW,EAAE,WAAW,CAAC;IACzB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,2FAA2F;IAC3F,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,mDAAmD;IACnD,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAA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AK,CAAC,SAAS,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IACjG,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAE7D;gBAEU,KAAK,EAAE,qBAAqB;WAI1B,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM;IAIzJ,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,aAAa,CAInB;IAEF,OAAO,CAAC,aAAa,CAInB;IAEF,iDAAiD;IAC1C,0BAA0B,CAAC,KAAK,EAAE,qBAAqB;IAY9D,gBAAgB;IACA,iBAAiB;IAIjC,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,qBAAqB;IAOnE,gBAAgB;IACA,MAAM;CA8BvB"}
1
+ {"version":3,"file":"PropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAuB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAmB,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAErF,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,+BAA+B;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B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AAmB;IAChE,4BAA4B;IAC5B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,mCAAmC;IACnC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AAED;;GAEG;AACH,UAAU,qBAAqB;IAC7B,sCAAsC;IACtC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,SAAS,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IACjG,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAE7D;gBAEU,KAAK,EAAE,qBAAqB;WAI1B,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM;IAIzJ,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,aAAa,CAInB;IAEF,OAAO,CAAC,aAAa,CAInB;IAEF,iDAAiD;IAC1C,0BAA0B,CAAC,KAAK,EAAE,qBAAqB;IAY9D,gBAAgB;IACA,iBAAiB;IAIjC,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,qBAAqB;IAOnE,gBAAgB;IACA,MAAM;CA8BvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyRenderer.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FA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AAK,sBAAsB,EAAI,CAC1D,CAAC;YACJ,KAAK,oCAAmB,CAAC,KAAK;gBAC5B,uDAAuD;gBACvD,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,KAAK;uBACxE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;oBACrD,OAAO,CACL,oBAAC,qDAAyB,oBAAK,sBAAsB,EAAI,CAC1D,CAAC;YACN,0CAA0C;YAC1C,KAAK,oCAAmB,CAAC,MAAM;gBAC7B,OAAO,CACL,oBAAC,2DAA4B,kBAC3B,aAAa,EAAE,IAAI,IACf,sBAAsB,EAC1B,CACH,CAAC;SACL;IACH,CAAC;CACF;AA7FD,4CA6FC","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 { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { Orientation, RatioChangeResult } from \"@itwin/core-react\";\nimport { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport { EditorContainer, PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\nimport { UiComponents } from \"../../UiComponents\";\nimport { PropertyValueRendererManager } from \"../ValueRendererManager\";\nimport { ActionButtonRenderer } from \"./ActionButtonRenderer\";\nimport { CommonPropertyRenderer } from \"./CommonPropertyRenderer\";\nimport { NonPrimitivePropertyRenderer } from \"./NonPrimitivePropertyRenderer\";\nimport { PrimitivePropertyRenderer, PrimitiveRendererProps } from \"./PrimitivePropertyRenderer\";\nimport { PropertyGridColumnInfo } from \"./PropertyGridColumns\";\n\n/** Properties shared by all renderers and PropertyView\n * @public\n */\nexport interface SharedRendererProps {\n /** PropertyRecord to render */\n propertyRecord: PropertyRecord;\n /** Unique string, that identifies this property component. Should be used if onClick or onRightClick are provided */\n uniqueKey?: string;\n /** Orientation to use for displaying the property */\n orientation: Orientation;\n /** Controls component selection */\n isSelected?: boolean;\n /** Called when property gets clicked. If undefined, clicking is disabled */\n onClick?: (property: PropertyRecord, key?: string) => void;\n /** Called when property gets right clicked. If undefined, right clicking is not working */\n onRightClick?: (property: PropertyRecord, key?: string) => void;\n /** Called to show a context menu for properties */\n onContextMenu?: (property: PropertyRecord, e: React.MouseEvent) => void;\n /** Ratio between label and value cells */\n columnRatio?: number;\n /** Callback to column ratio changed event */\n onColumnRatioChanged?: (ratio: number) => void | RatioChangeResult;\n /** Indicates that properties have *hover* effect */\n isHoverable?: boolean;\n /** Indicates that properties can be selected */\n isSelectable?: boolean;\n /** Width of the whole property element */\n width?: number;\n /** Array of action button renderers\n * @beta */\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/** Properties of [[PropertyRenderer]] React component\n * @public\n */\nexport interface PropertyRendererProps extends SharedRendererProps {\n /** Custom value renderer */\n propertyValueRendererManager?: PropertyValueRendererManager;\n /** Multiplier of how much the property is indented to the right */\n indentation?: number;\n /** Indicates property is being edited\n * @beta */\n isEditing?: boolean;\n /** Called when property edit is committed.\n * @beta */\n onEditCommit?: (args: PropertyUpdatedArgs) => void;\n /** Called when property edit is cancelled.\n * @beta */\n onEditCancel?: () => void;\n /** Props used for highlighting.\n * @beta */\n highlight?: HighlightingComponentProps;\n}\n\n/** State of [[PropertyRenderer]] React component\n * @internal\n */\ninterface PropertyRendererState {\n /** Currently loaded property value */\n displayValue?: React.ReactNode;\n}\n\n/** A React component that renders properties\n * @public\n */\nexport class PropertyRenderer extends React.Component<PropertyRendererProps, PropertyRendererState> {\n /** @internal */\n public override readonly state: Readonly<PropertyRendererState> = {\n displayValue: UiComponents.translate(\"general.loading\"),\n };\n\n constructor(props: PropertyRendererProps) {\n super(props);\n }\n\n public static getLabelOffset(indentation?: number, orientation?: Orientation, width?: number, columnRatio?: number, minColumnLabelWidth?: number): number {\n return CommonPropertyRenderer.getLabelOffset(indentation, orientation, width, columnRatio, minColumnLabelWidth);\n }\n\n private updateDisplayValue(props: PropertyRendererProps) {\n if (props.isEditing) {\n this.updateDisplayValueAsEditor(props);\n return;\n }\n\n const displayValue = CommonPropertyRenderer.createNewDisplayValue(props.orientation, props.propertyRecord, props.indentation, props.propertyValueRendererManager);\n this.setState({ displayValue });\n }\n\n private _onEditCommit = (args: PropertyUpdatedArgs) => {\n // istanbul ignore else\n if (this.props.onEditCommit)\n this.props.onEditCommit(args);\n };\n\n private _onEditCancel = () => {\n // istanbul ignore else\n if (this.props.onEditCancel)\n this.props.onEditCancel();\n };\n\n /** Display property record value in an editor */\n public updateDisplayValueAsEditor(props: PropertyRendererProps) {\n this.setState({\n displayValue:\n <EditorContainer\n propertyRecord={props.propertyRecord}\n onCommit={this._onEditCommit}\n onCancel={this._onEditCancel}\n setFocus={true}\n />,\n });\n }\n\n /** @internal */\n public override componentDidMount() {\n this.updateDisplayValue(this.props);\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: PropertyRendererProps) {\n if (prevProps.propertyRecord !== this.props.propertyRecord ||\n prevProps.isEditing !== this.props.isEditing ||\n prevProps.orientation !== this.props.orientation)\n this.updateDisplayValue(this.props);\n }\n\n /** @internal */\n public override render() {\n const { children, propertyValueRendererManager, isEditing, onEditCommit, onEditCancel, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\n const primitiveRendererProps: PrimitiveRendererProps = {\n ...props,\n valueElement: this.state.displayValue,\n indentation: this.props.indentation,\n };\n\n switch (this.props.propertyRecord.value.valueFormat) {\n case PropertyValueFormat.Primitive:\n return (\n <PrimitivePropertyRenderer {...primitiveRendererProps} />\n );\n case PropertyValueFormat.Array:\n // If array is empty, render it as a primitive property\n if (this.props.propertyRecord.value.valueFormat === PropertyValueFormat.Array\n && this.props.propertyRecord.value.items.length === 0)\n return (\n <PrimitivePropertyRenderer {...primitiveRendererProps} />\n );\n // eslint-disable-next-line no-fallthrough\n case PropertyValueFormat.Struct:\n return (\n <NonPrimitivePropertyRenderer\n isCollapsible={true}\n {...primitiveRendererProps}\n />\n );\n }\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyRenderer.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA4E;AAG5E,mEAAqF;AACrF,qDAAkD;AAGlD,qEAAkE;AAClE,iFAA8E;AAC9E,2EAAgG;AAuEhG;;GAEG;AACH,MAAa,gBAAiB,SAAQ,KAAK,CAAC,SAAuD;IAMjG,YAAY,KAA4B;QACtC,KAAK,CAAC,KAAK,CAAC,CAAC;QANf,gBAAgB;QACS,UAAK,GAAoC;YAChE,YAAY,EAAE,2BAAY,CAAC,SAAS,CAAC,iBAAiB,CAAC;SACxD,CAAC;QAoBM,kBAAa,GAAG,CAAC,IAAyB,EAAE,EAAE;YACpD,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY;gBACzB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC,CAAC;QAEM,kBAAa,GAAG,GAAG,EAAE;YAC3B,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY;gBACzB,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC9B,CAAC,CAAC;IA1BF,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC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AgB;IACA,MAAM;QACpB,MAAM,KAA8F,IAAI,CAAC,KAAK,EAAxG,EAAE,QAAQ,EAAE,4BAA4B,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,OAAyB,EAApB,KAAK,cAAzF,yFAA2F,CAAa,CAAC,CAAC,wDAAwD;QACxK,MAAM,sBAAsB,mCACvB,KAAK,KACR,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,GACpC,CAAC;QAEF,QAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE;YACnD,KAAK,oCAAmB,CAAC,SAAS;gBAChC,OAAO,CACL,oBAAC,qDAAyB,oBAAK,sBAAsB,EAAI,CAC1D,CAAC;YACJ,KAAK,oCAAmB,CAAC,KAAK;gBAC5B,uDAAuD;gBACvD,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,KAAK;uBACxE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;oBACrD,OAAO,CACL,oBAAC,qDAAyB,oBAAK,sBAAsB,EAAI,CAC1D,CAAC;YACN,0CAA0C;YAC1C,KAAK,oCAAmB,CAAC,MAAM;gBAC7B,OAAO,CACL,oBAAC,2DAA4B,kBAC3B,aAAa,EAAE,IAAI,IACf,sBAAsB,EAC1B,CACH,CAAC;SACL;IACH,CAAC;CACF;AA7FD,4CA6FC","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 { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { Orientation, RatioChangeResult } from \"@itwin/core-react\";\nimport { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport { EditorContainer, PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\nimport { UiComponents } from \"../../UiComponents\";\nimport { PropertyValueRendererManager } from \"../ValueRendererManager\";\nimport { ActionButtonRenderer } from \"./ActionButtonRenderer\";\nimport { CommonPropertyRenderer } from \"./CommonPropertyRenderer\";\nimport { NonPrimitivePropertyRenderer } from \"./NonPrimitivePropertyRenderer\";\nimport { PrimitivePropertyRenderer, PrimitiveRendererProps } from \"./PrimitivePropertyRenderer\";\nimport { PropertyGridColumnInfo } from \"./PropertyGridColumns\";\n\n/** Properties shared by all renderers and PropertyView\n * @public\n */\nexport interface SharedRendererProps {\n /** PropertyRecord to render */\n propertyRecord: PropertyRecord;\n /** Unique string, that identifies this property component. Should be used if onClick or onRightClick are provided */\n uniqueKey?: string;\n /** Orientation to use for displaying the property */\n orientation: Orientation;\n /** Controls component selection */\n isSelected?: boolean;\n /** Called when property gets clicked. If undefined, clicking is disabled */\n onClick?: (property: PropertyRecord, key?: string) => void;\n /** Called when property gets right clicked. If undefined, right clicking is not working */\n onRightClick?: (property: PropertyRecord, key?: string) => void;\n /** Called to show a context menu for properties */\n onContextMenu?: (property: PropertyRecord, e: React.MouseEvent) => void;\n /** Ratio between label and value cells */\n columnRatio?: number;\n /** Callback to column ratio changed event */\n onColumnRatioChanged?: (ratio: number) => void | RatioChangeResult;\n /** Indicates that properties have *hover* effect */\n isHoverable?: boolean;\n /** Indicates that properties can be selected */\n isSelectable?: boolean;\n /** Width of the whole property element */\n width?: number;\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/** Properties of [[PropertyRenderer]] React component\n * @public\n */\nexport interface PropertyRendererProps extends SharedRendererProps {\n /** Custom value renderer */\n propertyValueRendererManager?: PropertyValueRendererManager;\n /** Multiplier of how much the property is indented to the right */\n indentation?: number;\n /** Indicates property is being edited */\n isEditing?: boolean;\n /** Called when property edit is committed. */\n onEditCommit?: (args: PropertyUpdatedArgs) => void;\n /** Called when property edit is cancelled. */\n onEditCancel?: () => void;\n /** Props used for highlighting. */\n highlight?: HighlightingComponentProps;\n}\n\n/** State of [[PropertyRenderer]] React component\n * @internal\n */\ninterface PropertyRendererState {\n /** Currently loaded property value */\n displayValue?: React.ReactNode;\n}\n\n/** A React component that renders properties\n * @public\n */\nexport class PropertyRenderer extends React.Component<PropertyRendererProps, PropertyRendererState> {\n /** @internal */\n public override readonly state: Readonly<PropertyRendererState> = {\n displayValue: UiComponents.translate(\"general.loading\"),\n };\n\n constructor(props: PropertyRendererProps) {\n super(props);\n }\n\n public static getLabelOffset(indentation?: number, orientation?: Orientation, width?: number, columnRatio?: number, minColumnLabelWidth?: number): number {\n return CommonPropertyRenderer.getLabelOffset(indentation, orientation, width, columnRatio, minColumnLabelWidth);\n }\n\n private updateDisplayValue(props: PropertyRendererProps) {\n if (props.isEditing) {\n this.updateDisplayValueAsEditor(props);\n return;\n }\n\n const displayValue = CommonPropertyRenderer.createNewDisplayValue(props.orientation, props.propertyRecord, props.indentation, props.propertyValueRendererManager);\n this.setState({ displayValue });\n }\n\n private _onEditCommit = (args: PropertyUpdatedArgs) => {\n // istanbul ignore else\n if (this.props.onEditCommit)\n this.props.onEditCommit(args);\n };\n\n private _onEditCancel = () => {\n // istanbul ignore else\n if (this.props.onEditCancel)\n this.props.onEditCancel();\n };\n\n /** Display property record value in an editor */\n public updateDisplayValueAsEditor(props: PropertyRendererProps) {\n this.setState({\n displayValue:\n <EditorContainer\n propertyRecord={props.propertyRecord}\n onCommit={this._onEditCommit}\n onCancel={this._onEditCancel}\n setFocus={true}\n />,\n });\n }\n\n /** @internal */\n public override componentDidMount() {\n this.updateDisplayValue(this.props);\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: PropertyRendererProps) {\n if (prevProps.propertyRecord !== this.props.propertyRecord ||\n prevProps.isEditing !== this.props.isEditing ||\n prevProps.orientation !== this.props.orientation)\n this.updateDisplayValue(this.props);\n }\n\n /** @internal */\n public override render() {\n const { children, propertyValueRendererManager, isEditing, onEditCommit, onEditCancel, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\n const primitiveRendererProps: PrimitiveRendererProps = {\n ...props,\n valueElement: this.state.displayValue,\n indentation: this.props.indentation,\n };\n\n switch (this.props.propertyRecord.value.valueFormat) {\n case PropertyValueFormat.Primitive:\n return (\n <PrimitivePropertyRenderer {...primitiveRendererProps} />\n );\n case PropertyValueFormat.Array:\n // If array is empty, render it as a primitive property\n if (this.props.propertyRecord.value.valueFormat === PropertyValueFormat.Array\n && this.props.propertyRecord.value.items.length === 0)\n return (\n <PrimitivePropertyRenderer {...primitiveRendererProps} />\n );\n // eslint-disable-next-line no-fallthrough\n case PropertyValueFormat.Struct:\n return (\n <NonPrimitivePropertyRenderer\n isCollapsible={true}\n {...primitiveRendererProps}\n />\n );\n }\n }\n}\n"]}
@@ -11,9 +11,7 @@ export interface PropertyLabelRendererProps {
11
11
  children: string | JSX.Element;
12
12
  /** Indicates whether to render a colon after the label */
13
13
  renderColon?: boolean;
14
- /** Custom tooltip for the component.
15
- * @beta
16
- */
14
+ /** Custom tooltip for the component. */
17
15
  tooltip?: string;
18
16
  }
19
17
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyLabelRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/label/PropertyLabelRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,GAAC,GAAG,CAAC,OAAO,CAAC;IAC7B,0DAA0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,gBAAgB;AAChB,qBAAa,qBAAsB,SAAQ,KAAK,CAAC,aAAa,CAAC,0BAA0B,CAAC;IACxF,6EAA6E;WAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa;IAQ5C,MAAM;CAWvB"}
1
+ {"version":3,"file":"PropertyLabelRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/label/PropertyLabelRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,GAAC,GAAG,CAAC,OAAO,CAAC;IAC7B,0DAA0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,gBAAgB;AAChB,qBAAa,qBAAsB,SAAQ,KAAK,CAAC,aAAa,CAAC,0BAA0B,CAAC;IACxF,6EAA6E;WAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa;IAQ5C,MAAM;CAWvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyLabelRenderer.js","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/label/PropertyLabelRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,wCAAsC;AACtC,6CAA+B;AAgB/B,gBAAgB;AAChB,MAAa,qBAAsB,SAAQ,KAAK,CAAC,aAAyC;IACxF,6EAA6E;IACtE,MAAM,CAAC,QAAQ,CAAC,MAAe;QACpC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO;YACL,WAAW,EAAE,MAAM;YACnB,KAAK,EAAE,eAAe,MAAM,KAAK;SAClC,CAAC;IACJ,CAAC;IAEe,MAAM;;QACpB,MAAM,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,CAAC,OAAO,mCAAI,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC;QAC1I,OAAO,CACL;YACE,8BAAM,SAAS,EAAC,oCAAoC,EAAC,KAAK,EAAE,KAAK,IAC9D,IAAI,CAAC,KAAK,CAAC,QAAQ,CACf;YACN,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAC,0CAA0C,QAAS,CAAC,CAAC,CAAC,SAAS,CACxG,CACJ,CAAC;IACJ,CAAC;CACF;AArBD,sDAqBC","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 \"./PropertyLabelRenderer.scss\";\nimport * as React from \"react\";\n\n/** Base properties for a property label renderer\n * @public\n */\nexport interface PropertyLabelRendererProps {\n /** Label to be rendered */\n children: string|JSX.Element;\n /** Indicates whether to render a colon after the label */\n renderColon?: boolean;\n /** Custom tooltip for the component.\n * @beta\n */\n tooltip?: string;\n}\n\n/** @internal */\nexport class PropertyLabelRenderer extends React.PureComponent<PropertyLabelRendererProps> {\n /** Get React CSS style object based on provided offset from the left side */\n public static getStyle(offset?: number): React.CSSProperties {\n offset = offset ? offset : 0;\n return {\n paddingLeft: offset,\n width: `calc(100% - ${offset}px)`,\n };\n }\n\n public override render() {\n const title = this.props.tooltip ?? (typeof this.props.children == \"string\" ? this.props.children : /* istanbul ignore next */ undefined);\n return (\n <>\n <span className=\"components-property-label-renderer\" title={title}>\n {this.props.children}\n </span>\n {this.props.renderColon ? <span className=\"components-property-label-renderer-colon\">:</span> : undefined}\n </>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyLabelRenderer.js","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/label/PropertyLabelRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,wCAAsC;AACtC,6CAA+B;AAc/B,gBAAgB;AAChB,MAAa,qBAAsB,SAAQ,KAAK,CAAC,aAAyC;IACxF,6EAA6E;IACtE,MAAM,CAAC,QAAQ,CAAC,MAAe;QACpC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO;YACL,WAAW,EAAE,MAAM;YACnB,KAAK,EAAE,eAAe,MAAM,KAAK;SAClC,CAAC;IACJ,CAAC;IAEe,MAAM;;QACpB,MAAM,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,CAAC,OAAO,mCAAI,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC;QAC1I,OAAO,CACL;YACE,8BAAM,SAAS,EAAC,oCAAoC,EAAC,KAAK,EAAE,KAAK,IAC9D,IAAI,CAAC,KAAK,CAAC,QAAQ,CACf;YACN,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAC,0CAA0C,QAAS,CAAC,CAAC,CAAC,SAAS,CACxG,CACJ,CAAC;IACJ,CAAC;CACF;AArBD,sDAqBC","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 \"./PropertyLabelRenderer.scss\";\nimport * as React from \"react\";\n\n/** Base properties for a property label renderer\n * @public\n */\nexport interface PropertyLabelRendererProps {\n /** Label to be rendered */\n children: string|JSX.Element;\n /** Indicates whether to render a colon after the label */\n renderColon?: boolean;\n /** Custom tooltip for the component. */\n tooltip?: string;\n}\n\n/** @internal */\nexport class PropertyLabelRenderer extends React.PureComponent<PropertyLabelRendererProps> {\n /** Get React CSS style object based on provided offset from the left side */\n public static getStyle(offset?: number): React.CSSProperties {\n offset = offset ? offset : 0;\n return {\n paddingLeft: offset,\n width: `calc(100% - ${offset}px)`,\n };\n }\n\n public override render() {\n const title = this.props.tooltip ?? (typeof this.props.children == \"string\" ? this.props.children : /* istanbul ignore next */ undefined);\n return (\n <>\n <span className=\"components-property-label-renderer\" title={title}>\n {this.props.children}\n </span>\n {this.props.renderColon ? <span className=\"components-property-label-renderer-colon\">:</span> : undefined}\n </>\n );\n }\n}\n"]}
@@ -33,7 +33,7 @@ export declare function PrimitivePropertyValueRendererImpl(props: PrimitivePrope
33
33
  *
34
34
  * Default matcher matches all URLs using regex.
35
35
  * Default onClick opens window or sets location.href with found URL.
36
- * @beta
36
+ * @public
37
37
  */
38
38
  export declare const DEFAULT_LINKS_HANDLER: LinkElementsInfo;
39
39
  /** @internal */
@@ -70,7 +70,7 @@ exports.PrimitivePropertyValueRendererImpl = PrimitivePropertyValueRendererImpl;
70
70
  *
71
71
  * Default matcher matches all URLs using regex.
72
72
  * Default onClick opens window or sets location.href with found URL.
73
- * @beta
73
+ * @public
74
74
  */
75
75
  exports.DEFAULT_LINKS_HANDLER = {
76
76
  matcher: PropertyGridCommons_1.PropertyGridCommons.getLinks,
@@ -1 +1 @@
1
- {"version":3,"file":"PrimitivePropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA8G;AAC9G,iEAA8D;AAC9D,mFAAgF;AAChF,6FAA0F;AAC1F,mDAAkD;AAGlD;;GAEG;AACH,MAAa,8BAA8B;IAEzC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS,CAAC;IACpE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,OAAO,oBAAC,kCAAkC,IACxC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,8BAA8B,GACrD,CAAC;IACL,CAAC;CACF;AAfD,wEAeC;AAED;;;GAGG;AACH,SAAgB,8BAA8B,CAAC,MAAsB;;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,KAAuB,CAAC;IACjD,OAAO,2CAAoB,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAA,MAAM,CAAC,QAAQ,CAAC,SAAS,0CAAE,IAAI,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAChK,CAAC;AAHD,wEAGC;AAUD,gBAAgB;AAChB,SAAgB,kCAAkC,CAAC,KAA8C;;IAC/F,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,sBAAsB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACtI,OAAO,8BAAM,KAAK,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,KAAK,EAAE,KAAK,EAAE,WAAW,IAAG,OAAO,CAAQ,CAAC;AACjF,CAAC;AAHD,gFAGC;AAED;;;;;;;GAOG;AACU,QAAA,qBAAqB,GAAqB;IACrD,OAAO,EAAE,yCAAmB,CAAC,QAAQ;IACrC,OAAO,EAAE,yCAAmB,CAAC,eAAe;CAC7C,CAAC;AAEF,gBAAgB;AAChB,SAAgB,sBAAsB,CACpC,MAAsB,EACtB,qBAA2E,EAC3E,OAAsC,EACtC,YAA+B;;IAE/B,MAAM,WAAW,GAAG,IAAA,6BAAa,EAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjE,MAAM,EAAE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC;QACpC,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY;QACvB,CAAC,CAAC,oBAAC,2BAAa,IACd,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,MAAA,MAAA,MAAM,CAAC,KAAK,mCAAI,YAAY,mCAAI,6BAAqB,EAC5D,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,GACrC,CAAC;IACL,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACtC,CAAC;AAfD,wDAeC","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 { LinkElementsInfo, PrimitiveValue, PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { useAsyncValue } from \"../../../common/UseAsyncValue\";\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\nimport { PropertyGridCommons } from \"../../../propertygrid/component/PropertyGridCommons\";\nimport { LinksRenderer } from \"../../LinkHandler\";\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\n\n/** Default Primitive Property Renderer\n * @public\n */\nexport class PrimitivePropertyValueRenderer implements IPropertyValueRenderer {\n\n /** Checks if the renderer can handle given property */\n public canRender(record: PropertyRecord) {\n return record.value.valueFormat === PropertyValueFormat.Primitive;\n }\n\n /** Method that returns a JSX representation of PropertyRecord */\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\n return <PrimitivePropertyValueRendererImpl\n record={record}\n context={context}\n stringValueCalculator={convertPrimitiveRecordToString}\n />;\n }\n}\n\n/**\n * Function that converts primitive [[PropertyRecord]] to string\n * @internal\n */\nexport function convertPrimitiveRecordToString(record: PropertyRecord) {\n const primitive = record.value as PrimitiveValue;\n return TypeConverterManager.getConverter(record.property.typename, record.property.converter?.name).convertPropertyToString(record.property, primitive.value);\n}\n\n/** @internal */\ninterface PrimitivePropertyValueRendererImplProps {\n record: PropertyRecord;\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>;\n context?: PropertyValueRendererContext;\n linksHandler?: LinkElementsInfo;\n}\n\n/** @internal */\nexport function PrimitivePropertyValueRendererImpl(props: PrimitivePropertyValueRendererImplProps) {\n const { stringValue, element } = useRenderedStringValue(props.record, props.stringValueCalculator, props.context, props.linksHandler);\n return <span style={props.context?.style} title={stringValue}>{element}</span>;\n}\n\n/**\n * Default link handler used for handling records,\n * which did not have any specified LinkElementsInfo.\n *\n * Default matcher matches all URLs using regex.\n * Default onClick opens window or sets location.href with found URL.\n * @beta\n */\nexport const DEFAULT_LINKS_HANDLER: LinkElementsInfo = {\n matcher: PropertyGridCommons.getLinks,\n onClick: PropertyGridCommons.handleLinkClick,\n};\n\n/** @internal */\nexport function useRenderedStringValue(\n record: PropertyRecord,\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>,\n context?: PropertyValueRendererContext,\n linksHandler?: LinkElementsInfo,\n): { stringValue?: string, element: React.ReactNode } {\n const stringValue = useAsyncValue(stringValueCalculator(record));\n const el = (stringValue === undefined)\n ? context?.defaultValue\n : <LinksRenderer\n value={stringValue}\n links={record.links ?? linksHandler ?? DEFAULT_LINKS_HANDLER}\n highlighter={context?.textHighlighter}\n />;\n return { stringValue, element: el };\n}\n"]}
1
+ {"version":3,"file":"PrimitivePropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA8G;AAC9G,iEAA8D;AAC9D,mFAAgF;AAChF,6FAA0F;AAC1F,mDAAkD;AAGlD;;GAEG;AACH,MAAa,8BAA8B;IAEzC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS,CAAC;IACpE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,OAAO,oBAAC,kCAAkC,IACxC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,8BAA8B,GACrD,CAAC;IACL,CAAC;CACF;AAfD,wEAeC;AAED;;;GAGG;AACH,SAAgB,8BAA8B,CAAC,MAAsB;;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,KAAuB,CAAC;IACjD,OAAO,2CAAoB,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAA,MAAM,CAAC,QAAQ,CAAC,SAAS,0CAAE,IAAI,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAChK,CAAC;AAHD,wEAGC;AAUD,gBAAgB;AAChB,SAAgB,kCAAkC,CAAC,KAA8C;;IAC/F,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,sBAAsB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACtI,OAAO,8BAAM,KAAK,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,KAAK,EAAE,KAAK,EAAE,WAAW,IAAG,OAAO,CAAQ,CAAC;AACjF,CAAC;AAHD,gFAGC;AAED;;;;;;;GAOG;AACU,QAAA,qBAAqB,GAAqB;IACrD,OAAO,EAAE,yCAAmB,CAAC,QAAQ;IACrC,OAAO,EAAE,yCAAmB,CAAC,eAAe;CAC7C,CAAC;AAEF,gBAAgB;AAChB,SAAgB,sBAAsB,CACpC,MAAsB,EACtB,qBAA2E,EAC3E,OAAsC,EACtC,YAA+B;;IAE/B,MAAM,WAAW,GAAG,IAAA,6BAAa,EAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjE,MAAM,EAAE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC;QACpC,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY;QACvB,CAAC,CAAC,oBAAC,2BAAa,IACd,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,MAAA,MAAA,MAAM,CAAC,KAAK,mCAAI,YAAY,mCAAI,6BAAqB,EAC5D,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,GACrC,CAAC;IACL,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACtC,CAAC;AAfD,wDAeC","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 { LinkElementsInfo, PrimitiveValue, PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { useAsyncValue } from \"../../../common/UseAsyncValue\";\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\nimport { PropertyGridCommons } from \"../../../propertygrid/component/PropertyGridCommons\";\nimport { LinksRenderer } from \"../../LinkHandler\";\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\n\n/** Default Primitive Property Renderer\n * @public\n */\nexport class PrimitivePropertyValueRenderer implements IPropertyValueRenderer {\n\n /** Checks if the renderer can handle given property */\n public canRender(record: PropertyRecord) {\n return record.value.valueFormat === PropertyValueFormat.Primitive;\n }\n\n /** Method that returns a JSX representation of PropertyRecord */\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\n return <PrimitivePropertyValueRendererImpl\n record={record}\n context={context}\n stringValueCalculator={convertPrimitiveRecordToString}\n />;\n }\n}\n\n/**\n * Function that converts primitive [[PropertyRecord]] to string\n * @internal\n */\nexport function convertPrimitiveRecordToString(record: PropertyRecord) {\n const primitive = record.value as PrimitiveValue;\n return TypeConverterManager.getConverter(record.property.typename, record.property.converter?.name).convertPropertyToString(record.property, primitive.value);\n}\n\n/** @internal */\ninterface PrimitivePropertyValueRendererImplProps {\n record: PropertyRecord;\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>;\n context?: PropertyValueRendererContext;\n linksHandler?: LinkElementsInfo;\n}\n\n/** @internal */\nexport function PrimitivePropertyValueRendererImpl(props: PrimitivePropertyValueRendererImplProps) {\n const { stringValue, element } = useRenderedStringValue(props.record, props.stringValueCalculator, props.context, props.linksHandler);\n return <span style={props.context?.style} title={stringValue}>{element}</span>;\n}\n\n/**\n * Default link handler used for handling records,\n * which did not have any specified LinkElementsInfo.\n *\n * Default matcher matches all URLs using regex.\n * Default onClick opens window or sets location.href with found URL.\n * @public\n */\nexport const DEFAULT_LINKS_HANDLER: LinkElementsInfo = {\n matcher: PropertyGridCommons.getLinks,\n onClick: PropertyGridCommons.handleLinkClick,\n};\n\n/** @internal */\nexport function useRenderedStringValue(\n record: PropertyRecord,\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>,\n context?: PropertyValueRendererContext,\n linksHandler?: LinkElementsInfo,\n): { stringValue?: string, element: React.ReactNode } {\n const stringValue = useAsyncValue(stringValueCalculator(record));\n const el = (stringValue === undefined)\n ? context?.defaultValue\n : <LinksRenderer\n value={stringValue}\n links={record.links ?? linksHandler ?? DEFAULT_LINKS_HANDLER}\n highlighter={context?.textHighlighter}\n />;\n return { stringValue, element: el };\n}\n"]}
@@ -18,7 +18,7 @@ export interface PropertyCategoryRendererProps {
18
18
  }
19
19
  /**
20
20
  * Factory function that produces custom property category components.
21
- * @beta
21
+ * @beta
22
22
  */
23
23
  export declare type PropertyCategoryRenderer = (categoryItem: GridCategoryItem) => React.ComponentType<PropertyCategoryRendererProps> | undefined;
24
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategoryRendererManager.js","sourceRoot":"","sources":["../../../src/components-react/propertygrid/PropertyCategoryRendererManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAyBH;;;;GAIG;AACH,MAAa,+BAA+B;IAA5C;QACU,uBAAkB,GAAG,IAAI,GAAG,EAAoC,CAAC;IA4B3E,CAAC;IAxBC,mFAAmF;IAC5E,oBAAoB,CAAC,YAA8B;;QACxD,IAAI,YAAY,CAAC,eAAe,CAAC,QAAQ,KAAK,SAAS,EAAE;YACvD,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,MAAA,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,0CAAG,YAAY,CAAC,CAAC;IACjG,CAAC;IAED,qGAAqG;IAC9F,WAAW,CAAC,YAAoB,EAAE,gBAA0C,EAAE,QAAQ,GAAG,KAAK;QACnG,IAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC1D,MAAM,SAAS,GAAG,+BAA+B,CAAC,IAAI,CAAC;YACvD,MAAM,UAAU,GAAG,+BAA+B,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;YAC9E,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,IAAI,UAAU,qBAAqB,YAAY,wDAAwD,CAAC,CAAC;SACtI;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAC9D,CAAC;IAED,sDAAsD;IAC/C,cAAc,CAAC,YAAoB;QACxC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;;AA5BH,0EA6BC;AA1Be,8CAAc,GAAG,IAAI,+BAA+B,EAAE,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 * as React from \"react\";\nimport { VirtualizedPropertyGridContext } from \"./component/VirtualizedPropertyGrid\";\nimport { GridCategoryItem } from \"./internal/flat-items/FlatGridItem\";\n\n/**\n * Props that property category renderer receives.\n * @beta\n */\nexport interface PropertyCategoryRendererProps {\n /** The category being rendered. */\n categoryItem: GridCategoryItem;\n /** Context of the surrounding property grid. */\n gridContext: VirtualizedPropertyGridContext;\n /** Sets the allocated height for category contents. */\n onHeightChanged: (newHeight: number) => void;\n}\n\n/**\n * Factory function that produces custom property category components.\n * @beta\n */\nexport type PropertyCategoryRenderer = (categoryItem: GridCategoryItem) => React.ComponentType<PropertyCategoryRendererProps> | undefined;\n\n/**\n * Keeps a record of currently registered property category renderers and determines which renderers get invoked for\n * each category.\n * @beta\n */\nexport class PropertyCategoryRendererManager {\n private _categoryRenderers = new Map<string, PropertyCategoryRenderer>();\n\n public static defaultManager = new PropertyCategoryRendererManager();\n\n /** Retrieves a category rendering component based for the passed category item. */\n public getCategoryComponent(categoryItem: GridCategoryItem): React.ComponentType<PropertyCategoryRendererProps> | undefined {\n if (categoryItem.derivedCategory.renderer === undefined) {\n return undefined;\n }\n\n return this._categoryRenderers.get(categoryItem.derivedCategory.renderer.name)?.(categoryItem);\n }\n\n /** Registers a renderer factory function to be invoked on categories with specific renderer name. */\n public addRenderer(rendererName: string, categoryRenderer: PropertyCategoryRenderer, override = false): void {\n if (this._categoryRenderers.has(rendererName) && !override) {\n const className = PropertyCategoryRendererManager.name;\n const methodName = PropertyCategoryRendererManager.prototype.addRenderer.name;\n throw new Error(`${className}.${methodName} error: renderer '${rendererName}' has already been added. Did you mean to override it?`);\n }\n\n this._categoryRenderers.set(rendererName, categoryRenderer);\n }\n\n /** Removes previous renderer factory registration. */\n public removeRenderer(rendererName: string): void {\n this._categoryRenderers.delete(rendererName);\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyCategoryRendererManager.js","sourceRoot":"","sources":["../../../src/components-react/propertygrid/PropertyCategoryRendererManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAyBH;;;;GAIG;AACH,MAAa,+BAA+B;IAA5C;QACU,uBAAkB,GAAG,IAAI,GAAG,EAAoC,CAAC;IA4B3E,CAAC;IAxBC,mFAAmF;IAC5E,oBAAoB,CAAC,YAA8B;;QACxD,IAAI,YAAY,CAAC,eAAe,CAAC,QAAQ,KAAK,SAAS,EAAE;YACvD,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,MAAA,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,0CAAG,YAAY,CAAC,CAAC;IACjG,CAAC;IAED,qGAAqG;IAC9F,WAAW,CAAC,YAAoB,EAAE,gBAA0C,EAAE,QAAQ,GAAG,KAAK;QACnG,IAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC1D,MAAM,SAAS,GAAG,+BAA+B,CAAC,IAAI,CAAC;YACvD,MAAM,UAAU,GAAG,+BAA+B,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;YAC9E,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,IAAI,UAAU,qBAAqB,YAAY,wDAAwD,CAAC,CAAC;SACtI;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAC9D,CAAC;IAED,sDAAsD;IAC/C,cAAc,CAAC,YAAoB;QACxC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;;AA5BH,0EA6BC;AA1Be,8CAAc,GAAG,IAAI,+BAA+B,EAAE,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 * as React from \"react\";\nimport { VirtualizedPropertyGridContext } from \"./component/VirtualizedPropertyGrid\";\nimport { GridCategoryItem } from \"./internal/flat-items/FlatGridItem\";\n\n/**\n * Props that property category renderer receives.\n * @beta\n */\nexport interface PropertyCategoryRendererProps {\n /** The category being rendered. */\n categoryItem: GridCategoryItem;\n /** Context of the surrounding property grid. */\n gridContext: VirtualizedPropertyGridContext;\n /** Sets the allocated height for category contents. */\n onHeightChanged: (newHeight: number) => void;\n}\n\n/**\n * Factory function that produces custom property category components.\n * @beta\n */\nexport type PropertyCategoryRenderer = (categoryItem: GridCategoryItem) => React.ComponentType<PropertyCategoryRendererProps> | undefined;\n\n/**\n * Keeps a record of currently registered property category renderers and determines which renderers get invoked for\n * each category.\n * @beta\n */\nexport class PropertyCategoryRendererManager {\n private _categoryRenderers = new Map<string, PropertyCategoryRenderer>();\n\n public static defaultManager = new PropertyCategoryRendererManager();\n\n /** Retrieves a category rendering component based for the passed category item. */\n public getCategoryComponent(categoryItem: GridCategoryItem): React.ComponentType<PropertyCategoryRendererProps> | undefined {\n if (categoryItem.derivedCategory.renderer === undefined) {\n return undefined;\n }\n\n return this._categoryRenderers.get(categoryItem.derivedCategory.renderer.name)?.(categoryItem);\n }\n\n /** Registers a renderer factory function to be invoked on categories with specific renderer name. */\n public addRenderer(rendererName: string, categoryRenderer: PropertyCategoryRenderer, override = false): void {\n if (this._categoryRenderers.has(rendererName) && !override) {\n const className = PropertyCategoryRendererManager.name;\n const methodName = PropertyCategoryRendererManager.prototype.addRenderer.name;\n throw new Error(`${className}.${methodName} error: renderer '${rendererName}' has already been added. Did you mean to override it?`);\n }\n\n this._categoryRenderers.set(rendererName, categoryRenderer);\n }\n\n /** Removes previous renderer factory registration. */\n public removeRenderer(rendererName: string): void {\n this._categoryRenderers.delete(rendererName);\n }\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  /** @packageDocumentation
2
2
  * @module PropertyGrid
3
3
  */
4
- import { BeEvent } from "@itwin/core-bentley";
5
4
  import { PropertyRecord } from "@itwin/appui-abstract";
5
+ import { BeEvent } from "@itwin/core-bentley";
6
6
  /**
7
7
  * Contains metadata about a group of Properties.
8
8
  * @public
@@ -11,9 +11,7 @@ export interface PropertyCategory {
11
11
  name: string;
12
12
  label: string;
13
13
  expand: boolean;
14
- /** @beta */
15
14
  childCategories?: PropertyCategory[];
16
- /** @beta */
17
15
  renderer?: {
18
16
  name: string;
19
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyDataProvider.d.ts","sourceRoot":"","sources":["../../../src/components-react/propertygrid/PropertyDataProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAEhB,YAAY;IACZ,eAAe,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAErC,YAAY;IACZ,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,OAAO,EAAE;QAAE,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,EAAE,CAAA;KAAE,CAAC;IAEtD;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,MAAM,2BAA2B,GAAG,MAAM,IAAI,CAAC;AAE7D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,OAAO,CAAC,2BAA2B,CAAC;CAAI;AAErF;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,OAAO,EAAE,CAAC,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;IACvC,kCAAkC;IAClC,aAAa,EAAE,uBAAuB,CAAC;CACxC"}
1
+ {"version":3,"file":"PropertyDataProvider.d.ts","sourceRoot":"","sources":["../../../src/components-react/propertygrid/PropertyDataProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACrC,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,OAAO,EAAE;QAAE,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,EAAE,CAAA;KAAE,CAAC;IAEtD;;;OAGG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,MAAM,2BAA2B,GAAG,MAAM,IAAI,CAAC;AAE7D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,OAAO,CAAC,2BAA2B,CAAC;CAAI;AAErF;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,OAAO,EAAE,CAAC,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;IACvC,kCAAkC;IAClC,aAAa,EAAE,uBAAuB,CAAC;CACxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyDataProvider.js","sourceRoot":"","sources":["../../../src/components-react/propertygrid/PropertyDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8C;AA2C9C;;GAEG;AACH,MAAa,uBAAwB,SAAQ,sBAAoC;CAAI;AAArF,0DAAqF","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 { BeEvent } from \"@itwin/core-bentley\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\n\n/**\n * Contains metadata about a group of Properties.\n * @public\n */\nexport interface PropertyCategory {\n name: string;\n label: string;\n expand: boolean;\n\n /** @beta */\n childCategories?: PropertyCategory[];\n\n /** @beta */\n renderer?: {\n name: string;\n };\n}\n\n/**\n * Interface for property data provided to the PropertyGrid React component.\n * @public\n */\nexport interface PropertyData {\n label: PropertyRecord;\n description?: string;\n categories: PropertyCategory[];\n records: { [categoryName: string]: PropertyRecord[] };\n\n /**\n * Should state of existing property data in the component be re-used for this property data\n * @alpha\n */\n reusePropertyDataState?: boolean;\n}\n\n/** A signature for property data change listeners\n * @public\n */\nexport declare type PropertyDataChangesListener = () => void;\n\n/** An event broadcasted on property data changes\n * @public\n */\nexport class PropertyDataChangeEvent extends BeEvent<PropertyDataChangesListener> { }\n\n/**\n * An interface for property data provider which returns\n * property data and broadcasts an event when the data changes\n * @public\n */\nexport interface IPropertyDataProvider {\n /** Returns property data. */\n getData: (() => Promise<PropertyData>);\n /** Property data change event. */\n onDataChanged: PropertyDataChangeEvent;\n}\n"]}
1
+ {"version":3,"file":"PropertyDataProvider.js","sourceRoot":"","sources":["../../../src/components-react/propertygrid/PropertyDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,sDAA8C;AAsC9C;;GAEG;AACH,MAAa,uBAAwB,SAAQ,sBAAoC;CAAI;AAArF,0DAAqF","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 { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { BeEvent } from \"@itwin/core-bentley\";\n\n/**\n * Contains metadata about a group of Properties.\n * @public\n */\nexport interface PropertyCategory {\n name: string;\n label: string;\n expand: boolean;\n childCategories?: PropertyCategory[];\n renderer?: {\n name: string;\n };\n}\n\n/**\n * Interface for property data provided to the PropertyGrid React component.\n * @public\n */\nexport interface PropertyData {\n label: PropertyRecord;\n description?: string;\n categories: PropertyCategory[];\n records: { [categoryName: string]: PropertyRecord[] };\n\n /**\n * Should state of existing property data in the component be re-used for this property data\n * @alpha\n */\n reusePropertyDataState?: boolean;\n}\n\n/** A signature for property data change listeners\n * @public\n */\nexport declare type PropertyDataChangesListener = () => void;\n\n/** An event broadcasted on property data changes\n * @public\n */\nexport class PropertyDataChangeEvent extends BeEvent<PropertyDataChangesListener> { }\n\n/**\n * An interface for property data provider which returns\n * property data and broadcasts an event when the data changes\n * @public\n */\nexport interface IPropertyDataProvider {\n /** Returns property data. */\n getData: (() => Promise<PropertyData>);\n /** Property data change event. */\n onDataChanged: PropertyDataChangeEvent;\n}\n"]}
@@ -14,9 +14,7 @@ export interface PropertyCategoryBlockProps extends CommonProps {
14
14
  category: PropertyCategory;
15
15
  /** Callback to when PropertyCategoryBlock gets expended or collapsed */
16
16
  onExpansionToggled?: (categoryName: string) => void;
17
- /** Properties used for highlighting
18
- * @beta
19
- */
17
+ /** Properties used for highlighting */
20
18
  highlight?: HighlightingComponentProps;
21
19
  }
22
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategoryBlock.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,iCAAiC;IACjC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD;;MAEE;IACF,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,KAAK,CAAC,SAAS,CAAC,0BAA0B,CAAC;gBACxE,KAAK,EAAE,0BAA0B;IAI7C,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,aAAa,CAEnB;IAEF,gBAAgB;IACA,MAAM;CAkBvB"}
1
+ {"version":3,"file":"PropertyCategoryBlock.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,iCAAiC;IACjC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,uCAAuC;IACvC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,KAAK,CAAC,SAAS,CAAC,0BAA0B,CAAC;gBACxE,KAAK,EAAE,0BAA0B;IAI7C,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,aAAa,CAEnB;IAEF,gBAAgB;IACA,MAAM;CAkBvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,wDAAuD;AACvD,kEAA+D;AAmB/D;;;GAGG;AACH,MAAa,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;IAMD,gBAAgB;IACA,MAAM;;QACpB,6DAA6D;QAC7D,MAAM,KAAkE,IAAI,CAAC,KAAK,EAA5E,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,OAAyB,EAApB,KAAK,cAA7D,2DAA+D,CAAa,CAAC;QACnF,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,MAAK,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,eAAe,0CAAE,yBAAyB,CAAA,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;QACnK,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC;YACvB,CAAC,oBAAC,iCAAe,IAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,CAAC,eAAe,GAAI,CAAC,CAAC,CAAC;YACxH,QAAQ,CAAC,KAAK,CAAC;QACjB,OAAO,CACL,oBAAC,+BAAe,kBACd,UAAU,EAAE,QAAQ,CAAC,MAAM,EAC3B,QAAQ,EAAE,IAAI,CAAC,aAAa,EAC5B,KAAK,EAAE,KAAK,IACR,KAAK,GAER,QAAQ,CAAC,MAAM,IAAI,QAAQ,CACZ,CACnB,CAAC;IACJ,CAAC;CACF;AAjCD,sDAiCC","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 { CommonProps } from \"@itwin/core-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport { HighlightedText } from \"../../common/HighlightedText\";\nimport { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport { PropertyCategory } from \"../PropertyDataProvider\";\n\n/**\n * Properties for the [[PropertyCategoryBlock]] React component\n * @public\n */\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 * @beta\n */\n highlight?: HighlightingComponentProps;\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 /** @internal */\n public override render() {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { highlight, category, children, onExpansionToggled, ...props } = this.props;\n const activeMatchIndex = this.props.category.name === highlight?.activeHighlight?.highlightedItemIdentifier ? highlight.activeHighlight.highlightIndex : undefined;\n const label = highlight ?\n (<HighlightedText text={category.label} activeMatchIndex={activeMatchIndex} searchText={highlight.highlightedText} />) :\n category.label;\n return (\n <ExpandableBlock\n isExpanded={category.expand}\n onToggle={this._handleToggle}\n title={label}\n {...props}\n >\n {category.expand && children}\n </ExpandableBlock>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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QAAQ,CAAC,MAAM,IAAI,QAAQ,CACZ,CACnB,CAAC;IACJ,CAAC;CACF;AAjCD,sDAiCC","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 { CommonProps } from \"@itwin/core-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport { HighlightedText } from \"../../common/HighlightedText\";\nimport { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport { PropertyCategory } from \"../PropertyDataProvider\";\n\n/**\n * Properties for the [[PropertyCategoryBlock]] React component\n * @public\n */\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}\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 /** @internal */\n public override render() {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { highlight, category, children, onExpansionToggled, ...props } = this.props;\n const activeMatchIndex = this.props.category.name === highlight?.activeHighlight?.highlightedItemIdentifier ? highlight.activeHighlight.highlightIndex : undefined;\n const label = highlight ?\n (<HighlightedText text={category.label} activeMatchIndex={activeMatchIndex} searchText={highlight.highlightedText} />) :\n category.label;\n return (\n <ExpandableBlock\n isExpanded={category.expand}\n onToggle={this._handleToggle}\n title={label}\n {...props}\n >\n {category.expand && children}\n </ExpandableBlock>\n );\n }\n}\n"]}
@@ -69,8 +69,6 @@ export interface CommonPropertyGridProps extends CommonProps {
69
69
  /**
70
70
  * Array of action button renderers. Each renderer is called for each property and can decide
71
71
  * to render an action button for the property or not.
72
- *
73
- * @beta
74
72
  */
75
73
  actionButtonRenderers?: ActionButtonRenderer[];
76
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyGridCommons.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;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;AACH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,iGAAiG;IACjG,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,gDAAgD;IAChD,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,sEAAsE;IACtE,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAEpE,0CAA0C;IAC1C,0BAA0B,CAAC,E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I,EAAE,mBAAmB,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACpF;eACW;IACX,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAEhG,6CAA6C;IAC7C,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAE5D;eACW;IACX,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;eACW;IACX,6BAA6B,CAAC,EAAE,MAAM,CAAC;IAEvC,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAChD;AAED,gBAAgB;AAChB,qBAAa,mBAAmB;WAChB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,WAAW,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,6BAA6B,CAAC,EAAE,MAAM,GAAG,WAAW;IAazK;;;OAGG;WACW,eAAe,CAAC,IAAI,EAAE,MAAM;IAiB1C;;;OAGG;IACH,OAAc,QAAQ,UAAW,MAAM,KAAG,MAAM;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAI7E;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyGridCommons.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,kDAA6D;AAC7D,8CAAgD;AAmFhD,gBAAgB;AAChB,MAAa,mBAAmB;IACvB,MAAM,CAAC,qBAAqB,CAAC,KAAa,EAAE,oBAAkC,EAAE,kBAA4B,EAAE,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,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 { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { CommonProps, Orientation } from \"@itwin/core-react\";\nimport { matchLinks } from \"../../common/Links\";\nimport { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\nimport { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer\";\nimport { PropertyValueRendererManager } from \"../../properties/ValueRendererManager\";\nimport { PropertyCategory } from \"../PropertyDataProvider\";\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 */\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 * @beta */\n isPropertyEditingEnabled?: boolean;\n /** Callback for when properties are being edited\n * @beta */\n onPropertyEditing?: (args: PropertyEditingArgs, category: PropertyCategory) => void;\n /** Callback for when properties are updated\n * @beta */\n onPropertyUpdated?: (args: PropertyUpdatedArgs, category: PropertyCategory) => 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 * @beta */\n isOrientationFixed?: boolean;\n /** The minimum width before the auto-switch to Vertical when the width is too narrow. Defaults to 300.\n * @beta */\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 * @beta\n */\n actionButtonRenderers?: ActionButtonRenderer[];\n}\n\n/** @internal */\nexport class PropertyGridCommons {\n public static getCurrentOrientation(width: number, preferredOrientation?: Orientation, isOrientationFixed?: boolean, horizontalOrientationMinWidth?: number): Orientation {\n const orientation = preferredOrientation ?? Orientation.Horizontal;\n if (isOrientationFixed)\n return orientation;\n\n horizontalOrientationMinWidth = horizontalOrientationMinWidth ?? 300;\n // Switch to Vertical if width too small\n if (width < horizontalOrientationMinWidth)\n 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)\n return;\n const foundLink = linksArray[0];\n // istanbul ignore else\n if (foundLink && foundLink.url) {\n if (foundLink.schema === \"mailto:\" || foundLink.schema === \"pw:\")\n location.href = foundLink.url;\n else {\n const windowOpen = window.open(foundLink.url, \"_blank\");\n if (windowOpen)\n windowOpen.focus();\n }\n }\n }\n\n /**\n * A helper method to get links from string.\n * @internal\n */\n public static getLinks = (value: string): Array<{ start: number, end: number }> => {\n return matchLinks(value).map((linkInfo: { index: number, lastIndex: number }) => {\n return { start: linkInfo.index, end: linkInfo.lastIndex };\n });\n };\n}\n"]}
1
+ {"version":3,"file":"PropertyGridCommons.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,kDAA6D;AAC7D,8CAAgD;AAiFhD,gBAAgB;AAChB,MAAa,mBAAmB;IACvB,MAAM,CAAC,qBAAqB,CAAC,KAAa,EAAE,oBAAkC,EAAE,kBAA4B,EAAE,6BAAsC;QACzJ,MAAM,WAAW,GAAG,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,wBAAW,CAAC,UAAU,CAAC;QACnE,IAAI,kBAAkB;YACpB,OAAO,WAAW,CAAC;QAErB,6BAA6B,GAAG,6BAA6B,aAA7B,6BAA6B,cAA7B,6BAA6B,GAAI,GAAG,CAAC;QACrE,wCAAwC;QACxC,IAAI,KAAK,GAAG,6BAA6B;YACvC,OAAO,wBAAW,CAAC,QAAQ,CAAC;QAE9B,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,MAAM,UAAU,GAAG,IAAA,kBAAU,EAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YACxB,OAAO;QACT,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,uBAAuB;QACvB,IAAI,SAAS,IAAI,SAAS,CAAC,GAAG,EAAE;YAC9B,IAAI,SAAS,CAAC,MAAM,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,KAAK;gBAC9D,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC;iBAC3B;gBACH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;gBACxD,IAAI,UAAU;oBACZ,UAAU,CAAC,KAAK,EAAE,CAAC;aACtB;SACF;IACH,CAAC;;AAjCH,kDA4CC;AATC;;;GAGG;AACW,4BAAQ,GAAG,CAAC,KAAa,EAAyC,EAAE;IAChF,OAAO,IAAA,kBAAU,EAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,QAA8C,EAAE,EAAE;QAC9E,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5D,CAAC,CAAC,CAAC;AACL,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 { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { CommonProps, Orientation } from \"@itwin/core-react\";\nimport { matchLinks } from \"../../common/Links\";\nimport { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\nimport { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer\";\nimport { PropertyValueRendererManager } from \"../../properties/ValueRendererManager\";\nimport { PropertyCategory } from \"../PropertyDataProvider\";\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 */\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 * @beta */\n isPropertyEditingEnabled?: boolean;\n /** Callback for when properties are being edited\n * @beta */\n onPropertyEditing?: (args: PropertyEditingArgs, category: PropertyCategory) => void;\n /** Callback for when properties are updated\n * @beta */\n onPropertyUpdated?: (args: PropertyUpdatedArgs, category: PropertyCategory) => 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 * @beta */\n isOrientationFixed?: boolean;\n /** The minimum width before the auto-switch to Vertical when the width is too narrow. Defaults to 300.\n * @beta */\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}\n\n/** @internal */\nexport class PropertyGridCommons {\n public static getCurrentOrientation(width: number, preferredOrientation?: Orientation, isOrientationFixed?: boolean, horizontalOrientationMinWidth?: number): Orientation {\n const orientation = preferredOrientation ?? Orientation.Horizontal;\n if (isOrientationFixed)\n return orientation;\n\n horizontalOrientationMinWidth = horizontalOrientationMinWidth ?? 300;\n // Switch to Vertical if width too small\n if (width < horizontalOrientationMinWidth)\n 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)\n return;\n const foundLink = linksArray[0];\n // istanbul ignore else\n if (foundLink && foundLink.url) {\n if (foundLink.schema === \"mailto:\" || foundLink.schema === \"pw:\")\n location.href = foundLink.url;\n else {\n const windowOpen = window.open(foundLink.url, \"_blank\");\n if (windowOpen)\n windowOpen.focus();\n }\n }\n }\n\n /**\n * A helper method to get links from string.\n * @internal\n */\n public static getLinks = (value: string): Array<{ start: number, end: number }> => {\n return matchLinks(value).map((linkInfo: { index: number, lastIndex: number }) => {\n return { start: linkInfo.index, end: linkInfo.lastIndex };\n });\n };\n}\n"]}