@itwin/components-react 5.0.5 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/CHANGELOG.md +26 -12
  2. package/lib/cjs/components-react/editors/DateTimeEditor.scss +0 -1
  3. package/lib/components-react/UiComponents.js +2 -2
  4. package/lib/components-react/UiComponents.js.map +1 -1
  5. package/lib/components-react/common/CheckBoxState.js.map +1 -1
  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/ImageRenderer.js +4 -4
  9. package/lib/components-react/common/ImageRenderer.js.map +1 -1
  10. package/lib/components-react/common/Links.d.ts.map +1 -1
  11. package/lib/components-react/common/Links.js +0 -1
  12. package/lib/components-react/common/Links.js.map +1 -1
  13. package/lib/components-react/common/Orientation.js.map +1 -1
  14. package/lib/components-react/common/TimeFormat.js +1 -1
  15. package/lib/components-react/common/TimeFormat.js.map +1 -1
  16. package/lib/components-react/common/UseContextWithMandatoryProvider.js +1 -1
  17. package/lib/components-react/common/UseContextWithMandatoryProvider.js.map +1 -1
  18. package/lib/components-react/converters/DateTimeTypeConverter.d.ts.map +1 -1
  19. package/lib/components-react/converters/DateTimeTypeConverter.js +0 -1
  20. package/lib/components-react/converters/DateTimeTypeConverter.js.map +1 -1
  21. package/lib/components-react/converters/PointTypeConverter.d.ts.map +1 -1
  22. package/lib/components-react/converters/PointTypeConverter.js +0 -1
  23. package/lib/components-react/converters/PointTypeConverter.js.map +1 -1
  24. package/lib/components-react/converters/TypeConverter.d.ts.map +1 -1
  25. package/lib/components-react/converters/TypeConverter.js.map +1 -1
  26. package/lib/components-react/datepicker/DateField.js +2 -2
  27. package/lib/components-react/datepicker/DateField.js.map +1 -1
  28. package/lib/components-react/datepicker/DatePicker.js +1 -1
  29. package/lib/components-react/datepicker/DatePicker.js.map +1 -1
  30. package/lib/components-react/datepicker/DatePickerPopupButton.js +1 -1
  31. package/lib/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
  32. package/lib/components-react/datepicker/IntlFormatter.d.ts.map +1 -1
  33. package/lib/components-react/datepicker/TimeField.js +1 -1
  34. package/lib/components-react/datepicker/TimeField.js.map +1 -1
  35. package/lib/components-react/editors/BooleanEditor.d.ts +1 -0
  36. package/lib/components-react/editors/BooleanEditor.d.ts.map +1 -1
  37. package/lib/components-react/editors/BooleanEditor.js +1 -0
  38. package/lib/components-react/editors/BooleanEditor.js.map +1 -1
  39. package/lib/components-react/editors/CustomNumberEditor.d.ts.map +1 -1
  40. package/lib/components-react/editors/CustomNumberEditor.js +2 -3
  41. package/lib/components-react/editors/CustomNumberEditor.js.map +1 -1
  42. package/lib/components-react/editors/DateTimeEditor.d.ts.map +1 -1
  43. package/lib/components-react/editors/DateTimeEditor.js +1 -1
  44. package/lib/components-react/editors/DateTimeEditor.js.map +1 -1
  45. package/lib/components-react/editors/DateTimeEditor.scss +0 -1
  46. package/lib/components-react/editors/EditorContainer.d.ts.map +1 -1
  47. package/lib/components-react/editors/EditorContainer.js +8 -2
  48. package/lib/components-react/editors/EditorContainer.js.map +1 -1
  49. package/lib/components-react/editors/EnumButtonGroupEditor.d.ts +1 -0
  50. package/lib/components-react/editors/EnumButtonGroupEditor.d.ts.map +1 -1
  51. package/lib/components-react/editors/EnumButtonGroupEditor.js +1 -0
  52. package/lib/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
  53. package/lib/components-react/editors/EnumEditor.d.ts +1 -0
  54. package/lib/components-react/editors/EnumEditor.d.ts.map +1 -1
  55. package/lib/components-react/editors/EnumEditor.js +1 -0
  56. package/lib/components-react/editors/EnumEditor.js.map +1 -1
  57. package/lib/components-react/editors/IconEditor.d.ts.map +1 -1
  58. package/lib/components-react/editors/IconEditor.js.map +1 -1
  59. package/lib/components-react/editors/ImageCheckBoxEditor.d.ts +1 -0
  60. package/lib/components-react/editors/ImageCheckBoxEditor.d.ts.map +1 -1
  61. package/lib/components-react/editors/ImageCheckBoxEditor.js +2 -1
  62. package/lib/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
  63. package/lib/components-react/editors/NumericInputEditor.d.ts +1 -0
  64. package/lib/components-react/editors/NumericInputEditor.d.ts.map +1 -1
  65. package/lib/components-react/editors/NumericInputEditor.js +2 -1
  66. package/lib/components-react/editors/NumericInputEditor.js.map +1 -1
  67. package/lib/components-react/editors/PopupButton.js +3 -3
  68. package/lib/components-react/editors/PopupButton.js.map +1 -1
  69. package/lib/components-react/editors/SliderEditor.d.ts +1 -0
  70. package/lib/components-react/editors/SliderEditor.d.ts.map +1 -1
  71. package/lib/components-react/editors/SliderEditor.js +3 -2
  72. package/lib/components-react/editors/SliderEditor.js.map +1 -1
  73. package/lib/components-react/editors/TextEditor.d.ts +1 -0
  74. package/lib/components-react/editors/TextEditor.d.ts.map +1 -1
  75. package/lib/components-react/editors/TextEditor.js +3 -2
  76. package/lib/components-react/editors/TextEditor.js.map +1 -1
  77. package/lib/components-react/editors/TextareaEditor.d.ts +1 -0
  78. package/lib/components-react/editors/TextareaEditor.d.ts.map +1 -1
  79. package/lib/components-react/editors/TextareaEditor.js +1 -0
  80. package/lib/components-react/editors/TextareaEditor.js.map +1 -1
  81. package/lib/components-react/editors/ToggleEditor.d.ts +1 -0
  82. package/lib/components-react/editors/ToggleEditor.d.ts.map +1 -1
  83. package/lib/components-react/editors/ToggleEditor.js +1 -0
  84. package/lib/components-react/editors/ToggleEditor.js.map +1 -1
  85. package/lib/components-react/favorite/FavoritePropertyList.js +1 -1
  86. package/lib/components-react/favorite/FavoritePropertyList.js.map +1 -1
  87. package/lib/components-react/filter-builder/FilterBuilderState.js +1 -1
  88. package/lib/components-react/filter-builder/FilterBuilderState.js.map +1 -1
  89. package/lib/components-react/filtering/FilteringInput.d.ts +1 -0
  90. package/lib/components-react/filtering/FilteringInput.d.ts.map +1 -1
  91. package/lib/components-react/filtering/FilteringInput.js +1 -0
  92. package/lib/components-react/filtering/FilteringInput.js.map +1 -1
  93. package/lib/components-react/filtering/ResultSelector.d.ts +1 -0
  94. package/lib/components-react/filtering/ResultSelector.d.ts.map +1 -1
  95. package/lib/components-react/filtering/ResultSelector.js +1 -0
  96. package/lib/components-react/filtering/ResultSelector.js.map +1 -1
  97. package/lib/components-react/iconpicker/IconPickerButton.js.map +1 -1
  98. package/lib/components-react/inputs/ParsedInput.js +1 -1
  99. package/lib/components-react/inputs/ParsedInput.js.map +1 -1
  100. package/lib/components-react/l10n/LocalizationProvider.js +2 -2
  101. package/lib/components-react/l10n/LocalizationProvider.js.map +1 -1
  102. package/lib/components-react/properties/LinkHandler.d.ts +2 -2
  103. package/lib/components-react/properties/LinkHandler.d.ts.map +1 -1
  104. package/lib/components-react/properties/LinkHandler.js +2 -2
  105. package/lib/components-react/properties/LinkHandler.js.map +1 -1
  106. package/lib/components-react/properties/renderers/PropertyView.js +1 -1
  107. package/lib/components-react/properties/renderers/PropertyView.js.map +1 -1
  108. package/lib/components-react/properties/renderers/value/WithContextStyle.d.ts.map +1 -1
  109. package/lib/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js +1 -1
  110. package/lib/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js.map +1 -1
  111. package/lib/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
  112. package/lib/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
  113. package/lib/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  114. package/lib/components-react/propertygrid/component/PropertyList.js.map +1 -1
  115. package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +1 -0
  116. package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
  117. package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.js +1 -0
  118. package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  119. package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +1 -1
  120. package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
  121. package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts.map +1 -1
  122. package/lib/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
  123. package/lib/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +4 -4
  124. package/lib/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts.map +1 -1
  125. package/lib/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +8 -8
  126. package/lib/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  127. package/lib/components-react/selectable-content/SelectableContent.js +2 -2
  128. package/lib/components-react/selectable-content/SelectableContent.js.map +1 -1
  129. package/lib/components-react/toolbar/InternalToolbarComponent.d.ts +1 -1
  130. package/lib/components-react/toolbar/InternalToolbarComponent.d.ts.map +1 -1
  131. package/lib/components-react/toolbar/InternalToolbarComponent.js +11 -11
  132. package/lib/components-react/toolbar/InternalToolbarComponent.js.map +1 -1
  133. package/lib/components-react/toolbar/Item.js.map +1 -1
  134. package/lib/components-react/toolbar/ItemWrapper.js.map +1 -1
  135. package/lib/components-react/toolbar/Items.js.map +1 -1
  136. package/lib/components-react/toolbar/Overflow.d.ts +1 -1
  137. package/lib/components-react/toolbar/Overflow.d.ts.map +1 -1
  138. package/lib/components-react/toolbar/Overflow.js.map +1 -1
  139. package/lib/components-react/toolbar/OverflowPanel.js.map +1 -1
  140. package/lib/components-react/toolbar/PopupItem.js.map +1 -1
  141. package/lib/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
  142. package/lib/components-react/toolbar/PopupItemsPanel.js +2 -2
  143. package/lib/components-react/toolbar/PopupItemsPanel.js.map +1 -1
  144. package/lib/components-react/toolbar/Toolbar.js +1 -1
  145. package/lib/components-react/toolbar/Toolbar.js.map +1 -1
  146. package/lib/components-react/toolbar/ToolbarWithOverflow.js +1 -1
  147. package/lib/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
  148. package/lib/components-react/toolbar/groupPanel/BackArrow.js.map +1 -1
  149. package/lib/components-react/toolbar/groupPanel/Column.js.map +1 -1
  150. package/lib/components-react/toolbar/groupPanel/Columns.js.map +1 -1
  151. package/lib/components-react/toolbar/groupPanel/Panel.js.map +1 -1
  152. package/lib/components-react/toolbar/groupPanel/Title.js.map +1 -1
  153. package/lib/components-react/toolbar/groupPanel/tool/Expander.js.map +1 -1
  154. package/lib/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
  155. package/lib/components-react/toolbar/useConditionalSynchedItems.d.ts +1 -1
  156. package/lib/components-react/toolbar/useConditionalSynchedItems.d.ts.map +1 -1
  157. package/lib/components-react/toolbar/useConditionalSynchedItems.js +3 -3
  158. package/lib/components-react/toolbar/useConditionalSynchedItems.js.map +1 -1
  159. package/lib/components-react/toolbar/useDragInteraction.d.ts.map +1 -1
  160. package/lib/components-react/toolbar/useDragInteraction.js +1 -1
  161. package/lib/components-react/toolbar/useDragInteraction.js.map +1 -1
  162. package/lib/components-react/tree/TreeDataProvider.d.ts.map +1 -1
  163. package/lib/components-react/tree/controlled/Observable.js.map +1 -1
  164. package/lib/components-react/tree/controlled/TreeHooks.js +2 -2
  165. package/lib/components-react/tree/controlled/TreeHooks.js.map +1 -1
  166. package/lib/components-react/tree/controlled/TreeModel.js +3 -3
  167. package/lib/components-react/tree/controlled/TreeModel.js.map +1 -1
  168. package/lib/components-react/tree/controlled/TreeModelSource.js +2 -2
  169. package/lib/components-react/tree/controlled/TreeModelSource.js.map +1 -1
  170. package/lib/components-react/tree/controlled/TreeNodeLoader.js +1 -1
  171. package/lib/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
  172. package/lib/components-react/tree/controlled/component/ControlledTree.js +1 -1
  173. package/lib/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
  174. package/lib/components-react/tree/controlled/component/NodeContent.js +2 -2
  175. package/lib/components-react/tree/controlled/component/NodeContent.js.map +1 -1
  176. package/lib/components-react/tree/controlled/component/TreeNodeRenderer.js +3 -3
  177. package/lib/components-react/tree/controlled/component/TreeNodeRenderer.js.map +1 -1
  178. package/lib/components-react/tree/controlled/component/TreeRenderer.js +4 -4
  179. package/lib/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
  180. package/lib/components-react.js +1 -1
  181. package/lib/components-react.js.map +1 -1
  182. package/lib/esm/components-react/editors/DateTimeEditor.scss +0 -1
  183. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3,"file":"ParsedInput.js","sourceRoot":"","sources":["../../../src/components-react/inputs/ParsedInput.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAG7C,OAAO,oBAAoB,CAAC;AAsB5B,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAI5C,SAAS,qBAAqB,CAC9B,EACE,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,GACT,EACD,GAAG;IAEH,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACnD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,qBAAqB,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;IACtE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,CACxD,GAAG,EAAE,CAAC,qBAAqB,CAAC,OAAO,CACpC,CAAC;IACF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5D,KAAK,CAAC,SAAS,CAAC,G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AAM,UAAU,GAAG,UAAU,CAC3B,SAAS,EACT,yBAAyB,EACzB,WAAW,IAAI,mCAAmC,CACnD,CAAC;IAEF,OAAO,CACL,oBAAC,KAAK,mBACQ,yBAAyB,EACrC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,OAAO,GACZ,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH;;GAEG;AACH,mDAAmD;AACnD,MAAM,CAAC,MAAM,WAAW,GACtB,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 { Key } from \"ts-key-enum\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { ParseResults } from \"@itwin/appui-abstract\";\nimport \"./ParsedInput.scss\";\n\n/** Props for [[ParsedInput]] control\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof ParsedInput>`\n */\n// eslint-disable-next-line deprecation/deprecation\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<\n HTMLInputElement,\n /* eslint-disable-next-line deprecation/deprecation */\n ParsedInputProps\n>(function ForwardRefParsedInput(\n {\n initialValue,\n formatValue,\n parseString,\n readonly,\n className,\n style,\n onChange,\n },\n ref\n) {\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(\n () => lastFormattedValueRef.current\n );\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(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n setFormattedValue(event.currentTarget.value);\n },\n []\n );\n\n const updateValueFromString = React.useCallback(\n (strVal: string) => {\n if (lastFormattedValueRef.current === strVal) return;\n\n const parseResults = parseString(strVal);\n if (!parseResults.parseError) {\n if (\n undefined !== parseResults.value &&\n typeof parseResults.value === \"number\"\n ) {\n const currentValue = parseResults.value;\n if (currentValue !== currentValueRef.current) {\n currentValueRef.current = currentValue;\n onChange && onChange(currentValueRef.current);\n }\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 },\n [formatValue, onChange, parseString]\n );\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n updateValueFromString(event.target.value);\n },\n [updateValueFromString]\n );\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === Key.Enter.valueOf()) {\n updateValueFromString(event.currentTarget.value);\n event.preventDefault();\n }\n if (event.key === Key.Escape.valueOf()) {\n setFormattedValue(formatValue(currentValueRef.current));\n setHasBadInput(false);\n event.preventDefault();\n }\n },\n [formatValue, updateValueFromString]\n );\n\n const classNames = classnames(\n className,\n \"components-parsed-input\",\n hasBadInput && \"components-parsed-input-has-error\"\n );\n\n return (\n <Input\n data-testid=\"components-parsed-input\"\n ref={ref}\n style={style}\n className={classNames}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n onChange={handleChange}\n value={formattedValue}\n disabled={readonly}\n size=\"small\"\n />\n );\n});\n\n/** Generic Input component that requires formatting and parsing functions to be passed in as props.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const ParsedInput: (props: ParsedInputProps) => React.ReactNode =\n ForwardRefParsedInput;\n"]}
