@itwin/grouping-mapping-widget 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/GroupingMappingWidget.js +15 -28
- package/lib/cjs/GroupingMappingWidget.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMapping.d.ts +1 -2
- package/lib/cjs/WidgetShell/GroupingMapping.js +1 -1
- package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingContent.d.ts +2 -3
- package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingHeader.d.ts +0 -1
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js +2 -1
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -1
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.d.ts +2 -3
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
- package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.d.ts +0 -1
- package/lib/cjs/common/hooks/useIsMounted.d.ts +0 -1
- package/lib/cjs/common/hooks/useMemoizedCollectionPick.js +1 -2
- package/lib/cjs/common/hooks/useMemoizedCollectionPick.js.map +1 -1
- package/lib/cjs/common/utils.d.ts +1 -1
- package/lib/cjs/common/utils.js +10 -21
- package/lib/cjs/common/utils.js.map +1 -1
- package/lib/cjs/common/viewerUtils.js.map +1 -1
- package/lib/cjs/components/Constants.js +1 -1
- package/lib/cjs/components/Constants.js.map +1 -1
- package/lib/cjs/components/GroupingMappingContext.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupAction.d.ts +0 -1
- package/lib/cjs/components/Groups/Editing/GroupAction.js +9 -5
- package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetails.d.ts +0 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.d.ts +0 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsStep.d.ts +0 -1
- package/lib/cjs/components/Groups/GroupColorLegend.d.ts +0 -1
- package/lib/cjs/components/Groups/GroupListItem.d.ts +0 -1
- package/lib/cjs/components/Groups/GroupListItem.js.map +1 -1
- package/lib/cjs/components/Groups/GroupMenuActions.d.ts +0 -1
- package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -1
- package/lib/cjs/components/Groups/GroupOverlapProgressBar.d.ts +0 -1
- package/lib/cjs/components/Groups/Groups.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsAddButton.d.ts +0 -1
- package/lib/cjs/components/Groups/GroupsShowHideButtons.d.ts +0 -1
- package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsView.d.ts +1 -1
- package/lib/cjs/components/Groups/GroupsVisualization.d.ts +0 -1
- package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsVisualizationActions.d.ts +0 -1
- package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -1
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.d.ts +0 -1
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js +28 -9
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js +36 -33
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.d.ts +0 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +0 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.d.ts +0 -1
- package/lib/cjs/components/Groups/ToggleGroupVisibility.d.ts +0 -1
- package/lib/cjs/components/Groups/groupsHelpers.d.ts +1 -1
- package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +0 -1
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js +1 -2
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useVisualization.d.ts +0 -1
- package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -1
- package/lib/cjs/components/Mappings/BlockingOverlay.d.ts +0 -1
- package/lib/cjs/components/Mappings/Editing/MappingAction.d.ts +0 -1
- package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -2
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.d.ts +0 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +8 -0
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.d.ts +0 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.d.ts +0 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.d.ts +0 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.d.ts +0 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.d.ts +0 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.d.ts +1 -2
- package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.d.ts +0 -1
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +1 -2
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectIModel.d.ts +0 -1
- package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectITwin.d.ts +0 -1
- package/lib/cjs/components/Mappings/Import/SelectITwin.js +1 -1
- package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectMappings.d.ts +0 -1
- package/lib/cjs/components/Mappings/MappingListItem.d.ts +0 -1
- package/lib/cjs/components/Mappings/MappingListItem.js +1 -2
- package/lib/cjs/components/Mappings/MappingListItem.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingViewActionGroup.d.ts +0 -1
- package/lib/cjs/components/Mappings/Mappings.d.ts +1 -2
- package/lib/cjs/components/Mappings/MappingsView.js +1 -1
- package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -2
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.d.ts +0 -1
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.d.ts +0 -1
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +2 -3
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +0 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +17 -4
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +0 -1
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +0 -1
- package/lib/cjs/components/Properties/GroupColorToggle.d.ts +1 -2
- package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/cjs/components/Properties/GroupInformationPanel.d.ts +0 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.d.ts +0 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +0 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.d.ts +0 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.d.ts +0 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +4 -6
- package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/SaveModal.d.ts +0 -1
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +0 -1
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyAction.d.ts +0 -1
- package/lib/cjs/components/Properties/PropertyAction.js +7 -3
- package/lib/cjs/components/Properties/PropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyMenu.d.ts +0 -1
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.d.ts +0 -1
- package/lib/cjs/components/Properties/PropertyNameCell.d.ts +0 -1
- package/lib/cjs/components/Properties/PropertyTable.d.ts +0 -1
- package/lib/cjs/components/Properties/PropertyTableToolbar.d.ts +0 -1
- package/lib/cjs/components/Properties/ScrollableExpandableBlock.js.map +1 -1
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +2 -2
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -1
- package/lib/cjs/components/Properties/hooks/useForwardRef.js.map +1 -1
- package/lib/cjs/components/Properties/hooks/useValidator.js.map +1 -1
- package/lib/cjs/components/SharedComponents/ActionPanel.d.ts +0 -1
- package/lib/cjs/components/SharedComponents/DeleteModal.d.ts +0 -1
- package/lib/cjs/components/SharedComponents/EmptyMessage.d.ts +0 -1
- package/lib/cjs/components/SharedComponents/LoadingOverlay.d.ts +0 -1
- package/lib/cjs/components/SharedComponents/LoadingSpinner.d.ts +0 -1
- package/lib/cjs/components/SharedComponents/StatusIcon.d.ts +1 -1
- package/lib/cjs/components/context/ExtractionClientContext.d.ts +0 -1
- package/lib/cjs/components/context/ExtractionClientContext.js.map +1 -1
- package/lib/cjs/components/context/ExtractionStateJobContext.js.map +1 -1
- package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -1
- package/lib/cjs/components/context/GroupingApiConfigContext.d.ts +2 -2
- package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -1
- package/lib/cjs/components/context/GroupingMappingCustomUIContext.d.ts +0 -1
- package/lib/cjs/components/context/GroupingMappingCustomUIContext.js.map +1 -1
- package/lib/cjs/components/context/GroupsClientContext.d.ts +0 -1
- package/lib/cjs/components/context/GroupsClientContext.js.map +1 -1
- package/lib/cjs/components/context/IModelsClientContext.d.ts +0 -1
- package/lib/cjs/components/context/IModelsClientContext.js.map +1 -1
- package/lib/cjs/components/context/ITwinsClientContext.d.ts +0 -1
- package/lib/cjs/components/context/ITwinsClientContext.js.map +1 -1
- package/lib/cjs/components/context/MappingClientContext.d.ts +0 -1
- package/lib/cjs/components/context/MappingClientContext.js.map +1 -1
- package/lib/cjs/components/context/PropertiesClientContext.d.ts +0 -1
- package/lib/cjs/components/context/PropertiesClientContext.js.map +1 -1
- package/lib/cjs/components/context/PropertiesGroupColorContext.js.map +1 -1
- package/lib/cjs/components/context/PropertyGridWrapperContext.d.ts +1 -0
- package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.d.ts +0 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +2 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/GroupingMappingCustomUI.d.ts +1 -1
- package/lib/cjs/components/customUI/GroupingMappingCustomUI.js +1 -1
- package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.d.ts +0 -1
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.d.ts +0 -1
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.js.map +1 -1
- package/lib/cjs/decorators/BboxDimensionsDecorator.d.ts +2 -0
- package/lib/cjs/decorators/BboxDimensionsDecorator.js +80 -29
- package/lib/cjs/decorators/BboxDimensionsDecorator.js.map +1 -1
- package/lib/cjs/formula/FormulaDataTypeResolver.js +1 -2
- package/lib/cjs/formula/FormulaDataTypeResolver.js.map +1 -1
- package/lib/cjs/formula/FormulaFunctionProvider.js +3 -4
- package/lib/cjs/formula/FormulaFunctionProvider.js.map +1 -1
- package/lib/cjs/formula/FormulaOperatorsProvider.js +11 -11
- package/lib/cjs/formula/FormulaOperatorsProvider.js.map +1 -1
- package/lib/cjs/formula/FormulaSplitter.js +1 -2
- package/lib/cjs/formula/FormulaSplitter.js.map +1 -1
- package/lib/cjs/formula/FormulaTokensDataTypeResolver.js +1 -2
- package/lib/cjs/formula/FormulaTokensDataTypeResolver.js.map +1 -1
- package/lib/cjs/formula/InfixToPostfixConverter.js +3 -3
- package/lib/cjs/formula/InfixToPostfixConverter.js.map +1 -1
- package/lib/cjs/formula/InputStream.js +3 -2
- package/lib/cjs/formula/InputStream.js.map +1 -1
- package/lib/cjs/formula/ParenthesisValidator.js +3 -3
- package/lib/cjs/formula/ParenthesisValidator.js.map +1 -1
- package/lib/cjs/formula/Queue.js +1 -0
- package/lib/cjs/formula/Queue.js.map +1 -1
- package/lib/cjs/formula/Stack.js +2 -3
- package/lib/cjs/formula/Stack.js.map +1 -1
- package/lib/cjs/formula/StringBuilder.js +1 -0
- package/lib/cjs/formula/StringBuilder.js.map +1 -1
- package/lib/cjs/formula/Types.d.ts +4 -4
- package/lib/cjs/formula/Utils.js +6 -7
- package/lib/cjs/formula/Utils.js.map +1 -1
- package/lib/cjs/test/CalculatedPropertyActionWithVisuals.test.d.ts +2 -0
- package/lib/cjs/test/CalculatedPropertyActionWithVisuals.test.js +137 -0
- package/lib/cjs/test/CalculatedPropertyActionWithVisuals.test.js.map +1 -0
- package/lib/cjs/test/GroupingMappingCustomUI.test.d.ts +1 -1
- package/lib/cjs/test/GroupingMappingCustomUI.test.js +37 -28
- package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/cjs/test/MockFactory.d.ts +1 -1
- package/lib/cjs/test/MockFactory.js.map +1 -1
- package/lib/cjs/test/PropertyFieldsHelpers.d.ts +22 -20
- package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
- package/lib/cjs/test/WidgetHeader.test.d.ts +1 -1
- package/lib/cjs/test/WidgetHeader.test.js +2 -2
- package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
- package/lib/cjs/test/setup.d.ts +1 -1
- package/lib/cjs/test/setup.js +1 -0
- package/lib/cjs/test/setup.js.map +1 -1
- package/lib/cjs/test/test-utils.d.ts +3 -3
- package/lib/cjs/test/test-utils.js +12 -6
- package/lib/cjs/test/test-utils.js.map +1 -1
- package/lib/esm/GroupingMappingWidget.js +15 -28
- package/lib/esm/GroupingMappingWidget.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMapping.d.ts +1 -2
- package/lib/esm/WidgetShell/GroupingMappingContent.d.ts +2 -3
- package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMappingHeader.d.ts +0 -1
- package/lib/esm/WidgetShell/GroupingMappingWidget.js +2 -1
- package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -1
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.d.ts +2 -3
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
- package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.d.ts +0 -1
- package/lib/esm/common/hooks/useIsMounted.d.ts +0 -1
- package/lib/esm/common/hooks/useMemoizedCollectionPick.js.map +1 -1
- package/lib/esm/common/utils.d.ts +1 -1
- package/lib/esm/common/utils.js +8 -19
- package/lib/esm/common/utils.js.map +1 -1
- package/lib/esm/common/viewerUtils.js.map +1 -1
- package/lib/esm/components/GroupingMappingContext.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupAction.d.ts +0 -1
- package/lib/esm/components/Groups/Editing/GroupAction.js +9 -5
- package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetails.d.ts +0 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.d.ts +0 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsStep.d.ts +0 -1
- package/lib/esm/components/Groups/GroupColorLegend.d.ts +0 -1
- package/lib/esm/components/Groups/GroupListItem.d.ts +0 -1
- package/lib/esm/components/Groups/GroupListItem.js.map +1 -1
- package/lib/esm/components/Groups/GroupMenuActions.d.ts +0 -1
- package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -1
- package/lib/esm/components/Groups/GroupOverlapProgressBar.d.ts +0 -1
- package/lib/esm/components/Groups/Groups.js.map +1 -1
- package/lib/esm/components/Groups/GroupsAddButton.d.ts +0 -1
- package/lib/esm/components/Groups/GroupsShowHideButtons.d.ts +0 -1
- package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -1
- package/lib/esm/components/Groups/GroupsView.d.ts +1 -1
- package/lib/esm/components/Groups/GroupsVisualization.d.ts +0 -1
- package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/esm/components/Groups/GroupsVisualizationActions.d.ts +0 -1
- package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -1
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.d.ts +0 -1
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js +1 -2
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js +36 -33
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.d.ts +0 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +0 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.d.ts +0 -1
- package/lib/esm/components/Groups/ToggleGroupVisibility.d.ts +0 -1
- package/lib/esm/components/Groups/groupsHelpers.d.ts +1 -1
- package/lib/esm/components/Groups/groupsHelpers.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +0 -1
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js +1 -2
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useVisualization.d.ts +0 -1
- package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -1
- package/lib/esm/components/Mappings/BlockingOverlay.d.ts +0 -1
- package/lib/esm/components/Mappings/Editing/MappingAction.d.ts +0 -1
- package/lib/esm/components/Mappings/Editing/MappingAction.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.d.ts +0 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js +8 -0
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.d.ts +0 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.d.ts +0 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.d.ts +0 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.d.ts +0 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStatus.d.ts +0 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.d.ts +1 -2
- package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.d.ts +0 -1
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js +1 -2
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectIModel.d.ts +0 -1
- package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectITwin.d.ts +0 -1
- package/lib/esm/components/Mappings/Import/SelectITwin.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectMappings.d.ts +0 -1
- package/lib/esm/components/Mappings/MappingListItem.d.ts +0 -1
- package/lib/esm/components/Mappings/MappingListItem.js +1 -2
- package/lib/esm/components/Mappings/MappingListItem.js.map +1 -1
- package/lib/esm/components/Mappings/MappingViewActionGroup.d.ts +0 -1
- package/lib/esm/components/Mappings/Mappings.d.ts +1 -2
- package/lib/esm/components/Mappings/MappingsView.js +1 -1
- package/lib/esm/components/Mappings/MappingsView.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -2
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.d.ts +0 -1
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useRunExtraction.d.ts +0 -1
- package/lib/esm/components/Mappings/hooks/useRunExtraction.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +2 -3
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +0 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +17 -4
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +0 -1
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +0 -1
- package/lib/esm/components/Properties/GroupColorToggle.d.ts +1 -2
- package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/esm/components/Properties/GroupInformationPanel.d.ts +0 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.d.ts +0 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +0 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.d.ts +0 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.d.ts +0 -1
- package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +2 -4
- package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/SaveModal.d.ts +0 -1
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +0 -1
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
- package/lib/esm/components/Properties/PropertyAction.d.ts +0 -1
- package/lib/esm/components/Properties/PropertyAction.js +7 -3
- package/lib/esm/components/Properties/PropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/PropertyMenu.d.ts +0 -1
- package/lib/esm/components/Properties/PropertyMenuWithVisualization.d.ts +0 -1
- package/lib/esm/components/Properties/PropertyNameCell.d.ts +0 -1
- package/lib/esm/components/Properties/PropertyTable.d.ts +0 -1
- package/lib/esm/components/Properties/PropertyTableToolbar.d.ts +0 -1
- package/lib/esm/components/Properties/ScrollableExpandableBlock.js.map +1 -1
- package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -1
- package/lib/esm/components/Properties/hooks/useForwardRef.js.map +1 -1
- package/lib/esm/components/Properties/hooks/useValidator.js.map +1 -1
- package/lib/esm/components/SharedComponents/ActionPanel.d.ts +0 -1
- package/lib/esm/components/SharedComponents/DeleteModal.d.ts +0 -1
- package/lib/esm/components/SharedComponents/EmptyMessage.d.ts +0 -1
- package/lib/esm/components/SharedComponents/LoadingOverlay.d.ts +0 -1
- package/lib/esm/components/SharedComponents/LoadingSpinner.d.ts +0 -1
- package/lib/esm/components/SharedComponents/StatusIcon.d.ts +1 -1
- package/lib/esm/components/context/ExtractionClientContext.d.ts +0 -1
- package/lib/esm/components/context/ExtractionClientContext.js.map +1 -1
- package/lib/esm/components/context/ExtractionStateJobContext.js.map +1 -1
- package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -1
- package/lib/esm/components/context/GroupingApiConfigContext.d.ts +2 -2
- package/lib/esm/components/context/GroupingApiConfigContext.js.map +1 -1
- package/lib/esm/components/context/GroupingMappingCustomUIContext.d.ts +0 -1
- package/lib/esm/components/context/GroupingMappingCustomUIContext.js.map +1 -1
- package/lib/esm/components/context/GroupsClientContext.d.ts +0 -1
- package/lib/esm/components/context/GroupsClientContext.js.map +1 -1
- package/lib/esm/components/context/IModelsClientContext.d.ts +0 -1
- package/lib/esm/components/context/IModelsClientContext.js.map +1 -1
- package/lib/esm/components/context/ITwinsClientContext.d.ts +0 -1
- package/lib/esm/components/context/ITwinsClientContext.js.map +1 -1
- package/lib/esm/components/context/MappingClientContext.d.ts +0 -1
- package/lib/esm/components/context/MappingClientContext.js.map +1 -1
- package/lib/esm/components/context/PropertiesClientContext.d.ts +0 -1
- package/lib/esm/components/context/PropertiesClientContext.js.map +1 -1
- package/lib/esm/components/context/PropertiesGroupColorContext.js.map +1 -1
- package/lib/esm/components/context/PropertyGridWrapperContext.d.ts +1 -0
- package/lib/esm/components/context/PropertyGridWrapperContext.js.map +1 -1
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.d.ts +0 -1
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +2 -1
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/GroupingMappingCustomUI.d.ts +1 -1
- package/lib/esm/components/customUI/ManualGroupingCustomUI.d.ts +0 -1
- package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/SearchGroupingCustomUI.d.ts +0 -1
- package/lib/esm/components/customUI/SearchGroupingCustomUI.js.map +1 -1
- package/lib/esm/decorators/BboxDimensionsDecorator.d.ts +2 -0
- package/lib/esm/decorators/BboxDimensionsDecorator.js +79 -28
- package/lib/esm/decorators/BboxDimensionsDecorator.js.map +1 -1
- package/lib/esm/formula/FormulaDataTypeResolver.js.map +1 -1
- package/lib/esm/formula/FormulaFunctionProvider.js.map +1 -1
- package/lib/esm/formula/FormulaOperatorsProvider.js.map +1 -1
- package/lib/esm/formula/FormulaSplitter.js.map +1 -1
- package/lib/esm/formula/FormulaTokensDataTypeResolver.js.map +1 -1
- package/lib/esm/formula/InfixToPostfixConverter.js.map +1 -1
- package/lib/esm/formula/InputStream.js +3 -2
- package/lib/esm/formula/InputStream.js.map +1 -1
- package/lib/esm/formula/ParenthesisValidator.js.map +1 -1
- package/lib/esm/formula/Queue.js +1 -0
- package/lib/esm/formula/Queue.js.map +1 -1
- package/lib/esm/formula/Stack.js +2 -3
- package/lib/esm/formula/Stack.js.map +1 -1
- package/lib/esm/formula/StringBuilder.js +1 -0
- package/lib/esm/formula/StringBuilder.js.map +1 -1
- package/lib/esm/formula/Types.d.ts +4 -4
- package/lib/esm/test/CalculatedPropertyActionWithVisuals.test.d.ts +2 -0
- package/lib/esm/test/CalculatedPropertyActionWithVisuals.test.js +132 -0
- package/lib/esm/test/CalculatedPropertyActionWithVisuals.test.js.map +1 -0
- package/lib/esm/test/GroupingMappingCustomUI.test.d.ts +1 -1
- package/lib/esm/test/GroupingMappingCustomUI.test.js +37 -28
- package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/esm/test/MockFactory.d.ts +1 -1
- package/lib/esm/test/MockFactory.js.map +1 -1
- package/lib/esm/test/PropertyFieldsHelpers.d.ts +22 -20
- package/lib/esm/test/QueryBuilder.test.js.map +1 -1
- package/lib/esm/test/WidgetHeader.test.d.ts +1 -1
- package/lib/esm/test/WidgetHeader.test.js +2 -2
- package/lib/esm/test/WidgetHeader.test.js.map +1 -1
- package/lib/esm/test/setup.d.ts +1 -1
- package/lib/esm/test/setup.js +1 -0
- package/lib/esm/test/setup.js.map +1 -1
- package/lib/esm/test/test-utils.d.ts +3 -3
- package/lib/esm/test/test-utils.js +3 -2
- package/lib/esm/test/test-utils.js.map +1 -1
- package/package.json +43 -66
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForwardRef.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useForwardRef.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,CACzB,GAAoB,EACpB,eAAoB,IAAI,EACxB,EAAE;IACF,MAAM,SAAS,GAAG,MAAM,CAAI,YAAY,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG;YAAE,OAAO;QAEjB,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"useForwardRef.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useForwardRef.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,CACzB,GAAoB,EACpB,eAAoB,IAAI,EACxB,EAAE;IACF,MAAM,SAAS,GAAG,MAAM,CAAI,YAAY,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG;YAAE,OAAO;QAEjB,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;YAC9B,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;QAClC,CAAC;IACH,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,OAAO,SAAS,CAAC;AACnB,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 *--------------------------------------------------------------------------------------------*/\nimport type { ForwardedRef } from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useForwardRef = <T,>(\n ref: ForwardedRef<T>,\n initialValue: any = null\n ) => {\n const targetRef = useRef<T>(initialValue);\n \n useEffect(() => {\n if (!ref) return;\n \n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }, [ref]);\n \n return targetRef;\n };"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidator.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useValidator.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,CAAC;IAClC,qBAAqB,EAAE;QACrB,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,kCAAkC,CAAC;QAC5E,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE;YACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;KACF;IACD,gCAAgC,EAAE;QAChC,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,yCAAyC,CAAC;QACnF,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE;YACpB,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;YACrD,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;KACF;IACD,qCAAqC,EAAE;QACrC,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,yCAAyC,CAAC;QACnF,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE;YACpB,MAA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oB,CAAC;QACzC,QAAQ,EAAE,aAAa;QACvB,UAAU,EAAE,eAAe;KAC5B,CAAC,CAAC;IAEH,IAAI,IAAI,EAAE,CAAC;QACT,SAAS,CAAC,YAAY,EAAE,CAAC;IAC3B,CAAC;IAED,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF,eAAe,YAAY,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 *--------------------------------------------------------------------------------------------*/\nimport { useState } from \"react\";\nimport SimpleReactValidator from \"simple-react-validator\";\nimport { GroupingMappingWidget } from \"../../../GroupingMappingWidget\";\n\nexport const getValidators = () => ({\n NoDuplicateUnderscore: {\n message: GroupingMappingWidget.translate(\"validation.noDuplicateUnderscore\"),\n rule: (val: string) => {\n return !val.match(/__+/i);\n },\n },\n OnlyBeginsWithLetterOrUnderscore: {\n message: GroupingMappingWidget.translate(\"validation.startsWithLetterOrUnderscore\"),\n rule: (val: string) => {\n const regexPattern = new RegExp(/^[\\p{L}\\p{Nl}_]+/u);\n return regexPattern.test(val);\n },\n },\n FollowedByLettersUnderscoresAndDigits: {\n message: GroupingMappingWidget.translate(\"validation.onlyLettersUnderscoresDigits\"),\n rule: (val: string) => {\n const regexPattern = new RegExp(/^[\\p{L}\\p{Nl}\\p{Nd}\\p{Mn}\\p{Mc}\\p{Pc}\\p{Cf}]+$/u);\n return regexPattern.test(val);\n },\n },\n CharLimit: {\n message: GroupingMappingWidget.translate(\"validation.charLimit\"),\n rule: (val: string) => {\n return val.length <= 128;\n },\n },\n});\n\nexport const NAME_REQUIREMENTS = \"required|NoDuplicateUnderscore|OnlyBeginsWithLetterOrUnderscore|FollowedByLettersUnderscoresAndDigits|CharLimit\";\n\nexport const getMessages = () => ({ required: GroupingMappingWidget.translate(\"validation.required\") });\n\nconst useValidator = (customMessage = getMessages(), customValidator = getValidators()): [SimpleReactValidator, React.Dispatch<React.SetStateAction<boolean>>] => {\n const [show, setShow] = useState(false);\n const validator = new SimpleReactValidator({\n messages: customMessage,\n validators: customValidator,\n });\n\n if (show) {\n validator.showMessages();\n }\n\n return [validator, setShow];\n};\n\nexport default useValidator;\n"]}
|
|
@@ -9,7 +9,7 @@ declare const StatusIconMap: {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const StatusIcon: ({ status, className, ...rest }: {
|
|
11
11
|
status: keyof typeof StatusIconMap;
|
|
12
|
-
className?: string
|
|
12
|
+
className?: string;
|
|
13
13
|
}) => JSX.Element;
|
|
14
14
|
export {};
|
|
15
15
|
//# sourceMappingURL=StatusIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtractionClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/ExtractionClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAG1F,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"ExtractionClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/ExtractionClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAG1F,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;QACtB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,MAAqB,EAAqB,EAAE;IACxF,MAAM,GAAG,GAAG,SAAS,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;IAC9D,OAAO,IAAI,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,UAA4C,EAAE,EAAE;IACrF,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC/D,OAAO,6BAA6B,CAAC,UAA0B,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAoB,6BAA6B,EAAE,CAAC,CAAC;AAEzG,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;IACpD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;IAClG,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport type { IExtractionClient } from \"@itwin/insights-client\";\nimport { createContext, useContext } from \"react\";\nimport { ExtractionClient, GROUPING_AND_MAPPING_BASE_PATH } from \"@itwin/insights-client\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\nexport const createDefaultExtractionClient = (prefix?: ClientPrefix): IExtractionClient => {\n const url = prefixUrl(GROUPING_AND_MAPPING_BASE_PATH, prefix);\n return new ExtractionClient(url);\n};\n\nexport const createExtractionClient = (clientProp: IExtractionClient | ClientPrefix) => {\n if (undefined === clientProp || typeof clientProp === \"string\") {\n return createDefaultExtractionClient(clientProp as ClientPrefix);\n }\n return clientProp;\n};\n\nexport const ExtractionClientContext = createContext<IExtractionClient>(createDefaultExtractionClient());\n\nexport const useExtractionClient = () => {\n const context = useContext(ExtractionClientContext);\n if (!context) {\n throw new Error(\"useExtractionClient should be used within a ExtractionClientContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtractionStateJobContext.js","sourceRoot":"","sources":["../../../../src/components/context/ExtractionStateJobContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,aAAa,CAAsB;IACjF,gBAAgB,EAAE,IAAI,GAAG,EAAE;IAC3B,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAwB,EAAE;IACpE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"ExtractionStateJobContext.js","sourceRoot":"","sources":["../../../../src/components/context/ExtractionStateJobContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,aAAa,CAAsB;IACjF,gBAAgB,EAAE,IAAI,GAAG,EAAE;IAC3B,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAwB,EAAE;IACpE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,0FAA0F,CAAC,CAAC;IAC9G,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\n\nexport interface ExtractionStatusJob {\n mappingIdJobInfo: Map<string, string>; // key: mappingId, value: jobId\n setMappingIdJobInfo: (mappingIdJobInfo: Map<string, string> | ((mappingIdJobInfo: Map<string, string>) => Map<string, string>)) => void;\n}\n\nexport const ExtractionStatusJobContext = React.createContext<ExtractionStatusJob>({\n mappingIdJobInfo: new Map(),\n setMappingIdJobInfo: () => {},\n});\n\nexport const useExtractionStateJobContext = (): ExtractionStatusJob => {\n const context = React.useContext(ExtractionStatusJobContext);\n if (!context) {\n throw new Error(\"useExtractionStateJobContext should be used within a ExtractionStatusJobContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupHilitedElementsContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupHilitedElementsContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsC/B;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAAuB;IACnF,eAAe,EAAE,IAAI,GAAG,EAAE;IAC1B,cAAc,EAAE,KAAK;IACrB,oBAAoB,EAAE,CAAC;IACvB,0BAA0B,EAAE;QAC1B,sBAAsB,EAAE,IAAI,GAAG,EAAE;QACjC,iBAAiB,EAAE,IAAI,GAAG,EAAE;QAC5B,2BAA2B,EAAE,EAAE;KAChC;IACD,uBAAuB,EAAE,KAAK;IAC9B,mBAAmB,EAAE,KAAK;IAC1B,kBAAkB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC5B,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC3B,2BAA2B,EAAE,GAAG,EAAE,GAAE,CAAC;IACrC,6BAA6B,EAAE,GAAG,EAAE,GAAE,CAAC;IACvC,sBAAsB,EAAE,GAAG,EAAE,GAAE,CAAC;IAChC,0BAA0B,EAAE,GAAG,EAAE,GAAE,CAAC;IACpC,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,WAAW,EAAE,IAAI,GAAG,EAAE;CACvB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAyB,EAAE;IACvE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"GroupHilitedElementsContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupHilitedElementsContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsC/B;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAAuB;IACnF,eAAe,EAAE,IAAI,GAAG,EAAE;IAC1B,cAAc,EAAE,KAAK;IACrB,oBAAoB,EAAE,CAAC;IACvB,0BAA0B,EAAE;QAC1B,sBAAsB,EAAE,IAAI,GAAG,EAAE;QACjC,iBAAiB,EAAE,IAAI,GAAG,EAAE;QAC5B,2BAA2B,EAAE,EAAE;KAChC;IACD,uBAAuB,EAAE,KAAK;IAC9B,mBAAmB,EAAE,KAAK;IAC1B,kBAAkB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC5B,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC3B,2BAA2B,EAAE,GAAG,EAAE,GAAE,CAAC;IACrC,6BAA6B,EAAE,GAAG,EAAE,GAAE,CAAC;IACvC,sBAAsB,EAAE,GAAG,EAAE,GAAE,CAAC;IAChC,0BAA0B,EAAE,GAAG,EAAE,GAAE,CAAC;IACpC,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,WAAW,EAAE,IAAI,GAAG,EAAE;CACvB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAyB,EAAE;IACvE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,6FAA6F,CAAC,CAAC;IACjH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nexport interface OverlappedInfo {\n groupIds: string[];\n elements: string[];\n}\n\nexport interface OverlappedElementGroupPairs {\n elementIds: Set<string>;\n groupIds: Set<string>;\n}\n\nexport interface OverlappedElementsMetadata {\n overlappedElementsInfo: Map<string, OverlappedInfo[]>;\n groupElementsInfo: Map<string, number>;\n overlappedElementGroupPairs: OverlappedElementGroupPairs[];\n}\n\n/**\n * The type for the {@link GroupHilitedElementsContext} context.\n * @public\n */\nexport interface GroupHilitedElements {\n hiddenGroupsIds: Set<string>;\n showGroupColor: boolean;\n currentHilitedGroups: number;\n overlappedElementsMetadata: OverlappedElementsMetadata;\n isVisualizationsEnabled: boolean;\n isOverlappedColored: boolean;\n setHiddenGroupsIds: (hiddenGroupIds: Set<string>) => void;\n setShowGroupColor: (showGroupColor: boolean | ((showGroupColor: boolean) => boolean)) => void;\n setNumberOfVisualizedGroups: (numberOfVisualizedGroups: number | ((numberOfVisualizedGroups: number) => number)) => void;\n setOverlappedElementsMetadata: (overlappedElementsMetaData: OverlappedElementsMetadata) => void;\n setIsOverlappedColored: (isOverlappedColored: boolean | ((isOverlappedColored: boolean) => boolean)) => void;\n setIsVisualizationsEnabled: (isVisualizationsEnabled: boolean | ((isVisualizationsEnabled: boolean) => boolean)) => void;\n groupColors: Map<string, string>;\n setGroupColors: (colors: Map<string, string>) => void;\n}\n\n/**\n * The context which provides metadata for group highlighting.\n * @public\n */\nexport const GroupHilitedElementsContext = React.createContext<GroupHilitedElements>({\n hiddenGroupsIds: new Set(),\n showGroupColor: false,\n currentHilitedGroups: 0,\n overlappedElementsMetadata: {\n overlappedElementsInfo: new Map(),\n groupElementsInfo: new Map(),\n overlappedElementGroupPairs: [],\n },\n isVisualizationsEnabled: false,\n isOverlappedColored: false,\n setHiddenGroupsIds: () => {},\n setShowGroupColor: () => {},\n setNumberOfVisualizedGroups: () => {},\n setOverlappedElementsMetadata: () => {},\n setIsOverlappedColored: () => {},\n setIsVisualizationsEnabled: () => {},\n setGroupColors: () => {},\n groupColors: new Map(),\n});\n\n/**\n * The hook which provides context for group highlighting.\n * @public\n */\nexport const useGroupHilitedElementsContext = (): GroupHilitedElements => {\n const context = React.useContext(GroupHilitedElementsContext);\n if (!context) {\n throw new Error(\"useGroupHilitedElementsContext should be used within a GroupHilitedElementsContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -4,11 +4,11 @@ import * as React from "react";
|
|
|
4
4
|
/**
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type ClientPrefix = "" | "dev" | "qa" | undefined;
|
|
8
8
|
/**
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type GetAccessTokenFn = () => Promise<AccessToken>;
|
|
12
12
|
/**
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingApiConfigContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupingApiConfigContext.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAuBtC;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAA2B;IACrF,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;IAC9B,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC;IAClE,IAAI,CAAC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"GroupingApiConfigContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupingApiConfigContext.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAuBtC;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAA2B;IACrF,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;IAC9B,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC;IAClE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,8FAA8F,CAAC,CAAC;IAClH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport type { AccessToken } from \"@itwin/core-bentley\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport * as React from \"react\";\nimport { createContext } from \"react\";\n\n/**\n * @public\n */\nexport type ClientPrefix = \"\" | \"dev\" | \"qa\" | undefined;\n\n/**\n * @public\n */\nexport type GetAccessTokenFn = () => Promise<AccessToken>;\n\n/**\n * @public\n */\nexport interface GroupingMappingApiConfig {\n getAccessToken: GetAccessTokenFn;\n iModelId: string;\n iModelConnection?: IModelConnection;\n changeSetId?: string;\n prefix?: ClientPrefix;\n}\n\n/**\n * @public\n */\nexport const GroupingMappingApiConfigContext = createContext<GroupingMappingApiConfig>({\n getAccessToken: async () => \"\",\n iModelId: \"\",\n});\n\n/**\n * Hook to access the GroupingMappingApiConfig from the context.\n * @public\n */\nexport const useGroupingMappingApiConfig = () => {\n const context = React.useContext(GroupingMappingApiConfigContext);\n if (!context) {\n throw new Error(\"useGroupingMappingApiConfig should be used within a GroupingMappingApiConfigContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { GroupingMappingCustomUI } from "../customUI/GroupingMappingCustomUI";
|
|
3
2
|
export declare const createGroupingMappingCustomUI: (customUIs: GroupingMappingCustomUI[] | undefined) => GroupingMappingCustomUI[];
|
|
4
3
|
export interface IGroupingMappingCustomUI {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingMappingCustomUIContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupingMappingCustomUIContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,SAAgD,EAA6B,EAAE;IAC3H,OAAO,SAAS,IAAI,EAAE,CAAC;AACzB,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,8BAA8B,GAAG,aAAa,CAA2B;IACpF,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC7C,MAAM,OAAO,GAAG,UAAU,CAAC,8BAA8B,CAAC,CAAC;IAC3D,IAAI,CAAC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"GroupingMappingCustomUIContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupingMappingCustomUIContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,SAAgD,EAA6B,EAAE;IAC3H,OAAO,SAAS,IAAI,EAAE,CAAC;AACzB,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,8BAA8B,GAAG,aAAa,CAA2B;IACpF,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC7C,MAAM,OAAO,GAAG,UAAU,CAAC,8BAA8B,CAAC,CAAC;IAC3D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;IAChH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport { createContext, useContext } from \"react\";\nimport type { GroupingMappingCustomUI } from \"../customUI/GroupingMappingCustomUI\";\n\nexport const createGroupingMappingCustomUI = (customUIs: GroupingMappingCustomUI[] | undefined): GroupingMappingCustomUI[] => {\n return customUIs ?? [];\n};\n\nexport interface IGroupingMappingCustomUI {\n customUIs: GroupingMappingCustomUI[];\n setCustomUIs: (customUI: GroupingMappingCustomUI[] | ((customUI: GroupingMappingCustomUI[]) => GroupingMappingCustomUI[])) => void;\n}\n\nexport const GroupingMappingCustomUIContext = createContext<IGroupingMappingCustomUI>({\n customUIs: [],\n setCustomUIs: () => {},\n});\n\nexport const useGroupingMappingCustomUI = () => {\n const context = useContext(GroupingMappingCustomUIContext);\n if (!context) {\n throw new Error(\"useGroupingMappingCustomUI should be used within a GroupingMappingCustomUIContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupsClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupsClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"GroupsClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupsClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;QACtB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,MAAqB,EAAiB,EAAE;IAChF,MAAM,GAAG,GAAG,SAAS,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;IAC9D,OAAO,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAAwC,EAAE,EAAE;IAC7E,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC/D,OAAO,yBAAyB,CAAC,UAA0B,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAgB,yBAAyB,EAAE,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport type { IGroupsClient } from \"@itwin/insights-client\";\nimport { GROUPING_AND_MAPPING_BASE_PATH, GroupsClient } from \"@itwin/insights-client\";\nimport { createContext, useContext } from \"react\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\n/**\n * @internal\n */\nexport const createDefaultGroupsClient = (prefix?: ClientPrefix): IGroupsClient => {\n const url = prefixUrl(GROUPING_AND_MAPPING_BASE_PATH, prefix);\n return new GroupsClient(url);\n};\n\n/**\n * @internal\n */\nexport const createGroupsClient = (clientProp: IGroupsClient | ClientPrefix) => {\n if (undefined === clientProp || typeof clientProp === \"string\") {\n return createDefaultGroupsClient(clientProp as ClientPrefix);\n }\n return clientProp;\n};\n\n/**\n * @internal\n */\nexport const GroupsClientContext = createContext<IGroupsClient>(createDefaultGroupsClient());\n\n/**\n * @internal\n */\nexport const useGroupsClient = () => {\n const context = useContext(GroupsClientContext);\n if (!context) {\n throw new Error(\"useGroupsClient should be used within a GroupsClientContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelsClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/IModelsClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,OAAO,GAAW,iCAAiC,CAAC;AAE1D,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"IModelsClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/IModelsClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,OAAO,GAAW,iCAAiC,CAAC;AAE1D,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;QACtB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAqB,EAAiB,EAAE;IAC1E,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACvC,MAAM,OAAO,GAAyB;QACpC,GAAG,EAAE;YACH,OAAO,EAAE,GAAG;SACb;KACF,CAAC;IACF,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAgB,mBAAmB,EAAE,CAAC,CAAC;AAExF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport type { IModelsClientOptions } from \"@itwin/imodels-client-management\";\nimport { IModelsClient } from \"@itwin/imodels-client-management\";\nimport { createContext, useContext } from \"react\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst baseUrl: string = \"https://api.bentley.com/imodels\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\nexport const createIModelsClient = (prefix?: ClientPrefix): IModelsClient => {\n const url = prefixUrl(baseUrl, prefix);\n const options: IModelsClientOptions = {\n api: {\n baseUrl: url,\n },\n };\n return new IModelsClient(options);\n};\n\nexport const IModelsClientContext = createContext<IModelsClient>(createIModelsClient());\n\nexport const useIModelsClient = () => {\n const context = useContext(IModelsClientContext);\n if (!context) {\n throw new Error(\"useIModelsClient should be used within an IModelsClientContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITwinsClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/ITwinsClientContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,OAAO,GAAW,gCAAgC,CAAC;AAEzD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"ITwinsClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/ITwinsClientContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,OAAO,GAAW,gCAAgC,CAAC;AAEzD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;QACtB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAqB,EAAsB,EAAE;IAC9E,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACvC,OAAO,IAAI,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAqB,kBAAkB,EAAE,CAAC,CAAC;AAE3F,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport { ITwinsAccessClient } from \"@itwin/itwins-client\";\nimport { createContext, useContext } from \"react\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst baseUrl: string = \"https://api.bentley.com/itwins\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\nexport const createITwinsClient = (prefix?: ClientPrefix): ITwinsAccessClient => {\n const url = prefixUrl(baseUrl, prefix);\n return new ITwinsAccessClient(url);\n};\n\nexport const ITwinsClientContext = createContext<ITwinsAccessClient>(createITwinsClient());\n\nexport const useITwinsClient = () => {\n const context = useContext(ITwinsClientContext);\n if (!context) {\n throw new Error(\"useITwinsClient should be used within an ITwinsClientContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MappingClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/MappingClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"MappingClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/MappingClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;QACtB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACnF,MAAM,GAAG,GAAG,SAAS,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;IAC9D,OAAO,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAA0C,EAAE,EAAE;IAChF,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC/D,OAAO,0BAA0B,CAAC,UAA0B,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAkB,0BAA0B,EAAE,CAAC,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IAC5F,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport type { IMappingsClient } from \"@itwin/insights-client\";\nimport { GROUPING_AND_MAPPING_BASE_PATH, MappingsClient } from \"@itwin/insights-client\";\nimport { createContext, useContext } from \"react\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\n/**\n * @internal\n */\nexport const createDefaultMappingClient = (prefix?: ClientPrefix): IMappingsClient => {\n const url = prefixUrl(GROUPING_AND_MAPPING_BASE_PATH, prefix);\n return new MappingsClient(url);\n};\n\n/**\n * @internal\n */\nexport const createMappingClient = (clientProp: IMappingsClient | ClientPrefix) => {\n if (undefined === clientProp || typeof clientProp === \"string\") {\n return createDefaultMappingClient(clientProp as ClientPrefix);\n }\n return clientProp;\n};\n\n/**\n * @internal\n */\nexport const MappingClientContext = createContext<IMappingsClient>(createDefaultMappingClient());\n\n/**\n * @internal\n */\nexport const useMappingClient = () => {\n const context = useContext(MappingClientContext);\n if (!context) {\n throw new Error(\"useMappingClient should be used within a MappingClientContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertiesClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertiesClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"PropertiesClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertiesClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;QACtB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,MAAqB,EAAqB,EAAE;IACxF,MAAM,GAAG,GAAG,SAAS,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;IAC9D,OAAO,IAAI,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,UAA4C,EAAE,EAAE;IACrF,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC/D,OAAO,6BAA6B,CAAC,UAA0B,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAoB,6BAA6B,EAAE,CAAC,CAAC;AAEzG;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;IACpD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport type { IPropertiesClient } from \"@itwin/insights-client\";\nimport { GROUPING_AND_MAPPING_BASE_PATH, PropertiesClient } from \"@itwin/insights-client\";\nimport { createContext, useContext } from \"react\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\n/**\n * @internal\n */\nexport const createDefaultPropertiesClient = (prefix?: ClientPrefix): IPropertiesClient => {\n const url = prefixUrl(GROUPING_AND_MAPPING_BASE_PATH, prefix);\n return new PropertiesClient(url);\n};\n\n/**\n * @internal\n */\nexport const createPropertiesClient = (clientProp: IPropertiesClient | ClientPrefix) => {\n if (undefined === clientProp || typeof clientProp === \"string\") {\n return createDefaultPropertiesClient(clientProp as ClientPrefix);\n }\n return clientProp;\n};\n\n/**\n * @internal\n */\nexport const PropertiesClientContext = createContext<IPropertiesClient>(createDefaultPropertiesClient());\n\n/**\n * @internal\n */\nexport const usePropertiesClient = () => {\n const context = useContext(PropertiesClientContext);\n if (!context) {\n throw new Error(\"useGroupsClient should be used within a GroupsClientContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertiesGroupColorContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertiesGroupColorContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAAuB;IACnF,cAAc,EAAE,KAAK;IACrB,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAyB,EAAE;IACvE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"PropertiesGroupColorContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertiesGroupColorContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAAuB;IACnF,cAAc,EAAE,KAAK;IACrB,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAyB,EAAE;IACvE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,6FAA6F,CAAC,CAAC;IACjH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\n\nexport interface PropertiesGroupColor {\n showGroupColor: boolean;\n setShowGroupColor: (showGroupColor: boolean | ((showGroupColor: boolean) => boolean)) => void;\n}\n\nexport const PropertiesGroupColorContext = React.createContext<PropertiesGroupColor>({\n showGroupColor: false,\n setShowGroupColor: () => {},\n});\n\nexport const usePropertiesGroupColorContext = (): PropertiesGroupColor => {\n const context = React.useContext(PropertiesGroupColorContext);\n if (!context) {\n throw new Error(\"usePropertiesGroupColorContext should be used within a PropertiesGroupColorContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -5,6 +5,7 @@ export interface PropertySelection {
|
|
|
5
5
|
currentPropertyList: PropertyRecord[];
|
|
6
6
|
setCurrentPropertyList: (value: PropertyRecord[] | ((value: PropertyRecord[]) => PropertyRecord[])) => void;
|
|
7
7
|
setQuery: (value: string) => void;
|
|
8
|
+
resetView?: () => Promise<void>;
|
|
8
9
|
queryBuilder?: QueryBuilder;
|
|
9
10
|
isUpdating: boolean;
|
|
10
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyGridWrapperContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertyGridWrapperContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PropertyGridWrapperContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertyGridWrapperContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,aAAa,CAAoB;IAC/E,mBAAmB,EAAE,EAAE;IACvB,sBAAsB,EAAE,GAAG,EAAE,CAAC,EAAE;IAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE;IAClB,UAAU,EAAE,KAAK;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAsB,EAAE;IAC5D,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC,CAAC;IAC/G,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,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 *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\n\nexport interface PropertySelection {\n currentPropertyList: PropertyRecord[];\n setCurrentPropertyList: (value: PropertyRecord[] | ((value: PropertyRecord[]) => PropertyRecord[])) => void;\n setQuery: (value: string) => void;\n resetView?: () => Promise<void>;\n queryBuilder?: QueryBuilder;\n isUpdating: boolean;\n}\n\nexport const PropertyGridWrapperContext = React.createContext<PropertySelection>({\n currentPropertyList: [],\n setCurrentPropertyList: () => [],\n setQuery: () => \"\",\n isUpdating: false,\n});\n\nexport const usePropertyGridWrapper = (): PropertySelection => {\n const context = React.useContext(PropertyGridWrapperContext);\n if (!context) {\n throw new Error(\"usePropertyGridWrapperContext should be used within a PropertyGridWrapperContext provider\");\n }\n return context;\n};\n"]}
|
|
@@ -78,8 +78,9 @@ export const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView }
|
|
|
78
78
|
setCurrentPropertyList,
|
|
79
79
|
queryBuilder,
|
|
80
80
|
setQuery: updateQuery,
|
|
81
|
+
resetView,
|
|
81
82
|
isUpdating: isUpdating ?? false,
|
|
82
|
-
}), [currentPropertyList, isUpdating, queryBuilder, updateQuery]);
|
|
83
|
+
}), [currentPropertyList, isUpdating, queryBuilder, resetView, updateQuery]);
|
|
83
84
|
const actionButtonRenderers = useMemo(() => [({ property }) => React.createElement(PropertyAction, { property: property })], []);
|
|
84
85
|
return (React.createElement("div", { className: "gmw-select-query-generator-container" }, !dataProvider || selectionKeySet.size === 0 ? (React.createElement(Alert, { type: "informational" }, GroupingMappingWidget.translate("customUI.queryBuilderAlert"))) : (React.createElement(React.Fragment, null,
|
|
85
86
|
React.createElement("div", { className: "gmw-select-property-grid-container" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupQueryBuilderCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupQueryBuilder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ACL,CACJ,CACG,CACP,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 *--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport type { ISelectionProvider, SelectionChangeEventArgs } from \"@itwin/presentation-frontend\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport \"./GroupQueryBuilderCustomUI.scss\";\nimport { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport { DEFAULT_PROPERTY_GRID_RULESET, PresentationPropertyDataProvider } from \"@itwin/presentation-components\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { ActionButtonRendererProps } from \"@itwin/components-react\";\nimport { VirtualizedPropertyGridWithDataProvider } from \"@itwin/components-react\";\nimport { ResizableContainerObserver } from \"@itwin/core-react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyGridWrapperContext } from \"../context/PropertyGridWrapperContext\";\nimport { PropertyAction } from \"../Properties/PropertyAction\";\nimport { Alert, Button } from \"@itwin/itwinui-react\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { GroupingMappingWidget } from \"../../GroupingMappingWidget\";\n\nconst createPropertyDataProvider = async (keys: KeySet, iModelConnection: IModelConnection): Promise<PresentationPropertyDataProvider> => {\n const dataProvider = new PresentationPropertyDataProvider({\n imodel: iModelConnection,\n ruleset: DEFAULT_PROPERTY_GRID_RULESET,\n });\n dataProvider.keys = keys;\n dataProvider.isNestedPropertyCategoryGroupingEnabled = true;\n const data = await dataProvider.getData();\n const selectedCategory = data.categories.find(\n (category) => category.label === IModelApp.localization.getLocalizedString(\"Presentation:selectedItems.categoryLabel\"),\n );\n if (selectedCategory) {\n selectedCategory.expand = true;\n }\n return dataProvider;\n};\n\ninterface ContainerDimensions {\n width: number;\n height: number;\n}\n\n/**\n * A default group query builder for the Grouping Mapping Widget that uses the property grid to generate queries.\n * @public\n */\nexport const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView }: GroupingCustomUIProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const [size, setSize] = useState<ContainerDimensions>({ width: 0, height: 0 });\n const [dataProvider, setDataProvider] = useState<PresentationPropertyDataProvider | undefined>(undefined);\n const [currentPropertyList, setCurrentPropertyList] = useState<PropertyRecord[]>([]);\n const [selectionKeySet, setSelectionKeyset] = useState<KeySet>(new KeySet());\n const [queryBuilder, setQueryBuilder] = useState<QueryBuilder | undefined>();\n\n useEffect(() => {\n const onSelectionChanged = async (evt: SelectionChangeEventArgs, selectionProvider: ISelectionProvider) => {\n const selection = selectionProvider.getSelection(evt.imodel, evt.level);\n const keys = new KeySet(selection);\n setSelectionKeyset(keys);\n const dataProvider = await createPropertyDataProvider(keys, iModelConnection);\n setDataProvider(dataProvider);\n setQueryBuilder(new QueryBuilder(dataProvider, iModelConnection));\n };\n\n return iModelConnection ? Presentation.selection.selectionChange.addListener(onSelectionChanged) : () => {};\n }, [iModelConnection]);\n \n const resetMutation = useMutation({\n mutationFn: resetView,\n /* eslint-disable no-console */\n onError: (e) => console.error(e),\n });\n\n const onClickResetButton = useCallback(() => {\n queryBuilder?.resetQueryBuilder();\n updateQuery(\"\");\n if (currentPropertyList.length > 0) {\n setCurrentPropertyList([]);\n } else if (iModelConnection) {\n Presentation.selection.clearSelection(\"GroupQueryBuilderCustomUI\", iModelConnection);\n }\n resetMutation.mutate();\n\n }, [iModelConnection, currentPropertyList, resetMutation, queryBuilder, updateQuery]);\n\n const resize = useCallback((width, height) => setSize({ width, height }), []);\n\n const propertyContextValues = useMemo(\n () => ({\n currentPropertyList,\n setCurrentPropertyList,\n queryBuilder,\n setQuery: updateQuery,\n isUpdating: isUpdating ?? false,\n }),\n [currentPropertyList, isUpdating, queryBuilder, updateQuery],\n );\n\n const actionButtonRenderers = useMemo(() => [({ property }: ActionButtonRendererProps) => <PropertyAction property={property} />], []);\n\n return (\n <div className=\"gmw-select-query-generator-container\">\n {!dataProvider || selectionKeySet.size === 0 ? (\n <Alert type=\"informational\">{GroupingMappingWidget.translate(\"customUI.queryBuilderAlert\")}</Alert>\n ) : (\n <>\n <div className=\"gmw-select-property-grid-container\">\n <ResizableContainerObserver onResize={resize} />\n <PropertyGridWrapperContext.Provider value={propertyContextValues}>\n <VirtualizedPropertyGridWithDataProvider\n dataProvider={dataProvider}\n width={size.width}\n height={size.height}\n actionButtonRenderers={actionButtonRenderers}\n />\n </PropertyGridWrapperContext.Provider>\n </div>\n <div className=\"gmw-select-reset-button\">\n <Button styleType=\"default\" size=\"small\" onClick={onClickResetButton}>\n {GroupingMappingWidget.translate(\"common.reset\")}\n </Button>\n </div>\n </>\n )}\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"GroupQueryBuilderCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupQueryBuilderCustomUI.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,EAAE,6BAA6B,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;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C,EAAE,QAAQ,EAA6B,EAAE,EAAE,CAAC,oBAAC,cAAc,IAAC,QAAQ,EAAE,QAAQ,GAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAEvI,OAAO,CACL,6BAAK,SAAS,EAAC,sCAAsC,IAClD,CAAC,YAAY,IAAI,eAAe,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAC7C,oBAAC,KAAK,IAAC,IAAI,EAAC,eAAe,IAAE,qBAAqB,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAS,CACpG,CAAC,CAAC,CAAC,CACF;QACE,6BAAK,SAAS,EAAC,oCAAoC;YACjD,oBAAC,0BAA0B,IAAC,QAAQ,EAAE,MAAM,GAAI;YAChD,oBAAC,0BAA0B,CAAC,QAAQ,IAAC,KAAK,EAAE,qBAAqB;gBAC/D,oBAAC,uCAAuC,IACtC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,qBAAqB,EAAE,qBAAqB,GAC5C,CACkC,CAClC;QACN,6BAAK,SAAS,EAAC,yBAAyB;YACtC,oBAAC,MAAM,IAAC,SAAS,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,kBAAkB,IACjE,qBAAqB,CAAC,SAAS,CAAC,cAAc,CAAC,CACzC,CACL,CACL,CACJ,CACG,CACP,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 *--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport type { ISelectionProvider, SelectionChangeEventArgs } from \"@itwin/presentation-frontend\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport \"./GroupQueryBuilderCustomUI.scss\";\nimport { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport { DEFAULT_PROPERTY_GRID_RULESET, PresentationPropertyDataProvider } from \"@itwin/presentation-components\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { ActionButtonRendererProps } from \"@itwin/components-react\";\nimport { VirtualizedPropertyGridWithDataProvider } from \"@itwin/components-react\";\nimport { ResizableContainerObserver } from \"@itwin/core-react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyGridWrapperContext } from \"../context/PropertyGridWrapperContext\";\nimport { PropertyAction } from \"../Properties/PropertyAction\";\nimport { Alert, Button } from \"@itwin/itwinui-react\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { GroupingMappingWidget } from \"../../GroupingMappingWidget\";\n\nconst createPropertyDataProvider = async (keys: KeySet, iModelConnection: IModelConnection): Promise<PresentationPropertyDataProvider> => {\n const dataProvider = new PresentationPropertyDataProvider({\n imodel: iModelConnection,\n ruleset: DEFAULT_PROPERTY_GRID_RULESET,\n });\n dataProvider.keys = keys;\n dataProvider.isNestedPropertyCategoryGroupingEnabled = true;\n const data = await dataProvider.getData();\n const selectedCategory = data.categories.find(\n (category) => category.label === IModelApp.localization.getLocalizedString(\"Presentation:selectedItems.categoryLabel\"),\n );\n if (selectedCategory) {\n selectedCategory.expand = true;\n }\n return dataProvider;\n};\n\ninterface ContainerDimensions {\n width: number;\n height: number;\n}\n\n/**\n * A default group query builder for the Grouping Mapping Widget that uses the property grid to generate queries.\n * @public\n */\nexport const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView }: GroupingCustomUIProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const [size, setSize] = useState<ContainerDimensions>({ width: 0, height: 0 });\n const [dataProvider, setDataProvider] = useState<PresentationPropertyDataProvider | undefined>(undefined);\n const [currentPropertyList, setCurrentPropertyList] = useState<PropertyRecord[]>([]);\n const [selectionKeySet, setSelectionKeyset] = useState<KeySet>(new KeySet());\n const [queryBuilder, setQueryBuilder] = useState<QueryBuilder | undefined>();\n\n useEffect(() => {\n const onSelectionChanged = async (evt: SelectionChangeEventArgs, selectionProvider: ISelectionProvider) => {\n const selection = selectionProvider.getSelection(evt.imodel, evt.level);\n const keys = new KeySet(selection);\n setSelectionKeyset(keys);\n const dataProvider = await createPropertyDataProvider(keys, iModelConnection);\n setDataProvider(dataProvider);\n setQueryBuilder(new QueryBuilder(dataProvider, iModelConnection));\n };\n\n return iModelConnection ? Presentation.selection.selectionChange.addListener(onSelectionChanged) : () => {};\n }, [iModelConnection]);\n \n const resetMutation = useMutation({\n mutationFn: resetView,\n /* eslint-disable no-console */\n onError: (e) => console.error(e),\n });\n\n const onClickResetButton = useCallback(() => {\n queryBuilder?.resetQueryBuilder();\n updateQuery(\"\");\n if (currentPropertyList.length > 0) {\n setCurrentPropertyList([]);\n } else if (iModelConnection) {\n Presentation.selection.clearSelection(\"GroupQueryBuilderCustomUI\", iModelConnection);\n }\n resetMutation.mutate();\n\n }, [iModelConnection, currentPropertyList, resetMutation, queryBuilder, updateQuery]);\n\n const resize = useCallback((width, height) => setSize({ width, height }), []);\n\n const propertyContextValues = useMemo(\n () => ({\n currentPropertyList,\n setCurrentPropertyList,\n queryBuilder,\n setQuery: updateQuery,\n resetView,\n isUpdating: isUpdating ?? false,\n }),\n [currentPropertyList, isUpdating, queryBuilder, resetView, updateQuery],\n );\n\n const actionButtonRenderers = useMemo(() => [({ property }: ActionButtonRendererProps) => <PropertyAction property={property} />], []);\n\n return (\n <div className=\"gmw-select-query-generator-container\">\n {!dataProvider || selectionKeySet.size === 0 ? (\n <Alert type=\"informational\">{GroupingMappingWidget.translate(\"customUI.queryBuilderAlert\")}</Alert>\n ) : (\n <>\n <div className=\"gmw-select-property-grid-container\">\n <ResizableContainerObserver onResize={resize} />\n <PropertyGridWrapperContext.Provider value={propertyContextValues}>\n <VirtualizedPropertyGridWithDataProvider\n dataProvider={dataProvider}\n width={size.width}\n height={size.height}\n actionButtonRenderers={actionButtonRenderers}\n />\n </PropertyGridWrapperContext.Provider>\n </div>\n <div className=\"gmw-select-reset-button\">\n <Button styleType=\"default\" size=\"small\" onClick={onClickResetButton}>\n {GroupingMappingWidget.translate(\"common.reset\")}\n </Button>\n </div>\n </>\n )}\n </div>\n );\n};\n"]}
|
|
@@ -10,7 +10,7 @@ export declare enum GroupingMappingCustomUIType {
|
|
|
10
10
|
/**
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type GroupingMappingCustomUI = GroupingCustomUI | ContextCustomUI;
|
|
14
14
|
/** Custom UI Definitions.
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManualGroupingCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/ManualGroupingCustomUI.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,+BAA+B,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,oBAAoB,EAAyB,EAAE,EAAE;IAC5H,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IAEjF,OAAO,CACL,6BAAK,SAAS,EAAC,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CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,oBAAoB,EAAyB,EAAE,EAAE;IAC5H,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IAEjF,OAAO,CACL,6BAAK,SAAS,EAAC,iBAAiB;QAC9B,oBAAC,KAAK,IAAC,IAAI,EAAC,eAAe,IAAE,qBAAqB,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAS;QAClG,oBAAC,eAAe,IACd,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,2BAA2B,CAAC,EACnE,QAAQ,QACR,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACvD,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,qBAAqB,CAAC,SAAS,CAAC,iCAAiC,CAAC,GAC/E;QACF,6BAAK,SAAS,EAAC,oBAAoB;YAChC,UAAU,IAAI,oBAAC,cAAc,OAAG;YACjC,oBAAC,MAAM,IAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,IAClE,qBAAqB,CAAC,SAAS,CAAC,cAAc,CAAC,CACzC;YACT,oBAAC,MAAM,IACL,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,KAAK,IAAI,EAAE;oBAClB,WAAW,CAAC,EAAE,CAAC,CAAC;oBAChB,cAAc,CAAC,EAAE,CAAC,CAAC;oBACnB,IAAI,SAAS,EAAE,CAAC;wBACd,MAAM,SAAS,EAAE,CAAC;oBACpB,CAAC;gBACH,CAAC,IAEA,qBAAqB,CAAC,SAAS,CAAC,cAAc,CAAC,CACzC,CACL,CACF,CACP,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 *--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport { Alert, Button, LabeledTextarea } from \"@itwin/itwinui-react\";\nimport { LoadingSpinner } from \"../SharedComponents/LoadingSpinner\";\nimport \"./ManualGroupingCustomUI.scss\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport { GroupingMappingWidget } from \"../../GroupingMappingWidget\";\n\n/**\n * A default group query builder for the Grouping Mapping Widget that uses a manual input to generate queries.\n * @public\n */\nexport const ManualGroupingCustomUI = ({ updateQuery, isUpdating, resetView, initialEditModeQuery }: GroupingCustomUIProps) => {\n const [manualInput, setManualInput] = React.useState(initialEditModeQuery ?? \"\");\n\n return (\n <div className=\"gmw-manual-form\">\n <Alert type=\"informational\">{GroupingMappingWidget.translate(\"customUI.manualQueryAlert\")}</Alert>\n <LabeledTextarea\n label={GroupingMappingWidget.translate(\"customUI.manualQueryLabel\")}\n required\n value={manualInput}\n onChange={(event) => setManualInput(event.target.value)}\n disabled={isUpdating}\n placeholder={GroupingMappingWidget.translate(\"customUI.manualQueryPlaceholder\")}\n />\n <div className=\"gmw-manual-actions\">\n {isUpdating && <LoadingSpinner />}\n <Button disabled={isUpdating} onClick={() => updateQuery(manualInput)}>\n {GroupingMappingWidget.translate(\"common.apply\")}\n </Button>\n <Button\n disabled={isUpdating}\n onClick={async () => {\n updateQuery(\"\");\n setManualInput(\"\");\n if (resetView) {\n await resetView();\n }\n }}\n >\n {GroupingMappingWidget.translate(\"common.clear\")}\n </Button>\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchGroupingCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/SearchGroupingCustomUI.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,eA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CAAC,CAAC;oBAChB,cAAc,CAAC,EAAE,CAAC,CAAC;oBACnB,IAAI,SAAS,EAAE;wBACb,MAAM,SAAS,EAAE,CAAC;qBACnB;gBACH,CAAC,IAEA,qBAAqB,CAAC,SAAS,CAAC,cAAc,CAAC,CACzC,CACL,CACF,CACP,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 *--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport { Alert, Button, LabeledTextarea } from \"@itwin/itwinui-react\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport { LoadingSpinner } from \"../SharedComponents/LoadingSpinner\";\nimport \"./SearchGroupingCustomUI.scss\";\nimport { GroupingMappingWidget } from \"../../GroupingMappingWidget\";\n\n/**\n * A default group query builder for the Grouping Mapping Widget that uses a generic query template to search for elements.\n * @public\n */\nexport const SearchGroupingCustomUI = ({ updateQuery, isUpdating, resetView }: GroupingCustomUIProps) => {\n const [searchInput, setSearchInput] = React.useState(\"\");\n const isWrappedInQuotes = (text: string) => {\n return text.startsWith(`\"`) && text.endsWith(`\"`);\n };\n\n const needsAndOperator = (token: string, index: number, searchQuery: string[]) =>\n isWrappedInQuotes(token) || (index === 1 && isWrappedInQuotes(searchQuery[0]));\n\n const generateSearchQuery = (searchQuery: string[]) => {\n if (searchQuery.length === 0) {\n updateQuery(\"\");\n return;\n }\n\n let generatedSearchQuery = `SELECT be.ECInstanceId, be.ECClassId FROM bis.geometricelement3d be `;\n generatedSearchQuery += `LEFT JOIN bis.SpatialCategory cat ON be.Category.Id = cat.ECInstanceID LEFT JOIN ecdbmeta.ECClassDef ecc ON be.ECClassId = ecc.ECInstanceId `;\n generatedSearchQuery += `LEFT JOIN bis.PhysicalType pt ON be.TypeDefinition.Id = pt.ECInstanceID`;\n generatedSearchQuery += ` WHERE `;\n generatedSearchQuery += `((${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} be.codevalue LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")}) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} be.userlabel LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})) OR ((${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} cat.codevalue LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")}) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} cat.userlabel LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} ecc.name LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})`;\n // Physical Types\n generatedSearchQuery += ` OR ((${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} pt.codevalue LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")}) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} pt.userlabel LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})) `;\n\n updateQuery(generatedSearchQuery);\n };\n\n return (\n <div className=\"gmw-search-form\">\n <Alert type=\"informational\">{GroupingMappingWidget.translate(\"customUI.searchQueryAlert\")}</Alert>\n <LabeledTextarea\n label={GroupingMappingWidget.translate(\"customUI.searchQueryLabel\")}\n required\n value={searchInput}\n onChange={(event) => setSearchInput(event.target.value)}\n disabled={isUpdating}\n placeholder={GroupingMappingWidget.translate(\"customUI.searchQueryPlaceholder\")}\n />\n <div className=\"gmw-search-actions\">\n {isUpdating && <LoadingSpinner />}\n <Button\n disabled={isUpdating}\n onClick={() =>\n generateSearchQuery(\n searchInput\n ? searchInput\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .trim()\n .split(\" \")\n : [],\n )\n }\n >\n {GroupingMappingWidget.translate(\"common.apply\")}\n </Button>\n <Button\n disabled={isUpdating}\n onClick={async () => {\n updateQuery(\"\");\n setSearchInput(\"\");\n if (resetView) {\n await resetView();\n }\n }}\n >\n {GroupingMappingWidget.translate(\"common.clear\")}\n </Button>\n </div>\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"SearchGroupingCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/SearchGroupingCustomUI.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAyB,EAAE,EAAE;IACtG,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzD,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;QACz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E,qBAAqB,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAS;QAClG,oBAAC,eAAe,IACd,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,2BAA2B,CAAC,EACnE,QAAQ,QACR,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACvD,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,qBAAqB,CAAC,SAAS,CAAC,iCAAiC,CAAC,GAC/E;QACF,6BAAK,SAAS,EAAC,oBAAoB;YAChC,UAAU,IAAI,oBAAC,cAAc,OAAG;YACjC,oBAAC,MAAM,IACL,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,GAAG,EAAE,CACZ,mBAAmB,CACjB,WAAW;oBACT,CAAC,CAAC,WAAW;yBACR,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;yBAC7B,IAAI,EAAE;yBACN,KAAK,CAAC,GAAG,CAAC;oBACf,CAAC,CAAC,EAAE,CACP,IAGF,qBAAqB,CAAC,SAAS,CAAC,cAAc,CAAC,CACzC;YACT,oBAAC,MAAM,IACL,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,KAAK,IAAI,EAAE;oBAClB,WAAW,CAAC,EAAE,CAAC,CAAC;oBAChB,cAAc,CAAC,EAAE,CAAC,CAAC;oBACnB,IAAI,SAAS,EAAE,CAAC;wBACd,MAAM,SAAS,EAAE,CAAC;oBACpB,CAAC;gBACH,CAAC,IAEA,qBAAqB,CAAC,SAAS,CAAC,cAAc,CAAC,CACzC,CACL,CACF,CACP,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 *--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport { Alert, Button, LabeledTextarea } from \"@itwin/itwinui-react\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport { LoadingSpinner } from \"../SharedComponents/LoadingSpinner\";\nimport \"./SearchGroupingCustomUI.scss\";\nimport { GroupingMappingWidget } from \"../../GroupingMappingWidget\";\n\n/**\n * A default group query builder for the Grouping Mapping Widget that uses a generic query template to search for elements.\n * @public\n */\nexport const SearchGroupingCustomUI = ({ updateQuery, isUpdating, resetView }: GroupingCustomUIProps) => {\n const [searchInput, setSearchInput] = React.useState(\"\");\n const isWrappedInQuotes = (text: string) => {\n return text.startsWith(`\"`) && text.endsWith(`\"`);\n };\n\n const needsAndOperator = (token: string, index: number, searchQuery: string[]) =>\n isWrappedInQuotes(token) || (index === 1 && isWrappedInQuotes(searchQuery[0]));\n\n const generateSearchQuery = (searchQuery: string[]) => {\n if (searchQuery.length === 0) {\n updateQuery(\"\");\n return;\n }\n\n let generatedSearchQuery = `SELECT be.ECInstanceId, be.ECClassId FROM bis.geometricelement3d be `;\n generatedSearchQuery += `LEFT JOIN bis.SpatialCategory cat ON be.Category.Id = cat.ECInstanceID LEFT JOIN ecdbmeta.ECClassDef ecc ON be.ECClassId = ecc.ECInstanceId `;\n generatedSearchQuery += `LEFT JOIN bis.PhysicalType pt ON be.TypeDefinition.Id = pt.ECInstanceID`;\n generatedSearchQuery += ` WHERE `;\n generatedSearchQuery += `((${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} be.codevalue LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")}) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} be.userlabel LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})) OR ((${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} cat.codevalue LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")}) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} cat.userlabel LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} ecc.name LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})`;\n // Physical Types\n generatedSearchQuery += ` OR ((${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} pt.codevalue LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")}) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0 ? \"\" : needsAndOperator(token, index, searchQuery) ? \"AND\" : \"OR\"} pt.userlabel LIKE '%${\n isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})) `;\n\n updateQuery(generatedSearchQuery);\n };\n\n return (\n <div className=\"gmw-search-form\">\n <Alert type=\"informational\">{GroupingMappingWidget.translate(\"customUI.searchQueryAlert\")}</Alert>\n <LabeledTextarea\n label={GroupingMappingWidget.translate(\"customUI.searchQueryLabel\")}\n required\n value={searchInput}\n onChange={(event) => setSearchInput(event.target.value)}\n disabled={isUpdating}\n placeholder={GroupingMappingWidget.translate(\"customUI.searchQueryPlaceholder\")}\n />\n <div className=\"gmw-search-actions\">\n {isUpdating && <LoadingSpinner />}\n <Button\n disabled={isUpdating}\n onClick={() =>\n generateSearchQuery(\n searchInput\n ? searchInput\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .trim()\n .split(\" \")\n : [],\n )\n }\n >\n {GroupingMappingWidget.translate(\"common.apply\")}\n </Button>\n <Button\n disabled={isUpdating}\n onClick={async () => {\n updateQuery(\"\");\n setSearchInput(\"\");\n if (resetView) {\n await resetView();\n }\n }}\n >\n {GroupingMappingWidget.translate(\"common.clear\")}\n </Button>\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -39,6 +39,8 @@ export declare class BboxDimensionsDecorator implements Decorator {
|
|
|
39
39
|
private inferSpatialData;
|
|
40
40
|
/** Validate if instance has all necessary properties. */
|
|
41
41
|
private validateQueryResult;
|
|
42
|
+
private readNumber;
|
|
43
|
+
private asNumber;
|
|
42
44
|
/**
|
|
43
45
|
* Takes a Bounding Box and builds a rectangular polyface.
|
|
44
46
|
* @param bbox The desired Bounding Box.
|