@itwin/grouping-mapping-widget 0.3.3 → 0.4.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.
Files changed (149) hide show
  1. package/lib/cjs/formula/FormulaTokensValidator.d.ts +1 -1
  2. package/lib/cjs/formula/FormulaTokensValidator.js +3 -1
  3. package/lib/cjs/formula/FormulaTokensValidator.js.map +1 -1
  4. package/lib/cjs/formula/FormulaValidator.d.ts +1 -1
  5. package/lib/cjs/formula/FormulaValidator.js +2 -2
  6. package/lib/cjs/formula/FormulaValidator.js.map +1 -1
  7. package/lib/cjs/grouping-mapping-widget.d.ts +4 -0
  8. package/lib/cjs/grouping-mapping-widget.js +6 -1
  9. package/lib/cjs/grouping-mapping-widget.js.map +1 -1
  10. package/lib/cjs/widget/GroupingMappingWidget.d.ts +3 -1
  11. package/lib/cjs/widget/GroupingMappingWidget.js +3 -2
  12. package/lib/cjs/widget/GroupingMappingWidget.js.map +1 -1
  13. package/lib/cjs/widget/IMappingClient.d.ts +327 -0
  14. package/lib/cjs/widget/IMappingClient.js +7 -0
  15. package/lib/cjs/widget/IMappingClient.js.map +1 -0
  16. package/lib/cjs/widget/components/BlockingOverlay.d.ts +7 -0
  17. package/lib/cjs/widget/components/BlockingOverlay.js +21 -0
  18. package/lib/cjs/widget/components/BlockingOverlay.js.map +1 -0
  19. package/lib/cjs/widget/components/BlockingOverlay.scss +26 -0
  20. package/lib/cjs/widget/components/CalculatedPropertyAction.js +3 -4
  21. package/lib/cjs/widget/components/CalculatedPropertyAction.js.map +1 -1
  22. package/lib/cjs/widget/components/CalculatedPropertyTable.js +2 -3
  23. package/lib/cjs/widget/components/CalculatedPropertyTable.js.map +1 -1
  24. package/lib/cjs/widget/components/ConfirmMappingsImport.js +2 -3
  25. package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +1 -1
  26. package/lib/cjs/widget/components/CustomCalculationAction.js +4 -5
  27. package/lib/cjs/widget/components/CustomCalculationAction.js.map +1 -1
  28. package/lib/cjs/widget/components/CustomCalculationTable.js +2 -3
  29. package/lib/cjs/widget/components/CustomCalculationTable.js.map +1 -1
  30. package/lib/cjs/widget/components/GroupAction.d.ts +2 -1
  31. package/lib/cjs/widget/components/GroupAction.js +15 -10
  32. package/lib/cjs/widget/components/GroupAction.js.map +1 -1
  33. package/lib/cjs/widget/components/GroupPropertyAction.js +5 -7
  34. package/lib/cjs/widget/components/GroupPropertyAction.js.map +1 -1
  35. package/lib/cjs/widget/components/GroupPropertyTable.js +2 -3
  36. package/lib/cjs/widget/components/GroupPropertyTable.js.map +1 -1
  37. package/lib/cjs/widget/components/GroupQueryBuilderContainer.js +1 -0
  38. package/lib/cjs/widget/components/GroupQueryBuilderContainer.js.map +1 -1
  39. package/lib/cjs/widget/components/GroupQueryBuilderContext.d.ts +1 -0
  40. package/lib/cjs/widget/components/GroupQueryBuilderContext.js +1 -0
  41. package/lib/cjs/widget/components/GroupQueryBuilderContext.js.map +1 -1
  42. package/lib/cjs/widget/components/GroupTile.d.ts +13 -0
  43. package/lib/cjs/widget/components/GroupTile.js +18 -0
  44. package/lib/cjs/widget/components/GroupTile.js.map +1 -0
  45. package/lib/cjs/widget/components/GroupTile.scss +32 -0
  46. package/lib/cjs/widget/components/Grouping.js +224 -164
  47. package/lib/cjs/widget/components/Grouping.js.map +1 -1
  48. package/lib/cjs/widget/components/Grouping.scss +39 -4
  49. package/lib/cjs/widget/components/GroupingMapping.d.ts +15 -3
  50. package/lib/cjs/widget/components/GroupingMapping.js +29 -5
  51. package/lib/cjs/widget/components/GroupingMapping.js.map +1 -1
  52. package/lib/cjs/widget/components/Mapping.js +33 -12
  53. package/lib/cjs/widget/components/Mapping.js.map +1 -1
  54. package/lib/cjs/widget/components/MappingAction.js +10 -5
  55. package/lib/cjs/widget/components/MappingAction.js.map +1 -1
  56. package/lib/cjs/widget/components/PropertyMenu.js +26 -19
  57. package/lib/cjs/widget/components/PropertyMenu.js.map +1 -1
  58. package/lib/cjs/widget/components/QueryBuilder.d.ts +11 -5
  59. package/lib/cjs/widget/components/QueryBuilder.js +229 -141
  60. package/lib/cjs/widget/components/QueryBuilder.js.map +1 -1
  61. package/lib/cjs/widget/components/SelectMappings.js +5 -6
  62. package/lib/cjs/widget/components/SelectMappings.js.map +1 -1
  63. package/lib/cjs/widget/components/property-grid/PropertyView.js +5 -0
  64. package/lib/cjs/widget/components/property-grid/PropertyView.js.map +1 -1
  65. package/lib/cjs/widget/components/utils.d.ts +6 -0
  66. package/lib/cjs/widget/components/utils.js +9 -1
  67. package/lib/cjs/widget/components/utils.js.map +1 -1
  68. package/lib/cjs/widget/components/utils.scss +12 -3
  69. package/lib/cjs/widget/components/viewerUtils.d.ts +19 -0
  70. package/lib/cjs/widget/components/viewerUtils.js +224 -3
  71. package/lib/cjs/widget/components/viewerUtils.js.map +1 -1
  72. package/lib/cjs/widget/hooks/useFormulaValidation.d.ts +1 -1
  73. package/lib/cjs/widget/hooks/useFormulaValidation.js +5 -5
  74. package/lib/cjs/widget/hooks/useFormulaValidation.js.map +1 -1
  75. package/lib/esm/formula/FormulaTokensValidator.d.ts +1 -1
  76. package/lib/esm/formula/FormulaTokensValidator.js +3 -1
  77. package/lib/esm/formula/FormulaTokensValidator.js.map +1 -1
  78. package/lib/esm/formula/FormulaValidator.d.ts +1 -1
  79. package/lib/esm/formula/FormulaValidator.js +2 -2
  80. package/lib/esm/formula/FormulaValidator.js.map +1 -1
  81. package/lib/esm/grouping-mapping-widget.d.ts +4 -0
  82. package/lib/esm/grouping-mapping-widget.js +4 -0
  83. package/lib/esm/grouping-mapping-widget.js.map +1 -1
  84. package/lib/esm/widget/GroupingMappingWidget.d.ts +3 -1
  85. package/lib/esm/widget/GroupingMappingWidget.js +3 -2
  86. package/lib/esm/widget/GroupingMappingWidget.js.map +1 -1
  87. package/lib/esm/widget/IMappingClient.d.ts +327 -0
  88. package/lib/esm/widget/IMappingClient.js +6 -0
  89. package/lib/esm/widget/IMappingClient.js.map +1 -0
  90. package/lib/esm/widget/components/BlockingOverlay.d.ts +7 -0
  91. package/lib/esm/widget/components/BlockingOverlay.js +14 -0
  92. package/lib/esm/widget/components/BlockingOverlay.js.map +1 -0
  93. package/lib/esm/widget/components/BlockingOverlay.scss +26 -0
  94. package/lib/esm/widget/components/CalculatedPropertyAction.js +4 -5
  95. package/lib/esm/widget/components/CalculatedPropertyAction.js.map +1 -1
  96. package/lib/esm/widget/components/CalculatedPropertyTable.js +3 -4
  97. package/lib/esm/widget/components/CalculatedPropertyTable.js.map +1 -1
  98. package/lib/esm/widget/components/ConfirmMappingsImport.js +3 -4
  99. package/lib/esm/widget/components/ConfirmMappingsImport.js.map +1 -1
  100. package/lib/esm/widget/components/CustomCalculationAction.js +5 -6
  101. package/lib/esm/widget/components/CustomCalculationAction.js.map +1 -1
  102. package/lib/esm/widget/components/CustomCalculationTable.js +3 -4
  103. package/lib/esm/widget/components/CustomCalculationTable.js.map +1 -1
  104. package/lib/esm/widget/components/GroupAction.d.ts +2 -1
  105. package/lib/esm/widget/components/GroupAction.js +17 -12
  106. package/lib/esm/widget/components/GroupAction.js.map +1 -1
  107. package/lib/esm/widget/components/GroupPropertyAction.js +6 -8
  108. package/lib/esm/widget/components/GroupPropertyAction.js.map +1 -1
  109. package/lib/esm/widget/components/GroupPropertyTable.js +3 -4
  110. package/lib/esm/widget/components/GroupPropertyTable.js.map +1 -1
  111. package/lib/esm/widget/components/GroupQueryBuilderContainer.js +1 -0
  112. package/lib/esm/widget/components/GroupQueryBuilderContainer.js.map +1 -1
  113. package/lib/esm/widget/components/GroupQueryBuilderContext.d.ts +1 -0
  114. package/lib/esm/widget/components/GroupQueryBuilderContext.js +1 -0
  115. package/lib/esm/widget/components/GroupQueryBuilderContext.js.map +1 -1
  116. package/lib/esm/widget/components/GroupTile.d.ts +13 -0
  117. package/lib/esm/widget/components/GroupTile.js +11 -0
  118. package/lib/esm/widget/components/GroupTile.js.map +1 -0
  119. package/lib/esm/widget/components/GroupTile.scss +32 -0
  120. package/lib/esm/widget/components/Grouping.js +230 -170
  121. package/lib/esm/widget/components/Grouping.js.map +1 -1
  122. package/lib/esm/widget/components/Grouping.scss +39 -4
  123. package/lib/esm/widget/components/GroupingMapping.d.ts +15 -3
  124. package/lib/esm/widget/components/GroupingMapping.js +27 -4
  125. package/lib/esm/widget/components/GroupingMapping.js.map +1 -1
  126. package/lib/esm/widget/components/Mapping.js +35 -14
  127. package/lib/esm/widget/components/Mapping.js.map +1 -1
  128. package/lib/esm/widget/components/MappingAction.js +12 -7
  129. package/lib/esm/widget/components/MappingAction.js.map +1 -1
  130. package/lib/esm/widget/components/PropertyMenu.js +28 -21
  131. package/lib/esm/widget/components/PropertyMenu.js.map +1 -1
  132. package/lib/esm/widget/components/QueryBuilder.d.ts +11 -5
  133. package/lib/esm/widget/components/QueryBuilder.js +230 -142
  134. package/lib/esm/widget/components/QueryBuilder.js.map +1 -1
  135. package/lib/esm/widget/components/SelectMappings.js +6 -7
  136. package/lib/esm/widget/components/SelectMappings.js.map +1 -1
  137. package/lib/esm/widget/components/property-grid/PropertyView.js +5 -0
  138. package/lib/esm/widget/components/property-grid/PropertyView.js.map +1 -1
  139. package/lib/esm/widget/components/utils.d.ts +6 -0
  140. package/lib/esm/widget/components/utils.js +6 -0
  141. package/lib/esm/widget/components/utils.js.map +1 -1
  142. package/lib/esm/widget/components/utils.scss +12 -3
  143. package/lib/esm/widget/components/viewerUtils.d.ts +19 -0
  144. package/lib/esm/widget/components/viewerUtils.js +207 -3
  145. package/lib/esm/widget/components/viewerUtils.js.map +1 -1
  146. package/lib/esm/widget/hooks/useFormulaValidation.d.ts +1 -1
  147. package/lib/esm/widget/hooks/useFormulaValidation.js +5 -5
  148. package/lib/esm/widget/hooks/useFormulaValidation.js.map +1 -1
  149. package/package.json +30 -30
