@itwin/grouping-mapping-widget 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -9
- package/README.md +115 -115
- package/lib/cjs/WidgetShell/GroupingMapping.js +2 -4
- package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingContent.js +4 -4
- package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingHeader.d.ts +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingHeader.js +5 -5
- package/lib/cjs/WidgetShell/GroupingMappingHeader.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js +1 -3
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -1
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +29 -23
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
- package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
- package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
- package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
- package/lib/cjs/common/hooks/useIsMounted.js +3 -3
- package/lib/cjs/common/hooks/useIsMounted.js.map +1 -1
- package/lib/cjs/common/hooks/useMemoizedCollectionPick.js +3 -3
- package/lib/cjs/common/hooks/useMemoizedCollectionPick.js.map +1 -1
- package/lib/cjs/common/utils.js +3 -3
- package/lib/cjs/common/utils.js.map +1 -1
- package/lib/cjs/common/viewerUtils.js +2 -2
- package/lib/cjs/common/viewerUtils.js.map +1 -1
- package/lib/cjs/components/Constants.js +4 -4
- package/lib/cjs/components/Constants.js.map +1 -1
- package/lib/cjs/components/GroupingMappingContext.js +13 -4
- package/lib/cjs/components/GroupingMappingContext.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupAction.js +7 -9
- package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetails.d.ts +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetails.js +5 -7
- package/lib/cjs/components/Groups/Editing/GroupDetails.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js +4 -4
- package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
- package/lib/cjs/components/Groups/GroupColorLegend.js +3 -3
- package/lib/cjs/components/Groups/GroupColorLegend.js.map +1 -1
- package/lib/cjs/components/Groups/GroupListItem.js +3 -4
- package/lib/cjs/components/Groups/GroupListItem.js.map +1 -1
- package/lib/cjs/components/Groups/GroupListItem.scss +2 -2
- package/lib/cjs/components/Groups/GroupMenuActions.js +17 -6
- package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -1
- package/lib/cjs/components/Groups/GroupOverlapProgressBar.js.map +1 -1
- package/lib/cjs/components/Groups/Groups.js +3 -3
- package/lib/cjs/components/Groups/Groups.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsAddButton.d.ts +1 -1
- package/lib/cjs/components/Groups/GroupsAddButton.js +4 -4
- package/lib/cjs/components/Groups/GroupsAddButton.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsAddButton.scss +1 -1
- package/lib/cjs/components/Groups/GroupsShowHideButtons.d.ts +1 -1
- package/lib/cjs/components/Groups/GroupsShowHideButtons.js +2 -2
- package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsView.js +8 -10
- package/lib/cjs/components/Groups/GroupsView.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsView.scss +1 -1
- package/lib/cjs/components/Groups/GroupsVisualization.js +19 -20
- package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsVisualizationActions.js +4 -4
- package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -1
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.d.ts +1 -1
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js +4 -4
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
- package/lib/cjs/components/Groups/ToggleGroupVisibility.js +3 -3
- package/lib/cjs/components/Groups/ToggleGroupVisibility.js.map +1 -1
- package/lib/cjs/components/Groups/groupsHelpers.js +8 -4
- package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useFetchGroups.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +1 -1
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js +5 -5
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.d.ts +1 -1
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useVisualization.js +2 -4
- package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -1
- package/lib/cjs/components/Mappings/BlockingOverlay.js +3 -3
- package/lib/cjs/components/Mappings/BlockingOverlay.js.map +1 -1
- package/lib/cjs/components/Mappings/Editing/MappingAction.js +11 -15
- package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +9 -6
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
- package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js +9 -9
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js +26 -30
- package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +3 -3
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectIModel.d.ts +1 -1
- package/lib/cjs/components/Mappings/Import/SelectIModel.js +5 -5
- package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectITwin.js +2 -2
- package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectITwin.scss +1 -1
- package/lib/cjs/components/Mappings/Import/SelectMappings.d.ts +1 -1
- package/lib/cjs/components/Mappings/Import/SelectMappings.js +7 -7
- package/lib/cjs/components/Mappings/Import/SelectMappings.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingListItem.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingViewActionGroup.d.ts +1 -1
- package/lib/cjs/components/Mappings/MappingViewActionGroup.js +6 -7
- package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -1
- package/lib/cjs/components/Mappings/Mappings.js +3 -3
- package/lib/cjs/components/Mappings/Mappings.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingsView.js +14 -16
- package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js +3 -1
- package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js +3 -3
- package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappings.js +1 -1
- package/lib/cjs/components/Mappings/hooks/useFetchMappings.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js +36 -18
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.d.ts +1 -1
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.js +8 -6
- package/lib/cjs/components/Mappings/hooks/useRunExtraction.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +3 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +10 -9
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +7 -8
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +24 -66
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +5 -9
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +6 -17
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +8 -9
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +20 -161
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.scss +5 -4
- package/lib/cjs/components/Properties/GroupColorToggle.js +4 -4
- package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/cjs/components/Properties/GroupInformationPanel.js +3 -3
- package/lib/cjs/components/Properties/GroupInformationPanel.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +90 -40
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.scss +3 -2
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.d.ts +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +24 -14
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js +20 -39
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +20 -29
- package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
- package/lib/cjs/components/Properties/GroupProperties/SaveModal.js +7 -7
- package/lib/cjs/components/Properties/GroupProperties/SaveModal.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyAction.js +9 -21
- package/lib/cjs/components/Properties/PropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyMenu.d.ts +1 -1
- package/lib/cjs/components/Properties/PropertyMenu.js +5 -10
- package/lib/cjs/components/Properties/PropertyMenu.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js +5 -5
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyNameCell.d.ts +1 -1
- package/lib/cjs/components/Properties/PropertyNameCell.js +4 -4
- package/lib/cjs/components/Properties/PropertyNameCell.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyTable.js +5 -6
- package/lib/cjs/components/Properties/PropertyTable.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyTableToolbar.d.ts +1 -1
- package/lib/cjs/components/Properties/PropertyTableToolbar.js +4 -4
- package/lib/cjs/components/Properties/PropertyTableToolbar.js.map +1 -1
- package/lib/cjs/components/Properties/ScrollableExpandableBlock.d.ts +11 -0
- package/lib/cjs/components/Properties/ScrollableExpandableBlock.js +55 -0
- package/lib/cjs/components/Properties/ScrollableExpandableBlock.js.map +1 -0
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.d.ts +6 -3
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +62 -16
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -1
- package/lib/cjs/components/Properties/hooks/useForwardRef.d.ts +3 -0
- package/lib/cjs/components/Properties/hooks/useForwardRef.js +20 -0
- package/lib/cjs/components/Properties/hooks/useForwardRef.js.map +1 -0
- package/lib/cjs/components/Properties/hooks/usePropertiesQuery.js.map +1 -1
- package/lib/cjs/components/Properties/hooks/useValidator.js +4 -4
- package/lib/cjs/components/Properties/hooks/useValidator.js.map +1 -1
- package/lib/cjs/components/SharedComponents/ActionPanel.d.ts +3 -1
- package/lib/cjs/components/SharedComponents/ActionPanel.js +9 -10
- package/lib/cjs/components/SharedComponents/ActionPanel.js.map +1 -1
- package/lib/cjs/components/SharedComponents/DeleteModal.d.ts +1 -1
- package/lib/cjs/components/SharedComponents/DeleteModal.js +9 -10
- package/lib/cjs/components/SharedComponents/DeleteModal.js.map +1 -1
- package/lib/cjs/components/SharedComponents/EmptyMessage.js +4 -4
- package/lib/cjs/components/SharedComponents/EmptyMessage.js.map +1 -1
- package/lib/cjs/components/SharedComponents/LoadingOverlay.js +4 -4
- package/lib/cjs/components/SharedComponents/LoadingOverlay.js.map +1 -1
- package/lib/cjs/components/SharedComponents/LoadingSpinner.js +3 -3
- package/lib/cjs/components/SharedComponents/LoadingSpinner.js.map +1 -1
- package/lib/cjs/components/SharedComponents/StatusIcon.js +3 -3
- package/lib/cjs/components/SharedComponents/StatusIcon.js.map +1 -1
- package/lib/cjs/components/context/ExtractionClientContext.js.map +1 -1
- package/lib/cjs/components/context/ExtractionStateJobContext.js +3 -3
- package/lib/cjs/components/context/ExtractionStateJobContext.js.map +1 -1
- package/lib/cjs/components/context/GroupHilitedElementsContext.js +3 -3
- package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -1
- package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -1
- package/lib/cjs/components/context/GroupingMappingCustomUIContext.js +3 -3
- package/lib/cjs/components/context/GroupingMappingCustomUIContext.js.map +1 -1
- package/lib/cjs/components/context/GroupsClientContext.js.map +1 -1
- package/lib/cjs/components/context/IModelsClientContext.js.map +1 -1
- package/lib/cjs/components/context/ITwinsClientContext.js +3 -3
- package/lib/cjs/components/context/ITwinsClientContext.js.map +1 -1
- package/lib/cjs/components/context/MappingClientContext.js.map +1 -1
- package/lib/cjs/components/context/PropertiesClientContext.js.map +1 -1
- package/lib/cjs/components/context/PropertiesGroupColorContext.js +3 -3
- package/lib/cjs/components/context/PropertiesGroupColorContext.js.map +1 -1
- package/lib/cjs/components/context/PropertyGridWrapperContext.js +3 -3
- package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -1
- package/lib/cjs/components/customUI/DefaultGroupingUI.js +3 -3
- package/lib/cjs/components/customUI/DefaultGroupingUI.js.map +1 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +13 -18
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.d.ts +1 -1
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.js +8 -8
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.d.ts +1 -1
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.js +16 -45
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.js.map +1 -1
- package/lib/cjs/decorators/BboxDimensionsDecorator.js +3 -10
- package/lib/cjs/decorators/BboxDimensionsDecorator.js.map +1 -1
- package/lib/cjs/formula/FormulaDataTypeResolver.d.ts +3 -2
- package/lib/cjs/formula/FormulaDataTypeResolver.js +10 -6
- package/lib/cjs/formula/FormulaDataTypeResolver.js.map +1 -1
- package/lib/cjs/formula/FormulaFunctionProvider.js +146 -65
- package/lib/cjs/formula/FormulaFunctionProvider.js.map +1 -1
- package/lib/cjs/formula/FormulaOperatorsProvider.js +138 -44
- package/lib/cjs/formula/FormulaOperatorsProvider.js.map +1 -1
- package/lib/cjs/formula/FormulaSplitter.js +63 -13
- package/lib/cjs/formula/FormulaSplitter.js.map +1 -1
- package/lib/cjs/formula/FormulaTokensDataTypeResolver.js +7 -14
- package/lib/cjs/formula/FormulaTokensDataTypeResolver.js.map +1 -1
- package/lib/cjs/formula/IResult.js.map +1 -1
- package/lib/cjs/formula/InfixToPostfixConverter.js +4 -4
- package/lib/cjs/formula/InfixToPostfixConverter.js.map +1 -1
- package/lib/cjs/formula/InputStream.js +3 -3
- package/lib/cjs/formula/InputStream.js.map +1 -1
- package/lib/cjs/formula/ParenthesisValidator.js +3 -3
- package/lib/cjs/formula/ParenthesisValidator.js.map +1 -1
- package/lib/cjs/formula/Queue.js +3 -3
- package/lib/cjs/formula/Queue.js.map +1 -1
- package/lib/cjs/formula/Stack.js +3 -3
- package/lib/cjs/formula/Stack.js.map +1 -1
- package/lib/cjs/formula/StringBuilder.js +3 -3
- package/lib/cjs/formula/StringBuilder.js.map +1 -1
- package/lib/cjs/formula/Types.js.map +1 -1
- package/lib/cjs/formula/Utils.js +4 -4
- package/lib/cjs/formula/Utils.js.map +1 -1
- package/lib/cjs/grouping-mapping-widget.d.ts +3 -5
- package/lib/cjs/grouping-mapping-widget.js +4 -8
- package/lib/cjs/grouping-mapping-widget.js.map +1 -1
- package/lib/cjs/test/GroupPropertyUtils.test.js +27 -26
- package/lib/cjs/test/GroupPropertyUtils.test.js.map +1 -1
- package/lib/cjs/test/GroupingMappingCustomUI.test.js +4 -6
- package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/cjs/test/MockFactory.js +3 -3
- package/lib/cjs/test/MockFactory.js.map +1 -1
- package/lib/cjs/test/PropertyFieldsHelpers.js +3 -3
- package/lib/cjs/test/PropertyFieldsHelpers.js.map +1 -1
- package/lib/cjs/test/QueryBuilder.test.js +3 -3
- package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
- package/lib/cjs/test/QueryBuilder.testdata.js +3 -3
- package/lib/cjs/test/QueryBuilder.testdata.js.map +1 -1
- package/lib/cjs/test/QueryBuilderTestData.js.map +1 -1
- package/lib/cjs/test/WidgetHeader.test.js +3 -3
- package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
- package/lib/cjs/test/test-utils.js +4 -4
- package/lib/cjs/test/test-utils.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMapping.js +3 -5
- package/lib/esm/WidgetShell/GroupingMapping.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMappingContent.js +4 -4
- package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMappingHeader.d.ts +1 -1
- package/lib/esm/WidgetShell/GroupingMappingHeader.js +5 -5
- package/lib/esm/WidgetShell/GroupingMappingHeader.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMappingWidget.js +2 -4
- package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -1
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +29 -23
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
- package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
- package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
- package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
- package/lib/esm/common/hooks/useIsMounted.js +3 -3
- package/lib/esm/common/hooks/useIsMounted.js.map +1 -1
- package/lib/esm/common/hooks/useMemoizedCollectionPick.js +3 -3
- package/lib/esm/common/hooks/useMemoizedCollectionPick.js.map +1 -1
- package/lib/esm/common/utils.js +3 -3
- package/lib/esm/common/utils.js.map +1 -1
- package/lib/esm/common/viewerUtils.js +2 -2
- package/lib/esm/common/viewerUtils.js.map +1 -1
- package/lib/esm/components/Constants.js +4 -4
- package/lib/esm/components/Constants.js.map +1 -1
- package/lib/esm/components/GroupingMappingContext.js +14 -5
- package/lib/esm/components/GroupingMappingContext.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupAction.js +8 -10
- package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetails.d.ts +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetails.js +5 -7
- package/lib/esm/components/Groups/Editing/GroupDetails.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsStep.js +4 -4
- package/lib/esm/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
- package/lib/esm/components/Groups/GroupColorLegend.js +3 -3
- package/lib/esm/components/Groups/GroupColorLegend.js.map +1 -1
- package/lib/esm/components/Groups/GroupListItem.js +3 -4
- package/lib/esm/components/Groups/GroupListItem.js.map +1 -1
- package/lib/esm/components/Groups/GroupListItem.scss +2 -2
- package/lib/esm/components/Groups/GroupMenuActions.js +17 -6
- package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -1
- package/lib/esm/components/Groups/GroupOverlapProgressBar.js.map +1 -1
- package/lib/esm/components/Groups/Groups.js +3 -3
- package/lib/esm/components/Groups/Groups.js.map +1 -1
- package/lib/esm/components/Groups/GroupsAddButton.d.ts +1 -1
- package/lib/esm/components/Groups/GroupsAddButton.js +4 -4
- package/lib/esm/components/Groups/GroupsAddButton.js.map +1 -1
- package/lib/esm/components/Groups/GroupsAddButton.scss +1 -1
- package/lib/esm/components/Groups/GroupsShowHideButtons.d.ts +1 -1
- package/lib/esm/components/Groups/GroupsShowHideButtons.js +2 -2
- package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -1
- package/lib/esm/components/Groups/GroupsView.js +10 -12
- package/lib/esm/components/Groups/GroupsView.js.map +1 -1
- package/lib/esm/components/Groups/GroupsView.scss +1 -1
- package/lib/esm/components/Groups/GroupsVisualization.js +21 -22
- package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/esm/components/Groups/GroupsVisualizationActions.js +4 -4
- package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -1
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.d.ts +1 -1
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js +5 -5
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
- package/lib/esm/components/Groups/ToggleGroupVisibility.js +3 -3
- package/lib/esm/components/Groups/ToggleGroupVisibility.js.map +1 -1
- package/lib/esm/components/Groups/groupsHelpers.js +9 -5
- package/lib/esm/components/Groups/groupsHelpers.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useFetchGroups.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +1 -1
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js +5 -5
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.d.ts +1 -1
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useVisualization.js +3 -5
- package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -1
- package/lib/esm/components/Mappings/BlockingOverlay.js +3 -3
- package/lib/esm/components/Mappings/BlockingOverlay.js.map +1 -1
- package/lib/esm/components/Mappings/Editing/MappingAction.js +11 -15
- package/lib/esm/components/Mappings/Editing/MappingAction.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js +9 -6
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
- package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js +9 -9
- package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
- package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
- package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js +27 -31
- package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js +3 -3
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectIModel.d.ts +1 -1
- package/lib/esm/components/Mappings/Import/SelectIModel.js +5 -5
- package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectITwin.js +2 -2
- package/lib/esm/components/Mappings/Import/SelectITwin.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectITwin.scss +1 -1
- package/lib/esm/components/Mappings/Import/SelectMappings.d.ts +1 -1
- package/lib/esm/components/Mappings/Import/SelectMappings.js +8 -8
- package/lib/esm/components/Mappings/Import/SelectMappings.js.map +1 -1
- package/lib/esm/components/Mappings/MappingListItem.js.map +1 -1
- package/lib/esm/components/Mappings/MappingViewActionGroup.d.ts +1 -1
- package/lib/esm/components/Mappings/MappingViewActionGroup.js +8 -9
- package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -1
- package/lib/esm/components/Mappings/Mappings.js +3 -3
- package/lib/esm/components/Mappings/Mappings.js.map +1 -1
- package/lib/esm/components/Mappings/MappingsView.js +16 -18
- package/lib/esm/components/Mappings/MappingsView.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js +3 -1
- package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js +3 -3
- package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappings.js +1 -1
- package/lib/esm/components/Mappings/hooks/useFetchMappings.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.js +36 -18
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
- package/lib/esm/components/Mappings/hooks/useRunExtraction.d.ts +1 -1
- package/lib/esm/components/Mappings/hooks/useRunExtraction.js +8 -6
- package/lib/esm/components/Mappings/hooks/useRunExtraction.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +3 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +11 -10
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +7 -8
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +27 -66
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +5 -9
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +8 -19
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +8 -9
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js +21 -139
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.scss +5 -4
- package/lib/esm/components/Properties/GroupColorToggle.js +4 -4
- package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/esm/components/Properties/GroupInformationPanel.js +3 -3
- package/lib/esm/components/Properties/GroupInformationPanel.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +94 -44
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.scss +3 -2
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.d.ts +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js +26 -16
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js +21 -40
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +26 -35
- package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
- package/lib/esm/components/Properties/GroupProperties/SaveModal.js +8 -8
- package/lib/esm/components/Properties/GroupProperties/SaveModal.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
- package/lib/esm/components/Properties/PropertyAction.js +9 -21
- package/lib/esm/components/Properties/PropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/PropertyMenu.d.ts +1 -1
- package/lib/esm/components/Properties/PropertyMenu.js +5 -10
- package/lib/esm/components/Properties/PropertyMenu.js.map +1 -1
- package/lib/esm/components/Properties/PropertyMenuWithVisualization.js +5 -5
- package/lib/esm/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
- package/lib/esm/components/Properties/PropertyNameCell.d.ts +1 -1
- package/lib/esm/components/Properties/PropertyNameCell.js +4 -4
- package/lib/esm/components/Properties/PropertyNameCell.js.map +1 -1
- package/lib/esm/components/Properties/PropertyTable.js +5 -6
- package/lib/esm/components/Properties/PropertyTable.js.map +1 -1
- package/lib/esm/components/Properties/PropertyTableToolbar.d.ts +1 -1
- package/lib/esm/components/Properties/PropertyTableToolbar.js +4 -4
- package/lib/esm/components/Properties/PropertyTableToolbar.js.map +1 -1
- package/lib/esm/components/Properties/ScrollableExpandableBlock.d.ts +11 -0
- package/lib/esm/components/Properties/ScrollableExpandableBlock.js +29 -0
- package/lib/esm/components/Properties/ScrollableExpandableBlock.js.map +1 -0
- package/lib/esm/components/Properties/hooks/useFormulaValidation.d.ts +6 -3
- package/lib/esm/components/Properties/hooks/useFormulaValidation.js +60 -15
- package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -1
- package/lib/esm/components/Properties/hooks/useForwardRef.d.ts +3 -0
- package/lib/esm/components/Properties/hooks/useForwardRef.js +16 -0
- package/lib/esm/components/Properties/hooks/useForwardRef.js.map +1 -0
- package/lib/esm/components/Properties/hooks/usePropertiesQuery.js.map +1 -1
- package/lib/esm/components/Properties/hooks/useValidator.js +4 -4
- package/lib/esm/components/Properties/hooks/useValidator.js.map +1 -1
- package/lib/esm/components/SharedComponents/ActionPanel.d.ts +3 -1
- package/lib/esm/components/SharedComponents/ActionPanel.js +9 -10
- package/lib/esm/components/SharedComponents/ActionPanel.js.map +1 -1
- package/lib/esm/components/SharedComponents/DeleteModal.d.ts +1 -1
- package/lib/esm/components/SharedComponents/DeleteModal.js +10 -11
- package/lib/esm/components/SharedComponents/DeleteModal.js.map +1 -1
- package/lib/esm/components/SharedComponents/EmptyMessage.js +4 -4
- package/lib/esm/components/SharedComponents/EmptyMessage.js.map +1 -1
- package/lib/esm/components/SharedComponents/LoadingOverlay.js +4 -4
- package/lib/esm/components/SharedComponents/LoadingOverlay.js.map +1 -1
- package/lib/esm/components/SharedComponents/LoadingSpinner.js +3 -3
- package/lib/esm/components/SharedComponents/LoadingSpinner.js.map +1 -1
- package/lib/esm/components/SharedComponents/StatusIcon.js +3 -3
- package/lib/esm/components/SharedComponents/StatusIcon.js.map +1 -1
- package/lib/esm/components/context/ExtractionClientContext.js.map +1 -1
- package/lib/esm/components/context/ExtractionStateJobContext.js +3 -3
- package/lib/esm/components/context/ExtractionStateJobContext.js.map +1 -1
- package/lib/esm/components/context/GroupHilitedElementsContext.js +3 -3
- package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -1
- package/lib/esm/components/context/GroupingApiConfigContext.js.map +1 -1
- package/lib/esm/components/context/GroupingMappingCustomUIContext.js +3 -3
- package/lib/esm/components/context/GroupingMappingCustomUIContext.js.map +1 -1
- package/lib/esm/components/context/GroupsClientContext.js.map +1 -1
- package/lib/esm/components/context/IModelsClientContext.js.map +1 -1
- package/lib/esm/components/context/ITwinsClientContext.js +3 -3
- package/lib/esm/components/context/ITwinsClientContext.js.map +1 -1
- package/lib/esm/components/context/MappingClientContext.js.map +1 -1
- package/lib/esm/components/context/PropertiesClientContext.js.map +1 -1
- package/lib/esm/components/context/PropertiesGroupColorContext.js +3 -3
- package/lib/esm/components/context/PropertiesGroupColorContext.js.map +1 -1
- package/lib/esm/components/context/PropertyGridWrapperContext.js +3 -3
- package/lib/esm/components/context/PropertyGridWrapperContext.js.map +1 -1
- package/lib/esm/components/customUI/DefaultGroupingUI.js +3 -3
- package/lib/esm/components/customUI/DefaultGroupingUI.js.map +1 -1
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +14 -19
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/GroupingMappingCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/ManualGroupingCustomUI.d.ts +1 -1
- package/lib/esm/components/customUI/ManualGroupingCustomUI.js +8 -8
- package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/esm/components/customUI/SearchGroupingCustomUI.d.ts +1 -1
- package/lib/esm/components/customUI/SearchGroupingCustomUI.js +16 -45
- package/lib/esm/components/customUI/SearchGroupingCustomUI.js.map +1 -1
- package/lib/esm/decorators/BboxDimensionsDecorator.js +5 -12
- package/lib/esm/decorators/BboxDimensionsDecorator.js.map +1 -1
- package/lib/esm/formula/FormulaDataTypeResolver.d.ts +3 -2
- package/lib/esm/formula/FormulaDataTypeResolver.js +10 -6
- package/lib/esm/formula/FormulaDataTypeResolver.js.map +1 -1
- package/lib/esm/formula/FormulaFunctionProvider.js +146 -65
- package/lib/esm/formula/FormulaFunctionProvider.js.map +1 -1
- package/lib/esm/formula/FormulaOperatorsProvider.js +138 -44
- package/lib/esm/formula/FormulaOperatorsProvider.js.map +1 -1
- package/lib/esm/formula/FormulaSplitter.js +63 -13
- package/lib/esm/formula/FormulaSplitter.js.map +1 -1
- package/lib/esm/formula/FormulaTokensDataTypeResolver.js +7 -14
- package/lib/esm/formula/FormulaTokensDataTypeResolver.js.map +1 -1
- package/lib/esm/formula/IResult.js.map +1 -1
- package/lib/esm/formula/InfixToPostfixConverter.js +5 -5
- package/lib/esm/formula/InfixToPostfixConverter.js.map +1 -1
- package/lib/esm/formula/InputStream.js +3 -3
- package/lib/esm/formula/InputStream.js.map +1 -1
- package/lib/esm/formula/ParenthesisValidator.js +3 -3
- package/lib/esm/formula/ParenthesisValidator.js.map +1 -1
- package/lib/esm/formula/Queue.js +3 -3
- package/lib/esm/formula/Queue.js.map +1 -1
- package/lib/esm/formula/Stack.js +3 -3
- package/lib/esm/formula/Stack.js.map +1 -1
- package/lib/esm/formula/StringBuilder.js +3 -3
- package/lib/esm/formula/StringBuilder.js.map +1 -1
- package/lib/esm/formula/Types.js.map +1 -1
- package/lib/esm/formula/Utils.js +4 -4
- package/lib/esm/formula/Utils.js.map +1 -1
- package/lib/esm/grouping-mapping-widget.d.ts +3 -5
- package/lib/esm/grouping-mapping-widget.js +6 -8
- package/lib/esm/grouping-mapping-widget.js.map +1 -1
- package/lib/esm/test/GroupPropertyUtils.test.js +28 -27
- package/lib/esm/test/GroupPropertyUtils.test.js.map +1 -1
- package/lib/esm/test/GroupingMappingCustomUI.test.js +4 -6
- package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/esm/test/MockFactory.js +3 -3
- package/lib/esm/test/MockFactory.js.map +1 -1
- package/lib/esm/test/PropertyFieldsHelpers.js +3 -3
- package/lib/esm/test/PropertyFieldsHelpers.js.map +1 -1
- package/lib/esm/test/QueryBuilder.test.js +3 -3
- package/lib/esm/test/QueryBuilder.test.js.map +1 -1
- package/lib/esm/test/QueryBuilder.testdata.js +3 -3
- package/lib/esm/test/QueryBuilder.testdata.js.map +1 -1
- package/lib/esm/test/QueryBuilderTestData.js.map +1 -1
- package/lib/esm/test/WidgetHeader.test.js +3 -3
- package/lib/esm/test/WidgetHeader.test.js.map +1 -1
- package/lib/esm/test/test-utils.js +4 -4
- package/lib/esm/test/test-utils.js.map +1 -1
- package/package.json +8 -4
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +0 -14
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +0 -87
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +0 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.scss +0 -9
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +0 -13
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js +0 -87
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js.map +0 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +0 -14
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +0 -60
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +0 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.scss +0 -9
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +0 -13
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js +0 -60
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js.map +0 -1
|
@@ -1 +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":"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","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"]}
|
|
@@ -22,5 +22,5 @@ export interface PropertyMenuProps {
|
|
|
22
22
|
* Component to display the properties of a group.
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
export declare const PropertyMenu: ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty,
|
|
25
|
+
export declare const PropertyMenu: ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty, hideGroupProps }: PropertyMenuProps) => JSX.Element;
|
|
26
26
|
//# sourceMappingURL=PropertyMenu.d.ts.map
|
|
@@ -25,15 +25,13 @@ 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
34
|
const GroupingApiConfigContext_1 = require("../context/GroupingApiConfigContext");
|
|
35
|
-
const CalculatedPropertyTable_1 = require("./CalculatedProperties/CalculatedPropertyTable");
|
|
36
|
-
const CustomCalculationTable_1 = require("./CustomCalculations/CustomCalculationTable");
|
|
37
35
|
const usePropertiesQuery_1 = require("./hooks/usePropertiesQuery");
|
|
38
36
|
const react_query_1 = require("@tanstack/react-query");
|
|
39
37
|
const PropertiesClientContext_1 = require("../context/PropertiesClientContext");
|
|
@@ -41,7 +39,7 @@ const PropertiesClientContext_1 = require("../context/PropertiesClientContext");
|
|
|
41
39
|
* Component to display the properties of a group.
|
|
42
40
|
* @public
|
|
43
41
|
*/
|
|
44
|
-
const PropertyMenu = ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty,
|
|
42
|
+
const PropertyMenu = ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty, hideGroupProps = false }) => {
|
|
45
43
|
const groupId = group.id;
|
|
46
44
|
const mappingId = mapping.id;
|
|
47
45
|
const { getAccessToken, iModelId } = (0, GroupingApiConfigContext_1.useGroupingMappingApiConfig)();
|
|
@@ -49,10 +47,7 @@ const PropertyMenu = ({ mapping, group, onClickAddGroupProperty, onClickModifyGr
|
|
|
49
47
|
const queryClient = (0, react_query_1.useQueryClient)();
|
|
50
48
|
const { data: groupProperties, isFetching: isLoadingGroupProperties } = (0, usePropertiesQuery_1.usePropertiesQuery)(iModelId, mappingId, groupId, getAccessToken, propertiesClient);
|
|
51
49
|
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:
|
|
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 }))));
|
|
50
|
+
return (react_1.default.createElement("div", { className: "gmw-property-menu-wrapper" }, !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 }))));
|
|
56
51
|
};
|
|
57
52
|
exports.PropertyMenu = PropertyMenu;
|
|
58
53
|
//# 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,mEAAgE;AAChE,uDAAuD;AACvD,gFAAyE;AAoBzE;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,cAAc,GAAG,KAAK,EACJ,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,IACvC,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,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,YAAY,gBAoCvB","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 { 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 hideGroupProps = 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 </div>\n );\n};\n"]}
|
|
@@ -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");
|
|
@@ -41,10 +41,10 @@ require("./PropertyMenuWithVisualization.scss");
|
|
|
41
41
|
*/
|
|
42
42
|
const PropertyMenuWithVisualization = ({ group, color, ...rest }) => {
|
|
43
43
|
const [isInformationPanelOpen, setIsInformationPanelOpen] = (0, react_1.useState)(false);
|
|
44
|
-
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" },
|
|
45
45
|
react_1.default.createElement("div", { className: "gmw-property-menu-vis-toolbar" },
|
|
46
46
|
react_1.default.createElement(GroupColorToggle_1.GroupColorToggle, { group: group, color: color, labelPosition: "left" }),
|
|
47
|
-
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" },
|
|
48
48
|
react_1.default.createElement(itwinui_icons_react_1.SvgProperties, null))),
|
|
49
49
|
react_1.default.createElement(PropertyMenu_1.PropertyMenu, { group: group, ...rest }),
|
|
50
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"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExpandableBlockProps } from "@itwin/itwinui-react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface ScrollableExpandableBlockProps extends ExpandableBlockProps {
|
|
4
|
+
parentRef?: React.RefObject<HTMLDivElement>;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
isExpanded: boolean;
|
|
7
|
+
setIsExpanded: (isExpanded: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ScrollableExpandableBlock: React.ForwardRefExoticComponent<ScrollableExpandableBlockProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ScrollableExpandableBlock.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ScrollableExpandableBlock = void 0;
|
|
27
|
+
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const useForwardRef_1 = require("./hooks/useForwardRef");
|
|
30
|
+
exports.ScrollableExpandableBlock = (0, react_1.forwardRef)(function ExpandableBlockWithRef(props, forwardRef) {
|
|
31
|
+
const { parentRef, children, isExpanded, setIsExpanded, ...rest } = props;
|
|
32
|
+
const forwardedRef = (0, useForwardRef_1.useForwardRef)(forwardRef);
|
|
33
|
+
const scrollToBlock = (0, react_1.useCallback)(() => {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
if (parentRef?.current && forwardedRef.current) {
|
|
36
|
+
parentRef?.current.scrollTo({
|
|
37
|
+
top: forwardedRef.current.offsetTop,
|
|
38
|
+
behavior: "smooth",
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}, 500);
|
|
42
|
+
}, [forwardedRef, parentRef]);
|
|
43
|
+
const handleToggle = (0, react_1.useCallback)((isExpanding) => {
|
|
44
|
+
if (isExpanding === true) {
|
|
45
|
+
setIsExpanded(true);
|
|
46
|
+
scrollToBlock();
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
setIsExpanded(false);
|
|
50
|
+
}
|
|
51
|
+
}, [scrollToBlock, setIsExpanded]);
|
|
52
|
+
return (react_1.default.createElement("div", { ref: forwardedRef },
|
|
53
|
+
react_1.default.createElement(itwinui_react_1.ExpandableBlock, { onToggle: handleToggle, isExpanded: isExpanded, ...rest }, children)));
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=ScrollableExpandableBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollableExpandableBlock.js","sourceRoot":"","sources":["../../../../src/components/Properties/ScrollableExpandableBlock.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wDAAuD;AACvD,+CAAuD;AACvD,yDAAsD;AASzC,QAAA,yBAAyB,GAAG,IAAA,kBAAU,EAAiD,SAAS,sBAAsB,CAAC,KAAK,EAAE,UAAU;IACnJ,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAC,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACzE,MAAM,YAAY,GAAG,IAAA,6BAAa,EAAiB,UAAU,CAAC,CAAC;IAE/D,MAAM,aAAa,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACrC,UAAU,CAAC,GAAG,EAAE;YACd,IAAI,SAAS,EAAE,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE;gBAC9C,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC;oBAC1B,GAAG,EAAE,YAAY,CAAC,OAAO,CAAC,SAAS;oBACnC,QAAQ,EAAE,QAAQ;iBACnB,CAAC,CAAC;aACJ;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC;IAE9B,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,CAAC,WAAoB,EAAE,EAAE;QACvB,IAAI,WAAW,KAAK,IAAI,EAAE;YACxB,aAAa,CAAC,IAAI,CAAC,CAAC;YACpB,aAAa,EAAE,CAAC;SACjB;aAAK;YACJ,aAAa,CAAC,KAAK,CAAC,CAAC;SACtB;IACH,CAAC,EACD,CAAC,aAAa,EAAE,aAAa,CAAC,CAC/B,CAAC;IAEF,OAAO,CACL,uCAAK,GAAG,EAAE,YAAY;QACpB,8BAAC,+BAAe,IAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,KAAM,IAAI,IACtE,QAAQ,CACO,CACd,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { ExpandableBlockProps } from \"@itwin/itwinui-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport React, { forwardRef, useCallback } from \"react\";\nimport { useForwardRef } from \"./hooks/useForwardRef\";\n\ninterface ScrollableExpandableBlockProps extends ExpandableBlockProps {\n parentRef?: React.RefObject<HTMLDivElement>;\n children: React.ReactNode;\n isExpanded: boolean;\n setIsExpanded: (isExpanded: boolean) => void;\n}\n\nexport const ScrollableExpandableBlock = forwardRef<HTMLDivElement, ScrollableExpandableBlockProps>(function ExpandableBlockWithRef(props, forwardRef) {\n const { parentRef, children, isExpanded, setIsExpanded,...rest } = props;\n const forwardedRef = useForwardRef<HTMLDivElement>(forwardRef);\n\n const scrollToBlock = useCallback(() => {\n setTimeout(() => {\n if (parentRef?.current && forwardedRef.current) {\n parentRef?.current.scrollTo({\n top: forwardedRef.current.offsetTop,\n behavior: \"smooth\",\n });\n }\n }, 500);\n }, [forwardedRef, parentRef]);\n\n const handleToggle = useCallback(\n (isExpanding: boolean) => {\n if (isExpanding === true) {\n setIsExpanded(true);\n scrollToBlock();\n }else {\n setIsExpanded(false);\n }\n },\n [scrollToBlock, setIsExpanded],\n );\n\n return (\n <div ref={forwardedRef}>\n <ExpandableBlock onToggle={handleToggle} isExpanded={isExpanded} {...rest}>\n {children}\n </ExpandableBlock>\n </div>\n );\n});\n"]}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type { DataType
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { DataType as FormulaDataType } from "../../../formula/Types";
|
|
2
|
+
import type { Property } from "@itwin/insights-client";
|
|
3
|
+
import { DataType } from "@itwin/insights-client";
|
|
4
|
+
export declare function useFormulaValidation(formulaName: string, formula: string | undefined, groupProperties: Property[], setFormulaErrorMessage: (s: string | undefined) => void, providedDataType?: DataType): {
|
|
5
|
+
isFormulaValid: boolean;
|
|
4
6
|
inferredDataType: DataType | undefined;
|
|
5
7
|
forceValidation: () => boolean;
|
|
6
8
|
};
|
|
9
|
+
export declare const inferToPropertyDataType: (value: FormulaDataType | undefined) => DataType;
|
|
7
10
|
//# sourceMappingURL=useFormulaValidation.d.ts.map
|
|
@@ -1,33 +1,79 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFormulaValidation = void 0;
|
|
3
|
+
exports.inferToPropertyDataType = 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
|
-
|
|
11
|
+
const insights_client_1 = require("@itwin/insights-client");
|
|
12
|
+
function validate(formulaName, formula, properties, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType) {
|
|
12
13
|
if (!formula) {
|
|
13
|
-
setFormulaErrorMessage(
|
|
14
|
-
|
|
14
|
+
setFormulaErrorMessage(undefined);
|
|
15
|
+
setIsFormulaValid(false);
|
|
15
16
|
setDataType(undefined);
|
|
16
17
|
return false;
|
|
17
18
|
}
|
|
18
|
-
const resolveFormulaType = (0, FormulaDataTypeResolver_1.resolveFormulaDataType)(formulaName, formula, properties);
|
|
19
|
-
const error = resolveFormulaType.errorMessage
|
|
19
|
+
const resolveFormulaType = (0, FormulaDataTypeResolver_1.resolveFormulaDataType)(formulaName, formula, properties, providedDataType);
|
|
20
|
+
const error = resolveFormulaType.errorMessage;
|
|
20
21
|
setFormulaErrorMessage(error);
|
|
21
|
-
|
|
22
|
-
setDataType(resolveFormulaType.value);
|
|
22
|
+
setIsFormulaValid(!error);
|
|
23
|
+
setDataType((0, exports.inferToPropertyDataType)(resolveFormulaType.value));
|
|
23
24
|
return !error;
|
|
24
25
|
}
|
|
25
|
-
const debouncedValidationFunc = (0, utils_1.debounce)(validate,
|
|
26
|
-
function useFormulaValidation(formulaName, formula,
|
|
27
|
-
const [
|
|
26
|
+
const debouncedValidationFunc = (0, utils_1.debounce)(validate, 2000);
|
|
27
|
+
function useFormulaValidation(formulaName, formula, groupProperties, setFormulaErrorMessage, providedDataType) {
|
|
28
|
+
const [isFormulaValid, setIsFormulaValid] = (0, react_1.useState)(false);
|
|
28
29
|
const [inferredDataType, setDataType] = (0, react_1.useState)(undefined);
|
|
29
|
-
(0, react_1.
|
|
30
|
-
|
|
30
|
+
const [propertyMap, setPropertyMap] = (0, react_1.useState)({});
|
|
31
|
+
(0, react_1.useEffect)(() => setPropertyMap(convertToPropertyMap(groupProperties)), [groupProperties]);
|
|
32
|
+
(0, react_1.useEffect)(() => debouncedValidationFunc(formulaName, formula, propertyMap, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType), [formulaName, formula, groupProperties, setFormulaErrorMessage, propertyMap, providedDataType]);
|
|
33
|
+
return {
|
|
34
|
+
isFormulaValid,
|
|
35
|
+
inferredDataType,
|
|
36
|
+
forceValidation: () => validate(formulaName, formula, propertyMap, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType),
|
|
37
|
+
};
|
|
31
38
|
}
|
|
32
39
|
exports.useFormulaValidation = useFormulaValidation;
|
|
40
|
+
const inferToPropertyDataType = (value) => {
|
|
41
|
+
switch (value) {
|
|
42
|
+
case "Double":
|
|
43
|
+
return insights_client_1.DataType.Double;
|
|
44
|
+
case "Integer":
|
|
45
|
+
return insights_client_1.DataType.Integer;
|
|
46
|
+
case "String":
|
|
47
|
+
return insights_client_1.DataType.String;
|
|
48
|
+
case "Boolean":
|
|
49
|
+
return insights_client_1.DataType.Boolean;
|
|
50
|
+
default:
|
|
51
|
+
return insights_client_1.DataType.String;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.inferToPropertyDataType = inferToPropertyDataType;
|
|
55
|
+
const convertToPropertyMap = (properties, selectedPropertyName) => {
|
|
56
|
+
const map = {};
|
|
57
|
+
const selectedLowerName = selectedPropertyName?.toLowerCase();
|
|
58
|
+
properties.forEach((p) => {
|
|
59
|
+
const lowerName = p.propertyName?.toLowerCase();
|
|
60
|
+
if (lowerName && lowerName !== selectedLowerName)
|
|
61
|
+
map[lowerName] = stringToPossibleDataType(p.dataType);
|
|
62
|
+
});
|
|
63
|
+
return map;
|
|
64
|
+
};
|
|
65
|
+
const stringToPossibleDataType = (str) => {
|
|
66
|
+
switch (str?.toLowerCase()) {
|
|
67
|
+
case "double":
|
|
68
|
+
return "Double";
|
|
69
|
+
case "integer":
|
|
70
|
+
return "Integer";
|
|
71
|
+
case "string":
|
|
72
|
+
return "String";
|
|
73
|
+
case "boolean":
|
|
74
|
+
return "Boolean";
|
|
75
|
+
default:
|
|
76
|
+
return "Undefined";
|
|
77
|
+
}
|
|
78
|
+
};
|
|
33
79
|
//# 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":"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","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 as FormulaDataType, PossibleDataType, PropertyMap } from \"../../../formula/Types\";\nimport { debounce } from \"../../../common/utils\";\nimport type { Property } from \"@itwin/insights-client\";\nimport { DataType } from \"@itwin/insights-client\";\n\nfunction validate(\n formulaName: string,\n formula: string | undefined,\n properties: PropertyMap,\n setFormulaErrorMessage: (s: string | undefined) => void,\n setIsFormulaValid: (b: boolean) => void,\n setDataType: (inferredDataType: DataType | undefined) => void,\n providedDataType?: DataType,\n): boolean {\n if (!formula) {\n setFormulaErrorMessage(undefined);\n setIsFormulaValid(false);\n setDataType(undefined);\n return false;\n }\n\n const resolveFormulaType = resolveFormulaDataType(formulaName, formula, properties, providedDataType);\n const error = resolveFormulaType.errorMessage;\n setFormulaErrorMessage(error);\n setIsFormulaValid(!error);\n setDataType(inferToPropertyDataType(resolveFormulaType.value));\n return !error;\n}\n\nconst debouncedValidationFunc = debounce(validate, 2000);\n\nexport function useFormulaValidation(\n formulaName: string,\n formula: string | undefined,\n groupProperties: Property[],\n setFormulaErrorMessage: (s: string | undefined) => void,\n providedDataType?: DataType,\n) {\n const [isFormulaValid, setIsFormulaValid] = useState(false);\n const [inferredDataType, setDataType] = useState<DataType | undefined>(undefined);\n const [propertyMap, setPropertyMap] = useState<PropertyMap>({});\n useEffect(() => setPropertyMap(convertToPropertyMap(groupProperties)), [groupProperties]);\n useEffect(\n () => debouncedValidationFunc(formulaName, formula, propertyMap, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType),\n [formulaName, formula, groupProperties, setFormulaErrorMessage, propertyMap, providedDataType],\n );\n return {\n isFormulaValid,\n inferredDataType,\n forceValidation: () => validate(formulaName, formula, propertyMap, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType),\n };\n}\n\nexport const inferToPropertyDataType = (value: FormulaDataType | undefined): DataType => {\n switch (value) {\n case \"Double\":\n return DataType.Double;\n case \"Integer\":\n return DataType.Integer;\n case \"String\":\n return DataType.String;\n case \"Boolean\":\n return DataType.Boolean;\n default:\n return DataType.String;\n }\n};\n\nconst convertToPropertyMap = (properties: Property[], selectedPropertyName?: string): PropertyMap => {\n const map: PropertyMap = {};\n const selectedLowerName = selectedPropertyName?.toLowerCase();\n\n properties.forEach((p) => {\n const lowerName = p.propertyName?.toLowerCase();\n if (lowerName && lowerName !== selectedLowerName) map[lowerName] = stringToPossibleDataType(p.dataType);\n });\n\n return map;\n};\n\nconst stringToPossibleDataType = (str?: string): PossibleDataType => {\n switch (str?.toLowerCase()) {\n case \"double\":\n return \"Double\";\n case \"integer\":\n return \"Integer\";\n case \"string\":\n return \"String\";\n case \"boolean\":\n return \"Boolean\";\n default:\n return \"Undefined\";\n }\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useForwardRef = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useForwardRef = (ref, initialValue = null) => {
|
|
6
|
+
const targetRef = (0, react_1.useRef)(initialValue);
|
|
7
|
+
(0, react_1.useEffect)(() => {
|
|
8
|
+
if (!ref)
|
|
9
|
+
return;
|
|
10
|
+
if (typeof ref === 'function') {
|
|
11
|
+
ref(targetRef.current);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
ref.current = targetRef.current;
|
|
15
|
+
}
|
|
16
|
+
}, [ref]);
|
|
17
|
+
return targetRef;
|
|
18
|
+
};
|
|
19
|
+
exports.useForwardRef = useForwardRef;
|
|
20
|
+
//# sourceMappingURL=useForwardRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useForwardRef.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useForwardRef.ts"],"names":[],"mappings":";;;AAKA,iCAA0C;AAEnC,MAAM,aAAa,GAAG,CACzB,GAAoB,EACpB,eAAoB,IAAI,EACxB,EAAE;IACF,MAAM,SAAS,GAAG,IAAA,cAAM,EAAI,YAAY,CAAC,CAAC;IAE1C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG;YAAE,OAAO;QAEjB,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;YAC7B,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SACxB;aAAM;YACL,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;SACjC;IACH,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAjBS,QAAA,aAAa,iBAiBtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { ForwardedRef } from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useForwardRef = <T,>(\n ref: ForwardedRef<T>,\n initialValue: any = null\n ) => {\n const targetRef = useRef<T>(initialValue);\n \n useEffect(() => {\n if (!ref) return;\n \n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }, [ref]);\n \n return targetRef;\n };"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePropertiesQuery.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/usePropertiesQuery.ts"],"names":[],"mappings":";;;AAKA,uDAAiD;AAG1C,MAAM,kBAAkB,GAAG,
|
|
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
|
},
|