@itwin/grouping-mapping-widget 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/README.md +26 -0
- package/lib/cjs/api/GroupQueryBuilderApi.d.ts +15 -0
- package/lib/cjs/api/GroupQueryBuilderApi.js +27 -0
- package/lib/cjs/api/GroupQueryBuilderApi.js.map +1 -0
- package/lib/cjs/api/generated/api.d.ts +3222 -0
- package/lib/cjs/api/generated/api.js +5291 -0
- package/lib/cjs/api/generated/api.js.map +1 -0
- package/lib/cjs/api/generated/configuration.d.ts +56 -0
- package/lib/cjs/api/generated/configuration.js +30 -0
- package/lib/cjs/api/generated/configuration.js.map +1 -0
- package/lib/cjs/api/generated/index.d.ts +14 -0
- package/lib/cjs/api/generated/index.js +31 -0
- package/lib/cjs/api/generated/index.js.map +1 -0
- package/lib/cjs/api/reportingClient.d.ts +34 -0
- package/lib/cjs/api/reportingClient.js +177 -0
- package/lib/cjs/api/reportingClient.js.map +1 -0
- package/lib/cjs/decorators/BboxDimensionsDecorator.d.ts +82 -0
- package/lib/cjs/decorators/BboxDimensionsDecorator.js +418 -0
- package/lib/cjs/decorators/BboxDimensionsDecorator.js.map +1 -0
- package/lib/cjs/grouping-mapping-widget.d.ts +7 -0
- package/lib/cjs/grouping-mapping-widget.js +27 -0
- package/lib/cjs/grouping-mapping-widget.js.map +1 -0
- package/lib/cjs/widget/GroupingMappingWidget.d.ts +7 -0
- package/lib/cjs/widget/GroupingMappingWidget.js +51 -0
- package/lib/cjs/widget/GroupingMappingWidget.js.map +1 -0
- package/lib/cjs/widget/components/ActionPanel.d.ts +11 -0
- package/lib/cjs/widget/components/ActionPanel.js +37 -0
- package/lib/cjs/widget/components/ActionPanel.js.map +1 -0
- package/lib/cjs/widget/components/ActionPanel.scss +12 -0
- package/lib/cjs/widget/components/CalculatedPropertyAction.d.ts +14 -0
- package/lib/cjs/widget/components/CalculatedPropertyAction.js +160 -0
- package/lib/cjs/widget/components/CalculatedPropertyAction.js.map +1 -0
- package/lib/cjs/widget/components/CalculatedPropertyAction.scss +27 -0
- package/lib/cjs/widget/components/CalculatedPropertyTable.d.ts +18 -0
- package/lib/cjs/widget/components/CalculatedPropertyTable.js +109 -0
- package/lib/cjs/widget/components/CalculatedPropertyTable.js.map +1 -0
- package/lib/cjs/widget/components/ConfirmMappingsImport.d.ts +16 -0
- package/lib/cjs/widget/components/ConfirmMappingsImport.js +112 -0
- package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +1 -0
- package/lib/cjs/widget/components/ConfirmMappingsImport.scss +84 -0
- package/lib/cjs/widget/components/CustomCalculationAction.d.ts +14 -0
- package/lib/cjs/widget/components/CustomCalculationAction.js +103 -0
- package/lib/cjs/widget/components/CustomCalculationAction.js.map +1 -0
- package/lib/cjs/widget/components/CustomCalculationAction.scss +16 -0
- package/lib/cjs/widget/components/CustomCalculationTable.d.ts +18 -0
- package/lib/cjs/widget/components/CustomCalculationTable.js +114 -0
- package/lib/cjs/widget/components/CustomCalculationTable.js.map +1 -0
- package/lib/cjs/widget/components/DeleteModal.d.ts +12 -0
- package/lib/cjs/widget/components/DeleteModal.js +64 -0
- package/lib/cjs/widget/components/DeleteModal.js.map +1 -0
- package/lib/cjs/widget/components/DeleteModal.scss +12 -0
- package/lib/cjs/widget/components/GroupAction.d.ts +12 -0
- package/lib/cjs/widget/components/GroupAction.js +166 -0
- package/lib/cjs/widget/components/GroupAction.js.map +1 -0
- package/lib/cjs/widget/components/GroupAction.scss +19 -0
- package/lib/cjs/widget/components/GroupPropertyAction.d.ts +17 -0
- package/lib/cjs/widget/components/GroupPropertyAction.js +372 -0
- package/lib/cjs/widget/components/GroupPropertyAction.js.map +1 -0
- package/lib/cjs/widget/components/GroupPropertyAction.scss +36 -0
- package/lib/cjs/widget/components/GroupPropertyTable.d.ts +18 -0
- package/lib/cjs/widget/components/GroupPropertyTable.js +109 -0
- package/lib/cjs/widget/components/GroupPropertyTable.js.map +1 -0
- package/lib/cjs/widget/components/GroupQueryBuilder.scss +24 -0
- package/lib/cjs/widget/components/GroupQueryBuilderContainer.d.ts +4 -0
- package/lib/cjs/widget/components/GroupQueryBuilderContainer.js +66 -0
- package/lib/cjs/widget/components/GroupQueryBuilderContainer.js.map +1 -0
- package/lib/cjs/widget/components/GroupQueryBuilderContext.d.ts +13 -0
- package/lib/cjs/widget/components/GroupQueryBuilderContext.js +37 -0
- package/lib/cjs/widget/components/GroupQueryBuilderContext.js.map +1 -0
- package/lib/cjs/widget/components/Grouping.d.ts +12 -0
- package/lib/cjs/widget/components/Grouping.js +214 -0
- package/lib/cjs/widget/components/Grouping.js.map +1 -0
- package/lib/cjs/widget/components/Grouping.scss +15 -0
- package/lib/cjs/widget/components/GroupingMapping.d.ts +5 -0
- package/lib/cjs/widget/components/GroupingMapping.js +34 -0
- package/lib/cjs/widget/components/GroupingMapping.js.map +1 -0
- package/lib/cjs/widget/components/GroupingMapping.scss +24 -0
- package/lib/cjs/widget/components/Mapping.d.ts +7 -0
- package/lib/cjs/widget/components/Mapping.js +162 -0
- package/lib/cjs/widget/components/Mapping.js.map +1 -0
- package/lib/cjs/widget/components/Mapping.scss +26 -0
- package/lib/cjs/widget/components/MappingAction.d.ts +11 -0
- package/lib/cjs/widget/components/MappingAction.js +98 -0
- package/lib/cjs/widget/components/MappingAction.js.map +1 -0
- package/lib/cjs/widget/components/MappingAction.scss +16 -0
- package/lib/cjs/widget/components/MappingImportWizardModal.d.ts +10 -0
- package/lib/cjs/widget/components/MappingImportWizardModal.js +102 -0
- package/lib/cjs/widget/components/MappingImportWizardModal.js.map +1 -0
- package/lib/cjs/widget/components/MappingImportWizardModal.scss +21 -0
- package/lib/cjs/widget/components/PropertyMenu.d.ts +24 -0
- package/lib/cjs/widget/components/PropertyMenu.js +141 -0
- package/lib/cjs/widget/components/PropertyMenu.js.map +1 -0
- package/lib/cjs/widget/components/PropertyMenu.scss +48 -0
- package/lib/cjs/widget/components/QueryBuilder.d.ts +39 -0
- package/lib/cjs/widget/components/QueryBuilder.js +345 -0
- package/lib/cjs/widget/components/QueryBuilder.js.map +1 -0
- package/lib/cjs/widget/components/SelectIModel.d.ts +12 -0
- package/lib/cjs/widget/components/SelectIModel.js +42 -0
- package/lib/cjs/widget/components/SelectIModel.js.map +1 -0
- package/lib/cjs/widget/components/SelectIModel.scss +20 -0
- package/lib/cjs/widget/components/SelectMapping.scss +17 -0
- package/lib/cjs/widget/components/SelectMappings.d.ts +12 -0
- package/lib/cjs/widget/components/SelectMappings.js +82 -0
- package/lib/cjs/widget/components/SelectMappings.js.map +1 -0
- package/lib/cjs/widget/components/SelectProject.d.ts +10 -0
- package/lib/cjs/widget/components/SelectProject.js +71 -0
- package/lib/cjs/widget/components/SelectProject.js.map +1 -0
- package/lib/cjs/widget/components/SelectProject.scss +38 -0
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.d.ts +33 -0
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.js +92 -0
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.js.map +1 -0
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.scss +16 -0
- package/lib/cjs/widget/components/property-grid/PrimitivePropertyRenderer.d.ts +26 -0
- package/lib/cjs/widget/components/property-grid/PrimitivePropertyRenderer.js +58 -0
- package/lib/cjs/widget/components/property-grid/PrimitivePropertyRenderer.js.map +1 -0
- package/lib/cjs/widget/components/property-grid/PropertyGrid.d.ts +67 -0
- package/lib/cjs/widget/components/property-grid/PropertyGrid.js +198 -0
- package/lib/cjs/widget/components/property-grid/PropertyGrid.js.map +1 -0
- package/lib/cjs/widget/components/property-grid/PropertyGrid.scss +71 -0
- package/lib/cjs/widget/components/property-grid/PropertyGridWrapper.d.ts +17 -0
- package/lib/cjs/widget/components/property-grid/PropertyGridWrapper.js +67 -0
- package/lib/cjs/widget/components/property-grid/PropertyGridWrapper.js.map +1 -0
- package/lib/cjs/widget/components/property-grid/PropertyList.d.ts +69 -0
- package/lib/cjs/widget/components/property-grid/PropertyList.js +87 -0
- package/lib/cjs/widget/components/property-grid/PropertyList.js.map +1 -0
- package/lib/cjs/widget/components/property-grid/PropertyRender.d.ts +92 -0
- package/lib/cjs/widget/components/property-grid/PropertyRender.js +111 -0
- package/lib/cjs/widget/components/property-grid/PropertyRender.js.map +1 -0
- package/lib/cjs/widget/components/property-grid/PropertyView.d.ts +20 -0
- package/lib/cjs/widget/components/property-grid/PropertyView.js +218 -0
- package/lib/cjs/widget/components/property-grid/PropertyView.js.map +1 -0
- package/lib/cjs/widget/components/property-grid/PropertyView.scss +111 -0
- package/lib/cjs/widget/components/utils.d.ts +14 -0
- package/lib/cjs/widget/components/utils.js +82 -0
- package/lib/cjs/widget/components/utils.js.map +1 -0
- package/lib/cjs/widget/components/utils.scss +36 -0
- package/lib/cjs/widget/components/viewerUtils.d.ts +9 -0
- package/lib/cjs/widget/components/viewerUtils.js +115 -0
- package/lib/cjs/widget/components/viewerUtils.js.map +1 -0
- package/lib/cjs/widget/hooks/useFetchAccessToken.d.ts +3 -0
- package/lib/cjs/widget/hooks/useFetchAccessToken.js +22 -0
- package/lib/cjs/widget/hooks/useFetchAccessToken.js.map +1 -0
- package/lib/cjs/widget/hooks/useValidator.d.ts +45 -0
- package/lib/cjs/widget/hooks/useValidator.js +53 -0
- package/lib/cjs/widget/hooks/useValidator.js.map +1 -0
- package/lib/cjs/widget/icons/DatabaseInfo.d.ts +5 -0
- package/lib/cjs/widget/icons/DatabaseInfo.js +19 -0
- package/lib/cjs/widget/icons/DatabaseInfo.js.map +1 -0
- package/lib/cjs/widget/icons/DatabaseInfo.scss +12 -0
- package/lib/cjs/widget/utils.d.ts +4 -0
- package/lib/cjs/widget/utils.js +3 -0
- package/lib/cjs/widget/utils.js.map +1 -0
- package/lib/esm/api/GroupQueryBuilderApi.d.ts +15 -0
- package/lib/esm/api/GroupQueryBuilderApi.js +23 -0
- package/lib/esm/api/GroupQueryBuilderApi.js.map +1 -0
- package/lib/esm/api/generated/api.d.ts +3222 -0
- package/lib/esm/api/generated/api.js +5248 -0
- package/lib/esm/api/generated/api.js.map +1 -0
- package/lib/esm/api/generated/configuration.d.ts +56 -0
- package/lib/esm/api/generated/configuration.js +26 -0
- package/lib/esm/api/generated/configuration.js.map +1 -0
- package/lib/esm/api/generated/index.d.ts +14 -0
- package/lib/esm/api/generated/index.js +19 -0
- package/lib/esm/api/generated/index.js.map +1 -0
- package/lib/esm/api/reportingClient.d.ts +34 -0
- package/lib/esm/api/reportingClient.js +173 -0
- package/lib/esm/api/reportingClient.js.map +1 -0
- package/lib/esm/decorators/BboxDimensionsDecorator.d.ts +82 -0
- package/lib/esm/decorators/BboxDimensionsDecorator.js +414 -0
- package/lib/esm/decorators/BboxDimensionsDecorator.js.map +1 -0
- package/lib/esm/grouping-mapping-widget.d.ts +7 -0
- package/lib/esm/grouping-mapping-widget.js +11 -0
- package/lib/esm/grouping-mapping-widget.js.map +1 -0
- package/lib/esm/widget/GroupingMappingWidget.d.ts +7 -0
- package/lib/esm/widget/GroupingMappingWidget.js +25 -0
- package/lib/esm/widget/GroupingMappingWidget.js.map +1 -0
- package/lib/esm/widget/components/ActionPanel.d.ts +11 -0
- package/lib/esm/widget/components/ActionPanel.js +16 -0
- package/lib/esm/widget/components/ActionPanel.js.map +1 -0
- package/lib/esm/widget/components/ActionPanel.scss +12 -0
- package/lib/esm/widget/components/CalculatedPropertyAction.d.ts +14 -0
- package/lib/esm/widget/components/CalculatedPropertyAction.js +136 -0
- package/lib/esm/widget/components/CalculatedPropertyAction.js.map +1 -0
- package/lib/esm/widget/components/CalculatedPropertyAction.scss +27 -0
- package/lib/esm/widget/components/CalculatedPropertyTable.d.ts +18 -0
- package/lib/esm/widget/components/CalculatedPropertyTable.js +85 -0
- package/lib/esm/widget/components/CalculatedPropertyTable.js.map +1 -0
- package/lib/esm/widget/components/ConfirmMappingsImport.d.ts +16 -0
- package/lib/esm/widget/components/ConfirmMappingsImport.js +91 -0
- package/lib/esm/widget/components/ConfirmMappingsImport.js.map +1 -0
- package/lib/esm/widget/components/ConfirmMappingsImport.scss +84 -0
- package/lib/esm/widget/components/CustomCalculationAction.d.ts +14 -0
- package/lib/esm/widget/components/CustomCalculationAction.js +79 -0
- package/lib/esm/widget/components/CustomCalculationAction.js.map +1 -0
- package/lib/esm/widget/components/CustomCalculationAction.scss +16 -0
- package/lib/esm/widget/components/CustomCalculationTable.d.ts +18 -0
- package/lib/esm/widget/components/CustomCalculationTable.js +90 -0
- package/lib/esm/widget/components/CustomCalculationTable.js.map +1 -0
- package/lib/esm/widget/components/DeleteModal.d.ts +12 -0
- package/lib/esm/widget/components/DeleteModal.js +41 -0
- package/lib/esm/widget/components/DeleteModal.js.map +1 -0
- package/lib/esm/widget/components/DeleteModal.scss +12 -0
- package/lib/esm/widget/components/GroupAction.d.ts +12 -0
- package/lib/esm/widget/components/GroupAction.js +142 -0
- package/lib/esm/widget/components/GroupAction.js.map +1 -0
- package/lib/esm/widget/components/GroupAction.scss +19 -0
- package/lib/esm/widget/components/GroupPropertyAction.d.ts +17 -0
- package/lib/esm/widget/components/GroupPropertyAction.js +347 -0
- package/lib/esm/widget/components/GroupPropertyAction.js.map +1 -0
- package/lib/esm/widget/components/GroupPropertyAction.scss +36 -0
- package/lib/esm/widget/components/GroupPropertyTable.d.ts +18 -0
- package/lib/esm/widget/components/GroupPropertyTable.js +85 -0
- package/lib/esm/widget/components/GroupPropertyTable.js.map +1 -0
- package/lib/esm/widget/components/GroupQueryBuilder.scss +24 -0
- package/lib/esm/widget/components/GroupQueryBuilderContainer.d.ts +4 -0
- package/lib/esm/widget/components/GroupQueryBuilderContainer.js +43 -0
- package/lib/esm/widget/components/GroupQueryBuilderContainer.js.map +1 -0
- package/lib/esm/widget/components/GroupQueryBuilderContext.d.ts +13 -0
- package/lib/esm/widget/components/GroupQueryBuilderContext.js +15 -0
- package/lib/esm/widget/components/GroupQueryBuilderContext.js.map +1 -0
- package/lib/esm/widget/components/Grouping.d.ts +12 -0
- package/lib/esm/widget/components/Grouping.js +188 -0
- package/lib/esm/widget/components/Grouping.js.map +1 -0
- package/lib/esm/widget/components/Grouping.scss +15 -0
- package/lib/esm/widget/components/GroupingMapping.d.ts +5 -0
- package/lib/esm/widget/components/GroupingMapping.js +13 -0
- package/lib/esm/widget/components/GroupingMapping.js.map +1 -0
- package/lib/esm/widget/components/GroupingMapping.scss +24 -0
- package/lib/esm/widget/components/Mapping.d.ts +7 -0
- package/lib/esm/widget/components/Mapping.js +136 -0
- package/lib/esm/widget/components/Mapping.js.map +1 -0
- package/lib/esm/widget/components/Mapping.scss +26 -0
- package/lib/esm/widget/components/MappingAction.d.ts +11 -0
- package/lib/esm/widget/components/MappingAction.js +74 -0
- package/lib/esm/widget/components/MappingAction.js.map +1 -0
- package/lib/esm/widget/components/MappingAction.scss +16 -0
- package/lib/esm/widget/components/MappingImportWizardModal.d.ts +10 -0
- package/lib/esm/widget/components/MappingImportWizardModal.js +76 -0
- package/lib/esm/widget/components/MappingImportWizardModal.js.map +1 -0
- package/lib/esm/widget/components/MappingImportWizardModal.scss +21 -0
- package/lib/esm/widget/components/PropertyMenu.d.ts +24 -0
- package/lib/esm/widget/components/PropertyMenu.js +115 -0
- package/lib/esm/widget/components/PropertyMenu.js.map +1 -0
- package/lib/esm/widget/components/PropertyMenu.scss +48 -0
- package/lib/esm/widget/components/QueryBuilder.d.ts +39 -0
- package/lib/esm/widget/components/QueryBuilder.js +341 -0
- package/lib/esm/widget/components/QueryBuilder.js.map +1 -0
- package/lib/esm/widget/components/SelectIModel.d.ts +12 -0
- package/lib/esm/widget/components/SelectIModel.js +18 -0
- package/lib/esm/widget/components/SelectIModel.js.map +1 -0
- package/lib/esm/widget/components/SelectIModel.scss +20 -0
- package/lib/esm/widget/components/SelectMapping.scss +17 -0
- package/lib/esm/widget/components/SelectMappings.d.ts +12 -0
- package/lib/esm/widget/components/SelectMappings.js +61 -0
- package/lib/esm/widget/components/SelectMappings.js.map +1 -0
- package/lib/esm/widget/components/SelectProject.d.ts +10 -0
- package/lib/esm/widget/components/SelectProject.js +47 -0
- package/lib/esm/widget/components/SelectProject.js.map +1 -0
- package/lib/esm/widget/components/SelectProject.scss +38 -0
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.d.ts +33 -0
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.js +69 -0
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.js.map +1 -0
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.scss +16 -0
- package/lib/esm/widget/components/property-grid/PrimitivePropertyRenderer.d.ts +26 -0
- package/lib/esm/widget/components/property-grid/PrimitivePropertyRenderer.js +35 -0
- package/lib/esm/widget/components/property-grid/PrimitivePropertyRenderer.js.map +1 -0
- package/lib/esm/widget/components/property-grid/PropertyGrid.d.ts +67 -0
- package/lib/esm/widget/components/property-grid/PropertyGrid.js +172 -0
- package/lib/esm/widget/components/property-grid/PropertyGrid.js.map +1 -0
- package/lib/esm/widget/components/property-grid/PropertyGrid.scss +71 -0
- package/lib/esm/widget/components/property-grid/PropertyGridWrapper.d.ts +17 -0
- package/lib/esm/widget/components/property-grid/PropertyGridWrapper.js +44 -0
- package/lib/esm/widget/components/property-grid/PropertyGridWrapper.js.map +1 -0
- package/lib/esm/widget/components/property-grid/PropertyList.d.ts +69 -0
- package/lib/esm/widget/components/property-grid/PropertyList.js +60 -0
- package/lib/esm/widget/components/property-grid/PropertyList.js.map +1 -0
- package/lib/esm/widget/components/property-grid/PropertyRender.d.ts +92 -0
- package/lib/esm/widget/components/property-grid/PropertyRender.js +88 -0
- package/lib/esm/widget/components/property-grid/PropertyRender.js.map +1 -0
- package/lib/esm/widget/components/property-grid/PropertyView.d.ts +20 -0
- package/lib/esm/widget/components/property-grid/PropertyView.js +195 -0
- package/lib/esm/widget/components/property-grid/PropertyView.js.map +1 -0
- package/lib/esm/widget/components/property-grid/PropertyView.scss +111 -0
- package/lib/esm/widget/components/utils.d.ts +14 -0
- package/lib/esm/widget/components/utils.js +72 -0
- package/lib/esm/widget/components/utils.js.map +1 -0
- package/lib/esm/widget/components/utils.scss +36 -0
- package/lib/esm/widget/components/viewerUtils.d.ts +9 -0
- package/lib/esm/widget/components/viewerUtils.js +106 -0
- package/lib/esm/widget/components/viewerUtils.js.map +1 -0
- package/lib/esm/widget/hooks/useFetchAccessToken.d.ts +3 -0
- package/lib/esm/widget/hooks/useFetchAccessToken.js +20 -0
- package/lib/esm/widget/hooks/useFetchAccessToken.js.map +1 -0
- package/lib/esm/widget/hooks/useValidator.d.ts +45 -0
- package/lib/esm/widget/hooks/useValidator.js +47 -0
- package/lib/esm/widget/hooks/useValidator.js.map +1 -0
- package/lib/esm/widget/icons/DatabaseInfo.d.ts +5 -0
- package/lib/esm/widget/icons/DatabaseInfo.js +14 -0
- package/lib/esm/widget/icons/DatabaseInfo.js.map +1 -0
- package/lib/esm/widget/icons/DatabaseInfo.scss +12 -0
- package/lib/esm/widget/utils.d.ts +4 -0
- package/lib/esm/widget/utils.js +2 -0
- package/lib/esm/widget/utils.js.map +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { ContentSpecificationTypes, DefaultContentDisplayTypes, PropertyValueFormat, RelationshipMeaning, RuleTypes, } from "@itwin/presentation-common";
|
|
2
|
+
import { Presentation } from "@itwin/presentation-frontend";
|
|
3
|
+
import { useActiveIModelConnection } from "@itwin/appui-react";
|
|
4
|
+
import { SvgChevronDown, SvgChevronUp, SvgRemove, } from "@itwin/itwinui-icons-react";
|
|
5
|
+
import { Alert, ComboBox, Fieldset, IconButton, LabeledInput, LabeledSelect, Small, Text, } from "@itwin/itwinui-react";
|
|
6
|
+
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
7
|
+
import { reportingClientApi } from "../../api/reportingClient";
|
|
8
|
+
import ActionPanel from "./ActionPanel";
|
|
9
|
+
import useValidator, { NAME_REQUIREMENTS } from "../hooks/useValidator";
|
|
10
|
+
import { WidgetHeader } from "./utils";
|
|
11
|
+
import "./GroupPropertyAction.scss";
|
|
12
|
+
export const quantityTypesSelectionOptions = [
|
|
13
|
+
{ value: "Area", label: "Area" },
|
|
14
|
+
{ value: "Distance", label: "Distance" },
|
|
15
|
+
{ value: "Force", label: "Force" },
|
|
16
|
+
{ value: "Mass", label: "Mass" },
|
|
17
|
+
{ value: "Monetary", label: "Monetary" },
|
|
18
|
+
{ value: "Time", label: "Time" },
|
|
19
|
+
{ value: "Volume", label: "Volume" },
|
|
20
|
+
{ value: "Undefined", label: "No Quantity Type" },
|
|
21
|
+
];
|
|
22
|
+
const extractPrimitive = (propertiesField, classToPropertiesMapping, navigation) => {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
// There are rare cases which only happens in multiple selections where it returns more than one.
|
|
25
|
+
// This also checks if this property comes from a navigation property
|
|
26
|
+
const className = (_a = navigation === null || navigation === void 0 ? void 0 : navigation.rootClassName) !== null && _a !== void 0 ? _a : propertiesField.properties[0].property.classInfo.name;
|
|
27
|
+
// Sometimes class names are not defined. Type error. Not guaranteed.
|
|
28
|
+
if (!className) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!classToPropertiesMapping.has(className)) {
|
|
32
|
+
classToPropertiesMapping.set(className, []);
|
|
33
|
+
}
|
|
34
|
+
// Gets property name. Appends path if from navigation.
|
|
35
|
+
const propertyName = navigation
|
|
36
|
+
? `${navigation.navigationName}.${propertiesField.properties[0].property.name}`
|
|
37
|
+
: propertiesField.properties[0].property.name;
|
|
38
|
+
const label = navigation
|
|
39
|
+
? `${propertiesField.label} (${navigation === null || navigation === void 0 ? void 0 : navigation.navigationName})`
|
|
40
|
+
: propertiesField.label;
|
|
41
|
+
(_b = classToPropertiesMapping.get(className)) === null || _b === void 0 ? void 0 : _b.push({
|
|
42
|
+
name: propertyName,
|
|
43
|
+
label,
|
|
44
|
+
type: propertiesField.properties[0].property.type,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const extractStructProperties = (name, className, classToPropertiesMapping, members) => {
|
|
48
|
+
var _a;
|
|
49
|
+
for (const member of members) {
|
|
50
|
+
if (member.type.valueFormat === PropertyValueFormat.Primitive) {
|
|
51
|
+
if (!classToPropertiesMapping.has(className)) {
|
|
52
|
+
classToPropertiesMapping.set(className, []);
|
|
53
|
+
}
|
|
54
|
+
(_a = classToPropertiesMapping.get(className)) === null || _a === void 0 ? void 0 : _a.push({
|
|
55
|
+
name: `${name}.${member.name}`,
|
|
56
|
+
label: member.label,
|
|
57
|
+
type: member.type.typeName,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
else if (member.type.valueFormat === PropertyValueFormat.Struct) {
|
|
61
|
+
extractStructProperties(`${name}.${member.name}`, className, classToPropertiesMapping, member.type.members);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const extractProperties = (properties, classToPropertiesMapping, navigation) => {
|
|
66
|
+
for (const property of properties) {
|
|
67
|
+
switch (property.type.valueFormat) {
|
|
68
|
+
case PropertyValueFormat.Primitive: {
|
|
69
|
+
extractPrimitive(property, classToPropertiesMapping, navigation);
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
// Get structs
|
|
73
|
+
case PropertyValueFormat.Struct: {
|
|
74
|
+
const nestedContentField = property;
|
|
75
|
+
// Only handling single path and not handling nested content fields within navigations
|
|
76
|
+
if (nestedContentField.pathToPrimaryClass &&
|
|
77
|
+
nestedContentField.pathToPrimaryClass.length > 1) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
switch (nestedContentField.relationshipMeaning) {
|
|
81
|
+
case RelationshipMeaning.SameInstance: {
|
|
82
|
+
// Some elements don't have a path to primary class..
|
|
83
|
+
// Most likely a simple struct property
|
|
84
|
+
if (!nestedContentField.pathToPrimaryClass) {
|
|
85
|
+
const columnName = property.properties[0]
|
|
86
|
+
.property.name;
|
|
87
|
+
const className = property.properties[0]
|
|
88
|
+
.property.classInfo.name;
|
|
89
|
+
extractStructProperties(navigation
|
|
90
|
+
? `${navigation.navigationName}.${columnName}`
|
|
91
|
+
: columnName, navigation ? navigation.rootClassName : className, classToPropertiesMapping, property.type.members);
|
|
92
|
+
// Check for aspects. Ignore them if coming from navigation.
|
|
93
|
+
}
|
|
94
|
+
else if (!navigation &&
|
|
95
|
+
(nestedContentField.pathToPrimaryClass[0].relationshipInfo
|
|
96
|
+
.name === "BisCore:ElementOwnsUniqueAspect" ||
|
|
97
|
+
nestedContentField.pathToPrimaryClass[0].relationshipInfo
|
|
98
|
+
.name === "BisCore:ElementOwnsMultiAspects")) {
|
|
99
|
+
const className = nestedContentField.contentClassInfo.name;
|
|
100
|
+
if (!classToPropertiesMapping.has(className)) {
|
|
101
|
+
classToPropertiesMapping.set(className, []);
|
|
102
|
+
}
|
|
103
|
+
extractProperties(nestedContentField.nestedFields, classToPropertiesMapping, navigation);
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
// Navigation properties
|
|
108
|
+
case RelationshipMeaning.RelatedInstance: {
|
|
109
|
+
if (
|
|
110
|
+
// Deal with a TypeDefinition
|
|
111
|
+
nestedContentField.pathToPrimaryClass[0].relationshipInfo.name ===
|
|
112
|
+
"BisCore:GeometricElement3dHasTypeDefinition") {
|
|
113
|
+
const className = nestedContentField.pathToPrimaryClass[0].targetClassInfo.name;
|
|
114
|
+
extractProperties(nestedContentField.nestedFields, classToPropertiesMapping, {
|
|
115
|
+
navigationName: "TypeDefinition",
|
|
116
|
+
rootClassName: className,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const GroupPropertyAction = ({ iModelId, mappingId, groupId, groupPropertyId, groupPropertyName, keySet, returnFn, }) => {
|
|
127
|
+
const iModelConnection = useActiveIModelConnection();
|
|
128
|
+
const [propertyName, setPropertyName] = useState("");
|
|
129
|
+
const [dataType, setDataType] = useState();
|
|
130
|
+
const [quantityType, setQuantityType] = useState("Undefined");
|
|
131
|
+
const [classToPropertiesMapping, setClassToPropertiesMapping] = useState();
|
|
132
|
+
const [ecProperties, setEcProperties] = useState([]);
|
|
133
|
+
const [validator, showValidationMessage] = useValidator();
|
|
134
|
+
const [propertyAlert, setPropertyAlert] = useState(false);
|
|
135
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
136
|
+
useEffect(() => {
|
|
137
|
+
const getContent = async () => {
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
139
|
+
setIsLoading(true);
|
|
140
|
+
const ruleSet = {
|
|
141
|
+
id: "element-properties",
|
|
142
|
+
rules: [
|
|
143
|
+
{
|
|
144
|
+
ruleType: RuleTypes.Content,
|
|
145
|
+
specifications: [
|
|
146
|
+
{
|
|
147
|
+
specType: ContentSpecificationTypes.SelectedNodeInstances,
|
|
148
|
+
// relationshipPaths: [
|
|
149
|
+
// {
|
|
150
|
+
// relationship: {
|
|
151
|
+
// schemaName: "BisCore",
|
|
152
|
+
// className: "ElementMultiAspect",
|
|
153
|
+
// },
|
|
154
|
+
// direction: RelationshipDirection.Forward,
|
|
155
|
+
// },
|
|
156
|
+
// ],
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
};
|
|
162
|
+
const requestOptions = {
|
|
163
|
+
imodel: iModelConnection,
|
|
164
|
+
keys: keySet,
|
|
165
|
+
rulesetOrId: ruleSet,
|
|
166
|
+
displayType: DefaultContentDisplayTypes.PropertyPane,
|
|
167
|
+
};
|
|
168
|
+
const content = await Presentation.presentation.getContentDescriptor(requestOptions);
|
|
169
|
+
// Only primitives and structs for now
|
|
170
|
+
const properties = (_a = content === null || content === void 0 ? void 0 : content.fields.filter((field) => field.type.valueFormat === PropertyValueFormat.Primitive ||
|
|
171
|
+
field.type.valueFormat === PropertyValueFormat.Struct)) !== null && _a !== void 0 ? _a : [];
|
|
172
|
+
// Map properties to their classes
|
|
173
|
+
const classToPropertiesMapping = new Map();
|
|
174
|
+
extractProperties(properties, classToPropertiesMapping);
|
|
175
|
+
setClassToPropertiesMapping(classToPropertiesMapping);
|
|
176
|
+
let newEcProperties;
|
|
177
|
+
// Fetch already existing ec properties then add all classes from presentation
|
|
178
|
+
if (groupPropertyId) {
|
|
179
|
+
// TODO Error handling
|
|
180
|
+
const response = await reportingClientApi.getGroupProperty(iModelId, mappingId, groupId, groupPropertyId);
|
|
181
|
+
newEcProperties = (_c = (_b = response.property) === null || _b === void 0 ? void 0 : _b.ecProperties) !== null && _c !== void 0 ? _c : [];
|
|
182
|
+
let keys = Array.from(classToPropertiesMapping.keys()).reverse();
|
|
183
|
+
for (const ecProperty of newEcProperties) {
|
|
184
|
+
keys = keys.filter((key) => `${ecProperty.ecSchemaName}:${ecProperty.ecClassName}` !== key);
|
|
185
|
+
}
|
|
186
|
+
newEcProperties.push(...keys.map((key) => ({
|
|
187
|
+
ecSchemaName: key.split(":")[0],
|
|
188
|
+
ecClassName: key.split(":")[1],
|
|
189
|
+
// Placeholders for properties
|
|
190
|
+
ecPropertyName: "",
|
|
191
|
+
ecPropertyType: "",
|
|
192
|
+
})));
|
|
193
|
+
setPropertyName((_e = (_d = response.property) === null || _d === void 0 ? void 0 : _d.propertyName) !== null && _e !== void 0 ? _e : "");
|
|
194
|
+
setDataType((_g = (_f = response.property) === null || _f === void 0 ? void 0 : _f.dataType) !== null && _g !== void 0 ? _g : "");
|
|
195
|
+
setQuantityType((_j = (_h = response.property) === null || _h === void 0 ? void 0 : _h.quantityType) !== null && _j !== void 0 ? _j : "");
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
newEcProperties = Array.from(classToPropertiesMapping)
|
|
199
|
+
.map(([key]) => ({
|
|
200
|
+
ecSchemaName: key.split(":")[0],
|
|
201
|
+
ecClassName: key.split(":")[1],
|
|
202
|
+
// Placeholders for properties
|
|
203
|
+
ecPropertyName: "",
|
|
204
|
+
ecPropertyType: "",
|
|
205
|
+
}))
|
|
206
|
+
.reverse();
|
|
207
|
+
}
|
|
208
|
+
setEcProperties(newEcProperties);
|
|
209
|
+
setIsLoading(false);
|
|
210
|
+
};
|
|
211
|
+
void getContent();
|
|
212
|
+
}, [groupId, groupPropertyId, iModelConnection, iModelId, keySet, mappingId]);
|
|
213
|
+
const onSave = async () => {
|
|
214
|
+
const filteredEcProperties = ecProperties.filter((ecProperty) => ecProperty.ecPropertyName && ecProperty.ecPropertyType);
|
|
215
|
+
if (!(filteredEcProperties === null || filteredEcProperties === void 0 ? void 0 : filteredEcProperties.length) || !validator.allValid()) {
|
|
216
|
+
showValidationMessage(true);
|
|
217
|
+
if (!(filteredEcProperties === null || filteredEcProperties === void 0 ? void 0 : filteredEcProperties.length)) {
|
|
218
|
+
setPropertyAlert(true);
|
|
219
|
+
}
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
try {
|
|
223
|
+
setIsLoading(true);
|
|
224
|
+
const groupProperty = {
|
|
225
|
+
propertyName,
|
|
226
|
+
dataType,
|
|
227
|
+
quantityType,
|
|
228
|
+
ecProperties: filteredEcProperties,
|
|
229
|
+
};
|
|
230
|
+
groupPropertyId
|
|
231
|
+
? await reportingClientApi.updateGroupProperty(iModelId, mappingId, groupId, groupPropertyId, groupProperty)
|
|
232
|
+
: await reportingClientApi.createGroupProperty(iModelId, mappingId, groupId, groupProperty);
|
|
233
|
+
await returnFn();
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
setIsLoading(false);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const onChange = useCallback((value, index) => {
|
|
240
|
+
setPropertyAlert(false);
|
|
241
|
+
const property = JSON.parse(value);
|
|
242
|
+
setEcProperties((ecProperties) => {
|
|
243
|
+
const updatedEcProperties = [...ecProperties];
|
|
244
|
+
updatedEcProperties[index].ecPropertyName = property.name;
|
|
245
|
+
// Unique types
|
|
246
|
+
let type = "";
|
|
247
|
+
switch (property.type) {
|
|
248
|
+
case "long":
|
|
249
|
+
type = "integer";
|
|
250
|
+
break;
|
|
251
|
+
default:
|
|
252
|
+
type = property.type;
|
|
253
|
+
}
|
|
254
|
+
updatedEcProperties[index].ecPropertyType = type;
|
|
255
|
+
return updatedEcProperties;
|
|
256
|
+
});
|
|
257
|
+
}, []);
|
|
258
|
+
const propertyOptions = useMemo(() => {
|
|
259
|
+
return ecProperties.map((ecProperty) => {
|
|
260
|
+
var _a, _b;
|
|
261
|
+
return (_b = (_a = classToPropertiesMapping === null || classToPropertiesMapping === void 0 ? void 0 : classToPropertiesMapping.get(`${ecProperty.ecSchemaName}:${ecProperty.ecClassName}`)) === null || _a === void 0 ? void 0 : _a.map((property) => ({
|
|
262
|
+
value: JSON.stringify({
|
|
263
|
+
name: property.name,
|
|
264
|
+
type: property.type,
|
|
265
|
+
}),
|
|
266
|
+
label: property.label,
|
|
267
|
+
}))) !== null && _b !== void 0 ? _b : [];
|
|
268
|
+
});
|
|
269
|
+
}, [classToPropertiesMapping, ecProperties]);
|
|
270
|
+
const getValue = useCallback((ecProperty, index) => {
|
|
271
|
+
var _a;
|
|
272
|
+
const property = (_a = classToPropertiesMapping === null || classToPropertiesMapping === void 0 ? void 0 : classToPropertiesMapping.get(`${ecProperty.ecSchemaName}:${ecProperty.ecClassName}`)) === null || _a === void 0 ? void 0 : _a.find((property) => property.name === ecProperties[index].ecPropertyName);
|
|
273
|
+
const result = JSON.stringify({
|
|
274
|
+
name: property === null || property === void 0 ? void 0 : property.name,
|
|
275
|
+
type: property === null || property === void 0 ? void 0 : property.type,
|
|
276
|
+
});
|
|
277
|
+
return result;
|
|
278
|
+
}, [classToPropertiesMapping, ecProperties]);
|
|
279
|
+
return (React.createElement(React.Fragment, null,
|
|
280
|
+
React.createElement(WidgetHeader, { title: groupPropertyName !== null && groupPropertyName !== void 0 ? groupPropertyName : "Add Property", returnFn: returnFn }),
|
|
281
|
+
React.createElement("div", { className: 'group-property-action-container' },
|
|
282
|
+
React.createElement(Fieldset, { className: 'property-options', legend: 'Property Details' },
|
|
283
|
+
React.createElement(Small, { className: 'field-legend' }, "Asterisk * indicates mandatory fields."),
|
|
284
|
+
React.createElement(LabeledInput, { id: 'propertyName', label: 'Property Name', value: propertyName, required: true, disabled: isLoading, onChange: (event) => {
|
|
285
|
+
setPropertyName(event.target.value);
|
|
286
|
+
validator.showMessageFor("propertyName");
|
|
287
|
+
}, message: validator.message("propertyName", propertyName, NAME_REQUIREMENTS), status: validator.message("propertyName", propertyName, NAME_REQUIREMENTS)
|
|
288
|
+
? "negative"
|
|
289
|
+
: undefined, onBlur: () => {
|
|
290
|
+
validator.showMessageFor("propertyName");
|
|
291
|
+
} }),
|
|
292
|
+
React.createElement(LabeledSelect, { label: "Data Type", id: 'dataType', disabled: isLoading, options: [
|
|
293
|
+
{ value: "Boolean", label: "Boolean" },
|
|
294
|
+
{ value: "Number", label: "Number" },
|
|
295
|
+
{ value: "String", label: "String" },
|
|
296
|
+
], required: true, value: dataType, onChange: (value) => {
|
|
297
|
+
validator.showMessageFor("dataType");
|
|
298
|
+
setDataType(value);
|
|
299
|
+
}, message: validator.message("dataType", propertyName, "required"), status: validator.message("dataType", propertyName, "required")
|
|
300
|
+
? "negative"
|
|
301
|
+
: undefined, onBlur: () => {
|
|
302
|
+
validator.showMessageFor("dataType");
|
|
303
|
+
}, onShow: () => { }, onHide: () => { } }),
|
|
304
|
+
React.createElement(LabeledSelect, { label: 'Quantity Type', disabled: isLoading, options: quantityTypesSelectionOptions, value: quantityType, onChange: setQuantityType, onShow: () => { }, onHide: () => { } })),
|
|
305
|
+
React.createElement(Fieldset, { className: 'property-selection-container', legend: 'Properties' },
|
|
306
|
+
propertyAlert && (React.createElement(Alert, { type: "negative" }, "Please select at least one property.")),
|
|
307
|
+
isLoading &&
|
|
308
|
+
Array(3)
|
|
309
|
+
.fill(null)
|
|
310
|
+
.map((_, index) => (React.createElement(Text, { key: index, variant: 'headline', isSkeleton: true }, "LOADING SKELETON"))), ecProperties === null || ecProperties === void 0 ? void 0 :
|
|
311
|
+
ecProperties.map((ecProperty, index) => {
|
|
312
|
+
return (React.createElement("div", { className: 'property-select-item', key: `${ecProperty.ecSchemaName}${ecProperty.ecClassName}` },
|
|
313
|
+
React.createElement(Text, { variant: 'leading' }, ecProperty.ecClassName),
|
|
314
|
+
React.createElement(Text, { isMuted: true, variant: 'small' }, ecProperty.ecSchemaName),
|
|
315
|
+
React.createElement("div", { className: 'selection-and-reorder' },
|
|
316
|
+
React.createElement(ComboBox, { options: propertyOptions[index], value: getValue(ecProperty, index), onChange: (value) => onChange(value, index), inputProps: {
|
|
317
|
+
placeholder: "<No Property Mapped>",
|
|
318
|
+
}, style: { width: "100%" } }),
|
|
319
|
+
React.createElement(IconButton, { onClick: () => {
|
|
320
|
+
const updatedEcPropertyList = [...ecProperties];
|
|
321
|
+
updatedEcPropertyList[index] = {
|
|
322
|
+
...updatedEcPropertyList[index],
|
|
323
|
+
ecPropertyName: "",
|
|
324
|
+
ecPropertyType: "",
|
|
325
|
+
};
|
|
326
|
+
setEcProperties(updatedEcPropertyList);
|
|
327
|
+
}, disabled: !ecProperty.ecPropertyName && !ecProperty.ecPropertyType },
|
|
328
|
+
React.createElement(SvgRemove, null)),
|
|
329
|
+
React.createElement(IconButton, { onClick: () => {
|
|
330
|
+
const tab = [...ecProperties];
|
|
331
|
+
const item = tab.splice(index, 1);
|
|
332
|
+
tab.splice(index - 1, 0, item[0]);
|
|
333
|
+
setEcProperties(tab);
|
|
334
|
+
}, disabled: index === 0 },
|
|
335
|
+
React.createElement(SvgChevronUp, null)),
|
|
336
|
+
React.createElement(IconButton, { onClick: () => {
|
|
337
|
+
const tab = [...ecProperties];
|
|
338
|
+
const item = tab.splice(index, 1);
|
|
339
|
+
tab.splice(index + 1, 0, item[0]);
|
|
340
|
+
setEcProperties(tab);
|
|
341
|
+
}, disabled: index === ecProperties.length - 1 },
|
|
342
|
+
React.createElement(SvgChevronDown, null)))));
|
|
343
|
+
}))),
|
|
344
|
+
React.createElement(ActionPanel, { onSave: onSave, onCancel: returnFn, isLoading: isLoading })));
|
|
345
|
+
};
|
|
346
|
+
export default GroupPropertyAction;
|
|
347
|
+
//# sourceMappingURL=GroupPropertyAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupPropertyAction.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupPropertyAction.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,GACV,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACL,cAAc,EACd,YAAY,EACZ,SAAS,GACV,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,aAAa,EACb,KAAK,EACL,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,EAAE,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,4BAA4B,CAAC;AAYpC,MAAM,CAAC,MAAM,6BAA6B,GAA2B;IACnE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;IACxC,EAAE,KAAK,EAAE,OA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AC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;oCAClC,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;oCAClC,eAAe,CAAC,GAAG,CAAC,CAAC;gCACvB,CAAC,EACD,QAAQ,EAAE,KAAK,KAAK,CAAC;gCAErB,oBAAC,YAAY,OAAG,CACL;4BACb,oBAAC,UAAU,IACT,OAAO,EAAE,GAAG,EAAE;oCACZ,MAAM,GAAG,GAAG,CAAC,GAAG,YAAY,CAAC,CAAC;oCAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;oCAClC,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;oCAClC,eAAe,CAAC,GAAG,CAAC,CAAC;gCACvB,CAAC,EACD,QAAQ,EAAE,KAAK,KAAK,YAAY,CAAC,MAAM,GAAG,CAAC;gCAE3C,oBAAC,cAAc,OAAG,CACP,CACT,CACF,CACP,CAAC;gBACJ,CAAC,CAAC,CACO,CACP;QAEN,oBAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,GAAI,CACxE,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,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 { IModelConnection } from \"@itwin/core-frontend\";\nimport type {\n ContentDescriptorRequestOptions,\n Field,\n KeySet,\n NestedContentField,\n PropertiesField,\n Ruleset,\n RulesetVariable,\n StructFieldMemberDescription} from \"@itwin/presentation-common\";\nimport {\n ContentSpecificationTypes,\n DefaultContentDisplayTypes,\n PropertyValueFormat,\n RelationshipMeaning,\n RuleTypes,\n} from \"@itwin/presentation-common\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport { useActiveIModelConnection } from \"@itwin/appui-react\";\nimport {\n SvgChevronDown,\n SvgChevronUp,\n SvgRemove,\n} from \"@itwin/itwinui-icons-react\";\nimport type {\n SelectOption} from \"@itwin/itwinui-react\";\nimport {\n Alert,\n ComboBox,\n Fieldset,\n IconButton,\n LabeledInput,\n LabeledSelect,\n Small,\n Text,\n} from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport type {\n ECPropertyReportingAPI,\n GroupPropertyCreateReportingAPI,\n} from \"../../api/generated/api\";\nimport { reportingClientApi } from \"../../api/reportingClient\";\nimport ActionPanel from \"./ActionPanel\";\nimport useValidator, { NAME_REQUIREMENTS } from \"../hooks/useValidator\";\nimport { WidgetHeader } from \"./utils\";\nimport \"./GroupPropertyAction.scss\";\n\ninterface GroupPropertyActionProps {\n iModelId: string;\n mappingId: string;\n groupId: string;\n groupPropertyId?: string;\n groupPropertyName?: string;\n keySet: KeySet;\n returnFn: () => Promise<void>;\n}\n\nexport const quantityTypesSelectionOptions: SelectOption<string>[] = [\n { value: \"Area\", label: \"Area\" },\n { value: \"Distance\", label: \"Distance\" },\n { value: \"Force\", label: \"Force\" },\n { value: \"Mass\", label: \"Mass\" },\n { value: \"Monetary\", label: \"Monetary\" },\n { value: \"Time\", label: \"Time\" },\n { value: \"Volume\", label: \"Volume\" },\n { value: \"Undefined\", label: \"No Quantity Type\" },\n];\ninterface Property {\n name: string;\n label: string;\n type: string;\n}\n\ninterface NavigationProperty {\n navigationName: string;\n rootClassName: string;\n}\n\nconst extractPrimitive = (\n propertiesField: PropertiesField,\n classToPropertiesMapping: Map<string, Property[]>,\n navigation?: NavigationProperty\n) => {\n // There are rare cases which only happens in multiple selections where it returns more than one.\n // This also checks if this property comes from a navigation property\n const className =\n navigation?.rootClassName ??\n propertiesField.properties[0].property.classInfo.name;\n // Sometimes class names are not defined. Type error. Not guaranteed.\n if (!className) {\n return;\n }\n\n if (!classToPropertiesMapping.has(className)) {\n classToPropertiesMapping.set(className, []);\n }\n\n // Gets property name. Appends path if from navigation.\n const propertyName = navigation\n ? `${navigation.navigationName}.${propertiesField.properties[0].property.name}`\n : propertiesField.properties[0].property.name;\n\n const label = navigation\n ? `${propertiesField.label} (${navigation?.navigationName})`\n : propertiesField.label;\n\n classToPropertiesMapping.get(className)?.push({\n name: propertyName,\n label,\n type: propertiesField.properties[0].property.type,\n });\n};\n\nconst extractStructProperties = (\n name: string,\n className: string,\n classToPropertiesMapping: Map<string, Property[]>,\n members: StructFieldMemberDescription[]\n) => {\n for (const member of members) {\n if (member.type.valueFormat === PropertyValueFormat.Primitive) {\n if (!classToPropertiesMapping.has(className)) {\n classToPropertiesMapping.set(className, []);\n }\n\n classToPropertiesMapping.get(className)?.push({\n name: `${name}.${member.name}`,\n label: member.label,\n type: member.type.typeName,\n });\n } else if (member.type.valueFormat === PropertyValueFormat.Struct) {\n extractStructProperties(\n `${name}.${member.name}`,\n className,\n classToPropertiesMapping,\n member.type.members\n );\n }\n }\n};\n\nconst extractProperties = (\n properties: Field[],\n classToPropertiesMapping: Map<string, Property[]>,\n navigation?: NavigationProperty\n) => {\n for (const property of properties) {\n switch (property.type.valueFormat) {\n case PropertyValueFormat.Primitive: {\n extractPrimitive(\n property as PropertiesField,\n classToPropertiesMapping,\n navigation\n );\n break;\n }\n // Get structs\n case PropertyValueFormat.Struct: {\n const nestedContentField = property as NestedContentField;\n // Only handling single path and not handling nested content fields within navigations\n if (\n nestedContentField.pathToPrimaryClass &&\n nestedContentField.pathToPrimaryClass.length > 1\n ) {\n break;\n }\n\n switch (nestedContentField.relationshipMeaning) {\n case RelationshipMeaning.SameInstance: {\n // Some elements don't have a path to primary class..\n // Most likely a simple struct property\n if (!nestedContentField.pathToPrimaryClass) {\n const columnName = (property as PropertiesField).properties[0]\n .property.name;\n const className = (property as PropertiesField).properties[0]\n .property.classInfo.name;\n extractStructProperties(\n navigation\n ? `${navigation.navigationName}.${columnName}`\n : columnName,\n navigation ? navigation.rootClassName : className,\n classToPropertiesMapping,\n property.type.members\n );\n // Check for aspects. Ignore them if coming from navigation.\n } else if (\n !navigation &&\n (nestedContentField.pathToPrimaryClass[0].relationshipInfo\n .name === \"BisCore:ElementOwnsUniqueAspect\" ||\n nestedContentField.pathToPrimaryClass[0].relationshipInfo\n .name === \"BisCore:ElementOwnsMultiAspects\")\n ) {\n const className = nestedContentField.contentClassInfo.name;\n if (!classToPropertiesMapping.has(className)) {\n classToPropertiesMapping.set(className, []);\n }\n\n extractProperties(\n nestedContentField.nestedFields,\n classToPropertiesMapping,\n navigation\n );\n }\n\n break;\n }\n // Navigation properties\n case RelationshipMeaning.RelatedInstance: {\n if (\n // Deal with a TypeDefinition\n nestedContentField.pathToPrimaryClass[0].relationshipInfo.name ===\n \"BisCore:GeometricElement3dHasTypeDefinition\"\n ) {\n const className =\n nestedContentField.pathToPrimaryClass[0].targetClassInfo.name;\n extractProperties(\n nestedContentField.nestedFields,\n classToPropertiesMapping,\n {\n navigationName: \"TypeDefinition\",\n rootClassName: className,\n }\n );\n }\n break;\n }\n }\n }\n }\n }\n};\n\nconst GroupPropertyAction = ({\n iModelId,\n mappingId,\n groupId,\n groupPropertyId,\n groupPropertyName,\n keySet,\n returnFn,\n}: GroupPropertyActionProps) => {\n const iModelConnection = useActiveIModelConnection() as IModelConnection;\n const [propertyName, setPropertyName] = useState<string>(\"\");\n const [dataType, setDataType] = useState<string | undefined>();\n const [quantityType, setQuantityType] = useState<string>(\"Undefined\");\n const [classToPropertiesMapping, setClassToPropertiesMapping] =\n useState<Map<string, Property[]>>();\n const [ecProperties, setEcProperties] = useState<ECPropertyReportingAPI[]>(\n []\n );\n const [validator, showValidationMessage] = useValidator();\n const [propertyAlert, setPropertyAlert] = useState<boolean>(false);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n\n useEffect(() => {\n const getContent = async () => {\n setIsLoading(true);\n const ruleSet: Ruleset = {\n id: \"element-properties\",\n rules: [\n {\n ruleType: RuleTypes.Content,\n specifications: [\n {\n specType: ContentSpecificationTypes.SelectedNodeInstances,\n // relationshipPaths: [\n // {\n // relationship: {\n // schemaName: \"BisCore\",\n // className: \"ElementMultiAspect\",\n // },\n // direction: RelationshipDirection.Forward,\n // },\n // ],\n },\n ],\n },\n ],\n };\n const requestOptions: ContentDescriptorRequestOptions<\n IModelConnection,\n KeySet,\n RulesetVariable\n > = {\n imodel: iModelConnection,\n keys: keySet,\n rulesetOrId: ruleSet,\n displayType: DefaultContentDisplayTypes.PropertyPane,\n };\n const content = await Presentation.presentation.getContentDescriptor(\n requestOptions\n );\n\n // Only primitives and structs for now\n const properties =\n content?.fields.filter(\n (field) =>\n field.type.valueFormat === PropertyValueFormat.Primitive ||\n field.type.valueFormat === PropertyValueFormat.Struct\n ) ?? [];\n\n // Map properties to their classes\n const classToPropertiesMapping = new Map<string, Property[]>();\n\n extractProperties(properties, classToPropertiesMapping);\n\n setClassToPropertiesMapping(classToPropertiesMapping);\n\n let newEcProperties: ECPropertyReportingAPI[];\n // Fetch already existing ec properties then add all classes from presentation\n if (groupPropertyId) {\n // TODO Error handling\n const response = await reportingClientApi.getGroupProperty(\n iModelId,\n mappingId,\n groupId,\n groupPropertyId\n );\n newEcProperties = response.property?.ecProperties ?? [];\n\n let keys = Array.from(classToPropertiesMapping.keys()).reverse();\n for (const ecProperty of newEcProperties) {\n keys = keys.filter(\n (key) =>\n `${ecProperty.ecSchemaName}:${ecProperty.ecClassName}` !== key\n );\n }\n\n newEcProperties.push(\n ...keys.map((key) => ({\n ecSchemaName: key.split(\":\")[0],\n ecClassName: key.split(\":\")[1],\n // Placeholders for properties\n ecPropertyName: \"\",\n ecPropertyType: \"\",\n }))\n );\n\n setPropertyName(response.property?.propertyName ?? \"\");\n setDataType(response.property?.dataType ?? \"\");\n setQuantityType(response.property?.quantityType ?? \"\");\n } else {\n newEcProperties = Array.from(classToPropertiesMapping)\n .map(([key]) => ({\n ecSchemaName: key.split(\":\")[0],\n ecClassName: key.split(\":\")[1],\n // Placeholders for properties\n ecPropertyName: \"\",\n ecPropertyType: \"\",\n }))\n .reverse();\n }\n\n setEcProperties(newEcProperties);\n\n setIsLoading(false);\n };\n void getContent();\n }, [groupId, groupPropertyId, iModelConnection, iModelId, keySet, mappingId]);\n\n const onSave = async () => {\n const filteredEcProperties = ecProperties.filter(\n (ecProperty) => ecProperty.ecPropertyName && ecProperty.ecPropertyType\n );\n if (!filteredEcProperties?.length || !validator.allValid()) {\n showValidationMessage(true);\n if (!filteredEcProperties?.length) {\n setPropertyAlert(true);\n }\n return;\n }\n try {\n setIsLoading(true);\n const groupProperty: GroupPropertyCreateReportingAPI = {\n propertyName,\n dataType,\n quantityType,\n ecProperties: filteredEcProperties,\n };\n groupPropertyId\n ? await reportingClientApi.updateGroupProperty(\n iModelId,\n mappingId,\n groupId,\n groupPropertyId,\n groupProperty\n )\n : await reportingClientApi.createGroupProperty(\n iModelId,\n mappingId,\n groupId,\n groupProperty\n );\n await returnFn();\n } catch {\n setIsLoading(false);\n }\n };\n\n const onChange = useCallback((value: string, index: number) => {\n setPropertyAlert(false);\n const property = JSON.parse(value);\n setEcProperties((ecProperties) => {\n const updatedEcProperties = [...ecProperties];\n updatedEcProperties[index].ecPropertyName = property.name;\n\n // Unique types\n let type = \"\";\n switch (property.type) {\n case \"long\":\n type = \"integer\";\n break;\n default:\n type = property.type;\n }\n\n updatedEcProperties[index].ecPropertyType = type;\n return updatedEcProperties;\n });\n }, []);\n\n const propertyOptions = useMemo(() => {\n return ecProperties.map(\n (ecProperty: ECPropertyReportingAPI) =>\n classToPropertiesMapping\n ?.get(`${ecProperty.ecSchemaName}:${ecProperty.ecClassName}`)\n ?.map((property) => ({\n value: JSON.stringify({\n name: property.name,\n type: property.type,\n }),\n label: property.label,\n })) ?? []\n );\n }, [classToPropertiesMapping, ecProperties]);\n\n const getValue = useCallback(\n (ecProperty: ECPropertyReportingAPI, index: number) => {\n const property = classToPropertiesMapping\n ?.get(`${ecProperty.ecSchemaName}:${ecProperty.ecClassName}`)\n ?.find(\n (property) => property.name === ecProperties[index].ecPropertyName\n );\n const result = JSON.stringify({\n name: property?.name,\n type: property?.type,\n });\n return result;\n },\n [classToPropertiesMapping, ecProperties]\n );\n\n return (\n <>\n <WidgetHeader\n title={groupPropertyName ?? \"Add Property\"}\n returnFn={returnFn}\n />\n <div className='group-property-action-container'>\n <Fieldset className='property-options' legend='Property Details'>\n <Small className='field-legend'>\n Asterisk * indicates mandatory fields.\n </Small>\n <LabeledInput\n id='propertyName'\n label='Property Name'\n value={propertyName}\n required\n disabled={isLoading}\n onChange={(event) => {\n setPropertyName(event.target.value);\n validator.showMessageFor(\"propertyName\");\n }}\n message={validator.message(\n \"propertyName\",\n propertyName,\n NAME_REQUIREMENTS\n )}\n status={\n validator.message(\"propertyName\", propertyName, NAME_REQUIREMENTS)\n ? \"negative\"\n : undefined\n }\n onBlur={() => {\n validator.showMessageFor(\"propertyName\");\n }}\n />\n <LabeledSelect<string>\n label={\"Data Type\"}\n id='dataType'\n disabled={isLoading}\n options={[\n { value: \"Boolean\", label: \"Boolean\" },\n { value: \"Number\", label: \"Number\" },\n { value: \"String\", label: \"String\" },\n ]}\n required\n value={dataType}\n onChange={(value) => {\n validator.showMessageFor(\"dataType\");\n setDataType(value);\n }}\n message={validator.message(\"dataType\", propertyName, \"required\")}\n status={\n validator.message(\"dataType\", propertyName, \"required\")\n ? \"negative\"\n : undefined\n }\n onBlur={() => {\n validator.showMessageFor(\"dataType\");\n }}\n onShow={() => { }}\n onHide={() => { }}\n />\n <LabeledSelect<string>\n label='Quantity Type'\n disabled={isLoading}\n options={quantityTypesSelectionOptions}\n value={quantityType}\n onChange={setQuantityType}\n onShow={() => { }}\n onHide={() => { }}\n />\n </Fieldset>\n <Fieldset className='property-selection-container' legend='Properties'>\n {propertyAlert && (\n <Alert type={\"negative\"}>\n Please select at least one property.\n </Alert>\n )}\n {isLoading &&\n Array(3)\n .fill(null)\n .map((_, index) => (\n <Text key={index} variant='headline' isSkeleton>\n LOADING SKELETON\n </Text>\n ))}\n {ecProperties?.map((ecProperty, index) => {\n return (\n <div\n className='property-select-item'\n key={`${ecProperty.ecSchemaName}${ecProperty.ecClassName}`}\n >\n <Text variant='leading'>{ecProperty.ecClassName}</Text>\n <Text isMuted variant='small'>\n {ecProperty.ecSchemaName}\n </Text>\n\n <div className='selection-and-reorder'>\n <ComboBox<string>\n options={propertyOptions[index]}\n value={getValue(ecProperty, index)}\n onChange={(value) => onChange(value, index)}\n inputProps={{\n placeholder: \"<No Property Mapped>\",\n }}\n style={{ width: \"100%\" }}\n />\n <IconButton\n onClick={() => {\n const updatedEcPropertyList = [...ecProperties];\n updatedEcPropertyList[index] = {\n ...updatedEcPropertyList[index],\n ecPropertyName: \"\",\n ecPropertyType: \"\",\n };\n setEcProperties(updatedEcPropertyList);\n }}\n disabled={\n !ecProperty.ecPropertyName && !ecProperty.ecPropertyType\n }\n >\n <SvgRemove />\n </IconButton>\n <IconButton\n onClick={() => {\n const tab = [...ecProperties];\n const item = tab.splice(index, 1);\n tab.splice(index - 1, 0, item[0]);\n setEcProperties(tab);\n }}\n disabled={index === 0}\n >\n <SvgChevronUp />\n </IconButton>\n <IconButton\n onClick={() => {\n const tab = [...ecProperties];\n const item = tab.splice(index, 1);\n tab.splice(index + 1, 0, item[0]);\n setEcProperties(tab);\n }}\n disabled={index === ecProperties.length - 1}\n >\n <SvgChevronDown />\n </IconButton>\n </div>\n </div>\n );\n })}\n </Fieldset>\n </div>\n {/* TODO: Disable when no properties are selected. Will do when I rework property selection. */}\n <ActionPanel onSave={onSave} onCancel={returnFn} isLoading={isLoading} />\n </>\n );\n};\n\nexport default GroupPropertyAction;\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 '~@itwin/itwinui-css/scss/variables';
|
|
6
|
+
|
|
7
|
+
.group-property-action-container {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
overflow-x: auto;
|
|
11
|
+
height: 100%;
|
|
12
|
+
|
|
13
|
+
.property-options {
|
|
14
|
+
display: inherit;
|
|
15
|
+
flex-direction: inherit;
|
|
16
|
+
gap: $iui-baseline;
|
|
17
|
+
margin-bottom: $iui-baseline * 4;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.property-selection-container {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: $iui-baseline;
|
|
24
|
+
|
|
25
|
+
.property-select-item {
|
|
26
|
+
.selection-and-reorder {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: $iui-s;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.iui-text-leading {
|
|
35
|
+
margin: 0;
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { GroupPropertyReportingAPI } from "../../api/generated/api";
|
|
3
|
+
import type { CreateTypeFromInterface } from "../utils";
|
|
4
|
+
import type { CellProps } from "react-table";
|
|
5
|
+
import { PropertyMenuView } from "./PropertyMenu";
|
|
6
|
+
export declare type GroupProperty = CreateTypeFromInterface<GroupPropertyReportingAPI>;
|
|
7
|
+
interface GroupPropertyTableProps {
|
|
8
|
+
iModelId: string;
|
|
9
|
+
mappingId: string;
|
|
10
|
+
groupId: string;
|
|
11
|
+
setSelectedGroupProperty: React.Dispatch<React.SetStateAction<CreateTypeFromInterface<GroupPropertyReportingAPI> | undefined>>;
|
|
12
|
+
setGroupModifyView: React.Dispatch<React.SetStateAction<PropertyMenuView>>;
|
|
13
|
+
onGroupPropertyModify: (value: CellProps<GroupProperty>) => void;
|
|
14
|
+
selectedGroupProperty?: GroupProperty;
|
|
15
|
+
}
|
|
16
|
+
declare const GroupPropertyTable: ({ iModelId, mappingId, groupId, selectedGroupProperty, onGroupPropertyModify, setSelectedGroupProperty, setGroupModifyView, }: GroupPropertyTableProps) => JSX.Element;
|
|
17
|
+
export default GroupPropertyTable;
|
|
18
|
+
//# sourceMappingURL=GroupPropertyTable.d.ts.map
|
|
@@ -0,0 +1,85 @@
|
|
|
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 { SvgAdd, SvgDelete, SvgEdit, SvgMore, } from "@itwin/itwinui-icons-react";
|
|
6
|
+
import { Button, DropdownMenu, IconButton, MenuItem, Table, } from "@itwin/itwinui-react";
|
|
7
|
+
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
8
|
+
import { reportingClientApi } from "../../api/reportingClient";
|
|
9
|
+
import DeleteModal from "./DeleteModal";
|
|
10
|
+
import { PropertyMenuView } from "./PropertyMenu";
|
|
11
|
+
const fetchGroupProperties = async (setGroupProperties, iModelId, mappingId, groupId, setIsLoading) => {
|
|
12
|
+
var _a;
|
|
13
|
+
try {
|
|
14
|
+
setIsLoading(true);
|
|
15
|
+
const groupProperties = await reportingClientApi.getGroupProperties(iModelId, mappingId, groupId);
|
|
16
|
+
setGroupProperties((_a = groupProperties.properties) !== null && _a !== void 0 ? _a : []);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
// TODO Toaster
|
|
20
|
+
}
|
|
21
|
+
finally {
|
|
22
|
+
setIsLoading(false);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const useFetchGroupProperties = (iModelId, mappingId, groupId, setIsLoading) => {
|
|
26
|
+
const [groupProperties, setGroupProperties] = useState([]);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
void fetchGroupProperties(setGroupProperties, iModelId, mappingId, groupId, setIsLoading);
|
|
29
|
+
}, [groupId, iModelId, mappingId, setIsLoading]);
|
|
30
|
+
return [groupProperties, setGroupProperties];
|
|
31
|
+
};
|
|
32
|
+
const GroupPropertyTable = ({ iModelId, mappingId, groupId, selectedGroupProperty, onGroupPropertyModify, setSelectedGroupProperty, setGroupModifyView, }) => {
|
|
33
|
+
var _a;
|
|
34
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
35
|
+
const [groupProperties, setGroupProperties] = useFetchGroupProperties(iModelId, mappingId, groupId, setIsLoading);
|
|
36
|
+
const [showGroupPropertyDeleteModal, setShowGroupPropertyDeleteModal] = useState(false);
|
|
37
|
+
const refresh = useCallback(async () => {
|
|
38
|
+
setGroupProperties([]);
|
|
39
|
+
await fetchGroupProperties(setGroupProperties, iModelId, mappingId, groupId, setIsLoading);
|
|
40
|
+
}, [groupId, iModelId, mappingId, setGroupProperties]);
|
|
41
|
+
const groupPropertiesColumns = useMemo(() => [
|
|
42
|
+
{
|
|
43
|
+
Header: "Table",
|
|
44
|
+
columns: [
|
|
45
|
+
{
|
|
46
|
+
id: "propertyName",
|
|
47
|
+
Header: "Property",
|
|
48
|
+
accessor: "propertyName",
|
|
49
|
+
Cell: (value) => (React.createElement("div", { className: 'iui-anchor', onClick: () => onGroupPropertyModify(value) }, value.row.original.propertyName)),
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "dropdown",
|
|
53
|
+
Header: "",
|
|
54
|
+
width: 80,
|
|
55
|
+
Cell: (value) => {
|
|
56
|
+
return (React.createElement(DropdownMenu, { menuItems: (close) => [
|
|
57
|
+
React.createElement(MenuItem, { key: 0, onClick: () => onGroupPropertyModify(value), icon: React.createElement(SvgEdit, null) }, "Modify"),
|
|
58
|
+
React.createElement(MenuItem, { key: 1, onClick: () => {
|
|
59
|
+
setSelectedGroupProperty(value.row.original);
|
|
60
|
+
setShowGroupPropertyDeleteModal(true);
|
|
61
|
+
close();
|
|
62
|
+
}, icon: React.createElement(SvgDelete, null) }, "Remove"),
|
|
63
|
+
] },
|
|
64
|
+
React.createElement(IconButton, { styleType: 'borderless' },
|
|
65
|
+
React.createElement(SvgMore, { style: {
|
|
66
|
+
width: "16px",
|
|
67
|
+
height: "16px",
|
|
68
|
+
} }))));
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
], [onGroupPropertyModify, setSelectedGroupProperty]);
|
|
74
|
+
return (React.createElement(React.Fragment, null,
|
|
75
|
+
React.createElement(Button, { startIcon: React.createElement(SvgAdd, null), styleType: 'high-visibility', onClick: () => {
|
|
76
|
+
setGroupModifyView(PropertyMenuView.ADD_GROUP_PROPERTY);
|
|
77
|
+
} }, "Add Property"),
|
|
78
|
+
React.createElement(Table, { data: groupProperties, density: 'extra-condensed', columns: groupPropertiesColumns, emptyTableContent: 'No Group Properties', isSortable: true, isLoading: isLoading }),
|
|
79
|
+
React.createElement(DeleteModal, { entityName: (_a = selectedGroupProperty === null || selectedGroupProperty === void 0 ? void 0 : selectedGroupProperty.propertyName) !== null && _a !== void 0 ? _a : "", show: showGroupPropertyDeleteModal, setShow: setShowGroupPropertyDeleteModal, onDelete: async () => {
|
|
80
|
+
var _a;
|
|
81
|
+
await reportingClientApi.deleteGroupProperty(iModelId, mappingId, groupId, (_a = selectedGroupProperty === null || selectedGroupProperty === void 0 ? void 0 : selectedGroupProperty.id) !== null && _a !== void 0 ? _a : "");
|
|
82
|
+
}, refresh: refresh })));
|
|
83
|
+
};
|
|
84
|
+
export default GroupPropertyTable;
|
|
85
|
+
//# sourceMappingURL=GroupPropertyTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupPropertyTable.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupPropertyTable.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AA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AqB,CAAE,YAAY,mCAAI,EAAE,EACrD,IAAI,EAAE,4BAA4B,EAClC,OAAO,EAAE,+BAA+B,EACxC,QAAQ,EAAE,KAAK,IAAI,EAAE;;gBACnB,MAAM,kBAAkB,CAAC,mBAAmB,CAC1C,QAAQ,EACR,SAAS,EACT,OAAO,EACP,MAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,EAAE,mCAAI,EAAE,CAChC,CAAC;YACJ,CAAC,EACD,OAAO,EAAE,OAAO,GAChB,CACD,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,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 {\n SvgAdd,\n SvgDelete,\n SvgEdit,\n SvgMore,\n} from \"@itwin/itwinui-icons-react\";\nimport {\n Button,\n DropdownMenu,\n IconButton,\n MenuItem,\n Table,\n} from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport type { GroupPropertyReportingAPI } from \"../../api/generated/api\";\nimport { reportingClientApi } from \"../../api/reportingClient\";\nimport type { CreateTypeFromInterface } from \"../utils\";\nimport type { CellProps } from \"react-table\";\nimport DeleteModal from \"./DeleteModal\";\nimport { PropertyMenuView } from \"./PropertyMenu\";\n\nexport type GroupProperty = CreateTypeFromInterface<GroupPropertyReportingAPI>;\n\nconst fetchGroupProperties = async (\n setGroupProperties: React.Dispatch<React.SetStateAction<GroupProperty[]>>,\n iModelId: string,\n mappingId: string,\n groupId: string,\n setIsLoading: React.Dispatch<React.SetStateAction<boolean>>,\n) => {\n try {\n setIsLoading(true);\n const groupProperties = await reportingClientApi.getGroupProperties(\n iModelId,\n mappingId,\n groupId,\n );\n setGroupProperties(groupProperties.properties ?? []);\n } catch {\n // TODO Toaster\n } finally {\n setIsLoading(false);\n }\n};\n\nconst useFetchGroupProperties = (\n iModelId: string,\n mappingId: string,\n groupId: string,\n setIsLoading: React.Dispatch<React.SetStateAction<boolean>>,\n): [GroupProperty[], React.Dispatch<React.SetStateAction<GroupProperty[]>>] => {\n const [groupProperties, setGroupProperties] = useState<GroupProperty[]>([]);\n\n useEffect(() => {\n void fetchGroupProperties(\n setGroupProperties,\n iModelId,\n mappingId,\n groupId,\n setIsLoading,\n );\n }, [groupId, iModelId, mappingId, setIsLoading]);\n\n return [groupProperties, setGroupProperties];\n};\n\ninterface GroupPropertyTableProps {\n iModelId: string;\n mappingId: string;\n groupId: string;\n\n setSelectedGroupProperty: React.Dispatch<\n React.SetStateAction<\n CreateTypeFromInterface<GroupPropertyReportingAPI> | undefined\n >\n >;\n setGroupModifyView: React.Dispatch<React.SetStateAction<PropertyMenuView>>;\n onGroupPropertyModify: (value: CellProps<GroupProperty>) => void;\n selectedGroupProperty?: GroupProperty;\n}\n\nconst GroupPropertyTable = ({\n iModelId,\n mappingId,\n groupId,\n selectedGroupProperty,\n onGroupPropertyModify,\n setSelectedGroupProperty,\n setGroupModifyView,\n}: GroupPropertyTableProps) => {\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [groupProperties, setGroupProperties] = useFetchGroupProperties(\n iModelId,\n mappingId,\n groupId,\n setIsLoading,\n );\n const [showGroupPropertyDeleteModal, setShowGroupPropertyDeleteModal] =\n useState<boolean>(false);\n\n const refresh = useCallback(async () => {\n setGroupProperties([]);\n await fetchGroupProperties(\n setGroupProperties,\n iModelId,\n mappingId,\n groupId,\n setIsLoading,\n );\n }, [groupId, iModelId, mappingId, setGroupProperties]);\n\n const groupPropertiesColumns = useMemo(\n () => [\n {\n Header: \"Table\",\n columns: [\n {\n id: \"propertyName\",\n Header: \"Property\",\n accessor: \"propertyName\",\n Cell: (value: CellProps<GroupProperty>) => (\n <div\n className='iui-anchor'\n onClick={() => onGroupPropertyModify(value)}\n >\n {value.row.original.propertyName}\n </div>\n ),\n },\n {\n id: \"dropdown\",\n Header: \"\",\n width: 80,\n Cell: (value: CellProps<GroupProperty>) => {\n return (\n <DropdownMenu\n menuItems={(close: () => void) => [\n <MenuItem\n key={0}\n onClick={() => onGroupPropertyModify(value)}\n icon={<SvgEdit />}\n >\n Modify\n </MenuItem>,\n <MenuItem\n key={1}\n onClick={() => {\n setSelectedGroupProperty(value.row.original);\n setShowGroupPropertyDeleteModal(true);\n close();\n }}\n icon={<SvgDelete />}\n >\n Remove\n </MenuItem>,\n ]}\n >\n <IconButton styleType='borderless'>\n <SvgMore\n style={{\n width: \"16px\",\n height: \"16px\",\n }}\n />\n </IconButton>\n </DropdownMenu>\n );\n },\n },\n ],\n },\n ],\n [onGroupPropertyModify, setSelectedGroupProperty],\n );\n\n return (\n <>\n <Button\n startIcon={<SvgAdd />}\n styleType='high-visibility'\n onClick={() => {\n setGroupModifyView(PropertyMenuView.ADD_GROUP_PROPERTY);\n }}\n >\n Add Property\n </Button>\n <Table<GroupProperty>\n data={groupProperties}\n density='extra-condensed'\n columns={groupPropertiesColumns}\n emptyTableContent='No Group Properties'\n isSortable\n isLoading={isLoading}\n />\n <DeleteModal\n entityName={selectedGroupProperty?.propertyName ?? \"\"}\n show={showGroupPropertyDeleteModal}\n setShow={setShowGroupPropertyDeleteModal}\n onDelete={async () => {\n await reportingClientApi.deleteGroupProperty(\n iModelId,\n mappingId,\n groupId,\n selectedGroupProperty?.id ?? \"\",\n );\n }}\n refresh={refresh}\n />\n </>\n );\n};\n\nexport default GroupPropertyTable;\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 '~@itwin/itwinui-css/scss/variables';
|
|
6
|
+
|
|
7
|
+
.find-similar-container {
|
|
8
|
+
color: var(--buic-foreground-body);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.button-container {
|
|
12
|
+
text-align: right;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.reset-button {
|
|
16
|
+
margin-left: 10px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.select-element-hint {
|
|
20
|
+
display: flex;
|
|
21
|
+
height: 300px;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|