1
+ {"version":3,"file":"ParsedInput.js","sourceRoot":"","sources":["../../../src/components-react/inputs/ParsedInput.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAG7C,OAAO,oBAAoB,CAAC;AAsB5B,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAI5C,SAAS,qBAAqB,CAC9B,EACE,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,GACT,EACD,GAAG;IAEH,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACnD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,qBAAqB,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;IACtE,MA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O,EAAE,EAAE,CAAC;YACvC,iBAAiB,CAAC,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;YACxD,cAAc,CAAC,KAAK,CAAC,CAAC;YACtB,KAAK,CAAC,cAAc,EAAE,CAAC;QACzB,CAAC;IACH,CAAC,EACD,CAAC,WAAW,EAAE,qBAAqB,CAAC,CACrC,CAAC;IAEF,MAAM,UAAU,GAAG,UAAU,CAC3B,SAAS,EACT,yBAAyB,EACzB,WAAW,IAAI,mCAAmC,CACnD,CAAC;IAEF,OAAO,CACL,oBAAC,KAAK,mBACQ,yBAAyB,EACrC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,OAAO,GACZ,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH;;GAEG;AACH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,WAAW,GACtB,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 { Key } from \"ts-key-enum\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { ParseResults } from \"@itwin/appui-abstract\";\nimport \"./ParsedInput.scss\";\n\n/** Props for [[ParsedInput]] control\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof ParsedInput>`\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\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<\n HTMLInputElement,\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n ParsedInputProps\n>(function ForwardRefParsedInput(\n {\n initialValue,\n formatValue,\n parseString,\n readonly,\n className,\n style,\n onChange,\n },\n ref\n) {\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(\n () => lastFormattedValueRef.current\n );\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(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n setFormattedValue(event.currentTarget.value);\n },\n []\n );\n\n const updateValueFromString = React.useCallback(\n (strVal: string) => {\n if (lastFormattedValueRef.current === strVal) return;\n\n const parseResults = parseString(strVal);\n if (!parseResults.parseError) {\n if (\n undefined !== parseResults.value &&\n typeof parseResults.value === \"number\"\n ) {\n const currentValue = parseResults.value;\n if (currentValue !== currentValueRef.current) {\n currentValueRef.current = currentValue;\n onChange && onChange(currentValueRef.current);\n }\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 },\n [formatValue, onChange, parseString]\n );\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n updateValueFromString(event.target.value);\n },\n [updateValueFromString]\n );\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === Key.Enter.valueOf()) {\n updateValueFromString(event.currentTarget.value);\n event.preventDefault();\n }\n if (event.key === Key.Escape.valueOf()) {\n setFormattedValue(formatValue(currentValueRef.current));\n setHasBadInput(false);\n event.preventDefault();\n }\n },\n [formatValue, updateValueFromString]\n );\n\n const classNames = classnames(\n className,\n \"components-parsed-input\",\n hasBadInput && \"components-parsed-input-has-error\"\n );\n\n return (\n <Input\n data-testid=\"components-parsed-input\"\n ref={ref}\n style={style}\n className={classNames}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n onChange={handleChange}\n value={formattedValue}\n disabled={readonly}\n size=\"small\"\n />\n );\n});\n\n/** Generic Input component that requires formatting and parsing functions to be passed in as props.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport const ParsedInput: (props: ParsedInputProps) => React.ReactNode =\n ForwardRefParsedInput;\n"]}
@@ -11,9 +11,9 @@ import { LocalizationProvider as _LocalizationProvider } from "@itwin/core-react
11
11
  * @alpha
12
12
  */
13
13
  export function LocalizationProvider(
14
- // eslint-disable-next-line deprecation/deprecation
14
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
15
15
  props) {
16
- // eslint-disable-next-line deprecation/deprecation
16
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
17
17
  return React.createElement(_LocalizationProvider, { ...props });
18
18
  }
19
19
  //# sourceMappingURL=LocalizationProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../src/components-react/l10n/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAElF;;GAEG;AACH,MAAM,UAAU,oBAAoB;AAClC,mDAAmD;AACnD,KAAyD;IAEzD,mDAAmD;IACnD,OAAO,oBAAC,qBAAqB,OAAK,KAAK,GAAI,CAAC;AAC9C,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 Utilities\n */\nimport * as React from \"react\";\nimport { LocalizationProvider as _LocalizationProvider } from \"@itwin/core-react\";\n\n/** Provides localization capability to the components.\n * @alpha\n */\nexport function LocalizationProvider(\n // eslint-disable-next-line deprecation/deprecation\n props: React.ComponentProps<typeof _LocalizationProvider>\n) {\n // eslint-disable-next-line deprecation/deprecation\n return <_LocalizationProvider {...props} />;\n}\n"]}
