@itwin/grouping-mapping-widget 0.5.8 → 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.
Files changed (93) hide show
  1. package/lib/cjs/grouping-mapping-widget.d.ts +0 -1
  2. package/lib/cjs/grouping-mapping-widget.js +0 -1
  3. package/lib/cjs/grouping-mapping-widget.js.map +1 -1
  4. package/lib/cjs/widget/components/CalculatedPropertyAction.d.ts +2 -2
  5. package/lib/cjs/widget/components/CalculatedPropertyAction.js +13 -13
  6. package/lib/cjs/widget/components/CalculatedPropertyAction.js.map +1 -1
  7. package/lib/cjs/widget/components/CalculatedPropertyTable.d.ts +5 -5
  8. package/lib/cjs/widget/components/CalculatedPropertyTable.js.map +1 -1
  9. package/lib/cjs/widget/components/ConfirmMappingsImport.d.ts +3 -3
  10. package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +1 -1
  11. package/lib/cjs/widget/components/CustomCalculationAction.d.ts +2 -2
  12. package/lib/cjs/widget/components/CustomCalculationAction.js +5 -5
  13. package/lib/cjs/widget/components/CustomCalculationAction.js.map +1 -1
  14. package/lib/cjs/widget/components/CustomCalculationTable.d.ts +5 -5
  15. package/lib/cjs/widget/components/CustomCalculationTable.js.map +1 -1
  16. package/lib/cjs/widget/components/GroupAction.d.ts +2 -2
  17. package/lib/cjs/widget/components/GroupAction.js.map +1 -1
  18. package/lib/cjs/widget/components/GroupPropertyAction.d.ts +2 -1
  19. package/lib/cjs/widget/components/GroupPropertyAction.js +27 -26
  20. package/lib/cjs/widget/components/GroupPropertyAction.js.map +1 -1
  21. package/lib/cjs/widget/components/GroupPropertyTable.d.ts +5 -5
  22. package/lib/cjs/widget/components/GroupPropertyTable.js.map +1 -1
  23. package/lib/cjs/widget/components/Grouping.d.ts +1 -1
  24. package/lib/cjs/widget/components/Grouping.js +25 -26
  25. package/lib/cjs/widget/components/Grouping.js.map +1 -1
  26. package/lib/cjs/widget/components/Grouping.scss +4 -0
  27. package/lib/cjs/widget/components/GroupingMapping.d.ts +2 -2
  28. package/lib/cjs/widget/components/GroupingMapping.js.map +1 -1
  29. package/lib/cjs/widget/components/Mapping.d.ts +1 -1
  30. package/lib/cjs/widget/components/Mapping.js +6 -7
  31. package/lib/cjs/widget/components/Mapping.js.map +1 -1
  32. package/lib/cjs/widget/components/MappingAction.js +1 -2
  33. package/lib/cjs/widget/components/MappingAction.js.map +1 -1
  34. package/lib/cjs/widget/components/MappingImportWizardModal.js.map +1 -1
  35. package/lib/cjs/widget/components/PropertyMenu.d.ts +2 -2
  36. package/lib/cjs/widget/components/PropertyMenu.js +7 -8
  37. package/lib/cjs/widget/components/PropertyMenu.js.map +1 -1
  38. package/lib/cjs/widget/components/SelectMappings.d.ts +2 -2
  39. package/lib/cjs/widget/components/SelectMappings.js +2 -2
  40. package/lib/cjs/widget/components/SelectMappings.js.map +1 -1
  41. package/lib/cjs/widget/components/context/MappingClientContext.d.ts +5 -5
  42. package/lib/cjs/widget/components/context/MappingClientContext.js +1 -5
  43. package/lib/cjs/widget/components/context/MappingClientContext.js.map +1 -1
  44. package/lib/esm/grouping-mapping-widget.d.ts +0 -1
  45. package/lib/esm/grouping-mapping-widget.js +0 -1
  46. package/lib/esm/grouping-mapping-widget.js.map +1 -1
  47. package/lib/esm/widget/components/CalculatedPropertyAction.d.ts +2 -2
  48. package/lib/esm/widget/components/CalculatedPropertyAction.js +13 -13
  49. package/lib/esm/widget/components/CalculatedPropertyAction.js.map +1 -1
  50. package/lib/esm/widget/components/CalculatedPropertyTable.d.ts +5 -5
  51. package/lib/esm/widget/components/CalculatedPropertyTable.js.map +1 -1
  52. package/lib/esm/widget/components/ConfirmMappingsImport.d.ts +3 -3
  53. package/lib/esm/widget/components/ConfirmMappingsImport.js.map +1 -1
  54. package/lib/esm/widget/components/CustomCalculationAction.d.ts +2 -2
  55. package/lib/esm/widget/components/CustomCalculationAction.js +5 -5
  56. package/lib/esm/widget/components/CustomCalculationAction.js.map +1 -1
  57. package/lib/esm/widget/components/CustomCalculationTable.d.ts +5 -5
  58. package/lib/esm/widget/components/CustomCalculationTable.js.map +1 -1
  59. package/lib/esm/widget/components/GroupAction.d.ts +2 -2
  60. package/lib/esm/widget/components/GroupAction.js.map +1 -1
  61. package/lib/esm/widget/components/GroupPropertyAction.d.ts +2 -1
  62. package/lib/esm/widget/components/GroupPropertyAction.js +27 -26
  63. package/lib/esm/widget/components/GroupPropertyAction.js.map +1 -1
  64. package/lib/esm/widget/components/GroupPropertyTable.d.ts +5 -5
  65. package/lib/esm/widget/components/GroupPropertyTable.js.map +1 -1
  66. package/lib/esm/widget/components/Grouping.d.ts +1 -1
  67. package/lib/esm/widget/components/Grouping.js +26 -27
  68. package/lib/esm/widget/components/Grouping.js.map +1 -1
  69. package/lib/esm/widget/components/Grouping.scss +4 -0
  70. package/lib/esm/widget/components/GroupingMapping.d.ts +2 -2
  71. package/lib/esm/widget/components/GroupingMapping.js.map +1 -1
  72. package/lib/esm/widget/components/Mapping.d.ts +1 -1
  73. package/lib/esm/widget/components/Mapping.js +6 -7
  74. package/lib/esm/widget/components/Mapping.js.map +1 -1
  75. package/lib/esm/widget/components/MappingAction.js +1 -2
  76. package/lib/esm/widget/components/MappingAction.js.map +1 -1
  77. package/lib/esm/widget/components/MappingImportWizardModal.js.map +1 -1
  78. package/lib/esm/widget/components/PropertyMenu.d.ts +2 -2
  79. package/lib/esm/widget/components/PropertyMenu.js +7 -8
  80. package/lib/esm/widget/components/PropertyMenu.js.map +1 -1
  81. package/lib/esm/widget/components/SelectMappings.d.ts +2 -2
  82. package/lib/esm/widget/components/SelectMappings.js +2 -2
  83. package/lib/esm/widget/components/SelectMappings.js.map +1 -1
  84. package/lib/esm/widget/components/context/MappingClientContext.d.ts +5 -5
  85. package/lib/esm/widget/components/context/MappingClientContext.js +2 -6
  86. package/lib/esm/widget/components/context/MappingClientContext.js.map +1 -1
  87. package/package.json +2 -2
  88. package/lib/cjs/widget/IMappingClient.d.ts +0 -327
  89. package/lib/cjs/widget/IMappingClient.js +0 -7
  90. package/lib/cjs/widget/IMappingClient.js.map +0 -1
  91. package/lib/esm/widget/IMappingClient.d.ts +0 -327
  92. package/lib/esm/widget/IMappingClient.js +0 -6
  93. package/lib/esm/widget/IMappingClient.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyMenu.js","sourceRoot":"","sources":["../../../../src/widget/components/PropertyMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EACL,iCAAiC,EACjC,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,GACf,MAAM,eAAe,CAAC;AAEvB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAItD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,cAAc,EACd,IAAI,EACJ,OAAO,GACR,MAAM,sBAAsB,CAAC;AAK9B,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EA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,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,yBAAyB,EAAE,yBAAyB,EACpD,4BAA4B,EAAE,4BAA4B,EAC1D,kBAAkB,EAAE,mBAAmB,EACvC,2BAA2B,EAAE,2BAA2B,EACxD,kBAAkB,EAAE,kBAAkB,EACtC,yBAAyB,EAAE,yBAAyB,EACpD,yBAAyB,EAAE,yBAAyB,GACpD,CACE,CACP,CACG;gBACN,oBAAC,gBAAgB,IACf,SAAS,EAAC,uBAAuB,EACjC,MAAM,EAAE,sBAAsB;oBAE9B,oBAAC,sBAAsB,IACrB,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC;wBAE/C,oBAAC,IAAI,IAAC,OAAO,EAAC,YAAY,IAAE,GAAG,MAAA,KAAK,CAAC,SAAS,mCAAI,EAAE,cAAc,CAAQ,CACnD;oBACzB,oBAAC,oBAAoB;wBACnB,6BAAK,SAAS,EAAC,sBAAsB;4BACnC,oBAAC,eAAe,IACd,KAAK,EAAC,OAAO,EACb,IAAI,EAAE,EAAE,EACR,QAAQ,QACR,YAAY,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,EAAE,GAC/B,CACE,CACe,CACN,CACK,CAC3B,CAAC;KACL;AACH,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 { IModelConnection } from \"@itwin/core-frontend\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport { useActiveIModelConnection } from \"@itwin/appui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport { WidgetHeader } from \"./utils\";\nimport {\n clearEmphasizedOverriddenElements,\n manufactureKeys,\n visualizeElements,\n visualizeElementsByKeys,\n zoomToElements,\n} from \"./viewerUtils\";\nimport type { GroupType } from \"./Grouping\";\nimport \"./PropertyMenu.scss\";\nimport GroupPropertyAction from \"./GroupPropertyAction\";\nimport CalculatedPropertyAction from \"./CalculatedPropertyAction\";\nimport type { GroupPropertyType } from \"./GroupPropertyTable\";\nimport GroupPropertyTable from \"./GroupPropertyTable\";\nimport type {\n CalculatedPropertyType,\n} from \"./CalculatedPropertyTable\";\nimport CalculatedPropertyTable from \"./CalculatedPropertyTable\";\nimport {\n IconButton,\n InformationPanel,\n InformationPanelBody,\n InformationPanelHeader,\n InformationPanelWrapper,\n LabeledTextarea,\n ProgressRadial,\n Text,\n toaster,\n} from \"@itwin/itwinui-react\";\nimport type { CellProps } from \"react-table\";\nimport type {\n CustomCalculationType,\n} from \"./CustomCalculationTable\";\nimport CustomCalculationTable from \"./CustomCalculationTable\";\nimport CustomCalculationAction from \"./CustomCalculationAction\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport { SvgProperties } from \"@itwin/itwinui-icons-react\";\nimport type { PossibleDataType, PropertyMap } from \"../../formula/Types\";\nimport { useCombinedFetchRefresh } from \"../hooks/useFetchData\";\nimport { useMappingClient } from \"./context/MappingClientContext\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\n\ninterface PropertyModifyProps {\n iModelId: string;\n mappingId: string;\n group: GroupType;\n goBack: () => Promise<void>;\n hideGroupProps?: boolean;\n hideCalculatedProps?: boolean;\n hideCustomCalculationProps?: boolean;\n}\n\nexport enum PropertyMenuView {\n DEFAULT = \"default\",\n ADD_GROUP_PROPERTY = \"add_group_property\",\n MODIFY_GROUP_PROPERTY = \"modify_group_property\",\n ADD_CALCULATED_PROPERTY = \"add_calculated_property\",\n MODIFY_CALCULATED_PROPERTY = \"modify_calculated_property\",\n ADD_CUSTOM_CALCULATION = \"add_custom_calculation\",\n MODIFY_CUSTOM_CALCULATION = \"modify_custom_calculation\",\n}\n\nconst stringToPossibleDataType = (str?: string): PossibleDataType => {\n if (!str)\n return \"Undefined\";\n\n switch (str.toLowerCase()) {\n case \"double\":\n case \"number\": return \"Number\";\n case \"string\": return \"String\";\n case \"boolean\": return \"Boolean\";\n default: return \"Undefined\";\n }\n};\n\nconst convertToPropertyMap = (\n groupProperties: GroupPropertyType[],\n calculatedProperties: CalculatedPropertyType[],\n customCalculations: CustomCalculationType[],\n selectedPropertyName?: string\n): PropertyMap => {\n const map: PropertyMap = {};\n const selectedLowerName = selectedPropertyName?.toLowerCase();\n\n groupProperties.forEach((p) => {\n const lowerName = p.propertyName?.toLowerCase();\n if (lowerName && lowerName !== selectedLowerName)\n map[lowerName] = stringToPossibleDataType(p.dataType);\n });\n\n calculatedProperties.forEach((p) => {\n const lowerName = p.propertyName?.toLowerCase();\n if (lowerName)\n map[lowerName] = \"Number\";\n });\n\n customCalculations.forEach((p) => {\n const lowerName = p.propertyName?.toLowerCase();\n if (lowerName && lowerName !== selectedLowerName)\n map[lowerName] = stringToPossibleDataType(p.dataType);\n });\n\n return map;\n};\n\nexport const PropertyMenu = ({\n iModelId,\n mappingId,\n group,\n goBack,\n hideGroupProps = false,\n hideCalculatedProps = false,\n hideCustomCalculationProps = false,\n}: PropertyModifyProps) => {\n const groupId = group.id ?? \"\";\n\n const { getAccessToken } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n\n const iModelConnection = useActiveIModelConnection() as IModelConnection;\n const [propertyMenuView, setPropertyMenuView] = useState<PropertyMenuView>(\n PropertyMenuView.DEFAULT,\n );\n const [selectedGroupProperty, setSelectedGroupProperty] =\n useState<GroupPropertyType | undefined>(undefined);\n const [selectedCalculatedProperty, setSelectedCalculatedProperty] =\n useState<CalculatedPropertyType | undefined>(undefined);\n const [selectedCustomCalculation, setSelectedCustomCalculation] =\n useState<CustomCalculationType | undefined>(undefined);\n const [isInformationPanelOpen, setIsInformationPanelOpen] =\n useState<boolean>(false);\n const [resolvedHiliteIds, setResolvedHiliteIds] = useState<string[]>([]);\n const [keySet, setKeySet] = useState<KeySet>();\n const [isLoading, setIsLoading] = useState<boolean>(true);\n\n const fetchGroupProperties = useMemo(\n () => {\n return async () => mappingClient.getGroupProperties((await getAccessToken()), iModelId, mappingId, groupId);\n },\n [getAccessToken, mappingClient, iModelId, mappingId, groupId],\n );\n const { isLoading: isLoadingGroupProperties, data: groupProperties, refreshData: refreshGroupProperties } =\n useCombinedFetchRefresh<GroupPropertyType>(fetchGroupProperties);\n\n const fetchCalculatedProperties = useMemo(\n () => {\n return async () => mappingClient.getCalculatedProperties((await getAccessToken()), iModelId, mappingId, groupId);\n },\n [getAccessToken, mappingClient, iModelId, mappingId, groupId],\n );\n const { isLoading: isLoadingCalculatedProperties, data: calculatedProperties, refreshData: refreshCalculatedProperties } =\n useCombinedFetchRefresh<CalculatedPropertyType>(fetchCalculatedProperties);\n\n const fetchCustomCalculations = useMemo(\n () => {\n return async () => mappingClient.getCustomCalculations((await getAccessToken()), iModelId, mappingId, groupId);\n },\n [getAccessToken, mappingClient, iModelId, mappingId, groupId],\n );\n const { isLoading: isLoadingCustomCalculations, data: customCalculations, refreshData: refreshCustomCalculations } =\n useCombinedFetchRefresh<CustomCalculationType>(fetchCustomCalculations);\n\n useEffect(() => {\n const initialize = async () => {\n try {\n const query = group.query ?? \"\";\n const queryRowCount = await iModelConnection.queryRowCount(query);\n if (queryRowCount === 0) {\n toaster.warning(\"The query is valid but produced no results.\");\n await goBack();\n }\n const keys = await manufactureKeys(query, iModelConnection);\n setKeySet(keys);\n Presentation.selection.clearSelection(\n \"GroupingMappingWidget\",\n iModelConnection,\n );\n clearEmphasizedOverriddenElements();\n const resolvedIds = await visualizeElementsByKeys(keys, \"red\");\n await zoomToElements(resolvedIds);\n setResolvedHiliteIds(resolvedIds);\n setIsLoading(false);\n } catch {\n toaster.negative(`Could not load ${group.groupName}.`);\n await goBack();\n }\n };\n void initialize();\n }, [iModelConnection, group.query, goBack, group.groupName]);\n\n const onGroupPropertyModify = useCallback(\n (value: CellProps<GroupPropertyType>) => {\n setSelectedGroupProperty(value.row.original);\n setPropertyMenuView(PropertyMenuView.MODIFY_GROUP_PROPERTY);\n },\n [],\n );\n\n const onCalculatedPropertyModify = useCallback(\n (value: CellProps<CalculatedPropertyType>) => {\n setSelectedCalculatedProperty(value.row.original);\n setPropertyMenuView(PropertyMenuView.MODIFY_CALCULATED_PROPERTY);\n },\n [],\n );\n\n const onCustomCalculationModify = useCallback(\n (value: CellProps<CustomCalculationType>) => {\n setSelectedCustomCalculation(value.row.original);\n setPropertyMenuView(PropertyMenuView.MODIFY_CUSTOM_CALCULATION);\n },\n [],\n );\n\n const groupPropertyReturn = useCallback(async (modified: boolean) => {\n setPropertyMenuView(PropertyMenuView.DEFAULT);\n modified && await refreshGroupProperties();\n }, [refreshGroupProperties]);\n\n const calculatedPropertyReturn = useCallback(async (modified: boolean) => {\n visualizeElements(resolvedHiliteIds, \"red\");\n await zoomToElements(resolvedHiliteIds);\n setPropertyMenuView(PropertyMenuView.DEFAULT);\n modified && await refreshCalculatedProperties();\n }, [resolvedHiliteIds, refreshCalculatedProperties]);\n\n const customCalculationReturn = useCallback(async (modified: boolean) => {\n setPropertyMenuView(PropertyMenuView.DEFAULT);\n modified && await refreshCustomCalculations();\n }, [refreshCustomCalculations]);\n\n if (isLoading) {\n return (\n <div className='gmw-loading-overlay'>\n <Text>Loading Group</Text>\n <ProgressRadial indeterminate />\n <Text>Please wait...</Text>\n </div>\n );\n }\n\n switch (propertyMenuView) {\n case PropertyMenuView.ADD_GROUP_PROPERTY:\n return (\n <GroupPropertyAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n keySet={keySet ?? new KeySet()}\n returnFn={groupPropertyReturn}\n />\n );\n case PropertyMenuView.MODIFY_GROUP_PROPERTY:\n return (\n <GroupPropertyAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n keySet={keySet ?? new KeySet()}\n groupPropertyId={selectedGroupProperty?.id ?? \"\"}\n groupPropertyName={selectedGroupProperty?.propertyName ?? \"\"}\n returnFn={groupPropertyReturn}\n />\n );\n case PropertyMenuView.ADD_CALCULATED_PROPERTY:\n return (\n <CalculatedPropertyAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n ids={resolvedHiliteIds}\n returnFn={calculatedPropertyReturn}\n />\n );\n case PropertyMenuView.MODIFY_CALCULATED_PROPERTY:\n return (\n <CalculatedPropertyAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n property={selectedCalculatedProperty}\n ids={resolvedHiliteIds}\n returnFn={calculatedPropertyReturn}\n />\n );\n case PropertyMenuView.ADD_CUSTOM_CALCULATION:\n return (\n <CustomCalculationAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n properties={convertToPropertyMap(groupProperties, calculatedProperties, customCalculations)}\n returnFn={customCalculationReturn}\n />\n );\n case PropertyMenuView.MODIFY_CUSTOM_CALCULATION:\n return (\n <CustomCalculationAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n properties={convertToPropertyMap(groupProperties, calculatedProperties, customCalculations, selectedCustomCalculation?.propertyName)}\n customCalculation={selectedCustomCalculation}\n returnFn={customCalculationReturn}\n />\n );\n default:\n return (\n <InformationPanelWrapper className='gmw-property-menu-wrapper'>\n <div className='gmw-property-header'>\n <WidgetHeader\n title={`${group.groupName ?? \"\"}`}\n returnFn={goBack}\n />\n <IconButton\n styleType='borderless'\n onClick={() => setIsInformationPanelOpen(true)}\n >\n <SvgProperties />\n </IconButton>\n </div>\n <div className='gmw-property-menu-container'>\n {!hideGroupProps && (\n <div className='gmw-property-table'>\n <GroupPropertyTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onGroupPropertyModify={onGroupPropertyModify}\n setSelectedGroupProperty={setSelectedGroupProperty}\n setGroupModifyView={setPropertyMenuView}\n isLoadingGroupProperties={isLoadingGroupProperties}\n groupProperties={groupProperties}\n refreshGroupProperties={refreshGroupProperties}\n selectedGroupProperty={selectedGroupProperty}\n />\n </div>\n )}\n\n {!hideCalculatedProps && (\n <div className='gmw-property-table'>\n <CalculatedPropertyTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onCalculatedPropertyModify={onCalculatedPropertyModify}\n setSelectedCalculatedProperty={setSelectedCalculatedProperty}\n setGroupModifyView={setPropertyMenuView}\n isLoadingCalculatedProperties={isLoadingCalculatedProperties}\n calculatedProperties={calculatedProperties}\n refreshCalculatedProperties={refreshCalculatedProperties}\n selectedCalculatedProperty={selectedCalculatedProperty}\n />\n </div>\n )}\n {!hideCustomCalculationProps && (\n <div className='gmw-property-table'>\n <CustomCalculationTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onCustomCalculationModify={onCustomCalculationModify}\n setSelectedCustomCalculation={setSelectedCustomCalculation}\n setGroupModifyView={setPropertyMenuView}\n isLoadingCustomCalculations={isLoadingCustomCalculations}\n customCalculations={customCalculations}\n refreshCustomCalculations={refreshCustomCalculations}\n selectedCustomCalculation={selectedCustomCalculation}\n />\n </div>\n )}\n </div>\n <InformationPanel\n className='gmw-information-panel'\n isOpen={isInformationPanelOpen}\n >\n <InformationPanelHeader\n onClose={() => setIsInformationPanelOpen(false)}\n >\n <Text variant='subheading'>{`${group.groupName ?? \"\"} Information`}</Text>\n </InformationPanelHeader>\n <InformationPanelBody>\n <div className='gmw-information-body'>\n <LabeledTextarea\n label='Query'\n rows={15}\n readOnly\n defaultValue={group.query ?? \"\"}\n />\n </div>\n </InformationPanelBody>\n </InformationPanel>\n </InformationPanelWrapper>\n );\n }\n};\n"]}