@@ -1 +1 @@
1
- {"version":3,"file":"GroupPropertyAction.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupPropertyAction.tsx"],"names":[],"mappings":"AAeA,OAAO,EACL,yBA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,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,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 {\n SelectOption,\n} 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, useContext, useEffect, useMemo, useState } from \"react\";\n\nimport ActionPanel from \"./ActionPanel\";\nimport useValidator, { NAME_REQUIREMENTS } from \"../hooks/useValidator\";\nimport { handleError, WidgetHeader } from \"./utils\";\nimport \"./GroupPropertyAction.scss\";\nimport type { ECProperty, GroupPropertyCreate } from \"@itwin/insights-client\";\nimport { ReportingClient } from \"@itwin/insights-client\";\nimport { ApiContext } from \"./GroupingMapping\";\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 apiContext = useContext(ApiContext);\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<\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 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 const reportingClientApi = new ReportingClient(apiContext.prefix);\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 apiContext.accessToken,\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 }, [apiContext.accessToken, apiContext.prefix, 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: GroupPropertyCreate = {\n propertyName,\n dataType,\n quantityType,\n ecProperties: filteredEcProperties,\n };\n const reportingClientApi = new ReportingClient(apiContext.prefix);\n groupPropertyId\n ? await reportingClientApi.updateGroupProperty(\n apiContext.accessToken,\n iModelId,\n mappingId,\n groupId,\n groupPropertyId,\n groupProperty\n )\n : await reportingClientApi.createGroupProperty(\n apiContext.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 <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={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,4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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 {\n SelectOption,\n} 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, useContext, useEffect, useMemo, useState } from \"react\";\n\nimport ActionPanel from \"./ActionPanel\";\nimport useValidator, { NAME_REQUIREMENTS } from \"../hooks/useValidator\";\nimport { handleError, WidgetHeader } from \"./utils\";\nimport \"./GroupPropertyAction.scss\";\nimport type { ECProperty, GroupPropertyCreate } from \"@itwin/insights-client\";\nimport { ApiContext, MappingClientContext } from \"./GroupingMapping\";\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 apiContext = useContext(ApiContext);\n const mappingClient = useContext(MappingClientContext);\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 // TODO Error handling\n const response = await mappingClient.getGroupProperty(\n apiContext.accessToken,\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 }, [apiContext.accessToken, 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 groupProperty: GroupPropertyCreate = {\n propertyName,\n dataType,\n quantityType,\n ecProperties: filteredEcProperties,\n };\n groupPropertyId\n ? await mappingClient.updateGroupProperty(\n apiContext.accessToken,\n iModelId,\n mappingId,\n groupId,\n groupPropertyId,\n groupProperty\n )\n : await mappingClient.createGroupProperty(\n apiContext.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 <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={async () => returnFn(false)} isLoading={isLoading} />\n </>\n );\n};\n\nexport default GroupPropertyAction;\n"]}
@@ -7,11 +7,11 @@ import { Button, DropdownMenu, IconButton, MenuItem, Table, } from "@itwin/itwin
7
7
  import React, { useContext, useMemo, useState } from "react";
