@itwin/grouping-mapping-widget 0.32.0 → 0.34.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 (63) hide show
  1. package/lib/cjs/WidgetShell/GroupingMapping.d.ts +1 -0
  2. package/lib/cjs/WidgetShell/GroupingMapping.js +1 -1
  3. package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -1
  4. package/lib/cjs/WidgetShell/GroupingMappingContent.d.ts +2 -1
  5. package/lib/cjs/WidgetShell/GroupingMappingContent.js +2 -2
  6. package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -1
  7. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.d.ts +2 -1
  8. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +2 -2
  9. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  10. package/lib/cjs/components/Groups/Groups.d.ts +2 -1
  11. package/lib/cjs/components/Groups/Groups.js +2 -2
  12. package/lib/cjs/components/Groups/Groups.js.map +1 -1
  13. package/lib/cjs/components/Groups/GroupsView.d.ts +2 -1
  14. package/lib/cjs/components/Groups/GroupsView.js +4 -3
  15. package/lib/cjs/components/Groups/GroupsView.js.map +1 -1
  16. package/lib/cjs/components/Groups/GroupsVisualization.d.ts +1 -2
  17. package/lib/cjs/components/Groups/GroupsVisualization.js +2 -2
  18. package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
  19. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.d.ts +7 -3
  20. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js +41 -12
  21. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  22. package/lib/cjs/components/Properties/PropertyAction.js +7 -2
  23. package/lib/cjs/components/Properties/PropertyAction.js.map +1 -1
  24. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +1 -1
  25. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  26. package/lib/cjs/test/QueryBuilder.test.js +17 -6
  27. package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
  28. package/lib/cjs/test/QueryBuilder.testdata.js +46 -0
  29. package/lib/cjs/test/QueryBuilder.testdata.js.map +1 -1
  30. package/lib/cjs/test/QueryBuilderTestData.d.ts +2 -2
  31. package/lib/cjs/test/QueryBuilderTestData.js.map +1 -1
  32. package/lib/esm/WidgetShell/GroupingMapping.d.ts +1 -0
  33. package/lib/esm/WidgetShell/GroupingMapping.js +1 -1
  34. package/lib/esm/WidgetShell/GroupingMapping.js.map +1 -1
  35. package/lib/esm/WidgetShell/GroupingMappingContent.d.ts +2 -1
  36. package/lib/esm/WidgetShell/GroupingMappingContent.js +2 -2
  37. package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -1
  38. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.d.ts +2 -1
  39. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +2 -2
  40. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  41. package/lib/esm/components/Groups/Groups.d.ts +2 -1
  42. package/lib/esm/components/Groups/Groups.js +2 -2
  43. package/lib/esm/components/Groups/Groups.js.map +1 -1
  44. package/lib/esm/components/Groups/GroupsView.d.ts +2 -1
  45. package/lib/esm/components/Groups/GroupsView.js +4 -3
  46. package/lib/esm/components/Groups/GroupsView.js.map +1 -1
  47. package/lib/esm/components/Groups/GroupsVisualization.d.ts +1 -2
  48. package/lib/esm/components/Groups/GroupsVisualization.js +2 -2
  49. package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
  50. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.d.ts +7 -3
  51. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js +41 -12
  52. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  53. package/lib/esm/components/Properties/PropertyAction.js +7 -2
  54. package/lib/esm/components/Properties/PropertyAction.js.map +1 -1
  55. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +1 -1
  56. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  57. package/lib/esm/test/QueryBuilder.test.js +17 -6
  58. package/lib/esm/test/QueryBuilder.test.js.map +1 -1
  59. package/lib/esm/test/QueryBuilder.testdata.js +46 -0
  60. package/lib/esm/test/QueryBuilder.testdata.js.map +1 -1
  61. package/lib/esm/test/QueryBuilderTestData.d.ts +2 -2
  62. package/lib/esm/test/QueryBuilderTestData.js.map +1 -1
  63. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyAction.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyAction.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,uBAAuB,CAAC;AAO/B,MAAM,oBAAoB,GAAG,CAAC,QAAwB,EAAE,mBAAqC,EAAE,YAAsC,EAAE,EAAE;IACvI,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElE,MAAM,yBAAyB,GAAG,WAAW,CAC3C,CAAC,QAAwB,EAAW,EAAE;QACpC,IAAI,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,SAAS,EAAE;YAChE,OAAO,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;SAC/C;QAED,IAAI,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,KAAK,EAAE;YAC5D,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,M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AAS,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,CACrG,oBAAC,QAAQ,IAAC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,0BAA0B,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,GAAI,CACpI,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, { useCallback, useEffect, useState } from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { usePropertyGridWrapper } from \"../context/PropertyGridWrapperContext\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport \"./PropertyAction.scss\";\nimport type { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\n\nexport interface PropertyActionProps {\n property: PropertyRecord;\n}\n\nconst usePropertySelection = (property: PropertyRecord, currentPropertyList: PropertyRecord[], queryBuilder: QueryBuilder | undefined) => {\n const [isCheckboxLoading, setIsCheckboxLoading] = useState(false);\n\n const checkIfPropertyIsSelected = useCallback(\n (property: PropertyRecord): boolean => {\n if (property.value.valueFormat === PropertyValueFormat.Primitive) {\n return currentPropertyList.includes(property);\n }\n\n if (property.value.valueFormat === PropertyValueFormat.Array) {\n return property.value.items.length === 0 && currentPropertyList.includes(property);\n }\n return Object.values(property.value.members).every((subProp: PropertyRecord) => checkIfPropertyIsSelected(subProp));\n },\n [currentPropertyList],\n );\n\n const isPropertySelected = checkIfPropertyIsSelected(property);\n\n const addProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (prop.value.valueFormat === PropertyValueFormat.Primitive && !currentPropertyList.includes(prop) && (await queryBuilder?.addProperty(prop))) {\n setIsCheckboxLoading(false);\n return true;\n }\n return false;\n },\n [currentPropertyList, queryBuilder],\n );\n\n const removeProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (currentPropertyList.includes(prop)) {\n await queryBuilder?.removeProperty(prop);\n setIsCheckboxLoading(false);\n }\n },\n [currentPropertyList, queryBuilder],\n );\n\n return {\n isPropertySelected,\n addProperty,\n removeProperty,\n isCheckboxLoading,\n setIsCheckboxLoading,\n };\n};\n\nexport const PropertyAction = ({ property }: PropertyActionProps) => {\n const { currentPropertyList, queryBuilder, setCurrentPropertyList, setQuery, isUpdating } = usePropertyGridWrapper();\n\n const { isPropertySelected, addProperty, removeProperty, isCheckboxLoading, setIsCheckboxLoading } = usePropertySelection(\n property,\n currentPropertyList,\n queryBuilder,\n );\n\n useEffect(() => {\n setIsCheckboxLoading(isPropertySelected && isUpdating);\n }, [isPropertySelected, isUpdating, setIsCheckboxLoading]);\n\n const onPropertySelectionChanged = useCallback(async () => {\n if (isPropertySelected) {\n await removeProperty(property);\n setCurrentPropertyList((prevList) => prevList.filter((x) => x !== property));\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n } else {\n if (await addProperty(property)) {\n setCurrentPropertyList((prevList) => prevList.concat(property));\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n }\n }\n }, [addProperty, isPropertySelected, property, removeProperty, queryBuilder, setCurrentPropertyList, setQuery]);\n\n return (\n <div className=\"gmw-property-selection-checkbox\">\n {property.value.valueFormat === PropertyValueFormat.Primitive && property.value.value !== undefined && (\n <Checkbox checked={isPropertySelected} onChange={onPropertySelectionChanged} disabled={isUpdating} isLoading={isCheckboxLoading} />\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"PropertyAction.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyAction.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,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AC;IAE3D,MAAM,0BAA0B,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACxD,IAAI,kBAAkB,EAAE;YACtB,MAAM,cAAc,CAAC,QAAQ,CAAC,CAAC;YAC/B,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC7E,QAAQ,CAAC,MAAM,YAAY,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;SACxD;aAAM;YACL,IAAI,MAAM,WAAW,CAAC,QAAQ,CAAC,EAAE;gBAC/B,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAChE,QAAQ,CAAC,MAAM,YAAY,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;aACxD;SACF;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEhH,OAAO,CACL,6BAAK,SAAS,EAAC,iCAAiC,IAC7C,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,CACrG,oBAAC,QAAQ,IAAC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,0BAA0B,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,GAAI,CACpI,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, { useCallback, useEffect, useState } from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { usePropertyGridWrapper } from \"../context/PropertyGridWrapperContext\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport \"./PropertyAction.scss\";\nimport type { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\n\nexport interface PropertyActionProps {\n property: PropertyRecord;\n}\n\nconst usePropertySelection = (property: PropertyRecord, currentPropertyList: PropertyRecord[], queryBuilder: QueryBuilder | undefined) => {\n const [isCheckboxLoading, setIsCheckboxLoading] = useState(false);\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This hook requires an active iModelConnection.\");\n }\n\n const checkIfPropertyIsSelected = useCallback(\n (property: PropertyRecord): boolean => {\n if (property.value.valueFormat === PropertyValueFormat.Primitive) {\n return currentPropertyList.includes(property);\n }\n\n if (property.value.valueFormat === PropertyValueFormat.Array) {\n return property.value.items.length === 0 && currentPropertyList.includes(property);\n }\n return Object.values(property.value.members).every((subProp: PropertyRecord) => checkIfPropertyIsSelected(subProp));\n },\n [currentPropertyList],\n );\n\n const isPropertySelected = checkIfPropertyIsSelected(property);\n\n const addProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (prop.value.valueFormat === PropertyValueFormat.Primitive && !currentPropertyList.includes(prop) && (await queryBuilder?.addProperty(prop))) {\n setIsCheckboxLoading(false);\n return true;\n }\n return false;\n },\n [currentPropertyList, queryBuilder],\n );\n\n const removeProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (currentPropertyList.includes(prop)) {\n await queryBuilder?.removeProperty(prop);\n setIsCheckboxLoading(false);\n }\n },\n [currentPropertyList, queryBuilder],\n );\n\n return {\n isPropertySelected,\n addProperty,\n removeProperty,\n isCheckboxLoading,\n setIsCheckboxLoading,\n };\n};\n\nexport const PropertyAction = ({ property }: PropertyActionProps) => {\n const { currentPropertyList, queryBuilder, setCurrentPropertyList, setQuery, isUpdating } = usePropertyGridWrapper();\n\n const { isPropertySelected, addProperty, removeProperty, isCheckboxLoading, setIsCheckboxLoading } = usePropertySelection(\n property,\n currentPropertyList,\n queryBuilder,\n );\n\n useEffect(() => {\n setIsCheckboxLoading(isPropertySelected && isUpdating);\n }, [isPropertySelected, isUpdating, setIsCheckboxLoading]);\n\n const onPropertySelectionChanged = useCallback(async () => {\n if (isPropertySelected) {\n await removeProperty(property);\n setCurrentPropertyList((prevList) => prevList.filter((x) => x !== property));\n setQuery(await queryBuilder?.buildQueryString() ?? \"\");\n } else {\n if (await addProperty(property)) {\n setCurrentPropertyList((prevList) => prevList.concat(property));\n setQuery(await queryBuilder?.buildQueryString() ?? \"\");\n }\n }\n }, [addProperty, isPropertySelected, property, removeProperty, queryBuilder, setCurrentPropertyList, setQuery]);\n\n return (\n <div className=\"gmw-property-selection-checkbox\">\n {property.value.valueFormat === PropertyValueFormat.Primitive && property.value.value !== undefined && (\n <Checkbox checked={isPropertySelected} onChange={onPropertySelectionChanged} disabled={isUpdating} isLoading={isCheckboxLoading} />\n )}\n </div>\n );\n};\n"]}