1
+ {"version":3,"file":"PropertyMenu.js","sourceRoot":"","sources":["../../../../src/widget/components/PropertyMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC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C,sBAAsB;4BACnC,oBAAC,eAAe,IACd,KAAK,EAAC,OAAO,EACb,IAAI,EAAE,EAAE,EACR,QAAQ,QACR,YAAY,EAAE,KAAK,CAAC,KAAK,GACzB,CACE,CACe,CACN,CACK,CAC3B,CAAC;KACL;AACH,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 { IModelConnection } from \"@itwin/core-frontend\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport { useActiveIModelConnection } from \"@itwin/appui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport { WidgetHeader } from \"./utils\";\nimport {\n clearEmphasizedOverriddenElements,\n manufactureKeys,\n visualizeElements,\n visualizeElementsByKeys,\n zoomToElements,\n} from \"./viewerUtils\";\nimport type { IGroupTyped } from \"./Grouping\";\nimport \"./PropertyMenu.scss\";\nimport GroupPropertyAction from \"./GroupPropertyAction\";\nimport CalculatedPropertyAction from \"./CalculatedPropertyAction\";\nimport type { IGroupPropertyTyped } from \"./GroupPropertyTable\";\nimport GroupPropertyTable from \"./GroupPropertyTable\";\nimport type {\n ICalculatedPropertyTyped,\n} from \"./CalculatedPropertyTable\";\nimport CalculatedPropertyTable from \"./CalculatedPropertyTable\";\nimport {\n IconButton,\n InformationPanel,\n InformationPanelBody,\n InformationPanelHeader,\n InformationPanelWrapper,\n LabeledTextarea,\n ProgressRadial,\n Text,\n toaster,\n} from \"@itwin/itwinui-react\";\nimport type { CellProps } from \"react-table\";\nimport type {\n ICustomCalculationTyped,\n} from \"./CustomCalculationTable\";\nimport CustomCalculationTable from \"./CustomCalculationTable\";\nimport CustomCalculationAction from \"./CustomCalculationAction\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport { SvgProperties } from \"@itwin/itwinui-icons-react\";\nimport type { PossibleDataType, PropertyMap } from \"../../formula/Types\";\nimport { useCombinedFetchRefresh } from \"../hooks/useFetchData\";\nimport { useMappingClient } from \"./context/MappingClientContext\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\n\ninterface PropertyModifyProps {\n iModelId: string;\n mappingId: string;\n group: IGroupTyped;\n goBack: () => Promise<void>;\n hideGroupProps?: boolean;\n hideCalculatedProps?: boolean;\n hideCustomCalculationProps?: boolean;\n}\n\nexport enum PropertyMenuView {\n DEFAULT = \"default\",\n ADD_GROUP_PROPERTY = \"add_group_property\",\n MODIFY_GROUP_PROPERTY = \"modify_group_property\",\n ADD_CALCULATED_PROPERTY = \"add_calculated_property\",\n MODIFY_CALCULATED_PROPERTY = \"modify_calculated_property\",\n ADD_CUSTOM_CALCULATION = \"add_custom_calculation\",\n MODIFY_CUSTOM_CALCULATION = \"modify_custom_calculation\",\n}\n\nconst stringToPossibleDataType = (str?: string): PossibleDataType => {\n if (!str)\n return \"Undefined\";\n\n switch (str.toLowerCase()) {\n case \"double\":\n case \"number\": return \"Number\";\n case \"string\": return \"String\";\n case \"boolean\": return \"Boolean\";\n default: return \"Undefined\";\n }\n};\n\nconst convertToPropertyMap = (\n groupProperties: IGroupPropertyTyped[],\n calculatedProperties: ICalculatedPropertyTyped[],\n customCalculations: ICustomCalculationTyped[],\n selectedPropertyName?: string\n): PropertyMap => {\n const map: PropertyMap = {};\n const selectedLowerName = selectedPropertyName?.toLowerCase();\n\n groupProperties.forEach((p) => {\n const lowerName = p.propertyName?.toLowerCase();\n if (lowerName && lowerName !== selectedLowerName)\n map[lowerName] = stringToPossibleDataType(p.dataType);\n });\n\n calculatedProperties.forEach((p) => {\n const lowerName = p.propertyName?.toLowerCase();\n if (lowerName)\n map[lowerName] = \"Number\";\n });\n\n customCalculations.forEach((p) => {\n const lowerName = p.propertyName?.toLowerCase();\n if (lowerName && lowerName !== selectedLowerName)\n map[lowerName] = stringToPossibleDataType(p.dataType);\n });\n\n return map;\n};\n\nexport const PropertyMenu = ({\n iModelId,\n mappingId,\n group,\n goBack,\n hideGroupProps = false,\n hideCalculatedProps = false,\n hideCustomCalculationProps = false,\n}: PropertyModifyProps) => {\n const groupId = group.id;\n\n const { getAccessToken } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n\n const iModelConnection = useActiveIModelConnection() as IModelConnection;\n const [propertyMenuView, setPropertyMenuView] = useState<PropertyMenuView>(\n PropertyMenuView.DEFAULT,\n );\n const [selectedGroupProperty, setSelectedGroupProperty] =\n useState<IGroupPropertyTyped | undefined>(undefined);\n const [selectedCalculatedProperty, setSelectedCalculatedProperty] =\n useState<ICalculatedPropertyTyped | undefined>(undefined);\n const [selectedCustomCalculation, setSelectedCustomCalculation] =\n useState<ICustomCalculationTyped | undefined>(undefined);\n const [isInformationPanelOpen, setIsInformationPanelOpen] =\n useState<boolean>(false);\n const [resolvedHiliteIds, setResolvedHiliteIds] = useState<string[]>([]);\n const [keySet, setKeySet] = useState<KeySet>();\n const [isLoading, setIsLoading] = useState<boolean>(true);\n\n const fetchGroupProperties = useMemo(\n () => {\n return async () => mappingClient.getGroupProperties((await getAccessToken()), iModelId, mappingId, groupId);\n },\n [getAccessToken, mappingClient, iModelId, mappingId, groupId],\n );\n const { isLoading: isLoadingGroupProperties, data: groupProperties, refreshData: refreshGroupProperties } =\n useCombinedFetchRefresh<IGroupPropertyTyped>(fetchGroupProperties);\n\n const fetchCalculatedProperties = useMemo(\n () => {\n return async () => mappingClient.getCalculatedProperties((await getAccessToken()), iModelId, mappingId, groupId);\n },\n [getAccessToken, mappingClient, iModelId, mappingId, groupId],\n );\n const { isLoading: isLoadingCalculatedProperties, data: calculatedProperties, refreshData: refreshCalculatedProperties } =\n useCombinedFetchRefresh<ICalculatedPropertyTyped>(fetchCalculatedProperties);\n\n const fetchCustomCalculations = useMemo(\n () => {\n return async () => mappingClient.getCustomCalculations((await getAccessToken()), iModelId, mappingId, groupId);\n },\n [getAccessToken, mappingClient, iModelId, mappingId, groupId],\n );\n const { isLoading: isLoadingCustomCalculations, data: customCalculations, refreshData: refreshCustomCalculations } =\n useCombinedFetchRefresh<ICustomCalculationTyped>(fetchCustomCalculations);\n\n useEffect(() => {\n const initialize = async () => {\n try {\n const query = group.query;\n const queryRowCount = await iModelConnection.queryRowCount(query);\n if (queryRowCount === 0) {\n toaster.warning(\"The query is valid but produced no results.\");\n await goBack();\n }\n const keys = await manufactureKeys(query, iModelConnection);\n setKeySet(keys);\n Presentation.selection.clearSelection(\n \"GroupingMappingWidget\",\n iModelConnection,\n );\n clearEmphasizedOverriddenElements();\n const resolvedIds = await visualizeElementsByKeys(keys, \"red\");\n await zoomToElements(resolvedIds);\n setResolvedHiliteIds(resolvedIds);\n setIsLoading(false);\n } catch {\n toaster.negative(`Could not load ${group.groupName}.`);\n await goBack();\n }\n };\n void initialize();\n }, [iModelConnection, group.query, goBack, group.groupName]);\n\n const onGroupPropertyModify = useCallback(\n (value: CellProps<IGroupPropertyTyped>) => {\n setSelectedGroupProperty(value.row.original);\n setPropertyMenuView(PropertyMenuView.MODIFY_GROUP_PROPERTY);\n },\n [],\n );\n\n const onCalculatedPropertyModify = useCallback(\n (value: CellProps<ICalculatedPropertyTyped>) => {\n setSelectedCalculatedProperty(value.row.original);\n setPropertyMenuView(PropertyMenuView.MODIFY_CALCULATED_PROPERTY);\n },\n [],\n );\n\n const onCustomCalculationModify = useCallback(\n (value: CellProps<ICustomCalculationTyped>) => {\n setSelectedCustomCalculation(value.row.original);\n setPropertyMenuView(PropertyMenuView.MODIFY_CUSTOM_CALCULATION);\n },\n [],\n );\n\n const groupPropertyReturn = useCallback(async (modified: boolean) => {\n setPropertyMenuView(PropertyMenuView.DEFAULT);\n modified && await refreshGroupProperties();\n }, [refreshGroupProperties]);\n\n const calculatedPropertyReturn = useCallback(async (modified: boolean) => {\n visualizeElements(resolvedHiliteIds, \"red\");\n await zoomToElements(resolvedHiliteIds);\n setPropertyMenuView(PropertyMenuView.DEFAULT);\n modified && await refreshCalculatedProperties();\n }, [resolvedHiliteIds, refreshCalculatedProperties]);\n\n const customCalculationReturn = useCallback(async (modified: boolean) => {\n setPropertyMenuView(PropertyMenuView.DEFAULT);\n modified && await refreshCustomCalculations();\n }, [refreshCustomCalculations]);\n\n if (isLoading) {\n return (\n <div className='gmw-loading-overlay'>\n <Text>Loading Group</Text>\n <ProgressRadial indeterminate />\n <Text>Please wait...</Text>\n </div>\n );\n }\n\n switch (propertyMenuView) {\n case PropertyMenuView.ADD_GROUP_PROPERTY:\n return (\n <GroupPropertyAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n keySet={keySet ?? new KeySet()}\n returnFn={groupPropertyReturn}\n />\n );\n case PropertyMenuView.MODIFY_GROUP_PROPERTY:\n return (\n <GroupPropertyAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n keySet={keySet ?? new KeySet()}\n groupPropertyId={selectedGroupProperty?.id ?? \"\"}\n groupPropertyName={selectedGroupProperty?.propertyName ?? \"\"}\n returnFn={groupPropertyReturn}\n />\n );\n case PropertyMenuView.ADD_CALCULATED_PROPERTY:\n return (\n <CalculatedPropertyAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n ids={resolvedHiliteIds}\n returnFn={calculatedPropertyReturn}\n />\n );\n case PropertyMenuView.MODIFY_CALCULATED_PROPERTY:\n return (\n <CalculatedPropertyAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n property={selectedCalculatedProperty}\n ids={resolvedHiliteIds}\n returnFn={calculatedPropertyReturn}\n />\n );\n case PropertyMenuView.ADD_CUSTOM_CALCULATION:\n return (\n <CustomCalculationAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n properties={convertToPropertyMap(groupProperties, calculatedProperties, customCalculations)}\n returnFn={customCalculationReturn}\n />\n );\n case PropertyMenuView.MODIFY_CUSTOM_CALCULATION:\n return (\n <CustomCalculationAction\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n properties={convertToPropertyMap(groupProperties, calculatedProperties, customCalculations, selectedCustomCalculation?.propertyName)}\n customCalculation={selectedCustomCalculation}\n returnFn={customCalculationReturn}\n />\n );\n default:\n return (\n <InformationPanelWrapper className='gmw-property-menu-wrapper'>\n <div className='gmw-property-header'>\n <WidgetHeader\n title={`${group.groupName}`}\n returnFn={goBack}\n />\n <IconButton\n styleType='borderless'\n onClick={() => setIsInformationPanelOpen(true)}\n >\n <SvgProperties />\n </IconButton>\n </div>\n <div className='gmw-property-menu-container'>\n {!hideGroupProps && (\n <div className='gmw-property-table'>\n <GroupPropertyTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onGroupPropertyModify={onGroupPropertyModify}\n setSelectedGroupProperty={setSelectedGroupProperty}\n setGroupModifyView={setPropertyMenuView}\n isLoadingGroupProperties={isLoadingGroupProperties}\n groupProperties={groupProperties}\n refreshGroupProperties={refreshGroupProperties}\n selectedGroupProperty={selectedGroupProperty}\n />\n </div>\n )}\n\n {!hideCalculatedProps && (\n <div className='gmw-property-table'>\n <CalculatedPropertyTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onCalculatedPropertyModify={onCalculatedPropertyModify}\n setSelectedCalculatedProperty={setSelectedCalculatedProperty}\n setGroupModifyView={setPropertyMenuView}\n isLoadingCalculatedProperties={isLoadingCalculatedProperties}\n calculatedProperties={calculatedProperties}\n refreshCalculatedProperties={refreshCalculatedProperties}\n selectedCalculatedProperty={selectedCalculatedProperty}\n />\n </div>\n )}\n {!hideCustomCalculationProps && (\n <div className='gmw-property-table'>\n <CustomCalculationTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onCustomCalculationModify={onCustomCalculationModify}\n setSelectedCustomCalculation={setSelectedCustomCalculation}\n setGroupModifyView={setPropertyMenuView}\n isLoadingCustomCalculations={isLoadingCustomCalculations}\n customCalculations={customCalculations}\n refreshCustomCalculations={refreshCustomCalculations}\n selectedCustomCalculation={selectedCustomCalculation}\n />\n </div>\n )}\n </div>\n <InformationPanel\n className='gmw-information-panel'\n isOpen={isInformationPanelOpen}\n >\n <InformationPanelHeader\n onClose={() => setIsInformationPanelOpen(false)}\n >\n <Text variant='subheading'>{`${group.groupName} Information`}</Text>\n </InformationPanelHeader>\n <InformationPanelBody>\n <div className='gmw-information-body'>\n <LabeledTextarea\n label='Query'\n rows={15}\n readOnly\n defaultValue={group.query}\n />\n </div>\n </InformationPanelBody>\n </InformationPanel>\n </InformationPanelWrapper>\n );\n }\n};\n"]}
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- import type { MappingType } from "./Mapping";
2
+ import type { IMappingTyped } from "./Mapping";
3
3
  import "./SelectMapping.scss";