8
8
  import DeleteModal from "./DeleteModal";
9
9
  import { PropertyMenuView } from "./PropertyMenu";
10
- import { ReportingClient } from "@itwin/insights-client";
11
- import { ApiContext } from "./GroupingMapping";
10
+ import { ApiContext, MappingClientContext } from "./GroupingMapping";
12
11
  const GroupPropertyTable = ({ iModelId, mappingId, groupId, selectedGroupProperty, onGroupPropertyModify, setSelectedGroupProperty, isLoadingGroupProperties, groupProperties, refreshGroupProperties, setGroupModifyView, }) => {
13
12
  var _a;
14
13
  const apiContext = useContext(ApiContext);
14
+ const mappingClient = useContext(MappingClientContext);
15
15
  const [showGroupPropertyDeleteModal, setShowGroupPropertyDeleteModal] = useState(false);
16
16
  const groupPropertiesColumns = useMemo(() => [
17
17
  {
@@ -53,8 +53,7 @@ const GroupPropertyTable = ({ iModelId, mappingId, groupId, selectedGroupPropert
53
53
  React.createElement(Table, { data: groupProperties, density: 'extra-condensed', columns: groupPropertiesColumns, emptyTableContent: 'No Group Properties', isSortable: true, isLoading: isLoadingGroupProperties }),
54
54
  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 () => {
55
55
  var _a;
56
- const reportingClientApi = new ReportingClient(apiContext.prefix);
57
- await reportingClientApi.deleteGroupProperty(apiContext.accessToken, iModelId, mappingId, groupId, (_a = selectedGroupProperty === null || selectedGroupProperty === void 0 ? void 0 : selectedGroupProperty.id) !== null && _a !== void 0 ? _a : "");
56
+ await mappingClient.deleteGroupProperty(apiContext.accessToken, iModelId, mappingId, groupId, (_a = selectedGroupProperty === null || selectedGroupProperty === void 0 ? void 0 : selectedGroupProperty.id) !== null && _a !== void 0 ? _a : "");
58
57
  }, refresh: refreshGroupProperties })));
59
58
  };
60
59
  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,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG7D,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAqB/C,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,UAAU,GAAG,UAAU,CAAC,UAAU,C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E,MAAM;qCACf,GACD,CACS,CACA,CAChB,CAAC;oBACJ,CAAC;iBACF;aACF;SACF;KACF,EACD,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,CAClD,CAAC;IAEF,OAAO,CACL;QACE,oBAAC,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,kBAAkB,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBAClE,MAAM,kBAAkB,CAAC,mBAAmB,CAC1C,UAAU,CAAC,WAAW,EACtB,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, { useContext, 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 { ReportingClient } from \"@itwin/insights-client\";\nimport { ApiContext } from \"./GroupingMapping\";\n\nexport type GroupPropertyType = CreateTypeFromInterface<GroupProperty>;\n\ninterface GroupPropertyTableProps {\n iModelId: string;\n mappingId: string;\n groupId: string;\n setSelectedGroupProperty: React.Dispatch<\n React.SetStateAction<\n CreateTypeFromInterface<GroupPropertyType> | undefined\n >\n >;\n setGroupModifyView: React.Dispatch<React.SetStateAction<PropertyMenuView>>;\n onGroupPropertyModify: (value: CellProps<GroupPropertyType>) => void;\n isLoadingGroupProperties: boolean;\n groupProperties: GroupPropertyType[];\n refreshGroupProperties: () => Promise<void>;\n selectedGroupProperty?: GroupPropertyType;\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 apiContext = useContext(ApiContext);\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<GroupPropertyType>) => (\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<GroupPropertyType>) => {\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<GroupPropertyType>\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 reportingClientApi = new ReportingClient(apiContext.prefix);\n await reportingClientApi.deleteGroupProperty(\n apiContext.accessToken,\n iModelId,\n mappingId,\n groupId,\n selectedGroupProperty?.id ?? \"\",\n );\n }}\n refresh={refreshGroupProperties}\n />\n </>\n );\n};\n\nexport default GroupPropertyTable;\n"]}
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,CA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nB,MAAM,aAAa,CAAC,mBAAmB,CACrC,UAAU,CAAC,WAAW,EACtB,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, { useContext, 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 { ApiContext, MappingClientContext } from \"./GroupingMapping\";\n\nexport type GroupPropertyType = CreateTypeFromInterface<GroupProperty>;\n\ninterface GroupPropertyTableProps {\n iModelId: string;\n mappingId: string;\n groupId: string;\n setSelectedGroupProperty: React.Dispatch<React.SetStateAction<CreateTypeFromInterface<GroupPropertyType> | undefined>>;\n setGroupModifyView: React.Dispatch<React.SetStateAction<PropertyMenuView>>;\n onGroupPropertyModify: (value: CellProps<GroupPropertyType>) => void;\n isLoadingGroupProperties: boolean;\n groupProperties: GroupPropertyType[];\n refreshGroupProperties: () => Promise<void>;\n selectedGroupProperty?: GroupPropertyType;\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 apiContext = useContext(ApiContext);\n const mappingClient = useContext(MappingClientContext);\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<GroupPropertyType>) => (\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<GroupPropertyType>) => {\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<GroupPropertyType>\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 await mappingClient.deleteGroupProperty(\n apiContext.accessToken,\n iModelId,\n mappingId,\n groupId,\n selectedGroupProperty?.id ?? \"\",\n );\n }}\n refresh={refreshGroupProperties}\n />\n </>\n );\n};\n\nexport default GroupPropertyTable;\n"]}
@@ -34,6 +34,7 @@ export const GroupQueryBuilderContainer = () => {
34
34
  context.setQuery("");
35
35
  context.queryBuilder.query = undefined;
36
36
  context.setCurrentPropertyList([]);
37
+ await context.resetView();
37
38
  };
