@itwin/grouping-mapping-widget 0.5.6 → 0.6.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/lib/cjs/grouping-mapping-widget.d.ts +2 -3
- package/lib/cjs/grouping-mapping-widget.js +1 -2
- package/lib/cjs/grouping-mapping-widget.js.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.js +2 -2
- package/lib/cjs/widget/components/ActionPanel.js.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.scss +1 -1
- package/lib/cjs/widget/components/BlockingOverlay.js +2 -2
- package/lib/cjs/widget/components/BlockingOverlay.js.map +1 -1
- package/lib/cjs/widget/components/BlockingOverlay.scss +3 -3
- package/lib/cjs/widget/components/CalculatedPropertyAction.d.ts +2 -2
- package/lib/cjs/widget/components/CalculatedPropertyAction.js +18 -18
- package/lib/cjs/widget/components/CalculatedPropertyAction.js.map +1 -1
- package/lib/cjs/widget/components/CalculatedPropertyAction.scss +4 -4
- package/lib/cjs/widget/components/CalculatedPropertyTable.d.ts +5 -5
- package/lib/cjs/widget/components/CalculatedPropertyTable.js.map +1 -1
- package/lib/cjs/widget/components/ConfirmMappingsImport.d.ts +3 -3
- package/lib/cjs/widget/components/ConfirmMappingsImport.js +12 -12
- package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +1 -1
- package/lib/cjs/widget/components/ConfirmMappingsImport.scss +10 -10
- package/lib/cjs/widget/components/CustomCalculationAction.d.ts +2 -2
- package/lib/cjs/widget/components/CustomCalculationAction.js +8 -8
- package/lib/cjs/widget/components/CustomCalculationAction.js.map +1 -1
- package/lib/cjs/widget/components/CustomCalculationAction.scss +2 -2
- package/lib/cjs/widget/components/CustomCalculationTable.d.ts +5 -5
- package/lib/cjs/widget/components/CustomCalculationTable.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.js +2 -2
- package/lib/cjs/widget/components/DeleteModal.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.scss +2 -2
- package/lib/cjs/widget/components/GroupAction.d.ts +2 -2
- package/lib/cjs/widget/components/GroupAction.js +7 -7
- package/lib/cjs/widget/components/GroupAction.js.map +1 -1
- package/lib/cjs/widget/components/GroupAction.scss +6 -6
- package/lib/cjs/widget/components/GroupPropertyAction.d.ts +2 -1
- package/lib/cjs/widget/components/GroupPropertyAction.js +33 -32
- package/lib/cjs/widget/components/GroupPropertyAction.js.map +1 -1
- package/lib/cjs/widget/components/GroupPropertyAction.scss +6 -10
- package/lib/cjs/widget/components/GroupPropertyTable.d.ts +5 -5
- package/lib/cjs/widget/components/GroupPropertyTable.js.map +1 -1
- package/lib/cjs/widget/components/GroupQueryBuilder.scss +4 -4
- package/lib/cjs/widget/components/GroupQueryBuilderContainer.js +3 -3
- package/lib/cjs/widget/components/GroupQueryBuilderContainer.js.map +1 -1
- package/lib/cjs/widget/components/Grouping.d.ts +1 -1
- package/lib/cjs/widget/components/Grouping.js +36 -37
- package/lib/cjs/widget/components/Grouping.js.map +1 -1
- package/lib/cjs/widget/components/Grouping.scss +11 -13
- package/lib/cjs/widget/components/GroupingMapping.d.ts +2 -2
- package/lib/cjs/widget/components/GroupingMapping.js +1 -1
- package/lib/cjs/widget/components/GroupingMapping.js.map +1 -1
- package/lib/cjs/widget/components/GroupingMapping.scss +4 -10
- package/lib/cjs/widget/components/HorizontalTile.js +4 -4
- package/lib/cjs/widget/components/HorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.scss +2 -2
- package/lib/cjs/widget/components/Mapping.d.ts +1 -1
- package/lib/cjs/widget/components/Mapping.js +8 -9
- package/lib/cjs/widget/components/Mapping.js.map +1 -1
- package/lib/cjs/widget/components/Mapping.scss +2 -2
- package/lib/cjs/widget/components/MappingAction.js +4 -5
- package/lib/cjs/widget/components/MappingAction.js.map +1 -1
- package/lib/cjs/widget/components/MappingAction.scss +2 -2
- package/lib/cjs/widget/components/MappingImportWizardModal.js +2 -2
- package/lib/cjs/widget/components/MappingImportWizardModal.js.map +1 -1
- package/lib/cjs/widget/components/MappingImportWizardModal.scss +3 -3
- package/lib/cjs/widget/components/PropertyMenu.d.ts +2 -2
- package/lib/cjs/widget/components/PropertyMenu.js +16 -17
- package/lib/cjs/widget/components/PropertyMenu.js.map +1 -1
- package/lib/cjs/widget/components/PropertyMenu.scss +7 -7
- package/lib/cjs/widget/components/SelectIModel.js +3 -3
- package/lib/cjs/widget/components/SelectIModel.js.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.scss +2 -6
- package/lib/cjs/widget/components/SelectMapping.scss +2 -2
- package/lib/cjs/widget/components/SelectMappings.d.ts +2 -2
- package/lib/cjs/widget/components/SelectMappings.js +5 -5
- package/lib/cjs/widget/components/SelectMappings.js.map +1 -1
- package/lib/cjs/widget/components/SelectProject.js +5 -5
- package/lib/cjs/widget/components/SelectProject.js.map +1 -1
- package/lib/cjs/widget/components/SelectProject.scss +5 -5
- package/lib/cjs/widget/components/context/MappingClientContext.d.ts +5 -5
- package/lib/cjs/widget/components/context/MappingClientContext.js +1 -5
- package/lib/cjs/widget/components/context/MappingClientContext.js.map +1 -1
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.d.ts +0 -1
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.js +0 -1
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/widget/components/property-grid/PropertyGridWrapper.js +1 -1
- package/lib/cjs/widget/components/property-grid/PropertyGridWrapper.js.map +1 -1
- package/lib/cjs/widget/components/utils.js +6 -6
- package/lib/cjs/widget/components/utils.js.map +1 -1
- package/lib/cjs/widget/components/utils.scss +6 -6
- package/lib/esm/grouping-mapping-widget.d.ts +2 -3
- package/lib/esm/grouping-mapping-widget.js +1 -2
- package/lib/esm/grouping-mapping-widget.js.map +1 -1
- package/lib/esm/widget/components/ActionPanel.js +2 -2
- package/lib/esm/widget/components/ActionPanel.js.map +1 -1
- package/lib/esm/widget/components/ActionPanel.scss +1 -1
- package/lib/esm/widget/components/BlockingOverlay.js +2 -2
- package/lib/esm/widget/components/BlockingOverlay.js.map +1 -1
- package/lib/esm/widget/components/BlockingOverlay.scss +3 -3
- package/lib/esm/widget/components/CalculatedPropertyAction.d.ts +2 -2
- package/lib/esm/widget/components/CalculatedPropertyAction.js +18 -18
- package/lib/esm/widget/components/CalculatedPropertyAction.js.map +1 -1
- package/lib/esm/widget/components/CalculatedPropertyAction.scss +4 -4
- package/lib/esm/widget/components/CalculatedPropertyTable.d.ts +5 -5
- package/lib/esm/widget/components/CalculatedPropertyTable.js.map +1 -1
- package/lib/esm/widget/components/ConfirmMappingsImport.d.ts +3 -3
- package/lib/esm/widget/components/ConfirmMappingsImport.js +12 -12
- package/lib/esm/widget/components/ConfirmMappingsImport.js.map +1 -1
- package/lib/esm/widget/components/ConfirmMappingsImport.scss +10 -10
- package/lib/esm/widget/components/CustomCalculationAction.d.ts +2 -2
- package/lib/esm/widget/components/CustomCalculationAction.js +8 -8
- package/lib/esm/widget/components/CustomCalculationAction.js.map +1 -1
- package/lib/esm/widget/components/CustomCalculationAction.scss +2 -2
- package/lib/esm/widget/components/CustomCalculationTable.d.ts +5 -5
- package/lib/esm/widget/components/CustomCalculationTable.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.js +2 -2
- package/lib/esm/widget/components/DeleteModal.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.scss +2 -2
- package/lib/esm/widget/components/GroupAction.d.ts +2 -2
- package/lib/esm/widget/components/GroupAction.js +7 -7
- package/lib/esm/widget/components/GroupAction.js.map +1 -1
- package/lib/esm/widget/components/GroupAction.scss +6 -6
- package/lib/esm/widget/components/GroupPropertyAction.d.ts +2 -1
- package/lib/esm/widget/components/GroupPropertyAction.js +33 -32
- package/lib/esm/widget/components/GroupPropertyAction.js.map +1 -1
- package/lib/esm/widget/components/GroupPropertyAction.scss +6 -10
- package/lib/esm/widget/components/GroupPropertyTable.d.ts +5 -5
- package/lib/esm/widget/components/GroupPropertyTable.js.map +1 -1
- package/lib/esm/widget/components/GroupQueryBuilder.scss +4 -4
- package/lib/esm/widget/components/GroupQueryBuilderContainer.js +3 -3
- package/lib/esm/widget/components/GroupQueryBuilderContainer.js.map +1 -1
- package/lib/esm/widget/components/Grouping.d.ts +1 -1
- package/lib/esm/widget/components/Grouping.js +37 -38
- package/lib/esm/widget/components/Grouping.js.map +1 -1
- package/lib/esm/widget/components/Grouping.scss +11 -13
- package/lib/esm/widget/components/GroupingMapping.d.ts +2 -2
- package/lib/esm/widget/components/GroupingMapping.js +1 -1
- package/lib/esm/widget/components/GroupingMapping.js.map +1 -1
- package/lib/esm/widget/components/GroupingMapping.scss +4 -10
- package/lib/esm/widget/components/HorizontalTile.js +4 -4
- package/lib/esm/widget/components/HorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.scss +2 -2
- package/lib/esm/widget/components/Mapping.d.ts +1 -1
- package/lib/esm/widget/components/Mapping.js +8 -9
- package/lib/esm/widget/components/Mapping.js.map +1 -1
- package/lib/esm/widget/components/Mapping.scss +2 -2
- package/lib/esm/widget/components/MappingAction.js +4 -5
- package/lib/esm/widget/components/MappingAction.js.map +1 -1
- package/lib/esm/widget/components/MappingAction.scss +2 -2
- package/lib/esm/widget/components/MappingImportWizardModal.js +2 -2
- package/lib/esm/widget/components/MappingImportWizardModal.js.map +1 -1
- package/lib/esm/widget/components/MappingImportWizardModal.scss +3 -3
- package/lib/esm/widget/components/PropertyMenu.d.ts +2 -2
- package/lib/esm/widget/components/PropertyMenu.js +16 -17
- package/lib/esm/widget/components/PropertyMenu.js.map +1 -1
- package/lib/esm/widget/components/PropertyMenu.scss +7 -7
- package/lib/esm/widget/components/SelectIModel.js +3 -3
- package/lib/esm/widget/components/SelectIModel.js.map +1 -1
- package/lib/esm/widget/components/SelectIModel.scss +2 -6
- package/lib/esm/widget/components/SelectMapping.scss +2 -2
- package/lib/esm/widget/components/SelectMappings.d.ts +2 -2
- package/lib/esm/widget/components/SelectMappings.js +5 -5
- package/lib/esm/widget/components/SelectMappings.js.map +1 -1
- package/lib/esm/widget/components/SelectProject.js +5 -5
- package/lib/esm/widget/components/SelectProject.js.map +1 -1
- package/lib/esm/widget/components/SelectProject.scss +5 -5
- package/lib/esm/widget/components/context/MappingClientContext.d.ts +5 -5
- package/lib/esm/widget/components/context/MappingClientContext.js +2 -6
- package/lib/esm/widget/components/context/MappingClientContext.js.map +1 -1
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.d.ts +0 -1
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.js +0 -1
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/widget/components/property-grid/PropertyGridWrapper.js +1 -1
- package/lib/esm/widget/components/property-grid/PropertyGridWrapper.js.map +1 -1
- package/lib/esm/widget/components/utils.js +6 -6
- package/lib/esm/widget/components/utils.js.map +1 -1
- package/lib/esm/widget/components/utils.scss +6 -6
- package/package.json +2 -2
- package/lib/cjs/widget/IMappingClient.d.ts +0 -327
- package/lib/cjs/widget/IMappingClient.js +0 -7
- package/lib/cjs/widget/IMappingClient.js.map +0 -1
- package/lib/esm/widget/IMappingClient.d.ts +0 -327
- package/lib/esm/widget/IMappingClient.js +0 -6
- package/lib/esm/widget/IMappingClient.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupPropertyAction.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupPropertyAction.tsx"],"names":[],"mappings":"AAeA,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;AAEpC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AG,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,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,KAAK,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,SAAS,GAAI,CAC3F,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,\n} 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 { SelectOption } from \"@itwin/itwinui-react\";\nimport {\n Alert,\n Fieldset,\n IconButton,\n LabeledInput,\n LabeledSelect,\n Select,\n Small,\n Text,\n} from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport ActionPanel from \"./ActionPanel\";\nimport useValidator, { NAME_REQUIREMENTS } from \"../hooks/useValidator\";\nimport { handleError, WidgetHeader } from \"./utils\";\nimport \"./GroupPropertyAction.scss\";\nimport type { ECProperty, GroupPropertyCreate, GroupPropertySingle } from \"@itwin/insights-client\";\nimport { useMappingClient } from \"./context/MappingClientContext\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\n\ninterface GroupPropertyActionProps {\n iModelId: string;\n mappingId: string;\n groupId: string;\n groupPropertyId?: string;\n groupPropertyName?: string;\n keySet: KeySet;\n returnFn: (modified: boolean) => 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 // Ignore hardcoded BisCore navigation properties\n if (propertiesField.type.typeName === \"navigation\") {\n return;\n } else {\n classToPropertiesMapping.get(className)?.push({\n name: propertyName,\n label,\n type: propertiesField.properties[0].property.type,\n });\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 // Check for aspects. Ignore them if coming from navigation.\n 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 // Hardcoded BisCore navigation properties for the type definition.\n classToPropertiesMapping.get(className)?.push({\n name: \"TypeDefinition.Model.ModeledElement.UserLabel\",\n label: \"Model UserLabel (TypeDefinition)\",\n type: \"string\",\n });\n\n classToPropertiesMapping.get(className)?.push({\n name: \"TypeDefinition.Model.ModeledElement.CodeValue\",\n label: \"Model CodeValue (TypeDefinition)\",\n type: \"string\",\n });\n\n }\n break;\n }\n default: {\n // Some elements don't have a path to primary class or relationship meaning..\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\n }\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 { getAccessToken } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\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<ECProperty[]>(\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 },\n ],\n }],\n };\n const requestOptions: ContentDescriptorRequestOptions<IModelConnection, KeySet, RulesetVariable> = {\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 const rootClassName = keySet.instanceKeys.keys().next().value;\n\n // Hardcoded BisCore navigation properties.\n classToPropertiesMapping.get(rootClassName)?.push({\n name: \"Model.ModeledElement.UserLabel\",\n label: \"Model UserLabel\",\n type: \"string\",\n });\n\n classToPropertiesMapping.get(rootClassName)?.push({\n name: \"Model.ModeledElement.CodeValue\",\n label: \"Model CodeValue\",\n type: \"string\",\n });\n\n classToPropertiesMapping.get(rootClassName)?.push({\n name: \"Category.CodeValue\",\n label: \"Category CodeValue\",\n type: \"string\",\n });\n\n classToPropertiesMapping.get(rootClassName)?.push({\n name: \"Category.UserLabel\",\n label: \"Category UserLabel\",\n type: \"string\",\n });\n\n setClassToPropertiesMapping(classToPropertiesMapping);\n\n let newEcProperties: ECProperty[];\n // Fetch already existing ec properties then add all classes from presentation\n if (groupPropertyId) {\n const accessToken = await getAccessToken();\n let response: GroupPropertySingle | undefined;\n try {\n response = await mappingClient.getGroupProperty(\n accessToken,\n iModelId,\n mappingId,\n groupId,\n groupPropertyId\n );\n } catch (error: any) {\n handleError(error.status);\n }\n\n if (!response) {\n return;\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 }, [getAccessToken, mappingClient, 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 accessToken = await getAccessToken();\n const groupProperty: GroupPropertyCreate = {\n propertyName,\n dataType,\n quantityType,\n ecProperties: filteredEcProperties,\n };\n groupPropertyId\n ? await mappingClient.updateGroupProperty(\n accessToken,\n iModelId,\n mappingId,\n groupId,\n groupPropertyId,\n groupProperty\n )\n : await mappingClient.createGroupProperty(\n accessToken,\n iModelId,\n mappingId,\n groupId,\n groupProperty\n );\n await returnFn(true);\n } catch (error: any) {\n handleError(error.status);\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: ECProperty) =>\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: ECProperty, 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={async () => returnFn(false)}\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 <Select<string>\n options={propertyOptions[index]}\n value={getValue(ecProperty, index)}\n onChange={(value) => { value && onChange(value, index); }}\n placeholder=\"<No Property Mapped>\"\n style={{ width: \"100%\" }}\n onShow={() => { }}\n onHide={() => { }}\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={async () => returnFn(false)} isLoading={isLoading} />\n </>\n );\n};\n\nexport default GroupPropertyAction;\n"]}
|
|
1
|
+
{"version":3,"file":"GroupPropertyAction.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupPropertyAction.tsx"],"names":[],"mappings":"AAeA,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;AAEpC,OAAO,EACL,KAAK,EACL,QAAQ,EACR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AAI,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,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,KAAK,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,SAAS,GAAI,CAC3F,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,\n} 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 { SelectOption } from \"@itwin/itwinui-react\";\nimport {\n Alert,\n Fieldset,\n IconButton,\n LabeledInput,\n LabeledSelect,\n Select,\n Small,\n Text,\n} from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport ActionPanel from \"./ActionPanel\";\nimport useValidator, { NAME_REQUIREMENTS } from \"../hooks/useValidator\";\nimport { handleError, WidgetHeader } from \"./utils\";\nimport \"./GroupPropertyAction.scss\";\nimport type { ECProperty, GroupProperty, GroupPropertyCreate} from \"@itwin/insights-client\";\nimport { DataType, QuantityType } from \"@itwin/insights-client\";\nimport { useMappingClient } from \"./context/MappingClientContext\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\n\ninterface GroupPropertyActionProps {\n iModelId: string;\n mappingId: string;\n groupId: string;\n groupPropertyId?: string;\n groupPropertyName?: string;\n keySet: KeySet;\n returnFn: (modified: boolean) => Promise<void>;\n}\n\nexport const quantityTypesSelectionOptions: SelectOption<QuantityType>[] = [\n { value: QuantityType.Area, label: \"Area\" },\n { value: QuantityType.Distance, label: \"Distance\" },\n { value: QuantityType.Force, label: \"Force\" },\n { value: QuantityType.Mass, label: \"Mass\" },\n { value: QuantityType.Monetary, label: \"Monetary\" },\n { value: QuantityType.Time, label: \"Time\" },\n { value: QuantityType.Volume, label: \"Volume\" },\n { value: QuantityType.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 // Ignore hardcoded BisCore navigation properties\n if (propertiesField.type.typeName === \"navigation\") {\n return;\n } else {\n classToPropertiesMapping.get(className)?.push({\n name: propertyName,\n label,\n type: propertiesField.properties[0].property.type,\n });\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 // Check for aspects. Ignore them if coming from navigation.\n 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 // Hardcoded BisCore navigation properties for the type definition.\n classToPropertiesMapping.get(className)?.push({\n name: \"TypeDefinition.Model.ModeledElement.UserLabel\",\n label: \"Model UserLabel (TypeDefinition)\",\n type: \"string\",\n });\n\n classToPropertiesMapping.get(className)?.push({\n name: \"TypeDefinition.Model.ModeledElement.CodeValue\",\n label: \"Model CodeValue (TypeDefinition)\",\n type: \"string\",\n });\n\n }\n break;\n }\n default: {\n // Some elements don't have a path to primary class or relationship meaning..\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\n }\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 { getAccessToken } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n const [propertyName, setPropertyName] = useState<string>(\"\");\n const [dataType, setDataType] = useState<DataType>(DataType.Undefined);\n const [quantityType, setQuantityType] = useState<QuantityType>(QuantityType.Undefined);\n const [classToPropertiesMapping, setClassToPropertiesMapping] =\n useState<Map<string, Property[]>>();\n const [ecProperties, setEcProperties] = useState<ECProperty[]>(\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 },\n ],\n }],\n };\n const requestOptions: ContentDescriptorRequestOptions<IModelConnection, KeySet, RulesetVariable> = {\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 const rootClassName = keySet.instanceKeys.keys().next().value;\n\n // Hardcoded BisCore navigation properties.\n classToPropertiesMapping.get(rootClassName)?.push({\n name: \"Model.ModeledElement.UserLabel\",\n label: \"Model UserLabel\",\n type: \"string\",\n });\n\n classToPropertiesMapping.get(rootClassName)?.push({\n name: \"Model.ModeledElement.CodeValue\",\n label: \"Model CodeValue\",\n type: \"string\",\n });\n\n classToPropertiesMapping.get(rootClassName)?.push({\n name: \"Category.CodeValue\",\n label: \"Category CodeValue\",\n type: \"string\",\n });\n\n classToPropertiesMapping.get(rootClassName)?.push({\n name: \"Category.UserLabel\",\n label: \"Category UserLabel\",\n type: \"string\",\n });\n\n setClassToPropertiesMapping(classToPropertiesMapping);\n\n let newEcProperties: ECProperty[];\n // Fetch already existing ec properties then add all classes from presentation\n if (groupPropertyId) {\n const accessToken = await getAccessToken();\n let response: GroupProperty | undefined;\n try {\n response = await mappingClient.getGroupProperty(\n accessToken,\n iModelId,\n mappingId,\n groupId,\n groupPropertyId\n );\n } catch (error: any) {\n handleError(error.status);\n }\n\n if (!response) {\n return;\n }\n newEcProperties = response.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: DataType.Undefined,\n }))\n );\n\n setPropertyName(response.propertyName);\n setDataType(response.dataType);\n setQuantityType(response.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: DataType.Undefined,\n }))\n .reverse();\n }\n\n setEcProperties(newEcProperties);\n\n setIsLoading(false);\n };\n void getContent();\n }, [getAccessToken, mappingClient, 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 accessToken = await getAccessToken();\n const groupProperty: GroupPropertyCreate = {\n propertyName,\n dataType,\n quantityType,\n ecProperties: filteredEcProperties,\n };\n groupPropertyId\n ? await mappingClient.updateGroupProperty(\n accessToken,\n iModelId,\n mappingId,\n groupId,\n groupPropertyId,\n groupProperty\n )\n : await mappingClient.createGroupProperty(\n accessToken,\n iModelId,\n mappingId,\n groupId,\n groupProperty\n );\n await returnFn(true);\n } catch (error: any) {\n handleError(error.status);\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 = DataType.Undefined;\n switch (property.type) {\n case \"long\":\n type = DataType.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: ECProperty) =>\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: ECProperty, 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={async () => returnFn(false)}\n />\n <div className='gmw-group-property-action-container'>\n <Fieldset className='gmw-property-options' legend='Property Details'>\n <Small className='gmw-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<DataType>\n label={\"Data Type\"}\n id='dataType'\n disabled={isLoading}\n options={[\n { value: DataType.Boolean, label: \"Boolean\" },\n { value: DataType.Number, label: \"Number\" },\n { value: DataType.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<QuantityType>\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='gmw-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='gmw-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='gmw-selection-and-reorder'>\n <Select<string>\n options={propertyOptions[index]}\n value={getValue(ecProperty, index)}\n onChange={(value) => { value && onChange(value, index); }}\n placeholder=\"<No Property Mapped>\"\n style={{ width: \"100%\" }}\n onShow={() => { }}\n onHide={() => { }}\n />\n <IconButton\n onClick={() => {\n const updatedEcPropertyList = [...ecProperties];\n updatedEcPropertyList[index] = {\n ...updatedEcPropertyList[index],\n ecPropertyName: \"\",\n ecPropertyType: DataType.Undefined,\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={async () => returnFn(false)} isLoading={isLoading} />\n </>\n );\n};\n\nexport default GroupPropertyAction;\n"]}
|
|
@@ -4,33 +4,29 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import '~@itwin/itwinui-css/scss/variables';
|
|
6
6
|
|
|
7
|
-
.group-property-action-container {
|
|
7
|
+
.gmw-group-property-action-container {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
overflow-x: auto;
|
|
11
11
|
height: 100%;
|
|
12
12
|
|
|
13
|
-
.property-options {
|
|
13
|
+
.gmw-property-options {
|
|
14
14
|
display: inherit;
|
|
15
15
|
flex-direction: inherit;
|
|
16
16
|
gap: $iui-baseline;
|
|
17
17
|
margin-bottom: $iui-baseline * 4;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.property-selection-container {
|
|
20
|
+
.gmw-property-selection-container {
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
gap: $iui-baseline;
|
|
24
24
|
|
|
25
|
-
.property-select-item {
|
|
26
|
-
.selection-and-reorder {
|
|
25
|
+
.gmw-property-select-item {
|
|
26
|
+
.gmw-selection-and-reorder {
|
|
27
27
|
display: flex;
|
|
28
28
|
gap: $iui-s;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.iui-text-leading {
|
|
35
|
-
margin: 0;
|
|
36
|
-
}
|
|
32
|
+
}
|
|
@@ -3,18 +3,18 @@ import type { CreateTypeFromInterface } from "../utils";
|
|
|
3
3
|
import type { CellProps } from "react-table";
|
|
4
4
|
import { PropertyMenuView } from "./PropertyMenu";
|
|
5
5
|
import type { GroupProperty } from "@itwin/insights-client";
|
|
6
|
-
export declare type
|
|
6
|
+
export declare type IGroupPropertyTyped = CreateTypeFromInterface<GroupProperty>;
|
|
7
7
|
interface GroupPropertyTableProps {
|
|
8
8
|
iModelId: string;
|
|
9
9
|
mappingId: string;
|
|
10
10
|
groupId: string;
|
|
11
|
-
setSelectedGroupProperty: React.Dispatch<React.SetStateAction<
|
|
11
|
+
setSelectedGroupProperty: React.Dispatch<React.SetStateAction<IGroupPropertyTyped | undefined>>;
|
|
12
12
|
setGroupModifyView: React.Dispatch<React.SetStateAction<PropertyMenuView>>;
|
|
13
|
-
onGroupPropertyModify: (value: CellProps<
|
|
13
|
+
onGroupPropertyModify: (value: CellProps<IGroupPropertyTyped>) => void;
|
|
14
14
|
isLoadingGroupProperties: boolean;
|
|
15
|
-
groupProperties:
|
|
15
|
+
groupProperties: IGroupPropertyTyped[];
|
|
16
16
|
refreshGroupProperties: () => Promise<void>;
|
|
17
|
-
selectedGroupProperty?:
|
|
17
|
+
selectedGroupProperty?: IGroupPropertyTyped;
|
|
18
18
|
}
|
|
19
19
|
declare const GroupPropertyTable: ({ iModelId, mappingId, groupId, selectedGroupProperty, onGroupPropertyModify, setSelectedGroupProperty, isLoadingGroupProperties, groupProperties, refreshGroupProperties, setGroupModifyView, }: GroupPropertyTableProps) => JSX.Element;
|
|
20
20
|
export default GroupPropertyTable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupPropertyTable.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupPropertyTable.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,MAAM,EACN,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,KAAK,GACN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAiBlE,MAAM,kBAAkB,GAAG,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,kBAAkB,GACM,EAAE,EAAE;;IAC5B,MAAM,EAAE,cAAc,EAAE,GAAG,2BAA2B,EAAE,CAAC;IACzD,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,CAAC,4BAA4B,EAAE,+BAA+B,CAAC,GACnE,QAAQ,CAAU,KAAK,CAAC,CAAC;IAE3B,MAAM,sBAAsB,GAAG,OAAO,CACpC,GAAG,EAAE,CAAC;QACJ;YACE,MAAM,EAAE,OAAO;YACf,OAAO,EAAE;gBACP;oBACE,EAAE,EAAE,cAAc;oBAClB,MAAM,EAAE,UAAU;oBAClB,QAAQ,EAAE,cAAc;oBACxB,IAAI,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"GroupPropertyTable.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupPropertyTable.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,MAAM,EACN,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,KAAK,GACN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAiBlE,MAAM,kBAAkB,GAAG,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,kBAAkB,GACM,EAAE,EAAE;;IAC5B,MAAM,EAAE,cAAc,EAAE,GAAG,2BAA2B,EAAE,CAAC;IACzD,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,CAAC,4BAA4B,EAAE,+BAA+B,CAAC,GACnE,QAAQ,CAAU,KAAK,CAAC,CAAC;IAE3B,MAAM,sBAAsB,GAAG,OAAO,CACpC,GAAG,EAAE,CA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AAC,MAAM,IACL,SAAS,EAAE,oBAAC,MAAM,OAAG,EACrB,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,GAAG,EAAE;gBACZ,kBAAkB,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;YAC1D,CAAC,mBAGM;QACT,oBAAC,KAAK,IACJ,IAAI,EAAE,eAAe,EACrB,OAAO,EAAC,iBAAiB,EACzB,OAAO,EAAE,sBAAsB,EAC/B,iBAAiB,EAAC,qBAAqB,EACvC,UAAU,QACV,SAAS,EAAE,wBAAwB,GACnC;QACF,oBAAC,WAAW,IACV,UAAU,EAAE,MAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,YAAY,mCAAI,EAAE,EACrD,IAAI,EAAE,4BAA4B,EAClC,OAAO,EAAE,+BAA+B,EACxC,QAAQ,EAAE,KAAK,IAAI,EAAE;;gBACnB,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;gBAC3C,MAAM,aAAa,CAAC,mBAAmB,CACrC,WAAW,EACX,QAAQ,EACR,SAAS,EACT,OAAO,EACP,MAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,EAAE,mCAAI,EAAE,CAChC,CAAC;YACJ,CAAC,EACD,OAAO,EAAE,sBAAsB,GAC/B,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, { useMemo, useState } from \"react\";\nimport type { CreateTypeFromInterface } from \"../utils\";\nimport type { CellProps } from \"react-table\";\nimport DeleteModal from \"./DeleteModal\";\nimport { PropertyMenuView } from \"./PropertyMenu\";\nimport type { GroupProperty } from \"@itwin/insights-client\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\nimport { useMappingClient } from \"./context/MappingClientContext\";\n\nexport type IGroupPropertyTyped = CreateTypeFromInterface<GroupProperty>;\n\ninterface GroupPropertyTableProps {\n iModelId: string;\n mappingId: string;\n groupId: string;\n setSelectedGroupProperty: React.Dispatch<React.SetStateAction<IGroupPropertyTyped | undefined>>;\n setGroupModifyView: React.Dispatch<React.SetStateAction<PropertyMenuView>>;\n onGroupPropertyModify: (value: CellProps<IGroupPropertyTyped>) => void;\n isLoadingGroupProperties: boolean;\n groupProperties: IGroupPropertyTyped[];\n refreshGroupProperties: () => Promise<void>;\n selectedGroupProperty?: IGroupPropertyTyped;\n}\n\nconst GroupPropertyTable = ({\n iModelId,\n mappingId,\n groupId,\n selectedGroupProperty,\n onGroupPropertyModify,\n setSelectedGroupProperty,\n isLoadingGroupProperties,\n groupProperties,\n refreshGroupProperties,\n setGroupModifyView,\n}: GroupPropertyTableProps) => {\n const { getAccessToken } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n const [showGroupPropertyDeleteModal, setShowGroupPropertyDeleteModal] =\n useState<boolean>(false);\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<IGroupPropertyTyped>) => (\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<IGroupPropertyTyped>) => {\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<IGroupPropertyTyped>\n data={groupProperties}\n density='extra-condensed'\n columns={groupPropertiesColumns}\n emptyTableContent='No Group Properties'\n isSortable\n isLoading={isLoadingGroupProperties}\n />\n <DeleteModal\n entityName={selectedGroupProperty?.propertyName ?? \"\"}\n show={showGroupPropertyDeleteModal}\n setShow={setShowGroupPropertyDeleteModal}\n onDelete={async () => {\n const accessToken = await getAccessToken();\n await mappingClient.deleteGroupProperty(\n accessToken,\n iModelId,\n mappingId,\n groupId,\n selectedGroupProperty?.id ?? \"\",\n );\n }}\n refresh={refreshGroupProperties}\n />\n </>\n );\n};\n\nexport default GroupPropertyTable;\n"]}
|
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import '~@itwin/itwinui-css/scss/variables';
|
|
6
6
|
|
|
7
|
-
.find-similar-container {
|
|
7
|
+
.gmw-find-similar-container {
|
|
8
8
|
color: var(--buic-foreground-body);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.button-container {
|
|
11
|
+
.gmw-button-container {
|
|
12
12
|
text-align: right;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.reset-button {
|
|
15
|
+
.gmw-reset-button {
|
|
16
16
|
margin-left: 10px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.select-element-hint {
|
|
19
|
+
.gmw-select-element-hint {
|
|
20
20
|
display: flex;
|
|
21
21
|
height: 300px;
|
|
22
22
|
justify-content: center;
|
|
@@ -38,9 +38,9 @@ export const GroupQueryBuilderContainer = () => {
|
|
|
38
38
|
/* eslint-disable no-console */
|
|
39
39
|
console.error(e));
|
|
40
40
|
};
|
|
41
|
-
return (React.createElement("div", { className: "find-similar-container" },
|
|
41
|
+
return (React.createElement("div", { className: "gmw-find-similar-container" },
|
|
42
42
|
React.createElement(PropertyGridWrapperApp, { keys: keysState, imodel: iModelConnection }),
|
|
43
|
-
selected && (React.createElement("div", { className: "button-container" },
|
|
44
|
-
React.createElement(Button, { styleType: "default", size: "small", className: "reset-button", onClick: _onClickResetButton }, "Reset")))));
|
|
43
|
+
selected && (React.createElement("div", { className: "gmw-button-container" },
|
|
44
|
+
React.createElement(Button, { styleType: "default", size: "small", className: "gmw-reset-button", onClick: _onClickResetButton }, "Reset")))));
|
|
45
45
|
};
|
|
46
46
|
//# sourceMappingURL=GroupQueryBuilderContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupQueryBuilderContainer.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupQueryBuilderContainer.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAK/D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,0BAA0B,GAA4B,GAAG,EAAE;IACt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AAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;YACxE,MAAM,IAAI,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC;YACnC,YAAY,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC;QAEF,IAAI,gBAAgB,EAAE;YACpB,oBAAoB,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;SAChE;QACD,OAAO,GAAG,EAAE;YACV,oBAAoB,CAAC,uBAAuB,EAAE,CAAC;QACjD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,CAAC;IAEhC,MAAM,mBAAmB,GAAG,GAAG,EAAE;QAC/B,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACrB,OAAO,CAAC,YAAY,CAAC,KAAK,GAAG,SAAS,CAAC;QACvC,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;QACnC,OAAO,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QAC9B,+BAA+B;QAC/B,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CACjB,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,6BAAK,SAAS,EAAC,4BAA4B;QACzC,oBAAC,sBAAsB,IAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,GAAI;QACpE,QAAQ,IAAI,CACX,6BAAK,SAAS,EAAC,sBAAsB;YACnC,oBAAC,MAAM,IACL,SAAS,EAAC,SAAS,EACnB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,kBAAkB,EAC5B,OAAO,EAAE,mBAAmB,YAGrB,CACL,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React, { useEffect } from \"react\";\nimport { useActiveIModelConnection } from \"@itwin/appui-react\";\nimport type {\n ISelectionProvider,\n SelectionChangeEventArgs,\n} from \"@itwin/presentation-frontend\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport { GroupQueryBuilderApi } from \"../../api/GroupQueryBuilderApi\";\nimport { PropertyGridWrapperApp } from \"./property-grid/PropertyGridWrapper\";\nimport { GroupQueryBuilderContext } from \"./context/GroupQueryBuilderContext\";\nimport { Button } from \"@itwin/itwinui-react\";\nimport \"./GroupQueryBuilder.scss\";\n\nexport const GroupQueryBuilderContainer: React.FunctionComponent = () => {\n const iModelConnection = useActiveIModelConnection();\n const context = React.useContext(GroupQueryBuilderContext);\n\n const [keysState, setKeysState] = React.useState<KeySet>(new KeySet());\n const [selected, SetSelected] = React.useState<boolean>(false);\n\n useEffect(() => {\n const _onSelectionChanged = async (\n evt: SelectionChangeEventArgs,\n selectionProvider: ISelectionProvider\n ) => {\n SetSelected(true);\n context.setCurrentPropertyList([]);\n\n const selection = selectionProvider.getSelection(evt.imodel, evt.level);\n const keys = new KeySet(selection);\n setKeysState(keys);\n };\n\n if (iModelConnection) {\n GroupQueryBuilderApi.addSelectionListener(_onSelectionChanged);\n }\n return () => {\n GroupQueryBuilderApi.removeSelectionListener();\n };\n }, [iModelConnection, context]);\n\n const _onClickResetButton = () => {\n context.setQuery(\"\");\n context.queryBuilder.query = undefined;\n context.setCurrentPropertyList([]);\n context.resetView().catch((e) =>\n /* eslint-disable no-console */\n console.error(e)\n );\n };\n\n return (\n <div className=\"gmw-find-similar-container\">\n <PropertyGridWrapperApp keys={keysState} imodel={iModelConnection} />\n {selected && (\n <div className=\"gmw-button-container\">\n <Button\n styleType=\"default\"\n size=\"small\"\n className=\"gmw-reset-button\"\n onClick={_onClickResetButton}\n >\n Reset\n </Button>\n </div>\n )}\n </div>\n );\n};\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { CreateTypeFromInterface } from "../utils";
|
|
3
3
|
import "./Grouping.scss";
|
|
4
4
|
import type { Group, Mapping } from "@itwin/insights-client";
|
|
5
|
-
export declare type
|
|
5
|
+
export declare type IGroupTyped = CreateTypeFromInterface<Group>;
|
|
6
6
|
interface GroupsTreeProps {
|
|
7
7
|
mapping: Mapping;
|
|
8
8
|
goBack: () => Promise<void>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { useActiveIModelConnection } from "@itwin/appui-react";
|
|
6
6
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
7
7
|
import { Button, ButtonGroup, DropdownMenu, IconButton, MenuItem, ProgressRadial, Surface, toaster, ToggleSwitch, } from "@itwin/itwinui-react";
|
|
8
|
-
import { SvgAdd, SvgDelete, SvgEdit, SvgList, SvgMore,
|
|
8
|
+
import { SvgAdd, SvgDelete, SvgEdit, SvgList, SvgMore, SvgVisibilityHide, SvgVisibilityShow, } from "@itwin/itwinui-icons-react";
|
|
9
9
|
import DeleteModal from "./DeleteModal";
|
|
10
10
|
import "./Grouping.scss";
|
|
11
11
|
import { PropertyMenu } from "./PropertyMenu";
|
|
@@ -24,11 +24,11 @@ var GroupsView;
|
|
|
24
24
|
GroupsView["PROPERTIES"] = "properties";
|
|
25
25
|
})(GroupsView || (GroupsView = {}));
|
|
26
26
|
const goldenAngle = 180 * (3 - Math.sqrt(5));
|
|
27
|
-
const fetchGroups = async (setGroups, iModelId, mappingId, setIsLoading, getAccessToken,
|
|
27
|
+
const fetchGroups = async (setGroups, iModelId, mappingId, setIsLoading, getAccessToken, mappingsClient) => {
|
|
28
28
|
try {
|
|
29
29
|
setIsLoading(true);
|
|
30
30
|
const accessToken = await getAccessToken();
|
|
31
|
-
const groups = await
|
|
31
|
+
const groups = await mappingsClient.getGroups(accessToken, iModelId, mappingId);
|
|
32
32
|
setGroups(groups);
|
|
33
33
|
return groups;
|
|
34
34
|
}
|
|
@@ -41,7 +41,7 @@ const fetchGroups = async (setGroups, iModelId, mappingId, setIsLoading, getAcce
|
|
|
41
41
|
return undefined;
|
|
42
42
|
};
|
|
43
43
|
export const Groupings = ({ mapping, goBack }) => {
|
|
44
|
-
var _a, _b
|
|
44
|
+
var _a, _b;
|
|
45
45
|
const iModelConnection = useActiveIModelConnection();
|
|
46
46
|
const { getAccessToken } = useGroupingMappingApiConfig();
|
|
47
47
|
const mappingClient = useMappingClient();
|
|
@@ -56,20 +56,19 @@ export const Groupings = ({ mapping, goBack }) => {
|
|
|
56
56
|
const [hiddenGroupsIds, setHiddenGroupsIds] = useState([]);
|
|
57
57
|
const [showGroupColor, setShowGroupColor] = useState(false);
|
|
58
58
|
useEffect(() => {
|
|
59
|
-
|
|
60
|
-
void fetchGroups(setGroups, iModelId, (_a = mapping.id) !== null && _a !== void 0 ? _a : "", setIsLoading, getAccessToken, mappingClient);
|
|
59
|
+
void fetchGroups(setGroups, iModelId, mapping.id, setIsLoading, getAccessToken, mappingClient);
|
|
61
60
|
}, [getAccessToken, mappingClient, iModelId, mapping.id, setIsLoading]);
|
|
62
61
|
const getGroupColor = function (index) {
|
|
63
62
|
return `hsl(${index * goldenAngle + 60}, 100%, 50%)`;
|
|
64
63
|
};
|
|
65
64
|
const getHiliteIdsFromGroups = useCallback(async (groups) => {
|
|
66
|
-
var _a
|
|
65
|
+
var _a;
|
|
67
66
|
let allIds = [];
|
|
68
67
|
for (const group of groups) {
|
|
69
|
-
const query =
|
|
68
|
+
const query = group.query;
|
|
70
69
|
let currentIds = [];
|
|
71
70
|
if (hilitedElements.current.has(query)) {
|
|
72
|
-
currentIds = (
|
|
71
|
+
currentIds = (_a = hilitedElements.current.get(query)) !== null && _a !== void 0 ? _a : [];
|
|
73
72
|
}
|
|
74
73
|
else {
|
|
75
74
|
try {
|
|
@@ -89,7 +88,6 @@ export const Groupings = ({ mapping, goBack }) => {
|
|
|
89
88
|
return allIds;
|
|
90
89
|
}, [iModelConnection, hilitedElements]);
|
|
91
90
|
const visualizeGroupColors = useCallback(async (viewGroups) => {
|
|
92
|
-
var _a;
|
|
93
91
|
setLoadingQuery(true);
|
|
94
92
|
clearEmphasizedOverriddenElements();
|
|
95
93
|
let allIds = [];
|
|
@@ -100,7 +98,7 @@ export const Groupings = ({ mapping, goBack }) => {
|
|
|
100
98
|
const hilitedIds = await getHiliteIdsFromGroups([group]);
|
|
101
99
|
overrideElements(hilitedIds, getGroupColor(index), FeatureOverrideType.ColorAndAlpha);
|
|
102
100
|
emphasizeElements(hilitedIds, undefined);
|
|
103
|
-
if (!hiddenGroupsIds.includes(
|
|
101
|
+
if (!hiddenGroupsIds.includes(group.id)) {
|
|
104
102
|
allIds = allIds.concat(hilitedIds);
|
|
105
103
|
}
|
|
106
104
|
}
|
|
@@ -108,12 +106,12 @@ export const Groupings = ({ mapping, goBack }) => {
|
|
|
108
106
|
setLoadingQuery(false);
|
|
109
107
|
}, [groups, hiddenGroupsIds, getHiliteIdsFromGroups]);
|
|
110
108
|
const hideGroups = useCallback(async (viewGroups) => {
|
|
111
|
-
var _a
|
|
109
|
+
var _a;
|
|
112
110
|
setLoadingQuery(true);
|
|
113
111
|
for (const viewGroup of viewGroups) {
|
|
114
|
-
const query =
|
|
112
|
+
const query = viewGroup.query;
|
|
115
113
|
if (hilitedElements.current.has(query)) {
|
|
116
|
-
const hilitedIds = (
|
|
114
|
+
const hilitedIds = (_a = hilitedElements.current.get(query)) !== null && _a !== void 0 ? _a : [];
|
|
117
115
|
hideElements(hilitedIds);
|
|
118
116
|
}
|
|
119
117
|
else {
|
|
@@ -151,7 +149,7 @@ export const Groupings = ({ mapping, goBack }) => {
|
|
|
151
149
|
const onModify = async (group) => {
|
|
152
150
|
setSelectedGroup(group);
|
|
153
151
|
setGroupsView(GroupsView.MODIFYING);
|
|
154
|
-
if (
|
|
152
|
+
if (group.id && hiddenGroupsIds.includes(group.id)) {
|
|
155
153
|
await showGroup(group);
|
|
156
154
|
setHiddenGroupsIds(hiddenGroupsIds.filter((id) => id !== group.id));
|
|
157
155
|
}
|
|
@@ -160,17 +158,16 @@ export const Groupings = ({ mapping, goBack }) => {
|
|
|
160
158
|
const openProperties = async (group) => {
|
|
161
159
|
setSelectedGroup(group);
|
|
162
160
|
setGroupsView(GroupsView.PROPERTIES);
|
|
163
|
-
if (
|
|
161
|
+
if (group.id && hiddenGroupsIds.includes(group.id)) {
|
|
164
162
|
await showGroup(group);
|
|
165
163
|
setHiddenGroupsIds(hiddenGroupsIds.filter((id) => id !== group.id));
|
|
166
164
|
}
|
|
167
165
|
};
|
|
168
166
|
const refresh = useCallback(async () => {
|
|
169
|
-
var _a;
|
|
170
167
|
setGroupsView(GroupsView.GROUPS);
|
|
171
168
|
setSelectedGroup(undefined);
|
|
172
169
|
setGroups([]);
|
|
173
|
-
const groups = await fetchGroups(setGroups, iModelId,
|
|
170
|
+
const groups = await fetchGroups(setGroups, iModelId, mapping.id, setIsLoading, getAccessToken, mappingClient);
|
|
174
171
|
if (groups) {
|
|
175
172
|
if (showGroupColor) {
|
|
176
173
|
await visualizeGroupColors(groups);
|
|
@@ -229,42 +226,44 @@ export const Groupings = ({ mapping, goBack }) => {
|
|
|
229
226
|
}, [refresh]);
|
|
230
227
|
switch (groupsView) {
|
|
231
228
|
case GroupsView.ADD:
|
|
232
|
-
return (React.createElement(GroupAction, { iModelId: iModelId, mappingId:
|
|
229
|
+
return (React.createElement(GroupAction, { iModelId: iModelId, mappingId: mapping.id, goBack: async () => {
|
|
233
230
|
setGroupsView(GroupsView.GROUPS);
|
|
234
231
|
await refresh();
|
|
235
232
|
}, resetView: resetView }));
|
|
236
233
|
case GroupsView.MODIFYING:
|
|
237
|
-
return selectedGroup ? (React.createElement(GroupAction, { iModelId: iModelId, mappingId:
|
|
234
|
+
return selectedGroup ? (React.createElement(GroupAction, { iModelId: iModelId, mappingId: mapping.id, group: selectedGroup, goBack: async () => {
|
|
238
235
|
setGroupsView(GroupsView.GROUPS);
|
|
239
236
|
await refresh();
|
|
240
237
|
}, resetView: resetView })) : null;
|
|
241
238
|
case GroupsView.PROPERTIES:
|
|
242
|
-
return selectedGroup ? (React.createElement(PropertyMenu, { iModelId: iModelId, mappingId:
|
|
239
|
+
return selectedGroup ? (React.createElement(PropertyMenu, { iModelId: iModelId, mappingId: mapping.id, group: selectedGroup, goBack: propertyMenuGoBack })) : null;
|
|
243
240
|
default:
|
|
244
241
|
return (React.createElement(React.Fragment, null,
|
|
245
|
-
React.createElement(WidgetHeader, { title:
|
|
242
|
+
React.createElement(WidgetHeader, { title: mapping.mappingName, disabled: isLoading || isLoadingQuery, returnFn: async () => {
|
|
246
243
|
clearEmphasizedOverriddenElements();
|
|
247
244
|
await goBack();
|
|
248
245
|
} }),
|
|
249
|
-
React.createElement(Surface, { className: "groups-container" },
|
|
250
|
-
React.createElement("div", { className: "toolbar" },
|
|
246
|
+
React.createElement(Surface, { className: "gmw-groups-container" },
|
|
247
|
+
React.createElement("div", { className: "gmw-toolbar" },
|
|
251
248
|
React.createElement(Button, { className: "add-load-button", startIcon: isLoadingQuery ? (React.createElement(ProgressRadial, { size: "small", indeterminate: true })) : (React.createElement(SvgAdd, null)), styleType: "high-visibility", disabled: isLoadingQuery, onClick: addGroup }, isLoadingQuery ? "Loading" : "Add Group"),
|
|
252
|
-
React.createElement(ButtonGroup, { className: "toolbar-buttons" },
|
|
253
|
-
React.createElement(ToggleSwitch, { label: "Color by Group", labelPosition: "left", className: "
|
|
254
|
-
React.createElement(IconButton, { title: "Show All", onClick: showAll, disabled: isLoadingQuery, styleType: "borderless", className: "group-view-icon" },
|
|
249
|
+
React.createElement(ButtonGroup, { className: "gmw-toolbar-buttons" },
|
|
250
|
+
React.createElement(ToggleSwitch, { label: "Color by Group", labelPosition: "left", className: "gmw-toggle", disabled: isLoadingQuery, checked: showGroupColor, onChange: toggleGroupColor }),
|
|
251
|
+
React.createElement(IconButton, { title: "Show All", onClick: showAll, disabled: isLoadingQuery, styleType: "borderless", className: "gmw-group-view-icon" },
|
|
255
252
|
React.createElement(SvgVisibilityShow, null)),
|
|
256
|
-
React.createElement(IconButton, { title: "Hide All", onClick: hideAll, disabled: isLoadingQuery, styleType: "borderless", className: "group-view-icon" },
|
|
253
|
+
React.createElement(IconButton, { title: "Hide All", onClick: hideAll, disabled: isLoadingQuery, styleType: "borderless", className: "gmw-group-view-icon" },
|
|
257
254
|
React.createElement(SvgVisibilityHide, null)))),
|
|
258
|
-
isLoading ? (React.createElement(LoadingOverlay, null)) : groups.length === 0 ? (React.createElement(EmptyMessage, { message: "No Groups available." })) : (React.createElement("div", { className: "group-list" }, groups
|
|
259
|
-
.sort((a, b) => { var _a
|
|
260
|
-
.map((g) => (React.createElement(HorizontalTile, { key: g.id, title: g.groupName ? g.groupName : "Untitled", subText: g.description, actionGroup: React.createElement("div", { className: "actions" },
|
|
261
|
-
showGroupColor && (React.createElement(IconButton, { styleType: "borderless", className: "group-view-icon" },
|
|
262
|
-
React.createElement(
|
|
263
|
-
|
|
255
|
+
isLoading ? (React.createElement(LoadingOverlay, null)) : groups.length === 0 ? (React.createElement(EmptyMessage, { message: "No Groups available." })) : (React.createElement("div", { className: "gmw-group-list" }, groups
|
|
256
|
+
.sort((a, b) => { var _a; return (_a = a.groupName.localeCompare(b.groupName)) !== null && _a !== void 0 ? _a : 1; })
|
|
257
|
+
.map((g) => (React.createElement(HorizontalTile, { key: g.id, title: g.groupName ? g.groupName : "Untitled", subText: g.description, actionGroup: React.createElement("div", { className: "gmw-actions" },
|
|
258
|
+
showGroupColor && (React.createElement(IconButton, { styleType: "borderless", className: "gmw-group-view-icon" },
|
|
259
|
+
React.createElement("div", { className: "gmw-color-legend", style: {
|
|
260
|
+
backgroundColor: getGroupColor(groups.findIndex((group) => g.id === group.id)),
|
|
261
|
+
} }))),
|
|
262
|
+
g.id && hiddenGroupsIds.includes(g.id) ? (React.createElement(IconButton, { disabled: isLoadingQuery, styleType: "borderless", className: "gmw-group-view-icon", onClick: async () => {
|
|
264
263
|
await showGroup(g);
|
|
265
264
|
setHiddenGroupsIds(hiddenGroupsIds.filter((id) => g.id !== id));
|
|
266
265
|
} },
|
|
267
|
-
React.createElement(SvgVisibilityHide, null))) : (React.createElement(IconButton, { disabled: isLoadingQuery, styleType: "borderless", className: "group-view-icon", onClick: async () => {
|
|
266
|
+
React.createElement(SvgVisibilityHide, null))) : (React.createElement(IconButton, { disabled: isLoadingQuery, styleType: "borderless", className: "gmw-group-view-icon", onClick: async () => {
|
|
268
267
|
await hideGroups([g]);
|
|
269
268
|
setHiddenGroupsIds(hiddenGroupsIds.concat(g.id ? [g.id] : []));
|
|
270
269
|
} },
|
|
@@ -283,10 +282,10 @@ export const Groupings = ({ mapping, goBack }) => {
|
|
|
283
282
|
width: "16px",
|
|
284
283
|
height: "16px",
|
|
285
284
|
} })))), onClickTitle: isLoadingQuery ? undefined : async () => openProperties(g) })))))),
|
|
286
|
-
React.createElement(DeleteModal, { entityName: (
|
|
287
|
-
var _a
|
|
285
|
+
React.createElement(DeleteModal, { entityName: (_b = selectedGroup === null || selectedGroup === void 0 ? void 0 : selectedGroup.groupName) !== null && _b !== void 0 ? _b : "", show: showDeleteModal, setShow: setShowDeleteModal, onDelete: async () => {
|
|
286
|
+
var _a;
|
|
288
287
|
const accessToken = await getAccessToken();
|
|
289
|
-
await mappingClient.deleteGroup(accessToken, iModelId,
|
|
288
|
+
await mappingClient.deleteGroup(accessToken, iModelId, mapping.id, (_a = selectedGroup === null || selectedGroup === void 0 ? void 0 : selectedGroup.id) !== null && _a !== void 0 ? _a : "");
|
|
290
289
|
}, refresh: refresh })));
|
|
291
290
|
}
|
|
292
291
|
};
|