@@ -50,7 +50,7 @@ export const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView }
50
50
  setSelectionKeyset(keys);
51
51
  const dataProvider = await createPropertyDataProvider(keys, iModelConnection);
52
52
  setDataProvider(dataProvider);
53
- setQueryBuilder(new QueryBuilder(dataProvider));
53
+ setQueryBuilder(new QueryBuilder(dataProvider, iModelConnection));
54
54
  };
55
55
  return iModelConnection ? Presentation.selection.selectionChange.addListener(onSelectionChanged) : () => { };
56
56
  }, [iModelConnection]);
@@ -1 +1 @@
1
- {"version":3,"file":"GroupQueryBuilderCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupQueryBuilderCustomUI.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,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AC,YAAY,IAAI,eAAe,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAC7C,oBAAC,KAAK,IAAC,IAAI,EAAC,eAAe,6GAA+G,CAC3I,CAAC,CAAC,CAAC,CACF;QACE,6BAAK,SAAS,EAAC,oCAAoC;YACjD,oBAAC,0BAA0B,IAAC,QAAQ,EAAE,MAAM,GAAI;YAChD,oBAAC,0BAA0B,CAAC,QAAQ,IAAC,KAAK,EAAE,qBAAqB;gBAC/D,oBAAC,uCAAuC,IACtC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,qBAAqB,EAAE,qBAAqB,GAC5C,CACkC,CAClC;QACN,6BAAK,SAAS,EAAC,yBAAyB;YACtC,oBAAC,MAAM,IAAC,SAAS,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,kBAAkB,YAE3D,CACL,CACL,CACJ,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, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport type { ISelectionProvider, SelectionChangeEventArgs } from \"@itwin/presentation-frontend\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport \"./GroupQueryBuilderCustomUI.scss\";\nimport { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport { DEFAULT_PROPERTY_GRID_RULESET, PresentationPropertyDataProvider } from \"@itwin/presentation-components\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { ActionButtonRendererProps } from \"@itwin/components-react\";\nimport { VirtualizedPropertyGridWithDataProvider } from \"@itwin/components-react\";\nimport { ResizableContainerObserver } from \"@itwin/core-react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyGridWrapperContext } from \"../context/PropertyGridWrapperContext\";\nimport { PropertyAction } from \"../Properties/PropertyAction\";\nimport { Alert, Button } from \"@itwin/itwinui-react\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport { IModelApp } from \"@itwin/core-frontend\";\n\nconst createPropertyDataProvider = async (keys: KeySet, iModelConnection: IModelConnection): Promise<PresentationPropertyDataProvider> => {\n const dataProvider = new PresentationPropertyDataProvider({\n imodel: iModelConnection,\n ruleset: DEFAULT_PROPERTY_GRID_RULESET,\n });\n dataProvider.keys = keys;\n dataProvider.isNestedPropertyCategoryGroupingEnabled = true;\n const data = await dataProvider.getData();\n const selectedCategory = data.categories.find(\n (category) => category.label === IModelApp.localization.getLocalizedString(\"Presentation:selectedItems.categoryLabel\"),\n );\n if (selectedCategory) {\n selectedCategory.expand = true;\n }\n return dataProvider;\n};\n\ninterface ContainerDimensions {\n width: number;\n height: number;\n}\n\n/**\n * A default group query builder for the Grouping Mapping Widget that uses the property grid to generate queries.\n * @public\n */\nexport const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView }: GroupingCustomUIProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const [size, setSize] = useState<ContainerDimensions>({ width: 0, height: 0 });\n const [dataProvider, setDataProvider] = useState<PresentationPropertyDataProvider | undefined>(undefined);\n const [currentPropertyList, setCurrentPropertyList] = useState<PropertyRecord[]>([]);\n const [selectionKeySet, setSelectionKeyset] = useState<KeySet>(new KeySet());\n const [queryBuilder, setQueryBuilder] = useState<QueryBuilder | undefined>();\n\n useEffect(() => {\n const onSelectionChanged = async (evt: SelectionChangeEventArgs, selectionProvider: ISelectionProvider) => {\n const selection = selectionProvider.getSelection(evt.imodel, evt.level);\n const keys = new KeySet(selection);\n setSelectionKeyset(keys);\n const dataProvider = await createPropertyDataProvider(keys, iModelConnection);\n setDataProvider(dataProvider);\n setQueryBuilder(new QueryBuilder(dataProvider));\n };\n\n return iModelConnection ? Presentation.selection.selectionChange.addListener(onSelectionChanged) : () => {};\n }, [iModelConnection]);\n\n const onClickResetButton = async () => {\n queryBuilder?.resetQueryBuilder();\n updateQuery(\"\");\n setCurrentPropertyList([]);\n if (resetView)\n await resetView().catch((e) =>\n /* eslint-disable no-console */\n console.error(e),\n );\n };\n\n const resize = useCallback((width, height) => setSize({ width, height }), []);\n\n const propertyContextValues = useMemo(\n () => ({\n currentPropertyList,\n setCurrentPropertyList,\n queryBuilder,\n setQuery: updateQuery,\n isUpdating: isUpdating ?? false,\n }),\n [currentPropertyList, isUpdating, queryBuilder, updateQuery],\n );\n\n const actionButtonRenderers = useMemo(() => [({ property }: ActionButtonRendererProps) => <PropertyAction property={property} />], []);\n\n return (\n <div className=\"gmw-select-query-generator-container\">\n {!dataProvider || selectionKeySet.size === 0 ? (\n <Alert type=\"informational\">Please select on an element within the viewer first, then select properties to generate a group query.</Alert>\n ) : (\n <>\n <div className=\"gmw-select-property-grid-container\">\n <ResizableContainerObserver onResize={resize} />\n <PropertyGridWrapperContext.Provider value={propertyContextValues}>\n <VirtualizedPropertyGridWithDataProvider\n dataProvider={dataProvider}\n width={size.width}\n height={size.height}\n actionButtonRenderers={actionButtonRenderers}\n />\n </PropertyGridWrapperContext.Provider>\n </div>\n <div className=\"gmw-select-reset-button\">\n <Button styleType=\"default\" size=\"small\" onClick={onClickResetButton}>\n Reset\n </Button>\n </div>\n </>\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"GroupQueryBuilderCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupQueryBuilderCustomUI.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO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eAAe,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAC7C,oBAAC,KAAK,IAAC,IAAI,EAAC,eAAe,6GAA+G,CAC3I,CAAC,CAAC,CAAC,CACF;QACE,6BAAK,SAAS,EAAC,oCAAoC;YACjD,oBAAC,0BAA0B,IAAC,QAAQ,EAAE,MAAM,GAAI;YAChD,oBAAC,0BAA0B,CAAC,QAAQ,IAAC,KAAK,EAAE,qBAAqB;gBAC/D,oBAAC,uCAAuC,IACtC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,qBAAqB,EAAE,qBAAqB,GAC5C,CACkC,CAClC;QACN,6BAAK,SAAS,EAAC,yBAAyB;YACtC,oBAAC,MAAM,IAAC,SAAS,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,kBAAkB,YAE3D,CACL,CACL,CACJ,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, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport type { ISelectionProvider, SelectionChangeEventArgs } from \"@itwin/presentation-frontend\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport \"./GroupQueryBuilderCustomUI.scss\";\nimport { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport { DEFAULT_PROPERTY_GRID_RULESET, PresentationPropertyDataProvider } from \"@itwin/presentation-components\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { ActionButtonRendererProps } from \"@itwin/components-react\";\nimport { VirtualizedPropertyGridWithDataProvider } from \"@itwin/components-react\";\nimport { ResizableContainerObserver } from \"@itwin/core-react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyGridWrapperContext } from \"../context/PropertyGridWrapperContext\";\nimport { PropertyAction } from \"../Properties/PropertyAction\";\nimport { Alert, Button } from \"@itwin/itwinui-react\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport { IModelApp } from \"@itwin/core-frontend\";\n\nconst createPropertyDataProvider = async (keys: KeySet, iModelConnection: IModelConnection): Promise<PresentationPropertyDataProvider> => {\n const dataProvider = new PresentationPropertyDataProvider({\n imodel: iModelConnection,\n ruleset: DEFAULT_PROPERTY_GRID_RULESET,\n });\n dataProvider.keys = keys;\n dataProvider.isNestedPropertyCategoryGroupingEnabled = true;\n const data = await dataProvider.getData();\n const selectedCategory = data.categories.find(\n (category) => category.label === IModelApp.localization.getLocalizedString(\"Presentation:selectedItems.categoryLabel\"),\n );\n if (selectedCategory) {\n selectedCategory.expand = true;\n }\n return dataProvider;\n};\n\ninterface ContainerDimensions {\n width: number;\n height: number;\n}\n\n/**\n * A default group query builder for the Grouping Mapping Widget that uses the property grid to generate queries.\n * @public\n */\nexport const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView }: GroupingCustomUIProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const [size, setSize] = useState<ContainerDimensions>({ width: 0, height: 0 });\n const [dataProvider, setDataProvider] = useState<PresentationPropertyDataProvider | undefined>(undefined);\n const [currentPropertyList, setCurrentPropertyList] = useState<PropertyRecord[]>([]);\n const [selectionKeySet, setSelectionKeyset] = useState<KeySet>(new KeySet());\n const [queryBuilder, setQueryBuilder] = useState<QueryBuilder | undefined>();\n\n useEffect(() => {\n const onSelectionChanged = async (evt: SelectionChangeEventArgs, selectionProvider: ISelectionProvider) => {\n const selection = selectionProvider.getSelection(evt.imodel, evt.level);\n const keys = new KeySet(selection);\n setSelectionKeyset(keys);\n const dataProvider = await createPropertyDataProvider(keys, iModelConnection);\n setDataProvider(dataProvider);\n setQueryBuilder(new QueryBuilder(dataProvider, iModelConnection));\n };\n\n return iModelConnection ? Presentation.selection.selectionChange.addListener(onSelectionChanged) : () => {};\n }, [iModelConnection]);\n\n const onClickResetButton = async () => {\n queryBuilder?.resetQueryBuilder();\n updateQuery(\"\");\n setCurrentPropertyList([]);\n if (resetView)\n await resetView().catch((e) =>\n /* eslint-disable no-console */\n console.error(e),\n );\n };\n\n const resize = useCallback((width, height) => setSize({ width, height }), []);\n\n const propertyContextValues = useMemo(\n () => ({\n currentPropertyList,\n setCurrentPropertyList,\n queryBuilder,\n setQuery: updateQuery,\n isUpdating: isUpdating ?? false,\n }),\n [currentPropertyList, isUpdating, queryBuilder, updateQuery],\n );\n\n const actionButtonRenderers = useMemo(() => [({ property }: ActionButtonRendererProps) => <PropertyAction property={property} />], []);\n\n return (\n <div className=\"gmw-select-query-generator-container\">\n {!dataProvider || selectionKeySet.size === 0 ? (\n <Alert type=\"informational\">Please select on an element within the viewer first, then select properties to generate a group query.</Alert>\n ) : (\n <>\n <div className=\"gmw-select-property-grid-container\">\n <ResizableContainerObserver onResize={resize} />\n <PropertyGridWrapperContext.Provider value={propertyContextValues}>\n <VirtualizedPropertyGridWithDataProvider\n dataProvider={dataProvider}\n width={size.width}\n height={size.height}\n actionButtonRenderers={actionButtonRenderers}\n />\n </PropertyGridWrapperContext.Provider>\n </div>\n <div className=\"gmw-select-reset-button\">\n <Button styleType=\"default\" size=\"small\" onClick={onClickResetButton}>\n Reset\n </Button>\n </div>\n </>\n )}\n </div>\n );\n};\n"]}
@@ -1,7 +1,3 @@
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
1
  import { PropertyRecord } from "@itwin/appui-abstract";