38
39
  return (React.createElement("div", { className: 'find-similar-container' },
39
40
  React.createElement(PropertyGridWrapperApp, { keys: keysState, imodel: iModelConnection }),
@@ -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,4BAA4B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,0BAA0B,GAA4B,GAAG,EAAE;IACtE,MAAM,gBAAgB,GAAG,yBAAyB,EAAE,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;IAE3D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,IAAI,MAAM,EAAE,CAAC,CAAC;IACvE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAA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/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport 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 \"./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 = async () => {\n context.setQuery(\"\");\n context.queryBuilder.query = undefined;\n context.setCurrentPropertyList([]);\n };\n\n return (\n <div className='find-similar-container'>\n <PropertyGridWrapperApp keys={keysState} imodel={iModelConnection} />\n {selected && (\n <div className='button-container'>\n <Button\n styleType='default'\n size='small'\n className='reset-button'\n onClick={_onClickResetButton}\n >\n Reset\n </Button>\n </div>\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"GroupQueryBuilderCont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AAI,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,KAAK,IAAI,EAAE;QACrC,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,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC,CAAC;IAEF,OAAO,CACL,6BAAK,SAAS,EAAC,wBAAwB;QACrC,oBAAC,sBAAsB,IAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,GAAI;QACpE,QAAQ,IAAI,CACX,6BAAK,SAAS,EAAC,kBAAkB;YAC/B,oBAAC,MAAM,IACL,SAAS,EAAC,SAAS,EACnB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,cAAc,EACxB,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 \"./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 = async () => {\n context.setQuery(\"\");\n context.queryBuilder.query = undefined;\n context.setCurrentPropertyList([]);\n await context.resetView();\n };\n\n return (\n <div className='find-similar-container'>\n <PropertyGridWrapperApp keys={keysState} imodel={iModelConnection} />\n {selected && (\n <div className='button-container'>\n <Button\n styleType='default'\n size='small'\n className='reset-button'\n onClick={_onClickResetButton}\n >\n Reset\n </Button>\n </div>\n )}\n </div>\n );\n};\n"]}
@@ -10,6 +10,7 @@ export interface PropertySelection {
10
10
  setQueryBuilder: React.Dispatch<React.SetStateAction<QueryBuilder>>;
11
11
  isLoading: boolean;
12
12
  isRendering: boolean;
13
+ resetView: () => Promise<void>;
13
14
  }