1
+ {"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../src/components-react/l10n/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAElF;;GAEG;AACH,MAAM,UAAU,oBAAoB;AAClC,4DAA4D;AAC5D,KAAyD;IAEzD,4DAA4D;IAC5D,OAAO,oBAAC,qBAAqB,OAAK,KAAK,GAAI,CAAC;AAC9C,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 Utilities\n */\nimport * as React from \"react\";\nimport { LocalizationProvider as _LocalizationProvider } from \"@itwin/core-react\";\n\n/** Provides localization capability to the components.\n * @alpha\n */\nexport function LocalizationProvider(\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n props: React.ComponentProps<typeof _LocalizationProvider>\n) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return <_LocalizationProvider {...props} />;\n}\n"]}
@@ -6,12 +6,12 @@ import type { LinkElementsInfo } from "@itwin/appui-abstract";
6
6
  /** Renders anchor tag by wrapping or splitting provided text
7
7
  * @public
8
8
  */
9
- export declare const renderLinks: (text: string, links: LinkElementsInfo, highlight?: ((text: string) => React.ReactNode) | undefined) => React.ReactNode;
9
+ export declare const renderLinks: (text: string, links: LinkElementsInfo, highlight?: (text: string) => React.ReactNode) => React.ReactNode;
10
10
  /** If record has links, wraps stringValue in them, otherwise returns unchanged stringValue
11
11
  * Optionally it can highlight text
12
12
  * @public
13
13
  */
14
- export declare const withLinks: (stringValue: string, links?: LinkElementsInfo, highlight?: ((text: string) => React.ReactNode) | undefined) => React.ReactNode;
14
+ export declare const withLinks: (stringValue: string, links?: LinkElementsInfo, highlight?: (text: string) => React.ReactNode) => React.ReactNode;
15
15
  /**
16
16
  * Properties for [[LinksRenderer]] component.
17
17
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../src/components-react/properties/LinkHandler.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA2F9D;;GAEG;AACH,eAAO,MAAM,WAAW,SAChB,MAAM,SACL,gBAAgB,sBACJ,MAAM,KAAK,MAAM,SAAS,kBAC5C,MAAM,SAER,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,gBACP,MAAM,UACX,gBAAgB,sBACL,MAAM,KAAK,MAAM,SAAS,kBAC5C,MAAM,SAIR,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CACjD;AAED;;;GAGG;AAEH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAEtD"}
1
+ {"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../src/components-react/properties/LinkHandler.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA2F9D;;GAEG;AACH,eAAO,MAAM,WAAW,SAChB,MAAM,SACL,gBAAgB,cACX,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,KAC5C,KAAK,CAAC,SAER,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,gBACP,MAAM,UACX,gBAAgB,cACZ,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,KAC5C,KAAK,CAAC,SAIR,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CACjD;AAED;;;GAGG;AAEH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAEtD"}
@@ -11,7 +11,7 @@ import { UnderlinedButton } from "@itwin/core-react";
11
11
  /** Render a single anchor tag */