4
4
  interface SelectMappingsProps {
5
5
  iModelId: string;
6
- onSelect: (selectedMappings: MappingType[]) => void;
6
+ onSelect: (selectedMappings: IMappingTyped[]) => void;
7
7
  onCancel: () => void;
8
8
  backFn: () => void;
9
9
  }
@@ -4,11 +4,11 @@ import { useMappingClient } from "./context/MappingClientContext";
4
4
  import "./SelectMapping.scss";
5
5
  import { handleError } from "./utils";
6
6
  import { useGroupingMappingApiConfig } from "./context/GroupingApiConfigContext";
7
- const fetchMappings = async (setMappings, iModelId, setIsLoading, getAccessToken, mappingClient) => {
7
+ const fetchMappings = async (setMappings, iModelId, setIsLoading, getAccessToken, mappingsClient) => {
8
8
  try {
9
9
  setIsLoading(true);
10
10
  const accessToken = await getAccessToken();
11
- const mappings = await mappingClient.getMappings(accessToken, iModelId);
11
+ const mappings = await mappingsClient.getMappings(accessToken, iModelId);
12
12
  setMappings(mappings);
13
13
  }
14
14
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"SelectMappings.js","sourceRoot":"","sources":["../../../../src/widget/components/SelectMappings.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,MAAM,EACN,KAAK,EACL,YAAY,EACZ,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,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E,MAAM,WAAe;YACtC,oBAAC,MAAM,IACL,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,GAAG,EAAE;oBACZ,QAAQ,CAAC,gBAAgB,CAAC,CAAC;gBAC7B,CAAC,EACD,QAAQ,EAAE,SAAS,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,WAG7C;YACT,oBAAC,MAAM,IAAC,OAAO,EAAE,QAAQ,aAAiB,CACtC,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 {\n TablePaginatorRendererProps,\n} from \"@itwin/itwinui-react\";\nimport {\n Button,\n Table,\n tableFilters,\n TablePaginator,\n} from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport type { Mapping } from \"@itwin/insights-client\";\nimport { useMappingClient } from \"./context/MappingClientContext\";\nimport type { MappingType } from \"./Mapping\";\nimport \"./SelectMapping.scss\";\nimport { handleError } from \"./utils\";\nimport type { IMappingClient } from \"../IMappingClient\";\nimport type { GetAccessTokenFn } from \"./context/GroupingApiConfigContext\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\n\nconst fetchMappings = async (\n setMappings: React.Dispatch<React.SetStateAction<Mapping[]>>,\n iModelId: string,\n setIsLoading: React.Dispatch<React.SetStateAction<boolean>>,\n getAccessToken: GetAccessTokenFn,\n mappingClient: IMappingClient\n) => {\n try {\n setIsLoading(true);\n const accessToken = await getAccessToken();\n const mappings = await mappingClient.getMappings(accessToken, iModelId);\n setMappings(mappings);\n } catch (error: any) {\n handleError(error.status);\n } finally {\n setIsLoading(false);\n }\n};\n\ninterface SelectMappingsProps {\n iModelId: string;\n onSelect: (selectedMappings: MappingType[]) => void;\n onCancel: () => void;\n backFn: () => void;\n}\n\nconst SelectMappings = ({\n iModelId,\n onSelect,\n onCancel,\n backFn,\n}: SelectMappingsProps) => {\n const { getAccessToken } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [selectedMappings, setSelectedMappings] = useState<MappingType[]>([]);\n const [mappings, setMappings] = useState<Mapping[]>([]);\n\n useEffect(() => {\n void fetchMappings(setMappings, iModelId, setIsLoading, getAccessToken, mappingClient);\n }, [getAccessToken, mappingClient, iModelId, setIsLoading]);\n\n const mappingsColumns = useMemo(\n () => [\n {\n Header: \"Table\",\n columns: [\n {\n id: \"mappingName\",\n Header: \"Mapping Name\",\n accessor: \"mappingName\",\n Filter: tableFilters.TextFilter(),\n },\n {\n id: \"description\",\n Header: \"Description\",\n accessor: \"description\",\n Filter: tableFilters.TextFilter(),\n },\n ],\n },\n ],\n []\n );\n\n const pageSizeList = useMemo(() => [10, 25, 50], []);\n const paginator = useCallback(\n (props: TablePaginatorRendererProps) => (\n <TablePaginator {...props} pageSizeList={pageSizeList} />\n ),\n [pageSizeList]\n );\n\n return (\n <div className='gmw-select-mapping-container'>\n <Table<MappingType>\n data={mappings}\n columns={mappingsColumns}\n className='gmw-select-mapping-table'\n emptyTableContent='No Mappings available.'\n isSortable\n isSelectable\n isLoading={isLoading}\n onSelect={(selectData: MappingType[] | undefined) => {\n selectData && setSelectedMappings(selectData);\n }}\n paginatorRenderer={paginator}\n />\n <div className='gmw-import-action-panel'>\n <Button onClick={backFn}>Back</Button>\n <Button\n styleType='high-visibility'\n onClick={() => {\n onSelect(selectedMappings);\n }}\n disabled={isLoading || selectedMappings.length === 0}\n >\n Next\n </Button>\n <Button onClick={onCancel}>Cancel</Button>\n </div>\n </div>\n );\n};\n\nexport default SelectMappings;\n"]}
1
+ {"version":3,"file":"SelectMappings.js","sourceRoot":"","sources":["../../../../src/widget/components/SelectMappings.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,MAAM,EACN,KAAK,EACL,Y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ChD,CAAC,EACD,iBAAiB,EAAE,SAAS,GAC5B;QACF,6BAAK,SAAS,EAAC,yBAAyB;YACtC,oBAAC,MAAM,IAAC,OAAO,EAAE,MAAM,WAAe;YACtC,oBAAC,MAAM,IACL,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,GAAG,EAAE;oBACZ,QAAQ,CAAC,gBAAgB,CAAC,CAAC;gBAC7B,CAAC,EACD,QAAQ,EAAE,SAAS,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,WAG7C;YACT,oBAAC,MAAM,IAAC,OAAO,EAAE,QAAQ,aAAiB,CACtC,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 {\n TablePaginatorRendererProps,\n} from \"@itwin/itwinui-react\";\nimport {\n Button,\n Table,\n tableFilters,\n TablePaginator,\n} from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport type { IMappingsClient, Mapping } from \"@itwin/insights-client\";\nimport { useMappingClient } from \"./context/MappingClientContext\";\nimport type { IMappingTyped } from \"./Mapping\";\nimport \"./SelectMapping.scss\";\nimport { handleError } from \"./utils\";\nimport type { GetAccessTokenFn } from \"./context/GroupingApiConfigContext\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\n\nconst fetchMappings = async (\n setMappings: React.Dispatch<React.SetStateAction<Mapping[]>>,\n iModelId: string,\n setIsLoading: React.Dispatch<React.SetStateAction<boolean>>,\n getAccessToken: GetAccessTokenFn,\n mappingsClient: IMappingsClient\n) => {\n try {\n setIsLoading(true);\n const accessToken = await getAccessToken();\n const mappings = await mappingsClient.getMappings(accessToken, iModelId);\n setMappings(mappings);\n } catch (error: any) {\n handleError(error.status);\n } finally {\n setIsLoading(false);\n }\n};\n\ninterface SelectMappingsProps {\n iModelId: string;\n onSelect: (selectedMappings: IMappingTyped[]) => void;\n onCancel: () => void;\n backFn: () => void;\n}\n\nconst SelectMappings = ({\n iModelId,\n onSelect,\n onCancel,\n backFn,\n}: SelectMappingsProps) => {\n const { getAccessToken } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [selectedMappings, setSelectedMappings] = useState<IMappingTyped[]>([]);\n const [mappings, setMappings] = useState<Mapping[]>([]);\n\n useEffect(() => {\n void fetchMappings(setMappings, iModelId, setIsLoading, getAccessToken, mappingClient);\n }, [getAccessToken, mappingClient, iModelId, setIsLoading]);\n\n const mappingsColumns = useMemo(\n () => [\n {\n Header: \"Table\",\n columns: [\n {\n id: \"mappingName\",\n Header: \"Mapping Name\",\n accessor: \"mappingName\",\n Filter: tableFilters.TextFilter(),\n },\n {\n id: \"description\",\n Header: \"Description\",\n accessor: \"description\",\n Filter: tableFilters.TextFilter(),\n },\n ],\n },\n ],\n []\n );\n\n const pageSizeList = useMemo(() => [10, 25, 50], []);\n const paginator = useCallback(\n (props: TablePaginatorRendererProps) => (\n <TablePaginator {...props} pageSizeList={pageSizeList} />\n ),\n [pageSizeList]\n );\n\n return (\n <div className='gmw-select-mapping-container'>\n <Table<IMappingTyped>\n data={mappings}\n columns={mappingsColumns}\n className='gmw-select-mapping-table'\n emptyTableContent='No Mappings available.'\n isSortable\n isSelectable\n isLoading={isLoading}\n onSelect={(selectData: IMappingTyped[] | undefined) => {\n selectData && setSelectedMappings(selectData);\n }}\n paginatorRenderer={paginator}\n />\n <div className='gmw-import-action-panel'>\n <Button onClick={backFn}>Back</Button>\n <Button\n styleType='high-visibility'\n onClick={() => {\n onSelect(selectedMappings);\n }}\n disabled={isLoading || selectedMappings.length === 0}\n >\n Next\n </Button>\n <Button onClick={onCancel}>Cancel</Button>\n </div>\n </div>\n );\n};\n\nexport default SelectMappings;\n"]}
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { IMappingClient } from "../../IMappingClient";
2
+ import type { IMappingsClient } from "@itwin/insights-client";
3
3
  import type { ClientPrefix } from "./GroupingApiConfigContext";
4
- export declare const createDefaultMappingClient: (prefix?: ClientPrefix) => IMappingClient;
5
- export declare const createMappingClient: (clientProp: IMappingClient | ClientPrefix) => IMappingClient;
6
- export declare const MappingClientContext: import("react").Context<IMappingClient>;
7
- export declare const useMappingClient: () => IMappingClient;
4
+ export declare const createDefaultMappingClient: (prefix?: ClientPrefix) => IMappingsClient;
5
+ export declare const createMappingClient: (clientProp: IMappingsClient | ClientPrefix) => IMappingsClient;
6
+ export declare const MappingClientContext: import("react").Context<IMappingsClient>;
7
+ export declare const useMappingClient: () => IMappingsClient;
8
8
  //# sourceMappingURL=MappingClientContext.d.ts.map
@@ -1,8 +1,4 @@
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 { REPORTING_BASE_PATH, ReportingClient } from "@itwin/insights-client";
1
+ import { MappingsClient, REPORTING_BASE_PATH } from "@itwin/insights-client";
6
2
  import { createContext, useContext } from "react";
7
3
  const prefixUrl = (baseUrl, prefix) => {
8
4
  if (prefix && baseUrl) {
@@ -12,7 +8,7 @@ const prefixUrl = (baseUrl, prefix) => {
12
8
  };
13
9
  export const createDefaultMappingClient = (prefix) => {
14
10
  const url = prefixUrl(REPORTING_BASE_PATH, prefix);
15
- return new ReportingClient(url);
11
+ return new MappingsClient(url);
16
12
  };
17
13
  export const createMappingClient = (clientProp) => {
18
14
  if (undefined === clientProp || typeof clientProp === "string") {
@@ -1 +1 @@
1
- {"version":3,"file":"MappingClientContext.js","sourceRoot":"","sources":["../../../../../src/widget/components/context/MappingClientContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAIlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;QACrB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;KACxE;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAqB,EAAkB,EAAE;IAClF,MAAM,GAAG,GAAG,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACnD,OAAO,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAyC,EAAE,EAAE;IAC/E,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAC9D,OAAO,0BAA0B,CAAC,UAA0B,CAAC,CAAC;KAC/D;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAiB,0BAA0B,EAAE,CAAC,CAAC;AAEhG,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,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 { REPORTING_BASE_PATH, ReportingClient } from \"@itwin/insights-client\";\nimport { createContext, useContext } from \"react\";\nimport type { IMappingClient } from \"../../IMappingClient\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\nexport const createDefaultMappingClient = (prefix?: ClientPrefix): IMappingClient => {\n const url = prefixUrl(REPORTING_BASE_PATH, prefix);\n return new ReportingClient(url);\n};\n\nexport const createMappingClient = (clientProp: IMappingClient | ClientPrefix) => {\n if (undefined === clientProp || typeof clientProp === \"string\") {\n return createDefaultMappingClient(clientProp as ClientPrefix);\n }\n return clientProp;\n};\nexport const MappingClientContext = createContext<IMappingClient>(createDefaultMappingClient());\n\nexport const useMappingClient = () => {\n const context = useContext(MappingClientContext);\n if (!context) {\n throw new Error(\n \"useMappingClient should be used within a MappingClientContext provider\"\n );\n }\n return context;\n};\n"]}
1
+ {"version":3,"file":"MappingClientContext.js","sourceRoot":"","sources":["../../../../../src/widget/components/context/MappingClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;QACrB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;KACxE;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACnF,MAAM,GAAG,GAAG,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACnD,OAAO,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAA0C,EAAE,EAAE;IAChF,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAC9D,OAAO,0BAA0B,CAAC,UAA0B,CAAC,CAAC;KAC/D;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAkB,0BAA0B,EAAE,CAAC,CAAC;AAEjG,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,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 { IMappingsClient} from \"@itwin/insights-client\";\nimport { MappingsClient, REPORTING_BASE_PATH } from \"@itwin/insights-client\";\nimport { createContext, useContext } from \"react\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\nexport const createDefaultMappingClient = (prefix?: ClientPrefix): IMappingsClient => {\n const url = prefixUrl(REPORTING_BASE_PATH, prefix);\n return new MappingsClient(url);\n};\n\nexport const createMappingClient = (clientProp: IMappingsClient | ClientPrefix) => {\n if (undefined === clientProp || typeof clientProp === \"string\") {\n return createDefaultMappingClient(clientProp as ClientPrefix);\n }\n return clientProp;\n};\nexport const MappingClientContext = createContext<IMappingsClient>(createDefaultMappingClient());\n\nexport const useMappingClient = () => {\n const context = useContext(MappingClientContext);\n if (!context) {\n throw new Error(\n \"useMappingClient should be used within a MappingClientContext provider\"\n );\n }\n return context;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/grouping-mapping-widget",
3
- "version": "0.5.8",
3
+ "version": "0.6.0",
4
4
  "description": "An iTwin.js 3D Viewer Widget that interfaces with the iTwin Reporting Platform.",
5
5
  "keywords": [
6
6
  "Bentley",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@itwin/imodel-browser-react": "^0.12.1",
40
- "@itwin/insights-client": "0.2.1",
40
+ "@itwin/insights-client": "^0.3.0",
41
41
  "@itwin/itwinui-icons-react": "^1.7.0",
42
42
  "@itwin/itwinui-react": "~1.42.0",
43
43
  "classnames": "^2.3.1",
@@ -1,327 +0,0 @@
1
- import type { AccessToken } from "@itwin/core-bentley";
2
- import type { CalculatedProperty, CalculatedPropertyCreate, CalculatedPropertySingle, CalculatedPropertyUpdate, CustomCalculation, CustomCalculationCreate, CustomCalculationSingle, CustomCalculationUpdate, Group, GroupCreate, GroupProperty, GroupPropertyCreate, GroupPropertySingle, GroupPropertyUpdate, GroupSingle, GroupUpdate, Mapping, MappingCopy, MappingCreate, MappingSingle, MappingUpdate } from "@itwin/insights-client";
3
- export interface IMappingClient {
4
- /**
5
- * Gets all Mappings for an iModel.
6
- *
7
- * @summary Get Mappings.
8
- * @param {string} iModelId The iModel Id.
9
- * @param {string} accessToken OAuth access token with scope `insights:read`.
10
- * @memberof IMappingClient
11
- * @see https://developer.bentley.com/apis/insights/operations/get-mappings/
12
- */
13
- getMappings(accessToken: AccessToken, iModelId: string): Promise<Mapping[]>;
14
- /**
15
- * Gets a Mapping for an iModel.
16
- *
17
- * @summary Get Mapping.
18
- * @param {string} iModelId The iModel Id.
19
- * @param {string} mappingId The Mapping Id.
20
- * @param {string} accessToken OAuth access token with scope `insights:read`.
21
- * @memberof IMappingClient
22
- * @see https://developer.bentley.com/apis/insights/operations/get-mapping/
23
- */
24
- getMapping(accessToken: AccessToken, mappingId: string, iModelId: string): Promise<MappingSingle>;
25
- /**
26
- * Creates a Mapping for an iModel.
27
- *
28
- * @summary Create Mapping.
29
- * @param {string} iModelId Id of the iModel for which to create a new Mapping.
30
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
31
- * @param {MappingCreate} mapping Request body.
32
- * @memberof IMappingClient
33
- * @see https://developer.bentley.com/apis/insights/operations/create-mapping/
34
- */
35
- createMapping(accessToken: AccessToken, iModelId: string, mapping: MappingCreate): Promise<MappingSingle>;
36
- /**
37
- * Updates a Mapping for an iModel.
38
- *
39
- * @summary Update Mapping.
40
- * @param {string} iModelId The iModel Id.
41
- * @param {string} mappingId Id of the Mapping to be updated.
42
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
43
- * @param {MappingUpdate} mapping Request body.
44
- * @memberof IMappingClient
45
- * @see https://developer.bentley.com/apis/insights/operations/update-mapping/
46
- */
47
- updateMapping(accessToken: AccessToken, iModelId: string, mappingId: string, mapping: MappingUpdate): Promise<MappingSingle>;
48
- /**
49
- * Deletes a Mapping for an iModel.
50
- *
51
- * @summary Delete Mapping.
52
- * @param {string} iModelId The iModel Id.
53
- * @param {string} mappingId Id of the Mapping to be deleted.
54
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
55
- * @memberof IMappingClient
56
- * @see https://developer.bentley.com/apis/insights/operations/delete-mapping/
57
- */
58
- deleteMapping(accessToken: AccessToken, iModelId: string, mappingId: string): Promise<Response>;
59
- /**
60
- * Copies a Mapping and all its Groups, GroupProperties, CalculatedProperties, and CustomCalculations to a target iModel.
61
- *
62
- * @summary Copy Mapping.
63
- * @param {string} iModelId Id of the source Mapping's iModel.
64
- * @param {string} mappingId Id of the source Mapping.
65
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
66
- * @param {MappingCopy} mappingCopy Request body.
67
- * @memberof IMappingClient
68
- * @see https://developer.bentley.com/apis/insights/operations/copy-mapping/
69
- */
70
- copyMapping(accessToken: AccessToken, iModelId: string, mappingId: string, mappingCopy: MappingCopy): Promise<MappingSingle>;
71
- /**
72
- * Gets all Groups for a Mapping.
73
- *
74
- * @summary Get Groups.
75
- * @param {string} iModelId The iModel Id.
76
- * @param {string} mappingId The Mapping Id.
77
- * @param {string} accessToken OAuth access token with scope `insights:read`.
78
- * @memberof IMappingClient
79
- * @see https://developer.bentley.com/apis/insights/operations/get-groups/
80
- */
81
- getGroups(accessToken: AccessToken, iModelId: string, mappingId: string): Promise<Group[]>;
82
- /**
83
- * Creates a Group for an iModel data source Mapping.
84
- *
85
- * @summary Create Group
86
- * @param {string} iModelId The iModel Id.
87
- * @param {string} mappingId Id of the Mapping for which to create a new Group.
88
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
89
- * @param {GroupCreate} group Request body.
90
- * @memberof IMappingClient
91
- * @see https://developer.bentley.com/apis/insights/operations/create-group/
92
- */
93
- createGroup(accessToken: AccessToken, iModelId: string, mappingId: string, group: GroupCreate): Promise<GroupSingle>;
94
- /**
95
- * Gets a Group for a Mapping.
96
- *
97
- * @summary Get Group.
98
- * @param {string} iModelId The iModel Id.
99
- * @param {string} mappingId The Mapping Id.
100
- * @param {string} groupId The Group Id.
101
- * @param {string} accessToken OAuth access token with scope `insights:read`.
102
- * @memberof IMappingClient
103
- * @see https://developer.bentley.com/apis/insights/operations/get-group/
104
- */
105
- getGroup(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<GroupSingle>;
106
- /**
107
- * Updates a Group for a Mapping.
108
- *
109
- * @summary Update Group.
110
- * @param {string} iModelId Globally Unique Identifier of the target iModel.
111
- * @param {string} mappingId Globally Unique Identifier of the target Mapping.
112
- * @param {string} groupId Id of the Group to be updated.
113
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
114
- * @param {GroupUpdate} group Request body.
115
- * @memberof IMappingClient
116
- * @see https://developer.bentley.com/apis/insights/operations/update-group/
117
- */
118
- updateGroup(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, group: GroupUpdate): Promise<GroupSingle>;
119
- /**
120
- * Deletes a Group for a Mapping.
121
- *
122
- * @summary Delete Group.
123
- * @param {string} iModelId The iModel Id.
124
- * @param {string} mappingId The Mapping Id.
125
- * @param {string} groupId Id of the Group to be deleted.
126
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
127
- * @memberof IMappingClient
128
- * @see https://developer.bentley.com/apis/insights/operations/delete-group/
129
- */
130
- deleteGroup(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<Response>;
131
- /**
132
- * Gets all GroupProperties for a Group.
133
- *
134
- * @summary Get GroupProperties.
135
- * @param {string} iModelId The iModel Id.
136
- * @param {string} mappingId The Mapping Id.
137
- * @param {string} groupId The Group Id.
138
- * @param {string} accessToken OAuth access token with scope `insights:read`.
139
- * @memberof IMappingClient
140
- * @see https://developer.bentley.com/apis/insights/operations/get-groupproperties/
141
- */
142
- getGroupProperties(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<GroupProperty[]>;
143
- /**
144
- * Gets a GroupProperty for a Group.
145
- *
146
- * @summary Get GroupProperty.
147
- * @param {string} iModelId The iModel Id.
148
- * @param {string} mappingId The Mapping Id.
149
- * @param {string} groupId The Group Id.
150
- * @param {string} propertyId The GroupProperty Id.
151
- * @param {string} accessToken access token with scope `insights:read`.
152
- * @memberof IMappingClient
153
- * @see https://developer.bentley.com/apis/insights/operations/get-groupproperty/
154
- */
155
- getGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<GroupPropertySingle>;
156
- /**
157
- * Creates a GroupProperty for a Group.
158
- *
159
- * @summary Create GroupProperty.
160
- * @param {string} iModelId The iModel Id.
161
- * @param {string} mappingId The Mapping Id.
162
- * @param {string} groupId Id of the Group for which to create a new GroupProperty.
163
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
164
- * @param {GroupPropertyCreate} groupProperty Request body.
165
- * @memberof IMappingClient
166
- * @see https://developer.bentley.com/apis/insights/operations/create-groupproperty/
167
- */
168
- createGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, groupProperty: GroupPropertyCreate): Promise<GroupPropertySingle>;
169
- /**
170
- * Updates a GroupProperty for a Group.
171
- *
172
- * @summary Update GroupProperty.
173
- * @param {string} iModelId The iModel Id.
174
- * @param {string} mappingId The Mapping Id.
175
- * @param {string} groupId The Group Id.
176
- * @param {string} propertyId Id of the GroupProperty to be updated.
177
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
178
- * @param {GroupPropertyUpdate} groupProperty Request body.
179
- * @memberof IMappingClient
180
- * @see https://developer.bentley.com/apis/insights/operations/update-groupproperty/
181
- */
182
- updateGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, groupPropertyId: string, groupProperty: GroupPropertyUpdate): Promise<GroupPropertySingle>;
183
- /**
184
- * Deletes a GroupProperty from a Group.
185
- *
186
- * @summary Delete GroupProperty.
187
- * @param {string} iModelId The iModel Id.
188
- * @param {string} mappingId The Mapping Id.
189
- * @param {string} groupId The Group Id.
190
- * @param {string} groupPropertyId Id of the GroupProperty to be deleted.
191
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
192
- * @memberof IMappingClient
193
- * @see https://developer.bentley.com/apis/insights/operations/delete-groupproperty/
194
- */
195
- deleteGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, groupPropertyId: string): Promise<Response>;
196
- /**
197
- * Gets all CalculatedProperties for a Group.
198
- *
199
- * @summary Get CalculatedProperties.
200
- * @param {string} iModelId The iModel Id.
201
- * @param {string} mappingId The Mapping Id.
202
- * @param {string} groupId The Group Id.
203
- * @param {string} accessToken OAuth access token with scope `insights:read`.
204
- * @memberof IMappingClient
205
- * @see https://developer.bentley.com/apis/insights/operations/get-calculatedproperties/
206
- */
207
- getCalculatedProperties(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<CalculatedProperty[]>;
208
- /**
209
- * Gets a CalculatedProperty for a Group.
210
- *
211
- * @summary Get CalculatedProperty.
212
- * @param {string} iModelId The iModel Id.
213
- * @param {string} mappingId The Mapping Id.
214
- * @param {string} groupId The Group Id.
215
- * @param {string} propertyId The CalculatedProperty Id.
216
- * @param {string} accessToken OAuth access token with scope `insights:read`.
217
- * @memberof IMappingClient
218
- * @see https://developer.bentley.com/apis/insights/operations/get-calculatedproperty/
219
- */
220
- getCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<CalculatedPropertySingle>;
221
- /**
222
- * Creates a CalculatedProperty for a Group.
223
- *
224
- * @summary Create CalculatedProperty.
225
- * @param {string} iModelId The iModel Id.
226
- * @param {string} mappingId The Mapping Id.
227
- * @param {string} groupId Id of the Group for which to create a new CalculatedProperty.
228
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
229
- * @param {CalculatedPropertyCreate} property Request body.
230
- * @memberof IMappingClient
231
- * @see https://developer.bentley.com/apis/insights/operations/create-calculatedproperty/
232
- */
233
- createCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, property: CalculatedPropertyCreate): Promise<CalculatedPropertySingle>;
234
- /**
235
- * Updates a CalculatedProperty for a Group.
236
- *
237
- * @summary Update CalculatedProperty.
238
- * @param {string} iModelId The iModel Id.
239
- * @param {string} mappingId The Mapping Id.
240
- * @param {string} groupId The Group Id.
241
- * @param {string} propertyId Id of the CalculatedProperty to be updated.
242
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
243
- * @param {CalculatedPropertyUpdate} property Request body.
244
- * @memberof IMappingClient
245
- * @see https://developer.bentley.com/apis/insights/operations/update-calculatedproperty/
246
- */
247
- updateCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string, property: CalculatedPropertyUpdate): Promise<CalculatedPropertySingle>;
248
- /**
249
- * Deletes a CalculatedProperty from a Group.
250
- *
251
- * @summary Delete CalculatedProperty.
252
- * @param {string} iModelId The iModel Id.
253
- * @param {string} mappingId The Mapping Id.
254
- * @param {string} groupId The Group Id.
255
- * @param {string} propertyId Id of the CalculatedProperty to be deleted.
256
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
257
- * @memberof IMappingClient
258
- * @see https://developer.bentley.com/apis/insights/operations/delete-calculatedproperty/
259
- */
260
- deleteCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<Response>;
261
- /**
262
- * Gets all CustomCalculations for a Group.
263
- *
264
- * @summary Get CustomCalculations.
265
- * @param {string} iModelId The iModel Id.
266
- * @param {string} mappingId The Mapping Id.
267
- * @param {string} groupId The Group Id.
268
- * @param {string} accessToken OAuth access token with scope `insights:read`.
269
- * @memberof IMappingClient
270
- * @see https://developer.bentley.com/apis/insights/operations/get-customcalculations/
271
- */
272
- getCustomCalculations(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<CustomCalculation[]>;
273
- /**
274
- * Gets a CustomCalculation for a Group.
275
- *
276
- * @summary Get CustomCalculation.
277
- * @param {string} iModelId The iModel Id.
278
- * @param {string} mappingId The Mapping Id.
279
- * @param {string} groupId The Group Id.
280
- * @param {string} propertyId The CustomCalculation Id.
281
- * @param {string} accessToken OAuth access token with scope `insights:read`.
282
- * @memberof IMappingClient
283
- * @see https://developer.bentley.com/apis/insights/operations/get-customcalculation/
284
- */
285
- getCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<CustomCalculationSingle>;
286
- /**
287
- * Creates a CustomCalculation for a Group.
288
- *
289
- * @summary Create CustomCalculation.
290
- * @param {string} iModelId The iModel Id.
291
- * @param {string} mappingId The Mapping Id.
292
- * @param {string} groupId Id of the Group for which to create a new CustomCalculation.
293
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
294
- * @param {CustomCalculationCreate} property Request body.
295
- * @memberof IMappingClient
296
- * @see https://developer.bentley.com/apis/insights/operations/create-customcalculation/
297
- */
298
- createCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, property: CustomCalculationCreate): Promise<CustomCalculationSingle>;
299
- /**
300
- * Updates a CustomCalculation for a Group.
301
- *
302
- * @summary Update CustomCalculation.
303
- * @param {string} iModelId The iModel Id.
304
- * @param {string} mappingId The Mapping Id.
305
- * @param {string} groupId The Group Id.
306
- * @param {string} propertyId Id of the CustomCalculation to be updated.
307
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
308
- * @param {CustomCalculationUpdate} property Request body.
309
- * @memberof IMappingClient
310
- * @see https://developer.bentley.com/apis/insights/operations/update-customcalculation/
311
- */
312
- updateCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string, property: CustomCalculationUpdate): Promise<CustomCalculationSingle>;
313
- /**
314
- * Deletes a CustomCalculation from a Group.
315
- *
316
- * @summary Delete CustomCalculation.
317
- * @param {string} iModelId The iModel Id.
318
- * @param {string} mappingId The Mapping Id.
319
- * @param {string} groupId The Group Id.
320
- * @param {string} propertyId Id of the CustomCalculation to be deleted.
321
- * @param {string} accessToken OAuth access token with scope `insights:modify`.
322
- * @memberof IMappingClient
323
- * @see https://developer.bentley.com/apis/insights/operations/delete-customcalculation/
324
- */
325
- deleteCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<Response>;
326
- }
327
- //# sourceMappingURL=IMappingClient.d.ts.map
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- //# sourceMappingURL=IMappingClient.js.map