14
15
  export declare const GroupQueryBuilderContext: React.Context<PropertySelection>;
15
16
  //# sourceMappingURL=GroupQueryBuilderContext.d.ts.map
@@ -13,5 +13,6 @@ export const GroupQueryBuilderContext = React.createContext({
13
13
  setQueryBuilder: () => new QueryBuilder(undefined),
14
14
  isLoading: false,
15
15
  isRendering: false,
16
+ resetView: async () => { },
16
17
  });
17
18
  //# sourceMappingURL=GroupQueryBuilderContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupQueryBuilderContext.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupQueryBuilderContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAc9C,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC,aAAa,CAAoB;IAC7E,mBAAmB,EAAE,EAAE;IACvB,sBAAsB,EAAE,GAAG,EAAE,CAAC,EAAE;IAChC,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE;IAClB,YAAY,EAAE,IAAI,YAAY,CAAC,SAAS,CAAC;IACzC,eAAe,EAAE,GAAG,EAAE,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC;IAClD,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,KAAK;CACnB,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 * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { QueryBuilder } from \"./QueryBuilder\";\n\nexport interface PropertySelection {\n currentPropertyList: PropertyRecord[];\n setCurrentPropertyList: React.Dispatch<\n React.SetStateAction<PropertyRecord[]>\n >;\n query: string;\n setQuery: React.Dispatch<React.SetStateAction<string>>;\n queryBuilder: QueryBuilder;\n setQueryBuilder: React.Dispatch<React.SetStateAction<QueryBuilder>>;\n isLoading: boolean;\n isRendering: boolean;\n}\nexport const GroupQueryBuilderContext = React.createContext<PropertySelection>({\n currentPropertyList: [],\n setCurrentPropertyList: () => [],\n query: \"\",\n setQuery: () => \"\",\n queryBuilder: new QueryBuilder(undefined),\n setQueryBuilder: () => new QueryBuilder(undefined),\n isLoading: false,\n isRendering: false,\n});\n"]}