6
2
  import { FieldDescriptorType, PropertiesField } from "@itwin/presentation-common";
7
3
  import { PresentationPropertyDataProvider } from "@itwin/presentation-components";
@@ -15,7 +11,22 @@ describe("QueryBuilder", () => {
15
11
  beforeEach(() => {
16
12
  dataProvider = MockFactory.create(PresentationPropertyDataProvider);
17
13
  MockFactory.stubProperty(dataProvider, "getContentDescriptor", () => () => true);
18
- sut = new QueryBuilder(dataProvider);
14
+ const imodel = {
15
+ createQueryReader: (query) => {
16
+ if (query.includes("SELECT ec_classname(ecclassid) FROM biscore.element WHERE ecinstanceid = ?")) {
17
+ return {
18
+ next: async () => {
19
+ return {
20
+ value: ["mockModeledElement"],
21
+ done: true,
22
+ };
23
+ },
24
+ };
25
+ }
26
+ return '';
27
+ }
28
+ };
29
+ sut = new QueryBuilder(dataProvider, imodel);
19
30
  });
20
31
  afterEach(() => {
21
32
  dataProvider.getFieldByPropertyRecord.restore();
@@ -71,7 +82,7 @@ describe("QueryBuilder", () => {
71
82
  await queryBuilder.removeProperty(prop);
72
83
  }
73
84
  }
74
- const result = queryBuilder.buildQueryString();
85
+ const result = await queryBuilder.buildQueryString();
75
86
  assert.strictEqual(result, expectedResult);
76
87
  };
77
88
  });
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilder.test.js","sourceRoot":"","sources":["../../../src/test/QueryBuilder.test.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,QAAQ,CAAC,cAAc,EAAE,GAAG,EAA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AM,WAAW,GAAG,KAAK,EAAE,YAA0B,EAAE,cAAsB,EAAE,UAA+B,EAAE,EAAE;QAChH,KAAK,MAAM,EAAE,IAAI,UAAU,EAAE;YAC3B,MAAM,eAAe,GAAG,qBAAqB,CAC3C,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,kBAAkB,EAC7C,EAAE,CAAC,eAAe,CAAC,UAAU,EAC7B,EAAE,CAAC,mBAAmB,EACtB,EAAE,CAAC,mBAAmB,CACvB,CAAC;YAEF,MAAM,IAAI,GAAG,oBAAoB,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC,eAAkC,EAAE,eAAe,CAAC,CAAC;YAE7G,IAAI,EAAE,CAAC,aAAa,KAAK,aAAa,EAAE;gBACtC,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBACpD,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC;aAC/C;YACD,IAAI,EAAE,CAAC,aAAa,KAAK,gBAAgB,EAAE;gBACzC,MAAM,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;aACzC;SACF;QAED,MAAM,MAAM,GAAG,YAAY,CAAC,gBAAgB,EAAE,CAAC;QAC/C,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC,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 { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { FieldDescriptorType, PropertiesField } from \"@itwin/presentation-common\";\nimport type { FieldDescriptor, RelationshipPath, StrippedRelatedClassInfo } from \"@itwin/presentation-common\";\nimport { PresentationPropertyDataProvider } from \"@itwin/presentation-components\";\nimport { assert } from \"chai\";\nimport { QueryBuilder } from \"../components/Groups/QueryBuilder/QueryBuilder\";\nimport { MockFactory } from \"./MockFactory\";\nimport type { StubbedType } from \"./MockFactory\";\nimport type { OperationTestData, PropertiesTestData, PropertyRecordTestData, QueryBuilderTestData } from \"./QueryBuilderTestData\";\nimport { testCases } from \"./QueryBuilder.testdata\";\n\ndescribe(\"QueryBuilder\", () => {\n let sut: QueryBuilder;\n let dataProvider: StubbedType<PresentationPropertyDataProvider>;\n\n beforeEach(() => {\n dataProvider = MockFactory.create(PresentationPropertyDataProvider);\n MockFactory.stubProperty(dataProvider, \"getContentDescriptor\", () => () => true);\n\n sut = new QueryBuilder(dataProvider);\n });\n\n afterEach(() => {\n dataProvider.getFieldByPropertyRecord.restore();\n });\n\n const testData: QueryBuilderTestData = testCases;\n testData.testCases.forEach((testCase) => {\n it(testCase.name, async () => executeTest(sut, testCase.expectedResult, testCase.operations));\n });\n\n const createFieldDescriptor = (\n pathToClass: RelationshipPath | undefined,\n fieldProperties: PropertiesTestData[],\n type: FieldDescriptorType,\n fieldName: string | undefined,\n ): FieldDescriptor => {\n switch (type) {\n case FieldDescriptorType.Properties:\n const pathFromSelectToPropertyClass: StrippedRelatedClassInfo[] = (pathToClass ?? []).map((x) => ({\n sourceClassName: x.sourceClassInfo.name,\n targetClassName: x.targetClassInfo.name,\n relationshipName: x.relationshipInfo.name,\n isForwardRelationship: x.isForwardRelationship,\n }));\n\n const properties = fieldProperties.map((x) => ({\n class: x.property.classInfo.name,\n name: x.property.name,\n }));\n\n return {\n pathFromSelectToPropertyClass,\n properties,\n type,\n };\n case FieldDescriptorType.Name:\n return {\n type,\n fieldName: fieldName ?? \"\",\n };\n }\n };\n\n const createPropertyRecord = (propertyRecord: PropertyRecordTestData, propertiesField: PropertiesField, fieldDescriptor: FieldDescriptor) => {\n const propertiesFieldMock: StubbedType<PropertiesField> = MockFactory.create(PropertiesField);\n\n MockFactory.stubProperty(propertiesFieldMock, \"parent\", () => propertiesField.parent);\n MockFactory.stubProperty(propertiesFieldMock, \"properties\", () => propertiesField.properties);\n MockFactory.stubProperty(propertiesFieldMock, \"type\", () => propertiesField.type);\n MockFactory.stubProperty(propertiesFieldMock, \"getFieldDescriptor\", () => () => fieldDescriptor);\n\n const prop: PropertyRecord = new PropertyRecord(propertyRecord.value, propertyRecord.property);\n dataProvider.getFieldByPropertyRecord.withArgs(prop).resolves(propertiesFieldMock);\n return prop;\n };\n\n const executeTest = async (queryBuilder: QueryBuilder, expectedResult: string, operations: OperationTestData[]) => {\n for (const op of operations) {\n const fieldDescriptor = createFieldDescriptor(\n op.propertiesField.parent?.pathToPrimaryClass,\n op.propertiesField.properties,\n op.fieldDescriptorType,\n op.fieldDescriptorName,\n );\n\n const prop = createPropertyRecord(op.propertyRecord, op.propertiesField as PropertiesField, fieldDescriptor);\n\n if (op.operationType === \"addProperty\") {\n const result = await queryBuilder.addProperty(prop);\n assert.strictEqual(result, op.expectedResult);\n }\n if (op.operationType === \"removeProperty\") {\n await queryBuilder.removeProperty(prop);\n }\n }\n\n const result = queryBuilder.buildQueryString();\n assert.strictEqual(result, expectedResult);\n };\n});\n"]}
1
+ {"version":3,"file":"QueryBuilder.test.js","sourceRoot":"","sources":["../../../src/test/QueryBuilder.test.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIpD,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,GAAiB,CAAC;IACtB,IAAI,YAA2D,CAAC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\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { PropertyValue } from \"@itwin/appui-abstract\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { FieldDescriptorType, PropertiesField } from \"@itwin/presentation-common\";\nimport type { FieldDescriptor, RelationshipPath, StrippedRelatedClassInfo } from \"@itwin/presentation-common\";\nimport { PresentationPropertyDataProvider } from \"@itwin/presentation-components\";\nimport { assert } from \"chai\";\nimport { QueryBuilder } from \"../components/Groups/QueryBuilder/QueryBuilder\";\nimport { MockFactory } from \"./MockFactory\";\nimport type { StubbedType } from \"./MockFactory\";\nimport type { OperationTestData, PropertiesTestData, PropertyRecordTestData, QueryBuilderTestData } from \"./QueryBuilderTestData\";\nimport { testCases } from \"./QueryBuilder.testdata\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { ECSqlReader } from \"@itwin/core-common\";\n\ndescribe(\"QueryBuilder\", () => {\n let sut: QueryBuilder;\n let dataProvider: StubbedType<PresentationPropertyDataProvider>;\n\n beforeEach(() => {\n dataProvider = MockFactory.create(PresentationPropertyDataProvider);\n MockFactory.stubProperty(dataProvider, \"getContentDescriptor\", () => () => true);\n const imodel = {\n createQueryReader: (query) => {\n if (query.includes(\"SELECT ec_classname(ecclassid) FROM biscore.element WHERE ecinstanceid = ?\")) {\n return {\n next: async () => {\n return {\n value: [\"mockModeledElement\"],\n done: true,\n };\n },\n } as ECSqlReader;\n }\n return '';\n }\n } as IModelConnection;\n\n sut = new QueryBuilder(dataProvider, imodel);\n });\n\n afterEach(() => {\n dataProvider.getFieldByPropertyRecord.restore();\n });\n\n const testData: QueryBuilderTestData = testCases;\n testData.testCases.forEach((testCase) => {\n it(testCase.name, async () => executeTest(sut, testCase.expectedResult, testCase.operations));\n });\n\n const createFieldDescriptor = (\n pathToClass: RelationshipPath | undefined,\n fieldProperties: PropertiesTestData[],\n type: FieldDescriptorType,\n fieldName: string | undefined,\n ): FieldDescriptor => {\n switch (type) {\n case FieldDescriptorType.Properties:\n const pathFromSelectToPropertyClass: StrippedRelatedClassInfo[] = (pathToClass ?? []).map((x) => ({\n sourceClassName: x.sourceClassInfo.name,\n targetClassName: x.targetClassInfo.name,\n relationshipName: x.relationshipInfo.name,\n isForwardRelationship: x.isForwardRelationship,\n }));\n\n const properties = fieldProperties.map((x) => ({\n class: x.property.classInfo.name,\n name: x.property.name,\n }));\n\n return {\n pathFromSelectToPropertyClass,\n properties,\n type,\n };\n case FieldDescriptorType.Name:\n return {\n type,\n fieldName: fieldName ?? \"\",\n };\n }\n };\n\n const createPropertyRecord = (propertyRecord: PropertyRecordTestData, propertiesField: PropertiesField, fieldDescriptor: FieldDescriptor) => {\n const propertiesFieldMock: StubbedType<PropertiesField> = MockFactory.create(PropertiesField);\n\n MockFactory.stubProperty(propertiesFieldMock, \"parent\", () => propertiesField.parent);\n MockFactory.stubProperty(propertiesFieldMock, \"properties\", () => propertiesField.properties);\n MockFactory.stubProperty(propertiesFieldMock, \"type\", () => propertiesField.type);\n MockFactory.stubProperty(propertiesFieldMock, \"getFieldDescriptor\", () => () => fieldDescriptor);\n\n const prop: PropertyRecord = new PropertyRecord(propertyRecord.value as PropertyValue, propertyRecord.property);\n dataProvider.getFieldByPropertyRecord.withArgs(prop).resolves(propertiesFieldMock);\n return prop;\n };\n\n const executeTest = async (queryBuilder: QueryBuilder, expectedResult: string, operations: OperationTestData[]) => {\n for (const op of operations) {\n const fieldDescriptor = createFieldDescriptor(\n op.propertiesField.parent?.pathToPrimaryClass,\n op.propertiesField.properties,\n op.fieldDescriptorType,\n op.fieldDescriptorName,\n );\n\n const prop = createPropertyRecord(op.propertyRecord, op.propertiesField as PropertiesField, fieldDescriptor);\n\n if (op.operationType === \"addProperty\") {\n const result = await queryBuilder.addProperty(prop);\n assert.strictEqual(result, op.expectedResult);\n }\n if (op.operationType === \"removeProperty\") {\n await queryBuilder.removeProperty(prop);\n }\n }\n\n const result = await queryBuilder.buildQueryString();\n assert.strictEqual(result, expectedResult);\n };\n});\n"]}
@@ -1253,6 +1253,52 @@ export const testCases = {
1253
1253
  },