12
12
  function renderTag(text, links, highlight) {
13
13
  return (
14
- // eslint-disable-next-line deprecation/deprecation
14
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
15
15
  React.createElement(UnderlinedButton, { onClick: (e) => {
16
16
  e.preventDefault();
17
17
  e.stopPropagation();
@@ -76,7 +76,7 @@ export const withLinks = (stringValue, links, highlight) => {
76
76
  * React component for rendering string with links.
77
77
  * @public
78
78
  */
79
- // eslint-disable-next-line deprecation/deprecation
79
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
80
80
  export function LinksRenderer(props) {
81
81
  return React.createElement(React.Fragment, null, withLinks(props.value, props.links, props.highlighter));
82
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../src/components-react/properties/LinkHandler.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,iCAAiC;AACjC,SAAS,SAAS,CAChB,IAAY,EACZ,KAAuB,EACvB,SAA6C;IAE7C,OAAO;IACL,mDAAmD;IACnD,oBAAC,gBAAgB,IACf,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC,IAEA,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAClB,CACpB,CAAC;AACJ,CAAC;AAOD,SAAS,eAAe,CAAC,MAAa,EAAE,MAAa;IACnD,IAAI,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK;QAAE,OAAO,CAAC,CAAC;IAC1C,IAAI,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK;QAAE,OAAO,CAAC,CAAC,CAAC;IAC3C,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,cAAc,CACrB,IAAY,EACZ,SAA6C;IAE7C,OAAO,SAAS,CAAC,CA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A8D;IAC9D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAChC,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,KAAK,IAAG,IAAI,CAAkB,CACpD,CAAC,CAAC;AACL,CAAC;AAED,SAAS,iBAAiB,CACxB,IAAY,EACZ,SAA4C;IAE5C,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,IAAY,EACZ,KAAuB,EACvB,SAA6C,EAC5B,EAAE;IACnB,OAAO,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,WAAmB,EACnB,KAAwB,EACxB,SAA6C,EAC5B,EAAE;IACnB,IAAI,KAAK;QAAE,OAAO,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,IAAI,SAAS;QAAE,OAAO,iBAAiB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAChE,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAaF;;;GAGG;AACH,mDAAmD;AACnD,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,OAAO,0CAAG,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,CAAI,CAAC;AACvE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { BentleyError, BentleyStatus } from \"@itwin/core-bentley\";\nimport type { LinkElementsInfo } from \"@itwin/appui-abstract\";\nimport { UnderlinedButton } from \"@itwin/core-react\";\n\n/** Render a single anchor tag */\nfunction renderTag(\n text: string,\n links: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n) {\n return (\n // eslint-disable-next-line deprecation/deprecation\n <UnderlinedButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n links.onClick(text);\n }}\n >\n {highlight ? highlight(text) : text}\n </UnderlinedButton>\n );\n}\n\ninterface Match {\n start: number;\n end: number;\n}\n\nfunction matchComparison(matchA: Match, matchB: Match) {\n if (matchA.start > matchB.start) return 1;\n if (matchB.start > matchA.start) return -1;\n return 0;\n}\n\nfunction renderTextPart(\n text: string,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode {\n return highlight ? highlight(text) : text;\n}\n\nfunction renderText(\n text: string,\n links: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode {\n const { matcher } = links;\n\n if (!matcher) return renderTag(text, links, highlight);\n\n const matches = matcher(text);\n\n // Sort just to be sure\n matches.sort(matchComparison);\n\n const parts: React.ReactNode[] = [];\n let lastIndex = 0;\n for (const match of matches) {\n // If matches overlap there must be something wrong with the matcher\n if (lastIndex > match.start)\n throw new BentleyError(\n BentleyStatus.ERROR,\n \"renderText: matcher returned overlapping matches\"\n );\n\n if (lastIndex < match.start)\n parts.push(\n renderTextPart(text.substring(lastIndex, match.start), highlight)\n );\n\n const anchorText = text.substring(match.start, match.end);\n parts.push(renderTag(anchorText, links, highlight));\n\n lastIndex = match.end;\n }\n if (text.length > lastIndex)\n parts.push(renderTextPart(text.substring(lastIndex), highlight));\n\n // Need to map, because React complains about the lack of keys\n return parts.map((part, index) => (\n <React.Fragment key={index}>{part}</React.Fragment>\n ));\n}\n\nfunction renderHighlighted(\n text: string,\n highlight: (text: string) => React.ReactNode\n) {\n return highlight(text);\n}\n\n/** Renders anchor tag by wrapping or splitting provided text\n * @public\n */\nexport const renderLinks = (\n text: string,\n links: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode => {\n return renderText(text, links, highlight);\n};\n\n/** If record has links, wraps stringValue in them, otherwise returns unchanged stringValue\n * Optionally it can highlight text\n * @public\n */\nexport const withLinks = (\n stringValue: string,\n links?: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode => {\n if (links) return renderLinks(stringValue, links, highlight);\n if (highlight) return renderHighlighted(stringValue, highlight);\n return stringValue;\n};\n\n/**\n * Properties for [[LinksRenderer]] component.\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof LinksRenderer>`\n */\nexport interface LinksRendererProps {\n value: string;\n links?: LinkElementsInfo;\n highlighter?: (text: string) => React.ReactNode;\n}\n\n/**\n * React component for rendering string with links.\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function LinksRenderer(props: LinksRendererProps) {\n return <>{withLinks(props.value, props.links, props.highlighter)}</>;\n}\n"]}
1
+ {"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../src/components-react/properties/LinkHandler.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,iCAAiC;AACjC,SAAS,SAAS,CAChB,IAAY,EACZ,KAAuB,EACvB,SAA6C;IAE7C,OAAO;IACL,4DAA4D;IAC5D,oBAAC,gBAAgB,IACf,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC,IAEA,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAClB,CACpB,CAAC;AACJ,CAAC;AAOD,SA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CAAC,WAAW,CAAC,CAAI,CAAC;AACvE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { BentleyError, BentleyStatus } from \"@itwin/core-bentley\";\nimport type { LinkElementsInfo } from \"@itwin/appui-abstract\";\nimport { UnderlinedButton } from \"@itwin/core-react\";\n\n/** Render a single anchor tag */\nfunction renderTag(\n text: string,\n links: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n) {\n return (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <UnderlinedButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n links.onClick(text);\n }}\n >\n {highlight ? highlight(text) : text}\n </UnderlinedButton>\n );\n}\n\ninterface Match {\n start: number;\n end: number;\n}\n\nfunction matchComparison(matchA: Match, matchB: Match) {\n if (matchA.start > matchB.start) return 1;\n if (matchB.start > matchA.start) return -1;\n return 0;\n}\n\nfunction renderTextPart(\n text: string,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode {\n return highlight ? highlight(text) : text;\n}\n\nfunction renderText(\n text: string,\n links: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode {\n const { matcher } = links;\n\n if (!matcher) return renderTag(text, links, highlight);\n\n const matches = matcher(text);\n\n // Sort just to be sure\n matches.sort(matchComparison);\n\n const parts: React.ReactNode[] = [];\n let lastIndex = 0;\n for (const match of matches) {\n // If matches overlap there must be something wrong with the matcher\n if (lastIndex > match.start)\n throw new BentleyError(\n BentleyStatus.ERROR,\n \"renderText: matcher returned overlapping matches\"\n );\n\n if (lastIndex < match.start)\n parts.push(\n renderTextPart(text.substring(lastIndex, match.start), highlight)\n );\n\n const anchorText = text.substring(match.start, match.end);\n parts.push(renderTag(anchorText, links, highlight));\n\n lastIndex = match.end;\n }\n if (text.length > lastIndex)\n parts.push(renderTextPart(text.substring(lastIndex), highlight));\n\n // Need to map, because React complains about the lack of keys\n return parts.map((part, index) => (\n <React.Fragment key={index}>{part}</React.Fragment>\n ));\n}\n\nfunction renderHighlighted(\n text: string,\n highlight: (text: string) => React.ReactNode\n) {\n return highlight(text);\n}\n\n/** Renders anchor tag by wrapping or splitting provided text\n * @public\n */\nexport const renderLinks = (\n text: string,\n links: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode => {\n return renderText(text, links, highlight);\n};\n\n/** If record has links, wraps stringValue in them, otherwise returns unchanged stringValue\n * Optionally it can highlight text\n * @public\n */\nexport const withLinks = (\n stringValue: string,\n links?: LinkElementsInfo,\n highlight?: (text: string) => React.ReactNode\n): React.ReactNode => {\n if (links) return renderLinks(stringValue, links, highlight);\n if (highlight) return renderHighlighted(stringValue, highlight);\n return stringValue;\n};\n\n/**\n * Properties for [[LinksRenderer]] component.\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof LinksRenderer>`\n */\nexport interface LinksRendererProps {\n value: string;\n links?: LinkElementsInfo;\n highlighter?: (text: string) => React.ReactNode;\n}\n\n/**\n * React component for rendering string with links.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function LinksRenderer(props: LinksRendererProps) {\n return <>{withLinks(props.value, props.links, props.highlighter)}</>;\n}\n"]}
@@ -67,7 +67,7 @@ export class PropertyView extends React.Component {
67
67
  return (React.createElement("div", { style: columnsStyleProvider.getStyle(this.props.orientation, needActionButtons, ratio, needElementSeparator), className: this.getClassName(this.props), onClick: this._onClick, onContextMenu: this._onContextMenu, onMouseEnter: this._onMouseEnter, onMouseLeave: this._onMouseLeave, role: "presentation" },
68
68
  React.createElement("div", { className: "components-property-record-label" }, this.props.labelElement),
69
69
  needElementSeparator ? (
70
- // eslint-disable-next-line deprecation/deprecation
70
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
71
71
  React.createElement(ElementSeparator, { style: { margin: 0 }, movableArea: this.props.width, onRatioChanged: this.props.onColumnRatioChanged, ratio: ratio, orientation: this.props.orientation, isResizeHandleHovered: this.props.isResizeHandleHovered, onResizeHandleHoverChanged: this.props.onResizeHandleHoverChanged, isResizeHandleBeingDragged: this.props.isResizeHandleBeingDragged, onResizeHandleDragChanged: this.props.onResizeHandleDragChanged })) : undefined,
72
72
  renderValueElement ? (React.createElement("div", { className: "components-property-record-value" },
73
73
  React.createElement("span", null, this.props.valueElementRenderer
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyView.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PropertyView.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAmB1D;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,SAGvC;IACC,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAMP,aAAQ,GAAG,GAAG,EAAE;YACtB,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO;gBACpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACxE,CAAC,CAAC;QAEM,kBAAa,GAAG,GAAG,EAAE;YAC3B,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW;gBAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACjE,CAAC,CAAC;QAEM,kBA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BAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,yBAAyB,EAAE,IAAI,CAAC,KAAK,CAAC,yBAAyB,GAC/D,CACH,CAAC,CAAC,CAAC,SAAS;YACZ,kBAAkB,CAAC,CAAC,CAAC,CACpB,6BAAK,SAAS,EAAC,kCAAkC;gBAC/C,kCACG,IAAI,CAAC,KAAK,CAAC,oBAAoB;oBAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE;oBACnC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CACtB,CACH,CACP,CAAC,CAAC,CAAC,SAAS;YACZ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAClC,oBAAC,gBAAgB,IACf,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EACnC,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EACvC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,GACvD,CACH,CAAC,CAAC,CAAC,SAAS,CACT,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport \"./PropertyView.scss\";\nimport * as React from \"react\";\nimport { ElementSeparator } from \"@itwin/core-react\";\nimport { ActionButtonList } from \"./ActionButtonList.js\";\nimport { PropertyGridColumnStyleProvider } from \"./PropertyGridColumns.js\";\nimport type { SharedRendererProps } from \"./PropertyRenderer.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties of [[PropertyView]] React component\n * @public\n */\nexport interface PropertyViewProps extends SharedRendererProps {\n /** Property label as a React element */\n labelElement: React.ReactNode;\n /** Property value as a React element */\n valueElement?: React.ReactNode;\n /** Render callback for property value. If specified, `valueElement` is ignored */\n valueElementRenderer?: () => React.ReactNode;\n}\n\n/** @internal */\ninterface PropertyViewState {\n isHovered: boolean;\n}\n\n/**\n * A React component that renders property as label/value pair\n * @public\n */\nexport class PropertyView extends React.Component<\n PropertyViewProps,\n PropertyViewState\n> {\n constructor(props: PropertyViewProps) {\n super(props);\n this.state = {\n isHovered: false,\n };\n }\n\n private _onClick = () => {\n if (this.props.onClick)\n this.props.onClick(this.props.propertyRecord, this.props.uniqueKey);\n };\n\n private _onMouseEnter = () => {\n if (this.props.isHoverable) this.setState({ isHovered: true });\n };\n\n private _onMouseLeave = () => {\n if (this.props.isHoverable) this.setState({ isHovered: false });\n };\n\n private _onContextMenu = (e: React.MouseEvent) => {\n if (this.props.onContextMenu) {\n this.props.onContextMenu(this.props.propertyRecord, e);\n e.preventDefault();\n }\n if (this.props.onRightClick) {\n this.props.onRightClick(this.props.propertyRecord, this.props.uniqueKey);\n e.preventDefault();\n }\n return false;\n };\n\n private getClassName(props: PropertyViewProps) {\n let propertyRecordClassName =\n props.orientation === Orientation.Horizontal\n ? \"components-property-record--horizontal\"\n : \"components-property-record--vertical\";\n if (props.isSelected) propertyRecordClassName += \" components--selected\";\n if (props.onClick) propertyRecordClassName += \" components--clickable\";\n if (props.isHoverable) propertyRecordClassName += \" components--hoverable\";\n return propertyRecordClassName;\n }\n\n public override render() {\n const ratio = this.props.columnRatio ? this.props.columnRatio : 0.25;\n const needElementSeparator =\n this.props.orientation === Orientation.Horizontal &&\n !!this.props.onColumnRatioChanged;\n const needActionButtons = !!this.props.actionButtonRenderers;\n const columnsStyleProvider = new PropertyGridColumnStyleProvider(\n this.props.columnInfo\n );\n const renderValueElement = !!(\n this.props.valueElement || this.props.valueElementRenderer\n );\n\n return (\n <div\n style={columnsStyleProvider.getStyle(\n this.props.orientation,\n needActionButtons,\n ratio,\n needElementSeparator\n )}\n className={this.getClassName(this.props)}\n onClick={this._onClick}\n onContextMenu={this._onContextMenu}\n onMouseEnter={this._onMouseEnter}\n onMouseLeave={this._onMouseLeave}\n role=\"presentation\"\n >\n <div className=\"components-property-record-label\">\n {this.props.labelElement}\n </div>\n {needElementSeparator ? (\n // eslint-disable-next-line deprecation/deprecation\n <ElementSeparator\n style={{ margin: 0 }}\n movableArea={this.props.width}\n onRatioChanged={this.props.onColumnRatioChanged}\n ratio={ratio}\n orientation={this.props.orientation}\n isResizeHandleHovered={this.props.isResizeHandleHovered}\n onResizeHandleHoverChanged={this.props.onResizeHandleHoverChanged}\n isResizeHandleBeingDragged={this.props.isResizeHandleBeingDragged}\n onResizeHandleDragChanged={this.props.onResizeHandleDragChanged}\n />\n ) : undefined}\n {renderValueElement ? (\n <div className=\"components-property-record-value\">\n <span>\n {this.props.valueElementRenderer\n ? this.props.valueElementRenderer()\n : this.props.valueElement}\n </span>\n </div>\n ) : undefined}\n {this.props.actionButtonRenderers ? (\n <ActionButtonList\n orientation={this.props.orientation}\n property={this.props.propertyRecord}\n isPropertyHovered={this.state.isHovered}\n actionButtonRenderers={this.props.actionButtonRenderers}\n />\n ) : undefined}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyView.js","sourceRoot":"","sources":["../../../../src/components-react/properties/renderers/PropertyView.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAmB1D;;;GAGG;A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B,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,GACvD,CACH,CAAC,CAAC,CAAC,SAAS,CACT,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport \"./PropertyView.scss\";\nimport * as React from \"react\";\nimport { ElementSeparator } from \"@itwin/core-react\";\nimport { ActionButtonList } from \"./ActionButtonList.js\";\nimport { PropertyGridColumnStyleProvider } from \"./PropertyGridColumns.js\";\nimport type { SharedRendererProps } from \"./PropertyRenderer.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties of [[PropertyView]] React component\n * @public\n */\nexport interface PropertyViewProps extends SharedRendererProps {\n /** Property label as a React element */\n labelElement: React.ReactNode;\n /** Property value as a React element */\n valueElement?: React.ReactNode;\n /** Render callback for property value. If specified, `valueElement` is ignored */\n valueElementRenderer?: () => React.ReactNode;\n}\n\n/** @internal */\ninterface PropertyViewState {\n isHovered: boolean;\n}\n\n/**\n * A React component that renders property as label/value pair\n * @public\n */\nexport class PropertyView extends React.Component<\n PropertyViewProps,\n PropertyViewState\n> {\n constructor(props: PropertyViewProps) {\n super(props);\n this.state = {\n isHovered: false,\n };\n }\n\n private _onClick = () => {\n if (this.props.onClick)\n this.props.onClick(this.props.propertyRecord, this.props.uniqueKey);\n };\n\n private _onMouseEnter = () => {\n if (this.props.isHoverable) this.setState({ isHovered: true });\n };\n\n private _onMouseLeave = () => {\n if (this.props.isHoverable) this.setState({ isHovered: false });\n };\n\n private _onContextMenu = (e: React.MouseEvent) => {\n if (this.props.onContextMenu) {\n this.props.onContextMenu(this.props.propertyRecord, e);\n e.preventDefault();\n }\n if (this.props.onRightClick) {\n this.props.onRightClick(this.props.propertyRecord, this.props.uniqueKey);\n e.preventDefault();\n }\n return false;\n };\n\n private getClassName(props: PropertyViewProps) {\n let propertyRecordClassName =\n props.orientation === Orientation.Horizontal\n ? \"components-property-record--horizontal\"\n : \"components-property-record--vertical\";\n if (props.isSelected) propertyRecordClassName += \" components--selected\";\n if (props.onClick) propertyRecordClassName += \" components--clickable\";\n if (props.isHoverable) propertyRecordClassName += \" components--hoverable\";\n return propertyRecordClassName;\n }\n\n public override render() {\n const ratio = this.props.columnRatio ? this.props.columnRatio : 0.25;\n const needElementSeparator =\n this.props.orientation === Orientation.Horizontal &&\n !!this.props.onColumnRatioChanged;\n const needActionButtons = !!this.props.actionButtonRenderers;\n const columnsStyleProvider = new PropertyGridColumnStyleProvider(\n this.props.columnInfo\n );\n const renderValueElement = !!(\n this.props.valueElement || this.props.valueElementRenderer\n );\n\n return (\n <div\n style={columnsStyleProvider.getStyle(\n this.props.orientation,\n needActionButtons,\n ratio,\n needElementSeparator\n )}\n className={this.getClassName(this.props)}\n onClick={this._onClick}\n onContextMenu={this._onContextMenu}\n onMouseEnter={this._onMouseEnter}\n onMouseLeave={this._onMouseLeave}\n role=\"presentation\"\n >\n <div className=\"components-property-record-label\">\n {this.props.labelElement}\n </div>\n {needElementSeparator ? (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <ElementSeparator\n style={{ margin: 0 }}\n movableArea={this.props.width}\n onRatioChanged={this.props.onColumnRatioChanged}\n ratio={ratio}\n orientation={this.props.orientation}\n isResizeHandleHovered={this.props.isResizeHandleHovered}\n onResizeHandleHoverChanged={this.props.onResizeHandleHoverChanged}\n isResizeHandleBeingDragged={this.props.isResizeHandleBeingDragged}\n onResizeHandleDragChanged={this.props.onResizeHandleDragChanged}\n />\n ) : undefined}\n {renderValueElement ? (\n <div className=\"components-property-record-value\">\n <span>\n {this.props.valueElementRenderer\n ? this.props.valueElementRenderer()\n : this.props.valueElement}\n </span>\n </div>\n ) : undefined}\n {this.props.actionButtonRenderers ? (\n <ActionButtonList\n orientation={this.props.orientation}\n property={this.props.propertyRecord}\n isPropertyHovered={this.state.isHovered}\n actionButtonRenderers={this.props.actionButtonRenderers}\n />\n ) : undefined}\n </div>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"WithContextStyle.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/value/WithContextStyle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SACrB,MAAM,SAAS,YACX,4BAA4B,iGAIvC,CAAC"}
1
+ {"version":3,"file":"WithContextStyle.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/properties/renderers/value/WithContextStyle.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SACrB,KAAK,CAAC,SAAS,YACX,4BAA4B,iGAIvC,CAAC"}
@@ -55,7 +55,7 @@ export class TableNonPrimitiveValueRenderer extends React.PureComponent {
55
55
  // }
56
56
  render() {
57
57
  return (
58
- // eslint-disable-next-line deprecation/deprecation
58
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
59
59
  React.createElement(UnderlinedButton
60
60
  // ref={this._buttonRef}
61
61
  , {
@@ -1 +1 @@
1
- {"version":3,"file":"NonPrimitiveValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAwCrD;;;;GAIG;AACH,MAAM,OAAO,8BAA+B,SAAQ,KAAK,CAAC,aAAkD;IAA5G;QACE,6DAA6D;;QAErD,aAAQ,GAAG,GAAG,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY;gBAAE,OAAO;YAErC,MAAM,WAAW,GAAwB;gBACvC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc;gBAClC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;aAC9B,CAAC;YAEF,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IAkDJ,CAAC;IAhDC,2CAA2C;IAC3C,8DAA8D;IAC9D,mFAAmF;IACnF,6CAA6C;IAC7C,iCAAiC;IACjC,iCAAiC;IACjC,cAAc;IAEd,mDAAmD;IAEnD,wBAAwB;IACxB,cAAc;IAEd,6DAA6D;IAE7D,6CAA6C;IAC7C,uBAAuB;IACvB,iCAAiC;IACjC,oDAAoD;IACpD,SAAS;IACT,eAAe;IACf,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,OAAO;IACP,wCAAwC;IACxC,IAAI;IAEJ,iCAAiC;IACjC,gCAAgC;IAChC,gCAAgC;IAChC,IAAI;IAEY,MAAM;QACpB,OAAO;QACL,mDAAmD;QACnD,oBAAC,gBAAgB;QACf,wBAAwB;;YAAxB,wBAAwB;YACxB,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,mCAAmC;YACnC,mCAAmC;YACnC,KAAK,EAAE,QAAQ,IAAI,CAAC,KAAK,CAAC,WAAW,kBAAkB,IAEtD,IAAI,CAAC,KAAK,CAAC,WAAW,CACN,CACpB,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { UnderlinedButton } from \"@itwin/core-react\";\nimport type { PropertyDialogState } from \"../../../ValueRendererManager.js\";\nimport type { Orientation } from \"../../../../common/Orientation.js\";\n\n/** Properties for [[TableArrayValueRenderer]] and [[TableStructValueRenderer]] React component\n * @public\n */\nexport interface TableSpecificValueRendererProps\n extends SharedTableNonPrimitiveValueRendererProps {\n /** Property record */\n propertyRecord: PropertyRecord;\n /** Orientation of the rendered property */\n orientation: Orientation;\n}\n\n/** Shared properties between table non-primitive value renderers\n * @public\n */\nexport interface SharedTableNonPrimitiveValueRendererProps {\n // /** Callback to request for a Popup to be shown. */\n // onPopupShow?: (popupState: PropertyPopupState) => void;\n // /** Callback to request for a Popup to be hidden. */\n // onPopupHide?: () => void;\n /** Callback to request for dialog to be opened. */\n onDialogOpen?: (dialogState: PropertyDialogState) => void;\n}\n\n/** Properties for [[TableNonPrimitiveValueRenderer]] React component\n * @public\n */\nexport interface TableNonPrimitiveValueRendererProps\n extends SharedTableNonPrimitiveValueRendererProps {\n /** Title of the dialog that shows property in more detail. */\n dialogTitle: string;\n /** Contents of the dialog. Should be the property record shown in more detail. */\n dialogContents: React.ReactNode;\n /** Text that will be rendered in the table cell, in other words - Property value */\n buttonLabel: string;\n}\n\n/**\n * A React component that renders non primitive values as a button with text.\n * When clicked, a dialog appears that shows the value in greater detail.\n * @public\n */\nexport class TableNonPrimitiveValueRenderer extends React.PureComponent<TableNonPrimitiveValueRendererProps> {\n // private _buttonRef = React.createRef<HTMLButtonElement>();\n\n private _onClick = () => {\n if (!this.props.onDialogOpen) return;\n\n const dialogState: PropertyDialogState = {\n content: this.props.dialogContents,\n title: this.props.dialogTitle,\n };\n\n this.props.onDialogOpen(dialogState);\n };\n\n // TODO: Enable, when table gets refactored\n // Disabled fancy tooltips, because table controls it's state.\n // But, because everything is in table state and there is no shouldComponentUpdate,\n // tooltips cause rerender of the whole table\n // private _showTooltip = () => {\n // if (!this.props.onPopupShow)\n // return;\n\n // const buttonElement = this._buttonRef.current;\n\n // if (!buttonElement)\n // return;\n\n // const buttonBox = buttonElement.getBoundingClientRect();\n\n // const popupState: PropertyPopupState = {\n // fixedPosition: {\n // top: buttonBox.top - 10,\n // left: buttonBox.left + buttonBox.width / 2,\n // },\n // content:\n // <span className=\"components-table-value-popup\">\n // {`View ${this.props.buttonLabel} in more detail.`}\n // </span>,\n // };\n // this.props.onPopupShow(popupState);\n // }\n\n // private _hideTooltip = () => {\n // if (this.props.onPopupHide)\n // this.props.onPopupHide();\n // }\n\n public override render() {\n return (\n // eslint-disable-next-line deprecation/deprecation\n <UnderlinedButton\n // ref={this._buttonRef}\n className=\"components-table-value-button\"\n onClick={this._onClick}\n // onMouseEnter={this._showTooltip}\n // onMouseLeave={this._hideTooltip}\n title={`View ${this.props.buttonLabel} in more detail.`}\n >\n {this.props.buttonLabel}\n </UnderlinedButton>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"NonPrimitiveValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAwCrD;;;;GAIG;AACH,MAAM,OAAO,8BAA+B,SAAQ,KAAK,CAAC,aAAkD;IAA5G;QACE,6DAA6D;;QAErD,aAAQ,GAAG,GAAG,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY;gBAAE,OAAO;YAErC,MAAM,WAAW,GAAwB;gBACvC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc;gBAClC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;aAC9B,CAAC;YAEF,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IAkDJ,CAAC;IAhDC,2CAA2C;IAC3C,8DAA8D;IAC9D,mFAAmF;IACnF,6CAA6C;IAC7C,iCAAiC;IACjC,iCAAiC;IACjC,cAAc;IAEd,mDAAmD;IAEnD,wBAAwB;IACxB,cAAc;IAEd,6DAA6D;IAE7D,6CAA6C;IAC7C,uBAAuB;IACvB,iCAAiC;IACjC,oDAAoD;IACpD,SAAS;IACT,eAAe;IACf,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,OAAO;IACP,wCAAwC;IACxC,IAAI;IAEJ,iCAAiC;IACjC,gCAAgC;IAChC,gCAAgC;IAChC,IAAI;IAEY,MAAM;QACpB,OAAO;QACL,4DAA4D;QAC5D,oBAAC,gBAAgB;QACf,wBAAwB;;YAAxB,wBAAwB;YACxB,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,mCAAmC;YACnC,mCAAmC;YACnC,KAAK,EAAE,QAAQ,IAAI,CAAC,KAAK,CAAC,WAAW,kBAAkB,IAEtD,IAAI,CAAC,KAAK,CAAC,WAAW,CACN,CACpB,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { UnderlinedButton } from \"@itwin/core-react\";\nimport type { PropertyDialogState } from \"../../../ValueRendererManager.js\";\nimport type { Orientation } from \"../../../../common/Orientation.js\";\n\n/** Properties for [[TableArrayValueRenderer]] and [[TableStructValueRenderer]] React component\n * @public\n */\nexport interface TableSpecificValueRendererProps\n extends SharedTableNonPrimitiveValueRendererProps {\n /** Property record */\n propertyRecord: PropertyRecord;\n /** Orientation of the rendered property */\n orientation: Orientation;\n}\n\n/** Shared properties between table non-primitive value renderers\n * @public\n */\nexport interface SharedTableNonPrimitiveValueRendererProps {\n // /** Callback to request for a Popup to be shown. */\n // onPopupShow?: (popupState: PropertyPopupState) => void;\n // /** Callback to request for a Popup to be hidden. */\n // onPopupHide?: () => void;\n /** Callback to request for dialog to be opened. */\n onDialogOpen?: (dialogState: PropertyDialogState) => void;\n}\n\n/** Properties for [[TableNonPrimitiveValueRenderer]] React component\n * @public\n */\nexport interface TableNonPrimitiveValueRendererProps\n extends SharedTableNonPrimitiveValueRendererProps {\n /** Title of the dialog that shows property in more detail. */\n dialogTitle: string;\n /** Contents of the dialog. Should be the property record shown in more detail. */\n dialogContents: React.ReactNode;\n /** Text that will be rendered in the table cell, in other words - Property value */\n buttonLabel: string;\n}\n\n/**\n * A React component that renders non primitive values as a button with text.\n * When clicked, a dialog appears that shows the value in greater detail.\n * @public\n */\nexport class TableNonPrimitiveValueRenderer extends React.PureComponent<TableNonPrimitiveValueRendererProps> {\n // private _buttonRef = React.createRef<HTMLButtonElement>();\n\n private _onClick = () => {\n if (!this.props.onDialogOpen) return;\n\n const dialogState: PropertyDialogState = {\n content: this.props.dialogContents,\n title: this.props.dialogTitle,\n };\n\n this.props.onDialogOpen(dialogState);\n };\n\n // TODO: Enable, when table gets refactored\n // Disabled fancy tooltips, because table controls it's state.\n // But, because everything is in table state and there is no shouldComponentUpdate,\n // tooltips cause rerender of the whole table\n // private _showTooltip = () => {\n // if (!this.props.onPopupShow)\n // return;\n\n // const buttonElement = this._buttonRef.current;\n\n // if (!buttonElement)\n // return;\n\n // const buttonBox = buttonElement.getBoundingClientRect();\n\n // const popupState: PropertyPopupState = {\n // fixedPosition: {\n // top: buttonBox.top - 10,\n // left: buttonBox.left + buttonBox.width / 2,\n // },\n // content:\n // <span className=\"components-table-value-popup\">\n // {`View ${this.props.buttonLabel} in more detail.`}\n // </span>,\n // };\n // this.props.onPopupShow(popupState);\n // }\n\n // private _hideTooltip = () => {\n // if (this.props.onPopupHide)\n // this.props.onPopupHide();\n // }\n\n public override render() {\n return (\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n <UnderlinedButton\n // ref={this._buttonRef}\n className=\"components-table-value-button\"\n onClick={this._onClick}\n // onMouseEnter={this._showTooltip}\n // onMouseLeave={this._hideTooltip}\n title={`View ${this.props.buttonLabel} in more detail.`}\n >\n {this.props.buttonLabel}\n </UnderlinedButton>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAoBlE;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK,CAAC,SAAqC;IACpF,YAAY,KAAiC;QAC3C,KAAK,CAAC,KAAK,CAAC,CAAC;QAQP,kBAAa,GAAG,CAAC,YAAqB,EAAQ,EAAE;YACtD,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC,CAAC;IATF,CAAC;IAEO,eAAe;QACrB,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB;YAC/B,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAMe,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GACnE,IAAI,CAAC,KAAK,CAAC;QACb,MAAM,gBAAgB,GACpB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI;YACxB,SAAS,EAAE,eAAe,EAAE,yBAAyB;YACnD,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,cAAc;YAC1C,CAAC,CAAC,SAAS,CAAC;QAChB,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CACxB,oBAAC,eAAe,IACd,IAAI,EAAE,QAAQ,CAAC,KAAK,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,SAAS,CAAC,eAAe,GACrC,CACH,CAAC,CAAC,CAAC,CACF,QAAQ,CAAC,KAAK,CACf,CAAC;QACF,OAAO,CACL,oBAAC,eAAe,CAAC,OAAO,IACtB,UAAU,EAAE,QAAQ,CAAC,MAAM,EAC3B,QAAQ,EAAE,IAAI,CAAC,aAAa,EAC5B,IAAI,EAAC,OAAO,KACR,KAAK;YAET,oBAAC,eAAe,CAAC,OAAO,IAAC,KAAK,EAAE,KAAK,GAAI;YACzC,oBAAC,eAAe,CAAC,OAAO,IAAC,SAAS,EAAC,+BAA+B,IAC/D,QAAQ,CAAC,MAAM,IAAI,QAAQ,CACJ,CACF,CAC3B,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport { HighlightedText } from \"../../common/HighlightedText.js\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\n\n/**\n * Properties for the [[PropertyCategoryBlock]] React component\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface PropertyCategoryBlockProps extends CommonProps {\n /** Category of the properties */\n category: PropertyCategory;\n /** Callback to when PropertyCategoryBlock gets expended or collapsed */\n onExpansionToggled?: (categoryName: string) => void;\n /** Properties used for highlighting */\n highlight?: HighlightingComponentProps;\n /** Content */\n children?: React.ReactNode;\n}\n\n/**\n * PropertyCategoryBlock React component\n * @public\n */\nexport class PropertyCategoryBlock extends React.Component<PropertyCategoryBlockProps> {\n constructor(props: PropertyCategoryBlockProps) {\n super(props);\n }\n\n private toggleExpansion() {\n if (this.props.onExpansionToggled)\n this.props.onExpansionToggled(this.props.category.name);\n }\n\n private _handleToggle = (_isExpanding: boolean): void => {\n this.toggleExpansion();\n };\n\n public override render() {\n const { highlight, category, children, onExpansionToggled, ...other } =\n this.props;\n const activeMatchIndex =\n this.props.category.name ===\n highlight?.activeHighlight?.highlightedItemIdentifier\n ? highlight.activeHighlight.highlightIndex\n : undefined;\n const label = highlight ? (\n <HighlightedText\n text={category.label}\n activeMatchIndex={activeMatchIndex}\n searchText={highlight.highlightedText}\n />\n ) : (\n category.label\n );\n return (\n <ExpandableBlock.Wrapper\n isExpanded={category.expand}\n onToggle={this._handleToggle}\n size=\"small\"\n {...other}\n >\n <ExpandableBlock.Trigger label={label} />\n <ExpandableBlock.Content className=\"components-expandable-content\">\n {category.expand && children}\n </ExpandableBlock.Content>\n </ExpandableBlock.Wrapper>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAoBlE;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK,CAAC,SAAqC;IACpF,YAAY,KAAiC;QAC3C,KAAK,CAAC,KAAK,CAAC,CAAC;QAQP,kBAAa,GAAG,CAAC,YAAqB,EAAQ,EAAE;YACtD,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC,CAAC;IATF,CAAC;IAEO,eAAe;QACrB,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB;YAC/B,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAMe,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GACnE,IAAI,CAAC,KAAK,CAAC;QACb,MAAM,gBAAgB,GACpB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI;YACxB,SAAS,EAAE,eAAe,EAAE,yBAAyB;YACnD,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,cAAc;YAC1C,CAAC,CAAC,SAAS,CAAC;QAChB,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CACxB,oBAAC,eAAe,IACd,IAAI,EAAE,QAAQ,CAAC,KAAK,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,SAAS,CAAC,eAAe,GACrC,CACH,CAAC,CAAC,CAAC,CACF,QAAQ,CAAC,KAAK,CACf,CAAC;QACF,OAAO,CACL,oBAAC,eAAe,CAAC,OAAO,IACtB,UAAU,EAAE,QAAQ,CAAC,MAAM,EAC3B,QAAQ,EAAE,IAAI,CAAC,aAAa,EAC5B,IAAI,EAAC,OAAO,KACR,KAAK;YAET,oBAAC,eAAe,CAAC,OAAO,IAAC,KAAK,EAAE,KAAK,GAAI;YACzC,oBAAC,eAAe,CAAC,OAAO,IAAC,SAAS,EAAC,+BAA+B,IAC/D,QAAQ,CAAC,MAAM,IAAI,QAAQ,CACJ,CACF,CAC3B,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport { HighlightedText } from \"../../common/HighlightedText.js\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\n\n/**\n * Properties for the [[PropertyCategoryBlock]] React component\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface PropertyCategoryBlockProps extends CommonProps {\n /** Category of the properties */\n category: PropertyCategory;\n /** Callback to when PropertyCategoryBlock gets expended or collapsed */\n onExpansionToggled?: (categoryName: string) => void;\n /** Properties used for highlighting */\n highlight?: HighlightingComponentProps;\n /** Content */\n children?: React.ReactNode;\n}\n\n/**\n * PropertyCategoryBlock React component\n * @public\n */\nexport class PropertyCategoryBlock extends React.Component<PropertyCategoryBlockProps> {\n constructor(props: PropertyCategoryBlockProps) {\n super(props);\n }\n\n private toggleExpansion() {\n if (this.props.onExpansionToggled)\n this.props.onExpansionToggled(this.props.category.name);\n }\n\n private _handleToggle = (_isExpanding: boolean): void => {\n this.toggleExpansion();\n };\n\n public override render() {\n const { highlight, category, children, onExpansionToggled, ...other } =\n this.props;\n const activeMatchIndex =\n this.props.category.name ===\n highlight?.activeHighlight?.highlightedItemIdentifier\n ? highlight.activeHighlight.highlightIndex\n : undefined;\n const label = highlight ? (\n <HighlightedText\n text={category.label}\n activeMatchIndex={activeMatchIndex}\n searchText={highlight.highlightedText}\n />\n ) : (\n category.label\n );\n return (\n <ExpandableBlock.Wrapper\n isExpanded={category.expand}\n onToggle={this._handleToggle}\n size=\"small\"\n {...other}\n >\n <ExpandableBlock.Trigger label={label} />\n <ExpandableBlock.Content className=\"components-expandable-content\">\n {category.expand && children}\n </ExpandableBlock.Content>\n </ExpandableBlock.Wrapper>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyGridCommons.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAIA;;GA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AC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAMtC;CACH"}
1
+ {"version":3,"file":"PropertyGridCommons.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAE7F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,mCAAmC;IACnC,cAAc,EAAE,cAAc,CAAC;IAC/B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,mCAAmC;IACnC,cAAc,EAAE,cAAc,CAAC;IAC/B,sDAAsD;IACtD,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC;CACzB;AAED;;;GAGG;AAEH,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,iGAAiG;IACjG,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,gDAAgD;IAChD,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,sEAAsE;IACtE,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAEp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AC,EAAE,MAAM,GACrC,WAAW;IAWd;;;OAGG;WACW,eAAe,CAAC,IAAI,EAAE,MAAM;IAW1C;;;OAGG;IACH,OAAc,QAAQ,UACb,MAAM,KACZ,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAMtC;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyGridCommons.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAKH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM7D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AA8F1D,gBAAgB;AAChB,MAAM,OAAO,mBAAmB;IACvB,MAAM,CAAC,qBAAqB,CACjC,KAAa,EACb,oBAAkC,EAClC,kBAA4B,EAC5B,6BAAsC;QAEtC,MAAM,WAAW,GAAG,oBAAoB,IAAI,WAAW,CAAC,UAAU,CAAC;QACnE,IAAI,kBAAkB;YAAE,OAAO,WAAW,CAAC;QAE3C,6BAA6B,GAAG,6BAA6B,IAAI,GAAG,CAAC;QACrE,wCAAwC;QACxC,IAAI,KAAK,GAAG,6BAA6B;YAAE,OAAO,WAAW,CAAC,QAAQ,CAAC;QAEvE,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO;QACnC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;YACjC,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;;AAED;;;GAGG;AACW,4BAAQ,GAAG,CACvB,KAAa,EAC0B,EAAE;IACzC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAC1B,CAAC,QAA8C,EAAE,EAAE;QACjD,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps.js\";\nimport { matchLinks, openLink } from \"../../common/Links.js\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Arguments for the Property Editing event callback\n * @public\n */\nexport interface PropertyEditingArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** Unique key of currently edited property */\n propertyKey?: string;\n}\n\n/** Arguments for `PropertyGridProps.onPropertyContextMenu` callback\n * @public\n */\nexport interface PropertyGridContextMenuArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** An event which caused the context menu callback */\n event: React.MouseEvent;\n}\n\n/**\n * Common Property Grid Props to be used by Property Grid Variants\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface CommonPropertyGridProps extends CommonProps {\n /** Grid orientation. When not defined, it is chosen automatically based on width of the grid. */\n orientation?: Orientation;\n\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n\n /** Called to show a context menu when properties are right-clicked */\n onPropertyContextMenu?: (args: PropertyGridContextMenuArgs) => void;\n\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property selection with right click */\n isPropertySelectionOnRightClickEnabled?: boolean;\n /** Callback to property selection */\n onPropertySelectionChanged?: (property: PropertyRecord) => void;\n\n /** Enables/disables property editing */\n isPropertyEditingEnabled?: boolean;\n /** Callback for when properties are being edited */\n onPropertyEditing?: (\n args: PropertyEditingArgs,\n category: PropertyCategory\n ) => void;\n /** Callback for when properties are updated */\n onPropertyUpdated?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => Promise<boolean>;\n\n /** Custom property value renderer manager */\n propertyValueRendererManager?: PropertyValueRendererManager;\n\n /** Indicates whether the orientation is fixed and does not auto-switch to Vertical when the width is too narrow. Defaults to false. */\n isOrientationFixed?: boolean;\n /** The minimum width before the auto-switch to Vertical when the width is too narrow. Defaults to 300. */\n horizontalOrientationMinWidth?: number;\n\n /** Minimum allowed label column width, after which resizing stops */\n minLabelWidth?: number;\n /** Minimum allowed value column width, after which resizing stops */\n minValueWidth?: number;\n /** Fixed action button column width */\n actionButtonWidth?: number;\n\n /**\n * Array of action button renderers. Each renderer is called for each property and can decide\n * to render an action button for the property or not.\n */\n actionButtonRenderers?: ActionButtonRenderer[];\n /** Callback to determine which editors should be always visible */\n alwaysShowEditor?: (property: PropertyRecord) => boolean;\n}\n\n/**\n * Properties for highlighting text in property grid.\n * @public\n */\nexport interface PropertyGridContentHighlightProps\n extends HighlightingComponentProps {\n /**\n * Specifies what the highlighting should be applied on - category labels, property labels and / or property values.\n * Defaults to \"nowhere\".\n */\n filteredTypes?: FilteredType[];\n}\n\n/** @internal */\nexport class PropertyGridCommons {\n public static getCurrentOrientation(\n width: number,\n preferredOrientation?: Orientation,\n isOrientationFixed?: boolean,\n horizontalOrientationMinWidth?: number\n ): Orientation {\n const orientation = preferredOrientation ?? Orientation.Horizontal;\n if (isOrientationFixed) return orientation;\n\n horizontalOrientationMinWidth = horizontalOrientationMinWidth ?? 300;\n // Switch to Vertical if width too small\n if (width < horizontalOrientationMinWidth) return Orientation.Vertical;\n\n return orientation;\n }\n\n /**\n * Helper method to handle link clicks\n * @internal\n */\n public static handleLinkClick(text: string) {\n const linksArray = matchLinks(text);\n if (linksArray.length <= 0) return;\n const foundLink = linksArray[0];\n if (!foundLink || !foundLink.url) {\n return;\n }\n\n openLink(foundLink.url);\n }\n\n /**\n * A helper method to get links from string.\n * @internal\n */\n public static getLinks = (\n value: string\n ): Array<{ start: number; end: number }> => {\n return matchLinks(value).map(\n (linkInfo: { index: number; lastIndex: number }) => {\n return { start: linkInfo.index, end: linkInfo.lastIndex };\n }\n );\n };\n}\n"]}
1
+ {"version":3,"file":"PropertyGridCommons.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAKH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM7D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AA8F1D,gBAAgB;AAChB,MAAM,OAAO,mBAAmB;IACvB,MAAM,CAAC,qBAAqB,CACjC,KAAa,EACb,oBAAkC,EAClC,kBAA4B,EAC5B,6BAAsC;QAEtC,MAAM,WAAW,GAAG,oBAAoB,IAAI,WAAW,CAAC,UAAU,CAAC;QACnE,IAAI,kBAAkB;YAAE,OAAO,WAAW,CAAC;QAE3C,6BAA6B,GAAG,6BAA6B,IAAI,GAAG,CAAC;QACrE,wCAAwC;QACxC,IAAI,KAAK,GAAG,6BAA6B;YAAE,OAAO,WAAW,CAAC,QAAQ,CAAC;QAEvE,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO;QACnC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;YACjC,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;;AAED;;;GAGG;AACW,4BAAQ,GAAG,CACvB,KAAa,EAC0B,EAAE;IACzC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAC1B,CAAC,QAA8C,EAAE,EAAE;QACjD,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps.js\";\nimport { matchLinks, openLink } from \"../../common/Links.js\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Arguments for the Property Editing event callback\n * @public\n */\nexport interface PropertyEditingArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** Unique key of currently edited property */\n propertyKey?: string;\n}\n\n/** Arguments for `PropertyGridProps.onPropertyContextMenu` callback\n * @public\n */\nexport interface PropertyGridContextMenuArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** An event which caused the context menu callback */\n event: React.MouseEvent;\n}\n\n/**\n * Common Property Grid Props to be used by Property Grid Variants\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface CommonPropertyGridProps extends CommonProps {\n /** Grid orientation. When not defined, it is chosen automatically based on width of the grid. */\n orientation?: Orientation;\n\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n\n /** Called to show a context menu when properties are right-clicked */\n onPropertyContextMenu?: (args: PropertyGridContextMenuArgs) => void;\n\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property selection with right click */\n isPropertySelectionOnRightClickEnabled?: boolean;\n /** Callback to property selection */\n onPropertySelectionChanged?: (property: PropertyRecord) => void;\n\n /** Enables/disables property editing */\n isPropertyEditingEnabled?: boolean;\n /** Callback for when properties are being edited */\n onPropertyEditing?: (\n args: PropertyEditingArgs,\n category: PropertyCategory\n ) => void;\n /** Callback for when properties are updated */\n onPropertyUpdated?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => Promise<boolean>;\n\n /** Custom property value renderer manager */\n propertyValueRendererManager?: PropertyValueRendererManager;\n\n /** Indicates whether the orientation is fixed and does not auto-switch to Vertical when the width is too narrow. Defaults to false. */\n isOrientationFixed?: boolean;\n /** The minimum width before the auto-switch to Vertical when the width is too narrow. Defaults to 300. */\n horizontalOrientationMinWidth?: number;\n\n /** Minimum allowed label column width, after which resizing stops */\n minLabelWidth?: number;\n /** Minimum allowed value column width, after which resizing stops */\n minValueWidth?: number;\n /** Fixed action button column width */\n actionButtonWidth?: number;\n\n /**\n * Array of action button renderers. Each renderer is called for each property and can decide\n * to render an action button for the property or not.\n */\n actionButtonRenderers?: ActionButtonRenderer[];\n /** Callback to determine which editors should be always visible */\n alwaysShowEditor?: (property: PropertyRecord) => boolean;\n}\n\n/**\n * Properties for highlighting text in property grid.\n * @public\n */\nexport interface PropertyGridContentHighlightProps\n extends HighlightingComponentProps {\n /**\n * Specifies what the highlighting should be applied on - category labels, property labels and / or property values.\n * Defaults to \"nowhere\".\n */\n filteredTypes?: FilteredType[];\n}\n\n/** @internal */\nexport class PropertyGridCommons {\n public static getCurrentOrientation(\n width: number,\n preferredOrientation?: Orientation,\n isOrientationFixed?: boolean,\n horizontalOrientationMinWidth?: number\n ): Orientation {\n const orientation = preferredOrientation ?? Orientation.Horizontal;\n if (isOrientationFixed) return orientation;\n\n horizontalOrientationMinWidth = horizontalOrientationMinWidth ?? 300;\n // Switch to Vertical if width too small\n if (width < horizontalOrientationMinWidth) return Orientation.Vertical;\n\n return orientation;\n }\n\n /**\n * Helper method to handle link clicks\n * @internal\n */\n public static handleLinkClick(text: string) {\n const linksArray = matchLinks(text);\n if (linksArray.length <= 0) return;\n const foundLink = linksArray[0];\n if (!foundLink || !foundLink.url) {\n return;\n }\n\n openLink(foundLink.url);\n }\n\n /**\n * A helper method to get links from string.\n * @internal\n */\n public static getLinks = (\n value: string\n ): Array<{ start: number; end: number }> => {\n return matchLinks(value).map(\n (linkInfo: { index: number; lastIndex: number }) => {\n return { start: linkInfo.index, end: linkInfo.lastIndex };\n }\n );\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyList.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyList.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,MAAM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,CAAC,KAAK,CAAC,0BAA0B,EACjE,yBAAyB,EAAE,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAC/D,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GACjC,CACH,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport { PropertyRenderer } from \"../../properties/renderers/PropertyRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties of [[PropertyList]] React component\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface PropertyListProps extends CommonProps {\n orientation: Orientation;\n width: number;\n category?: PropertyCategory;\n properties: PropertyRecord[];\n selectedPropertyKey?: string;\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => void;\n columnRatio?: number;\n /** Callback to column ratio changed event */\n onColumnChanged?: (ratio: number) => void | {\n ratio: number;\n };\n propertyValueRendererManager?: PropertyValueRendererManager;\n editingPropertyKey?: string;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n onEditCancel?: () => void;\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property right click selection */\n isPropertyRightClickSelectionEnabled?: boolean;\n /** Array of action button renderers */\n actionButtonRenderers?: ActionButtonRenderer[];\n /** Is resize handle hovered */\n isResizeHandleHovered?: boolean;\n /** Callback to hover event change */\n onResizeHandleHoverChanged?: (isHovered: boolean) => void;\n /** Is resize handle being dragged */\n isResizeHandleBeingDragged?: boolean;\n /** Callback to drag event change */\n onResizeHandleDragChanged?: (isDragStarted: boolean) => void;\n /** Information for styling property grid columns */\n columnInfo?: PropertyGridColumnInfo;\n}\n\n/**\n * Get unique key for property record\n * @internal\n */\nexport function getPropertyKey(\n propertyCategory: PropertyCategory,\n propertyRecord: PropertyRecord\n) {\n return propertyCategory.name + propertyRecord.property.name;\n}\n\n/** A React component that renders multiple properties within a category as a list.\n * @public\n */\nexport class PropertyList extends React.Component<PropertyListProps> {\n constructor(props: PropertyListProps) {\n super(props);\n }\n\n private _listRef = React.createRef<HTMLDivElement>();\n\n private _onEditCommit = (args: PropertyUpdatedArgs) => {\n if (this.props.onEditCommit && this.props.category)\n this.props.onEditCommit(args, this.props.category);\n };\n\n public override render() {\n const propertyListClassName = classnames(\n this.props.orientation === Orientation.Horizontal\n ? \"components-property-list--horizontal\"\n : \"components-property-list--vertical\",\n this.props.className\n );\n\n return (\n <div\n className={propertyListClassName}\n style={this.props.style}\n ref={this._listRef}\n >\n {this.props.properties.map((propertyRecord: PropertyRecord) => {\n const key = this.props.category\n ? getPropertyKey(this.props.category, propertyRecord)\n : propertyRecord.property.name;\n return (\n <PropertyRenderer\n key={key}\n uniqueKey={key}\n isHoverable={this.props.isPropertyHoverEnabled}\n isSelectable={this.props.isPropertySelectionEnabled}\n isSelected={key === this.props.selectedPropertyKey}\n propertyRecord={propertyRecord}\n orientation={this.props.orientation}\n onClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyClicked\n : undefined\n }\n onRightClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyRightClicked\n : undefined\n }\n onContextMenu={this.props.onPropertyContextMenu}\n columnRatio={this.props.columnRatio}\n onColumnRatioChanged={this.props.onColumnChanged}\n propertyValueRendererManager={\n this.props.propertyValueRendererManager\n }\n isEditing={key === this.props.editingPropertyKey}\n onEditCommit={this._onEditCommit}\n onEditCancel={this.props.onEditCancel}\n width={this.props.width}\n actionButtonRenderers={this.props.actionButtonRenderers}\n isResizeHandleHovered={this.props.isResizeHandleHovered}\n onResizeHandleHoverChanged={this.props.onResizeHandleHoverChanged}\n isResizeHandleBeingDragged={this.props.isResizeHandleBeingDragged}\n onResizeHandleDragChanged={this.props.onResizeHandleDragChanged}\n columnInfo={this.props.columnInfo}\n />\n );\n })}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyList.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyList.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAkD1D;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,gBAAkC,EAClC,cAA8B;IAE9B,OAAO,gBAAgB,CAAC,IAAI,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,SAA4B;IAClE,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,C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C,WAAW,EACnC,OAAO,EACL,cAAc,CAAC,KAAK,CAAC,WAAW;oBAChC,mBAAmB,CAAC,SAAS;oBAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB;oBAC9B,CAAC,CAAC,SAAS,EAEf,YAAY,EACV,cAAc,CAAC,KAAK,CAAC,WAAW;oBAChC,mBAAmB,CAAC,SAAS;oBAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB;oBACnC,CAAC,CAAC,SAAS,EAEf,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAC/C,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,EAChD,4BAA4B,EAC1B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EAEzC,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAChD,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,yBAAyB,EAAE,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAC/D,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GACjC,CACH,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport { PropertyRenderer } from \"../../properties/renderers/PropertyRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties of [[PropertyList]] React component\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface PropertyListProps extends CommonProps {\n orientation: Orientation;\n width: number;\n category?: PropertyCategory;\n properties: PropertyRecord[];\n selectedPropertyKey?: string;\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => void;\n columnRatio?: number;\n /** Callback to column ratio changed event */\n onColumnChanged?: (ratio: number) => void | {\n ratio: number;\n };\n propertyValueRendererManager?: PropertyValueRendererManager;\n editingPropertyKey?: string;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n onEditCancel?: () => void;\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property right click selection */\n isPropertyRightClickSelectionEnabled?: boolean;\n /** Array of action button renderers */\n actionButtonRenderers?: ActionButtonRenderer[];\n /** Is resize handle hovered */\n isResizeHandleHovered?: boolean;\n /** Callback to hover event change */\n onResizeHandleHoverChanged?: (isHovered: boolean) => void;\n /** Is resize handle being dragged */\n isResizeHandleBeingDragged?: boolean;\n /** Callback to drag event change */\n onResizeHandleDragChanged?: (isDragStarted: boolean) => void;\n /** Information for styling property grid columns */\n columnInfo?: PropertyGridColumnInfo;\n}\n\n/**\n * Get unique key for property record\n * @internal\n */\nexport function getPropertyKey(\n propertyCategory: PropertyCategory,\n propertyRecord: PropertyRecord\n) {\n return propertyCategory.name + propertyRecord.property.name;\n}\n\n/** A React component that renders multiple properties within a category as a list.\n * @public\n */\nexport class PropertyList extends React.Component<PropertyListProps> {\n constructor(props: PropertyListProps) {\n super(props);\n }\n\n private _listRef = React.createRef<HTMLDivElement>();\n\n private _onEditCommit = (args: PropertyUpdatedArgs) => {\n if (this.props.onEditCommit && this.props.category)\n this.props.onEditCommit(args, this.props.category);\n };\n\n public override render() {\n const propertyListClassName = classnames(\n this.props.orientation === Orientation.Horizontal\n ? \"components-property-list--horizontal\"\n : \"components-property-list--vertical\",\n this.props.className\n );\n\n return (\n <div\n className={propertyListClassName}\n style={this.props.style}\n ref={this._listRef}\n >\n {this.props.properties.map((propertyRecord: PropertyRecord) => {\n const key = this.props.category\n ? getPropertyKey(this.props.category, propertyRecord)\n : propertyRecord.property.name;\n return (\n <PropertyRenderer\n key={key}\n uniqueKey={key}\n isHoverable={this.props.isPropertyHoverEnabled}\n isSelectable={this.props.isPropertySelectionEnabled}\n isSelected={key === this.props.selectedPropertyKey}\n propertyRecord={propertyRecord}\n orientation={this.props.orientation}\n onClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyClicked\n : undefined\n }\n onRightClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyRightClicked\n : undefined\n }\n onContextMenu={this.props.onPropertyContextMenu}\n columnRatio={this.props.columnRatio}\n onColumnRatioChanged={this.props.onColumnChanged}\n propertyValueRendererManager={\n this.props.propertyValueRendererManager\n }\n isEditing={key === this.props.editingPropertyKey}\n onEditCommit={this._onEditCommit}\n onEditCancel={this.props.onEditCancel}\n width={this.props.width}\n actionButtonRenderers={this.props.actionButtonRenderers}\n isResizeHandleHovered={this.props.isResizeHandleHovered}\n onResizeHandleHoverChanged={this.props.onResizeHandleHoverChanged}\n isResizeHandleBeingDragged={this.props.isResizeHandleBeingDragged}\n onResizeHandleDragChanged={this.props.onResizeHandleDragChanged}\n columnInfo={this.props.columnInfo}\n />\n );\n })}\n </div>\n );\n }\n}\n"]}
@@ -99,6 +99,7 @@ export interface VirtualizedPropertyGridContext {
99
99
  export declare class VirtualizedPropertyGrid extends React.Component<VirtualizedPropertyGridProps, VirtualizedPropertyGridState> {
100
100
  private _listRef;
101
101
  constructor(props: VirtualizedPropertyGridProps);
102
+ /** @internal */
102
103
  componentDidUpdate(prevProps: VirtualizedPropertyGridProps): void;
103
104
  /** @internal */
104
105
  static getDerivedStateFromProps(props: VirtualizedPropertyGridProps, state: VirtualizedPropertyGridState): VirtualizedPropertyGridState | null;
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedPropertyGrid.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAE7F,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,wCAAwC,CAAC;AAMhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,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AAM,KAAK,IAAI,GAAG;QAC9C,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,yBAAyB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,0BAA0B,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAExD,SAAS,CAAC,EAAE,iCAAiC,CAAC;CAC/C;AAeD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAC1D,4BAA4B,EAC5B,4BAA4B,CAC7B;IACC,OAAO,CAAC,QAAQ,CAAuC;gBAE3C,KAAK,EAAE,4BAA4B;IAgB/B,kBAAkB,CAAC,SAAS,EAAE,4BAA4B;IAyC1E,gBAAgB;WACF,wBAAwB,CACpC,KAAK,EAAE,4BAA4B,EACnC,KAAK,EAAE,4BAA4B,GAClC,4BAA4B,GAAG,IAAI;IAOtC,OAAO,CAAC,iBAAiB;IAgBzB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAuB3B,OAAO,CAAC,uBAAuB,CAqB7B;IAEF,OAAO,CAAC,2BAA2B,CAGjC;IAEF,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,WAAW,CAGjB;IAEF,OAAO,CAAC,gBAAgB,CAQtB;IAEc,MAAM;CA6GvB;AAsCD;;;;GAIG;AACH,wBAAgB,uCAAuC,CAAC,CAAC,SAAS,OAAO;;;;EAExE"}
1
+ {"version":3,"file":"VirtualizedPropertyGrid.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MA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
74
  };
75
75
  }
76
+ /** @internal */
76
77
  componentDidUpdate(prevProps) {
77
78
  if (this.props.orientation !== prevProps.orientation ||
78
79
  this.props.isOrientationFixed !== prevProps.isOrientationFixed ||