1
+ {"version":3,"file":"GroupQueryBuilderContext.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupQueryBuilderContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAe9C,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC,aAAa,CAAoB;IAC7E,mBAAmB,EAAE,EAAE;IACvB,sBAAsB,EAAE,GAAG,EAAE,CAAC,EAAE;IAChC,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE;IAClB,YAAY,EAAE,IAAI,YAAY,CAAC,SAAS,CAAC;IACzC,eAAe,EAAE,GAAG,EAAE,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC;IAClD,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC;CAC1B,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 * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { QueryBuilder } from \"./QueryBuilder\";\n\nexport interface PropertySelection {\n currentPropertyList: PropertyRecord[];\n setCurrentPropertyList: React.Dispatch<\n React.SetStateAction<PropertyRecord[]>\n >;\n query: string;\n setQuery: React.Dispatch<React.SetStateAction<string>>;\n queryBuilder: QueryBuilder;\n setQueryBuilder: React.Dispatch<React.SetStateAction<QueryBuilder>>;\n isLoading: boolean;\n isRendering: boolean;\n resetView: () => Promise<void>;\n}\nexport const GroupQueryBuilderContext = React.createContext<PropertySelection>({\n currentPropertyList: [],\n setCurrentPropertyList: () => [],\n query: \"\",\n setQuery: () => \"\",\n queryBuilder: new QueryBuilder(undefined),\n setQueryBuilder: () => new QueryBuilder(undefined),\n isLoading: false,\n isRendering: false,\n resetView: async () => {},\n});\n"]}
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ import "./GroupTile.scss";
3
+ interface GroupTileProps {
4
+ title: string;
5
+ actionGroup: ReactNode;
6
+ subText?: string;
7
+ onClickTitle?: () => void;
8
+ titleTooltip?: string;
9
+ subtextToolTip?: string;
10
+ }
11
+ export declare const GroupTile: ({ title, subText, onClickTitle, titleTooltip, subtextToolTip, actionGroup }: GroupTileProps) => JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=GroupTile.d.ts.map
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { Text } from "@itwin/itwinui-react";
3
+ import "./GroupTile.scss";
4
+ export const GroupTile = ({ title, subText, onClickTitle, titleTooltip, subtextToolTip, actionGroup }) => {
5
+ return (React.createElement("div", { className: "gmw-group-tile-container", "data-testid": "group-tile" },
6
+ React.createElement("div", { className: "body" },
7
+ React.createElement(Text, { className: `body-text ${onClickTitle ? "iui-anchor" : ""}`, onClick: onClickTitle, variant: "body", title: titleTooltip }, title),
8
+ subText && React.createElement(Text, { className: "body-text", isMuted: true, title: subtextToolTip, variant: "small" }, subText)),
9
+ React.createElement("div", { className: "action-button", "data-testid": "tile-action-button" }, actionGroup)));
10
+ };
11
+ //# sourceMappingURL=GroupTile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupTile.js","sourceRoot":"","sources":["../../../../src/widget/components/GroupTile.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,kBAAkB,CAAC;AAW1B,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAkB,EAAE,EAAE;IAEvH,OAAO,CACL,6BAAK,SAAS,EAAC,0BAA0B,iBAAa,YAAY;QAChE,6BAAK,SAAS,EAAC,MAAM;YACnB,oBAAC,IAAI,IAAC,SAAS,EAAE,aAAa,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAC,MAAM,EAAC,KAAK,EAAE,YAAY,IAAG,KAAK,CAAQ;YAC1I,OAAO,IAAI,oBAAC,IAAI,IAAC,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAC,OAAO,IAAE,OAAO,CAAQ,CAC1G;QACN,6BAAK,SAAS,EAAC,eAAe,iBAAa,oBAAoB,IAC5D,WAAW,CACR,CACF,CACP,CAAC;AAEJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { ReactNode } from \"react\";\nimport React from \"react\";\nimport { Text } from \"@itwin/itwinui-react\";\nimport \"./GroupTile.scss\";\n\ninterface GroupTileProps {\n title: string;\n actionGroup: ReactNode;\n subText?: string;\n onClickTitle?: () => void;\n titleTooltip?: string;\n subtextToolTip?: string;\n}\n\nexport const GroupTile = ({ title, subText, onClickTitle, titleTooltip, subtextToolTip, actionGroup }: GroupTileProps) => {\n\n return (\n <div className=\"gmw-group-tile-container\" data-testid=\"group-tile\">\n <div className=\"body\">\n <Text className={`body-text ${onClickTitle ? \"iui-anchor\" : \"\"}`} onClick={onClickTitle} variant=\"body\" title={titleTooltip}>{title}</Text>\n {subText && <Text className=\"body-text\" isMuted={true} title={subtextToolTip} variant=\"small\">{subText}</Text>}\n </div>\n <div className=\"action-button\" data-testid=\"tile-action-button\">\n {actionGroup}\n </div>\n </div>\n );\n\n};\n"]}
@@ -0,0 +1,32 @@
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
+ .gmw-group-tile-container {
8
+ display: flex;
9
+ justify-content: space-between;
10
+ border-radius: 5px;
11
+ background-color: var(--iui-color-background-2);
12
+ height: $iui-baseline * 4;
13
+ padding: 5.5px 8px;
14
+ .body {
15
+ display: flex;
16
+ flex-direction: column;
17
+ min-width: 0;
18
+ justify-content: center;
19
+ &-text {
20
+ overflow: hidden;
21
+ white-space: nowrap;
22
+ text-overflow: ellipsis;
23
+ }
24
+ }
25
+ .action-button {
26
+ margin-left: 0;
27
+ align-self: center;
28
+ min-width: 36px;
29
+ margin-right: $iui-xs;
30
+ flex-shrink: 0;
31
+ }
32
+ }