1254
1254
  ],
1255
1255
  },
1256
+ {
1257
+ name: "when property is a model, return a model query string",
1258
+ expectedResult: "SELECT BisCore.B.ECInstanceId, BisCore.B.ECClassId FROM BisCore.B JOIN mockModeledElement ON mockModeledElement.ECInstanceId = BisCore.Element.Model.id WHERE mockModeledElement.UserLabel = 'displayValueString' OR mockModeledElement.CodeValue = 'displayValueString'",
1259
+ operations: [
1260
+ {
1261
+ expectedResult: true,
1262
+ operationType: "addProperty",
1263
+ fieldDescriptorType: FieldDescriptorType.Properties,
1264
+ propertyRecord: {
1265
+ value: {
1266
+ valueFormat: 0,
1267
+ value: { id: "fakeId" },
1268
+ displayValue: "displayValueString",
1269
+ },
1270
+ property: {
1271
+ typename: "navigation",
1272
+ name: "propertyName",
1273
+ displayLabel: "propertyDisplayLabel",
1274
+ },
1275
+ },
1276
+ propertiesField: {
1277
+ properties: [
1278
+ {
1279
+ property: {
1280
+ name: "somePropName",
1281
+ classInfo: {
1282
+ name: "BisCore:B",
1283
+ },
1284
+ navigationPropertyInfo: {
1285
+ classInfo: {
1286
+ name: "BisCore:ModelContainsElements",
1287
+ },
1288
+ },
1289
+ },
1290
+ },
1291
+ ],
1292
+ type: {
1293
+ typeName: "long",
1294
+ },
1295
+ parent: {
1296
+ pathToPrimaryClass: [],
1297
+ },
1298
+ },
1299
+ },
1300
+ ],
1301
+ },
1256
1302
  {
1257
1303
  name: "when category property and relational property added, return query string with property value, relational chain and with category joined",
1258
1304
  expectedResult: "SELECT BisCore.B.ECInstanceId, BisCore.B.ECClassId FROM BisCore.B JOIN BisCore.Category ON BisCore.Category.ECInstanceId = BisCore.GeometricElement3d.category.id WHERE ((BisCore.Category.CodeValue = 'displayValueString') OR (BisCore.Category.UserLabel = 'displayValueString'))",
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilder.testdata.js","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AAc,EACZ,sRAAsR;YACxR,UAAU,EAAE;gBACV;oBACE,cAAc,EAAE,IAAI;oBACpB,aAAa,EAAE,aAAa;oBAC5B,mBAAmB,EAAE,mBAAmB,CAAC,UAAU;oBACnD,cAAc,EAAE;wBACd,KAAK,EAAE;4BACL,WAAW,EAAE,CAAC;4BACd,KAAK,EAAE,YAAY;4BACnB,YAAY,EAAE,oBAAoB;yBACnC;wBACD,QAAQ,EAAE;4BACR,QAAQ,EAAE,YAAY;4BACtB,IAAI,EAAE,cAAc;4BACpB,YAAY,EAAE,sBAAsB;yBACrC;qBACF;oBACD,eAAe,EAAE;wBACf,UAAU,EAAE;4BACV;gCACE,QAAQ,EAAE;oCACR,IAAI,EAAE,cAAc;oCACpB,SAAS,EAAE;wCACT,IAAI,EAAE,WAAW;qCAClB;oCACD,sBAAsB,EAAE;wCACtB,SAAS,EAAE;4CACT,IAAI,EAAE,wCAAwC;yCAC/C;qCACF;iCACF;6BACF;yBACF;wBACD,IAAI,EAAE;4BACJ,QAAQ,EAAE,QAAQ;yBACnB;wBACD,MAAM,EAAE;4BACN,kBAAkB,EAAE,EAAE;yBACvB;qBACF;iBACF;aACF;SACF;KACF;CACF,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 { FieldDescriptorType } from \"@itwin/presentation-common\";\nimport type { QueryBuilderTestData } from \"./QueryBuilderTestData\";\n\nexport const testCases: QueryBuilderTestData = {\n testCases: [\n {\n name: \"when non-relational property added, return query string with property value\",\n expectedResult: \"SELECT A.B.ECInstanceId, A.B.ECClassId FROM A.B WHERE A.B.somePropName = 1\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: 1,\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"number\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when relational property added, return query string with property value and relation chain to it\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE A.B.somePropName = 'someString'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when multiple relational properties added, return query string with property values and relation chains to them\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN G.H ON Rel.BC.TargetECInstanceId = G.H.ECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE G.H.someOtherPropName = 'someOtherString' AND A.B.somePropName = 'someString'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someOtherString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"otherPropertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"someOtherPropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"G:H\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"G:H\",\n },\n },\n },\n },\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when relational property and non-relational property from one of relational chain classes added, return query string with property values and relation chain\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE A.B.somePropName = 'someString' AND A.C.SomeOtherPropName = 1\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"somePropName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:C\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: 1,\n },\n property: {\n typename: \"notNavigation\",\n name: \"SomeOtherPropName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"SomeOtherPropName\",\n classInfo: {\n name: \"A:C\",\n },\n },\n },\n ],\n type: {\n typeName: \"number\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when relational and non-relational property from the same class added, return query string with property values and relation chain\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE A.B.somePropName = 'someString' AND A.B.SomeOtherPropName = 1\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: 1,\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName2\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"SomeOtherPropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"number\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when non-relational property removed, return empty string\",\n expectedResult: \"\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n {\n operationType: \"removeProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when relational property removed, return empty string\",\n expectedResult: \"\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n operationType: \"removeProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when non-relational property re-added after removing, return query string with property value\",\n expectedResult: \"SELECT A.B.ECInstanceId, A.B.ECClassId FROM A.B WHERE A.B.somePropName = 'someOtherString'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n {\n operationType: \"removeProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n {\n operationType: \"addProperty\",\n expectedResult: true,\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someOtherString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when relational property re-added after removing, return query string with property value and relation chain to it\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE A.B.somePropName = 'someOtherString'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n operationType: \"removeProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someOtherString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when no properties added, return empty string\",\n expectedResult: \"\",\n operations: [],\n },\n {\n name: \"when property is float, return query string with ROUND\",\n expectedResult: \"SELECT A.B.ECInstanceId, A.B.ECClassId FROM A.B WHERE ROUND(A.B.somePropName, 4) = 3.1416\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: 3.14159,\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"number\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when property needsQuotes, return query string with property value in quotes\",\n expectedResult: \"SELECT A.B.ECInstanceId, A.B.ECClassId FROM A.B WHERE A.B.somePropName = 'https://valueThatNeedsQuotes.com'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"https://valueThatNeedsQuotes.com\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"uri\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when property is category, return a category query string\",\n expectedResult:\n \"SELECT BisCore.B.ECInstanceId, BisCore.B.ECClassId FROM BisCore.B JOIN BisCore.Category ON BisCore.Category.ECInstanceId = BisCore.GeometricElement3d.category.id WHERE ((BisCore.Category.CodeValue = 'displayValueString') OR (BisCore.Category.UserLabel = 'displayValueString'))\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n displayValue: \"displayValueString\",\n },\n property: {\n typename: \"navigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"BisCore:B\",\n },\n navigationPropertyInfo: {\n classInfo: {\n name: \"BisCore:GeometricElement3dIsInCategory\",\n },\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when category property and relational property added, return query string with property value, relational chain and with category joined\",\n expectedResult:\n \"SELECT BisCore.B.ECInstanceId, BisCore.B.ECClassId FROM BisCore.B JOIN BisCore.Category ON BisCore.Category.ECInstanceId = BisCore.GeometricElement3d.category.id WHERE ((BisCore.Category.CodeValue = 'displayValueString') OR (BisCore.Category.UserLabel = 'displayValueString'))\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n displayValue: \"displayValueString\",\n },\n property: {\n typename: \"navigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"BisCore:B\",\n },\n navigationPropertyInfo: {\n classInfo: {\n name: \"BisCore:GeometricElement3dIsInCategory\",\n },\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n ],\n};\n"]}
1
+ {"version":3,"file":"QueryBuilder.testdata.js","sourceRoot":"","sources":["../../../src/test/QueryBuilder.testdata.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,MAAM,CAAC,MAAM,SAAS,GAAyB;IAC7C,SAAS,EAAE;QACT;YACE,IAAI,EAAE,6EAA6E;YACnF,cAAc,EAAE,4EAA4E;YAC5F,UAAU,EAAE;gBACV;oBACE,cAAc,EAAE,IAAI;oBACpB,aAAa,EAAE,aAAa;oBAC5B,mBAAmB,EAAE,mBAAmB,CAAC,UAAU;oBACnD,cAAc,EAAE;wBACd,KAAK,EAAE;4BACL,WAAW,EAAE,CAAC;4BACd,KAAK,EAAE,CAAC;yBACT;wBACD,QAAQ,EAAE;4BACR,QAAQ,EAAE,eAAe;4BACzB,IAAI,EAAE,cAAc;4BACpB,YAAY,EAAE,sBAAsB;yBACrC;qBACF;oBACD,eAAe,EAAE;wBACf,UAAU,EAAE;4BACV;gCACE,QAAQ,EAAE;oCACR,IAAI,EAAE,cAAc;oCACpB,SAAS,EAAE;wCACT,IAAI,EAAE,KAAK;qCACZ;iCACF;6BACF;yBACF;wBACD,IAAI,EAAE;4BACJ,QAAQ,EAAE,QAAQ;yBACnB;wBACD,MAAM,EAAE;4B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J,cAAc,EACZ,sRAAsR;YACxR,UAAU,EAAE;gBACV;oBACE,cAAc,EAAE,IAAI;oBACpB,aAAa,EAAE,aAAa;oBAC5B,mBAAmB,EAAE,mBAAmB,CAAC,UAAU;oBACnD,cAAc,EAAE;wBACd,KAAK,EAAE;4BACL,WAAW,EAAE,CAAC;4BACd,KAAK,EAAE,YAAY;4BACnB,YAAY,EAAE,oBAAoB;yBACnC;wBACD,QAAQ,EAAE;4BACR,QAAQ,EAAE,YAAY;4BACtB,IAAI,EAAE,cAAc;4BACpB,YAAY,EAAE,sBAAsB;yBACrC;qBACF;oBACD,eAAe,EAAE;wBACf,UAAU,EAAE;4BACV;gCACE,QAAQ,EAAE;oCACR,IAAI,EAAE,cAAc;oCACpB,SAAS,EAAE;wCACT,IAAI,EAAE,WAAW;qCAClB;oCACD,sBAAsB,EAAE;wCACtB,SAAS,EAAE;4CACT,IAAI,EAAE,wCAAwC;yCAC/C;qCACF;iCACF;6BACF;yBACF;wBACD,IAAI,EAAE;4BACJ,QAAQ,EAAE,QAAQ;yBACnB;wBACD,MAAM,EAAE;4BACN,kBAAkB,EAAE,EAAE;yBACvB;qBACF;iBACF;aACF;SACF;KACF;CACF,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 { FieldDescriptorType } from \"@itwin/presentation-common\";\nimport type { QueryBuilderTestData } from \"./QueryBuilderTestData\";\n\nexport const testCases: QueryBuilderTestData = {\n testCases: [\n {\n name: \"when non-relational property added, return query string with property value\",\n expectedResult: \"SELECT A.B.ECInstanceId, A.B.ECClassId FROM A.B WHERE A.B.somePropName = 1\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: 1,\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"number\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when relational property added, return query string with property value and relation chain to it\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE A.B.somePropName = 'someString'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when multiple relational properties added, return query string with property values and relation chains to them\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN G.H ON Rel.BC.TargetECInstanceId = G.H.ECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE G.H.someOtherPropName = 'someOtherString' AND A.B.somePropName = 'someString'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someOtherString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"otherPropertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"someOtherPropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"G:H\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"G:H\",\n },\n },\n },\n },\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when relational property and non-relational property from one of relational chain classes added, return query string with property values and relation chain\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE A.B.somePropName = 'someString' AND A.C.SomeOtherPropName = 1\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"somePropName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:C\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: 1,\n },\n property: {\n typename: \"notNavigation\",\n name: \"SomeOtherPropName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"SomeOtherPropName\",\n classInfo: {\n name: \"A:C\",\n },\n },\n },\n ],\n type: {\n typeName: \"number\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when relational and non-relational property from the same class added, return query string with property values and relation chain\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE A.B.somePropName = 'someString' AND A.B.SomeOtherPropName = 1\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: 1,\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName2\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"SomeOtherPropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"number\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when non-relational property removed, return empty string\",\n expectedResult: \"\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n {\n operationType: \"removeProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when relational property removed, return empty string\",\n expectedResult: \"\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n operationType: \"removeProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when non-relational property re-added after removing, return query string with property value\",\n expectedResult: \"SELECT A.B.ECInstanceId, A.B.ECClassId FROM A.B WHERE A.B.somePropName = 'someOtherString'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n {\n operationType: \"removeProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n {\n operationType: \"addProperty\",\n expectedResult: true,\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someOtherString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n contentClassInfo: {\n name: \"sourceClassName\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when relational property re-added after removing, return query string with property value and relation chain to it\",\n expectedResult:\n \"SELECT Z.X.ECInstanceId, Z.X.ECClassId FROM Z.X JOIN Rel.CX ON Z.X.ECInstanceId = Rel.CX.TargetECInstanceId JOIN A.C ON Rel.CX.SourceECInstanceId = A.C.ECInstanceId JOIN Rel.BC ON A.C.ECInstanceId = Rel.BC.SourceECInstanceId JOIN A.B ON Rel.BC.TargetECInstanceId = A.B.ECInstanceId WHERE A.B.somePropName = 'someOtherString'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n operationType: \"removeProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someOtherString\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [\n {\n sourceClassInfo: {\n id: \"id1\",\n name: \"A:B\",\n label: \"AB label\",\n },\n targetClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n isPolymorphicTargetClass: true,\n relationshipInfo: {\n id: \"id3\",\n name: \"Rel:BC\",\n label: \"Relationship BC label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: false,\n },\n {\n sourceClassInfo: {\n id: \"id2\",\n name: \"A:C\",\n label: \"AC label\",\n },\n targetClassInfo: {\n id: \"id4\",\n name: \"Z:X\",\n label: \"ZX label\",\n },\n isPolymorphicTargetClass: false,\n relationshipInfo: {\n id: \"id5\",\n name: \"Rel:CX\",\n label: \"Relationship CX label\",\n },\n isPolymorphicRelationship: true,\n isForwardRelationship: true,\n },\n ],\n contentClassInfo: {\n name: \"A:B\",\n },\n },\n },\n },\n ],\n },\n {\n name: \"when no properties added, return empty string\",\n expectedResult: \"\",\n operations: [],\n },\n {\n name: \"when property is float, return query string with ROUND\",\n expectedResult: \"SELECT A.B.ECInstanceId, A.B.ECClassId FROM A.B WHERE ROUND(A.B.somePropName, 4) = 3.1416\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: 3.14159,\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"number\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when property needsQuotes, return query string with property value in quotes\",\n expectedResult: \"SELECT A.B.ECInstanceId, A.B.ECClassId FROM A.B WHERE A.B.somePropName = 'https://valueThatNeedsQuotes.com'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"https://valueThatNeedsQuotes.com\",\n },\n property: {\n typename: \"notNavigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"A:B\",\n },\n },\n },\n ],\n type: {\n typeName: \"uri\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when property is category, return a category query string\",\n expectedResult:\n \"SELECT BisCore.B.ECInstanceId, BisCore.B.ECClassId FROM BisCore.B JOIN BisCore.Category ON BisCore.Category.ECInstanceId = BisCore.GeometricElement3d.category.id WHERE ((BisCore.Category.CodeValue = 'displayValueString') OR (BisCore.Category.UserLabel = 'displayValueString'))\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n displayValue: \"displayValueString\",\n },\n property: {\n typename: \"navigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"BisCore:B\",\n },\n navigationPropertyInfo: {\n classInfo: {\n name: \"BisCore:GeometricElement3dIsInCategory\",\n },\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when property is a model, return a model query string\",\n expectedResult:\n \"SELECT BisCore.B.ECInstanceId, BisCore.B.ECClassId FROM BisCore.B JOIN mockModeledElement ON mockModeledElement.ECInstanceId = BisCore.Element.Model.id WHERE mockModeledElement.UserLabel = 'displayValueString' OR mockModeledElement.CodeValue = 'displayValueString'\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: { id: \"fakeId\" },\n displayValue: \"displayValueString\",\n },\n property: {\n typename: \"navigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"BisCore:B\",\n },\n navigationPropertyInfo: {\n classInfo: {\n name: \"BisCore:ModelContainsElements\",\n },\n },\n },\n },\n ],\n type: {\n typeName: \"long\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n {\n name: \"when category property and relational property added, return query string with property value, relational chain and with category joined\",\n expectedResult:\n \"SELECT BisCore.B.ECInstanceId, BisCore.B.ECClassId FROM BisCore.B JOIN BisCore.Category ON BisCore.Category.ECInstanceId = BisCore.GeometricElement3d.category.id WHERE ((BisCore.Category.CodeValue = 'displayValueString') OR (BisCore.Category.UserLabel = 'displayValueString'))\",\n operations: [\n {\n expectedResult: true,\n operationType: \"addProperty\",\n fieldDescriptorType: FieldDescriptorType.Properties,\n propertyRecord: {\n value: {\n valueFormat: 0,\n value: \"someString\",\n displayValue: \"displayValueString\",\n },\n property: {\n typename: \"navigation\",\n name: \"propertyName\",\n displayLabel: \"propertyDisplayLabel\",\n },\n },\n propertiesField: {\n properties: [\n {\n property: {\n name: \"somePropName\",\n classInfo: {\n name: \"BisCore:B\",\n },\n navigationPropertyInfo: {\n classInfo: {\n name: \"BisCore:GeometricElement3dIsInCategory\",\n },\n },\n },\n },\n ],\n type: {\n typeName: \"string\",\n },\n parent: {\n pathToPrimaryClass: [],\n },\n },\n },\n ],\n },\n ],\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { PropertyDescription, PropertyValue } from "@itwin/appui-abstract";
2
- import type { FieldDescriptorType, RelationshipPath } from "@itwin/presentation-common";
2
+ import type { FieldDescriptorType, NavigationPropertyValue, RelationshipPath } from "@itwin/presentation-common";
3
3
  export interface ClassInfoTestData {
4
4
  name: string;
5
5
  }
@@ -30,7 +30,7 @@ export interface PropertiesFieldTestData {
30
30
  parent: ParentTestData;
31
31
  }
32
32
  export interface PropertyRecordTestData {
33
- value: PropertyValue;
33
+ value: PropertyValue | NavigationPropertyValue;
34
34
  property: PropertyDescription;
35
35
  }
36
36
  export interface OperationTestData {
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderTestData.js","sourceRoot":"","sources":["../../../src/test/QueryBuilderTestData.ts"],"names":[],"mappings":"","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 { PropertyDescription, PropertyValue } from \"@itwin/appui-abstract\";\nimport type { FieldDescriptorType, RelationshipPath } from \"@itwin/presentation-common\";\n\nexport interface ClassInfoTestData {\n name: string;\n}\n\nexport interface NavigationPropertyInfoTestData {\n classInfo: ClassInfoTestData;\n}\n\nexport interface PropertyTestData {\n name: string;\n classInfo: ClassInfoTestData;\n navigationPropertyInfo?: NavigationPropertyInfoTestData;\n}\n\nexport interface PropertiesTestData {\n property: PropertyTestData;\n}\n\nexport interface ContentClassInfoTestData {\n name: string;\n}\n\nexport interface ParentTestData {\n pathToPrimaryClass: RelationshipPath;\n contentClassInfo?: ContentClassInfoTestData;\n}\n\nexport interface TypeTestData {\n typeName: string;\n}\n\nexport interface PropertiesFieldTestData {\n properties: PropertiesTestData[];\n type: TypeTestData;\n parent: ParentTestData;\n}\n\nexport interface PropertyRecordTestData {\n value: PropertyValue;\n property: PropertyDescription;\n}\n\nexport interface OperationTestData {\n expectedResult?: boolean;\n operationType: string;\n fieldDescriptorType: FieldDescriptorType.Name | FieldDescriptorType.Properties;\n fieldDescriptorName?: string;\n propertyRecord: PropertyRecordTestData;\n propertiesField: PropertiesFieldTestData;\n}\n\nexport interface TestCase {\n name: string;\n expectedResult: string;\n operations: OperationTestData[];\n}\n\nexport interface QueryBuilderTestData {\n testCases: TestCase[];\n}\n"]}
1
+ {"version":3,"file":"QueryBuilderTestData.js","sourceRoot":"","sources":["../../../src/test/QueryBuilderTestData.ts"],"names":[],"mappings":"","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 { PropertyDescription, PropertyValue } from \"@itwin/appui-abstract\";\nimport type { FieldDescriptorType, NavigationPropertyValue, RelationshipPath } from \"@itwin/presentation-common\";\n\nexport interface ClassInfoTestData {\n name: string;\n}\n\nexport interface NavigationPropertyInfoTestData {\n classInfo: ClassInfoTestData;\n}\n\nexport interface PropertyTestData {\n name: string;\n classInfo: ClassInfoTestData;\n navigationPropertyInfo?: NavigationPropertyInfoTestData;\n}\n\nexport interface PropertiesTestData {\n property: PropertyTestData;\n}\n\nexport interface ContentClassInfoTestData {\n name: string;\n}\n\nexport interface ParentTestData {\n pathToPrimaryClass: RelationshipPath;\n contentClassInfo?: ContentClassInfoTestData;\n}\n\nexport interface TypeTestData {\n typeName: string;\n}\n\nexport interface PropertiesFieldTestData {\n properties: PropertiesTestData[];\n type: TypeTestData;\n parent: ParentTestData;\n}\n\nexport interface PropertyRecordTestData {\n value: PropertyValue | NavigationPropertyValue;\n property: PropertyDescription;\n}\n\nexport interface OperationTestData {\n expectedResult?: boolean;\n operationType: string;\n fieldDescriptorType: FieldDescriptorType.Name | FieldDescriptorType.Properties;\n fieldDescriptorName?: string;\n propertyRecord: PropertyRecordTestData;\n propertiesField: PropertiesFieldTestData;\n}\n\nexport interface TestCase {\n name: string;\n expectedResult: string;\n operations: OperationTestData[];\n}\n\nexport interface QueryBuilderTestData {\n testCases: TestCase[];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/grouping-mapping-widget",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "An iTwin.js 3D Viewer Widget that interfaces with the iTwin Reporting Platform.",
5
5
  "keywords": [
6
6
  "Bentley",