@itwin/grouping-mapping-widget 0.25.2 → 0.26.1
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.d.ts +5 -5
- 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.d.ts +4 -0
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js +5 -3
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -1
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +28 -8
- 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.d.ts +19 -3
- package/lib/cjs/components/GroupingMappingContext.js +40 -13
- package/lib/cjs/components/GroupingMappingContext.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupAction.d.ts +10 -2
- package/lib/cjs/components/Groups/Editing/GroupAction.js +16 -14
- 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.d.ts +3 -3
- 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.d.ts +4 -4
- package/lib/cjs/components/Groups/GroupListItem.js +6 -4
- package/lib/cjs/components/Groups/GroupListItem.js.map +1 -1
- package/lib/cjs/components/Groups/GroupListItem.scss +14 -0
- package/lib/cjs/components/Groups/GroupMenuActions.d.ts +4 -4
- package/lib/cjs/components/Groups/GroupMenuActions.js +17 -6
- package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -1
- package/lib/cjs/components/Groups/GroupMenuActions.scss +2 -0
- package/lib/cjs/components/Groups/GroupOverlapProgressBar.d.ts +2 -2
- package/lib/cjs/components/Groups/GroupOverlapProgressBar.js.map +1 -1
- package/lib/cjs/components/Groups/Groups.d.ts +12 -4
- package/lib/cjs/components/Groups/Groups.js +7 -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 +5 -5
- 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.d.ts +19 -11
- package/lib/cjs/components/Groups/GroupsView.js +12 -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.d.ts +8 -0
- package/lib/cjs/components/Groups/GroupsVisualization.js +27 -24
- 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 +4 -4
- 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 +3 -3
- 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.d.ts +2 -2
- 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.d.ts +3 -3
- package/lib/cjs/components/Groups/hooks/useFetchGroups.js +6 -5
- package/lib/cjs/components/Groups/hooks/useFetchGroups.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +16 -8
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js +14 -10
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.d.ts +4 -4
- 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.d.ts +8 -0
- package/lib/cjs/components/Mappings/Editing/MappingAction.js +16 -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 +12 -7
- 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.d.ts +1 -2
- package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js +30 -33
- 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 +4 -4
- 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 -6
- package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -1
- package/lib/cjs/components/Mappings/Mappings.d.ts +8 -0
- package/lib/cjs/components/Mappings/Mappings.js +7 -3
- package/lib/cjs/components/Mappings/Mappings.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingsView.d.ts +7 -0
- package/lib/cjs/components/Mappings/MappingsView.js +17 -15
- package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.d.ts +1 -2
- package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js +11 -8
- 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 +8 -7
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappings.js +2 -2
- package/lib/cjs/components/Mappings/hooks/useFetchMappings.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.d.ts +9 -2
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js +44 -22
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.d.ts +2 -2
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.js +27 -19
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +11 -3
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +28 -15
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +11 -3
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +30 -20
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +3 -3
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +7 -5
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +4 -6
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +11 -3
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +74 -50
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.scss +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +3 -3
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js +21 -15
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -1
- package/lib/cjs/components/Properties/GroupColorToggle.d.ts +2 -2
- 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 +13 -5
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +41 -42
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- 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 +4 -4
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +20 -16
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.d.ts +3 -5
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js +20 -65
- 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 +13 -5
- package/lib/cjs/components/Properties/PropertyMenu.js +16 -18
- package/lib/cjs/components/Properties/PropertyMenu.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.d.ts +8 -0
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js +9 -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/hooks/useFormulaValidation.d.ts +2 -1
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +11 -7
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -1
- package/lib/cjs/components/Properties/hooks/usePropertiesQuery.d.ts +4 -0
- package/lib/cjs/components/Properties/hooks/usePropertiesQuery.js +12 -0
- package/lib/cjs/components/Properties/hooks/usePropertiesQuery.js.map +1 -0
- 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 +1 -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 +3 -3
- 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.d.ts +16 -0
- package/lib/cjs/components/context/GroupingApiConfigContext.js +7 -0
- 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.d.ts +20 -0
- package/lib/cjs/components/context/GroupsClientContext.js +45 -0
- package/lib/cjs/components/context/GroupsClientContext.js.map +1 -0
- 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.d.ts +12 -0
- package/lib/cjs/components/context/MappingClientContext.js +14 -2
- package/lib/cjs/components/context/MappingClientContext.js.map +1 -1
- package/lib/cjs/components/context/PropertiesClientContext.d.ts +20 -0
- package/lib/cjs/components/context/PropertiesClientContext.js +45 -0
- package/lib/cjs/components/context/PropertiesClientContext.js.map +1 -0
- 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 +5 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +17 -18
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/GroupingMappingCustomUI.d.ts +15 -3
- package/lib/cjs/components/customUI/GroupingMappingCustomUI.js +3 -0
- package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.d.ts +5 -1
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.js +12 -8
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.d.ts +5 -1
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.js +20 -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 +1 -0
- package/lib/cjs/formula/FormulaDataTypeResolver.js +4 -3
- 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 +139 -45
- 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 +9 -16
- package/lib/cjs/formula/FormulaTokensDataTypeResolver.js.map +1 -1
- package/lib/cjs/formula/IResult.d.ts +3 -0
- 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.d.ts +16 -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 +5 -3
- package/lib/cjs/grouping-mapping-widget.js +14 -4
- package/lib/cjs/grouping-mapping-widget.js.map +1 -1
- package/lib/cjs/test/GroupPropertyUtils.test.js +27 -65
- package/lib/cjs/test/GroupPropertyUtils.test.js.map +1 -1
- package/lib/cjs/test/GroupingMappingCustomUI.test.js +21 -12
- 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.d.ts +5 -5
- 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.d.ts +4 -0
- package/lib/esm/WidgetShell/GroupingMappingWidget.js +6 -4
- package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -1
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +28 -8
- 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.d.ts +19 -3
- package/lib/esm/components/GroupingMappingContext.js +41 -14
- package/lib/esm/components/GroupingMappingContext.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupAction.d.ts +10 -2
- package/lib/esm/components/Groups/Editing/GroupAction.js +17 -15
- 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.d.ts +3 -3
- 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.d.ts +4 -4
- package/lib/esm/components/Groups/GroupListItem.js +6 -4
- package/lib/esm/components/Groups/GroupListItem.js.map +1 -1
- package/lib/esm/components/Groups/GroupListItem.scss +14 -0
- package/lib/esm/components/Groups/GroupMenuActions.d.ts +4 -4
- package/lib/esm/components/Groups/GroupMenuActions.js +17 -6
- package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -1
- package/lib/esm/components/Groups/GroupMenuActions.scss +2 -0
- package/lib/esm/components/Groups/GroupOverlapProgressBar.d.ts +2 -2
- package/lib/esm/components/Groups/GroupOverlapProgressBar.js.map +1 -1
- package/lib/esm/components/Groups/Groups.d.ts +12 -4
- package/lib/esm/components/Groups/Groups.js +7 -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 +5 -5
- 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.d.ts +19 -11
- package/lib/esm/components/Groups/GroupsView.js +14 -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.d.ts +8 -0
- package/lib/esm/components/Groups/GroupsVisualization.js +29 -26
- 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 +4 -4
- 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 +3 -3
- 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.d.ts +2 -2
- 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.d.ts +3 -3
- package/lib/esm/components/Groups/hooks/useFetchGroups.js +6 -5
- package/lib/esm/components/Groups/hooks/useFetchGroups.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +16 -8
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js +14 -10
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.d.ts +4 -4
- 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.d.ts +8 -0
- package/lib/esm/components/Mappings/Editing/MappingAction.js +16 -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 +12 -7
- 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.d.ts +1 -2
- package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js +31 -34
- 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 +4 -4
- 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 -8
- package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -1
- package/lib/esm/components/Mappings/Mappings.d.ts +8 -0
- package/lib/esm/components/Mappings/Mappings.js +7 -3
- package/lib/esm/components/Mappings/Mappings.js.map +1 -1
- package/lib/esm/components/Mappings/MappingsView.d.ts +7 -0
- package/lib/esm/components/Mappings/MappingsView.js +19 -17
- package/lib/esm/components/Mappings/MappingsView.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.d.ts +1 -2
- package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js +11 -8
- 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 +9 -8
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappings.js +2 -2
- package/lib/esm/components/Mappings/hooks/useFetchMappings.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.d.ts +9 -2
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.js +45 -23
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useRunExtraction.d.ts +2 -2
- package/lib/esm/components/Mappings/hooks/useRunExtraction.js +27 -19
- package/lib/esm/components/Mappings/hooks/useRunExtraction.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +11 -3
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +30 -17
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +11 -3
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +33 -23
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +3 -3
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +8 -6
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +5 -7
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +11 -3
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js +76 -52
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.scss +1 -1
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +3 -3
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js +23 -17
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -1
- package/lib/esm/components/Properties/GroupColorToggle.d.ts +2 -2
- 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 +13 -5
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +43 -44
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- 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 +4 -4
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js +22 -18
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.d.ts +3 -5
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js +21 -66
- 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 +13 -5
- package/lib/esm/components/Properties/PropertyMenu.js +16 -18
- package/lib/esm/components/Properties/PropertyMenu.js.map +1 -1
- package/lib/esm/components/Properties/PropertyMenuWithVisualization.d.ts +8 -0
- package/lib/esm/components/Properties/PropertyMenuWithVisualization.js +9 -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/hooks/useFormulaValidation.d.ts +2 -1
- package/lib/esm/components/Properties/hooks/useFormulaValidation.js +11 -7
- package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -1
- package/lib/esm/components/Properties/hooks/usePropertiesQuery.d.ts +4 -0
- package/lib/esm/components/Properties/hooks/usePropertiesQuery.js +8 -0
- package/lib/esm/components/Properties/hooks/usePropertiesQuery.js.map +1 -0
- 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 +1 -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 +3 -3
- 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.d.ts +16 -0
- package/lib/esm/components/context/GroupingApiConfigContext.js +7 -0
- 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.d.ts +20 -0
- package/lib/esm/components/context/GroupsClientContext.js +39 -0
- package/lib/esm/components/context/GroupsClientContext.js.map +1 -0
- 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.d.ts +12 -0
- package/lib/esm/components/context/MappingClientContext.js +15 -3
- package/lib/esm/components/context/MappingClientContext.js.map +1 -1
- package/lib/esm/components/context/PropertiesClientContext.d.ts +20 -0
- package/lib/esm/components/context/PropertiesClientContext.js +39 -0
- package/lib/esm/components/context/PropertiesClientContext.js.map +1 -0
- 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 +5 -1
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +18 -19
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/GroupingMappingCustomUI.d.ts +15 -3
- package/lib/esm/components/customUI/GroupingMappingCustomUI.js +3 -0
- package/lib/esm/components/customUI/GroupingMappingCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/ManualGroupingCustomUI.d.ts +5 -1
- package/lib/esm/components/customUI/ManualGroupingCustomUI.js +12 -8
- package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/SearchGroupingCustomUI.d.ts +5 -1
- package/lib/esm/components/customUI/SearchGroupingCustomUI.js +20 -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 +1 -0
- package/lib/esm/formula/FormulaDataTypeResolver.js +4 -3
- 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 +139 -45
- 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 +9 -16
- package/lib/esm/formula/FormulaTokensDataTypeResolver.js.map +1 -1
- package/lib/esm/formula/IResult.d.ts +3 -0
- 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.d.ts +16 -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 +5 -3
- package/lib/esm/grouping-mapping-widget.js +8 -6
- package/lib/esm/grouping-mapping-widget.js.map +1 -1
- package/lib/esm/test/GroupPropertyUtils.test.js +28 -66
- package/lib/esm/test/GroupPropertyUtils.test.js.map +1 -1
- package/lib/esm/test/GroupingMappingCustomUI.test.js +21 -12
- 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 +10 -5
- package/lib/cjs/components/Properties/hooks/useCalculatedPropertiesQuery.d.ts +0 -4
- package/lib/cjs/components/Properties/hooks/useCalculatedPropertiesQuery.js +0 -12
- package/lib/cjs/components/Properties/hooks/useCalculatedPropertiesQuery.js.map +0 -1
- package/lib/cjs/components/Properties/hooks/useCustomCalculationsQuery.d.ts +0 -4
- package/lib/cjs/components/Properties/hooks/useCustomCalculationsQuery.js +0 -12
- package/lib/cjs/components/Properties/hooks/useCustomCalculationsQuery.js.map +0 -1
- package/lib/cjs/components/Properties/hooks/useGroupPropertiesQuery.d.ts +0 -4
- package/lib/cjs/components/Properties/hooks/useGroupPropertiesQuery.js +0 -12
- package/lib/cjs/components/Properties/hooks/useGroupPropertiesQuery.js.map +0 -1
- package/lib/esm/components/Properties/hooks/useCalculatedPropertiesQuery.d.ts +0 -4
- package/lib/esm/components/Properties/hooks/useCalculatedPropertiesQuery.js +0 -8
- package/lib/esm/components/Properties/hooks/useCalculatedPropertiesQuery.js.map +0 -1
- package/lib/esm/components/Properties/hooks/useCustomCalculationsQuery.d.ts +0 -4
- package/lib/esm/components/Properties/hooks/useCustomCalculationsQuery.js +0 -8
- package/lib/esm/components/Properties/hooks/useCustomCalculationsQuery.js.map +0 -1
- package/lib/esm/components/Properties/hooks/useGroupPropertiesQuery.d.ts +0 -4
- package/lib/esm/components/Properties/hooks/useGroupPropertiesQuery.js +0 -8
- package/lib/esm/components/Properties/hooks/useGroupPropertiesQuery.js.map +0 -1
|
@@ -25,9 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.PropertyAction = void 0;
|
|
27
27
|
/*---------------------------------------------------------------------------------------------
|
|
28
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
29
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
30
|
-
*--------------------------------------------------------------------------------------------*/
|
|
28
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
29
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
30
|
+
*--------------------------------------------------------------------------------------------*/
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
33
33
|
const PropertyGridWrapperContext_1 = require("../context/PropertyGridWrapperContext");
|
|
@@ -40,16 +40,13 @@ const usePropertySelection = (property, currentPropertyList, queryBuilder) => {
|
|
|
40
40
|
return currentPropertyList.includes(property);
|
|
41
41
|
}
|
|
42
42
|
if (property.value.valueFormat === appui_abstract_1.PropertyValueFormat.Array) {
|
|
43
|
-
return
|
|
44
|
-
currentPropertyList.includes(property));
|
|
43
|
+
return property.value.items.length === 0 && currentPropertyList.includes(property);
|
|
45
44
|
}
|
|
46
45
|
return Object.values(property.value.members).every((subProp) => checkIfPropertyIsSelected(subProp));
|
|
47
46
|
}, [currentPropertyList]);
|
|
48
47
|
const isPropertySelected = checkIfPropertyIsSelected(property);
|
|
49
48
|
const addProperty = (0, react_1.useCallback)(async (prop) => {
|
|
50
|
-
if (prop.value.valueFormat === appui_abstract_1.PropertyValueFormat.Primitive &&
|
|
51
|
-
!currentPropertyList.includes(prop) &&
|
|
52
|
-
(await queryBuilder?.addProperty(prop))) {
|
|
49
|
+
if (prop.value.valueFormat === appui_abstract_1.PropertyValueFormat.Primitive && !currentPropertyList.includes(prop) && (await queryBuilder?.addProperty(prop))) {
|
|
53
50
|
setIsCheckboxLoading(false);
|
|
54
51
|
return true;
|
|
55
52
|
}
|
|
@@ -70,8 +67,8 @@ const usePropertySelection = (property, currentPropertyList, queryBuilder) => {
|
|
|
70
67
|
};
|
|
71
68
|
};
|
|
72
69
|
const PropertyAction = ({ property }) => {
|
|
73
|
-
const { currentPropertyList, queryBuilder, setCurrentPropertyList, setQuery, isUpdating
|
|
74
|
-
const { isPropertySelected, addProperty, removeProperty, isCheckboxLoading, setIsCheckboxLoading
|
|
70
|
+
const { currentPropertyList, queryBuilder, setCurrentPropertyList, setQuery, isUpdating } = (0, PropertyGridWrapperContext_1.usePropertyGridWrapper)();
|
|
71
|
+
const { isPropertySelected, addProperty, removeProperty, isCheckboxLoading, setIsCheckboxLoading } = usePropertySelection(property, currentPropertyList, queryBuilder);
|
|
75
72
|
(0, react_1.useEffect)(() => {
|
|
76
73
|
setIsCheckboxLoading(isPropertySelected && isUpdating);
|
|
77
74
|
}, [isPropertySelected, isUpdating, setIsCheckboxLoading]);
|
|
@@ -87,17 +84,8 @@ const PropertyAction = ({ property }) => {
|
|
|
87
84
|
setQuery(queryBuilder?.buildQueryString() ?? "");
|
|
88
85
|
}
|
|
89
86
|
}
|
|
90
|
-
}, [
|
|
91
|
-
|
|
92
|
-
isPropertySelected,
|
|
93
|
-
property,
|
|
94
|
-
removeProperty,
|
|
95
|
-
queryBuilder,
|
|
96
|
-
setCurrentPropertyList,
|
|
97
|
-
setQuery,
|
|
98
|
-
]);
|
|
99
|
-
return (react_1.default.createElement("div", { className: "gmw-property-selection-checkbox" }, property.value.valueFormat === appui_abstract_1.PropertyValueFormat.Primitive &&
|
|
100
|
-
property.value.value !== undefined && (react_1.default.createElement(itwinui_react_1.Checkbox, { checked: isPropertySelected, onChange: onPropertySelectionChanged, disabled: isUpdating, isLoading: isCheckboxLoading }))));
|
|
87
|
+
}, [addProperty, isPropertySelected, property, removeProperty, queryBuilder, setCurrentPropertyList, setQuery]);
|
|
88
|
+
return (react_1.default.createElement("div", { className: "gmw-property-selection-checkbox" }, property.value.valueFormat === appui_abstract_1.PropertyValueFormat.Primitive && property.value.value !== undefined && (react_1.default.createElement(itwinui_react_1.Checkbox, { checked: isPropertySelected, onChange: onPropertySelectionChanged, disabled: isUpdating, isLoading: isCheckboxLoading }))));
|
|
101
89
|
};
|
|
102
90
|
exports.PropertyAction = PropertyAction;
|
|
103
91
|
//# sourceMappingURL=PropertyAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyAction.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyAction.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"PropertyAction.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyAction.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,+CAAgE;AAEhE,0DAA4D;AAC5D,sFAA+E;AAC/E,wDAAgD;AAChD,iCAA+B;AAO/B,MAAM,oBAAoB,GAAG,CAAC,QAAwB,EAAE,mBAAqC,EAAE,YAAsC,EAAE,EAAE;IACvI,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAElE,MAAM,yBAAyB,GAAG,IAAA,mBAAW,EAC3C,CAAC,QAAwB,EAAW,EAAE;QACpC,IAAI,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS,EAAE;YAChE,OAAO,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;SAC/C;QAED,IAAI,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,KAAK,EAAE;YAC5D,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;SACpF;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,OAAuB,EAAE,EAAE,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC;IACtH,CAAC,EACD,CAAC,mBAAmB,CAAC,CACtB,CAAC;IAEF,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAE/D,MAAM,WAAW,GAAG,IAAA,mBAAW,EAC7B,KAAK,EAAE,IAAoB,EAAE,EAAE;QAC7B,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,YAAY,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE;YAC9I,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;IACf,CAAC,EACD,CAAC,mBAAmB,EAAE,YAAY,CAAC,CACpC,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,mBAAW,EAChC,KAAK,EAAE,IAAoB,EAAE,EAAE;QAC7B,IAAI,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YACtC,MAAM,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;YACzC,oBAAoB,CAAC,KAAK,CAAC,CAAC;SAC7B;IACH,CAAC,EACD,CAAC,mBAAmB,EAAE,YAAY,CAAC,CACpC,CAAC;IAEF,OAAO;QACL,kBAAkB;QAClB,WAAW;QACX,cAAc;QACd,iBAAiB;QACjB,oBAAoB;KACrB,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAuB,EAAE,EAAE;IAClE,MAAM,EAAE,mBAAmB,EAAE,YAAY,EAAE,sBAAsB,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,IAAA,mDAAsB,GAAE,CAAC;IAErH,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,CACvH,QAAQ,EACR,mBAAmB,EACnB,YAAY,CACb,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,oBAAoB,CAAC,kBAAkB,IAAI,UAAU,CAAC,CAAC;IACzD,CAAC,EAAE,CAAC,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAE3D,MAAM,0BAA0B,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE;QACxD,IAAI,kBAAkB,EAAE;YACtB,MAAM,cAAc,CAAC,QAAQ,CAAC,CAAC;YAC/B,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC7E,QAAQ,CAAC,YAAY,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;SAClD;aAAM;YACL,IAAI,MAAM,WAAW,CAAC,QAAQ,CAAC,EAAE;gBAC/B,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAChE,QAAQ,CAAC,YAAY,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;aAClD;SACF;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEhH,OAAO,CACL,uCAAK,SAAS,EAAC,iCAAiC,IAC7C,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,CACrG,8BAAC,wBAAQ,IAAC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,0BAA0B,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,GAAI,CACpI,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAjCW,QAAA,cAAc,kBAiCzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { usePropertyGridWrapper } from \"../context/PropertyGridWrapperContext\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport \"./PropertyAction.scss\";\nimport type { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\n\nexport interface PropertyActionProps {\n property: PropertyRecord;\n}\n\nconst usePropertySelection = (property: PropertyRecord, currentPropertyList: PropertyRecord[], queryBuilder: QueryBuilder | undefined) => {\n const [isCheckboxLoading, setIsCheckboxLoading] = useState(false);\n\n const checkIfPropertyIsSelected = useCallback(\n (property: PropertyRecord): boolean => {\n if (property.value.valueFormat === PropertyValueFormat.Primitive) {\n return currentPropertyList.includes(property);\n }\n\n if (property.value.valueFormat === PropertyValueFormat.Array) {\n return property.value.items.length === 0 && currentPropertyList.includes(property);\n }\n return Object.values(property.value.members).every((subProp: PropertyRecord) => checkIfPropertyIsSelected(subProp));\n },\n [currentPropertyList],\n );\n\n const isPropertySelected = checkIfPropertyIsSelected(property);\n\n const addProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (prop.value.valueFormat === PropertyValueFormat.Primitive && !currentPropertyList.includes(prop) && (await queryBuilder?.addProperty(prop))) {\n setIsCheckboxLoading(false);\n return true;\n }\n return false;\n },\n [currentPropertyList, queryBuilder],\n );\n\n const removeProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (currentPropertyList.includes(prop)) {\n await queryBuilder?.removeProperty(prop);\n setIsCheckboxLoading(false);\n }\n },\n [currentPropertyList, queryBuilder],\n );\n\n return {\n isPropertySelected,\n addProperty,\n removeProperty,\n isCheckboxLoading,\n setIsCheckboxLoading,\n };\n};\n\nexport const PropertyAction = ({ property }: PropertyActionProps) => {\n const { currentPropertyList, queryBuilder, setCurrentPropertyList, setQuery, isUpdating } = usePropertyGridWrapper();\n\n const { isPropertySelected, addProperty, removeProperty, isCheckboxLoading, setIsCheckboxLoading } = usePropertySelection(\n property,\n currentPropertyList,\n queryBuilder,\n );\n\n useEffect(() => {\n setIsCheckboxLoading(isPropertySelected && isUpdating);\n }, [isPropertySelected, isUpdating, setIsCheckboxLoading]);\n\n const onPropertySelectionChanged = useCallback(async () => {\n if (isPropertySelected) {\n await removeProperty(property);\n setCurrentPropertyList((prevList) => prevList.filter((x) => x !== property));\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n } else {\n if (await addProperty(property)) {\n setCurrentPropertyList((prevList) => prevList.concat(property));\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n }\n }\n }, [addProperty, isPropertySelected, property, removeProperty, queryBuilder, setCurrentPropertyList, setQuery]);\n\n return (\n <div className=\"gmw-property-selection-checkbox\">\n {property.value.valueFormat === PropertyValueFormat.Primitive && property.value.value !== undefined && (\n <Checkbox checked={isPropertySelected} onChange={onPropertySelectionChanged} disabled={isUpdating} isLoading={isCheckboxLoading} />\n )}\n </div>\n );\n};\n"]}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./PropertyMenu.scss";
|
|
3
|
-
import type {
|
|
3
|
+
import type { GroupMinimal, Mapping, Property } from "@itwin/insights-client";
|
|
4
|
+
/**
|
|
5
|
+
* Props for the {@link PropertyMenu} component.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
4
8
|
export interface PropertyMenuProps {
|
|
5
9
|
mapping: Mapping;
|
|
6
|
-
group:
|
|
10
|
+
group: GroupMinimal;
|
|
7
11
|
onClickAddGroupProperty?: () => void;
|
|
8
|
-
onClickModifyGroupProperty?: (groupProperty:
|
|
12
|
+
onClickModifyGroupProperty?: (groupProperty: Property) => void;
|
|
9
13
|
onClickAddCalculatedProperty?: () => void;
|
|
10
|
-
onClickModifyCalculatedProperty?: (calculatedProperty:
|
|
14
|
+
onClickModifyCalculatedProperty?: (calculatedProperty: Property) => void;
|
|
11
15
|
onClickAddCustomCalculationProperty?: () => void;
|
|
12
|
-
onClickModifyCustomCalculation?: (customCalculation:
|
|
16
|
+
onClickModifyCustomCalculation?: (customCalculation: Property) => void;
|
|
13
17
|
hideGroupProps?: boolean;
|
|
14
18
|
hideCalculatedProps?: boolean;
|
|
15
19
|
hideCustomCalculationProps?: boolean;
|
|
16
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Component to display the properties of a group.
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
17
25
|
export declare const PropertyMenu: ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty, onClickAddCalculatedProperty, onClickModifyCalculatedProperty, onClickAddCustomCalculationProperty, onClickModifyCustomCalculation, hideGroupProps, hideCalculatedProps, hideCustomCalculationProps, }: PropertyMenuProps) => JSX.Element;
|
|
18
26
|
//# sourceMappingURL=PropertyMenu.d.ts.map
|
|
@@ -25,36 +25,34 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.PropertyMenu = void 0;
|
|
27
27
|
/*---------------------------------------------------------------------------------------------
|
|
28
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
29
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
30
|
-
*--------------------------------------------------------------------------------------------*/
|
|
28
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
29
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
30
|
+
*--------------------------------------------------------------------------------------------*/
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
require("./PropertyMenu.scss");
|
|
33
33
|
const GroupPropertyTable_1 = require("./GroupProperties/GroupPropertyTable");
|
|
34
|
-
const MappingClientContext_1 = require("../context/MappingClientContext");
|
|
35
34
|
const GroupingApiConfigContext_1 = require("../context/GroupingApiConfigContext");
|
|
36
35
|
const CalculatedPropertyTable_1 = require("./CalculatedProperties/CalculatedPropertyTable");
|
|
37
36
|
const CustomCalculationTable_1 = require("./CustomCalculations/CustomCalculationTable");
|
|
38
|
-
const
|
|
39
|
-
const useCalculatedPropertiesQuery_1 = require("./hooks/useCalculatedPropertiesQuery");
|
|
40
|
-
const useCustomCalculationsQuery_1 = require("./hooks/useCustomCalculationsQuery");
|
|
37
|
+
const usePropertiesQuery_1 = require("./hooks/usePropertiesQuery");
|
|
41
38
|
const react_query_1 = require("@tanstack/react-query");
|
|
39
|
+
const PropertiesClientContext_1 = require("../context/PropertiesClientContext");
|
|
40
|
+
/**
|
|
41
|
+
* Component to display the properties of a group.
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
42
44
|
const PropertyMenu = ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty, onClickAddCalculatedProperty, onClickModifyCalculatedProperty, onClickAddCustomCalculationProperty, onClickModifyCustomCalculation, hideGroupProps = false, hideCalculatedProps = false, hideCustomCalculationProps = false, }) => {
|
|
43
45
|
const groupId = group.id;
|
|
44
46
|
const mappingId = mapping.id;
|
|
45
47
|
const { getAccessToken, iModelId } = (0, GroupingApiConfigContext_1.useGroupingMappingApiConfig)();
|
|
46
|
-
const
|
|
48
|
+
const propertiesClient = (0, PropertiesClientContext_1.usePropertiesClient)();
|
|
47
49
|
const queryClient = (0, react_query_1.useQueryClient)();
|
|
48
|
-
const { data: groupProperties, isFetching: isLoadingGroupProperties } = (0,
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return (react_1.default.createElement("div", { className: 'gmw-property-menu-wrapper' },
|
|
55
|
-
!hideGroupProps && (react_1.default.createElement(GroupPropertyTable_1.GroupPropertyTable, { iModelId: iModelId, mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddGroupProperty, onClickModify: onClickModifyGroupProperty, isLoading: isLoadingGroupProperties, groupProperties: groupProperties ?? [], refresh: refreshGroupProperties })),
|
|
56
|
-
!hideCalculatedProps && (react_1.default.createElement(CalculatedPropertyTable_1.CalculatedPropertyTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCalculatedProperty, onClickModify: onClickModifyCalculatedProperty, isLoading: isLoadingCalculatedProperties, calculatedProperties: calculatedProperties ?? [], refresh: refreshCalculatedProperties })),
|
|
57
|
-
!hideCustomCalculationProps && (react_1.default.createElement(CustomCalculationTable_1.CustomCalculationTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCustomCalculationProperty, onClickModify: onClickModifyCustomCalculation, isLoading: isLoadingCustomCalculations, customCalculations: customCalculationProperties ?? [], refresh: refreshCustomCalculations }))));
|
|
50
|
+
const { data: groupProperties, isFetching: isLoadingGroupProperties } = (0, usePropertiesQuery_1.usePropertiesQuery)(iModelId, mappingId, groupId, getAccessToken, propertiesClient);
|
|
51
|
+
const refreshGroupProperties = (0, react_1.useCallback)(async () => queryClient.invalidateQueries({ queryKey: ["properties", iModelId, mappingId, group.id] }), [group.id, iModelId, mappingId, queryClient]);
|
|
52
|
+
return (react_1.default.createElement("div", { className: "gmw-property-menu-wrapper" },
|
|
53
|
+
!hideGroupProps && (react_1.default.createElement(GroupPropertyTable_1.GroupPropertyTable, { iModelId: iModelId, mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddGroupProperty, onClickModify: onClickModifyGroupProperty, isLoading: isLoadingGroupProperties, groupProperties: groupProperties ? groupProperties.properties : [], refresh: refreshGroupProperties })),
|
|
54
|
+
!hideCalculatedProps && (react_1.default.createElement(CalculatedPropertyTable_1.CalculatedPropertyTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCalculatedProperty, onClickModify: onClickModifyCalculatedProperty, isLoading: isLoadingGroupProperties, calculatedProperties: groupProperties ? groupProperties.properties : [], refresh: refreshGroupProperties })),
|
|
55
|
+
!hideCustomCalculationProps && (react_1.default.createElement(CustomCalculationTable_1.CustomCalculationTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCustomCalculationProperty, onClickModify: onClickModifyCustomCalculation, isLoading: isLoadingGroupProperties, customCalculations: groupProperties ? groupProperties.properties : [], refresh: refreshGroupProperties }))));
|
|
58
56
|
};
|
|
59
57
|
exports.PropertyMenu = PropertyMenu;
|
|
60
58
|
//# sourceMappingURL=PropertyMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyMenu.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"PropertyMenu.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,+CAA2C;AAC3C,+BAA6B;AAC7B,6EAA0E;AAC1E,kFAAkF;AAElF,4FAAyF;AACzF,wFAAqF;AACrF,mEAAgE;AAChE,uDAAuD;AACvD,gFAAyE;AAoBzE;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,mCAAmC,EACnC,8BAA8B,EAC9B,cAAc,GAAG,KAAK,EACtB,mBAAmB,GAAG,KAAK,EAC3B,0BAA0B,GAAG,KAAK,GAChB,EAAE,EAAE;IACtB,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC;IAC7B,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,IAAA,sDAA2B,GAAE,CAAC;IACnE,MAAM,gBAAgB,GAAG,IAAA,6CAAmB,GAAE,CAAC;IAC/C,MAAM,WAAW,GAAG,IAAA,4BAAc,GAAE,CAAC;IAErC,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,wBAAwB,EAAE,GAAG,IAAA,uCAAkB,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAAC;IAE3J,MAAM,sBAAsB,GAAG,IAAA,mBAAW,EACxC,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EACtG,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAC7C,CAAC;IAEF,OAAO,CACL,uCAAK,SAAS,EAAC,2BAA2B;QACvC,CAAC,cAAc,IAAI,CAClB,8BAAC,uCAAkB,IACjB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,uBAAuB,EACnC,aAAa,EAAE,0BAA0B,EACzC,SAAS,EAAE,wBAAwB,EACnC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAClE,OAAO,EAAE,sBAAsB,GAC/B,CACH;QACA,CAAC,mBAAmB,IAAI,CACvB,8BAAC,iDAAuB,IACtB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,4BAA4B,EACxC,aAAa,EAAE,+BAA+B,EAC9C,SAAS,EAAE,wBAAwB,EACnC,oBAAoB,EAAE,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACvE,OAAO,EAAE,sBAAsB,GAC/B,CACH;QACA,CAAC,0BAA0B,IAAI,CAC9B,8BAAC,+CAAsB,IACrB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,mCAAmC,EAC/C,aAAa,EAAE,8BAA8B,EAC7C,SAAS,EAAE,wBAAwB,EACnC,kBAAkB,EAAE,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACrE,OAAO,EAAE,sBAAsB,GAC/B,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAhEW,QAAA,YAAY,gBAgEvB","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 } from \"react\";\nimport \"./PropertyMenu.scss\";\nimport { GroupPropertyTable } from \"./GroupProperties/GroupPropertyTable\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport type { GroupMinimal, Mapping, Property } from \"@itwin/insights-client\";\nimport { CalculatedPropertyTable } from \"./CalculatedProperties/CalculatedPropertyTable\";\nimport { CustomCalculationTable } from \"./CustomCalculations/CustomCalculationTable\";\nimport { usePropertiesQuery } from \"./hooks/usePropertiesQuery\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { usePropertiesClient } from \"../context/PropertiesClientContext\";\n\n/**\n * Props for the {@link PropertyMenu} component.\n * @public\n */\nexport interface PropertyMenuProps {\n mapping: Mapping;\n group: GroupMinimal;\n onClickAddGroupProperty?: () => void;\n onClickModifyGroupProperty?: (groupProperty: Property) => void;\n onClickAddCalculatedProperty?: () => void;\n onClickModifyCalculatedProperty?: (calculatedProperty: Property) => void;\n onClickAddCustomCalculationProperty?: () => void;\n onClickModifyCustomCalculation?: (customCalculation: Property) => void;\n hideGroupProps?: boolean;\n hideCalculatedProps?: boolean;\n hideCustomCalculationProps?: boolean;\n}\n\n/**\n * Component to display the properties of a group.\n * @public\n */\nexport const PropertyMenu = ({\n mapping,\n group,\n onClickAddGroupProperty,\n onClickModifyGroupProperty,\n onClickAddCalculatedProperty,\n onClickModifyCalculatedProperty,\n onClickAddCustomCalculationProperty,\n onClickModifyCustomCalculation,\n hideGroupProps = false,\n hideCalculatedProps = false,\n hideCustomCalculationProps = false,\n}: PropertyMenuProps) => {\n const groupId = group.id;\n const mappingId = mapping.id;\n const { getAccessToken, iModelId } = useGroupingMappingApiConfig();\n const propertiesClient = usePropertiesClient();\n const queryClient = useQueryClient();\n\n const { data: groupProperties, isFetching: isLoadingGroupProperties } = usePropertiesQuery(iModelId, mappingId, groupId, getAccessToken, propertiesClient);\n\n const refreshGroupProperties = useCallback(\n async () => queryClient.invalidateQueries({ queryKey: [\"properties\", iModelId, mappingId, group.id] }),\n [group.id, iModelId, mappingId, queryClient],\n );\n\n return (\n <div className=\"gmw-property-menu-wrapper\">\n {!hideGroupProps && (\n <GroupPropertyTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddGroupProperty}\n onClickModify={onClickModifyGroupProperty}\n isLoading={isLoadingGroupProperties}\n groupProperties={groupProperties ? groupProperties.properties : []}\n refresh={refreshGroupProperties}\n />\n )}\n {!hideCalculatedProps && (\n <CalculatedPropertyTable\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddCalculatedProperty}\n onClickModify={onClickModifyCalculatedProperty}\n isLoading={isLoadingGroupProperties}\n calculatedProperties={groupProperties ? groupProperties.properties : []}\n refresh={refreshGroupProperties}\n />\n )}\n {!hideCustomCalculationProps && (\n <CustomCalculationTable\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddCustomCalculationProperty}\n onClickModify={onClickModifyCustomCalculation}\n isLoading={isLoadingGroupProperties}\n customCalculations={groupProperties ? groupProperties.properties : []}\n refresh={refreshGroupProperties}\n />\n )}\n </div>\n );\n};\n"]}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { PropertyMenuProps } from "./PropertyMenu";
|
|
3
3
|
import "./PropertyMenuWithVisualization.scss";
|
|
4
|
+
/**
|
|
5
|
+
* Properties for the {@link PropertyMenuWithVisualization} component.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
4
8
|
export interface PropertyMenuWithVisualizationProps extends PropertyMenuProps {
|
|
5
9
|
color: string;
|
|
6
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Component to display a property menu with visualization.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
7
15
|
export declare const PropertyMenuWithVisualization: ({ group, color, ...rest }: PropertyMenuWithVisualizationProps) => JSX.Element;
|
|
8
16
|
//# sourceMappingURL=PropertyMenuWithVisualization.d.ts.map
|
|
@@ -25,9 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.PropertyMenuWithVisualization = void 0;
|
|
27
27
|
/*---------------------------------------------------------------------------------------------
|
|
28
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
29
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
30
|
-
*--------------------------------------------------------------------------------------------*/
|
|
28
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
29
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
30
|
+
*--------------------------------------------------------------------------------------------*/
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
const PropertyMenu_1 = require("./PropertyMenu");
|
|
33
33
|
const GroupColorToggle_1 = require("./GroupColorToggle");
|
|
@@ -35,12 +35,16 @@ const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
|
35
35
|
const GroupInformationPanel_1 = require("./GroupInformationPanel");
|
|
36
36
|
const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
|
|
37
37
|
require("./PropertyMenuWithVisualization.scss");
|
|
38
|
+
/**
|
|
39
|
+
* Component to display a property menu with visualization.
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
38
42
|
const PropertyMenuWithVisualization = ({ group, color, ...rest }) => {
|
|
39
43
|
const [isInformationPanelOpen, setIsInformationPanelOpen] = (0, react_1.useState)(false);
|
|
40
|
-
return (react_1.default.createElement(itwinui_react_1.InformationPanelWrapper, { className:
|
|
44
|
+
return (react_1.default.createElement(itwinui_react_1.InformationPanelWrapper, { className: "gmw-property-menu-vis-wrapper" },
|
|
41
45
|
react_1.default.createElement("div", { className: "gmw-property-menu-vis-toolbar" },
|
|
42
46
|
react_1.default.createElement(GroupColorToggle_1.GroupColorToggle, { group: group, color: color, labelPosition: "left" }),
|
|
43
|
-
react_1.default.createElement(itwinui_react_1.IconButton, { styleType:
|
|
47
|
+
react_1.default.createElement(itwinui_react_1.IconButton, { styleType: "borderless", onClick: () => setIsInformationPanelOpen(true), title: "Group Information" },
|
|
44
48
|
react_1.default.createElement(itwinui_icons_react_1.SvgProperties, null))),
|
|
45
49
|
react_1.default.createElement(PropertyMenu_1.PropertyMenu, { group: group, ...rest }),
|
|
46
50
|
react_1.default.createElement(GroupInformationPanel_1.GroupInformationPanel, { isOpen: isInformationPanelOpen, onClose: () => setIsInformationPanelOpen(false), query: group.query, groupName: group.groupName })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyMenuWithVisualization.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenuWithVisualization.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"PropertyMenuWithVisualization.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenuWithVisualization.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,+CAAwC;AAExC,iDAA8C;AAC9C,yDAAsD;AACtD,wDAA2E;AAC3E,mEAAgE;AAChE,oEAA2D;AAC3D,gDAA8C;AAU9C;;;GAGG;AACI,MAAM,6BAA6B,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EAAsC,EAAE,EAAE;IAC7G,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAErF,OAAO,CACL,8BAAC,uCAAuB,IAAC,SAAS,EAAC,+BAA+B;QAChE,uCAAK,SAAS,EAAC,+BAA+B;YAC5C,8BAAC,mCAAgB,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAC,MAAM,GAAG;YACrE,8BAAC,0BAAU,IAAC,SAAS,EAAC,YAAY,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,mBAAmB;gBAC1G,8BAAC,mCAAa,OAAG,CACN,CACT;QACN,8BAAC,2BAAY,IAAC,KAAK,EAAE,KAAK,KAAM,IAAI,GAAI;QACxC,8BAAC,6CAAqB,IAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,CAClI,CAC3B,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,6BAA6B,iCAexC","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, { useState } from \"react\";\nimport type { PropertyMenuProps } from \"./PropertyMenu\";\nimport { PropertyMenu } from \"./PropertyMenu\";\nimport { GroupColorToggle } from \"./GroupColorToggle\";\nimport { IconButton, InformationPanelWrapper } from \"@itwin/itwinui-react\";\nimport { GroupInformationPanel } from \"./GroupInformationPanel\";\nimport { SvgProperties } from \"@itwin/itwinui-icons-react\";\nimport \"./PropertyMenuWithVisualization.scss\";\n\n/**\n * Properties for the {@link PropertyMenuWithVisualization} component.\n * @public\n */\nexport interface PropertyMenuWithVisualizationProps extends PropertyMenuProps {\n color: string;\n}\n\n/**\n * Component to display a property menu with visualization.\n * @public\n */\nexport const PropertyMenuWithVisualization = ({ group, color, ...rest }: PropertyMenuWithVisualizationProps) => {\n const [isInformationPanelOpen, setIsInformationPanelOpen] = useState<boolean>(false);\n\n return (\n <InformationPanelWrapper className=\"gmw-property-menu-vis-wrapper\">\n <div className=\"gmw-property-menu-vis-toolbar\">\n <GroupColorToggle group={group} color={color} labelPosition=\"left\" />\n <IconButton styleType=\"borderless\" onClick={() => setIsInformationPanelOpen(true)} title=\"Group Information\">\n <SvgProperties />\n </IconButton>\n </div>\n <PropertyMenu group={group} {...rest} />\n <GroupInformationPanel isOpen={isInformationPanelOpen} onClose={() => setIsInformationPanelOpen(false)} query={group.query} groupName={group.groupName} />\n </InformationPanelWrapper>\n );\n};\n"]}
|
|
@@ -7,5 +7,5 @@ export interface PropertyNameCellProps<T extends {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const PropertyNameCell: <T extends {
|
|
9
9
|
propertyName: string;
|
|
10
|
-
}>({ property, onClickModify
|
|
10
|
+
}>({ property, onClickModify }: PropertyNameCellProps<T>) => JSX.Element;
|
|
11
11
|
//# sourceMappingURL=PropertyNameCell.d.ts.map
|
|
@@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PropertyNameCell = void 0;
|
|
7
7
|
/*---------------------------------------------------------------------------------------------
|
|
8
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
11
|
const react_1 = __importDefault(require("react"));
|
|
12
12
|
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
13
|
-
const PropertyNameCell = ({ property, onClickModify
|
|
13
|
+
const PropertyNameCell = ({ property, onClickModify }) => onClickModify ? (react_1.default.createElement("div", { className: "iui-anchor", onClick: () => onClickModify(property) }, property.propertyName)) : (react_1.default.createElement(itwinui_react_1.Text, null, property.propertyName));
|
|
14
14
|
exports.PropertyNameCell = PropertyNameCell;
|
|
15
15
|
//# sourceMappingURL=PropertyNameCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyNameCell.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyNameCell.tsx"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"PropertyNameCell.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyNameCell.tsx"],"names":[],"mappings":";;;;;;AAAA;;;gGAGgG;AAChG,kDAA0B;AAC1B,wDAA4C;AAOrC,MAAM,gBAAgB,GAAG,CAAqC,EAAE,QAAQ,EAAE,aAAa,EAA4B,EAAE,EAAE,CAC5H,aAAa,CAAC,CAAC,CAAC,CACd,uCAAK,SAAS,EAAC,YAAY,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,IAC/D,QAAQ,CAAC,YAAY,CAClB,CACP,CAAC,CAAC,CAAC,CACF,8BAAC,oBAAI,QAAE,QAAQ,CAAC,YAAY,CAAQ,CACrC,CAAC;AAPS,QAAA,gBAAgB,oBAOzB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport { Text } from \"@itwin/itwinui-react\";\n\nexport interface PropertyNameCellProps<T extends { propertyName: string }> {\n property: T;\n onClickModify?: (value: T) => void;\n}\n\nexport const PropertyNameCell = <T extends { propertyName: string }>({ property, onClickModify }: PropertyNameCellProps<T>) =>\n onClickModify ? (\n <div className=\"iui-anchor\" onClick={() => onClickModify(property)}>\n {property.propertyName}\n </div>\n ) : (\n <Text>{property.propertyName}</Text>\n );\n"]}
|
|
@@ -28,9 +28,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.PropertyTable = void 0;
|
|
30
30
|
/*---------------------------------------------------------------------------------------------
|
|
31
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
32
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
33
|
-
*--------------------------------------------------------------------------------------------*/
|
|
31
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
32
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
33
|
+
*--------------------------------------------------------------------------------------------*/
|
|
34
34
|
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
35
35
|
const react_1 = __importStar(require("react"));
|
|
36
36
|
const DeleteModal_1 = __importDefault(require("../SharedComponents/DeleteModal"));
|
|
@@ -50,9 +50,8 @@ const PropertyTable = ({ propertyType, columnsFactory, data, isLoading, onClickA
|
|
|
50
50
|
const memoizedColumns = (0, react_1.useMemo)(() => columnsFactory(handleShowDeleteModal), [columnsFactory, handleShowDeleteModal]);
|
|
51
51
|
return (react_1.default.createElement("div", { className: "gmw-property-table-container" },
|
|
52
52
|
react_1.default.createElement(PropertyTableToolbar_1.PropertyTableToolbar, { propertyType: propertyType, onClickAddProperty: onClickAdd, refreshProperties: refreshProperties, isLoading: isLoading }),
|
|
53
|
-
react_1.default.createElement(itwinui_react_1.Table, { data: isLoading ? [] : data, density:
|
|
54
|
-
showDeleteModal &&
|
|
55
|
-
react_1.default.createElement(DeleteModal_1.default, { entityName: showDeleteModal.propertyName, onClose: handleCloseDeleteModal, onDelete: handleDeleteProperty })));
|
|
53
|
+
react_1.default.createElement(itwinui_react_1.Table, { data: isLoading ? [] : data, density: "extra-condensed", columns: memoizedColumns, emptyTableContent: `No ${propertyType} Properties`, isSortable: true, isLoading: isLoading }),
|
|
54
|
+
showDeleteModal && react_1.default.createElement(DeleteModal_1.default, { entityName: showDeleteModal.propertyName, onClose: handleCloseDeleteModal, onDelete: handleDeleteProperty })));
|
|
56
55
|
};
|
|
57
56
|
exports.PropertyTable = PropertyTable;
|
|
58
57
|
//# sourceMappingURL=PropertyTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyTable.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"PropertyTable.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,wDAA6C;AAC7C,+CAA8D;AAG9D,kFAA0D;AAC1D,iEAA8D;AAC9D,gCAA8B;AAiBvB,MAAM,aAAa,GAAG,CAA8B,EACzD,YAAY,EACZ,cAAc,EACd,IAAI,EACJ,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,cAAc,GACQ,EAAE,EAAE;IAC1B,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAgB,SAAS,CAAC,CAAC;IAEjF,MAAM,oBAAoB,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE;QAClD,MAAM,cAAc,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;IAE1C,MAAM,qBAAqB,GAAG,IAAA,mBAAW,EAAC,CAAC,QAAW,EAAE,EAAE;QACxD,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAClC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAEtH,OAAO,CACL,uCAAK,SAAS,EAAC,8BAA8B;QAC3C,8BAAC,2CAAoB,IAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,GAAI;QAChJ,8BAAC,qBAAK,IACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAC3B,OAAO,EAAC,iBAAiB,EACzB,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,YAAY,aAAa,EAClD,UAAU,QACV,SAAS,EAAE,SAAS,GACpB;QACD,eAAe,IAAI,8BAAC,qBAAW,IAAC,UAAU,EAAE,eAAe,CAAC,YAAY,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,oBAAoB,GAAI,CAC1I,CACP,CAAC;AACJ,CAAC,CAAC;AAvCW,QAAA,aAAa,iBAuCxB","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 { Table } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport type { Column } from \"react-table\";\nimport type { CreateTypeFromInterface } from \"../../common/utils\";\nimport DeleteModal from \"../SharedComponents/DeleteModal\";\nimport { PropertyTableToolbar } from \"./PropertyTableToolbar\";\nimport \"./PropertyTable.scss\";\n\nexport interface PropertyTableItem {\n propertyName: string;\n id: string;\n}\n\nexport interface PropertyTableProps<T extends PropertyTableItem> {\n propertyType: string;\n columnsFactory: (handleShowDeleteModal: (value: T) => void) => Array<Column<T>>;\n data: T[];\n isLoading: boolean;\n onClickAdd?: () => void;\n refreshProperties: () => Promise<void>;\n deleteProperty: (propertyId: string) => Promise<void>;\n}\n\nexport const PropertyTable = <T extends PropertyTableItem>({\n propertyType,\n columnsFactory,\n data,\n isLoading,\n onClickAdd,\n refreshProperties,\n deleteProperty,\n}: PropertyTableProps<T>) => {\n const [showDeleteModal, setShowDeleteModal] = useState<T | undefined>(undefined);\n\n const handleDeleteProperty = useCallback(async () => {\n await deleteProperty(showDeleteModal?.id ?? \"\");\n }, [deleteProperty, showDeleteModal?.id]);\n\n const handleShowDeleteModal = useCallback((property: T) => {\n setShowDeleteModal(property);\n }, []);\n\n const handleCloseDeleteModal = () => {\n setShowDeleteModal(undefined);\n };\n\n const memoizedColumns = useMemo(() => columnsFactory(handleShowDeleteModal), [columnsFactory, handleShowDeleteModal]);\n\n return (\n <div className=\"gmw-property-table-container\">\n <PropertyTableToolbar propertyType={propertyType} onClickAddProperty={onClickAdd} refreshProperties={refreshProperties} isLoading={isLoading} />\n <Table<CreateTypeFromInterface<T>>\n data={isLoading ? [] : data}\n density=\"extra-condensed\"\n columns={memoizedColumns}\n emptyTableContent={`No ${propertyType} Properties`}\n isSortable\n isLoading={isLoading}\n />\n {showDeleteModal && <DeleteModal entityName={showDeleteModal.propertyName} onClose={handleCloseDeleteModal} onDelete={handleDeleteProperty} />}\n </div>\n );\n};\n"]}
|
|
@@ -6,5 +6,5 @@ export interface PropertyTableToolbarProps {
|
|
|
6
6
|
refreshProperties: () => void;
|
|
7
7
|
isLoading: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const PropertyTableToolbar: ({ propertyType, onClickAddProperty, refreshProperties, isLoading
|
|
9
|
+
export declare const PropertyTableToolbar: ({ propertyType, onClickAddProperty, refreshProperties, isLoading }: PropertyTableToolbarProps) => JSX.Element;
|
|
10
10
|
//# sourceMappingURL=PropertyTableToolbar.d.ts.map
|
|
@@ -5,14 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PropertyTableToolbar = void 0;
|
|
7
7
|
/*---------------------------------------------------------------------------------------------
|
|
8
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
11
|
const react_1 = __importDefault(require("react"));
|
|
12
12
|
const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
|
|
13
13
|
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
14
14
|
require("./PropertyTableToolbar.scss");
|
|
15
|
-
const PropertyTableToolbar = ({ propertyType, onClickAddProperty, refreshProperties, isLoading
|
|
15
|
+
const PropertyTableToolbar = ({ propertyType, onClickAddProperty, refreshProperties, isLoading }) => (react_1.default.createElement("div", { className: "gmw-property-table-toolbar" },
|
|
16
16
|
onClickAddProperty && (react_1.default.createElement(itwinui_react_1.Button, { startIcon: react_1.default.createElement(itwinui_icons_react_1.SvgAdd, null), styleType: "high-visibility", onClick: onClickAddProperty },
|
|
17
17
|
"Add ",
|
|
18
18
|
propertyType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyTableToolbar.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTableToolbar.tsx"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"PropertyTableToolbar.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTableToolbar.tsx"],"names":[],"mappings":";;;;;;AAAA;;;gGAGgG;AAChG,kDAA0B;AAC1B,oEAAgE;AAChE,wDAA0D;AAC1D,uCAAqC;AAS9B,MAAM,oBAAoB,GAAG,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,SAAS,EAA6B,EAAE,EAAE,CAAC,CACrI,uCAAK,SAAS,EAAC,4BAA4B;IACxC,kBAAkB,IAAI,CACrB,8BAAC,sBAAM,IAAC,SAAS,EAAE,8BAAC,4BAAM,OAAG,EAAE,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,kBAAkB;;QAC/E,YAAY;oBACV,CACV;IACD,8BAAC,0BAAU,IAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAC,mCAAmC,EAAC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAC,YAAY;QAC/I,8BAAC,gCAAU,OAAG,CACH,CACT,CACP,CAAC;AAXW,QAAA,oBAAoB,wBAW/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport { SvgAdd, SvgRefresh } from \"@itwin/itwinui-icons-react\";\nimport { Button, IconButton } from \"@itwin/itwinui-react\";\nimport \"./PropertyTableToolbar.scss\";\n\nexport interface PropertyTableToolbarProps {\n propertyType: string;\n onClickAddProperty?: () => void;\n refreshProperties: () => void;\n isLoading: boolean;\n}\n\nexport const PropertyTableToolbar = ({ propertyType, onClickAddProperty, refreshProperties, isLoading }: PropertyTableToolbarProps) => (\n <div className=\"gmw-property-table-toolbar\">\n {onClickAddProperty && (\n <Button startIcon={<SvgAdd />} styleType=\"high-visibility\" onClick={onClickAddProperty}>\n Add {propertyType} Property\n </Button>\n )}\n <IconButton title=\"Refresh\" className=\"gmw-property-table-refresh-button\" onClick={refreshProperties} disabled={isLoading} styleType=\"borderless\">\n <SvgRefresh />\n </IconButton>\n </div>\n);\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { PropertyMap } from "../../../formula/Types";
|
|
1
|
+
import type { DataType, PropertyMap } from "../../../formula/Types";
|
|
2
2
|
export declare function useFormulaValidation(formulaName: string, formula: string, properties: PropertyMap, setFormulaErrorMessage: (s: string) => void): {
|
|
3
3
|
isValid: boolean;
|
|
4
|
+
inferredDataType: DataType | undefined;
|
|
4
5
|
forceValidation: () => boolean;
|
|
5
6
|
};
|
|
6
7
|
//# sourceMappingURL=useFormulaValidation.d.ts.map
|
|
@@ -2,28 +2,32 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFormulaValidation = void 0;
|
|
4
4
|
/*---------------------------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const FormulaDataTypeResolver_1 = require("../../../formula/FormulaDataTypeResolver");
|
|
10
10
|
const utils_1 = require("../../../common/utils");
|
|
11
|
-
function validate(formulaName, formula, properties, setFormulaErrorMessage, setIsValid) {
|
|
11
|
+
function validate(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType) {
|
|
12
12
|
if (!formula) {
|
|
13
13
|
setFormulaErrorMessage("");
|
|
14
14
|
setIsValid(false);
|
|
15
|
+
setDataType(undefined);
|
|
15
16
|
return false;
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
+
const resolveFormulaType = (0, FormulaDataTypeResolver_1.resolveFormulaDataType)(formulaName, formula, properties);
|
|
19
|
+
const error = resolveFormulaType.errorMessage ?? "";
|
|
18
20
|
setFormulaErrorMessage(error);
|
|
19
21
|
setIsValid(!error);
|
|
22
|
+
setDataType(resolveFormulaType.value);
|
|
20
23
|
return !error;
|
|
21
24
|
}
|
|
22
25
|
const debouncedValidationFunc = (0, utils_1.debounce)(validate, 5000);
|
|
23
26
|
function useFormulaValidation(formulaName, formula, properties, setFormulaErrorMessage) {
|
|
24
27
|
const [isValid, setIsValid] = (0, react_1.useState)(false);
|
|
25
|
-
(0, react_1.
|
|
26
|
-
|
|
28
|
+
const [inferredDataType, setDataType] = (0, react_1.useState)(undefined);
|
|
29
|
+
(0, react_1.useEffect)(() => debouncedValidationFunc(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType), [formulaName, formula, properties, setFormulaErrorMessage]);
|
|
30
|
+
return { isValid, inferredDataType, forceValidation: () => validate(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType) };
|
|
27
31
|
}
|
|
28
32
|
exports.useFormulaValidation = useFormulaValidation;
|
|
29
33
|
//# sourceMappingURL=useFormulaValidation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormulaValidation.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useFormulaValidation.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"useFormulaValidation.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useFormulaValidation.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG,iCAA4C;AAC5C,sFAAkF;AAElF,iDAAiD;AAEjD,SAAS,QAAQ,CACf,WAAmB,EACnB,OAAe,EACf,UAAuB,EACvB,sBAA2C,EAC3C,UAAgC,EAChC,WAA6D;IAE7D,IAAI,CAAC,OAAO,EAAE;QACZ,sBAAsB,CAAC,EAAE,CAAC,CAAC;QAC3B,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,WAAW,CAAC,SAAS,CAAC,CAAC;QACvB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,kBAAkB,GAAG,IAAA,gDAAsB,EAAC,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACpF,MAAM,KAAK,GAAG,kBAAkB,CAAC,YAAY,IAAI,EAAE,CAAC;IACpD,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC9B,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC;IACnB,WAAW,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,KAAK,CAAC;AAChB,CAAC;AAED,MAAM,uBAAuB,GAAG,IAAA,gBAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAEzD,SAAgB,oBAAoB,CAAC,WAAmB,EAAE,OAAe,EAAE,UAAuB,EAAE,sBAA2C;IAC7I,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAuB,SAAS,CAAC,CAAC;IAClF,IAAA,iBAAS,EACP,GAAG,EAAE,CAAC,uBAAuB,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,UAAU,EAAE,WAAW,CAAC,EAChH,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,CAAC,CAC3D,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC;AAC3J,CAAC;AARD,oDAQC","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 { useEffect, useState } from \"react\";\nimport { resolveFormulaDataType } from \"../../../formula/FormulaDataTypeResolver\";\nimport type { DataType, PropertyMap } from \"../../../formula/Types\";\nimport { debounce } from \"../../../common/utils\";\n\nfunction validate(\n formulaName: string,\n formula: string,\n properties: PropertyMap,\n setFormulaErrorMessage: (s: string) => void,\n setIsValid: (b: boolean) => void,\n setDataType: (inferredDataType: DataType | undefined) => void,\n): boolean {\n if (!formula) {\n setFormulaErrorMessage(\"\");\n setIsValid(false);\n setDataType(undefined);\n return false;\n }\n\n const resolveFormulaType = resolveFormulaDataType(formulaName, formula, properties);\n const error = resolveFormulaType.errorMessage ?? \"\";\n setFormulaErrorMessage(error);\n setIsValid(!error);\n setDataType(resolveFormulaType.value);\n return !error;\n}\n\nconst debouncedValidationFunc = debounce(validate, 5000);\n\nexport function useFormulaValidation(formulaName: string, formula: string, properties: PropertyMap, setFormulaErrorMessage: (s: string) => void) {\n const [isValid, setIsValid] = useState(false);\n const [inferredDataType, setDataType] = useState<DataType | undefined>(undefined);\n useEffect(\n () => debouncedValidationFunc(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType),\n [formulaName, formula, properties, setFormulaErrorMessage],\n );\n return { isValid, inferredDataType, forceValidation: () => validate(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType) };\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IPropertiesClient } from "@itwin/insights-client";
|
|
2
|
+
import type { GetAccessTokenFn } from "../../context/GroupingApiConfigContext";
|
|
3
|
+
export declare const usePropertiesQuery: (iModelId: string, mappingId: string, groupId: string, getAccessToken: GetAccessTokenFn, propertiesClient: IPropertiesClient) => import("@tanstack/react-query").UseQueryResult<import("@itwin/insights-client").PropertyList, unknown>;
|
|
4
|
+
//# sourceMappingURL=usePropertiesQuery.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePropertiesQuery = void 0;
|
|
4
|
+
const react_query_1 = require("@tanstack/react-query");
|
|
5
|
+
const usePropertiesQuery = (iModelId, mappingId, groupId, getAccessToken, propertiesClient) => {
|
|
6
|
+
return (0, react_query_1.useQuery)({
|
|
7
|
+
queryKey: ["properties", iModelId, mappingId, groupId],
|
|
8
|
+
queryFn: async () => propertiesClient.getProperties(await getAccessToken(), mappingId, groupId),
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
exports.usePropertiesQuery = usePropertiesQuery;
|
|
12
|
+
//# sourceMappingURL=usePropertiesQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePropertiesQuery.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/usePropertiesQuery.ts"],"names":[],"mappings":";;;AAKA,uDAAiD;AAG1C,MAAM,kBAAkB,GAAG,CAChC,QAAgB,EAChB,SAAiB,EACjB,OAAe,EACf,cAAgC,EAChC,gBAAmC,EACnC,EAAE;IACF,OAAO,IAAA,sBAAQ,EAAC;QACd,QAAQ,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;QACtD,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB,CAAC,aAAa,CAAC,MAAM,cAAc,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC;KAChG,CAAC,CAAC;AACL,CAAC,CAAC;AAXW,QAAA,kBAAkB,sBAW7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { IPropertiesClient } from \"@itwin/insights-client\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport type { GetAccessTokenFn } from \"../../context/GroupingApiConfigContext\";\n\nexport const usePropertiesQuery = (\n iModelId: string,\n mappingId: string,\n groupId: string,\n getAccessToken: GetAccessTokenFn,\n propertiesClient: IPropertiesClient,\n) => {\n return useQuery({\n queryKey: [\"properties\", iModelId, mappingId, groupId],\n queryFn: async () => propertiesClient.getProperties(await getAccessToken(), mappingId, groupId),\n });\n};\n"]}
|
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Messages = exports.NAME_REQUIREMENTS = exports.Validators = void 0;
|
|
7
7
|
/*---------------------------------------------------------------------------------------------
|
|
8
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
11
|
const react_1 = require("react");
|
|
12
12
|
const simple_react_validator_1 = __importDefault(require("simple-react-validator"));
|
|
13
13
|
exports.Validators = {
|
|
@@ -27,7 +27,7 @@ exports.Validators = {
|
|
|
27
27
|
FollowedByLettersUnderscoresAndDigits: {
|
|
28
28
|
message: "Name can only contain letters, underscores, or digits",
|
|
29
29
|
rule: (val) => {
|
|
30
|
-
const regexPattern = new RegExp(
|
|
30
|
+
const regexPattern = new RegExp(/^[\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]+$/u);
|
|
31
31
|
return regexPattern.test(val);
|
|
32
32
|
},
|
|
33
33
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidator.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useValidator.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"useValidator.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useValidator.ts"],"names":[],"mappings":";;;;;;AAAA;;;gGAGgG;AAChG,iCAAiC;AACjC,oFAA0D;AAE7C,QAAA,UAAU,GAAG;IACxB,qBAAqB,EAAE;QACrB,OAAO,EAAE,sBAAsB;QAC/B,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE;YACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;KACF;IACD,gCAAgC,EAAE;QAChC,OAAO,EAAE,kDAAkD;QAC3D,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE;YACpB,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;YACrD,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;KACF;IACD,qCAAqC,EAAE;QACrC,OAAO,EAAE,uDAAuD;QAChE,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE;YACpB,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,iDAAiD,CAAC,CAAC;YACnF,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;KACF;IACD,SAAS,EAAE;QACT,OAAO,EAAE,kCAAkC;QAC3C,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE;YACpB,OAAO,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC;QAC3B,CAAC;KACF;CACF,CAAC;AAEW,QAAA,iBAAiB,GAAG,iHAAiH,CAAC;AAEtI,QAAA,QAAQ,GAAG,EAAE,QAAQ,EAAE,yBAAyB,EAAE,CAAC;AAEhE,MAAM,YAAY,GAAG,CAAC,aAAa,GAAG,gBAAQ,EAAE,eAAe,GAAG,kBAAU,EAAyE,EAAE;IACrJ,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,IAAI,gCAAoB,CAAC;QACzC,QAAQ,EAAE,aAAa;QACvB,UAAU,EAAE,eAAe;KAC5B,CAAC,CAAC;IAEH,IAAI,IAAI,EAAE;QACR,SAAS,CAAC,YAAY,EAAE,CAAC;KAC1B;IAED,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { useState } from \"react\";\nimport SimpleReactValidator from \"simple-react-validator\";\n\nexport const Validators = {\n NoDuplicateUnderscore: {\n message: 'Remove duplicate \"_\"',\n rule: (val: string) => {\n return !val.match(/__+/i);\n },\n },\n OnlyBeginsWithLetterOrUnderscore: {\n message: \"Name can only start with a letter or underscore.\",\n rule: (val: string) => {\n const regexPattern = new RegExp(/^[\\p{L}\\p{Nl}_]+/u);\n return regexPattern.test(val);\n },\n },\n FollowedByLettersUnderscoresAndDigits: {\n message: \"Name can only contain letters, underscores, or digits\",\n rule: (val: string) => {\n const regexPattern = new RegExp(/^[\\p{L}\\p{Nl}\\p{Nd}\\p{Mn}\\p{Mc}\\p{Pc}\\p{Cf}]+$/u);\n return regexPattern.test(val);\n },\n },\n CharLimit: {\n message: \"There is an 128 character limit.\",\n rule: (val: string) => {\n return val.length <= 128;\n },\n },\n};\n\nexport const NAME_REQUIREMENTS = \"required|NoDuplicateUnderscore|OnlyBeginsWithLetterOrUnderscore|FollowedByLettersUnderscoresAndDigits|CharLimit\";\n\nexport const Messages = { required: \"This field is required.\" };\n\nconst useValidator = (customMessage = Messages, customValidator = Validators): [SimpleReactValidator, React.Dispatch<React.SetStateAction<boolean>>] => {\n const [show, setShow] = useState(false);\n const validator = new SimpleReactValidator({\n messages: customMessage,\n validators: customValidator,\n });\n\n if (show) {\n validator.showMessages();\n }\n\n return [validator, setShow];\n};\n\nexport default useValidator;\n"]}
|