@itwin/grouping-mapping-widget 0.26.0 → 0.27.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/LICENSE.md +9 -9
- package/README.md +115 -115
- package/lib/cjs/WidgetShell/GroupingMapping.js +2 -4
- package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingContent.js +4 -4
- package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingHeader.d.ts +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingHeader.js +5 -5
- package/lib/cjs/WidgetShell/GroupingMappingHeader.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js +1 -3
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -1
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +29 -23
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
- package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
- package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
- package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
- package/lib/cjs/common/hooks/useIsMounted.js +3 -3
- package/lib/cjs/common/hooks/useIsMounted.js.map +1 -1
- package/lib/cjs/common/hooks/useMemoizedCollectionPick.js +3 -3
- package/lib/cjs/common/hooks/useMemoizedCollectionPick.js.map +1 -1
- package/lib/cjs/common/utils.js +3 -3
- package/lib/cjs/common/utils.js.map +1 -1
- package/lib/cjs/common/viewerUtils.js +2 -2
- package/lib/cjs/common/viewerUtils.js.map +1 -1
- package/lib/cjs/components/Constants.js +4 -4
- package/lib/cjs/components/Constants.js.map +1 -1
- package/lib/cjs/components/GroupingMappingContext.js +13 -4
- package/lib/cjs/components/GroupingMappingContext.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupAction.js +7 -9
- package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetails.d.ts +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetails.js +5 -7
- package/lib/cjs/components/Groups/Editing/GroupDetails.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js +4 -4
- package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
- package/lib/cjs/components/Groups/GroupColorLegend.js +3 -3
- package/lib/cjs/components/Groups/GroupColorLegend.js.map +1 -1
- package/lib/cjs/components/Groups/GroupListItem.js +3 -4
- package/lib/cjs/components/Groups/GroupListItem.js.map +1 -1
- package/lib/cjs/components/Groups/GroupListItem.scss +2 -2
- package/lib/cjs/components/Groups/GroupMenuActions.js +17 -6
- package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -1
- package/lib/cjs/components/Groups/GroupOverlapProgressBar.js.map +1 -1
- package/lib/cjs/components/Groups/Groups.js +3 -3
- package/lib/cjs/components/Groups/Groups.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsAddButton.d.ts +1 -1
- package/lib/cjs/components/Groups/GroupsAddButton.js +4 -4
- package/lib/cjs/components/Groups/GroupsAddButton.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsAddButton.scss +1 -1
- package/lib/cjs/components/Groups/GroupsShowHideButtons.d.ts +1 -1
- package/lib/cjs/components/Groups/GroupsShowHideButtons.js +2 -2
- package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsView.js +8 -10
- package/lib/cjs/components/Groups/GroupsView.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsView.scss +1 -1
- package/lib/cjs/components/Groups/GroupsVisualization.js +19 -20
- package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsVisualizationActions.js +4 -4
- package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -1
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.d.ts +1 -1
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js +4 -4
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
- package/lib/cjs/components/Groups/ToggleGroupVisibility.js +3 -3
- package/lib/cjs/components/Groups/ToggleGroupVisibility.js.map +1 -1
- package/lib/cjs/components/Groups/groupsHelpers.js +8 -4
- package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useFetchGroups.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +1 -1
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js +5 -5
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.d.ts +1 -1
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useVisualization.js +2 -4
- package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -1
- package/lib/cjs/components/Mappings/BlockingOverlay.js +3 -3
- package/lib/cjs/components/Mappings/BlockingOverlay.js.map +1 -1
- package/lib/cjs/components/Mappings/Editing/MappingAction.js +11 -15
- package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +9 -6
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js +9 -9
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js +26 -30
- package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +3 -3
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectIModel.d.ts +1 -1
- package/lib/cjs/components/Mappings/Import/SelectIModel.js +5 -5
- package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectITwin.js +2 -2
- package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectITwin.scss +1 -1
- package/lib/cjs/components/Mappings/Import/SelectMappings.d.ts +1 -1
- package/lib/cjs/components/Mappings/Import/SelectMappings.js +7 -7
- package/lib/cjs/components/Mappings/Import/SelectMappings.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingListItem.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingViewActionGroup.d.ts +1 -1
- package/lib/cjs/components/Mappings/MappingViewActionGroup.js +6 -7
- package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -1
- package/lib/cjs/components/Mappings/Mappings.js +3 -3
- package/lib/cjs/components/Mappings/Mappings.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingsView.js +14 -16
- package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js +3 -1
- package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js +3 -3
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappings.js +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappings.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js +36 -18
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.d.ts +1 -1
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.js +8 -6
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +3 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +10 -9
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +7 -8
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +24 -66
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +5 -9
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +6 -17
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +8 -9
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +20 -161
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.scss +5 -4
- package/lib/cjs/components/Properties/GroupColorToggle.js +4 -4
- package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/cjs/components/Properties/GroupInformationPanel.js +3 -3
- package/lib/cjs/components/Properties/GroupInformationPanel.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +90 -40
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.scss +3 -2
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.d.ts +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +24 -14
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js +20 -39
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +20 -29
- package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
- package/lib/cjs/components/Properties/GroupProperties/SaveModal.js +7 -7
- package/lib/cjs/components/Properties/GroupProperties/SaveModal.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyAction.js +9 -21
- package/lib/cjs/components/Properties/PropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyMenu.d.ts +1 -1
- package/lib/cjs/components/Properties/PropertyMenu.js +5 -10
- package/lib/cjs/components/Properties/PropertyMenu.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js +5 -5
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyNameCell.d.ts +1 -1
- package/lib/cjs/components/Properties/PropertyNameCell.js +4 -4
- package/lib/cjs/components/Properties/PropertyNameCell.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyTable.js +5 -6
- package/lib/cjs/components/Properties/PropertyTable.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyTableToolbar.d.ts +1 -1
- package/lib/cjs/components/Properties/PropertyTableToolbar.js +4 -4
- package/lib/cjs/components/Properties/PropertyTableToolbar.js.map +1 -1
- package/lib/cjs/components/Properties/ScrollableExpandableBlock.d.ts +11 -0
- package/lib/cjs/components/Properties/ScrollableExpandableBlock.js +55 -0
- package/lib/cjs/components/Properties/ScrollableExpandableBlock.js.map +1 -0
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.d.ts +6 -3
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +62 -16
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -1
- package/lib/cjs/components/Properties/hooks/useForwardRef.d.ts +3 -0
- package/lib/cjs/components/Properties/hooks/useForwardRef.js +20 -0
- package/lib/cjs/components/Properties/hooks/useForwardRef.js.map +1 -0
- package/lib/cjs/components/Properties/hooks/usePropertiesQuery.js.map +1 -1
- package/lib/cjs/components/Properties/hooks/useValidator.js +4 -4
- package/lib/cjs/components/Properties/hooks/useValidator.js.map +1 -1
- package/lib/cjs/components/SharedComponents/ActionPanel.d.ts +3 -1
- package/lib/cjs/components/SharedComponents/ActionPanel.js +9 -10
- package/lib/cjs/components/SharedComponents/ActionPanel.js.map +1 -1
- package/lib/cjs/components/SharedComponents/DeleteModal.d.ts +1 -1
- package/lib/cjs/components/SharedComponents/DeleteModal.js +9 -10
- package/lib/cjs/components/SharedComponents/DeleteModal.js.map +1 -1
- package/lib/cjs/components/SharedComponents/EmptyMessage.js +4 -4
- package/lib/cjs/components/SharedComponents/EmptyMessage.js.map +1 -1
- package/lib/cjs/components/SharedComponents/LoadingOverlay.js +4 -4
- package/lib/cjs/components/SharedComponents/LoadingOverlay.js.map +1 -1
- package/lib/cjs/components/SharedComponents/LoadingSpinner.js +3 -3
- package/lib/cjs/components/SharedComponents/LoadingSpinner.js.map +1 -1
- package/lib/cjs/components/SharedComponents/StatusIcon.js +3 -3
- package/lib/cjs/components/SharedComponents/StatusIcon.js.map +1 -1
- package/lib/cjs/components/context/ExtractionClientContext.js.map +1 -1
- package/lib/cjs/components/context/ExtractionStateJobContext.js +3 -3
- package/lib/cjs/components/context/ExtractionStateJobContext.js.map +1 -1
- package/lib/cjs/components/context/GroupHilitedElementsContext.js +3 -3
- package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -1
- package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -1
- package/lib/cjs/components/context/GroupingMappingCustomUIContext.js +3 -3
- package/lib/cjs/components/context/GroupingMappingCustomUIContext.js.map +1 -1
- package/lib/cjs/components/context/GroupsClientContext.js.map +1 -1
- package/lib/cjs/components/context/IModelsClientContext.js.map +1 -1
- package/lib/cjs/components/context/ITwinsClientContext.js +3 -3
- package/lib/cjs/components/context/ITwinsClientContext.js.map +1 -1
- package/lib/cjs/components/context/MappingClientContext.js.map +1 -1
- package/lib/cjs/components/context/PropertiesClientContext.js.map +1 -1
- package/lib/cjs/components/context/PropertiesGroupColorContext.js +3 -3
- package/lib/cjs/components/context/PropertiesGroupColorContext.js.map +1 -1
- package/lib/cjs/components/context/PropertyGridWrapperContext.js +3 -3
- package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -1
- package/lib/cjs/components/customUI/DefaultGroupingUI.js +3 -3
- package/lib/cjs/components/customUI/DefaultGroupingUI.js.map +1 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +13 -18
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.d.ts +1 -1
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.js +8 -8
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.d.ts +1 -1
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.js +16 -45
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.js.map +1 -1
- package/lib/cjs/decorators/BboxDimensionsDecorator.js +3 -10
- package/lib/cjs/decorators/BboxDimensionsDecorator.js.map +1 -1
- package/lib/cjs/formula/FormulaDataTypeResolver.d.ts +3 -2
- package/lib/cjs/formula/FormulaDataTypeResolver.js +10 -6
- package/lib/cjs/formula/FormulaDataTypeResolver.js.map +1 -1
- package/lib/cjs/formula/FormulaFunctionProvider.js +146 -65
- package/lib/cjs/formula/FormulaFunctionProvider.js.map +1 -1
- package/lib/cjs/formula/FormulaOperatorsProvider.js +138 -44
- package/lib/cjs/formula/FormulaOperatorsProvider.js.map +1 -1
- package/lib/cjs/formula/FormulaSplitter.js +63 -13
- package/lib/cjs/formula/FormulaSplitter.js.map +1 -1
- package/lib/cjs/formula/FormulaTokensDataTypeResolver.js +7 -14
- package/lib/cjs/formula/FormulaTokensDataTypeResolver.js.map +1 -1
- package/lib/cjs/formula/IResult.js.map +1 -1
- package/lib/cjs/formula/InfixToPostfixConverter.js +4 -4
- package/lib/cjs/formula/InfixToPostfixConverter.js.map +1 -1
- package/lib/cjs/formula/InputStream.js +3 -3
- 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 +3 -3
- package/lib/cjs/formula/Queue.js.map +1 -1
- package/lib/cjs/formula/Stack.js +3 -3
- package/lib/cjs/formula/Stack.js.map +1 -1
- package/lib/cjs/formula/StringBuilder.js +3 -3
- package/lib/cjs/formula/StringBuilder.js.map +1 -1
- package/lib/cjs/formula/Types.js.map +1 -1
- package/lib/cjs/formula/Utils.js +4 -4
- package/lib/cjs/formula/Utils.js.map +1 -1
- package/lib/cjs/grouping-mapping-widget.d.ts +3 -5
- package/lib/cjs/grouping-mapping-widget.js +4 -8
- package/lib/cjs/grouping-mapping-widget.js.map +1 -1
- package/lib/cjs/test/GroupPropertyUtils.test.js +27 -26
- package/lib/cjs/test/GroupPropertyUtils.test.js.map +1 -1
- package/lib/cjs/test/GroupingMappingCustomUI.test.js +4 -6
- package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/cjs/test/MockFactory.js +3 -3
- package/lib/cjs/test/MockFactory.js.map +1 -1
- package/lib/cjs/test/PropertyFieldsHelpers.js +3 -3
- package/lib/cjs/test/PropertyFieldsHelpers.js.map +1 -1
- package/lib/cjs/test/QueryBuilder.test.js +3 -3
- package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
- package/lib/cjs/test/QueryBuilder.testdata.js +3 -3
- package/lib/cjs/test/QueryBuilder.testdata.js.map +1 -1
- package/lib/cjs/test/QueryBuilderTestData.js.map +1 -1
- package/lib/cjs/test/WidgetHeader.test.js +3 -3
- package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
- package/lib/cjs/test/test-utils.js +4 -4
- package/lib/cjs/test/test-utils.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMapping.js +3 -5
- package/lib/esm/WidgetShell/GroupingMapping.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMappingContent.js +4 -4
- package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMappingHeader.d.ts +1 -1
- package/lib/esm/WidgetShell/GroupingMappingHeader.js +5 -5
- package/lib/esm/WidgetShell/GroupingMappingHeader.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMappingWidget.js +2 -4
- package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -1
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +29 -23
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
- package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
- package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
- package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
- package/lib/esm/common/hooks/useIsMounted.js +3 -3
- package/lib/esm/common/hooks/useIsMounted.js.map +1 -1
- package/lib/esm/common/hooks/useMemoizedCollectionPick.js +3 -3
- package/lib/esm/common/hooks/useMemoizedCollectionPick.js.map +1 -1
- package/lib/esm/common/utils.js +3 -3
- package/lib/esm/common/utils.js.map +1 -1
- package/lib/esm/common/viewerUtils.js +2 -2
- package/lib/esm/common/viewerUtils.js.map +1 -1
- package/lib/esm/components/Constants.js +4 -4
- package/lib/esm/components/Constants.js.map +1 -1
- package/lib/esm/components/GroupingMappingContext.js +14 -5
- package/lib/esm/components/GroupingMappingContext.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupAction.js +8 -10
- package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetails.d.ts +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetails.js +5 -7
- package/lib/esm/components/Groups/Editing/GroupDetails.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsStep.js +4 -4
- package/lib/esm/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
- package/lib/esm/components/Groups/GroupColorLegend.js +3 -3
- package/lib/esm/components/Groups/GroupColorLegend.js.map +1 -1
- package/lib/esm/components/Groups/GroupListItem.js +3 -4
- package/lib/esm/components/Groups/GroupListItem.js.map +1 -1
- package/lib/esm/components/Groups/GroupListItem.scss +2 -2
- package/lib/esm/components/Groups/GroupMenuActions.js +17 -6
- package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -1
- package/lib/esm/components/Groups/GroupOverlapProgressBar.js.map +1 -1
- package/lib/esm/components/Groups/Groups.js +3 -3
- package/lib/esm/components/Groups/Groups.js.map +1 -1
- package/lib/esm/components/Groups/GroupsAddButton.d.ts +1 -1
- package/lib/esm/components/Groups/GroupsAddButton.js +4 -4
- package/lib/esm/components/Groups/GroupsAddButton.js.map +1 -1
- package/lib/esm/components/Groups/GroupsAddButton.scss +1 -1
- package/lib/esm/components/Groups/GroupsShowHideButtons.d.ts +1 -1
- package/lib/esm/components/Groups/GroupsShowHideButtons.js +2 -2
- package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -1
- package/lib/esm/components/Groups/GroupsView.js +10 -12
- package/lib/esm/components/Groups/GroupsView.js.map +1 -1
- package/lib/esm/components/Groups/GroupsView.scss +1 -1
- package/lib/esm/components/Groups/GroupsVisualization.js +21 -22
- package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/esm/components/Groups/GroupsVisualizationActions.js +4 -4
- package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -1
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.d.ts +1 -1
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js +5 -5
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
- package/lib/esm/components/Groups/ToggleGroupVisibility.js +3 -3
- package/lib/esm/components/Groups/ToggleGroupVisibility.js.map +1 -1
- package/lib/esm/components/Groups/groupsHelpers.js +9 -5
- package/lib/esm/components/Groups/groupsHelpers.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useFetchGroups.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +1 -1
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js +5 -5
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.d.ts +1 -1
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useVisualization.js +3 -5
- package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -1
- package/lib/esm/components/Mappings/BlockingOverlay.js +3 -3
- package/lib/esm/components/Mappings/BlockingOverlay.js.map +1 -1
- package/lib/esm/components/Mappings/Editing/MappingAction.js +11 -15
- package/lib/esm/components/Mappings/Editing/MappingAction.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js +9 -6
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js +9 -9
- package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
- package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
- package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js +27 -31
- package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js +3 -3
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectIModel.d.ts +1 -1
- package/lib/esm/components/Mappings/Import/SelectIModel.js +5 -5
- package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectITwin.js +2 -2
- package/lib/esm/components/Mappings/Import/SelectITwin.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectITwin.scss +1 -1
- package/lib/esm/components/Mappings/Import/SelectMappings.d.ts +1 -1
- package/lib/esm/components/Mappings/Import/SelectMappings.js +8 -8
- package/lib/esm/components/Mappings/Import/SelectMappings.js.map +1 -1
- package/lib/esm/components/Mappings/MappingListItem.js.map +1 -1
- package/lib/esm/components/Mappings/MappingViewActionGroup.d.ts +1 -1
- package/lib/esm/components/Mappings/MappingViewActionGroup.js +8 -9
- package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -1
- package/lib/esm/components/Mappings/Mappings.js +3 -3
- package/lib/esm/components/Mappings/Mappings.js.map +1 -1
- package/lib/esm/components/Mappings/MappingsView.js +16 -18
- package/lib/esm/components/Mappings/MappingsView.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js +3 -1
- package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js +3 -3
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappings.js +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappings.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.js +36 -18
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useRunExtraction.d.ts +1 -1
- package/lib/esm/components/Mappings/hooks/useRunExtraction.js +8 -6
- package/lib/esm/components/Mappings/hooks/useRunExtraction.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +3 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +11 -10
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +7 -8
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +27 -66
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +5 -9
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +8 -19
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +8 -9
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js +21 -139
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.scss +5 -4
- package/lib/esm/components/Properties/GroupColorToggle.js +4 -4
- package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/esm/components/Properties/GroupInformationPanel.js +3 -3
- package/lib/esm/components/Properties/GroupInformationPanel.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +94 -44
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.scss +3 -2
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.d.ts +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js +26 -16
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js +21 -40
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +26 -35
- package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
- package/lib/esm/components/Properties/GroupProperties/SaveModal.js +8 -8
- package/lib/esm/components/Properties/GroupProperties/SaveModal.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
- package/lib/esm/components/Properties/PropertyAction.js +9 -21
- package/lib/esm/components/Properties/PropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/PropertyMenu.d.ts +1 -1
- package/lib/esm/components/Properties/PropertyMenu.js +5 -10
- package/lib/esm/components/Properties/PropertyMenu.js.map +1 -1
- package/lib/esm/components/Properties/PropertyMenuWithVisualization.js +5 -5
- package/lib/esm/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
- package/lib/esm/components/Properties/PropertyNameCell.d.ts +1 -1
- package/lib/esm/components/Properties/PropertyNameCell.js +4 -4
- package/lib/esm/components/Properties/PropertyNameCell.js.map +1 -1
- package/lib/esm/components/Properties/PropertyTable.js +5 -6
- package/lib/esm/components/Properties/PropertyTable.js.map +1 -1
- package/lib/esm/components/Properties/PropertyTableToolbar.d.ts +1 -1
- package/lib/esm/components/Properties/PropertyTableToolbar.js +4 -4
- package/lib/esm/components/Properties/PropertyTableToolbar.js.map +1 -1
- package/lib/esm/components/Properties/ScrollableExpandableBlock.d.ts +11 -0
- package/lib/esm/components/Properties/ScrollableExpandableBlock.js +29 -0
- package/lib/esm/components/Properties/ScrollableExpandableBlock.js.map +1 -0
- package/lib/esm/components/Properties/hooks/useFormulaValidation.d.ts +6 -3
- package/lib/esm/components/Properties/hooks/useFormulaValidation.js +60 -15
- package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -1
- package/lib/esm/components/Properties/hooks/useForwardRef.d.ts +3 -0
- package/lib/esm/components/Properties/hooks/useForwardRef.js +16 -0
- package/lib/esm/components/Properties/hooks/useForwardRef.js.map +1 -0
- package/lib/esm/components/Properties/hooks/usePropertiesQuery.js.map +1 -1
- package/lib/esm/components/Properties/hooks/useValidator.js +4 -4
- package/lib/esm/components/Properties/hooks/useValidator.js.map +1 -1
- package/lib/esm/components/SharedComponents/ActionPanel.d.ts +3 -1
- package/lib/esm/components/SharedComponents/ActionPanel.js +9 -10
- package/lib/esm/components/SharedComponents/ActionPanel.js.map +1 -1
- package/lib/esm/components/SharedComponents/DeleteModal.d.ts +1 -1
- package/lib/esm/components/SharedComponents/DeleteModal.js +10 -11
- package/lib/esm/components/SharedComponents/DeleteModal.js.map +1 -1
- package/lib/esm/components/SharedComponents/EmptyMessage.js +4 -4
- package/lib/esm/components/SharedComponents/EmptyMessage.js.map +1 -1
- package/lib/esm/components/SharedComponents/LoadingOverlay.js +4 -4
- package/lib/esm/components/SharedComponents/LoadingOverlay.js.map +1 -1
- package/lib/esm/components/SharedComponents/LoadingSpinner.js +3 -3
- package/lib/esm/components/SharedComponents/LoadingSpinner.js.map +1 -1
- package/lib/esm/components/SharedComponents/StatusIcon.js +3 -3
- package/lib/esm/components/SharedComponents/StatusIcon.js.map +1 -1
- package/lib/esm/components/context/ExtractionClientContext.js.map +1 -1
- package/lib/esm/components/context/ExtractionStateJobContext.js +3 -3
- package/lib/esm/components/context/ExtractionStateJobContext.js.map +1 -1
- package/lib/esm/components/context/GroupHilitedElementsContext.js +3 -3
- package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -1
- package/lib/esm/components/context/GroupingApiConfigContext.js.map +1 -1
- package/lib/esm/components/context/GroupingMappingCustomUIContext.js +3 -3
- package/lib/esm/components/context/GroupingMappingCustomUIContext.js.map +1 -1
- package/lib/esm/components/context/GroupsClientContext.js.map +1 -1
- package/lib/esm/components/context/IModelsClientContext.js.map +1 -1
- package/lib/esm/components/context/ITwinsClientContext.js +3 -3
- package/lib/esm/components/context/ITwinsClientContext.js.map +1 -1
- package/lib/esm/components/context/MappingClientContext.js.map +1 -1
- package/lib/esm/components/context/PropertiesClientContext.js.map +1 -1
- package/lib/esm/components/context/PropertiesGroupColorContext.js +3 -3
- package/lib/esm/components/context/PropertiesGroupColorContext.js.map +1 -1
- package/lib/esm/components/context/PropertyGridWrapperContext.js +3 -3
- package/lib/esm/components/context/PropertyGridWrapperContext.js.map +1 -1
- package/lib/esm/components/customUI/DefaultGroupingUI.js +3 -3
- package/lib/esm/components/customUI/DefaultGroupingUI.js.map +1 -1
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +14 -19
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/GroupingMappingCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/ManualGroupingCustomUI.d.ts +1 -1
- package/lib/esm/components/customUI/ManualGroupingCustomUI.js +8 -8
- package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/SearchGroupingCustomUI.d.ts +1 -1
- package/lib/esm/components/customUI/SearchGroupingCustomUI.js +16 -45
- package/lib/esm/components/customUI/SearchGroupingCustomUI.js.map +1 -1
- package/lib/esm/decorators/BboxDimensionsDecorator.js +5 -12
- package/lib/esm/decorators/BboxDimensionsDecorator.js.map +1 -1
- package/lib/esm/formula/FormulaDataTypeResolver.d.ts +3 -2
- package/lib/esm/formula/FormulaDataTypeResolver.js +10 -6
- package/lib/esm/formula/FormulaDataTypeResolver.js.map +1 -1
- package/lib/esm/formula/FormulaFunctionProvider.js +146 -65
- package/lib/esm/formula/FormulaFunctionProvider.js.map +1 -1
- package/lib/esm/formula/FormulaOperatorsProvider.js +138 -44
- package/lib/esm/formula/FormulaOperatorsProvider.js.map +1 -1
- package/lib/esm/formula/FormulaSplitter.js +63 -13
- package/lib/esm/formula/FormulaSplitter.js.map +1 -1
- package/lib/esm/formula/FormulaTokensDataTypeResolver.js +7 -14
- package/lib/esm/formula/FormulaTokensDataTypeResolver.js.map +1 -1
- package/lib/esm/formula/IResult.js.map +1 -1
- package/lib/esm/formula/InfixToPostfixConverter.js +5 -5
- package/lib/esm/formula/InfixToPostfixConverter.js.map +1 -1
- package/lib/esm/formula/InputStream.js +3 -3
- package/lib/esm/formula/InputStream.js.map +1 -1
- package/lib/esm/formula/ParenthesisValidator.js +3 -3
- package/lib/esm/formula/ParenthesisValidator.js.map +1 -1
- package/lib/esm/formula/Queue.js +3 -3
- package/lib/esm/formula/Queue.js.map +1 -1
- package/lib/esm/formula/Stack.js +3 -3
- package/lib/esm/formula/Stack.js.map +1 -1
- package/lib/esm/formula/StringBuilder.js +3 -3
- package/lib/esm/formula/StringBuilder.js.map +1 -1
- package/lib/esm/formula/Types.js.map +1 -1
- package/lib/esm/formula/Utils.js +4 -4
- package/lib/esm/formula/Utils.js.map +1 -1
- package/lib/esm/grouping-mapping-widget.d.ts +3 -5
- package/lib/esm/grouping-mapping-widget.js +6 -8
- package/lib/esm/grouping-mapping-widget.js.map +1 -1
- package/lib/esm/test/GroupPropertyUtils.test.js +28 -27
- package/lib/esm/test/GroupPropertyUtils.test.js.map +1 -1
- package/lib/esm/test/GroupingMappingCustomUI.test.js +4 -6
- package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/esm/test/MockFactory.js +3 -3
- package/lib/esm/test/MockFactory.js.map +1 -1
- package/lib/esm/test/PropertyFieldsHelpers.js +3 -3
- package/lib/esm/test/PropertyFieldsHelpers.js.map +1 -1
- package/lib/esm/test/QueryBuilder.test.js +3 -3
- package/lib/esm/test/QueryBuilder.test.js.map +1 -1
- package/lib/esm/test/QueryBuilder.testdata.js +3 -3
- package/lib/esm/test/QueryBuilder.testdata.js.map +1 -1
- package/lib/esm/test/QueryBuilderTestData.js.map +1 -1
- package/lib/esm/test/WidgetHeader.test.js +3 -3
- package/lib/esm/test/WidgetHeader.test.js.map +1 -1
- package/lib/esm/test/test-utils.js +4 -4
- package/lib/esm/test/test-utils.js.map +1 -1
- package/package.json +8 -4
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +0 -14
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +0 -87
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +0 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.scss +0 -9
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +0 -13
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js +0 -87
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js.map +0 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +0 -14
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +0 -60
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +0 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.scss +0 -9
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +0 -13
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js +0 -60
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import React, { useCallback, useMemo, useState } from "react";
|
|
6
|
-
import { Button, IconButton, List
|
|
7
|
-
import { SvgAdd, SvgImport, SvgPlay, SvgRefresh
|
|
6
|
+
import { Button, IconButton, List } from "@itwin/itwinui-react";
|
|
7
|
+
import { SvgAdd, SvgImport, SvgPlay, SvgRefresh } from "@itwin/itwinui-icons-react";
|
|
8
8
|
import { EmptyMessage } from "../SharedComponents/EmptyMessage";
|
|
9
9
|
import { LoadingOverlay } from "../SharedComponents/LoadingOverlay";
|
|
10
10
|
import "./MappingsView.scss";
|
|
@@ -61,10 +61,9 @@ export const MappingsView = ({ mappings, isLoading, extractionStatusData, showEx
|
|
|
61
61
|
React.createElement("div", { className: "gmw-mappings-view-container" },
|
|
62
62
|
React.createElement("div", { className: "gmw-table-toolbar" },
|
|
63
63
|
React.createElement("div", { className: "gmw-button-spacing" },
|
|
64
|
-
onClickAddMapping &&
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
React.createElement(SvgImport, null)),
|
|
64
|
+
onClickAddMapping && (React.createElement(Button, { startIcon: React.createElement(SvgAdd, null), onClick: onClickAddMapping, styleType: "high-visibility", title: "New Mapping" }, "New")),
|
|
65
|
+
showImportModal !== undefined && setShowImportModal && (React.createElement(IconButton, { title: `Import ${displayStrings.mappings}`, onClick: () => setShowImportModal(true) },
|
|
66
|
+
React.createElement(SvgImport, null))),
|
|
68
67
|
React.createElement(IconButton, { title: "Run extraction", onClick: onRunExtraction, disabled: selectedMappings.length === 0 },
|
|
69
68
|
React.createElement(SvgPlay, null))),
|
|
70
69
|
React.createElement("div", { className: "gmw-button-spacing" },
|
|
@@ -73,16 +72,15 @@ export const MappingsView = ({ mappings, isLoading, extractionStatusData, showEx
|
|
|
73
72
|
setShowExtractionMessageModal(true);
|
|
74
73
|
}
|
|
75
74
|
}, iconMessage: extractionStatusData.iconMessage }),
|
|
76
|
-
React.createElement(IconButton, { title: "Refresh", onClick: refreshAll, disabled: isLoading, styleType:
|
|
75
|
+
React.createElement(IconButton, { title: "Refresh", onClick: refreshAll, disabled: isLoading, styleType: "borderless" },
|
|
77
76
|
React.createElement(SvgRefresh, null)))),
|
|
78
77
|
alert,
|
|
79
|
-
React.createElement("div", { className:
|
|
80
|
-
isLoading ? (React.createElement(LoadingOverlay, null)) : mappings.length === 0 ? (React.createElement(EmptyMessage, { message: `No ${displayStrings.mappings} available.` })) : (React.createElement(List, { className: "gmw-mappings-list" }, mappings.map((mapping) => (React.createElement(MappingListItem, { key: mapping.id, mapping: mapping, jobId: mappingIdJobInfo?.get(mapping.id) ?? "", jobStartEvent: jobStartEvent, onClickMappingTitle: onClickMappingTitle, onSelectionChange: onSelectionChange, selected: selectedMappings.some((eachMapping) => mapping.id === eachMapping.id), onToggleExtraction: onToggleExtraction, onRefreshMappings: onRefreshMappings, onClickMappingModify: onClickMappingModify, setShowDeleteModal: setShowDeleteModal })))))),
|
|
81
|
-
showExtractionMessageModal && React.createElement(ExtractionMessageModal, { isOpen: showExtractionMessageModal, onClose: () => setShowExtractionMessageModal(false), extractionMessageData: extractionMessageData, timestamp: extractionMessageData.length === 0 ? "" : extractionMessageData[0].date }),
|
|
82
|
-
showDeleteModal &&
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
showImportModal && setShowImportModal && React.createElement(MappingImportWizardModal, { show: showImportModal, setShow: setShowImportModal, onFinish: onRefreshMappings, displayStrings: displayStrings })));
|
|
78
|
+
React.createElement("div", { className: "gmw-mappings-border" }),
|
|
79
|
+
isLoading && !isTogglingExtraction ? (React.createElement(LoadingOverlay, null)) : mappings.length === 0 ? (React.createElement(EmptyMessage, { message: `No ${displayStrings.mappings} available.` })) : (React.createElement(List, { className: "gmw-mappings-list" }, mappings.map((mapping) => (React.createElement(MappingListItem, { key: mapping.id, mapping: mapping, jobId: mappingIdJobInfo?.get(mapping.id) ?? "", jobStartEvent: jobStartEvent, onClickMappingTitle: onClickMappingTitle, onSelectionChange: onSelectionChange, selected: selectedMappings.some((eachMapping) => mapping.id === eachMapping.id), onToggleExtraction: onToggleExtraction, onRefreshMappings: onRefreshMappings, onClickMappingModify: onClickMappingModify, setShowDeleteModal: setShowDeleteModal })))))),
|
|
80
|
+
showExtractionMessageModal && (React.createElement(ExtractionMessageModal, { isOpen: showExtractionMessageModal, onClose: () => setShowExtractionMessageModal(false), extractionMessageData: extractionMessageData, timestamp: extractionMessageData.length === 0 ? "" : extractionMessageData[0].date })),
|
|
81
|
+
showDeleteModal && (React.createElement(DeleteModal, { entityName: showDeleteModal?.mappingName, onClose: () => setShowDeleteModal(undefined), onDelete: async () => {
|
|
82
|
+
await onDelete(showDeleteModal);
|
|
83
|
+
} })),
|
|
84
|
+
showImportModal && setShowImportModal && (React.createElement(MappingImportWizardModal, { show: showImportModal, setShow: setShowImportModal, onFinish: onRefreshMappings, displayStrings: displayStrings }))));
|
|
87
85
|
};
|
|
88
86
|
//# sourceMappingURL=MappingsView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MappingsView.js","sourceRoot":"","sources":["../../../../src/components/Mappings/MappingsView.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAI9D,OAAO,EACL,MAAM,EACN,UAAU,EACV,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,UAAU,GACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,qBAAqB,CAAC;AAC7B,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,CAAC,MAAM,gCA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AE,OAAO,EAChB,KAAK,EAAE,gBAAgB,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,EAC9C,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,iBAAiB,EAAE,iBAAiB,EACpC,QAAQ,EAAE,gBAAgB,CAAC,IAAI,CAC7B,CAAC,WAAW,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,CAC/C,EACD,kBAAkB,EAAE,kBAAkB,EACtC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,kBAAkB,EAAE,kBAAkB,GACtC,CACH,CAAC,CACG,CACR,CACG;QACL,0BAA0B,IAAI,oBAAC,sBAAsB,IACpD,MAAM,EAAE,0BAA0B,EAClC,OAAO,EAAE,GAAG,EAAE,CAAC,6BAA6B,CAAC,KAAK,CAAC,EACnD,qBAAqB,EAAE,qBAAqB,EAC5C,SAAS,EAAE,qBAAqB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,IAAI,GAClF;QACD,eAAe;YACd,oBAAC,WAAW,IACV,UAAU,EAAE,eAAe,EAAE,WAAW,EACxC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAC5C,QAAQ,EAAE,KAAK,IAAI,EAAE;oBACnB,MAAM,QAAQ,CAAC,eAAe,CAAC,CAAC;gBAClC,CAAC,GACD;QAEH,eAAe,IAAI,kBAAkB,IAAI,oBAAC,wBAAwB,IACjE,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,iBAAiB,EAC3B,cAAc,EAAE,cAAc,GAC9B,CACD,CACJ,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, useMemo, useState } from \"react\";\nimport type {\n Alert,\n} from \"@itwin/itwinui-react\";\nimport {\n Button,\n IconButton,\n List,\n} from \"@itwin/itwinui-react\";\nimport {\n SvgAdd,\n SvgImport,\n SvgPlay,\n SvgRefresh,\n} from \"@itwin/itwinui-icons-react\";\nimport { EmptyMessage } from \"../SharedComponents/EmptyMessage\";\nimport { LoadingOverlay } from \"../SharedComponents/LoadingOverlay\";\nimport \"./MappingsView.scss\";\nimport DeleteModal from \"../SharedComponents/DeleteModal\";\nimport { MappingImportWizardModal } from \"./Import/MappingImportWizardModal\";\nimport type { Mapping } from \"@itwin/insights-client\";\nimport { BlockingOverlay } from \"./BlockingOverlay\";\nimport type { ExtractionStatusData } from \"./Extraction/ExtractionStatusIcon\";\nimport { ExtractionStatusIcon } from \"./Extraction/ExtractionStatusIcon\";\nimport { MappingListItem } from \"./MappingListItem\";\nimport type { ExtractionMessageData } from \"./Extraction/ExtractionMessageModal\";\nimport { ExtractionMessageModal } from \"./Extraction/ExtractionMessageModal\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { useExtractionStateJobContext } from \"../context/ExtractionStateJobContext\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport { useRunExtraction } from \"./hooks/useRunExtraction\";\n\nexport const mappingViewDefaultDisplayStrings = {\n mappings: \"Mappings\",\n iTwins: \"iTwins\",\n iTwinNumber: \"Number\",\n iTwinName: \"Name\",\n iTwinStatus: \"Status\",\n iModels: \"iModels\",\n iModelName: \"Name\",\n iModelDescription: \"Description\",\n};\n\n/**\n * @internal\n */\nexport interface MappingsViewProps {\n mappings: Mapping[];\n isLoading: boolean;\n extractionStatusData: ExtractionStatusData;\n showExtractionMessageModal: boolean;\n extractionMessageData: ExtractionMessageData[];\n setShowExtractionMessageModal: (show: boolean) => void;\n isTogglingExtraction: boolean;\n onRefreshMappings: () => Promise<void>;\n onRefreshExtractionStatus: () => Promise<void>;\n onToggleExtraction: (mapping: Mapping) => Promise<void>;\n onDelete: (mapping: Mapping) => Promise<void>;\n showDeleteModal: Mapping | undefined;\n setShowDeleteModal: (mapping?: Mapping) => void;\n displayStrings?: Partial<typeof mappingViewDefaultDisplayStrings>;\n showImportModal?: boolean;\n setShowImportModal?: (show: boolean) => void;\n onClickAddMapping?: () => void;\n onClickMappingTitle?: (mapping: Mapping) => void;\n onClickMappingModify?: (mapping: Mapping) => void;\n alert?: React.ReactElement<typeof Alert>;\n initialStateExtractionFlag?: boolean;\n setInitialExtractionStateFlag?: (initialStateExtractionFlag: boolean) => void;\n}\n\n/**\n * UI Component to list mappings and handle extraction.\n * @internal\n */\nexport const MappingsView = ({\n mappings,\n isLoading,\n extractionStatusData,\n showExtractionMessageModal,\n extractionMessageData,\n setShowExtractionMessageModal,\n isTogglingExtraction,\n onRefreshMappings,\n onRefreshExtractionStatus,\n onToggleExtraction,\n onDelete,\n showDeleteModal,\n setShowDeleteModal,\n displayStrings: userDisplayStrings,\n showImportModal,\n setShowImportModal,\n onClickAddMapping,\n onClickMappingTitle,\n onClickMappingModify,\n alert,\n}: MappingsViewProps) => {\n const displayStrings = React.useMemo(\n () => ({ ...mappingViewDefaultDisplayStrings, ...userDisplayStrings }),\n [userDisplayStrings]\n );\n const [selectedMappings, setSelectedMappings] = useState<Mapping[]>([]);\n const groupingMappingApiConfig = useGroupingMappingApiConfig();\n const { mappingIdJobInfo } = useExtractionStateJobContext();\n const { runExtraction } = useRunExtraction(groupingMappingApiConfig);\n\n const jobStartEvent = useMemo(\n () => new BeEvent<(mappingId: string) => void>(),\n []\n );\n\n const refreshAll = useCallback(async () => {\n await Promise.all([onRefreshMappings(), onRefreshExtractionStatus()]);\n }, [onRefreshMappings, onRefreshExtractionStatus]);\n\n const onSelectionChange = (mapping: Mapping) => {\n setSelectedMappings((mappingIdList) => {\n return mappingIdList.some((eachId) => mapping.id === eachId.id)\n ? mappingIdList.filter((eachId) => mapping.id !== eachId.id)\n : [...mappingIdList, mapping];\n }\n );\n };\n\n const onRunExtraction = useCallback(async () => {\n await runExtraction(selectedMappings);\n selectedMappings.map((mapping) => {\n jobStartEvent.raiseEvent(mapping.id);\n });\n setSelectedMappings([]);\n }, [selectedMappings, jobStartEvent, runExtraction]);\n\n return (\n <>\n <BlockingOverlay isVisible={isTogglingExtraction} />\n <div className=\"gmw-mappings-view-container\">\n <div className=\"gmw-table-toolbar\">\n <div className=\"gmw-button-spacing\">\n {onClickAddMapping &&\n <Button\n startIcon={<SvgAdd />}\n onClick={onClickAddMapping}\n styleType=\"high-visibility\"\n title=\"New Mapping\"\n >\n New\n </Button>\n }\n {showImportModal !== undefined && setShowImportModal && <IconButton\n title={`Import ${displayStrings.mappings}`}\n onClick={() => setShowImportModal(true)}\n >\n <SvgImport />\n </IconButton>\n }\n <IconButton\n title=\"Run extraction\"\n onClick={onRunExtraction}\n disabled={selectedMappings.length === 0}\n >\n <SvgPlay />\n </IconButton>\n </div>\n <div className=\"gmw-button-spacing\">\n <ExtractionStatusIcon\n iconStatus={extractionStatusData.iconStatus}\n onClick={() => {\n if (extractionStatusData.iconStatus === \"negative\") {\n setShowExtractionMessageModal(true);\n }\n }}\n iconMessage={extractionStatusData.iconMessage}\n />\n <IconButton\n title=\"Refresh\"\n onClick={refreshAll}\n disabled={isLoading}\n styleType='borderless'\n >\n <SvgRefresh />\n </IconButton>\n </div>\n </div>\n {alert}\n <div className='gmw-mappings-border' />\n {isLoading ? (\n <LoadingOverlay />\n ) : mappings.length === 0 ? (\n <EmptyMessage message={`No ${displayStrings.mappings} available.`} />\n ) : (\n <List className=\"gmw-mappings-list\">\n {mappings.map((mapping) => (\n <MappingListItem\n key={mapping.id}\n mapping={mapping}\n jobId={mappingIdJobInfo?.get(mapping.id) ?? \"\"}\n jobStartEvent={jobStartEvent}\n onClickMappingTitle={onClickMappingTitle}\n onSelectionChange={onSelectionChange}\n selected={selectedMappings.some(\n (eachMapping) => mapping.id === eachMapping.id\n )}\n onToggleExtraction={onToggleExtraction}\n onRefreshMappings={onRefreshMappings}\n onClickMappingModify={onClickMappingModify}\n setShowDeleteModal={setShowDeleteModal}\n />\n ))}\n </List>\n )}\n </div>\n {showExtractionMessageModal && <ExtractionMessageModal\n isOpen={showExtractionMessageModal}\n onClose={() => setShowExtractionMessageModal(false)}\n extractionMessageData={extractionMessageData}\n timestamp={extractionMessageData.length === 0 ? \"\" : extractionMessageData[0].date}\n />}\n {showDeleteModal &&\n <DeleteModal\n entityName={showDeleteModal?.mappingName}\n onClose={() => setShowDeleteModal(undefined)}\n onDelete={async () => {\n await onDelete(showDeleteModal);\n }}\n />\n }\n {showImportModal && setShowImportModal && <MappingImportWizardModal\n show={showImportModal}\n setShow={setShowImportModal}\n onFinish={onRefreshMappings}\n displayStrings={displayStrings}\n />}\n </>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"MappingsView.js","sourceRoot":"","sources":["../../../../src/components/Mappings/MappingsView.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,qBAAqB,CAAC;AAC7B,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACz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AE,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAC5C,QAAQ,EAAE,KAAK,IAAI,EAAE;gBACnB,MAAM,QAAQ,CAAC,eAAe,CAAC,CAAC;YAClC,CAAC,GACD,CACH;QACA,eAAe,IAAI,kBAAkB,IAAI,CACxC,oBAAC,wBAAwB,IAAC,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,GAAI,CAC9I,CACA,CACJ,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, useMemo, useState } from \"react\";\nimport type { Alert } from \"@itwin/itwinui-react\";\nimport { Button, IconButton, List } from \"@itwin/itwinui-react\";\nimport { SvgAdd, SvgImport, SvgPlay, SvgRefresh } from \"@itwin/itwinui-icons-react\";\nimport { EmptyMessage } from \"../SharedComponents/EmptyMessage\";\nimport { LoadingOverlay } from \"../SharedComponents/LoadingOverlay\";\nimport \"./MappingsView.scss\";\nimport DeleteModal from \"../SharedComponents/DeleteModal\";\nimport { MappingImportWizardModal } from \"./Import/MappingImportWizardModal\";\nimport type { Mapping } from \"@itwin/insights-client\";\nimport { BlockingOverlay } from \"./BlockingOverlay\";\nimport type { ExtractionStatusData } from \"./Extraction/ExtractionStatusIcon\";\nimport { ExtractionStatusIcon } from \"./Extraction/ExtractionStatusIcon\";\nimport { MappingListItem } from \"./MappingListItem\";\nimport type { ExtractionMessageData } from \"./Extraction/ExtractionMessageModal\";\nimport { ExtractionMessageModal } from \"./Extraction/ExtractionMessageModal\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { useExtractionStateJobContext } from \"../context/ExtractionStateJobContext\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport { useRunExtraction } from \"./hooks/useRunExtraction\";\n\nexport const mappingViewDefaultDisplayStrings = {\n mappings: \"Mappings\",\n iTwins: \"iTwins\",\n iTwinNumber: \"Number\",\n iTwinName: \"Name\",\n iTwinStatus: \"Status\",\n iModels: \"iModels\",\n iModelName: \"Name\",\n iModelDescription: \"Description\",\n};\n\n/**\n * @internal\n */\nexport interface MappingsViewProps {\n mappings: Mapping[];\n isLoading: boolean;\n extractionStatusData: ExtractionStatusData;\n showExtractionMessageModal: boolean;\n extractionMessageData: ExtractionMessageData[];\n setShowExtractionMessageModal: (show: boolean) => void;\n isTogglingExtraction: boolean;\n onRefreshMappings: () => Promise<void>;\n onRefreshExtractionStatus: () => Promise<void>;\n onToggleExtraction: (mapping: Mapping) => Promise<void>;\n onDelete: (mapping: Mapping) => Promise<void>;\n showDeleteModal: Mapping | undefined;\n setShowDeleteModal: (mapping?: Mapping) => void;\n displayStrings?: Partial<typeof mappingViewDefaultDisplayStrings>;\n showImportModal?: boolean;\n setShowImportModal?: (show: boolean) => void;\n onClickAddMapping?: () => void;\n onClickMappingTitle?: (mapping: Mapping) => void;\n onClickMappingModify?: (mapping: Mapping) => void;\n alert?: React.ReactElement<typeof Alert>;\n initialStateExtractionFlag?: boolean;\n setInitialExtractionStateFlag?: (initialStateExtractionFlag: boolean) => void;\n}\n\n/**\n * UI Component to list mappings and handle extraction.\n * @internal\n */\nexport const MappingsView = ({\n mappings,\n isLoading,\n extractionStatusData,\n showExtractionMessageModal,\n extractionMessageData,\n setShowExtractionMessageModal,\n isTogglingExtraction,\n onRefreshMappings,\n onRefreshExtractionStatus,\n onToggleExtraction,\n onDelete,\n showDeleteModal,\n setShowDeleteModal,\n displayStrings: userDisplayStrings,\n showImportModal,\n setShowImportModal,\n onClickAddMapping,\n onClickMappingTitle,\n onClickMappingModify,\n alert,\n}: MappingsViewProps) => {\n const displayStrings = React.useMemo(() => ({ ...mappingViewDefaultDisplayStrings, ...userDisplayStrings }), [userDisplayStrings]);\n const [selectedMappings, setSelectedMappings] = useState<Mapping[]>([]);\n const groupingMappingApiConfig = useGroupingMappingApiConfig();\n const { mappingIdJobInfo } = useExtractionStateJobContext();\n const { runExtraction } = useRunExtraction(groupingMappingApiConfig);\n\n const jobStartEvent = useMemo(() => new BeEvent<(mappingId: string) => void>(), []);\n\n const refreshAll = useCallback(async () => {\n await Promise.all([onRefreshMappings(), onRefreshExtractionStatus()]);\n }, [onRefreshMappings, onRefreshExtractionStatus]);\n\n const onSelectionChange = (mapping: Mapping) => {\n setSelectedMappings((mappingIdList) => {\n return mappingIdList.some((eachId) => mapping.id === eachId.id)\n ? mappingIdList.filter((eachId) => mapping.id !== eachId.id)\n : [...mappingIdList, mapping];\n });\n };\n\n const onRunExtraction = useCallback(async () => {\n await runExtraction(selectedMappings);\n selectedMappings.map((mapping) => {\n jobStartEvent.raiseEvent(mapping.id);\n });\n setSelectedMappings([]);\n }, [selectedMappings, jobStartEvent, runExtraction]);\n\n return (\n <>\n <BlockingOverlay isVisible={isTogglingExtraction} />\n <div className=\"gmw-mappings-view-container\">\n <div className=\"gmw-table-toolbar\">\n <div className=\"gmw-button-spacing\">\n {onClickAddMapping && (\n <Button startIcon={<SvgAdd />} onClick={onClickAddMapping} styleType=\"high-visibility\" title=\"New Mapping\">\n New\n </Button>\n )}\n {showImportModal !== undefined && setShowImportModal && (\n <IconButton title={`Import ${displayStrings.mappings}`} onClick={() => setShowImportModal(true)}>\n <SvgImport />\n </IconButton>\n )}\n <IconButton title=\"Run extraction\" onClick={onRunExtraction} disabled={selectedMappings.length === 0}>\n <SvgPlay />\n </IconButton>\n </div>\n <div className=\"gmw-button-spacing\">\n <ExtractionStatusIcon\n iconStatus={extractionStatusData.iconStatus}\n onClick={() => {\n if (extractionStatusData.iconStatus === \"negative\") {\n setShowExtractionMessageModal(true);\n }\n }}\n iconMessage={extractionStatusData.iconMessage}\n />\n <IconButton title=\"Refresh\" onClick={refreshAll} disabled={isLoading} styleType=\"borderless\">\n <SvgRefresh />\n </IconButton>\n </div>\n </div>\n {alert}\n <div className=\"gmw-mappings-border\" />\n {isLoading && !isTogglingExtraction ? (\n <LoadingOverlay />\n ) : mappings.length === 0 ? (\n <EmptyMessage message={`No ${displayStrings.mappings} available.`} />\n ) : (\n <List className=\"gmw-mappings-list\">\n {mappings.map((mapping) => (\n <MappingListItem\n key={mapping.id}\n mapping={mapping}\n jobId={mappingIdJobInfo?.get(mapping.id) ?? \"\"}\n jobStartEvent={jobStartEvent}\n onClickMappingTitle={onClickMappingTitle}\n onSelectionChange={onSelectionChange}\n selected={selectedMappings.some((eachMapping) => mapping.id === eachMapping.id)}\n onToggleExtraction={onToggleExtraction}\n onRefreshMappings={onRefreshMappings}\n onClickMappingModify={onClickMappingModify}\n setShowDeleteModal={setShowDeleteModal}\n />\n ))}\n </List>\n )}\n </div>\n {showExtractionMessageModal && (\n <ExtractionMessageModal\n isOpen={showExtractionMessageModal}\n onClose={() => setShowExtractionMessageModal(false)}\n extractionMessageData={extractionMessageData}\n timestamp={extractionMessageData.length === 0 ? \"\" : extractionMessageData[0].date}\n />\n )}\n {showDeleteModal && (\n <DeleteModal\n entityName={showDeleteModal?.mappingName}\n onClose={() => setShowDeleteModal(undefined)}\n onDelete={async () => {\n await onDelete(showDeleteModal);\n }}\n />\n )}\n {showImportModal && setShowImportModal && (\n <MappingImportWizardModal show={showImportModal} setShow={setShowImportModal} onFinish={onRefreshMappings} displayStrings={displayStrings} />\n )}\n </>\n );\n};\n"]}
|
|
@@ -25,7 +25,9 @@ export const useFetchExtractionStatus = ({ iModelId, getAccessToken, extractionC
|
|
|
25
25
|
else {
|
|
26
26
|
if (latestJobStatus?.state === ExtractionState.PartiallySucceeded || latestJobStatus?.state === ExtractionState.Failed) {
|
|
27
27
|
const logs = await extractionClient.getExtractionLogs(accessToken, latestExtractionResultId);
|
|
28
|
-
extractionMessageData = logs.logs
|
|
28
|
+
extractionMessageData = logs.logs
|
|
29
|
+
.filter((log) => log.message !== null)
|
|
30
|
+
.map((log) => ({
|
|
29
31
|
date: log.dateTime,
|
|
30
32
|
category: log.category,
|
|
31
33
|
level: log.level,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchExtractionStatus.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/hooks/useFetchExtractionStatus.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKjD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,QAAQ,EACR,cAAc,EACd,gBAAgB,GAKjB,EAAE,EAAE;IACH,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,CAAC,wBAAwB,EAAE,QAAQ,CAAC;QAC9C,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;YAC3C,MAAM,UAAU,GAAG,gBAAgB,CAAC,4BAA4B,CAAC,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;YAC3F,MAAM,sBAAsB,GAAG,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC;YAEvD,IAAI,oBAA0C,CAAC;YAC/C,IAAI,qBAAqB,GAA4B,EAAE,CAAC;YAExD,MAAM,wBAAwB,GAAG,sBAAsB,CAAC,KAAK,EAAE,EAAE,CAAC;YAClE,IAAI,
|
|
1
|
+
{"version":3,"file":"useFetchExtractionStatus.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/hooks/useFetchExtractionStatus.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKjD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,QAAQ,EACR,cAAc,EACd,gBAAgB,GAKjB,EAAE,EAAE;IACH,OAA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AC,KAAK;wBAChB,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE;qBAC3B,CAAC,CAAC,CAAC;oBACN,oBAAoB,GAAG;wBACrB,UAAU,EAAE,UAAU;wBACtB,WAAW,EAAE,4DAA4D;qBAC1E,CAAC;iBACH;qBAAM;oBACL,oBAAoB,GAAG;wBACrB,UAAU,EAAE,UAAU;wBACtB,WAAW,EAAE,wBAAwB;qBACtC,CAAC;iBACH;aACF;YAED,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,CAAC;QACjF,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { ExtractionStatus, IExtractionClient } from \"@itwin/insights-client\";\nimport { ExtractionState } from \"@itwin/insights-client\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport type { GetAccessTokenFn } from \"../../context/GroupingApiConfigContext\";\nimport type { ExtractionMessageData } from \"../Extraction/ExtractionMessageModal\";\nimport type { ExtractionStatusData } from \"../Extraction/ExtractionStatusIcon\";\n\nexport const useFetchExtractionStatus = ({\n iModelId,\n getAccessToken,\n extractionClient,\n}: {\n iModelId: string;\n getAccessToken: GetAccessTokenFn;\n extractionClient: IExtractionClient;\n}) => {\n return useQuery({\n queryKey: [\"iModelExtractionStatus\", iModelId],\n staleTime: Infinity,\n placeholderData: undefined,\n queryFn: async () => {\n const accessToken = await getAccessToken();\n const extraction = extractionClient.getIModelExtractionsIterator(accessToken, iModelId, 1);\n const latestExtractionResult = await extraction.next();\n\n let extractionStatusIcon: ExtractionStatusData;\n let extractionMessageData: ExtractionMessageData[] = [];\n\n const latestExtractionResultId = latestExtractionResult.value?.id;\n let latestJobStatus: ExtractionStatus | undefined;\n if (latestExtractionResultId) {\n latestJobStatus = latestExtractionResult.value;\n }\n\n if (latestExtractionResult.done) {\n extractionStatusIcon = {\n iconStatus: \"negative\",\n iconMessage: \"No extraction found.\",\n };\n } else {\n if (latestJobStatus?.state === ExtractionState.PartiallySucceeded || latestJobStatus?.state === ExtractionState.Failed) {\n const logs = await extractionClient.getExtractionLogs(accessToken, latestExtractionResultId);\n extractionMessageData = logs.logs\n .filter((log) => log.message !== null)\n .map((log) => ({\n date: log.dateTime,\n category: log.category,\n level: log.level,\n message: log.message ?? \"\",\n }));\n extractionStatusIcon = {\n iconStatus: \"negative\",\n iconMessage: \"Extraction contains issues. Click to view extraction logs.\",\n };\n } else {\n extractionStatusIcon = {\n iconStatus: \"positive\",\n iconMessage: \"Extraction successful.\",\n };\n }\n }\n\n return { extractionStatusIcon, extractionMessageData, latestExtractionResult };\n },\n });\n};\n"]}
|
|
@@ -16,5 +16,5 @@ export declare const fetchMappingStatus: (mappingId: string, jobId: string, getA
|
|
|
16
16
|
finalExtractionStateValue: ExtractionStates;
|
|
17
17
|
}>;
|
|
18
18
|
export declare const resetMappingExtractionStatus: (queryClient: QueryClient) => Promise<void>;
|
|
19
|
-
export declare const useFetchMappingExtractionStatus: ({ getAccessToken, mapping, enabled
|
|
19
|
+
export declare const useFetchMappingExtractionStatus: ({ getAccessToken, mapping, enabled }: MappingExtractionStatusProps) => import("@tanstack/react-query").UseQueryResult<MappingQueryResult, unknown>;
|
|
20
20
|
//# sourceMappingURL=useFetchMappingExtractionStatus.d.ts.map
|
|
@@ -6,7 +6,7 @@ import { useExtractionClient } from "../../context/ExtractionClientContext";
|
|
|
6
6
|
import { useExtractionStateJobContext } from "../../context/ExtractionStateJobContext";
|
|
7
7
|
export const fetchMappingStatus = async (mappingId, jobId, getAccessToken, extractionClient) => {
|
|
8
8
|
const accessToken = await getAccessToken();
|
|
9
|
-
const getFinalExtractionStatus = (
|
|
9
|
+
const getFinalExtractionStatus = (extractionStatusResponse) => {
|
|
10
10
|
switch (extractionStatusResponse.state) {
|
|
11
11
|
case undefined:
|
|
12
12
|
return { mappingId, finalExtractionStateValue: ExtractionStates.Starting };
|
|
@@ -22,14 +22,14 @@ export const fetchMappingStatus = async (mappingId, jobId, getAccessToken, extra
|
|
|
22
22
|
default:
|
|
23
23
|
return { mappingId, finalExtractionStateValue: ExtractionStates.None };
|
|
24
24
|
}
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
const extractionStatusResponse = await extractionClient.getExtractionStatus(accessToken, jobId);
|
|
27
27
|
return getFinalExtractionStatus(extractionStatusResponse);
|
|
28
28
|
};
|
|
29
29
|
export const resetMappingExtractionStatus = async (queryClient) => {
|
|
30
30
|
await queryClient.invalidateQueries({ queryKey: ["extractionState"] });
|
|
31
31
|
};
|
|
32
|
-
export const useFetchMappingExtractionStatus = ({ getAccessToken, mapping, enabled
|
|
32
|
+
export const useFetchMappingExtractionStatus = ({ getAccessToken, mapping, enabled }) => {
|
|
33
33
|
const extractionClient = useExtractionClient();
|
|
34
34
|
const { mappingIdJobInfo } = useExtractionStateJobContext();
|
|
35
35
|
const jobId = mappingIdJobInfo.get(mapping.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchMappingExtractionStatus.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/hooks/useFetchMappingExtractionStatus.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAYvF,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"useFetchMappingExtractionStatus.js","sourceRoot":"","sources":["../../../../../src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AAE,yBAAyB,EAAE,gBAAgB,CAAC,IAAI,EAAE,CAAC;SAC1E;IACH,CAAC,CAAC;IACF,MAAM,wBAAwB,GAAG,MAAM,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAChG,OAAO,wBAAwB,CAAC,wBAAwB,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,EAAE,WAAwB,EAAE,EAAE;IAC7E,MAAM,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAgC,EAAE,EAAE;IACpH,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,EAAE,gBAAgB,EAAE,GAAG,4BAA4B,EAAE,CAAC;IAC5D,MAAM,KAAK,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAE/C,MAAM,WAAW,GAAG,QAAQ,CAAqB;QAC/C,QAAQ,EAAE,CAAC,iBAAiB,EAAE,KAAK,CAAC;QACpC,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,IAAI,KAAK,EAAE;gBACT,OAAO,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAAC;aAChF;YACD,uEAAuE;YACvE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,EAAE,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC;QAClC,eAAe,EAAE,qBAAqB;KACvC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,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 { QueryClient } from \"@tanstack/react-query\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport type { ExtractionStatus, IExtractionClient } from \"@itwin/insights-client\";\nimport { ExtractionState } from \"@itwin/insights-client\";\nimport type { Mapping } from \"@itwin/insights-client\";\nimport { STATUS_CHECK_INTERVAL } from \"../../Constants\";\nimport { ExtractionStates } from \"../Extraction/ExtractionStatus\";\nimport type { GetAccessTokenFn, GroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport { useExtractionClient } from \"../../context/ExtractionClientContext\";\nimport { useExtractionStateJobContext } from \"../../context/ExtractionStateJobContext\";\n\nexport interface MappingExtractionStatusProps extends GroupingMappingApiConfig {\n mapping: Mapping;\n enabled: boolean;\n}\n\nexport interface MappingQueryResult {\n mappingId: string;\n finalExtractionStateValue: ExtractionStates;\n}\n\nexport const fetchMappingStatus = async (mappingId: string, jobId: string, getAccessToken: GetAccessTokenFn, extractionClient: IExtractionClient) => {\n const accessToken = await getAccessToken();\n\n const getFinalExtractionStatus = (extractionStatusResponse: ExtractionStatus) => {\n switch (extractionStatusResponse.state) {\n case undefined:\n return { mappingId, finalExtractionStateValue: ExtractionStates.Starting };\n case ExtractionState.Running:\n return { mappingId, finalExtractionStateValue: ExtractionStates.Running };\n case ExtractionState.Failed:\n return { mappingId, finalExtractionStateValue: ExtractionStates.Failed };\n case ExtractionState.Queued:\n return { mappingId, finalExtractionStateValue: ExtractionStates.Queued };\n case ExtractionState.Succeeded:\n case ExtractionState.PartiallySucceeded:\n return { mappingId, finalExtractionStateValue: ExtractionStates.Succeeded };\n default:\n return { mappingId, finalExtractionStateValue: ExtractionStates.None };\n }\n };\n const extractionStatusResponse = await extractionClient.getExtractionStatus(accessToken, jobId);\n return getFinalExtractionStatus(extractionStatusResponse);\n};\n\nexport const resetMappingExtractionStatus = async (queryClient: QueryClient) => {\n await queryClient.invalidateQueries({ queryKey: [\"extractionState\"] });\n};\n\nexport const useFetchMappingExtractionStatus = ({ getAccessToken, mapping, enabled }: MappingExtractionStatusProps) => {\n const extractionClient = useExtractionClient();\n const { mappingIdJobInfo } = useExtractionStateJobContext();\n const jobId = mappingIdJobInfo.get(mapping.id);\n\n const statusQuery = useQuery<MappingQueryResult>({\n queryKey: [\"extractionState\", jobId],\n queryFn: async () => {\n if (jobId) {\n return fetchMappingStatus(mapping.id, jobId, getAccessToken, extractionClient);\n }\n // This should not happen as jobId should be defined if enabled is true\n throw new Error(\"Job ID is undefined\");\n },\n enabled: enabled && Boolean(jobId), // Only enable the query if enabled is true and jobId is defined\n refetchInterval: STATUS_CHECK_INTERVAL,\n });\n\n return statusQuery;\n};\n"]}
|
|
@@ -5,6 +5,6 @@ export const useFetchMappings = (iModelId, getAccessToken, mappingsClient) => us
|
|
|
5
5
|
const accessToken = await getAccessToken();
|
|
6
6
|
const mappings = await mappingsClient.getMappings(accessToken, iModelId);
|
|
7
7
|
return mappings.mappings.sort((a, b) => a.mappingName.localeCompare(b.mappingName));
|
|
8
|
-
}
|
|
8
|
+
},
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=useFetchMappings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchMappings.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/hooks/useFetchMappings.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAE,cAAgC,EAAE,cAA+B,EAAE,EAAE,CACtH,QAAQ,CAAC;IACP,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;QAC3C,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACzE,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;IACtF,CAAC;
|
|
1
|
+
{"version":3,"file":"useFetchMappings.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/hooks/useFetchMappings.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAE,cAAgC,EAAE,cAA+B,EAAE,EAAE,CACtH,QAAQ,CAAC;IACP,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;QAC3C,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACzE,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;IACtF,CAAC;CACF,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 { useQuery } from \"@tanstack/react-query\";\nimport type { GetAccessTokenFn } from \"../../context/GroupingApiConfigContext\";\n\nexport const useFetchMappings = (iModelId: string, getAccessToken: GetAccessTokenFn, mappingsClient: IMappingsClient) =>\n useQuery({\n queryKey: [\"mappings\", iModelId],\n queryFn: async () => {\n const accessToken = await getAccessToken();\n const mappings = await mappingsClient.getMappings(accessToken, iModelId);\n return mappings.mappings.sort((a, b) => a.mappingName.localeCompare(b.mappingName));\n },\n });\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { useCallback, useEffect, useState } from "react";
|
|
6
6
|
import { ExtractionState } from "@itwin/insights-client";
|
|
7
7
|
import { useExtractionClient } from "../../context/ExtractionClientContext";
|
|
@@ -21,7 +21,7 @@ export const useMappingsOperations = ({ iModelId, getAccessToken, mappingClient
|
|
|
21
21
|
const queryClient = useQueryClient();
|
|
22
22
|
const [initialStateExtractionFlag, setInitialExtractionStateFlag] = useState(true);
|
|
23
23
|
const { mappingIdJobInfo, setMappingIdJobInfo } = useExtractionStateJobContext();
|
|
24
|
-
const { data: mappings, isFetched: isMappingsFetched, isFetching: isLoadingMappings
|
|
24
|
+
const { data: mappings, isFetched: isMappingsFetched, isFetching: isLoadingMappings } = useFetchMappings(iModelId, getAccessToken, mappingClient);
|
|
25
25
|
const { data: extractionStatus, isFetched: isExtractionStatusFetched, isFetching: isLoadingExtractionStatus, } = useFetchExtractionStatus({ iModelId, getAccessToken, extractionClient });
|
|
26
26
|
const refreshExtractionStatus = useCallback(async () => {
|
|
27
27
|
await queryClient.invalidateQueries({ queryKey: ["iModelExtractionStatus"] });
|
|
@@ -32,13 +32,14 @@ export const useMappingsOperations = ({ iModelId, getAccessToken, mappingClient
|
|
|
32
32
|
const newMappingIdJobInfo = new Map();
|
|
33
33
|
const latestExtractionResultId = extractionStatus.latestExtractionResult.value?.id;
|
|
34
34
|
const state = extractionStatus.latestExtractionResult.value?.state;
|
|
35
|
-
if (
|
|
35
|
+
if (state === ExtractionState.Failed || state === ExtractionState.Succeeded || state === ExtractionState.PartiallySucceeded)
|
|
36
36
|
return;
|
|
37
|
-
!!latestExtractionResultId &&
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
!!latestExtractionResultId &&
|
|
38
|
+
mappings.forEach((mapping) => {
|
|
39
|
+
const mappingId = mapping.id;
|
|
40
|
+
const latestExtractionResultId = extractionStatus.latestExtractionResult.value.id;
|
|
41
|
+
newMappingIdJobInfo.set(mappingId, latestExtractionResultId);
|
|
42
|
+
});
|
|
42
43
|
setMappingIdJobInfo(newMappingIdJobInfo);
|
|
43
44
|
setInitialExtractionStateFlag(false);
|
|
44
45
|
}
|
|
@@ -66,13 +67,30 @@ export const useMappingsOperations = ({ iModelId, getAccessToken, mappingClient
|
|
|
66
67
|
},
|
|
67
68
|
});
|
|
68
69
|
const isLoading = isLoadingMappings || isTogglingExtraction || isDeletingMapping;
|
|
69
|
-
const extractionStatusGated =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
const extractionStatusGated = !extractionStatus || isLoadingExtractionStatus
|
|
71
|
+
? {
|
|
72
|
+
extractionStatusIcon: {
|
|
73
|
+
iconStatus: undefined,
|
|
74
|
+
iconMessage: "Loading...",
|
|
75
|
+
},
|
|
76
|
+
extractionMessageData: [],
|
|
77
|
+
}
|
|
78
|
+
: extractionStatus;
|
|
79
|
+
return {
|
|
80
|
+
mappings,
|
|
81
|
+
isLoading,
|
|
82
|
+
showExtractionMessageModal,
|
|
83
|
+
extractionStatus: extractionStatusGated,
|
|
84
|
+
setShowExtractionMessageModal,
|
|
85
|
+
refreshMappings,
|
|
86
|
+
refreshExtractionStatus,
|
|
87
|
+
toggleExtraction,
|
|
88
|
+
onDelete,
|
|
89
|
+
setShowImportModal,
|
|
90
|
+
showImportModal,
|
|
91
|
+
setShowDeleteModal,
|
|
92
|
+
showDeleteModal,
|
|
93
|
+
isTogglingExtraction,
|
|
94
|
+
};
|
|
77
95
|
};
|
|
78
96
|
//# sourceMappingURL=useMappingsOperations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMappingsOperations.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/hooks/useMappingsOperations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"useMappingsOperations.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/hooks/useMappingsOperations.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAUvF;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAA2B,EAAE,EAAE;IAC5G,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAsB,KAAK,CAAC,CAAC;IACnF,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAsB,SAAS,CAAC,CAAC;IACvF,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,GA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eAAe,EAAE,CAAC;QAC1B,CAAC;KACF,CAAC,CAAC;IAEH,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,WAAW,CAAC;QAC1E,UAAU,EAAE,KAAK,EAAE,OAAgB,EAAE,EAAE;YACrC,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;YAC3C,MAAM,aAAa,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7D,CAAC;QACD,SAAS,EAAE,KAAK,IAAI,EAAE;YACpB,MAAM,eAAe,EAAE,CAAC;QAC1B,CAAC;KACF,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,iBAAiB,IAAI,oBAAoB,IAAI,iBAAiB,CAAC;IACjF,MAAM,qBAAqB,GACzB,CAAC,gBAAgB,IAAI,yBAAyB;QAC5C,CAAC,CAAC;YACE,oBAAoB,EAAE;gBACpB,UAAU,EAAE,SAAS;gBACrB,WAAW,EAAE,YAAY;aAC1B;YACD,qBAAqB,EAAE,EAAE;SAC1B;QACH,CAAC,CAAC,gBAAgB,CAAC;IAEvB,OAAO;QACL,QAAQ;QACR,SAAS;QACT,0BAA0B;QAC1B,gBAAgB,EAAE,qBAAqB;QACvC,6BAA6B;QAC7B,eAAe;QACf,uBAAuB;QACvB,gBAAgB;QAChB,QAAQ;QACR,kBAAkB;QAClB,eAAe;QACf,kBAAkB;QAClB,eAAe;QACf,oBAAoB;KACrB,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 { useCallback, useEffect, useState } from \"react\";\nimport { ExtractionState } from \"@itwin/insights-client\";\nimport type { IMappingsClient, Mapping } from \"@itwin/insights-client\";\nimport type { GroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport { useExtractionClient } from \"../../context/ExtractionClientContext\";\nimport { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useFetchMappings } from \"./useFetchMappings\";\nimport { useFetchExtractionStatus } from \"./useFetchExtractionStatus\";\nimport { useExtractionStateJobContext } from \"../../context/ExtractionStateJobContext\";\n\n/**\n * Props for the {@link useMappingsOperations} hook.\n * @internal\n */\nexport interface MappingsOperationsProps extends GroupingMappingApiConfig {\n mappingClient: IMappingsClient;\n}\n\n/**\n * Custom hook to handle mapping operations.\n * @internal\n */\nexport const useMappingsOperations = ({ iModelId, getAccessToken, mappingClient }: MappingsOperationsProps) => {\n const [showImportModal, setShowImportModal] = useState<boolean | undefined>(false);\n const [showDeleteModal, setShowDeleteModal] = useState<Mapping | undefined>(undefined);\n const extractionClient = useExtractionClient();\n const [showExtractionMessageModal, setShowExtractionMessageModal] = useState<boolean>(false);\n const queryClient = useQueryClient();\n const [initialStateExtractionFlag, setInitialExtractionStateFlag] = useState<boolean>(true);\n const { mappingIdJobInfo, setMappingIdJobInfo } = useExtractionStateJobContext();\n\n const { data: mappings, isFetched: isMappingsFetched, isFetching: isLoadingMappings } = useFetchMappings(iModelId, getAccessToken, mappingClient);\n\n const {\n data: extractionStatus,\n isFetched: isExtractionStatusFetched,\n isFetching: isLoadingExtractionStatus,\n } = useFetchExtractionStatus({ iModelId, getAccessToken, extractionClient });\n\n const refreshExtractionStatus = useCallback(async () => {\n await queryClient.invalidateQueries({ queryKey: [\"iModelExtractionStatus\"] });\n setInitialExtractionStateFlag(false);\n }, [queryClient]);\n\n useEffect(() => {\n if (initialStateExtractionFlag && isMappingsFetched && isExtractionStatusFetched && mappings && extractionStatus && !mappingIdJobInfo.size) {\n const newMappingIdJobInfo = new Map<string, string>();\n const latestExtractionResultId = extractionStatus.latestExtractionResult.value?.id;\n const state = extractionStatus.latestExtractionResult.value?.state;\n if (state === ExtractionState.Failed || state === ExtractionState.Succeeded || state === ExtractionState.PartiallySucceeded) return;\n !!latestExtractionResultId &&\n mappings.forEach((mapping) => {\n const mappingId = mapping.id;\n const latestExtractionResultId = extractionStatus.latestExtractionResult.value.id;\n newMappingIdJobInfo.set(mappingId, latestExtractionResultId);\n });\n setMappingIdJobInfo(newMappingIdJobInfo);\n setInitialExtractionStateFlag(false);\n }\n }, [extractionStatus, initialStateExtractionFlag, isExtractionStatusFetched, isMappingsFetched, mappingIdJobInfo.size, mappings, setMappingIdJobInfo]);\n\n const refreshMappings = useCallback(async () => {\n await queryClient.invalidateQueries({ queryKey: [\"mappings\"] });\n }, [queryClient]);\n\n const { mutateAsync: toggleExtraction, isLoading: isTogglingExtraction } = useMutation({\n mutationFn: async (mapping: Mapping) => {\n const accessToken = await getAccessToken();\n const newState = !mapping.extractionEnabled;\n await mappingClient.updateMapping(accessToken, mapping.id, { extractionEnabled: newState });\n },\n onSuccess: async () => {\n await refreshMappings();\n },\n });\n\n const { mutateAsync: onDelete, isLoading: isDeletingMapping } = useMutation({\n mutationFn: async (mapping: Mapping) => {\n const accessToken = await getAccessToken();\n await mappingClient.deleteMapping(accessToken, mapping.id);\n },\n onSuccess: async () => {\n await refreshMappings();\n },\n });\n\n const isLoading = isLoadingMappings || isTogglingExtraction || isDeletingMapping;\n const extractionStatusGated =\n !extractionStatus || isLoadingExtractionStatus\n ? {\n extractionStatusIcon: {\n iconStatus: undefined,\n iconMessage: \"Loading...\",\n },\n extractionMessageData: [],\n }\n : extractionStatus;\n\n return {\n mappings,\n isLoading,\n showExtractionMessageModal,\n extractionStatus: extractionStatusGated,\n setShowExtractionMessageModal,\n refreshMappings,\n refreshExtractionStatus,\n toggleExtraction,\n onDelete,\n setShowImportModal,\n showImportModal,\n setShowDeleteModal,\n showDeleteModal,\n isTogglingExtraction,\n };\n};\n"]}
|
|
@@ -4,7 +4,7 @@ import type { Mapping } from "@itwin/insights-client";
|
|
|
4
4
|
export interface FetchExtractionStatesProps extends GroupingMappingApiConfig {
|
|
5
5
|
jobId?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const useRunExtraction: ({ iModelId, getAccessToken
|
|
7
|
+
export declare const useRunExtraction: ({ iModelId, getAccessToken }: FetchExtractionStatesProps) => {
|
|
8
8
|
isRunExtractionLoading: boolean;
|
|
9
9
|
isRunExtractionSuccess: boolean;
|
|
10
10
|
isJobStarted: boolean;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { useExtractionClient } from "../../context/ExtractionClientContext";
|
|
6
6
|
import { useMutation } from "@tanstack/react-query";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { useExtractionStateJobContext } from "../../context/ExtractionStateJobContext";
|
|
9
|
-
export const useRunExtraction = ({ iModelId, getAccessToken
|
|
9
|
+
export const useRunExtraction = ({ iModelId, getAccessToken }) => {
|
|
10
10
|
const extractionClient = useExtractionClient();
|
|
11
11
|
const [isJobStarted, setIsJobStarted] = useState(false);
|
|
12
12
|
const { mappingIdJobInfo, setMappingIdJobInfo } = useExtractionStateJobContext();
|
|
13
|
-
const { mutateAsync: runExtraction, isLoading: isRunExtractionLoading, isSuccess: isRunExtractionSuccess } = useMutation({
|
|
13
|
+
const { mutateAsync: runExtraction, isLoading: isRunExtractionLoading, isSuccess: isRunExtractionSuccess, } = useMutation({
|
|
14
14
|
mutationKey: ["runExtraction"],
|
|
15
15
|
mutationFn: async (mappings) => {
|
|
16
16
|
if (mappings.length > 0) {
|
|
17
17
|
const accessToken = await getAccessToken();
|
|
18
|
-
const mappingIds = mappings.map((mapping) => {
|
|
18
|
+
const mappingIds = mappings.map((mapping) => {
|
|
19
|
+
return { id: mapping.id };
|
|
20
|
+
});
|
|
19
21
|
const extractionRequest = {
|
|
20
22
|
mappings: mappingIds,
|
|
21
23
|
iModelId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRunExtraction.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/hooks/useRunExtraction.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"useRunExtraction.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/hooks/useRunExtraction.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAMvF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,cAAc,EAA8B,EAAE,EAAE;IAC3F,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IACjE,MAAM,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,GAAG,4BAA4B,EAAE,CAAC;IAEjF,MAAM,EACJ,WAAW,EAAE,aAAa,EAC1B,SAAS,EAAE,sBAAsB,EACjC,SAAS,EAAE,sBAAsB,GAClC,GAAG,WAAW,CAAC;QACd,WAAW,EAAE,CAAC,eAAe,CAAC;QAC9B,UAAU,EAAE,KAAK,EAAE,QAAmB,EAAE,EAAE;YACxC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvB,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;gBAC3C,MAAM,UAAU,GAAwB,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;oBAC/D,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;gBAC5B,CAAC,CAAC,CAAC;gBACH,MAAM,iBAAiB,GAA6B;oBAClD,QAAQ,EAAE,UAAU;oBACpB,QAAQ;iBACT,CAAC;gBAEF,MAAM,qBAAqB,GAAG,MAAM,gBAAgB,CAAC,aAAa,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;gBACnG,OAAO,qBAAqB,CAAC;aAC9B;YACD,OAAO;QACT,CAAC;QACD,SAAS,EAAE,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,EAAE;YACnD,IAAI,qBAAqB,EAAE;gBACzB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;oBAC9B,IAAI,gBAAgB,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,SAAS,EAAE;wBACnD,mBAAmB,CAAC,CAAC,OAA4B,EAAE,EAAE;4BACnD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;4BAChC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,qBAAqB,CAAC,EAAE,CAAC,CAAC;4BACjD,OAAO,MAAM,CAAC;wBAChB,CAAC,CAAC,CAAC;qBACJ;iBACF;aACF;QACH,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAC1G,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 { useExtractionClient } from \"../../context/ExtractionClientContext\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport type { GroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport type { ExtractionMapping, ExtractionRequestDetails, Mapping } from \"@itwin/insights-client\";\nimport { useState } from \"react\";\nimport { useExtractionStateJobContext } from \"../../context/ExtractionStateJobContext\";\n\nexport interface FetchExtractionStatesProps extends GroupingMappingApiConfig {\n jobId?: string;\n}\n\nexport const useRunExtraction = ({ iModelId, getAccessToken }: FetchExtractionStatesProps) => {\n const extractionClient = useExtractionClient();\n const [isJobStarted, setIsJobStarted] = useState<boolean>(false);\n const { mappingIdJobInfo, setMappingIdJobInfo } = useExtractionStateJobContext();\n\n const {\n mutateAsync: runExtraction,\n isLoading: isRunExtractionLoading,\n isSuccess: isRunExtractionSuccess,\n } = useMutation({\n mutationKey: [\"runExtraction\"],\n mutationFn: async (mappings: Mapping[]) => {\n if (mappings.length > 0) {\n const accessToken = await getAccessToken();\n const mappingIds: ExtractionMapping[] = mappings.map((mapping) => {\n return { id: mapping.id };\n });\n const extractionRequest: ExtractionRequestDetails = {\n mappings: mappingIds,\n iModelId,\n };\n\n const runExtractionResponse = await extractionClient.runExtraction(accessToken, extractionRequest);\n return runExtractionResponse;\n }\n return;\n },\n onSuccess: async (runExtractionResponse, mappings) => {\n if (runExtractionResponse) {\n for (const mapping of mappings) {\n if (mappingIdJobInfo?.get(mapping.id) === undefined) {\n setMappingIdJobInfo((prevMap: Map<string, string>) => {\n const newMap = new Map(prevMap);\n newMap.set(mapping.id, runExtractionResponse.id);\n return newMap;\n });\n }\n }\n }\n },\n });\n\n return { isRunExtractionLoading, isRunExtractionSuccess, isJobStarted, setIsJobStarted, runExtraction };\n};\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import "./CalculatedPropertyAction.scss";
|
|
3
3
|
import type { Group, Property } from "@itwin/insights-client";
|
|
4
4
|
/**
|
|
5
|
+
* @deprecated in 0.27.0 The CalculatedPropertyActionProps has been superseded by the CalculatedPropertyActionWithVisualsProps and should not be used, use GroupPropertyActionProps and GroupPropertyAction component instead.
|
|
5
6
|
* Props for the {@link CalculatedPropertyAction} component.
|
|
6
7
|
* @public
|
|
7
8
|
*/
|
|
@@ -13,8 +14,9 @@ export interface CalculatedPropertyActionProps {
|
|
|
13
14
|
onClickCancel?: () => void;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
17
|
+
* @deprecated in 0.27.0 The CalculatedPropertyAction has been superseded by the CalculatedPropertyActionWithVisuals and should not be used as a stand alone component, use GroupPropertyAction component instead.
|
|
16
18
|
* Component to create or update a calculated property.
|
|
17
19
|
* @public
|
|
18
20
|
*/
|
|
19
|
-
export declare const CalculatedPropertyAction: ({ mappingId, group, calculatedProperty, onSaveSuccess, onClickCancel
|
|
21
|
+
export declare const CalculatedPropertyAction: ({ mappingId, group, calculatedProperty, onSaveSuccess, onClickCancel }: CalculatedPropertyActionProps) => JSX.Element;
|
|
20
22
|
//# sourceMappingURL=CalculatedPropertyAction.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Fieldset, Text
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Fieldset, Text } from "@itwin/itwinui-react";
|
|
6
6
|
import React, { useState } from "react";
|
|
7
7
|
import ActionPanel from "../../SharedComponents/ActionPanel";
|
|
8
8
|
import useValidator from "../hooks/useValidator";
|
|
@@ -13,10 +13,11 @@ import { useGroupingMappingApiConfig } from "../../context/GroupingApiConfigCont
|
|
|
13
13
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
14
14
|
import { usePropertiesClient } from "../../context/PropertiesClientContext";
|
|
15
15
|
/**
|
|
16
|
+
* @deprecated in 0.27.0 The CalculatedPropertyAction has been superseded by the CalculatedPropertyActionWithVisuals and should not be used as a stand alone component, use GroupPropertyAction component instead.
|
|
16
17
|
* Component to create or update a calculated property.
|
|
17
18
|
* @public
|
|
18
19
|
*/
|
|
19
|
-
export const CalculatedPropertyAction = ({ mappingId, group, calculatedProperty, onSaveSuccess, onClickCancel
|
|
20
|
+
export const CalculatedPropertyAction = ({ mappingId, group, calculatedProperty, onSaveSuccess, onClickCancel }) => {
|
|
20
21
|
const { getAccessToken, iModelId } = useGroupingMappingApiConfig();
|
|
21
22
|
const propertiesClient = usePropertiesClient();
|
|
22
23
|
const [propertyName, setPropertyName] = useState(calculatedProperty?.propertyName ?? "");
|
|
@@ -53,11 +54,11 @@ export const CalculatedPropertyAction = ({ mappingId, group, calculatedProperty,
|
|
|
53
54
|
saveMutation(type);
|
|
54
55
|
};
|
|
55
56
|
return (React.createElement(React.Fragment, null,
|
|
56
|
-
React.createElement("div", { className:
|
|
57
|
-
React.createElement(Fieldset, { legend:
|
|
58
|
-
React.createElement("div", { className:
|
|
59
|
-
React.createElement(Text, { variant:
|
|
60
|
-
React.createElement(SharedCalculatedPropertyForms, {
|
|
57
|
+
React.createElement("div", { className: "gmw-calculated-properties-action-container" },
|
|
58
|
+
React.createElement(Fieldset, { legend: "Calculated Property Details", className: "gmw-details-form" },
|
|
59
|
+
React.createElement("div", { className: "gmw-field-legend-container" },
|
|
60
|
+
React.createElement(Text, { variant: "small", as: "small", className: "gmw-field-legend" }, "Asterisk * indicates mandatory fields.")),
|
|
61
|
+
React.createElement(SharedCalculatedPropertyForms, { calculatedPropertyType: type, setCalculatedPropertyType: setType }))),
|
|
61
62
|
React.createElement(ActionPanel, { onSave: onSave, onCancel: onClickCancel, isSavingDisabled: !(type && propertyName), isLoading: isLoading })));
|
|
62
63
|
};
|
|
63
64
|
//# sourceMappingURL=CalculatedPropertyAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalculatedPropertyAction.js","sourceRoot":"","sources":["../../../../../src/components/Properties/CalculatedProperties/CalculatedPropertyAction.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"CalculatedPropertyAction.js","sourceRoot":"","sources":["../../../../../src/components/Properties/CalculatedProperties/CalculatedPropertyAction.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,iCAAiC,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAe5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAiC,EAAE,EAAE;IAChJ,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,2BAA2B,EAAE,CAAC;IACnE,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAS,kBAAkB,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC;IACjG,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAqC,kBAAkB,EAAE,sBAAsB,IAAI,SAAS,CAAC,CAAC;IAC9H,MAAM,CAAC,SAAS,EAAE,qBAAqB,CAAC,GAAG,YAAY,EAAE,CAAC;IAC1D,MAAM,WAAW,GAAG,cAAc,EAAE,CA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,EAAC,SAAS,EAAC,kBAAkB;gBACzE,6BAAK,SAAS,EAAC,4BAA4B;oBACzC,oBAAC,IAAI,IAAC,OAAO,EAAC,OAAO,EAAC,EAAE,EAAC,OAAO,EAAC,SAAS,EAAC,kBAAkB,6CAEtD,CACH;gBACN,oBAAC,6BAA6B,IAAC,sBAAsB,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,GAAI,CAC1F,CACP;QACN,oBAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC,CAAC,IAAI,IAAI,YAAY,CAAC,EAAE,SAAS,EAAE,SAAS,GAAI,CACxH,CACJ,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 { Fieldset, Text } from \"@itwin/itwinui-react\";\nimport React, { useState } from \"react\";\nimport ActionPanel from \"../../SharedComponents/ActionPanel\";\nimport useValidator from \"../hooks/useValidator\";\nimport \"./CalculatedPropertyAction.scss\";\nimport type { CalculatedPropertyType, Group, Property } from \"@itwin/insights-client\";\nimport { DataType } from \"@itwin/insights-client\";\nimport { SharedCalculatedPropertyForms } from \"./SharedCalculatedPropertyForms\";\nimport { useGroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { usePropertiesClient } from \"../../context/PropertiesClientContext\";\n\n/**\n * @deprecated in 0.27.0 The CalculatedPropertyActionProps has been superseded by the CalculatedPropertyActionWithVisualsProps and should not be used, use GroupPropertyActionProps and GroupPropertyAction component instead.\n * Props for the {@link CalculatedPropertyAction} component.\n * @public\n */\nexport interface CalculatedPropertyActionProps {\n mappingId: string;\n group: Group;\n calculatedProperty?: Property;\n onSaveSuccess: () => void;\n onClickCancel?: () => void;\n}\n\n/**\n * @deprecated in 0.27.0 The CalculatedPropertyAction has been superseded by the CalculatedPropertyActionWithVisuals and should not be used as a stand alone component, use GroupPropertyAction component instead.\n * Component to create or update a calculated property.\n * @public\n */\nexport const CalculatedPropertyAction = ({ mappingId, group, calculatedProperty, onSaveSuccess, onClickCancel }: CalculatedPropertyActionProps) => {\n const { getAccessToken, iModelId } = useGroupingMappingApiConfig();\n const propertiesClient = usePropertiesClient();\n const [propertyName, setPropertyName] = useState<string>(calculatedProperty?.propertyName ?? \"\");\n const [type, setType] = useState<CalculatedPropertyType | undefined>(calculatedProperty?.calculatedPropertyType ?? undefined);\n const [validator, showValidationMessage] = useValidator();\n const queryClient = useQueryClient();\n\n const { mutate: saveMutation, isLoading } = useMutation(\n async (type: CalculatedPropertyType) => {\n const accessToken = await getAccessToken();\n\n return calculatedProperty\n ? propertiesClient.updateProperty(accessToken, mappingId, group.id, calculatedProperty.id, {\n ...calculatedProperty,\n propertyName,\n dataType: calculatedProperty.dataType,\n calculatedPropertyType: type,\n })\n : propertiesClient.createProperty(accessToken, mappingId, group.id, {\n propertyName,\n dataType: DataType.Double,\n calculatedPropertyType: type,\n });\n },\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries({ queryKey: [\"properties\", iModelId, mappingId, group.id] });\n onSaveSuccess();\n setPropertyName(\"\");\n setType(undefined);\n },\n },\n );\n\n const onSave = () => {\n if (!validator.allValid() || !type) {\n showValidationMessage(true);\n return;\n }\n\n saveMutation(type);\n };\n\n return (\n <>\n <div className=\"gmw-calculated-properties-action-container\">\n <Fieldset legend=\"Calculated Property Details\" className=\"gmw-details-form\">\n <div className=\"gmw-field-legend-container\">\n <Text variant=\"small\" as=\"small\" className=\"gmw-field-legend\">\n Asterisk * indicates mandatory fields.\n </Text>\n </div>\n <SharedCalculatedPropertyForms calculatedPropertyType={type} setCalculatedPropertyType={setType} />\n </Fieldset>\n </div>\n <ActionPanel onSave={onSave} onCancel={onClickCancel} isSavingDisabled={!(type && propertyName)} isLoading={isLoading} />\n </>\n );\n};\n"]}
|
package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./CalculatedPropertyActionWithVisuals.scss";
|
|
3
|
-
import type {
|
|
3
|
+
import type { CalculatedPropertyType, GroupMinimal } from "@itwin/insights-client";
|
|
4
4
|
/**
|
|
5
5
|
* Props for the {@link CalculatedPropertyActionWithVisuals} component.
|
|
6
|
-
* @
|
|
6
|
+
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export interface CalculatedPropertyActionWithVisualsProps {
|
|
9
|
-
mappingId: string;
|
|
10
9
|
group: GroupMinimal;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
calculatedPropertyType?: CalculatedPropertyType;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
setCalculatedPropertyType: (calculatedPropertyType: CalculatedPropertyType | undefined) => void;
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
15
|
* Component to create or update a calculated property with visualizations.
|
|
17
|
-
* @
|
|
16
|
+
* @internal
|
|
18
17
|
*/
|
|
19
|
-
export declare const CalculatedPropertyActionWithVisuals: ({
|
|
18
|
+
export declare const CalculatedPropertyActionWithVisuals: ({ group, calculatedPropertyType, isLoading, setCalculatedPropertyType, }: CalculatedPropertyActionWithVisualsProps) => JSX.Element;
|
|
20
19
|
//# sourceMappingURL=CalculatedPropertyActionWithVisuals.d.ts.map
|