@itwin/grouping-mapping-widget 0.19.1 → 0.20.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/README.md +1 -1
- package/lib/cjs/WidgetShell/GroupingMapping.d.ts +34 -0
- package/lib/cjs/WidgetShell/GroupingMapping.js +79 -0
- package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -0
- package/lib/cjs/WidgetShell/GroupingMappingContent.js +51 -0
- package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -0
- package/lib/cjs/WidgetShell/GroupingMappingHeader.js +24 -0
- package/lib/cjs/WidgetShell/GroupingMappingHeader.js.map +1 -0
- package/lib/cjs/WidgetShell/GroupingMappingWidget.d.ts +10 -0
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js +31 -0
- package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -0
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.d.ts +8 -0
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +107 -0
- package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -0
- package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -0
- package/lib/cjs/common/utils.d.ts +11 -0
- package/lib/cjs/common/utils.js +89 -0
- package/lib/cjs/common/utils.js.map +1 -0
- package/lib/cjs/common/viewerUtils.d.ts +30 -0
- package/lib/cjs/common/viewerUtils.js +293 -0
- package/lib/cjs/common/viewerUtils.js.map +1 -0
- package/lib/cjs/components/GroupingMappingContext.d.ts +39 -0
- package/lib/cjs/components/GroupingMappingContext.js +123 -0
- package/lib/cjs/components/GroupingMappingContext.js.map +1 -0
- package/lib/cjs/components/Groups/Editing/GroupAction.js +156 -0
- package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -0
- package/lib/cjs/components/Groups/Editing/GroupDetails.js +34 -0
- package/lib/cjs/components/Groups/Editing/GroupDetails.js.map +1 -0
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -0
- package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js.map +1 -0
- package/lib/cjs/components/Groups/GroupColorLegend.js.map +1 -0
- package/lib/cjs/components/Groups/GroupItem.d.ts +13 -0
- package/lib/cjs/components/Groups/GroupItem.js +23 -0
- package/lib/cjs/components/Groups/GroupItem.js.map +1 -0
- package/lib/cjs/components/Groups/GroupMenuActions.d.ts +14 -0
- package/lib/cjs/components/Groups/GroupMenuActions.js +80 -0
- package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -0
- package/lib/cjs/components/Groups/GroupOverlapProgressBar.d.ts +11 -0
- package/lib/cjs/components/Groups/GroupOverlapProgressBar.js +18 -0
- package/lib/cjs/components/Groups/GroupOverlapProgressBar.js.map +1 -0
- package/lib/cjs/components/Groups/Groups.d.ts +18 -0
- package/lib/cjs/components/Groups/Groups.js +47 -0
- package/lib/cjs/components/Groups/Groups.js.map +1 -0
- package/lib/cjs/components/Groups/GroupsAddButton.d.ts +10 -0
- package/lib/cjs/components/Groups/GroupsAddButton.js.map +1 -0
- package/lib/cjs/components/Groups/GroupsShowHideButtons.js +45 -0
- package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -0
- package/lib/cjs/components/Groups/GroupsView.d.ts +43 -0
- package/lib/cjs/components/Groups/GroupsView.js +49 -0
- package/lib/cjs/components/Groups/GroupsView.js.map +1 -0
- package/lib/cjs/components/Groups/GroupsView.scss +53 -0
- package/lib/cjs/components/Groups/GroupsVisualization.js +153 -0
- package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -0
- package/lib/cjs/components/Groups/GroupsVisualization.scss +18 -0
- package/lib/cjs/components/Groups/GroupsVisualizationActions.js +27 -0
- package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -0
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.d.ts +17 -0
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js +91 -0
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js.map +1 -0
- package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.scss +14 -0
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -0
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -0
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +13 -0
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +28 -0
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -0
- package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -0
- package/lib/cjs/components/Groups/ToggleGroupVisibility.js.map +1 -0
- package/lib/cjs/components/Groups/groupsHelpers.d.ts +11 -0
- package/lib/cjs/components/Groups/groupsHelpers.js +202 -0
- package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -0
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +26 -0
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js +71 -0
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -0
- package/lib/cjs/components/Groups/hooks/useVisualization.js +68 -0
- package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -0
- package/lib/cjs/components/Mappings/BlockingOverlay.js +20 -0
- package/lib/cjs/components/Mappings/BlockingOverlay.js.map +1 -0
- package/lib/cjs/components/Mappings/ConfirmMappingsImport.js +134 -0
- package/lib/cjs/components/Mappings/ConfirmMappingsImport.js.map +1 -0
- package/lib/cjs/components/Mappings/Editing/MappingAction.js +109 -0
- package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -0
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +42 -0
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -0
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.d.ts +11 -0
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +129 -0
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -0
- package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -0
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +125 -0
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -0
- package/lib/cjs/components/Mappings/Import/SelectIModel.js +102 -0
- package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -0
- package/lib/cjs/components/Mappings/Import/SelectITwin.js +115 -0
- package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -0
- package/lib/cjs/components/Mappings/Import/SelectMappings.d.ts +16 -0
- package/lib/cjs/components/Mappings/Import/SelectMappings.js +88 -0
- package/lib/cjs/components/Mappings/Import/SelectMappings.js.map +1 -0
- package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -0
- package/lib/cjs/components/Mappings/Mappings.d.ts +13 -0
- package/lib/cjs/components/Mappings/Mappings.js +45 -0
- package/lib/cjs/components/Mappings/Mappings.js.map +1 -0
- package/lib/cjs/components/Mappings/MappingsView.js +64 -0
- package/lib/cjs/components/Mappings/MappingsView.js.map +1 -0
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.d.ts +35 -0
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js +120 -0
- package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -0
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +84 -0
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -0
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +150 -0
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -0
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +84 -0
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -0
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -0
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +12 -0
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +185 -0
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -0
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js +84 -0
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -0
- package/lib/cjs/components/Properties/GroupColorToggle.js +69 -0
- package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -0
- package/lib/cjs/components/Properties/GroupInformationPanel.js.map +1 -0
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +287 -0
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -0
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +81 -0
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -0
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -0
- package/lib/cjs/components/Properties/GroupProperties/SaveModal.js.map +1 -0
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +8 -0
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +52 -0
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -0
- package/lib/cjs/components/Properties/PropertyAction.js +99 -0
- package/lib/cjs/components/Properties/PropertyAction.js.map +1 -0
- package/lib/cjs/components/Properties/PropertyMenu.js +60 -0
- package/lib/cjs/components/Properties/PropertyMenu.js.map +1 -0
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js.map +1 -0
- package/lib/cjs/components/Properties/PropertyNameCell.js.map +1 -0
- package/lib/cjs/components/Properties/PropertyTable.js +53 -0
- package/lib/cjs/components/Properties/PropertyTable.js.map +1 -0
- package/lib/cjs/components/Properties/PropertyTableToolbar.js.map +1 -0
- package/lib/cjs/components/Properties/hooks/useFetchData.js +43 -0
- package/lib/cjs/components/Properties/hooks/useFetchData.js.map +1 -0
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.d.ts +6 -0
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +29 -0
- package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -0
- package/lib/cjs/components/Properties/hooks/useValidator.js.map +1 -0
- package/lib/cjs/components/SharedComponents/ActionPanel.js +39 -0
- package/lib/cjs/components/SharedComponents/ActionPanel.js.map +1 -0
- package/lib/cjs/components/SharedComponents/DeleteModal.js +62 -0
- package/lib/cjs/components/SharedComponents/DeleteModal.js.map +1 -0
- package/lib/cjs/components/SharedComponents/EmptyMessage.d.ts +7 -0
- package/lib/cjs/components/SharedComponents/EmptyMessage.js +17 -0
- package/lib/cjs/components/SharedComponents/EmptyMessage.js.map +1 -0
- package/lib/cjs/components/SharedComponents/EmptyMessage.scss +12 -0
- package/lib/cjs/components/SharedComponents/HorizontalTile.d.ts +19 -0
- package/lib/cjs/components/SharedComponents/HorizontalTile.js +27 -0
- package/lib/cjs/components/SharedComponents/HorizontalTile.js.map +1 -0
- package/lib/cjs/components/SharedComponents/HorizontalTile.scss +58 -0
- package/lib/cjs/components/SharedComponents/LoadingOverlay.d.ts +4 -0
- package/lib/cjs/components/SharedComponents/LoadingOverlay.js +19 -0
- package/lib/cjs/components/SharedComponents/LoadingOverlay.js.map +1 -0
- package/lib/cjs/components/SharedComponents/LoadingOverlay.scss +13 -0
- package/lib/cjs/components/SharedComponents/LoadingSpinner.d.ts +4 -0
- package/lib/cjs/components/SharedComponents/LoadingSpinner.js +19 -0
- package/lib/cjs/components/SharedComponents/LoadingSpinner.js.map +1 -0
- package/lib/cjs/components/SharedComponents/LoadingSpinner.scss +8 -0
- package/lib/cjs/components/SharedComponents/StatusIcon.js.map +1 -0
- package/lib/cjs/components/context/ExtractionClientContext.js.map +1 -0
- package/lib/cjs/components/context/GroupHilitedElementsContext.d.ts +38 -0
- package/lib/cjs/components/context/GroupHilitedElementsContext.js +55 -0
- package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -0
- package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -0
- package/lib/cjs/components/context/GroupingMappingCustomUIContext.js.map +1 -0
- package/lib/cjs/components/context/IModelsClientContext.js.map +1 -0
- package/lib/cjs/components/context/ITwinsClientContext.js.map +1 -0
- package/lib/cjs/components/context/MappingClientContext.js.map +1 -0
- package/lib/cjs/components/context/PropertiesContext.js.map +1 -0
- package/lib/cjs/components/context/PropertyGridWrapperContext.d.ts +13 -0
- package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -0
- package/lib/cjs/components/customUI/DefaultGroupingUI.js.map +1 -0
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +107 -0
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -0
- package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -0
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.js +32 -0
- package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -0
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.js +98 -0
- package/lib/cjs/components/customUI/SearchGroupingCustomUI.js.map +1 -0
- package/lib/cjs/grouping-mapping-widget.d.ts +23 -23
- package/lib/cjs/grouping-mapping-widget.js +23 -23
- package/lib/cjs/grouping-mapping-widget.js.map +1 -1
- package/lib/cjs/test/GroupPropertyUtils.test.js +1 -1
- package/lib/cjs/test/GroupPropertyUtils.test.js.map +1 -1
- package/lib/cjs/test/GroupingMappingCustomUI.test.js +4 -4
- package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/cjs/test/QueryBuilder.test.js +1 -1
- package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
- package/lib/cjs/test/WidgetHeader.test.js +1 -1
- package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
- package/lib/cjs/test/test-utils.js +1 -1
- package/lib/cjs/test/test-utils.js.map +1 -1
- package/lib/esm/WidgetShell/GroupingMapping.d.ts +34 -0
- package/lib/esm/WidgetShell/GroupingMapping.js +57 -0
- package/lib/esm/WidgetShell/GroupingMapping.js.map +1 -0
- package/lib/esm/WidgetShell/GroupingMappingContent.js +28 -0
- package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -0
- package/lib/esm/WidgetShell/GroupingMappingHeader.js +17 -0
- package/lib/esm/WidgetShell/GroupingMappingHeader.js.map +1 -0
- package/lib/esm/WidgetShell/GroupingMappingWidget.d.ts +10 -0
- package/lib/esm/WidgetShell/GroupingMappingWidget.js +24 -0
- package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -0
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.d.ts +8 -0
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +100 -0
- package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -0
- package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -0
- package/lib/esm/common/utils.d.ts +11 -0
- package/lib/esm/common/utils.js +80 -0
- package/lib/esm/common/utils.js.map +1 -0
- package/lib/esm/common/viewerUtils.d.ts +30 -0
- package/lib/esm/common/viewerUtils.js +268 -0
- package/lib/esm/common/viewerUtils.js.map +1 -0
- package/lib/esm/components/GroupingMappingContext.d.ts +39 -0
- package/lib/esm/components/GroupingMappingContext.js +100 -0
- package/lib/esm/components/GroupingMappingContext.js.map +1 -0
- package/lib/esm/components/Groups/Editing/GroupAction.js +130 -0
- package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -0
- package/lib/esm/components/Groups/Editing/GroupDetails.js +27 -0
- package/lib/esm/components/Groups/Editing/GroupDetails.js.map +1 -0
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -0
- package/lib/esm/components/Groups/Editing/GroupDetailsStep.js.map +1 -0
- package/lib/esm/components/Groups/GroupColorLegend.js.map +1 -0
- package/lib/esm/components/Groups/GroupItem.d.ts +13 -0
- package/lib/esm/components/Groups/GroupItem.js +16 -0
- package/lib/esm/components/Groups/GroupItem.js.map +1 -0
- package/lib/esm/components/Groups/GroupMenuActions.d.ts +14 -0
- package/lib/esm/components/Groups/GroupMenuActions.js +57 -0
- package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -0
- package/lib/esm/components/Groups/GroupOverlapProgressBar.d.ts +11 -0
- package/lib/esm/components/Groups/GroupOverlapProgressBar.js +11 -0
- package/lib/esm/components/Groups/GroupOverlapProgressBar.js.map +1 -0
- package/lib/esm/components/Groups/Groups.d.ts +18 -0
- package/lib/esm/components/Groups/Groups.js +24 -0
- package/lib/esm/components/Groups/Groups.js.map +1 -0
- package/lib/esm/components/Groups/GroupsAddButton.d.ts +10 -0
- package/lib/esm/components/Groups/GroupsAddButton.js.map +1 -0
- package/lib/esm/components/Groups/GroupsShowHideButtons.js +22 -0
- package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -0
- package/lib/esm/components/Groups/GroupsView.d.ts +43 -0
- package/lib/esm/components/Groups/GroupsView.js +42 -0
- package/lib/esm/components/Groups/GroupsView.js.map +1 -0
- package/lib/esm/components/Groups/GroupsView.scss +53 -0
- package/lib/esm/components/Groups/GroupsVisualization.js +130 -0
- package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -0
- package/lib/esm/components/Groups/GroupsVisualization.scss +18 -0
- package/lib/esm/components/Groups/GroupsVisualizationActions.js +20 -0
- package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -0
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.d.ts +17 -0
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js +84 -0
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js.map +1 -0
- package/lib/esm/components/Groups/OverlappedElementsInformationPanel.scss +14 -0
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -0
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -0
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +13 -0
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +21 -0
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -0
- package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -0
- package/lib/esm/components/Groups/ToggleGroupVisibility.js.map +1 -0
- package/lib/esm/components/Groups/groupsHelpers.d.ts +11 -0
- package/lib/esm/components/Groups/groupsHelpers.js +192 -0
- package/lib/esm/components/Groups/groupsHelpers.js.map +1 -0
- package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +26 -0
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js +67 -0
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -0
- package/lib/esm/components/Groups/hooks/useVisualization.js +64 -0
- package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -0
- package/lib/esm/components/Mappings/BlockingOverlay.js +13 -0
- package/lib/esm/components/Mappings/BlockingOverlay.js.map +1 -0
- package/lib/esm/components/Mappings/ConfirmMappingsImport.js +113 -0
- package/lib/esm/components/Mappings/ConfirmMappingsImport.js.map +1 -0
- package/lib/esm/components/Mappings/Editing/MappingAction.js +83 -0
- package/lib/esm/components/Mappings/Editing/MappingAction.js.map +1 -0
- package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js +19 -0
- package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -0
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.d.ts +11 -0
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js +106 -0
- package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -0
- package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -0
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js +99 -0
- package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js.map +1 -0
- package/lib/esm/components/Mappings/Import/SelectIModel.js +81 -0
- package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -0
- package/lib/esm/components/Mappings/Import/SelectITwin.js +94 -0
- package/lib/esm/components/Mappings/Import/SelectITwin.js.map +1 -0
- package/lib/esm/components/Mappings/Import/SelectMappings.d.ts +16 -0
- package/lib/esm/components/Mappings/Import/SelectMappings.js +67 -0
- package/lib/esm/components/Mappings/Import/SelectMappings.js.map +1 -0
- package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -0
- package/lib/esm/components/Mappings/Mappings.d.ts +13 -0
- package/lib/esm/components/Mappings/Mappings.js +22 -0
- package/lib/esm/components/Mappings/Mappings.js.map +1 -0
- package/lib/esm/components/Mappings/MappingsView.js +57 -0
- package/lib/esm/components/Mappings/MappingsView.js.map +1 -0
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.d.ts +35 -0
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.js +116 -0
- package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -0
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +58 -0
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -0
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +124 -0
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -0
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +61 -0
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -0
- package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -0
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +12 -0
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js +159 -0
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -0
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js +61 -0
- package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -0
- package/lib/esm/components/Properties/GroupColorToggle.js +46 -0
- package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -0
- package/lib/esm/components/Properties/GroupInformationPanel.js.map +1 -0
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +261 -0
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -0
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js +58 -0
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -0
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -0
- package/lib/esm/components/Properties/GroupProperties/SaveModal.js.map +1 -0
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +8 -0
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js +31 -0
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -0
- package/lib/esm/components/Properties/PropertyAction.js +76 -0
- package/lib/esm/components/Properties/PropertyAction.js.map +1 -0
- package/lib/esm/components/Properties/PropertyMenu.js +37 -0
- package/lib/esm/components/Properties/PropertyMenu.js.map +1 -0
- package/lib/esm/components/Properties/PropertyMenuWithVisualization.js.map +1 -0
- package/lib/esm/components/Properties/PropertyNameCell.js.map +1 -0
- package/lib/esm/components/Properties/PropertyTable.js +27 -0
- package/lib/esm/components/Properties/PropertyTable.js.map +1 -0
- package/lib/esm/components/Properties/PropertyTableToolbar.js.map +1 -0
- package/lib/esm/components/Properties/hooks/useFetchData.js +37 -0
- package/lib/esm/components/Properties/hooks/useFetchData.js.map +1 -0
- package/lib/esm/components/Properties/hooks/useFormulaValidation.d.ts +6 -0
- package/lib/esm/components/Properties/hooks/useFormulaValidation.js +25 -0
- package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -0
- package/lib/esm/components/Properties/hooks/useValidator.js.map +1 -0
- package/lib/esm/components/SharedComponents/ActionPanel.js +18 -0
- package/lib/esm/components/SharedComponents/ActionPanel.js.map +1 -0
- package/lib/esm/components/SharedComponents/DeleteModal.js +39 -0
- package/lib/esm/components/SharedComponents/DeleteModal.js.map +1 -0
- package/lib/esm/components/SharedComponents/EmptyMessage.d.ts +7 -0
- package/lib/esm/components/SharedComponents/EmptyMessage.js +10 -0
- package/lib/esm/components/SharedComponents/EmptyMessage.js.map +1 -0
- package/lib/esm/components/SharedComponents/EmptyMessage.scss +12 -0
- package/lib/esm/components/SharedComponents/HorizontalTile.d.ts +19 -0
- package/lib/esm/components/SharedComponents/HorizontalTile.js +20 -0
- package/lib/esm/components/SharedComponents/HorizontalTile.js.map +1 -0
- package/lib/esm/components/SharedComponents/HorizontalTile.scss +58 -0
- package/lib/esm/components/SharedComponents/LoadingOverlay.d.ts +4 -0
- package/lib/esm/components/SharedComponents/LoadingOverlay.js +12 -0
- package/lib/esm/components/SharedComponents/LoadingOverlay.js.map +1 -0
- package/lib/esm/components/SharedComponents/LoadingOverlay.scss +13 -0
- package/lib/esm/components/SharedComponents/LoadingSpinner.d.ts +4 -0
- package/lib/esm/components/SharedComponents/LoadingSpinner.js +12 -0
- package/lib/esm/components/SharedComponents/LoadingSpinner.js.map +1 -0
- package/lib/esm/components/SharedComponents/LoadingSpinner.scss +8 -0
- package/lib/esm/components/SharedComponents/StatusIcon.js.map +1 -0
- package/lib/esm/components/context/ExtractionClientContext.js.map +1 -0
- package/lib/esm/components/context/GroupHilitedElementsContext.d.ts +38 -0
- package/lib/esm/components/context/GroupHilitedElementsContext.js +32 -0
- package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -0
- package/lib/esm/components/context/GroupingApiConfigContext.js.map +1 -0
- package/lib/esm/components/context/GroupingMappingCustomUIContext.js.map +1 -0
- package/lib/esm/components/context/IModelsClientContext.js.map +1 -0
- package/lib/esm/components/context/ITwinsClientContext.js.map +1 -0
- package/lib/esm/components/context/MappingClientContext.js.map +1 -0
- package/lib/esm/components/context/PropertiesContext.js.map +1 -0
- package/lib/esm/components/context/PropertyGridWrapperContext.d.ts +13 -0
- package/lib/esm/components/context/PropertyGridWrapperContext.js.map +1 -0
- package/lib/esm/components/customUI/DefaultGroupingUI.js.map +1 -0
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +84 -0
- package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -0
- package/lib/esm/components/customUI/GroupingMappingCustomUI.js.map +1 -0
- package/lib/esm/components/customUI/ManualGroupingCustomUI.js +25 -0
- package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -0
- package/lib/esm/components/customUI/SearchGroupingCustomUI.js +91 -0
- package/lib/esm/components/customUI/SearchGroupingCustomUI.js.map +1 -0
- package/lib/esm/grouping-mapping-widget.d.ts +23 -23
- package/lib/esm/grouping-mapping-widget.js +23 -23
- package/lib/esm/grouping-mapping-widget.js.map +1 -1
- package/lib/esm/test/GroupPropertyUtils.test.js +1 -1
- package/lib/esm/test/GroupPropertyUtils.test.js.map +1 -1
- package/lib/esm/test/GroupingMappingCustomUI.test.js +4 -4
- package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/esm/test/QueryBuilder.test.js +1 -1
- package/lib/esm/test/QueryBuilder.test.js.map +1 -1
- package/lib/esm/test/WidgetHeader.test.js +1 -1
- package/lib/esm/test/WidgetHeader.test.js.map +1 -1
- package/lib/esm/test/test-utils.js +1 -1
- package/lib/esm/test/test-utils.js.map +1 -1
- package/package.json +2 -2
- package/lib/cjs/widget/GroupingMappingWidget.d.ts +0 -10
- package/lib/cjs/widget/GroupingMappingWidget.js +0 -31
- package/lib/cjs/widget/GroupingMappingWidget.js.map +0 -1
- package/lib/cjs/widget/components/ActionPanel.js +0 -39
- package/lib/cjs/widget/components/ActionPanel.js.map +0 -1
- package/lib/cjs/widget/components/BlockingOverlay.js +0 -20
- package/lib/cjs/widget/components/BlockingOverlay.js.map +0 -1
- package/lib/cjs/widget/components/CalculatedPropertyAction.js +0 -84
- package/lib/cjs/widget/components/CalculatedPropertyAction.js.map +0 -1
- package/lib/cjs/widget/components/CalculatedPropertyActionWithVisuals.js +0 -150
- package/lib/cjs/widget/components/CalculatedPropertyActionWithVisuals.js.map +0 -1
- package/lib/cjs/widget/components/CalculatedPropertyTable.js +0 -84
- package/lib/cjs/widget/components/CalculatedPropertyTable.js.map +0 -1
- package/lib/cjs/widget/components/ConfirmMappingsImport.js +0 -134
- package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +0 -1
- package/lib/cjs/widget/components/CustomCalculationAction.d.ts +0 -13
- package/lib/cjs/widget/components/CustomCalculationAction.js +0 -186
- package/lib/cjs/widget/components/CustomCalculationAction.js.map +0 -1
- package/lib/cjs/widget/components/CustomCalculationTable.js +0 -84
- package/lib/cjs/widget/components/CustomCalculationTable.js.map +0 -1
- package/lib/cjs/widget/components/DeleteModal.js +0 -61
- package/lib/cjs/widget/components/DeleteModal.js.map +0 -1
- package/lib/cjs/widget/components/ExtractionLogCustomFilter.js +0 -42
- package/lib/cjs/widget/components/ExtractionLogCustomFilter.js.map +0 -1
- package/lib/cjs/widget/components/ExtractionMessageModal.d.ts +0 -11
- package/lib/cjs/widget/components/ExtractionMessageModal.js +0 -87
- package/lib/cjs/widget/components/ExtractionMessageModal.js.map +0 -1
- package/lib/cjs/widget/components/ExtractionStatusIcon.js.map +0 -1
- package/lib/cjs/widget/components/GroupAction.js +0 -155
- package/lib/cjs/widget/components/GroupAction.js.map +0 -1
- package/lib/cjs/widget/components/GroupColorLegend.js.map +0 -1
- package/lib/cjs/widget/components/GroupColorToggle.js +0 -69
- package/lib/cjs/widget/components/GroupColorToggle.js.map +0 -1
- package/lib/cjs/widget/components/GroupDetails.js +0 -34
- package/lib/cjs/widget/components/GroupDetails.js.map +0 -1
- package/lib/cjs/widget/components/GroupDetailsActionPanel.js.map +0 -1
- package/lib/cjs/widget/components/GroupDetailsStep.js.map +0 -1
- package/lib/cjs/widget/components/GroupInformationPanel.js.map +0 -1
- package/lib/cjs/widget/components/GroupItem.d.ts +0 -12
- package/lib/cjs/widget/components/GroupItem.js +0 -19
- package/lib/cjs/widget/components/GroupItem.js.map +0 -1
- package/lib/cjs/widget/components/GroupMenuActions.d.ts +0 -13
- package/lib/cjs/widget/components/GroupMenuActions.js +0 -68
- package/lib/cjs/widget/components/GroupMenuActions.js.map +0 -1
- package/lib/cjs/widget/components/GroupPropertyAction.js +0 -287
- package/lib/cjs/widget/components/GroupPropertyAction.js.map +0 -1
- package/lib/cjs/widget/components/GroupPropertyTable.js +0 -81
- package/lib/cjs/widget/components/GroupPropertyTable.js.map +0 -1
- package/lib/cjs/widget/components/GroupPropertyUtils.js.map +0 -1
- package/lib/cjs/widget/components/GroupingMapping.d.ts +0 -34
- package/lib/cjs/widget/components/GroupingMapping.js +0 -79
- package/lib/cjs/widget/components/GroupingMapping.js.map +0 -1
- package/lib/cjs/widget/components/GroupingMappingContent.js +0 -51
- package/lib/cjs/widget/components/GroupingMappingContent.js.map +0 -1
- package/lib/cjs/widget/components/GroupingMappingContext.d.ts +0 -40
- package/lib/cjs/widget/components/GroupingMappingContext.js +0 -109
- package/lib/cjs/widget/components/GroupingMappingContext.js.map +0 -1
- package/lib/cjs/widget/components/GroupingMappingHeader.js +0 -24
- package/lib/cjs/widget/components/GroupingMappingHeader.js.map +0 -1
- package/lib/cjs/widget/components/GroupingMappingRouter.d.ts +0 -8
- package/lib/cjs/widget/components/GroupingMappingRouter.js +0 -107
- package/lib/cjs/widget/components/GroupingMappingRouter.js.map +0 -1
- package/lib/cjs/widget/components/Groups.d.ts +0 -16
- package/lib/cjs/widget/components/Groups.js +0 -46
- package/lib/cjs/widget/components/Groups.js.map +0 -1
- package/lib/cjs/widget/components/GroupsAddButton.d.ts +0 -10
- package/lib/cjs/widget/components/GroupsAddButton.js.map +0 -1
- package/lib/cjs/widget/components/GroupsShowHideButtons.js +0 -45
- package/lib/cjs/widget/components/GroupsShowHideButtons.js.map +0 -1
- package/lib/cjs/widget/components/GroupsView.d.ts +0 -31
- package/lib/cjs/widget/components/GroupsView.js +0 -37
- package/lib/cjs/widget/components/GroupsView.js.map +0 -1
- package/lib/cjs/widget/components/GroupsView.scss +0 -49
- package/lib/cjs/widget/components/GroupsVisualization.js +0 -141
- package/lib/cjs/widget/components/GroupsVisualization.js.map +0 -1
- package/lib/cjs/widget/components/GroupsVisualization.scss +0 -12
- package/lib/cjs/widget/components/GroupsVisualizationActions.js +0 -27
- package/lib/cjs/widget/components/GroupsVisualizationActions.js.map +0 -1
- package/lib/cjs/widget/components/HorizontalTile.d.ts +0 -15
- package/lib/cjs/widget/components/HorizontalTile.js +0 -24
- package/lib/cjs/widget/components/HorizontalTile.js.map +0 -1
- package/lib/cjs/widget/components/HorizontalTile.scss +0 -57
- package/lib/cjs/widget/components/MappingAction.js +0 -109
- package/lib/cjs/widget/components/MappingAction.js.map +0 -1
- package/lib/cjs/widget/components/MappingImportWizardModal.js +0 -125
- package/lib/cjs/widget/components/MappingImportWizardModal.js.map +0 -1
- package/lib/cjs/widget/components/MappingViewActionGroup.js.map +0 -1
- package/lib/cjs/widget/components/Mappings.d.ts +0 -13
- package/lib/cjs/widget/components/Mappings.js +0 -45
- package/lib/cjs/widget/components/Mappings.js.map +0 -1
- package/lib/cjs/widget/components/MappingsView.js +0 -63
- package/lib/cjs/widget/components/MappingsView.js.map +0 -1
- package/lib/cjs/widget/components/PropertyAction.js +0 -99
- package/lib/cjs/widget/components/PropertyAction.js.map +0 -1
- package/lib/cjs/widget/components/PropertyMenu.js +0 -60
- package/lib/cjs/widget/components/PropertyMenu.js.map +0 -1
- package/lib/cjs/widget/components/PropertyMenuWithVisualization.js.map +0 -1
- package/lib/cjs/widget/components/PropertyNameCell.js.map +0 -1
- package/lib/cjs/widget/components/PropertyTable.js +0 -53
- package/lib/cjs/widget/components/PropertyTable.js.map +0 -1
- package/lib/cjs/widget/components/PropertyTableToolbar.js.map +0 -1
- package/lib/cjs/widget/components/QueryBuilder.js.map +0 -1
- package/lib/cjs/widget/components/QueryBuilderActionPanel.js.map +0 -1
- package/lib/cjs/widget/components/QueryBuilderCustomUI.d.ts +0 -13
- package/lib/cjs/widget/components/QueryBuilderCustomUI.js +0 -28
- package/lib/cjs/widget/components/QueryBuilderCustomUI.js.map +0 -1
- package/lib/cjs/widget/components/QueryBuilderStep.js.map +0 -1
- package/lib/cjs/widget/components/SaveModal.js.map +0 -1
- package/lib/cjs/widget/components/SelectIModel.js +0 -102
- package/lib/cjs/widget/components/SelectIModel.js.map +0 -1
- package/lib/cjs/widget/components/SelectITwin.js +0 -115
- package/lib/cjs/widget/components/SelectITwin.js.map +0 -1
- package/lib/cjs/widget/components/SelectMappings.d.ts +0 -16
- package/lib/cjs/widget/components/SelectMappings.js +0 -88
- package/lib/cjs/widget/components/SelectMappings.js.map +0 -1
- package/lib/cjs/widget/components/SharedCalculatedPropertyForms.js.map +0 -1
- package/lib/cjs/widget/components/SortableHorizontalTile.d.ts +0 -8
- package/lib/cjs/widget/components/SortableHorizontalTile.js +0 -52
- package/lib/cjs/widget/components/SortableHorizontalTile.js.map +0 -1
- package/lib/cjs/widget/components/StatusIcon.js.map +0 -1
- package/lib/cjs/widget/components/ToggleGroupVisibility.js.map +0 -1
- package/lib/cjs/widget/components/WidgetHeader.js.map +0 -1
- package/lib/cjs/widget/components/context/ExtractionClientContext.js.map +0 -1
- package/lib/cjs/widget/components/context/GroupHilitedElementsContext.d.ts +0 -22
- package/lib/cjs/widget/components/context/GroupHilitedElementsContext.js +0 -47
- package/lib/cjs/widget/components/context/GroupHilitedElementsContext.js.map +0 -1
- package/lib/cjs/widget/components/context/GroupingApiConfigContext.js.map +0 -1
- package/lib/cjs/widget/components/context/GroupingMappingCustomUIContext.js.map +0 -1
- package/lib/cjs/widget/components/context/IModelsClientContext.js.map +0 -1
- package/lib/cjs/widget/components/context/ITwinsClientContext.js.map +0 -1
- package/lib/cjs/widget/components/context/MappingClientContext.js.map +0 -1
- package/lib/cjs/widget/components/context/PropertiesContext.js.map +0 -1
- package/lib/cjs/widget/components/context/PropertyGridWrapperContext.d.ts +0 -13
- package/lib/cjs/widget/components/context/PropertyGridWrapperContext.js.map +0 -1
- package/lib/cjs/widget/components/customUI/DefaultGroupingUI.js.map +0 -1
- package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.js +0 -107
- package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.js.map +0 -1
- package/lib/cjs/widget/components/customUI/GroupingMappingCustomUI.js.map +0 -1
- package/lib/cjs/widget/components/customUI/ManualGroupingCustomUI.js +0 -32
- package/lib/cjs/widget/components/customUI/ManualGroupingCustomUI.js.map +0 -1
- package/lib/cjs/widget/components/customUI/SearchGroupingCustomUI.js +0 -98
- package/lib/cjs/widget/components/customUI/SearchGroupingCustomUI.js.map +0 -1
- package/lib/cjs/widget/components/groupsHelpers.d.ts +0 -10
- package/lib/cjs/widget/components/groupsHelpers.js +0 -84
- package/lib/cjs/widget/components/groupsHelpers.js.map +0 -1
- package/lib/cjs/widget/components/hooks/useGroupsOperations.d.ts +0 -20
- package/lib/cjs/widget/components/hooks/useGroupsOperations.js +0 -67
- package/lib/cjs/widget/components/hooks/useGroupsOperations.js.map +0 -1
- package/lib/cjs/widget/components/hooks/useMappingsOperations.d.ts +0 -35
- package/lib/cjs/widget/components/hooks/useMappingsOperations.js +0 -120
- package/lib/cjs/widget/components/hooks/useMappingsOperations.js.map +0 -1
- package/lib/cjs/widget/components/utils.d.ts +0 -16
- package/lib/cjs/widget/components/utils.js +0 -99
- package/lib/cjs/widget/components/utils.js.map +0 -1
- package/lib/cjs/widget/components/utils.scss +0 -18
- package/lib/cjs/widget/components/viewerUtils.d.ts +0 -30
- package/lib/cjs/widget/components/viewerUtils.js +0 -293
- package/lib/cjs/widget/components/viewerUtils.js.map +0 -1
- package/lib/cjs/widget/hooks/useFetchData.js +0 -43
- package/lib/cjs/widget/hooks/useFetchData.js.map +0 -1
- package/lib/cjs/widget/hooks/useFormulaValidation.d.ts +0 -6
- package/lib/cjs/widget/hooks/useFormulaValidation.js +0 -29
- package/lib/cjs/widget/hooks/useFormulaValidation.js.map +0 -1
- package/lib/cjs/widget/hooks/useValidator.js.map +0 -1
- package/lib/cjs/widget/hooks/useVisualization.js +0 -68
- package/lib/cjs/widget/hooks/useVisualization.js.map +0 -1
- package/lib/cjs/widget/utils.d.ts +0 -5
- package/lib/cjs/widget/utils.js +0 -12
- package/lib/cjs/widget/utils.js.map +0 -1
- package/lib/esm/widget/GroupingMappingWidget.d.ts +0 -10
- package/lib/esm/widget/GroupingMappingWidget.js +0 -24
- package/lib/esm/widget/GroupingMappingWidget.js.map +0 -1
- package/lib/esm/widget/components/ActionPanel.js +0 -18
- package/lib/esm/widget/components/ActionPanel.js.map +0 -1
- package/lib/esm/widget/components/BlockingOverlay.js +0 -13
- package/lib/esm/widget/components/BlockingOverlay.js.map +0 -1
- package/lib/esm/widget/components/CalculatedPropertyAction.js +0 -58
- package/lib/esm/widget/components/CalculatedPropertyAction.js.map +0 -1
- package/lib/esm/widget/components/CalculatedPropertyActionWithVisuals.js +0 -124
- package/lib/esm/widget/components/CalculatedPropertyActionWithVisuals.js.map +0 -1
- package/lib/esm/widget/components/CalculatedPropertyTable.js +0 -61
- package/lib/esm/widget/components/CalculatedPropertyTable.js.map +0 -1
- package/lib/esm/widget/components/ConfirmMappingsImport.js +0 -113
- package/lib/esm/widget/components/ConfirmMappingsImport.js.map +0 -1
- package/lib/esm/widget/components/CustomCalculationAction.d.ts +0 -13
- package/lib/esm/widget/components/CustomCalculationAction.js +0 -160
- package/lib/esm/widget/components/CustomCalculationAction.js.map +0 -1
- package/lib/esm/widget/components/CustomCalculationTable.js +0 -61
- package/lib/esm/widget/components/CustomCalculationTable.js.map +0 -1
- package/lib/esm/widget/components/DeleteModal.js +0 -38
- package/lib/esm/widget/components/DeleteModal.js.map +0 -1
- package/lib/esm/widget/components/ExtractionLogCustomFilter.js +0 -19
- package/lib/esm/widget/components/ExtractionLogCustomFilter.js.map +0 -1
- package/lib/esm/widget/components/ExtractionMessageModal.d.ts +0 -11
- package/lib/esm/widget/components/ExtractionMessageModal.js +0 -64
- package/lib/esm/widget/components/ExtractionMessageModal.js.map +0 -1
- package/lib/esm/widget/components/ExtractionStatusIcon.js.map +0 -1
- package/lib/esm/widget/components/GroupAction.js +0 -129
- package/lib/esm/widget/components/GroupAction.js.map +0 -1
- package/lib/esm/widget/components/GroupColorLegend.js.map +0 -1
- package/lib/esm/widget/components/GroupColorToggle.js +0 -46
- package/lib/esm/widget/components/GroupColorToggle.js.map +0 -1
- package/lib/esm/widget/components/GroupDetails.js +0 -27
- package/lib/esm/widget/components/GroupDetails.js.map +0 -1
- package/lib/esm/widget/components/GroupDetailsActionPanel.js.map +0 -1
- package/lib/esm/widget/components/GroupDetailsStep.js.map +0 -1
- package/lib/esm/widget/components/GroupInformationPanel.js.map +0 -1
- package/lib/esm/widget/components/GroupItem.d.ts +0 -12
- package/lib/esm/widget/components/GroupItem.js +0 -12
- package/lib/esm/widget/components/GroupItem.js.map +0 -1
- package/lib/esm/widget/components/GroupMenuActions.d.ts +0 -13
- package/lib/esm/widget/components/GroupMenuActions.js +0 -45
- package/lib/esm/widget/components/GroupMenuActions.js.map +0 -1
- package/lib/esm/widget/components/GroupPropertyAction.js +0 -261
- package/lib/esm/widget/components/GroupPropertyAction.js.map +0 -1
- package/lib/esm/widget/components/GroupPropertyTable.js +0 -58
- package/lib/esm/widget/components/GroupPropertyTable.js.map +0 -1
- package/lib/esm/widget/components/GroupPropertyUtils.js.map +0 -1
- package/lib/esm/widget/components/GroupingMapping.d.ts +0 -34
- package/lib/esm/widget/components/GroupingMapping.js +0 -57
- package/lib/esm/widget/components/GroupingMapping.js.map +0 -1
- package/lib/esm/widget/components/GroupingMappingContent.js +0 -28
- package/lib/esm/widget/components/GroupingMappingContent.js.map +0 -1
- package/lib/esm/widget/components/GroupingMappingContext.d.ts +0 -40
- package/lib/esm/widget/components/GroupingMappingContext.js +0 -86
- package/lib/esm/widget/components/GroupingMappingContext.js.map +0 -1
- package/lib/esm/widget/components/GroupingMappingHeader.js +0 -17
- package/lib/esm/widget/components/GroupingMappingHeader.js.map +0 -1
- package/lib/esm/widget/components/GroupingMappingRouter.d.ts +0 -8
- package/lib/esm/widget/components/GroupingMappingRouter.js +0 -100
- package/lib/esm/widget/components/GroupingMappingRouter.js.map +0 -1
- package/lib/esm/widget/components/Groups.d.ts +0 -16
- package/lib/esm/widget/components/Groups.js +0 -23
- package/lib/esm/widget/components/Groups.js.map +0 -1
- package/lib/esm/widget/components/GroupsAddButton.d.ts +0 -10
- package/lib/esm/widget/components/GroupsAddButton.js.map +0 -1
- package/lib/esm/widget/components/GroupsShowHideButtons.js +0 -22
- package/lib/esm/widget/components/GroupsShowHideButtons.js.map +0 -1
- package/lib/esm/widget/components/GroupsView.d.ts +0 -31
- package/lib/esm/widget/components/GroupsView.js +0 -30
- package/lib/esm/widget/components/GroupsView.js.map +0 -1
- package/lib/esm/widget/components/GroupsView.scss +0 -49
- package/lib/esm/widget/components/GroupsVisualization.js +0 -118
- package/lib/esm/widget/components/GroupsVisualization.js.map +0 -1
- package/lib/esm/widget/components/GroupsVisualization.scss +0 -12
- package/lib/esm/widget/components/GroupsVisualizationActions.js +0 -20
- package/lib/esm/widget/components/GroupsVisualizationActions.js.map +0 -1
- package/lib/esm/widget/components/HorizontalTile.d.ts +0 -15
- package/lib/esm/widget/components/HorizontalTile.js +0 -17
- package/lib/esm/widget/components/HorizontalTile.js.map +0 -1
- package/lib/esm/widget/components/HorizontalTile.scss +0 -57
- package/lib/esm/widget/components/MappingAction.js +0 -83
- package/lib/esm/widget/components/MappingAction.js.map +0 -1
- package/lib/esm/widget/components/MappingImportWizardModal.js +0 -99
- package/lib/esm/widget/components/MappingImportWizardModal.js.map +0 -1
- package/lib/esm/widget/components/MappingViewActionGroup.js.map +0 -1
- package/lib/esm/widget/components/Mappings.d.ts +0 -13
- package/lib/esm/widget/components/Mappings.js +0 -22
- package/lib/esm/widget/components/Mappings.js.map +0 -1
- package/lib/esm/widget/components/MappingsView.js +0 -56
- package/lib/esm/widget/components/MappingsView.js.map +0 -1
- package/lib/esm/widget/components/PropertyAction.js +0 -76
- package/lib/esm/widget/components/PropertyAction.js.map +0 -1
- package/lib/esm/widget/components/PropertyMenu.js +0 -37
- package/lib/esm/widget/components/PropertyMenu.js.map +0 -1
- package/lib/esm/widget/components/PropertyMenuWithVisualization.js.map +0 -1
- package/lib/esm/widget/components/PropertyNameCell.js.map +0 -1
- package/lib/esm/widget/components/PropertyTable.js +0 -27
- package/lib/esm/widget/components/PropertyTable.js.map +0 -1
- package/lib/esm/widget/components/PropertyTableToolbar.js.map +0 -1
- package/lib/esm/widget/components/QueryBuilder.js.map +0 -1
- package/lib/esm/widget/components/QueryBuilderActionPanel.js.map +0 -1
- package/lib/esm/widget/components/QueryBuilderCustomUI.d.ts +0 -13
- package/lib/esm/widget/components/QueryBuilderCustomUI.js +0 -21
- package/lib/esm/widget/components/QueryBuilderCustomUI.js.map +0 -1
- package/lib/esm/widget/components/QueryBuilderStep.js.map +0 -1
- package/lib/esm/widget/components/SaveModal.js.map +0 -1
- package/lib/esm/widget/components/SelectIModel.js +0 -81
- package/lib/esm/widget/components/SelectIModel.js.map +0 -1
- package/lib/esm/widget/components/SelectITwin.js +0 -94
- package/lib/esm/widget/components/SelectITwin.js.map +0 -1
- package/lib/esm/widget/components/SelectMappings.d.ts +0 -16
- package/lib/esm/widget/components/SelectMappings.js +0 -67
- package/lib/esm/widget/components/SelectMappings.js.map +0 -1
- package/lib/esm/widget/components/SharedCalculatedPropertyForms.js.map +0 -1
- package/lib/esm/widget/components/SortableHorizontalTile.d.ts +0 -8
- package/lib/esm/widget/components/SortableHorizontalTile.js +0 -31
- package/lib/esm/widget/components/SortableHorizontalTile.js.map +0 -1
- package/lib/esm/widget/components/StatusIcon.js.map +0 -1
- package/lib/esm/widget/components/ToggleGroupVisibility.js.map +0 -1
- package/lib/esm/widget/components/WidgetHeader.js.map +0 -1
- package/lib/esm/widget/components/context/ExtractionClientContext.js.map +0 -1
- package/lib/esm/widget/components/context/GroupHilitedElementsContext.d.ts +0 -22
- package/lib/esm/widget/components/context/GroupHilitedElementsContext.js +0 -24
- package/lib/esm/widget/components/context/GroupHilitedElementsContext.js.map +0 -1
- package/lib/esm/widget/components/context/GroupingApiConfigContext.js.map +0 -1
- package/lib/esm/widget/components/context/GroupingMappingCustomUIContext.js.map +0 -1
- package/lib/esm/widget/components/context/IModelsClientContext.js.map +0 -1
- package/lib/esm/widget/components/context/ITwinsClientContext.js.map +0 -1
- package/lib/esm/widget/components/context/MappingClientContext.js.map +0 -1
- package/lib/esm/widget/components/context/PropertiesContext.js.map +0 -1
- package/lib/esm/widget/components/context/PropertyGridWrapperContext.d.ts +0 -13
- package/lib/esm/widget/components/context/PropertyGridWrapperContext.js.map +0 -1
- package/lib/esm/widget/components/customUI/DefaultGroupingUI.js.map +0 -1
- package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.js +0 -84
- package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.js.map +0 -1
- package/lib/esm/widget/components/customUI/GroupingMappingCustomUI.js.map +0 -1
- package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.js +0 -25
- package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.js.map +0 -1
- package/lib/esm/widget/components/customUI/SearchGroupingCustomUI.js +0 -91
- package/lib/esm/widget/components/customUI/SearchGroupingCustomUI.js.map +0 -1
- package/lib/esm/widget/components/groupsHelpers.d.ts +0 -10
- package/lib/esm/widget/components/groupsHelpers.js +0 -75
- package/lib/esm/widget/components/groupsHelpers.js.map +0 -1
- package/lib/esm/widget/components/hooks/useGroupsOperations.d.ts +0 -20
- package/lib/esm/widget/components/hooks/useGroupsOperations.js +0 -63
- package/lib/esm/widget/components/hooks/useGroupsOperations.js.map +0 -1
- package/lib/esm/widget/components/hooks/useMappingsOperations.d.ts +0 -35
- package/lib/esm/widget/components/hooks/useMappingsOperations.js +0 -116
- package/lib/esm/widget/components/hooks/useMappingsOperations.js.map +0 -1
- package/lib/esm/widget/components/utils.d.ts +0 -16
- package/lib/esm/widget/components/utils.js +0 -85
- package/lib/esm/widget/components/utils.js.map +0 -1
- package/lib/esm/widget/components/utils.scss +0 -18
- package/lib/esm/widget/components/viewerUtils.d.ts +0 -30
- package/lib/esm/widget/components/viewerUtils.js +0 -268
- package/lib/esm/widget/components/viewerUtils.js.map +0 -1
- package/lib/esm/widget/hooks/useFetchData.js +0 -37
- package/lib/esm/widget/hooks/useFetchData.js.map +0 -1
- package/lib/esm/widget/hooks/useFormulaValidation.d.ts +0 -6
- package/lib/esm/widget/hooks/useFormulaValidation.js +0 -25
- package/lib/esm/widget/hooks/useFormulaValidation.js.map +0 -1
- package/lib/esm/widget/hooks/useValidator.js.map +0 -1
- package/lib/esm/widget/hooks/useVisualization.js +0 -64
- package/lib/esm/widget/hooks/useVisualization.js.map +0 -1
- package/lib/esm/widget/utils.d.ts +0 -5
- package/lib/esm/widget/utils.js +0 -8
- package/lib/esm/widget/utils.js.map +0 -1
- /package/lib/cjs/{widget/components → WidgetShell}/GroupingMapping.scss +0 -0
- /package/lib/cjs/{widget/components → WidgetShell}/GroupingMappingContent.d.ts +0 -0
- /package/lib/cjs/{widget/components → WidgetShell}/GroupingMappingHeader.d.ts +0 -0
- /package/lib/cjs/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.d.ts +0 -0
- /package/lib/cjs/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.js +0 -0
- /package/lib/cjs/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.scss +0 -0
- /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupAction.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupAction.scss +0 -0
- /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetails.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsActionPanel.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsActionPanel.js +0 -0
- /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsStep.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsStep.js +0 -0
- /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsStep.scss +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupColorLegend.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupColorLegend.js +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupColorLegend.scss +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupMenuActions.scss +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupsAddButton.js +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupsAddButton.scss +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupsShowHideButtons.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupsVisualization.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupsVisualizationActions.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/GroupsVisualizationActions.scss +0 -0
- /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilder.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilder.js +0 -0
- /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderActionPanel.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderActionPanel.js +0 -0
- /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.js +0 -0
- /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.scss +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/ToggleGroupVisibility.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/ToggleGroupVisibility.js +0 -0
- /package/lib/cjs/{widget/components → components/Groups}/ToggleGroupVisibility.scss +0 -0
- /package/lib/cjs/{widget → components/Groups}/hooks/useVisualization.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings}/BlockingOverlay.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings}/BlockingOverlay.scss +0 -0
- /package/lib/cjs/{widget/components → components/Mappings}/ConfirmMappingsImport.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings}/ConfirmMappingsImport.scss +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Editing}/MappingAction.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Editing}/MappingAction.scss +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Extraction}/ExtractionLogCustomFilter.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Extraction}/ExtractionMessageModal.scss +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Extraction}/ExtractionStatusIcon.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Extraction}/ExtractionStatusIcon.js +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Import}/MappingImportWizardModal.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Import}/MappingImportWizardModal.scss +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectIModel.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectIModel.scss +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectITwin.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectITwin.scss +0 -0
- /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectMapping.scss +0 -0
- /package/lib/cjs/{widget/components → components/Mappings}/MappingViewActionGroup.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings}/MappingViewActionGroup.js +0 -0
- /package/lib/cjs/{widget/components → components/Mappings}/MappingsView.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Mappings}/MappingsView.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyAction.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyAction.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyActionWithVisuals.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyActionWithVisuals.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyTable.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyTable.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/SharedCalculatedPropertyForms.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/SharedCalculatedPropertyForms.js +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CustomCalculations}/CustomCalculationAction.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties/CustomCalculations}/CustomCalculationTable.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/GroupColorToggle.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/GroupInformationPanel.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/GroupInformationPanel.js +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/GroupInformationPanel.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyAction.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyAction.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyTable.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyUtils.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyUtils.js +0 -0
- /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/SaveModal.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/SaveModal.js +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyAction.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyAction.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyMenu.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyMenu.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyMenuWithVisualization.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyMenuWithVisualization.js +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyMenuWithVisualization.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyNameCell.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyNameCell.js +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyTable.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyTable.scss +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyTableToolbar.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyTableToolbar.js +0 -0
- /package/lib/cjs/{widget/components → components/Properties}/PropertyTableToolbar.scss +0 -0
- /package/lib/cjs/{widget → components/Properties}/hooks/useFetchData.d.ts +0 -0
- /package/lib/cjs/{widget → components/Properties}/hooks/useValidator.d.ts +0 -0
- /package/lib/cjs/{widget → components/Properties}/hooks/useValidator.js +0 -0
- /package/lib/cjs/{widget/components → components/SharedComponents}/ActionPanel.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/SharedComponents}/ActionPanel.scss +0 -0
- /package/lib/cjs/{widget/components → components/SharedComponents}/DeleteModal.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/SharedComponents}/DeleteModal.scss +0 -0
- /package/lib/cjs/{widget/components → components/SharedComponents}/StatusIcon.d.ts +0 -0
- /package/lib/cjs/{widget/components → components/SharedComponents}/StatusIcon.js +0 -0
- /package/lib/cjs/{widget/components → components/SharedComponents}/StatusIcon.scss +0 -0
- /package/lib/cjs/{widget/components → components}/context/ExtractionClientContext.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/context/ExtractionClientContext.js +0 -0
- /package/lib/cjs/{widget/components → components}/context/GroupingApiConfigContext.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/context/GroupingApiConfigContext.js +0 -0
- /package/lib/cjs/{widget/components → components}/context/GroupingMappingCustomUIContext.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/context/GroupingMappingCustomUIContext.js +0 -0
- /package/lib/cjs/{widget/components → components}/context/IModelsClientContext.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/context/IModelsClientContext.js +0 -0
- /package/lib/cjs/{widget/components → components}/context/ITwinsClientContext.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/context/ITwinsClientContext.js +0 -0
- /package/lib/cjs/{widget/components → components}/context/MappingClientContext.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/context/MappingClientContext.js +0 -0
- /package/lib/cjs/{widget/components → components}/context/PropertiesContext.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/context/PropertiesContext.js +0 -0
- /package/lib/cjs/{widget/components → components}/context/PropertyGridWrapperContext.js +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/DefaultGroupingUI.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/DefaultGroupingUI.js +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/GroupQueryBuilderCustomUI.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/GroupQueryBuilderCustomUI.scss +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/GroupingMappingCustomUI.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/GroupingMappingCustomUI.js +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/ManualGroupingCustomUI.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/ManualGroupingCustomUI.scss +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/SearchGroupingCustomUI.d.ts +0 -0
- /package/lib/cjs/{widget/components → components}/customUI/SearchGroupingCustomUI.scss +0 -0
- /package/lib/esm/{widget/components → WidgetShell}/GroupingMapping.scss +0 -0
- /package/lib/esm/{widget/components → WidgetShell}/GroupingMappingContent.d.ts +0 -0
- /package/lib/esm/{widget/components → WidgetShell}/GroupingMappingHeader.d.ts +0 -0
- /package/lib/esm/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.d.ts +0 -0
- /package/lib/esm/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.js +0 -0
- /package/lib/esm/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.scss +0 -0
- /package/lib/esm/{widget/components → components/Groups/Editing}/GroupAction.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups/Editing}/GroupAction.scss +0 -0
- /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetails.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsActionPanel.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsActionPanel.js +0 -0
- /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsStep.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsStep.js +0 -0
- /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsStep.scss +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupColorLegend.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupColorLegend.js +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupColorLegend.scss +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupMenuActions.scss +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupsAddButton.js +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupsAddButton.scss +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupsShowHideButtons.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupsVisualization.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupsVisualizationActions.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups}/GroupsVisualizationActions.scss +0 -0
- /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilder.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilder.js +0 -0
- /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderActionPanel.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderActionPanel.js +0 -0
- /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.js +0 -0
- /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.scss +0 -0
- /package/lib/esm/{widget/components → components/Groups}/ToggleGroupVisibility.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Groups}/ToggleGroupVisibility.js +0 -0
- /package/lib/esm/{widget/components → components/Groups}/ToggleGroupVisibility.scss +0 -0
- /package/lib/esm/{widget → components/Groups}/hooks/useVisualization.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings}/BlockingOverlay.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings}/BlockingOverlay.scss +0 -0
- /package/lib/esm/{widget/components → components/Mappings}/ConfirmMappingsImport.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings}/ConfirmMappingsImport.scss +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Editing}/MappingAction.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Editing}/MappingAction.scss +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Extraction}/ExtractionLogCustomFilter.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Extraction}/ExtractionMessageModal.scss +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Extraction}/ExtractionStatusIcon.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Extraction}/ExtractionStatusIcon.js +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Import}/MappingImportWizardModal.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Import}/MappingImportWizardModal.scss +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Import}/SelectIModel.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Import}/SelectIModel.scss +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Import}/SelectITwin.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Import}/SelectITwin.scss +0 -0
- /package/lib/esm/{widget/components → components/Mappings/Import}/SelectMapping.scss +0 -0
- /package/lib/esm/{widget/components → components/Mappings}/MappingViewActionGroup.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings}/MappingViewActionGroup.js +0 -0
- /package/lib/esm/{widget/components → components/Mappings}/MappingsView.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Mappings}/MappingsView.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyAction.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyAction.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyActionWithVisuals.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyActionWithVisuals.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyTable.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyTable.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/SharedCalculatedPropertyForms.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/SharedCalculatedPropertyForms.js +0 -0
- /package/lib/esm/{widget/components → components/Properties/CustomCalculations}/CustomCalculationAction.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties/CustomCalculations}/CustomCalculationTable.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties}/GroupColorToggle.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties}/GroupInformationPanel.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties}/GroupInformationPanel.js +0 -0
- /package/lib/esm/{widget/components → components/Properties}/GroupInformationPanel.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyAction.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyAction.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyTable.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyUtils.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyUtils.js +0 -0
- /package/lib/esm/{widget/components → components/Properties/GroupProperties}/SaveModal.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties/GroupProperties}/SaveModal.js +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyAction.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyAction.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyMenu.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyMenu.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyMenuWithVisualization.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyMenuWithVisualization.js +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyMenuWithVisualization.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyNameCell.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyNameCell.js +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyTable.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyTable.scss +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyTableToolbar.d.ts +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyTableToolbar.js +0 -0
- /package/lib/esm/{widget/components → components/Properties}/PropertyTableToolbar.scss +0 -0
- /package/lib/esm/{widget → components/Properties}/hooks/useFetchData.d.ts +0 -0
- /package/lib/esm/{widget → components/Properties}/hooks/useValidator.d.ts +0 -0
- /package/lib/esm/{widget → components/Properties}/hooks/useValidator.js +0 -0
- /package/lib/esm/{widget/components → components/SharedComponents}/ActionPanel.d.ts +0 -0
- /package/lib/esm/{widget/components → components/SharedComponents}/ActionPanel.scss +0 -0
- /package/lib/esm/{widget/components → components/SharedComponents}/DeleteModal.d.ts +0 -0
- /package/lib/esm/{widget/components → components/SharedComponents}/DeleteModal.scss +0 -0
- /package/lib/esm/{widget/components → components/SharedComponents}/StatusIcon.d.ts +0 -0
- /package/lib/esm/{widget/components → components/SharedComponents}/StatusIcon.js +0 -0
- /package/lib/esm/{widget/components → components/SharedComponents}/StatusIcon.scss +0 -0
- /package/lib/esm/{widget/components → components}/context/ExtractionClientContext.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/context/ExtractionClientContext.js +0 -0
- /package/lib/esm/{widget/components → components}/context/GroupingApiConfigContext.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/context/GroupingApiConfigContext.js +0 -0
- /package/lib/esm/{widget/components → components}/context/GroupingMappingCustomUIContext.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/context/GroupingMappingCustomUIContext.js +0 -0
- /package/lib/esm/{widget/components → components}/context/IModelsClientContext.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/context/IModelsClientContext.js +0 -0
- /package/lib/esm/{widget/components → components}/context/ITwinsClientContext.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/context/ITwinsClientContext.js +0 -0
- /package/lib/esm/{widget/components → components}/context/MappingClientContext.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/context/MappingClientContext.js +0 -0
- /package/lib/esm/{widget/components → components}/context/PropertiesContext.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/context/PropertiesContext.js +0 -0
- /package/lib/esm/{widget/components → components}/context/PropertyGridWrapperContext.js +0 -0
- /package/lib/esm/{widget/components → components}/customUI/DefaultGroupingUI.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/customUI/DefaultGroupingUI.js +0 -0
- /package/lib/esm/{widget/components → components}/customUI/GroupQueryBuilderCustomUI.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/customUI/GroupQueryBuilderCustomUI.scss +0 -0
- /package/lib/esm/{widget/components → components}/customUI/GroupingMappingCustomUI.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/customUI/GroupingMappingCustomUI.js +0 -0
- /package/lib/esm/{widget/components → components}/customUI/ManualGroupingCustomUI.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/customUI/ManualGroupingCustomUI.scss +0 -0
- /package/lib/esm/{widget/components → components}/customUI/SearchGroupingCustomUI.d.ts +0 -0
- /package/lib/esm/{widget/components → components}/customUI/SearchGroupingCustomUI.scss +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Fieldset, LabeledInput, Text, ToggleSwitch } from "@itwin/itwinui-react";
|
|
6
|
+
import React, { useState } from "react";
|
|
7
|
+
import ActionPanel from "../../SharedComponents/ActionPanel";
|
|
8
|
+
import useValidator, { NAME_REQUIREMENTS } from "../../Properties/hooks/useValidator";
|
|
9
|
+
import "./MappingAction.scss";
|
|
10
|
+
import { useMappingClient } from "../../context/MappingClientContext";
|
|
11
|
+
import { useGroupingMappingApiConfig } from "../../context/GroupingApiConfigContext";
|
|
12
|
+
import { handleError, handleInputChange } from "../../../common/utils";
|
|
13
|
+
const defaultDisplayStrings = {
|
|
14
|
+
mappingDetails: "Mapping Details",
|
|
15
|
+
};
|
|
16
|
+
export const MappingAction = ({ mapping, onSaveSuccess, onClickCancel, displayStrings: userDisplayStrings }) => {
|
|
17
|
+
const { getAccessToken, iModelId } = useGroupingMappingApiConfig();
|
|
18
|
+
const mappingClient = useMappingClient();
|
|
19
|
+
const [values, setValues] = useState({
|
|
20
|
+
name: mapping?.mappingName ?? "",
|
|
21
|
+
description: mapping?.description ?? "",
|
|
22
|
+
extractionEnabled: mapping?.extractionEnabled ?? true,
|
|
23
|
+
});
|
|
24
|
+
const [validator, showValidationMessage] = useValidator();
|
|
25
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
26
|
+
const displayStrings = React.useMemo(() => ({ ...defaultDisplayStrings, ...userDisplayStrings }), [userDisplayStrings]);
|
|
27
|
+
const onSave = async () => {
|
|
28
|
+
try {
|
|
29
|
+
if (!validator.allValid()) {
|
|
30
|
+
showValidationMessage(true);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
setIsLoading(true);
|
|
34
|
+
const accessToken = await getAccessToken();
|
|
35
|
+
mapping
|
|
36
|
+
? await mappingClient.updateMapping(accessToken, iModelId, mapping.id, {
|
|
37
|
+
mappingName: values.name,
|
|
38
|
+
description: values.description,
|
|
39
|
+
extractionEnabled: values.extractionEnabled,
|
|
40
|
+
})
|
|
41
|
+
: await mappingClient.createMapping(accessToken, iModelId, {
|
|
42
|
+
mappingName: values.name,
|
|
43
|
+
description: values.description,
|
|
44
|
+
extractionEnabled: values.extractionEnabled,
|
|
45
|
+
});
|
|
46
|
+
setValues({
|
|
47
|
+
name: mapping?.mappingName ?? "",
|
|
48
|
+
description: mapping?.description ?? "",
|
|
49
|
+
extractionEnabled: mapping?.extractionEnabled ?? true,
|
|
50
|
+
});
|
|
51
|
+
onSaveSuccess();
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
handleError(error.status);
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
setIsLoading(false);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return (React.createElement(React.Fragment, null,
|
|
61
|
+
React.createElement("div", { className: 'gmw-details-form-container' },
|
|
62
|
+
React.createElement(Fieldset, { legend: displayStrings.mappingDetails, className: 'gmw-details-form' },
|
|
63
|
+
React.createElement(Text, { variant: 'small', as: 'small', className: 'gmw-field-legend' }, "Asterisk * indicates mandatory fields."),
|
|
64
|
+
React.createElement(LabeledInput, { id: 'name', name: 'name', label: 'Name', value: values.name, required: true, onChange: (event) => {
|
|
65
|
+
handleInputChange(event, values, setValues);
|
|
66
|
+
validator.showMessageFor("name");
|
|
67
|
+
}, message: validator.message("name", values.name, NAME_REQUIREMENTS), status: validator.message("name", values.name, NAME_REQUIREMENTS)
|
|
68
|
+
? "negative"
|
|
69
|
+
: undefined, onBlur: () => {
|
|
70
|
+
validator.showMessageFor("name");
|
|
71
|
+
}, onBlurCapture: (event) => {
|
|
72
|
+
handleInputChange(event, values, setValues);
|
|
73
|
+
validator.showMessageFor("name");
|
|
74
|
+
} }),
|
|
75
|
+
React.createElement(LabeledInput, { id: 'description', name: 'description', label: 'Description', value: values.description, onChange: (event) => {
|
|
76
|
+
handleInputChange(event, values, setValues);
|
|
77
|
+
} }),
|
|
78
|
+
React.createElement(ToggleSwitch, { id: 'extractionEnabled', name: 'extractionEnabled', label: 'Extract data from iModel', labelPosition: "right", checked: values.extractionEnabled, onChange: (event) => {
|
|
79
|
+
setValues({ ...values, extractionEnabled: event.currentTarget.checked });
|
|
80
|
+
} }))),
|
|
81
|
+
React.createElement(ActionPanel, { onSave: onSave, onCancel: onClickCancel, isSavingDisabled: !values.name, isLoading: isLoading })));
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=MappingAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MappingAction.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/Editing/MappingAction.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;A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mB,EACtB,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAC,0BAA0B,EAChC,aAAa,EAAC,OAAO,EACrB,OAAO,EAAE,MAAM,CAAC,iBAAiB,EACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;wBAClB,SAAS,CAAC,EAAE,GAAG,MAAM,EAAE,iBAAiB,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC;oBAC3E,CAAC,GACD,CACO,CACP;QACN,oBAAC,WAAW,IACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,aAAa,EACvB,gBAAgB,EAAE,CAAC,MAAM,CAAC,IAAI,EAC9B,SAAS,EAAE,SAAS,GACpB,CACD,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { Fieldset, LabeledInput, Text, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport React, { useState } from \"react\";\nimport ActionPanel from \"../../SharedComponents/ActionPanel\";\nimport useValidator, { NAME_REQUIREMENTS } from \"../../Properties/hooks/useValidator\";\nimport \"./MappingAction.scss\";\nimport { useMappingClient } from \"../../context/MappingClientContext\";\nimport type { Mapping } from \"@itwin/insights-client\";\nimport { useGroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport { handleError, handleInputChange } from \"../../../common/utils\";\n\nconst defaultDisplayStrings = {\n mappingDetails: \"Mapping Details\",\n};\n\nexport interface MappingActionProps {\n mapping?: Mapping;\n onSaveSuccess: () => void;\n onClickCancel?: () => void;\n displayStrings?: Partial<typeof defaultDisplayStrings>;\n}\n\nexport const MappingAction = ({ mapping, onSaveSuccess, onClickCancel, displayStrings: userDisplayStrings }: MappingActionProps) => {\n const { getAccessToken, iModelId } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n const [values, setValues] = useState({\n name: mapping?.mappingName ?? \"\",\n description: mapping?.description ?? \"\",\n extractionEnabled: mapping?.extractionEnabled ?? true,\n });\n const [validator, showValidationMessage] = useValidator();\n const [isLoading, setIsLoading] = useState<boolean>(false);\n\n const displayStrings = React.useMemo(\n () => ({ ...defaultDisplayStrings, ...userDisplayStrings }),\n [userDisplayStrings]\n );\n\n const onSave = async () => {\n try {\n if (!validator.allValid()) {\n showValidationMessage(true);\n return;\n }\n setIsLoading(true);\n const accessToken = await getAccessToken();\n mapping\n ? await mappingClient.updateMapping(accessToken, iModelId, mapping.id, {\n mappingName: values.name,\n description: values.description,\n extractionEnabled: values.extractionEnabled,\n })\n : await mappingClient.createMapping(accessToken, iModelId, {\n mappingName: values.name,\n description: values.description,\n extractionEnabled: values.extractionEnabled,\n });\n setValues({\n name: mapping?.mappingName ?? \"\",\n description: mapping?.description ?? \"\",\n extractionEnabled: mapping?.extractionEnabled ?? true,\n });\n onSaveSuccess();\n } catch (error: any) {\n handleError(error.status);\n } finally {\n setIsLoading(false);\n }\n };\n\n return (\n <>\n <div className='gmw-details-form-container'>\n <Fieldset legend={displayStrings.mappingDetails} className='gmw-details-form'>\n <Text variant='small' as='small' className='gmw-field-legend'>\n Asterisk * indicates mandatory fields.\n </Text>\n <LabeledInput\n id='name'\n name='name'\n label='Name'\n value={values.name}\n required\n onChange={(event) => {\n handleInputChange(event, values, setValues);\n validator.showMessageFor(\"name\");\n }}\n message={validator.message(\"name\", values.name, NAME_REQUIREMENTS)}\n status={\n validator.message(\"name\", values.name, NAME_REQUIREMENTS)\n ? \"negative\"\n : undefined\n }\n onBlur={() => {\n validator.showMessageFor(\"name\");\n }}\n onBlurCapture={(event) => {\n handleInputChange(event, values, setValues);\n validator.showMessageFor(\"name\");\n }}\n />\n <LabeledInput\n id='description'\n name='description'\n label='Description'\n value={values.description}\n onChange={(event) => {\n handleInputChange(event, values, setValues);\n }}\n />\n <ToggleSwitch\n id='extractionEnabled'\n name='extractionEnabled'\n label='Extract data from iModel'\n labelPosition=\"right\"\n checked={values.extractionEnabled}\n onChange={(event) => {\n setValues({ ...values, extractionEnabled: event.currentTarget.checked });\n }}\n />\n </Fieldset>\n </div>\n <ActionPanel\n onSave={onSave}\n onCancel={onClickCancel}\n isSavingDisabled={!values.name}\n isLoading={isLoading}\n />\n </>\n );\n};\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseFilter, FilterButtonBar, InputGroup, Radio } from "@itwin/itwinui-react";
|
|
2
|
+
import React, { useMemo, useState } from "react";
|
|
3
|
+
export function ExtractionLogCustomFilter({ column, clearFilter, setFilter, }) {
|
|
4
|
+
const [value, setValue] = useState(column.filterValue);
|
|
5
|
+
const translatedLabels = useMemo(() => ({
|
|
6
|
+
filter: "Filter",
|
|
7
|
+
clear: "Clear",
|
|
8
|
+
}), []);
|
|
9
|
+
const filterOptionList = useMemo(() => {
|
|
10
|
+
if (column.Header === "Category") {
|
|
11
|
+
return ["GroupQuery", "NoMatchesForECProperties", "QueryTranslation", "QueryExecution"];
|
|
12
|
+
}
|
|
13
|
+
return ["Info", "Warning", "Error", "Trace"];
|
|
14
|
+
}, [column]);
|
|
15
|
+
return (React.createElement(BaseFilter, null,
|
|
16
|
+
React.createElement(InputGroup, { displayStyle: "default" }, filterOptionList.map((option, id) => (React.createElement(Radio, { name: "filterOption", key: id, label: option, defaultChecked: option === value, onChange: () => setValue(option) })))),
|
|
17
|
+
React.createElement(FilterButtonBar, { setFilter: () => setFilter(value), clearFilter: clearFilter, translatedLabels: translatedLabels })));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=ExtractionLogCustomFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtractionLogCustomFilter.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/Extraction/ExtractionLogCustomFilter.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAG,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,sBAAsB,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------------------------------------------------------------------------------------\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 { TableFilterProps } from \"@itwin/itwinui-react\";\nimport { BaseFilter, FilterButtonBar, InputGroup, Radio } from \"@itwin/itwinui-react\";\nimport React, { useMemo, useState } from \"react\";\n\nexport function ExtractionLogCustomFilter({\n column,\n clearFilter,\n setFilter,\n}: TableFilterProps<Record<string, unknown>>): React.ReactElement {\n const [value, setValue] = useState<string | undefined>(\n column.filterValue as string | undefined\n );\n const translatedLabels = useMemo(() => ({\n filter: \"Filter\",\n clear: \"Clear\",\n }), []\n );\n const filterOptionList = useMemo(() => {\n if(column.Header === \"Category\"){\n return [\"GroupQuery\", \"NoMatchesForECProperties\", \"QueryTranslation\", \"QueryExecution\"];\n }\n return [\"Info\", \"Warning\", \"Error\", \"Trace\"];\n },[column]);\n return (\n <BaseFilter>\n <InputGroup displayStyle=\"default\">\n {filterOptionList.map((option, id) => (\n <Radio\n name=\"filterOption\"\n key={id}\n label={option}\n defaultChecked={option === value}\n onChange={() => setValue(option)}\n />\n ))}\n </InputGroup>\n <FilterButtonBar\n setFilter={() => setFilter(value)}\n clearFilter={clearFilter}\n translatedLabels={translatedLabels}\n />\n </BaseFilter>\n );\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ExtractionMessageData } from "../hooks/useMappingsOperations";
|
|
3
|
+
import "./ExtractionMessageModal.scss";
|
|
4
|
+
export interface ExtractionMessageModalProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
extractionMessageData: ExtractionMessageData[];
|
|
8
|
+
timestamp: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const ExtractionMessageModal: ({ isOpen, onClose, extractionMessageData, timestamp }: ExtractionMessageModalProps) => JSX.Element;
|
|
11
|
+
//# sourceMappingURL=ExtractionMessageModal.d.ts.map
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Button, DefaultCell, Icon, Modal, ModalButtonBar, ModalContent, Table, tableFilters, Text } from "@itwin/itwinui-react";
|
|
6
|
+
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
7
|
+
import "./ExtractionMessageModal.scss";
|
|
8
|
+
import { SvgClock } from "@itwin/itwinui-icons-react";
|
|
9
|
+
import { StatusIcon } from "../../SharedComponents/StatusIcon";
|
|
10
|
+
import { ExtractionLogCustomFilter } from "./ExtractionLogCustomFilter";
|
|
11
|
+
import { useGroupingMappingApiConfig } from "../../context/GroupingApiConfigContext";
|
|
12
|
+
import { useMappingClient } from "../../context/MappingClientContext";
|
|
13
|
+
import { useMappingsOperations } from "../hooks/useMappingsOperations";
|
|
14
|
+
export const ExtractionMessageModal = ({ isOpen, onClose, extractionMessageData, timestamp }) => {
|
|
15
|
+
const [formattedExtractionMessage, setFormattedExtractionMessage] = useState([]);
|
|
16
|
+
const groupingMappingApiConfig = useGroupingMappingApiConfig();
|
|
17
|
+
const mappingClient = useMappingClient();
|
|
18
|
+
const { mappings } = useMappingsOperations({ ...groupingMappingApiConfig, mappingClient });
|
|
19
|
+
const [formattedTimestamp, setFormattedTimestamp] = useState("");
|
|
20
|
+
const getMappingName = useCallback(async (mappingId) => {
|
|
21
|
+
return mappings.find((mapping) => { return mapping.id === mappingId; })?.mappingName ?? "";
|
|
22
|
+
}, [mappings]);
|
|
23
|
+
const getGroupNames = useCallback(async (mappingId, groupId, groupsCache) => {
|
|
24
|
+
const accessToken = await groupingMappingApiConfig.getAccessToken();
|
|
25
|
+
if (!groupsCache.has(mappingId)) {
|
|
26
|
+
const groups = await mappingClient.getGroups(accessToken, groupingMappingApiConfig.iModelId, mappingId);
|
|
27
|
+
groupsCache.set(mappingId, groups);
|
|
28
|
+
}
|
|
29
|
+
return groupsCache.get(mappingId)?.find((group) => { return group.id === groupId; })?.groupName ?? "";
|
|
30
|
+
}, [groupingMappingApiConfig, mappingClient]);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const formatMessages = async () => {
|
|
33
|
+
const groupsCache = new Map();
|
|
34
|
+
const extractionMessageDataPromises = extractionMessageData.map(async (extractionMessage) => {
|
|
35
|
+
let replacedMessage = extractionMessage.message;
|
|
36
|
+
if (extractionMessage.message.includes("iModel")) {
|
|
37
|
+
replacedMessage = replacedMessage.replace(/iModel [\w-]+/, "iModel");
|
|
38
|
+
}
|
|
39
|
+
if (replacedMessage.includes("MappingId:")) {
|
|
40
|
+
const splittedMessage = replacedMessage.split(" ");
|
|
41
|
+
const mappingId = splittedMessage[splittedMessage.indexOf("MappingId:") + 1];
|
|
42
|
+
const groupId = splittedMessage[splittedMessage.indexOf("GroupId:") + 1];
|
|
43
|
+
const mappingName = getMappingName(mappingId);
|
|
44
|
+
const groupName = await getGroupNames(mappingId, groupId, groupsCache);
|
|
45
|
+
replacedMessage = replacedMessage.replace(/MappingId: [\w-]+/, `Mapping: ${mappingName}`);
|
|
46
|
+
replacedMessage = replacedMessage.replace(/GroupId: [\w-]+/, `Group: ${groupName}`);
|
|
47
|
+
}
|
|
48
|
+
return { ...extractionMessage, message: replacedMessage };
|
|
49
|
+
});
|
|
50
|
+
const newMessages = await Promise.all(extractionMessageDataPromises);
|
|
51
|
+
setFormattedExtractionMessage(newMessages);
|
|
52
|
+
};
|
|
53
|
+
void formatMessages();
|
|
54
|
+
}, [extractionMessageData, groupingMappingApiConfig, mappings, mappingClient, getGroupNames, getMappingName]);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const newDateTime = new Date(timestamp);
|
|
57
|
+
const options = {
|
|
58
|
+
day: "numeric", month: "numeric", year: "numeric",
|
|
59
|
+
hour: "2-digit", minute: "2-digit",
|
|
60
|
+
};
|
|
61
|
+
setFormattedTimestamp(newDateTime.toLocaleString(undefined, options));
|
|
62
|
+
}, [timestamp]);
|
|
63
|
+
const translatedLabels = useMemo(() => ({
|
|
64
|
+
filter: "Filter",
|
|
65
|
+
clear: "Clear",
|
|
66
|
+
}), []);
|
|
67
|
+
const columns = useMemo(() => [
|
|
68
|
+
{
|
|
69
|
+
id: "category",
|
|
70
|
+
Header: "Category",
|
|
71
|
+
accessor: "category",
|
|
72
|
+
fieldType: "text",
|
|
73
|
+
Filter: ExtractionLogCustomFilter,
|
|
74
|
+
filter: "equals",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "level",
|
|
78
|
+
Header: "Level",
|
|
79
|
+
accessor: "level",
|
|
80
|
+
cellRenderer: ({ cellElementProps, cellProps }) => {
|
|
81
|
+
const level = cellProps.row.original.level;
|
|
82
|
+
return (React.createElement(DefaultCell, { cellElementProps: cellElementProps, cellProps: cellProps, startIcon: level === "Error" ? (React.createElement(StatusIcon, { status: 'error' })) : level === "Warning" ? (React.createElement(StatusIcon, { status: 'warning' })) : level === "Info" ? (React.createElement(StatusIcon, { status: 'informational' })) : React.createElement(StatusIcon, { status: 'trace' }) }, level));
|
|
83
|
+
},
|
|
84
|
+
Filter: ExtractionLogCustomFilter,
|
|
85
|
+
filter: "equals",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "message",
|
|
89
|
+
Header: "Message",
|
|
90
|
+
accessor: "message",
|
|
91
|
+
width: "25vw",
|
|
92
|
+
fieldType: "text",
|
|
93
|
+
Filter: tableFilters.TextFilter(translatedLabels),
|
|
94
|
+
},
|
|
95
|
+
], [translatedLabels]);
|
|
96
|
+
return (React.createElement(Modal, { className: "gmw-message-modal-container", title: "Extraction Logs", isOpen: isOpen, onClose: onClose, closeOnExternalClick: false },
|
|
97
|
+
React.createElement(ModalContent, null,
|
|
98
|
+
React.createElement("div", { className: "gmw-timestamp-icon" },
|
|
99
|
+
React.createElement(Icon, { title: "Extraction Timestamp", size: "medium" },
|
|
100
|
+
React.createElement(SvgClock, null)),
|
|
101
|
+
React.createElement(Text, null, formattedTimestamp)),
|
|
102
|
+
React.createElement(Table, { columns: columns, data: formattedExtractionMessage, emptyTableContent: "", emptyFilteredTableContent: "No results match filters.", className: "gmw-extraction-message-table-container" })),
|
|
103
|
+
React.createElement(ModalButtonBar, null,
|
|
104
|
+
React.createElement(Button, { onClick: onClose, styleType: "high-visibility" }, "Close"))));
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=ExtractionMessageModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtractionMessageModal.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/Extraction/ExtractionMessageModal.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACjI,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGzE,OAAO,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAUvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAA+B,EAAE,EAAE;IAC3H,MAAM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AyB,EAAC,2BAA2B,EACrD,SAAS,EAAC,wCAAwC,GAClD,CACW;QACf,oBAAC,cAAc;YACb,oBAAC,MAAM,IACL,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,iBAAiB,YAGpB,CACM,CACX,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { Button, DefaultCell, Icon, Modal, ModalButtonBar, ModalContent, Table, tableFilters, Text } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport type { CreateTypeFromInterface } from \"../../../common/utils\";\nimport type { ExtractionMessageData } from \"../hooks/useMappingsOperations\";\nimport \"./ExtractionMessageModal.scss\";\nimport { SvgClock } from \"@itwin/itwinui-icons-react\";\nimport type { CellRendererProps, Column } from \"react-table\";\nimport { StatusIcon } from \"../../SharedComponents/StatusIcon\";\nimport { ExtractionLogCustomFilter } from \"./ExtractionLogCustomFilter\";\nimport { useGroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport { useMappingClient } from \"../../context/MappingClientContext\";\nimport { useMappingsOperations } from \"../hooks/useMappingsOperations\";\nimport type { Group } from \"@itwin/insights-client\";\n\nexport interface ExtractionMessageModalProps {\n isOpen: boolean;\n onClose: () => void;\n extractionMessageData: ExtractionMessageData[];\n timestamp: string;\n}\n\nexport const ExtractionMessageModal = ({ isOpen, onClose, extractionMessageData, timestamp }: ExtractionMessageModalProps) => {\n const [formattedExtractionMessage, setFormattedExtractionMessage] = useState<ExtractionMessageData[]>([]);\n const groupingMappingApiConfig = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n const { mappings } = useMappingsOperations({...groupingMappingApiConfig, mappingClient});\n const [formattedTimestamp, setFormattedTimestamp] = useState<string>(\"\");\n\n const getMappingName = useCallback(async (mappingId: string) => {\n return mappings.find((mapping) => {return mapping.id === mappingId;})?.mappingName ?? \"\";\n }, [mappings]);\n\n const getGroupNames = useCallback(async (mappingId: string, groupId: string, groupsCache: Map<string, Group[]>) => {\n const accessToken = await groupingMappingApiConfig.getAccessToken();\n if(!groupsCache.has(mappingId)){\n const groups = await mappingClient.getGroups(\n accessToken,\n groupingMappingApiConfig.iModelId,\n mappingId\n );\n groupsCache.set(mappingId, groups);\n }\n return groupsCache.get(mappingId)?.find((group) => {return group.id === groupId;})?.groupName ?? \"\";\n }, [groupingMappingApiConfig, mappingClient]);\n\n useEffect(() => {\n const formatMessages = async () => {\n const groupsCache = new Map<string,Group[]>();\n const extractionMessageDataPromises = extractionMessageData.map(async (extractionMessage) => {\n let replacedMessage = extractionMessage.message;\n if(extractionMessage.message.includes(\"iModel\")){\n replacedMessage = replacedMessage.replace(/iModel [\\w-]+/, \"iModel\");\n }\n if(replacedMessage.includes(\"MappingId:\")){\n const splittedMessage = replacedMessage.split(\" \");\n const mappingId = splittedMessage[splittedMessage.indexOf(\"MappingId:\") + 1];\n const groupId = splittedMessage[splittedMessage.indexOf(\"GroupId:\") + 1];\n const mappingName = getMappingName(mappingId);\n const groupName = await getGroupNames(mappingId, groupId, groupsCache);\n replacedMessage = replacedMessage.replace(/MappingId: [\\w-]+/, `Mapping: ${mappingName}`);\n replacedMessage = replacedMessage.replace(/GroupId: [\\w-]+/, `Group: ${groupName}`);\n }\n return {...extractionMessage, message: replacedMessage};\n });\n\n const newMessages = await Promise.all(extractionMessageDataPromises);\n setFormattedExtractionMessage(newMessages);\n };\n void formatMessages();\n }, [extractionMessageData, groupingMappingApiConfig, mappings, mappingClient, getGroupNames, getMappingName]);\n\n useEffect(() => {\n const newDateTime: Date = new Date(timestamp);\n const options: Intl.DateTimeFormatOptions = {\n day: \"numeric\", month: \"numeric\", year: \"numeric\",\n hour: \"2-digit\", minute: \"2-digit\",\n };\n setFormattedTimestamp(newDateTime.toLocaleString(undefined, options));\n }, [timestamp]);\n\n const translatedLabels = useMemo(() => ({\n filter: \"Filter\",\n clear: \"Clear\",\n }), []);\n\n const columns = useMemo(\n (): Column<CreateTypeFromInterface<ExtractionMessageData>>[] => [\n {\n id: \"category\",\n Header: \"Category\",\n accessor: \"category\",\n fieldType: \"text\",\n Filter: ExtractionLogCustomFilter,\n filter: \"equals\",\n },\n {\n id: \"level\",\n Header: \"Level\",\n accessor: \"level\",\n cellRenderer: ({ cellElementProps, cellProps }: CellRendererProps<CreateTypeFromInterface<ExtractionMessageData>>) => {\n const level = cellProps.row.original.level;\n return (\n <DefaultCell\n cellElementProps={cellElementProps}\n cellProps={cellProps}\n startIcon={\n level === \"Error\" ? (\n <StatusIcon status='error' />\n ) : level === \"Warning\" ? (\n <StatusIcon status='warning' />\n ) : level === \"Info\" ? (\n <StatusIcon status='informational' />\n ) : <StatusIcon status='trace' />\n }\n >\n {level}\n </DefaultCell>\n );\n },\n Filter: ExtractionLogCustomFilter,\n filter: \"equals\",\n },\n {\n id: \"message\",\n Header: \"Message\",\n accessor: \"message\",\n width: \"25vw\",\n fieldType: \"text\",\n Filter: tableFilters.TextFilter(translatedLabels),\n },\n ],\n [translatedLabels]\n );\n return (\n <Modal className=\"gmw-message-modal-container\"\n title=\"Extraction Logs\"\n isOpen={isOpen}\n onClose={onClose}\n closeOnExternalClick={false}\n >\n <ModalContent>\n <div className=\"gmw-timestamp-icon\">\n <Icon\n title=\"Extraction Timestamp\"\n size=\"medium\"\n >\n <SvgClock />\n </Icon>\n <Text>{formattedTimestamp}</Text>\n </div>\n <Table<CreateTypeFromInterface<ExtractionMessageData>>\n columns={columns}\n data={formattedExtractionMessage}\n emptyTableContent={\"\"}\n emptyFilteredTableContent=\"No results match filters.\"\n className=\"gmw-extraction-message-table-container\"\n />\n </ModalContent>\n <ModalButtonBar>\n <Button\n onClick={onClose}\n styleType=\"high-visibility\"\n >\n Close\n </Button>\n </ModalButtonBar>\n </Modal>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtractionStatusIcon.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/Extraction/ExtractionStatusIcon.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAQxD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAA6B,EAAE,EAAE;IACtG,OAAO,CACL,oBAAC,OAAO,IAAC,OAAO,EAAE,WAAW;QAC3B,oBAAC,UAAU,IAAC,SAAS,EAAC,YAAY,EAAC,OAAO,EAAE,OAAO;YACjD,oBAAC,kBAAkB,IAAC,MAAM,EAAE,UAAU;gBACpC,oBAAC,UAAU,OAAG,CACK,CACV,CACL,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { IconButton, NotificationMarker, Tooltip } from \"@itwin/itwinui-react\";\nimport React from \"react\";\nimport { SvgProcess } from \"@itwin/itwinui-icons-react\";\n\nexport interface ExtractionStatusIconProps {\n iconStatus: \"negative\" | \"positive\" | \"warning\";\n onClick: () => void;\n iconMessage: string;\n}\n\nexport const ExtractionStatusIcon = ({ iconStatus, onClick, iconMessage }: ExtractionStatusIconProps) => {\n return (\n <Tooltip content={iconMessage}>\n <IconButton styleType='borderless' onClick={onClick}>\n <NotificationMarker status={iconStatus}>\n <SvgProcess />\n </NotificationMarker>\n </IconButton>\n </Tooltip>\n );\n};\n"]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Stepper } from "@itwin/itwinui-react";
|
|
2
|
+
import { Modal } from "@itwin/itwinui-react";
|
|
3
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
4
|
+
import ConfirmMappingImport from "../ConfirmMappingsImport";
|
|
5
|
+
import "./MappingImportWizardModal.scss";
|
|
6
|
+
import SelectIModel from "./SelectIModel";
|
|
7
|
+
import SelectITwin from "./SelectITwin";
|
|
8
|
+
import SelectMappings from "./SelectMappings";
|
|
9
|
+
import { useGroupingMappingApiConfig } from "../../context/GroupingApiConfigContext";
|
|
10
|
+
import { createIModelsClient, IModelsClientContext } from "../../context/IModelsClientContext";
|
|
11
|
+
import { createITwinsClient, ITwinsClientContext } from "../../context/ITwinsClientContext";
|
|
12
|
+
const defaultDisplayStrings = {
|
|
13
|
+
mappings: "Mappings",
|
|
14
|
+
iTwins: "iTwins",
|
|
15
|
+
iTwinNumber: "Number",
|
|
16
|
+
iTwinName: "Name",
|
|
17
|
+
iTwinStatus: "Status",
|
|
18
|
+
iModels: "iModels",
|
|
19
|
+
iModelName: "Name",
|
|
20
|
+
iModelDescription: "Description",
|
|
21
|
+
};
|
|
22
|
+
export const MappingImportWizardModal = ({ show, setShow, onFinish, displayStrings: userDisplayStrings, }) => {
|
|
23
|
+
const { prefix } = useGroupingMappingApiConfig();
|
|
24
|
+
const [currentStep, setCurrentStep] = useState(0);
|
|
25
|
+
const [iTwinType, setITwinType] = useState(0);
|
|
26
|
+
const [selectedITwinId, setSelectedITwinId] = useState("");
|
|
27
|
+
const [selectedIModelId, setSelectedIModelId] = useState("");
|
|
28
|
+
const [selectedMappings, setSelectedMappings] = useState([]);
|
|
29
|
+
const [importing, setImporting] = useState(false);
|
|
30
|
+
const [iTwinsClient, setITwinsClient] = useState(createITwinsClient(prefix));
|
|
31
|
+
const [iModelsClient, setIModelsClient] = useState(createIModelsClient(prefix));
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
setITwinsClient(createITwinsClient(prefix));
|
|
34
|
+
setIModelsClient(createIModelsClient(prefix));
|
|
35
|
+
}, [prefix]);
|
|
36
|
+
const displayStrings = React.useMemo(() => ({ ...defaultDisplayStrings, ...userDisplayStrings }), [userDisplayStrings]);
|
|
37
|
+
const steps = useRef([
|
|
38
|
+
{
|
|
39
|
+
name: "Select iTwin",
|
|
40
|
+
description: `Select the source iTwin to bring your ${displayStrings.mappings} from.`,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "Select iModel",
|
|
44
|
+
description: "Select an iModel within the iTwin you have selected.",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: `Select ${displayStrings.mappings}`,
|
|
48
|
+
description: `Select one or more ${displayStrings.mappings} to import.`,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "Rename & Confirm",
|
|
52
|
+
description: "Rename and confirm your selections. Click import when finished.",
|
|
53
|
+
},
|
|
54
|
+
]);
|
|
55
|
+
const onClose = async () => {
|
|
56
|
+
setShow(false);
|
|
57
|
+
setCurrentStep(0);
|
|
58
|
+
await onFinish();
|
|
59
|
+
};
|
|
60
|
+
return (React.createElement(Modal, { title: `Import ${displayStrings.mappings}`, modalRootId: 'grouping-mapping-widget', isOpen: show, closeOnEsc: false, closeOnExternalClick: false, isDismissible: !importing, styleType: 'fullPage', onClose: async () => {
|
|
61
|
+
await onClose();
|
|
62
|
+
} },
|
|
63
|
+
React.createElement("div", { className: 'gmw-import-wizard-body-container' },
|
|
64
|
+
React.createElement(Stepper, { currentStep: currentStep, steps: steps.current, onStepClick: importing ? undefined : (index) => setCurrentStep(index) }),
|
|
65
|
+
(() => {
|
|
66
|
+
switch (currentStep) {
|
|
67
|
+
case 0:
|
|
68
|
+
return (React.createElement(ITwinsClientContext.Provider, { value: iTwinsClient },
|
|
69
|
+
React.createElement("div", { className: "gmw-table-container" },
|
|
70
|
+
React.createElement(SelectITwin, { onSelect: (iTwinId) => {
|
|
71
|
+
setSelectedITwinId(iTwinId);
|
|
72
|
+
setCurrentStep(1);
|
|
73
|
+
}, onCancel: onClose, onChangeITwinType: setITwinType, displayStrings: displayStrings, defaultITwinType: iTwinType }))));
|
|
74
|
+
case 1:
|
|
75
|
+
return (React.createElement(IModelsClientContext.Provider, { value: iModelsClient },
|
|
76
|
+
React.createElement("div", { className: "gmw-table-container" },
|
|
77
|
+
React.createElement(SelectIModel, { iTwinId: selectedITwinId, onSelect: (iModelId) => {
|
|
78
|
+
setSelectedIModelId(iModelId);
|
|
79
|
+
setCurrentStep(2);
|
|
80
|
+
}, backFn: () => setCurrentStep(currentStep - 1), onCancel: onClose }))));
|
|
81
|
+
case 2:
|
|
82
|
+
case 3:
|
|
83
|
+
// Preserve table state within Select Mappings
|
|
84
|
+
return (React.createElement(React.Fragment, null,
|
|
85
|
+
React.createElement("div", { style: { display: currentStep === 2 ? "flex" : "none" }, className: "gmw-mapping-container" },
|
|
86
|
+
React.createElement(SelectMappings, { iModelId: selectedIModelId, onSelect: (selectedMappings) => {
|
|
87
|
+
setSelectedMappings(selectedMappings);
|
|
88
|
+
setCurrentStep(3);
|
|
89
|
+
}, onCancel: onClose, backFn: () => setCurrentStep(currentStep - 1), displayStrings: displayStrings })),
|
|
90
|
+
currentStep === 3 && (React.createElement(ConfirmMappingImport, { sourceiModelId: selectedIModelId, selectedMappings: selectedMappings, importing: importing, setImporting: setImporting, setSelectedMappings: setSelectedMappings, backFn: () => setCurrentStep(currentStep - 1), onCancel: onClose, onFinish: async () => {
|
|
91
|
+
await onClose();
|
|
92
|
+
setImporting(false);
|
|
93
|
+
}, displayStrings: displayStrings }))));
|
|
94
|
+
default:
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
})())));
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=MappingImportWizardModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MappingImportWizardModal.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/Import/MappingImportWizardModal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,KAAK,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CACA,CACJ,CAAC;oBACJ;wBACE,OAAO,IAAI,CAAC;iBACf;YACH,CAAC,CAAC,EAAE,CACA,CACA,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { IModelsClient } from \"@itwin/imodels-client-management\";\nimport type { ITwinsAccessClient } from \"@itwin/itwins-client\";\nimport type { StepProperties } from \"@itwin/itwinui-react\";\nimport { Stepper } from \"@itwin/itwinui-react\";\nimport { Modal } from \"@itwin/itwinui-react\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport ConfirmMappingImport from \"../ConfirmMappingsImport\";\nimport type { IMappingTyped } from \"../Mappings\";\nimport \"./MappingImportWizardModal.scss\";\nimport SelectIModel from \"./SelectIModel\";\nimport SelectITwin from \"./SelectITwin\";\nimport SelectMappings from \"./SelectMappings\";\nimport { useGroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport { createIModelsClient, IModelsClientContext } from \"../../context/IModelsClientContext\";\nimport { createITwinsClient, ITwinsClientContext } from \"../../context/ITwinsClientContext\";\n\nconst defaultDisplayStrings = {\n mappings: \"Mappings\",\n iTwins: \"iTwins\",\n iTwinNumber: \"Number\",\n iTwinName: \"Name\",\n iTwinStatus: \"Status\",\n iModels: \"iModels\",\n iModelName: \"Name\",\n iModelDescription: \"Description\",\n};\ninterface MappingImportWizardModalProps {\n show: boolean;\n setShow: (show: boolean) => void;\n onFinish: () => Promise<void>;\n displayStrings?: Partial<typeof defaultDisplayStrings>;\n}\n\nexport const MappingImportWizardModal = ({\n show,\n setShow,\n onFinish,\n displayStrings: userDisplayStrings,\n}: MappingImportWizardModalProps) => {\n const { prefix } = useGroupingMappingApiConfig();\n const [currentStep, setCurrentStep] = useState<number>(0);\n const [iTwinType, setITwinType] = useState<number>(0);\n const [selectedITwinId, setSelectedITwinId] = useState<string>(\"\");\n const [selectedIModelId, setSelectedIModelId] = useState<string>(\"\");\n const [selectedMappings, setSelectedMappings] = useState<IMappingTyped[]>([]);\n const [importing, setImporting] = useState<boolean>(false);\n const [iTwinsClient, setITwinsClient] = useState<ITwinsAccessClient>(createITwinsClient(prefix));\n const [iModelsClient, setIModelsClient] = useState<IModelsClient>(createIModelsClient(prefix));\n\n useEffect(() => {\n setITwinsClient(createITwinsClient(prefix));\n setIModelsClient(createIModelsClient(prefix));\n }, [prefix]);\n\n const displayStrings = React.useMemo(\n () => ({ ...defaultDisplayStrings, ...userDisplayStrings }),\n [userDisplayStrings]\n );\n\n const steps = useRef<StepProperties[]>([\n {\n name: \"Select iTwin\",\n description: `Select the source iTwin to bring your ${displayStrings.mappings} from.`,\n },\n {\n name: \"Select iModel\",\n description: \"Select an iModel within the iTwin you have selected.\",\n },\n {\n name: `Select ${displayStrings.mappings}`,\n description: `Select one or more ${displayStrings.mappings} to import.`,\n },\n {\n name: \"Rename & Confirm\",\n description:\n \"Rename and confirm your selections. Click import when finished.\",\n },\n ]);\n\n const onClose = async () => {\n setShow(false);\n setCurrentStep(0);\n await onFinish();\n };\n\n return (\n <Modal\n title={`Import ${displayStrings.mappings}`}\n modalRootId='grouping-mapping-widget'\n isOpen={show}\n closeOnEsc={false}\n closeOnExternalClick={false}\n isDismissible={!importing}\n styleType='fullPage'\n onClose={async () => {\n await onClose();\n }}\n >\n <div className='gmw-import-wizard-body-container'>\n <Stepper\n currentStep={currentStep}\n steps={steps.current}\n onStepClick={\n importing ? undefined : (index: number) => setCurrentStep(index)\n }\n />\n\n {(() => {\n switch (currentStep) {\n case 0:\n return (\n <ITwinsClientContext.Provider value={iTwinsClient}>\n <div className=\"gmw-table-container\">\n <SelectITwin\n onSelect={(iTwinId) => {\n setSelectedITwinId(iTwinId);\n setCurrentStep(1);\n }}\n onCancel={onClose}\n onChangeITwinType={setITwinType}\n displayStrings={displayStrings}\n defaultITwinType={iTwinType}\n />\n </div>\n </ITwinsClientContext.Provider>\n );\n case 1:\n return (\n <IModelsClientContext.Provider value={iModelsClient}>\n <div className=\"gmw-table-container\">\n <SelectIModel\n iTwinId={selectedITwinId}\n onSelect={(iModelId) => {\n setSelectedIModelId(iModelId);\n setCurrentStep(2);\n }}\n backFn={() => setCurrentStep(currentStep - 1)}\n onCancel={onClose}\n />\n </div>\n </IModelsClientContext.Provider>\n );\n case 2:\n case 3:\n // Preserve table state within Select Mappings\n return (\n <>\n <div\n style={{ display: currentStep === 2 ? \"flex\" : \"none\" }}\n className=\"gmw-mapping-container\"\n >\n <SelectMappings\n iModelId={selectedIModelId}\n onSelect={(selectedMappings) => {\n setSelectedMappings(selectedMappings);\n setCurrentStep(3);\n }}\n onCancel={onClose}\n backFn={() => setCurrentStep(currentStep - 1)}\n displayStrings={displayStrings}\n />\n </div>\n {currentStep === 3 && (\n <ConfirmMappingImport\n sourceiModelId={selectedIModelId}\n selectedMappings={selectedMappings}\n importing={importing}\n setImporting={setImporting}\n setSelectedMappings={setSelectedMappings}\n backFn={() => setCurrentStep(currentStep - 1)}\n onCancel={onClose}\n onFinish={async () => {\n await onClose();\n setImporting(false);\n }}\n displayStrings={displayStrings}\n />\n )}\n </>\n );\n default:\n return null;\n }\n })()}\n </div>\n </Modal>\n );\n};\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Button, Table, tableFilters, TablePaginator } from "@itwin/itwinui-react";
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
+
import "./SelectIModel.scss";
|
|
4
|
+
import { useGroupingMappingApiConfig } from "../../context/GroupingApiConfigContext";
|
|
5
|
+
import { useIModelsClient } from "../../context/IModelsClientContext";
|
|
6
|
+
import { handleError } from "../../../common/utils";
|
|
7
|
+
const defaultDisplayStrings = {
|
|
8
|
+
iModels: "iModels",
|
|
9
|
+
iModelName: "Name",
|
|
10
|
+
iModelDescription: "Description",
|
|
11
|
+
};
|
|
12
|
+
const fetchIModels = async (setIModels, setIsLoading, getAccessToken, iTwinId, iModelsClient) => {
|
|
13
|
+
try {
|
|
14
|
+
setIModels([]);
|
|
15
|
+
setIsLoading(true);
|
|
16
|
+
const iModelIterator = iModelsClient.iModels.getRepresentationList({
|
|
17
|
+
authorization: async () => {
|
|
18
|
+
const token = await getAccessToken();
|
|
19
|
+
const splitToken = token.split(" ");
|
|
20
|
+
return {
|
|
21
|
+
scheme: splitToken[0],
|
|
22
|
+
token: splitToken[1],
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
urlParams: {
|
|
26
|
+
iTwinId,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
const iModels = [];
|
|
30
|
+
for await (const iModel of iModelIterator) {
|
|
31
|
+
iModels.push(iModel);
|
|
32
|
+
}
|
|
33
|
+
setIModels(iModels);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
handleError(error.status);
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
setIsLoading(false);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const SelectIModel = ({ iTwinId: iTwinId, onSelect, onCancel, backFn, displayStrings: userDisplayStrings, }) => {
|
|
43
|
+
const { getAccessToken } = useGroupingMappingApiConfig();
|
|
44
|
+
const iModelsClient = useIModelsClient();
|
|
45
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
46
|
+
const [iModels, setIModels] = useState([]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
void fetchIModels(setIModels, setIsLoading, getAccessToken, iTwinId, iModelsClient);
|
|
49
|
+
}, [getAccessToken, iModelsClient, setIsLoading, iTwinId]);
|
|
50
|
+
const displayStrings = React.useMemo(() => ({ ...defaultDisplayStrings, ...userDisplayStrings }), [userDisplayStrings]);
|
|
51
|
+
const iModelsColumns = useMemo(() => [
|
|
52
|
+
{
|
|
53
|
+
Header: "Table",
|
|
54
|
+
columns: [
|
|
55
|
+
{
|
|
56
|
+
id: "iModelName",
|
|
57
|
+
Header: `${displayStrings.iModelName}`,
|
|
58
|
+
accessor: "name",
|
|
59
|
+
Filter: tableFilters.TextFilter(),
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "iModelDescription",
|
|
63
|
+
Header: `${displayStrings.iModelDescription}`,
|
|
64
|
+
accessor: "description",
|
|
65
|
+
Filter: tableFilters.TextFilter(),
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
], [displayStrings.iModelName, displayStrings.iModelDescription]);
|
|
70
|
+
const pageSizeList = useMemo(() => [10, 25, 50], []);
|
|
71
|
+
const paginator = useCallback((props) => (React.createElement(TablePaginator, { ...props, pageSizeList: pageSizeList })), [pageSizeList]);
|
|
72
|
+
return (React.createElement("div", { className: 'gmw-select-imodel-table-container' },
|
|
73
|
+
React.createElement(Table, { data: iModels, columns: iModelsColumns, className: 'gmw-select-imodel-table', emptyTableContent: `No ${displayStrings.iModels} available.`, isSortable: true, isLoading: isLoading, onRowClick: (_, row) => {
|
|
74
|
+
onSelect(row.original.id);
|
|
75
|
+
}, paginatorRenderer: paginator }),
|
|
76
|
+
React.createElement("div", { className: 'gmw-import-action-panel' },
|
|
77
|
+
React.createElement(Button, { onClick: backFn }, "Back"),
|
|
78
|
+
React.createElement(Button, { onClick: onCancel }, "Cancel"))));
|
|
79
|
+
};
|
|
80
|
+
export default SelectIModel;
|
|
81
|
+
//# sourceMappingURL=SelectIModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectIModel.js","sourceRoot":"","sources":["../../../../../src/components/Mappings/Import/SelectIModel.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EA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AAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACrD,MAAM,SAAS,GAAG,WAAW,CAC3B,CAAC,KAAkC,EAAE,EAAE,CAAC,CACtC,oBAAC,cAAc,OAAK,KAAK,EAAE,YAAY,EAAE,YAAY,GAAI,CAC1D,EACD,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,OAAO,CACL,6BAAK,SAAS,EAAC,mCAAmC;QAChD,oBAAC,KAAK,IACJ,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,cAAc,EACvB,SAAS,EAAC,yBAAyB,EACnC,iBAAiB,EAAE,MAAM,cAAc,CAAC,OAAO,aAAa,EAC5D,UAAU,QACV,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;gBACrB,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC5B,CAAC,EACD,iBAAiB,EAAE,SAAS,GAC5B;QACF,6BAAK,SAAS,EAAC,yBAAyB;YACtC,oBAAC,MAAM,IAAC,OAAO,EAAE,MAAM,WAAe;YACtC,oBAAC,MAAM,IAAC,OAAO,EAAE,QAAQ,aAAiB,CACtC,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { EntityListIterator, IModel, IModelsClient } from \"@itwin/imodels-client-management\";\nimport type { TablePaginatorRendererProps } from \"@itwin/itwinui-react\";\nimport { Button, Table, tableFilters, TablePaginator } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport type { CreateTypeFromInterface } from \"../../../common/utils\";\nimport \"./SelectIModel.scss\";\nimport type { GetAccessTokenFn } from \"../../context/GroupingApiConfigContext\";\nimport { useGroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport { useIModelsClient } from \"../../context/IModelsClientContext\";\nimport { handleError } from \"../../../common/utils\";\n\ntype IIModelTyped = CreateTypeFromInterface<IModel>;\n\nconst defaultDisplayStrings = {\n iModels: \"iModels\",\n iModelName: \"Name\",\n iModelDescription: \"Description\",\n};\n\nconst fetchIModels = async (\n setIModels: (iModels: IModel[]) => void,\n setIsLoading: (isLoading: boolean) => void,\n getAccessToken: GetAccessTokenFn,\n iTwinId: string,\n iModelsClient: IModelsClient,\n) => {\n try {\n setIModels([]);\n setIsLoading(true);\n const iModelIterator: EntityListIterator<IModel> = iModelsClient.iModels.getRepresentationList({\n authorization: async () => {\n const token = await getAccessToken();\n const splitToken = token.split(\" \");\n return {\n scheme: splitToken[0],\n token: splitToken[1],\n };\n },\n urlParams: {\n iTwinId,\n },\n });\n const iModels: IModel[] = [];\n for await (const iModel of iModelIterator) {\n iModels.push(iModel);\n }\n setIModels(iModels);\n } catch (error: any) {\n handleError(error.status);\n } finally {\n setIsLoading(false);\n }\n};\n\ninterface SelectIModelProps {\n iTwinId: string;\n onSelect: (iModelId: string) => void;\n onCancel: () => void;\n backFn: () => void;\n displayStrings?: Partial<typeof defaultDisplayStrings>;\n}\nconst SelectIModel = ({\n iTwinId: iTwinId,\n onSelect,\n onCancel,\n backFn,\n displayStrings: userDisplayStrings,\n}: SelectIModelProps) => {\n const { getAccessToken } = useGroupingMappingApiConfig();\n const iModelsClient = useIModelsClient();\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [iModels, setIModels] = useState<IModel[]>([]);\n\n useEffect(() => {\n void fetchIModels(setIModels, setIsLoading, getAccessToken, iTwinId, iModelsClient);\n }, [getAccessToken, iModelsClient, setIsLoading, iTwinId]);\n\n const displayStrings = React.useMemo(\n () => ({ ...defaultDisplayStrings, ...userDisplayStrings }),\n [userDisplayStrings]\n );\n\n const iModelsColumns = useMemo(\n () => [\n {\n Header: \"Table\",\n columns: [\n {\n id: \"iModelName\",\n Header: `${displayStrings.iModelName}`,\n accessor: \"name\",\n Filter: tableFilters.TextFilter(),\n },\n {\n id: \"iModelDescription\",\n Header: `${displayStrings.iModelDescription}`,\n accessor: \"description\",\n Filter: tableFilters.TextFilter(),\n },\n ],\n },\n ],\n [displayStrings.iModelName, displayStrings.iModelDescription]\n );\n\n const pageSizeList = useMemo(() => [10, 25, 50], []);\n const paginator = useCallback(\n (props: TablePaginatorRendererProps) => (\n <TablePaginator {...props} pageSizeList={pageSizeList} />\n ),\n [pageSizeList]\n );\n\n return (\n <div className='gmw-select-imodel-table-container'>\n <Table<IIModelTyped>\n data={iModels}\n columns={iModelsColumns}\n className='gmw-select-imodel-table'\n emptyTableContent={`No ${displayStrings.iModels} available.`}\n isSortable\n isLoading={isLoading}\n onRowClick={(_, row) => {\n onSelect(row.original.id);\n }}\n paginatorRenderer={paginator}\n />\n <div className='gmw-import-action-panel'>\n <Button onClick={backFn}>Back</Button>\n <Button onClick={onCancel}>Cancel</Button>\n </div>\n </div>\n );\n};\n\nexport default SelectIModel;\n"]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ITwinSubClass } from "@itwin/itwins-client";
|
|
2
|
+
import { SvgCalendar, SvgList, SvgStarHollow } from "@itwin/itwinui-icons-react";
|
|
3
|
+
import { Button, Tab, Table, tableFilters, TablePaginator, Tabs } from "@itwin/itwinui-react";
|
|
4
|
+
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
5
|
+
import "./SelectITwin.scss";
|
|
6
|
+
import { useGroupingMappingApiConfig } from "../../context/GroupingApiConfigContext";
|
|
7
|
+
import { useITwinsClient } from "../../context/ITwinsClientContext";
|
|
8
|
+
import { handleError } from "../../../common/utils";
|
|
9
|
+
const defaultDisplayStrings = {
|
|
10
|
+
iTwins: "iTwins",
|
|
11
|
+
iTwinNumber: "Number",
|
|
12
|
+
iTwinName: "Name",
|
|
13
|
+
iTwinStatus: "Status",
|
|
14
|
+
};
|
|
15
|
+
const tabsWithIcons = [
|
|
16
|
+
React.createElement(Tab, { key: "favorite", label: "Favorite iTwins", startIcon: React.createElement(SvgStarHollow, null) }),
|
|
17
|
+
React.createElement(Tab, { key: "recents", label: "Recent iTwins", startIcon: React.createElement(SvgCalendar, null) }),
|
|
18
|
+
React.createElement(Tab, { key: "all", label: "My iTwins", startIcon: React.createElement(SvgList, null) }),
|
|
19
|
+
];
|
|
20
|
+
const fetchITwins = async (setITwins, setIsLoading, getAccessToken, iTwinsClient, iTwinType) => {
|
|
21
|
+
try {
|
|
22
|
+
setITwins([]);
|
|
23
|
+
setIsLoading(true);
|
|
24
|
+
const accessToken = await getAccessToken();
|
|
25
|
+
let iTwinsResponse;
|
|
26
|
+
switch (iTwinType) {
|
|
27
|
+
case 0:
|
|
28
|
+
iTwinsResponse = await iTwinsClient.queryFavoritesAsync(accessToken, ITwinSubClass.Project);
|
|
29
|
+
break;
|
|
30
|
+
case 1:
|
|
31
|
+
iTwinsResponse = await iTwinsClient.queryRecentsAsync(accessToken, ITwinSubClass.Project);
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
iTwinsResponse = await iTwinsClient.queryAsync(accessToken, ITwinSubClass.Project);
|
|
35
|
+
}
|
|
36
|
+
setITwins(iTwinsResponse.data);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
handleError(error.status);
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
setIsLoading(false);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const SelectITwin = ({ onSelect, onCancel, onChangeITwinType, displayStrings: userDisplayStrings, defaultITwinType = 0, }) => {
|
|
46
|
+
const { getAccessToken } = useGroupingMappingApiConfig();
|
|
47
|
+
const iTwinsClient = useITwinsClient();
|
|
48
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
49
|
+
const [iTwins, setITwins] = useState([]);
|
|
50
|
+
const [iTwinType, setITwinType] = useState(defaultITwinType);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
void fetchITwins(setITwins, setIsLoading, getAccessToken, iTwinsClient, iTwinType);
|
|
53
|
+
}, [getAccessToken, iTwinsClient, setIsLoading, iTwinType]);
|
|
54
|
+
const displayStrings = React.useMemo(() => ({ ...defaultDisplayStrings, ...userDisplayStrings }), [userDisplayStrings]);
|
|
55
|
+
const iTwinsColumns = useMemo(() => [
|
|
56
|
+
{
|
|
57
|
+
Header: "Table",
|
|
58
|
+
columns: [
|
|
59
|
+
{
|
|
60
|
+
id: "iTwinNumber",
|
|
61
|
+
Header: `${displayStrings.iTwinNumber}`,
|
|
62
|
+
accessor: "number",
|
|
63
|
+
Filter: tableFilters.TextFilter(),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "iTwinName",
|
|
67
|
+
Header: `${displayStrings.iTwinName}`,
|
|
68
|
+
accessor: "displayName",
|
|
69
|
+
Filter: tableFilters.TextFilter(),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: "iTwinStatus",
|
|
73
|
+
Header: `${displayStrings.iTwinStatus}`,
|
|
74
|
+
accessor: "status",
|
|
75
|
+
Filter: tableFilters.TextFilter(),
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
], [displayStrings.iTwinNumber, displayStrings.iTwinName, displayStrings.iTwinStatus]);
|
|
80
|
+
const pageSizeList = useMemo(() => [10, 25, 50], []);
|
|
81
|
+
const paginator = useCallback((props) => (React.createElement(TablePaginator, { ...props, pageSizeList: pageSizeList })), [pageSizeList]);
|
|
82
|
+
return (React.createElement("div", { className: "gmw-select-itwin-table-container" },
|
|
83
|
+
React.createElement(Tabs, { orientation: "horizontal", labels: tabsWithIcons, onTabSelected: (type) => {
|
|
84
|
+
onChangeITwinType(type);
|
|
85
|
+
setITwinType(type);
|
|
86
|
+
}, activeIndex: iTwinType, type: "borderless", contentClassName: "gmw-table-holding-tab" }),
|
|
87
|
+
React.createElement(Table, { data: iTwins, columns: iTwinsColumns, className: 'gmw-select-itwin-table', emptyTableContent: `No ${displayStrings.iTwins} available.`, isSortable: true, isLoading: isLoading, onRowClick: (_, row) => {
|
|
88
|
+
onSelect(row.original.id);
|
|
89
|
+
}, paginatorRenderer: paginator }),
|
|
90
|
+
React.createElement("div", { className: "gmw-import-action-panel" },
|
|
91
|
+
React.createElement(Button, { onClick: onCancel }, "Cancel"))));
|
|
92
|
+
};
|
|
93
|
+
export default SelectITwin;
|
|
94
|
+
//# sourceMappingURL=SelectITwin.js.map
|