@itwin/grouping-mapping-widget 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/widget/components/ConfirmMappingsImport.js +1 -1
- package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +1 -1
- package/lib/cjs/widget/components/GroupAction.js +50 -66
- package/lib/cjs/widget/components/GroupAction.js.map +1 -1
- package/lib/cjs/widget/components/GroupAction.scss +0 -18
- package/lib/cjs/widget/components/GroupDetails.d.ts +13 -0
- package/lib/cjs/widget/components/GroupDetails.js +34 -0
- package/lib/cjs/widget/components/GroupDetails.js.map +1 -0
- package/lib/cjs/widget/components/GroupDetailsActionPanel.d.ts +8 -0
- package/lib/cjs/widget/components/GroupDetailsActionPanel.js +19 -0
- package/lib/cjs/widget/components/GroupDetailsActionPanel.js.map +1 -0
- package/lib/cjs/widget/components/GroupDetailsStep.d.ts +13 -0
- package/lib/cjs/widget/components/GroupDetailsStep.js +25 -0
- package/lib/cjs/widget/components/GroupDetailsStep.js.map +1 -0
- package/lib/cjs/widget/components/GroupDetailsStep.scss +11 -0
- package/lib/cjs/widget/components/Grouping.js +1 -2
- package/lib/cjs/widget/components/Grouping.js.map +1 -1
- package/lib/cjs/widget/components/GroupingMapping.js +1 -1
- package/lib/cjs/widget/components/GroupingMapping.js.map +1 -1
- package/lib/cjs/widget/components/GroupingMappingHeader.d.ts +1 -2
- package/lib/cjs/widget/components/GroupingMappingHeader.js +9 -2
- package/lib/cjs/widget/components/GroupingMappingHeader.js.map +1 -1
- package/lib/cjs/widget/components/Mapping.js +2 -3
- package/lib/cjs/widget/components/Mapping.js.map +1 -1
- package/lib/cjs/widget/components/MappingAction.js +1 -1
- package/lib/cjs/widget/components/MappingAction.js.map +1 -1
- package/lib/cjs/widget/components/MappingImportWizardModal.js +1 -1
- package/lib/cjs/widget/components/MappingImportWizardModal.js.map +1 -1
- package/lib/cjs/widget/components/PropertyAction.d.ts +8 -0
- package/lib/cjs/widget/components/PropertyAction.js +100 -0
- package/lib/cjs/widget/components/PropertyAction.js.map +1 -0
- package/lib/cjs/widget/components/PropertyAction.scss +9 -0
- package/lib/cjs/widget/components/QueryBuilder.d.ts +1 -1
- package/lib/cjs/widget/components/QueryBuilder.js +4 -4
- package/lib/cjs/widget/components/QueryBuilder.js.map +1 -1
- package/lib/cjs/widget/components/QueryBuilderActionPanel.d.ts +6 -0
- package/lib/cjs/widget/components/QueryBuilderActionPanel.js +17 -0
- package/lib/cjs/widget/components/QueryBuilderActionPanel.js.map +1 -0
- package/lib/cjs/widget/components/QueryBuilderCustomUI.d.ts +11 -0
- package/lib/cjs/widget/components/QueryBuilderCustomUI.js +27 -0
- package/lib/cjs/widget/components/QueryBuilderCustomUI.js.map +1 -0
- package/lib/cjs/widget/components/QueryBuilderStep.d.ts +16 -0
- package/lib/cjs/widget/components/QueryBuilderStep.js +30 -0
- package/lib/cjs/widget/components/QueryBuilderStep.js.map +1 -0
- package/lib/cjs/widget/components/QueryBuilderStep.scss +18 -0
- package/lib/cjs/widget/components/SelectMappings.js +1 -1
- package/lib/cjs/widget/components/SelectMappings.js.map +1 -1
- package/lib/cjs/widget/components/StatusIcon.d.ts +15 -0
- package/lib/cjs/widget/components/StatusIcon.js +26 -0
- package/lib/cjs/widget/components/StatusIcon.js.map +1 -0
- package/lib/cjs/widget/components/StatusIcon.scss +26 -0
- package/lib/cjs/widget/components/context/PropertyGridWrapperContext.d.ts +1 -3
- package/lib/cjs/widget/components/context/PropertyGridWrapperContext.js +0 -2
- package/lib/cjs/widget/components/context/PropertyGridWrapperContext.js.map +1 -1
- package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
- package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.js +51 -32
- package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.scss +25 -17
- package/lib/cjs/widget/components/customUI/ManualGroupingCustomUI.js +1 -1
- package/lib/cjs/widget/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/cjs/widget/components/customUI/ManualGroupingCustomUI.scss +1 -0
- package/lib/cjs/widget/components/customUI/SearchGroupingCustomUI.js +1 -1
- package/lib/cjs/widget/components/customUI/SearchGroupingCustomUI.js.map +1 -1
- package/lib/cjs/widget/components/customUI/SearchGroupingCustomUI.scss +1 -0
- package/lib/cjs/widget/components/utils.d.ts +1 -1
- package/lib/cjs/widget/components/utils.js.map +1 -1
- package/lib/esm/widget/components/ConfirmMappingsImport.js +1 -1
- package/lib/esm/widget/components/ConfirmMappingsImport.js.map +1 -1
- package/lib/esm/widget/components/GroupAction.js +53 -69
- package/lib/esm/widget/components/GroupAction.js.map +1 -1
- package/lib/esm/widget/components/GroupAction.scss +0 -18
- package/lib/esm/widget/components/GroupDetails.d.ts +13 -0
- package/lib/esm/widget/components/GroupDetails.js +27 -0
- package/lib/esm/widget/components/GroupDetails.js.map +1 -0
- package/lib/esm/widget/components/GroupDetailsActionPanel.d.ts +8 -0
- package/lib/esm/widget/components/GroupDetailsActionPanel.js +12 -0
- package/lib/esm/widget/components/GroupDetailsActionPanel.js.map +1 -0
- package/lib/esm/widget/components/GroupDetailsStep.d.ts +13 -0
- package/lib/esm/widget/components/GroupDetailsStep.js +18 -0
- package/lib/esm/widget/components/GroupDetailsStep.js.map +1 -0
- package/lib/esm/widget/components/GroupDetailsStep.scss +11 -0
- package/lib/esm/widget/components/Grouping.js +1 -2
- package/lib/esm/widget/components/Grouping.js.map +1 -1
- package/lib/esm/widget/components/GroupingMapping.js +1 -1
- package/lib/esm/widget/components/GroupingMapping.js.map +1 -1
- package/lib/esm/widget/components/GroupingMappingHeader.d.ts +1 -2
- package/lib/esm/widget/components/GroupingMappingHeader.js +9 -2
- package/lib/esm/widget/components/GroupingMappingHeader.js.map +1 -1
- package/lib/esm/widget/components/Mapping.js +2 -3
- package/lib/esm/widget/components/Mapping.js.map +1 -1
- package/lib/esm/widget/components/MappingAction.js +1 -1
- package/lib/esm/widget/components/MappingAction.js.map +1 -1
- package/lib/esm/widget/components/MappingImportWizardModal.js +1 -1
- package/lib/esm/widget/components/MappingImportWizardModal.js.map +1 -1
- package/lib/esm/widget/components/PropertyAction.d.ts +8 -0
- package/lib/esm/widget/components/PropertyAction.js +77 -0
- package/lib/esm/widget/components/PropertyAction.js.map +1 -0
- package/lib/esm/widget/components/PropertyAction.scss +9 -0
- package/lib/esm/widget/components/QueryBuilder.d.ts +1 -1
- package/lib/esm/widget/components/QueryBuilder.js +4 -4
- package/lib/esm/widget/components/QueryBuilder.js.map +1 -1
- package/lib/esm/widget/components/QueryBuilderActionPanel.d.ts +6 -0
- package/lib/esm/widget/components/QueryBuilderActionPanel.js +10 -0
- package/lib/esm/widget/components/QueryBuilderActionPanel.js.map +1 -0
- package/lib/esm/widget/components/QueryBuilderCustomUI.d.ts +11 -0
- package/lib/esm/widget/components/QueryBuilderCustomUI.js +20 -0
- package/lib/esm/widget/components/QueryBuilderCustomUI.js.map +1 -0
- package/lib/esm/widget/components/QueryBuilderStep.d.ts +16 -0
- package/lib/esm/widget/components/QueryBuilderStep.js +23 -0
- package/lib/esm/widget/components/QueryBuilderStep.js.map +1 -0
- package/lib/esm/widget/components/QueryBuilderStep.scss +18 -0
- package/lib/esm/widget/components/SelectMappings.js +1 -1
- package/lib/esm/widget/components/SelectMappings.js.map +1 -1
- package/lib/esm/widget/components/StatusIcon.d.ts +15 -0
- package/lib/esm/widget/components/StatusIcon.js +19 -0
- package/lib/esm/widget/components/StatusIcon.js.map +1 -0
- package/lib/esm/widget/components/StatusIcon.scss +26 -0
- package/lib/esm/widget/components/context/PropertyGridWrapperContext.d.ts +1 -3
- package/lib/esm/widget/components/context/PropertyGridWrapperContext.js +0 -2
- package/lib/esm/widget/components/context/PropertyGridWrapperContext.js.map +1 -1
- package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
- package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.js +53 -34
- package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.scss +25 -17
- package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.js +2 -2
- package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.scss +1 -0
- package/lib/esm/widget/components/customUI/SearchGroupingCustomUI.js +2 -2
- package/lib/esm/widget/components/customUI/SearchGroupingCustomUI.js.map +1 -1
- package/lib/esm/widget/components/customUI/SearchGroupingCustomUI.scss +1 -0
- package/lib/esm/widget/components/utils.d.ts +1 -1
- package/lib/esm/widget/components/utils.js.map +1 -1
- package/package.json +1 -1
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.d.ts +0 -32
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.js +0 -91
- package/lib/cjs/widget/components/property-grid/NonPrimitivePropertyRenderer.js.map +0 -1
- package/lib/cjs/widget/components/property-grid/PrimitivePropertyRenderer.d.ts +0 -26
- package/lib/cjs/widget/components/property-grid/PrimitivePropertyRenderer.js +0 -62
- package/lib/cjs/widget/components/property-grid/PrimitivePropertyRenderer.js.map +0 -1
- package/lib/cjs/widget/components/property-grid/PropertyGrid.d.ts +0 -67
- package/lib/cjs/widget/components/property-grid/PropertyGrid.js +0 -198
- package/lib/cjs/widget/components/property-grid/PropertyGrid.js.map +0 -1
- package/lib/cjs/widget/components/property-grid/PropertyGrid.scss +0 -71
- package/lib/cjs/widget/components/property-grid/PropertyGridWrapper.d.ts +0 -23
- package/lib/cjs/widget/components/property-grid/PropertyGridWrapper.js +0 -77
- package/lib/cjs/widget/components/property-grid/PropertyGridWrapper.js.map +0 -1
- package/lib/cjs/widget/components/property-grid/PropertyList.d.ts +0 -69
- package/lib/cjs/widget/components/property-grid/PropertyList.js +0 -87
- package/lib/cjs/widget/components/property-grid/PropertyList.js.map +0 -1
- package/lib/cjs/widget/components/property-grid/PropertyRender.d.ts +0 -92
- package/lib/cjs/widget/components/property-grid/PropertyRender.js +0 -109
- package/lib/cjs/widget/components/property-grid/PropertyRender.js.map +0 -1
- package/lib/cjs/widget/components/property-grid/PropertyView.d.ts +0 -22
- package/lib/cjs/widget/components/property-grid/PropertyView.js +0 -232
- package/lib/cjs/widget/components/property-grid/PropertyView.js.map +0 -1
- package/lib/cjs/widget/components/property-grid/PropertyView.scss +0 -77
- package/lib/cjs/widget/components/property-grid/countMatchesInString.d.ts +0 -8
- package/lib/cjs/widget/components/property-grid/countMatchesInString.js +0 -32
- package/lib/cjs/widget/components/property-grid/countMatchesInString.js.map +0 -1
- package/lib/cjs/widget/components/property-grid/createNewDisplayValue.d.ts +0 -10
- package/lib/cjs/widget/components/property-grid/createNewDisplayValue.js +0 -65
- package/lib/cjs/widget/components/property-grid/createNewDisplayValue.js.map +0 -1
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.d.ts +0 -32
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.js +0 -68
- package/lib/esm/widget/components/property-grid/NonPrimitivePropertyRenderer.js.map +0 -1
- package/lib/esm/widget/components/property-grid/PrimitivePropertyRenderer.d.ts +0 -26
- package/lib/esm/widget/components/property-grid/PrimitivePropertyRenderer.js +0 -39
- package/lib/esm/widget/components/property-grid/PrimitivePropertyRenderer.js.map +0 -1
- package/lib/esm/widget/components/property-grid/PropertyGrid.d.ts +0 -67
- package/lib/esm/widget/components/property-grid/PropertyGrid.js +0 -172
- package/lib/esm/widget/components/property-grid/PropertyGrid.js.map +0 -1
- package/lib/esm/widget/components/property-grid/PropertyGrid.scss +0 -71
- package/lib/esm/widget/components/property-grid/PropertyGridWrapper.d.ts +0 -23
- package/lib/esm/widget/components/property-grid/PropertyGridWrapper.js +0 -54
- package/lib/esm/widget/components/property-grid/PropertyGridWrapper.js.map +0 -1
- package/lib/esm/widget/components/property-grid/PropertyList.d.ts +0 -69
- package/lib/esm/widget/components/property-grid/PropertyList.js +0 -60
- package/lib/esm/widget/components/property-grid/PropertyList.js.map +0 -1
- package/lib/esm/widget/components/property-grid/PropertyRender.d.ts +0 -92
- package/lib/esm/widget/components/property-grid/PropertyRender.js +0 -86
- package/lib/esm/widget/components/property-grid/PropertyRender.js.map +0 -1
- package/lib/esm/widget/components/property-grid/PropertyView.d.ts +0 -22
- package/lib/esm/widget/components/property-grid/PropertyView.js +0 -209
- package/lib/esm/widget/components/property-grid/PropertyView.js.map +0 -1
- package/lib/esm/widget/components/property-grid/PropertyView.scss +0 -77
- package/lib/esm/widget/components/property-grid/countMatchesInString.d.ts +0 -8
- package/lib/esm/widget/components/property-grid/countMatchesInString.js +0 -28
- package/lib/esm/widget/components/property-grid/countMatchesInString.js.map +0 -1
- package/lib/esm/widget/components/property-grid/createNewDisplayValue.d.ts +0 -10
- package/lib/esm/widget/components/property-grid/createNewDisplayValue.js +0 -42
- package/lib/esm/widget/components/property-grid/createNewDisplayValue.js.map +0 -1
|
@@ -6,12 +6,12 @@ const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
|
6
6
|
/* This class is to build adaptive and dynamic query for find similar property selections */
|
|
7
7
|
class QueryBuilder {
|
|
8
8
|
constructor(provider) {
|
|
9
|
-
this.resetQuery = () => {
|
|
10
|
-
this.query = undefined;
|
|
11
|
-
};
|
|
12
9
|
this._propertyMap = new Map();
|
|
10
|
+
this.resetQueryBuilder = () => {
|
|
11
|
+
this._propertyMap = new Map();
|
|
12
|
+
};
|
|
13
13
|
this.regenerateQuery = () => {
|
|
14
|
-
this.
|
|
14
|
+
this.query = undefined;
|
|
15
15
|
for (const property of this._propertyMap.values()) {
|
|
16
16
|
this.buildProperty(property.propertyRecord, property.propertiesField);
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryBuilder.js","sourceRoot":"","sources":["../../../../src/widget/components/QueryBuilder.ts"],"names":[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AC;SAC9D;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;IA0BO,kBAAkB,CAAC,SAAiB;QAC1C,OAAO,mCAAmC,SAAS,wCAAwC,SAAS,KAAK,CAAC;IAC5G,CAAC;IAEO,OAAO,CAAC,CAAU;QACxB,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;;AAtZH,oCAuZC;AAtZyB,uCAA0B,GAChD,iCAAiC,CAAC;AACZ,wCAA2B,GACjD,iCAAiC,CAAC;AACZ,qCAAwB,GAAG,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { PresentationPropertyDataProvider } from \"@itwin/presentation-components\";\nimport type {\n InstanceKey,\n PropertiesField,\n} from \"@itwin/presentation-common\";\nimport type { Primitives, PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { toaster } from \"@itwin/itwinui-react\";\n\nexport interface Query {\n unions: QueryUnion[];\n}\n\nexport interface QueryUnion {\n classes: QueryClass[];\n properties: QueryProperty[];\n}\n\nexport interface QueryClass {\n // schemaName.className\n className: string;\n classJoins: ClassJoin[];\n}\n\nexport interface ClassJoin {\n classProperty: string;\n joinClassName: string;\n joinClassProperty: string;\n}\n\nexport interface QueryProperty {\n className: string;\n classProperties: ClassProperty[];\n isCategory: boolean;\n isAspect: boolean;\n}\n\nexport interface ClassProperty {\n name: string;\n value: Primitives.Value;\n needsQuote: boolean;\n}\n\nexport interface AddedProperty {\n propertyRecord: PropertyRecord;\n propertiesField: PropertiesField;\n}\n\n/* This class is to build adaptive and dynamic query for find similar property selections */\nexport class QueryBuilder {\n private static readonly MULTI_ASPECT_PRIMARY_CLASS =\n \"BisCore:ElementOwnsMultiAspects\";\n private static readonly UNIQUE_ASPECT_PRIMARY_CLASS =\n \"BisCore:ElementOwnsUniqueAspect\";\n private static readonly DEFAULT_DOUBLE_PRECISION = 4;\n\n private dataProvider: PresentationPropertyDataProvider;\n private query: Query | undefined;\n\n constructor(provider: PresentationPropertyDataProvider) {\n this.dataProvider = provider;\n }\n\n public resetQuery = () => {\n this.query = undefined;\n }\n\n private isCategory(propertyField: PropertiesField): boolean {\n const classInfo =\n propertyField.properties[0].property.navigationPropertyInfo?.classInfo;\n return classInfo?.name === \"BisCore:GeometricElement3dIsInCategory\";\n }\n\n private _propertyMap: Map<string, AddedProperty> = new Map();\n\n private regenerateQuery = () => {\n this.resetQuery();\n\n for (const property of this._propertyMap.values()) {\n this.buildProperty(property.propertyRecord, property.propertiesField);\n }\n }\n\n public async addProperty(prop: PropertyRecord): Promise<boolean> {\n // TODO: only handle primitive properties now\n if (prop.value?.valueFormat !== PropertyValueFormat.Primitive) {\n toaster.warning(\"Only primitive types are supported for now.\");\n return false;\n }\n if (prop.value.value === undefined) {\n return false;\n }\n\n const propertyField = (await this.dataProvider.getFieldByPropertyRecord(\n prop,\n )) as PropertiesField;\n\n if (!propertyField) {\n toaster.negative(\n \"Error. Failed to fetch field for this property record.\",\n );\n return false;\n }\n\n this._propertyMap.set(JSON.stringify(propertyField.getFieldDescriptor()), { propertyRecord: prop, propertiesField: propertyField });\n return true;\n }\n\n public async removeProperty(prop: PropertyRecord) {\n const propertyField = (await this.dataProvider.getFieldByPropertyRecord(\n prop,\n )) as PropertiesField;\n\n this._propertyMap.delete(JSON.stringify(propertyField.getFieldDescriptor()));\n }\n\n private buildProperty(prop: PropertyRecord, propertiesField: PropertiesField) {\n if (prop.value?.valueFormat !== PropertyValueFormat.Primitive || prop.value.value === undefined) {\n toaster.negative(\n \"Error. An unexpected error has occured while building a query.\",\n );\n return;\n }\n\n function replaceAll(str: string, match: string, replacement: string) {\n return str.split(match).join(replacement);\n }\n // if property value has single quote, escape\n if (\n (typeof prop.value.value === \"string\" ||\n prop.value.value instanceof String) &&\n String(prop.value.value).indexOf(\"'\") >= 0\n ) {\n prop.value.value = replaceAll(prop.value.value.toString(), \"'\", \"''\");\n }\n\n const pathToPrimaryClass = propertiesField.parent?.pathToPrimaryClass;\n\n // get the special cases\n const isNavigation: boolean =\n prop.property.typename.toLowerCase() === \"navigation\";\n const isCategory: boolean = isNavigation && this.isCategory(propertiesField);\n\n const isAspect: boolean =\n pathToPrimaryClass?.find(\n (a) =>\n a.relationshipInfo?.name ===\n QueryBuilder.UNIQUE_ASPECT_PRIMARY_CLASS ||\n a.relationshipInfo?.name === QueryBuilder.MULTI_ASPECT_PRIMARY_CLASS,\n ) !== undefined;\n\n for (let i = 0; i < propertiesField.properties.length; i++) {\n const property = propertiesField.properties[i].property;\n\n const className = property.classInfo.name.replace(\":\", \".\");\n const propertyName = isNavigation\n ? isCategory\n ? `${property.name}.CodeValue`\n : `${property.name}.id`\n : property.name;\n const propertyValue = isNavigation\n ? isCategory\n ? prop.value.displayValue ?? \"\"\n : (prop.value.value as InstanceKey).id\n : prop.value.value;\n\n if (\n !isAspect &&\n pathToPrimaryClass &&\n pathToPrimaryClass.length > 0\n ) {\n this.addRelatedToQuery(\n i,\n propertiesField,\n propertyName,\n propertyValue,\n );\n } else {\n this.addPropertyToQuery(\n i,\n className,\n propertyName,\n propertyValue,\n this.needsQuote(propertiesField),\n isCategory,\n isAspect,\n );\n }\n }\n return true;\n }\n\n private needsQuote(propertyField: PropertiesField): boolean {\n // list of property types that need quote around property value\n const typeName = propertyField.type.typeName.toLowerCase();\n return \"string\" === typeName || \"uri\" === typeName;\n }\n\n private addRelatedToQuery(\n unionIndex: number,\n propertyField: PropertiesField,\n propertyName: string,\n propertyValue: Primitives.Value,\n ) {\n const paths = [...(propertyField.parent?.pathToPrimaryClass ?? [])];\n paths.reverse().forEach((path) => {\n const sourceClassName = path.sourceClassInfo?.name.replace(\":\", \".\");\n const targetClassName = path.targetClassInfo?.name.replace(\":\", \".\");\n const relClassName = path.relationshipInfo?.name.replace(\":\", \".\");\n\n const relClassProperty = path.isForwardRelationship\n ? `SourceECInstanceId`\n : `TargetECInstanceId`;\n\n const relPropertyValue = path.isForwardRelationship\n ? `TargetECInstanceId`\n : `SourceECInstanceId`;\n\n this.addClassToQuery(\n unionIndex,\n targetClassName,\n `ECInstanceId`,\n relClassName,\n relPropertyValue\n );\n\n this.addClassToQuery(\n unionIndex,\n relClassName,\n relClassProperty,\n sourceClassName,\n `ECInstanceId`\n );\n\n if (path.sourceClassInfo?.name\n === propertyField.parent?.contentClassInfo.name) {\n this.addPropertyToQuery(\n unionIndex,\n sourceClassName,\n propertyName,\n propertyValue,\n this.needsQuote(propertyField),\n false,\n false,\n );\n }\n });\n }\n\n private addClassToQuery(\n unionIndex: number,\n className: string,\n classProperty: string,\n joinClassName: string,\n joinClassProperty: string,\n ) {\n if (this.query === undefined) {\n this.query = { unions: [] };\n }\n\n const classJoin: ClassJoin = {\n classProperty,\n joinClassName,\n joinClassProperty,\n };\n\n const queryClass: QueryClass = {\n className,\n classJoins: [classJoin],\n };\n\n if (this.query.unions.length <= unionIndex) {\n this.query.unions.push({\n classes: [queryClass],\n properties: [],\n });\n return;\n }\n\n const foundClass = this.query.unions[unionIndex].classes.find((c) =>\n c.className === className\n );\n\n if (foundClass) {\n const foundJoin = foundClass.classJoins.find((join) =>\n join.classProperty === classProperty && join.joinClassName === joinClassName && join.joinClassProperty === joinClassProperty\n );\n\n if (!foundJoin)\n foundClass.classJoins.push(classJoin);\n return;\n }\n\n this.query.unions[unionIndex].classes.push(queryClass);\n }\n\n private addPropertyToQuery(\n unionIndex: number,\n className: string,\n propertyName: string,\n propertyValue: Primitives.Value,\n needsQuote: boolean,\n isCategory: boolean,\n isAspect: boolean,\n ) {\n if (this.query === undefined) {\n this.query = { unions: [] };\n }\n\n const queryJoin: ClassProperty = {\n name: propertyName,\n value: propertyValue,\n needsQuote,\n };\n\n const queryProperty: QueryProperty = {\n className,\n isCategory,\n isAspect,\n classProperties: [queryJoin],\n };\n\n if (this.query.unions.length <= unionIndex) {\n this.query.unions.push({\n classes: [],\n properties: [queryProperty],\n });\n return;\n }\n\n const foundPropertyClass = this.query.unions[unionIndex].properties.find((p) =>\n p.className === className\n );\n\n if (foundPropertyClass) {\n const foundJoin = foundPropertyClass?.classProperties.find((join) =>\n join.name === propertyName\n );\n\n if (foundJoin) {\n foundJoin.value = propertyValue;\n return;\n }\n\n foundPropertyClass.classProperties.push(queryJoin);\n return;\n }\n\n this.query.unions[unionIndex].properties.push(queryProperty);\n }\n\n public buildQueryString() {\n this.regenerateQuery();\n if (\n this.query === undefined ||\n (this.query.unions.find((u) => u.classes.length === 0 && u.properties.length === 0))\n ) {\n return \"\";\n }\n\n const unionSegments: string[] = [];\n for (const union of this.query.unions) {\n\n const baseClass = union.classes[0];\n const baseProperty = union.properties[0];\n const baseClassName = baseClass ? baseClass.className : baseProperty?.className;\n const baseIdName = `${baseClassName}.ECInstanceId`;\n\n const selectClause = this.selectClause(baseProperty, baseClass);\n\n let querySegments: Map<string, string[]> = new Map();\n querySegments = this.relationalJoinSegments(union.classes, querySegments);\n\n const whereSegments: string[] = [];\n for (const property of union.properties) {\n if (property.isCategory) {\n if (property.className !== baseClassName)\n querySegments.set(\"BisCore.GeometricElement3d\", [`BisCore.GeometricElement3d.ECInstanceId = ${baseIdName}`]);\n\n querySegments.set(\"BisCore.Category\", [`BisCore.Category.ECInstanceId = BisCore.GeometricElement3d.category.id`]);\n whereSegments.push(this.categoryWhereQuery(property.classProperties[0].value.toString()));\n continue;\n }\n\n const joinIdName = property.isAspect\n ? `${property.className}.Element.id`\n : `${property.className}.ECInstanceId`;\n\n if (!querySegments.has(property.className) && property.className !== baseClassName)\n querySegments.set(property.className, [`${joinIdName} = ${baseIdName}`]);\n\n for (const prop of property.classProperties) {\n whereSegments.push(this.propertyQuerySegment(property.className, prop, prop.needsQuote));\n }\n }\n\n const joinClauses: string[] = [];\n for (const key of querySegments.keys()) {\n joinClauses.push(`JOIN ${key} ON ${querySegments.get(key)?.join(\" AND \")}`);\n }\n\n const whereClause = `WHERE ${whereSegments.join(\" AND \")}`;\n\n unionSegments.push([selectClause, ...joinClauses, whereClause].join(\" \"));\n }\n\n return unionSegments.join(\" UNION \");\n }\n\n private selectClause(baseProperty: QueryProperty | undefined, baseClass: QueryClass | undefined) {\n if (baseClass) {\n return `SELECT ${baseClass.className}.ECInstanceId, ${baseClass.className}.ECClassId FROM ${baseClass.className}`;\n }\n\n if (baseProperty) {\n const baseIdName = baseProperty.isAspect\n ? `${baseProperty.className}.Element.id ECInstanceId`\n : `${baseProperty.className}.ECInstanceId, ${baseProperty.className}.ECClassId`;\n\n return `SELECT ${baseIdName} FROM ${baseProperty.className}`;\n }\n\n return \"\";\n }\n\n private relationalJoinSegments = (classes: QueryClass[], querySegments: Map<string, string[]>): Map<string, string[]> => {\n for (const queryClass of classes) {\n for (const classJoin of queryClass.classJoins) {\n const querySegment = [\n ...querySegments.get(classJoin.joinClassName) ?? [],\n `${queryClass.className}.${classJoin.classProperty} = ${classJoin.joinClassName}.${classJoin.joinClassProperty}`,\n ];\n querySegments.set(classJoin.joinClassName, querySegment);\n }\n }\n\n return querySegments;\n }\n\n private propertyQuerySegment = (className: string, property: ClassProperty, needsQuote: boolean): string => {\n if (this.isFloat(property.value))\n return `ROUND(${className}.${property.name}, ` +\n `${QueryBuilder.DEFAULT_DOUBLE_PRECISION}) = ` +\n `${Number(property.value).toFixed(QueryBuilder.DEFAULT_DOUBLE_PRECISION)}`;\n\n const propertyValue = needsQuote ? `'${property.value}'` : property.value;\n return `${className}.${property.name} = ${propertyValue}`;\n }\n\n private categoryWhereQuery(codeValue: string): string {\n return `((BisCore.Category.CodeValue = '${codeValue}') OR (BisCore.Category.UserLabel = '${codeValue}'))`;\n }\n\n private isFloat(n: unknown): boolean {\n return Number(n) === n && n % 1 !== 0;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"QueryBuilder.js","sourceRoot":"","sources":["../../../../src/widget/components/Q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AAU,UAAU,SAAS,YAAY,CAAC,SAAS,EAAE,CAAC;SAC9D;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;IA0BO,kBAAkB,CAAC,SAAiB;QAC1C,OAAO,mCAAmC,SAAS,wCAAwC,SAAS,KAAK,CAAC;IAC5G,CAAC;IAEO,OAAO,CAAC,CAAU;QACxB,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;;AAtZH,oCAuZC;AAtZyB,uCAA0B,GAChD,iCAAiC,CAAC;AACZ,wCAA2B,GACjD,iCAAiC,CAAC;AACZ,qCAAwB,GAAG,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { PresentationPropertyDataProvider } from \"@itwin/presentation-components\";\nimport type {\n InstanceKey,\n PropertiesField,\n} from \"@itwin/presentation-common\";\nimport type { Primitives, PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { toaster } from \"@itwin/itwinui-react\";\n\nexport interface Query {\n unions: QueryUnion[];\n}\n\nexport interface QueryUnion {\n classes: QueryClass[];\n properties: QueryProperty[];\n}\n\nexport interface QueryClass {\n // schemaName.className\n className: string;\n classJoins: ClassJoin[];\n}\n\nexport interface ClassJoin {\n classProperty: string;\n joinClassName: string;\n joinClassProperty: string;\n}\n\nexport interface QueryProperty {\n className: string;\n classProperties: ClassProperty[];\n isCategory: boolean;\n isAspect: boolean;\n}\n\nexport interface ClassProperty {\n name: string;\n value: Primitives.Value;\n needsQuote: boolean;\n}\n\nexport interface AddedProperty {\n propertyRecord: PropertyRecord;\n propertiesField: PropertiesField;\n}\n\n/* This class is to build adaptive and dynamic query for find similar property selections */\nexport class QueryBuilder {\n private static readonly MULTI_ASPECT_PRIMARY_CLASS =\n \"BisCore:ElementOwnsMultiAspects\";\n private static readonly UNIQUE_ASPECT_PRIMARY_CLASS =\n \"BisCore:ElementOwnsUniqueAspect\";\n private static readonly DEFAULT_DOUBLE_PRECISION = 4;\n\n private dataProvider: PresentationPropertyDataProvider;\n private query: Query | undefined;\n\n constructor(provider: PresentationPropertyDataProvider) {\n this.dataProvider = provider;\n }\n\n private isCategory(propertyField: PropertiesField): boolean {\n const classInfo =\n propertyField.properties[0].property.navigationPropertyInfo?.classInfo;\n return classInfo?.name === \"BisCore:GeometricElement3dIsInCategory\";\n }\n\n private _propertyMap: Map<string, AddedProperty> = new Map();\n\n public resetQueryBuilder = () => {\n this._propertyMap = new Map();\n };\n\n private regenerateQuery = () => {\n this.query = undefined;\n\n for (const property of this._propertyMap.values()) {\n this.buildProperty(property.propertyRecord, property.propertiesField);\n }\n };\n\n public async addProperty(prop: PropertyRecord): Promise<boolean> {\n // TODO: only handle primitive properties now\n if (prop.value?.valueFormat !== PropertyValueFormat.Primitive) {\n toaster.warning(\"Only primitive types are supported for now.\");\n return false;\n }\n if (prop.value.value === undefined) {\n return false;\n }\n\n const propertyField = (await this.dataProvider.getFieldByPropertyRecord(\n prop,\n )) as PropertiesField;\n\n if (!propertyField) {\n toaster.negative(\n \"Error. Failed to fetch field for this property record.\",\n );\n return false;\n }\n\n this._propertyMap.set(JSON.stringify(propertyField.getFieldDescriptor()), { propertyRecord: prop, propertiesField: propertyField });\n return true;\n }\n\n public async removeProperty(prop: PropertyRecord) {\n const propertyField = (await this.dataProvider.getFieldByPropertyRecord(\n prop,\n )) as PropertiesField;\n\n this._propertyMap.delete(JSON.stringify(propertyField.getFieldDescriptor()));\n }\n\n private buildProperty(prop: PropertyRecord, propertiesField: PropertiesField) {\n if (prop.value?.valueFormat !== PropertyValueFormat.Primitive || prop.value.value === undefined) {\n toaster.negative(\n \"Error. An unexpected error has occured while building a query.\",\n );\n return;\n }\n\n function replaceAll(str: string, match: string, replacement: string) {\n return str.split(match).join(replacement);\n }\n // if property value has single quote, escape\n if (\n (typeof prop.value.value === \"string\" ||\n prop.value.value instanceof String) &&\n String(prop.value.value).indexOf(\"'\") >= 0\n ) {\n prop.value.value = replaceAll(prop.value.value.toString(), \"'\", \"''\");\n }\n\n const pathToPrimaryClass = propertiesField.parent?.pathToPrimaryClass;\n\n // get the special cases\n const isNavigation: boolean =\n prop.property.typename.toLowerCase() === \"navigation\";\n const isCategory: boolean = isNavigation && this.isCategory(propertiesField);\n\n const isAspect: boolean =\n pathToPrimaryClass?.find(\n (a) =>\n a.relationshipInfo?.name ===\n QueryBuilder.UNIQUE_ASPECT_PRIMARY_CLASS ||\n a.relationshipInfo?.name === QueryBuilder.MULTI_ASPECT_PRIMARY_CLASS,\n ) !== undefined;\n\n for (let i = 0; i < propertiesField.properties.length; i++) {\n const property = propertiesField.properties[i].property;\n\n const className = property.classInfo.name.replace(\":\", \".\");\n const propertyName = isNavigation\n ? isCategory\n ? `${property.name}.CodeValue`\n : `${property.name}.id`\n : property.name;\n const propertyValue = isNavigation\n ? isCategory\n ? prop.value.displayValue ?? \"\"\n : (prop.value.value as InstanceKey).id\n : prop.value.value;\n\n if (\n !isAspect &&\n pathToPrimaryClass &&\n pathToPrimaryClass.length > 0\n ) {\n this.addRelatedToQuery(\n i,\n propertiesField,\n propertyName,\n propertyValue,\n );\n } else {\n this.addPropertyToQuery(\n i,\n className,\n propertyName,\n propertyValue,\n this.needsQuote(propertiesField),\n isCategory,\n isAspect,\n );\n }\n }\n return true;\n }\n\n private needsQuote(propertyField: PropertiesField): boolean {\n // list of property types that need quote around property value\n const typeName = propertyField.type.typeName.toLowerCase();\n return \"string\" === typeName || \"uri\" === typeName;\n }\n\n private addRelatedToQuery(\n unionIndex: number,\n propertyField: PropertiesField,\n propertyName: string,\n propertyValue: Primitives.Value,\n ) {\n const paths = [...(propertyField.parent?.pathToPrimaryClass ?? [])];\n paths.reverse().forEach((path) => {\n const sourceClassName = path.sourceClassInfo?.name.replace(\":\", \".\");\n const targetClassName = path.targetClassInfo?.name.replace(\":\", \".\");\n const relClassName = path.relationshipInfo?.name.replace(\":\", \".\");\n\n const relClassProperty = path.isForwardRelationship\n ? `SourceECInstanceId`\n : `TargetECInstanceId`;\n\n const relPropertyValue = path.isForwardRelationship\n ? `TargetECInstanceId`\n : `SourceECInstanceId`;\n\n this.addClassToQuery(\n unionIndex,\n targetClassName,\n `ECInstanceId`,\n relClassName,\n relPropertyValue\n );\n\n this.addClassToQuery(\n unionIndex,\n relClassName,\n relClassProperty,\n sourceClassName,\n `ECInstanceId`\n );\n\n if (path.sourceClassInfo?.name\n === propertyField.parent?.contentClassInfo.name) {\n this.addPropertyToQuery(\n unionIndex,\n sourceClassName,\n propertyName,\n propertyValue,\n this.needsQuote(propertyField),\n false,\n false,\n );\n }\n });\n }\n\n private addClassToQuery(\n unionIndex: number,\n className: string,\n classProperty: string,\n joinClassName: string,\n joinClassProperty: string,\n ) {\n if (this.query === undefined) {\n this.query = { unions: [] };\n }\n\n const classJoin: ClassJoin = {\n classProperty,\n joinClassName,\n joinClassProperty,\n };\n\n const queryClass: QueryClass = {\n className,\n classJoins: [classJoin],\n };\n\n if (this.query.unions.length <= unionIndex) {\n this.query.unions.push({\n classes: [queryClass],\n properties: [],\n });\n return;\n }\n\n const foundClass = this.query.unions[unionIndex].classes.find((c) =>\n c.className === className\n );\n\n if (foundClass) {\n const foundJoin = foundClass.classJoins.find((join) =>\n join.classProperty === classProperty && join.joinClassName === joinClassName && join.joinClassProperty === joinClassProperty\n );\n\n if (!foundJoin)\n foundClass.classJoins.push(classJoin);\n return;\n }\n\n this.query.unions[unionIndex].classes.push(queryClass);\n }\n\n private addPropertyToQuery(\n unionIndex: number,\n className: string,\n propertyName: string,\n propertyValue: Primitives.Value,\n needsQuote: boolean,\n isCategory: boolean,\n isAspect: boolean,\n ) {\n if (this.query === undefined) {\n this.query = { unions: [] };\n }\n\n const queryJoin: ClassProperty = {\n name: propertyName,\n value: propertyValue,\n needsQuote,\n };\n\n const queryProperty: QueryProperty = {\n className,\n isCategory,\n isAspect,\n classProperties: [queryJoin],\n };\n\n if (this.query.unions.length <= unionIndex) {\n this.query.unions.push({\n classes: [],\n properties: [queryProperty],\n });\n return;\n }\n\n const foundPropertyClass = this.query.unions[unionIndex].properties.find((p) =>\n p.className === className\n );\n\n if (foundPropertyClass) {\n const foundJoin = foundPropertyClass?.classProperties.find((join) =>\n join.name === propertyName\n );\n\n if (foundJoin) {\n foundJoin.value = propertyValue;\n return;\n }\n\n foundPropertyClass.classProperties.push(queryJoin);\n return;\n }\n\n this.query.unions[unionIndex].properties.push(queryProperty);\n }\n\n public buildQueryString() {\n this.regenerateQuery();\n if (\n this.query === undefined ||\n (this.query.unions.find((u) => u.classes.length === 0 && u.properties.length === 0))\n ) {\n return \"\";\n }\n\n const unionSegments: string[] = [];\n for (const union of this.query.unions) {\n\n const baseClass = union.classes[0];\n const baseProperty = union.properties[0];\n const baseClassName = baseClass ? baseClass.className : baseProperty?.className;\n const baseIdName = `${baseClassName}.ECInstanceId`;\n\n const selectClause = this.selectClause(baseProperty, baseClass);\n\n let querySegments: Map<string, string[]> = new Map();\n querySegments = this.relationalJoinSegments(union.classes, querySegments);\n\n const whereSegments: string[] = [];\n for (const property of union.properties) {\n if (property.isCategory) {\n if (property.className !== baseClassName)\n querySegments.set(\"BisCore.GeometricElement3d\", [`BisCore.GeometricElement3d.ECInstanceId = ${baseIdName}`]);\n\n querySegments.set(\"BisCore.Category\", [`BisCore.Category.ECInstanceId = BisCore.GeometricElement3d.category.id`]);\n whereSegments.push(this.categoryWhereQuery(property.classProperties[0].value.toString()));\n continue;\n }\n\n const joinIdName = property.isAspect\n ? `${property.className}.Element.id`\n : `${property.className}.ECInstanceId`;\n\n if (!querySegments.has(property.className) && property.className !== baseClassName)\n querySegments.set(property.className, [`${joinIdName} = ${baseIdName}`]);\n\n for (const prop of property.classProperties) {\n whereSegments.push(this.propertyQuerySegment(property.className, prop, prop.needsQuote));\n }\n }\n\n const joinClauses: string[] = [];\n for (const key of querySegments.keys()) {\n joinClauses.push(`JOIN ${key} ON ${querySegments.get(key)?.join(\" AND \")}`);\n }\n\n const whereClause = `WHERE ${whereSegments.join(\" AND \")}`;\n\n unionSegments.push([selectClause, ...joinClauses, whereClause].join(\" \"));\n }\n\n return unionSegments.join(\" UNION \");\n }\n\n private selectClause(baseProperty: QueryProperty | undefined, baseClass: QueryClass | undefined) {\n if (baseClass) {\n return `SELECT ${baseClass.className}.ECInstanceId, ${baseClass.className}.ECClassId FROM ${baseClass.className}`;\n }\n\n if (baseProperty) {\n const baseIdName = baseProperty.isAspect\n ? `${baseProperty.className}.Element.id ECInstanceId`\n : `${baseProperty.className}.ECInstanceId, ${baseProperty.className}.ECClassId`;\n\n return `SELECT ${baseIdName} FROM ${baseProperty.className}`;\n }\n\n return \"\";\n }\n\n private relationalJoinSegments = (classes: QueryClass[], querySegments: Map<string, string[]>): Map<string, string[]> => {\n for (const queryClass of classes) {\n for (const classJoin of queryClass.classJoins) {\n const querySegment = [\n ...querySegments.get(classJoin.joinClassName) ?? [],\n `${queryClass.className}.${classJoin.classProperty} = ${classJoin.joinClassName}.${classJoin.joinClassProperty}`,\n ];\n querySegments.set(classJoin.joinClassName, querySegment);\n }\n }\n\n return querySegments;\n };\n\n private propertyQuerySegment = (className: string, property: ClassProperty, needsQuote: boolean): string => {\n if (this.isFloat(property.value))\n return `ROUND(${className}.${property.name}, ` +\n `${QueryBuilder.DEFAULT_DOUBLE_PRECISION}) = ` +\n `${Number(property.value).toFixed(QueryBuilder.DEFAULT_DOUBLE_PRECISION)}`;\n\n const propertyValue = needsQuote ? `'${property.value}'` : property.value;\n return `${className}.${property.name} = ${propertyValue}`;\n };\n\n private categoryWhereQuery(codeValue: string): string {\n return `((BisCore.Category.CodeValue = '${codeValue}') OR (BisCore.Category.UserLabel = '${codeValue}'))`;\n }\n\n private isFloat(n: unknown): boolean {\n return Number(n) === n && n % 1 !== 0;\n }\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface QueryBuilderActionPanelProps {
|
|
3
|
+
onClickNext: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare const QueryBuilderActionPanel: ({ onClickNext }: QueryBuilderActionPanelProps) => JSX.Element;
|
|
6
|
+
//# sourceMappingURL=QueryBuilderActionPanel.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.QueryBuilderActionPanel = void 0;
|
|
7
|
+
/*---------------------------------------------------------------------------------------------
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
12
|
+
const react_1 = __importDefault(require("react"));
|
|
13
|
+
const QueryBuilderActionPanel = ({ onClickNext }) => {
|
|
14
|
+
return (react_1.default.createElement(itwinui_react_1.Button, { styleType: 'high-visibility', id: 'save-app', onClick: onClickNext }, "Next"));
|
|
15
|
+
};
|
|
16
|
+
exports.QueryBuilderActionPanel = QueryBuilderActionPanel;
|
|
17
|
+
//# sourceMappingURL=QueryBuilderActionPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryBuilderActionPanel.js","sourceRoot":"","sources":["../../../../src/widget/components/QueryBuilderActionPanel.tsx"],"names":[],"mappings":";;;;;;AAAA;;;+FAG+F;AAC/F,wDAA8C;AAC9C,kDAA0B;AAMnB,MAAM,uBAAuB,GAAG,CAAC,EAAE,WAAW,EAAgC,EAAE,EAAE;IACvF,OAAO,CACL,8BAAC,sBAAM,IACL,SAAS,EAAC,iBAAiB,EAC3B,EAAE,EAAC,UAAU,EACb,OAAO,EAAE,WAAW,WAGb,CACV,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,uBAAuB,2BAUlC","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 { Button } from \"@itwin/itwinui-react\";\nimport React from \"react\";\n\nexport interface QueryBuilderActionPanelProps {\n onClickNext: () => void;\n}\n\nexport const QueryBuilderActionPanel = ({ onClickNext }: QueryBuilderActionPanelProps) => {\n return (\n <Button\n styleType='high-visibility'\n id='save-app'\n onClick={onClickNext}\n >\n Next\n </Button>\n );\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { GroupingCustomUI } from "./customUI/GroupingMappingCustomUI";
|
|
3
|
+
export interface QueryBuilderCustomUIProps {
|
|
4
|
+
queryGenerationType: string;
|
|
5
|
+
groupUIs: GroupingCustomUI[];
|
|
6
|
+
isUpdating: boolean;
|
|
7
|
+
resetView: () => Promise<void>;
|
|
8
|
+
setQuery: (query: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const QueryBuilderCustomUI: ({ queryGenerationType, groupUIs, isUpdating, resetView, setQuery, }: QueryBuilderCustomUIProps) => JSX.Element;
|
|
11
|
+
//# sourceMappingURL=QueryBuilderCustomUI.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.QueryBuilderCustomUI = void 0;
|
|
7
|
+
/*---------------------------------------------------------------------------------------------
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const utils_1 = require("./utils");
|
|
13
|
+
const QueryBuilderCustomUI = ({ queryGenerationType, groupUIs, isUpdating, resetView, setQuery, }) => {
|
|
14
|
+
if (queryGenerationType && queryGenerationType.length > 0) {
|
|
15
|
+
const selectedCustomUI = groupUIs.find((e) => e.name === queryGenerationType);
|
|
16
|
+
if (selectedCustomUI) {
|
|
17
|
+
return react_1.default.createElement(selectedCustomUI.uiComponent, {
|
|
18
|
+
updateQuery: setQuery,
|
|
19
|
+
isUpdating,
|
|
20
|
+
resetView,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return react_1.default.createElement(utils_1.EmptyMessage, { message: "No query generation method selected. " });
|
|
25
|
+
};
|
|
26
|
+
exports.QueryBuilderCustomUI = QueryBuilderCustomUI;
|
|
27
|
+
//# sourceMappingURL=QueryBuilderCustomUI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryBuilderCustomUI.js","sourceRoot":"","sources":["../../../../src/widget/components/QueryBuilderCustomUI.tsx"],"names":[],"mappings":";;;;;;AAAA;;;+FAG+F;AAC/F,kDAA0B;AAE1B,mCAAuC;AAUhC,MAAM,oBAAoB,GAAG,CAAC,EACnC,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,QAAQ,GACkB,EAAE,EAAE;IAC9B,IAAI,mBAAmB,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE;QACzD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,mBAAmB,CAAC,CAAC;QAC9E,IAAI,gBAAgB,EAAE;YACpB,OAAO,eAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,WAAW,EAAE;gBACvD,WAAW,EAAE,QAAQ;gBACrB,UAAU;gBACV,SAAS;aACV,CAAC,CAAC;SACJ;KACF;IACD,OAAO,8BAAC,oBAAY,IAAC,OAAO,EAAC,uCAAuC,GAAG,CAAC;AAC1E,CAAC,CAAC;AAlBW,QAAA,oBAAoB,wBAkB/B","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 from \"react\";\nimport type { GroupingCustomUI } from \"./customUI/GroupingMappingCustomUI\";\nimport { EmptyMessage } from \"./utils\";\n\nexport interface QueryBuilderCustomUIProps {\n queryGenerationType: string;\n groupUIs: GroupingCustomUI[];\n isUpdating: boolean;\n resetView: () => Promise<void>;\n setQuery: (query: string) => void;\n}\n\nexport const QueryBuilderCustomUI = ({\n queryGenerationType,\n groupUIs,\n isUpdating,\n resetView,\n setQuery,\n}: QueryBuilderCustomUIProps) => {\n if (queryGenerationType && queryGenerationType.length > 0) {\n const selectedCustomUI = groupUIs.find((e) => e.name === queryGenerationType);\n if (selectedCustomUI) {\n return React.createElement(selectedCustomUI.uiComponent, {\n updateQuery: setQuery,\n isUpdating,\n resetView,\n });\n }\n }\n return <EmptyMessage message=\"No query generation method selected. \" />;\n};\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { SelectOption } from "@itwin/itwinui-react";
|
|
3
|
+
import type { QueryBuilderCustomUIProps } from "./QueryBuilderCustomUI";
|
|
4
|
+
import "./QueryBuilderStep.scss";
|
|
5
|
+
declare const defaultDisplayStrings: {
|
|
6
|
+
groupBy: string;
|
|
7
|
+
};
|
|
8
|
+
export interface QueryBuilderStepProps extends QueryBuilderCustomUIProps {
|
|
9
|
+
isHidden: boolean;
|
|
10
|
+
onChange: (value: string) => Promise<void>;
|
|
11
|
+
getOptions: SelectOption<string>[];
|
|
12
|
+
displayStrings?: Partial<typeof defaultDisplayStrings>;
|
|
13
|
+
}
|
|
14
|
+
export declare const QueryBuilderStep: ({ isHidden, onChange, getOptions, displayStrings: userDisplayStrings, ...rest }: QueryBuilderStepProps) => JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=QueryBuilderStep.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.QueryBuilderStep = void 0;
|
|
7
|
+
/*---------------------------------------------------------------------------------------------
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
13
|
+
const QueryBuilderCustomUI_1 = require("./QueryBuilderCustomUI");
|
|
14
|
+
require("./QueryBuilderStep.scss");
|
|
15
|
+
const defaultDisplayStrings = {
|
|
16
|
+
groupBy: "Group By",
|
|
17
|
+
};
|
|
18
|
+
const QueryBuilderStep = ({ isHidden, onChange, getOptions, displayStrings: userDisplayStrings, ...rest }) => {
|
|
19
|
+
const containerClassName = isHidden ? "gmw-hide" : "gmw-query-builder-container";
|
|
20
|
+
const displayStrings = react_1.default.useMemo(() => ({ ...defaultDisplayStrings, ...userDisplayStrings }), [userDisplayStrings]);
|
|
21
|
+
return (react_1.default.createElement(itwinui_react_1.Fieldset, { legend: displayStrings.groupBy, className: containerClassName },
|
|
22
|
+
react_1.default.createElement("span", null,
|
|
23
|
+
react_1.default.createElement(itwinui_react_1.Label, { htmlFor: 'query-combo-input' }, "Query Generation Tool"),
|
|
24
|
+
react_1.default.createElement(itwinui_react_1.ComboBox, { value: rest.queryGenerationType, inputProps: {
|
|
25
|
+
id: "query-combo-input",
|
|
26
|
+
}, options: getOptions, onChange: onChange })),
|
|
27
|
+
react_1.default.createElement(QueryBuilderCustomUI_1.QueryBuilderCustomUI, { ...rest })));
|
|
28
|
+
};
|
|
29
|
+
exports.QueryBuilderStep = QueryBuilderStep;
|
|
30
|
+
//# sourceMappingURL=QueryBuilderStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryBuilderStep.js","sourceRoot":"","sources":["../../../../src/widget/components/QueryBuilderStep.tsx"],"names":[],"mappings":";;;;;;AAAA;;;+FAG+F;AAC/F,kDAA0B;AAE1B,wDAAiE;AAEjE,iEAA8D;AAC9D,mCAAiC;AAEjC,MAAM,qBAAqB,GAAG;IAC5B,OAAO,EAAE,UAAU;CACpB,CAAC;AASK,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAyB,EAAE,EAAE;IACzI,MAAM,kBAAkB,GAAG,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,6BAA6B,CAAC;IAEjF,MAAM,cAAc,GAAG,eAAK,CAAC,OAAO,CAClC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,qBAAqB,EAAE,GAAG,kBAAkB,EAAE,CAAC,EAC3D,CAAC,kBAAkB,CAAC,CACrB,CAAC;IAEF,OAAO,CACL,8BAAC,wBAAQ,IAAC,MAAM,EAAE,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,kBAAkB;QACrE;YACE,8BAAC,qBAAK,IAAC,OAAO,EAAC,mBAAmB,4BAA8B;YAChE,8BAAC,wBAAQ,IACP,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAC/B,UAAU,EAAE;oBACV,EAAE,EAAE,mBAAmB;iBACxB,EACD,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,QAAQ,GAClB,CACG;QACP,8BAAC,2CAAoB,OACf,IAAI,GACR,CACO,CACZ,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,gBAAgB,oBA0B3B","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 from \"react\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { ComboBox, Fieldset, Label } from \"@itwin/itwinui-react\";\nimport type { QueryBuilderCustomUIProps } from \"./QueryBuilderCustomUI\";\nimport { QueryBuilderCustomUI } from \"./QueryBuilderCustomUI\";\nimport \"./QueryBuilderStep.scss\";\n\nconst defaultDisplayStrings = {\n groupBy: \"Group By\",\n};\n\nexport interface QueryBuilderStepProps extends QueryBuilderCustomUIProps {\n isHidden: boolean;\n onChange: (value: string) => Promise<void>;\n getOptions: SelectOption<string>[];\n displayStrings?: Partial<typeof defaultDisplayStrings>;\n}\n\nexport const QueryBuilderStep = ({ isHidden, onChange, getOptions, displayStrings: userDisplayStrings, ...rest }: QueryBuilderStepProps) => {\n const containerClassName = isHidden ? \"gmw-hide\" : \"gmw-query-builder-container\";\n\n const displayStrings = React.useMemo(\n () => ({ ...defaultDisplayStrings, ...userDisplayStrings }),\n [userDisplayStrings]\n );\n\n return (\n <Fieldset legend={displayStrings.groupBy} className={containerClassName}>\n <span>\n <Label htmlFor='query-combo-input'>Query Generation Tool</Label>\n <ComboBox\n value={rest.queryGenerationType}\n inputProps={{\n id: \"query-combo-input\",\n }}\n options={getOptions}\n onChange={onChange}\n />\n </span>\n <QueryBuilderCustomUI\n {...rest}\n />\n </Fieldset>\n );\n};\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
|
+
|
|
7
|
+
.gmw-hide {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
.gmw-query-builder-container {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: $iui-baseline;
|
|
14
|
+
flex-grow: 1;
|
|
15
|
+
min-width: 0;
|
|
16
|
+
min-height: 0;
|
|
17
|
+
overflow: auto;
|
|
18
|
+
}
|
|
@@ -51,7 +51,7 @@ const SelectMappings = ({ iModelId, onSelect, onCancel, backFn, displayStrings:
|
|
|
51
51
|
react_1.useEffect(() => {
|
|
52
52
|
void fetchMappings(setMappings, iModelId, setIsLoading, getAccessToken, mappingClient);
|
|
53
53
|
}, [getAccessToken, mappingClient, iModelId, setIsLoading]);
|
|
54
|
-
const displayStrings = { ...defaultDisplayStrings, ...userDisplayStrings };
|
|
54
|
+
const displayStrings = react_1.default.useMemo(() => ({ ...defaultDisplayStrings, ...userDisplayStrings }), [userDisplayStrings]);
|
|
55
55
|
const mappingsColumns = react_1.useMemo(() => [
|
|
56
56
|
{
|
|
57
57
|
Header: "Table",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectMappings.js","sourceRoot":"","sources":["../../../../src/widget/components/SelectMappings.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,wDAK8B;AAC9B,+CAAyE;AAEzE,yEAAkE;AAElE,gCAA8B;AAC9B,mCAAsC;AAEtC,iFAAiF;AAEjF,MAAM,qBAAqB,GAAG;IAC5B,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,aAAa,GAAG,KAAK,EACzB,WAA4D,EAC5D,QAAgB,EAChB,YAA2D,EAC3D,cAAgC,EAChC,cAA+B,EAC/B,EAAE;IACF,IAAI;QACF,YAAY,CAAC,IAAI,CAAC,CAAC;QACnB,M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uC,EAAE,EAAE;gBACpD,UAAU,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;YAChD,CAAC,EACD,iBAAiB,EAAE,SAAS,GAC5B;QACF,uCAAK,SAAS,EAAC,yBAAyB;YACtC,8BAAC,sBAAM,IAAC,OAAO,EAAE,MAAM,WAAe;YACtC,8BAAC,sBAAM,IACL,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,GAAG,EAAE;oBACZ,QAAQ,CAAC,gBAAgB,CAAC,CAAC;gBAC7B,CAAC,EACD,QAAQ,EAAE,SAAS,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,WAG7C;YACT,8BAAC,sBAAM,IAAC,OAAO,EAAE,QAAQ,aAAiB,CACtC,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type {\n TablePaginatorRendererProps,\n} from \"@itwin/itwinui-react\";\nimport {\n Button,\n Table,\n tableFilters,\n TablePaginator,\n} from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport type { IMappingsClient, Mapping } from \"@itwin/insights-client\";\nimport { useMappingClient } from \"./context/MappingClientContext\";\nimport type { IMappingTyped } from \"./Mapping\";\nimport \"./SelectMapping.scss\";\nimport { handleError } from \"./utils\";\nimport type { GetAccessTokenFn } from \"./context/GroupingApiConfigContext\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\n\nconst defaultDisplayStrings = {\n mappings: \"Mappings\",\n};\n\nconst fetchMappings = async (\n setMappings: React.Dispatch<React.SetStateAction<Mapping[]>>,\n iModelId: string,\n setIsLoading: React.Dispatch<React.SetStateAction<boolean>>,\n getAccessToken: GetAccessTokenFn,\n mappingsClient: IMappingsClient\n) => {\n try {\n setIsLoading(true);\n const accessToken = await getAccessToken();\n const mappings = await mappingsClient.getMappings(accessToken, iModelId);\n setMappings(mappings);\n } catch (error: any) {\n handleError(error.status);\n } finally {\n setIsLoading(false);\n }\n};\n\ninterface SelectMappingsProps {\n iModelId: string;\n onSelect: (selectedMappings: IMappingTyped[]) => void;\n onCancel: () => void;\n backFn: () => void;\n displayStrings?: Partial<typeof defaultDisplayStrings>;\n}\n\nconst SelectMappings = ({\n iModelId,\n onSelect,\n onCancel,\n backFn,\n displayStrings: userDisplayStrings,\n}: SelectMappingsProps) => {\n const { getAccessToken } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [selectedMappings, setSelectedMappings] = useState<IMappingTyped[]>([]);\n const [mappings, setMappings] = useState<Mapping[]>([]);\n\n useEffect(() => {\n void fetchMappings(setMappings, iModelId, setIsLoading, getAccessToken, mappingClient);\n }, [getAccessToken, mappingClient, iModelId, setIsLoading]);\n\n const displayStrings = React.useMemo(\n () => ({ ...defaultDisplayStrings, ...userDisplayStrings }),\n [userDisplayStrings]\n );\n\n const mappingsColumns = useMemo(\n () => [\n {\n Header: \"Table\",\n columns: [\n {\n id: \"mappingName\",\n Header: `${displayStrings.mappings}`,\n accessor: \"mappingName\",\n Filter: tableFilters.TextFilter(),\n },\n {\n id: \"description\",\n Header: \"Description\",\n accessor: \"description\",\n Filter: tableFilters.TextFilter(),\n },\n ],\n },\n ],\n [displayStrings.mappings]\n );\n\n const pageSizeList = useMemo(() => [10, 25, 50], []);\n const paginator = useCallback(\n (props: TablePaginatorRendererProps) => (\n <TablePaginator {...props} pageSizeList={pageSizeList} />\n ),\n [pageSizeList]\n );\n\n return (\n <div className='gmw-select-mapping-container'>\n <Table<IMappingTyped>\n data={mappings}\n columns={mappingsColumns}\n className='gmw-select-mapping-table'\n emptyTableContent={`No ${displayStrings.mappings} available.`}\n isSortable\n isSelectable\n isLoading={isLoading}\n onSelect={(selectData: IMappingTyped[] | undefined) => {\n selectData && setSelectedMappings(selectData);\n }}\n paginatorRenderer={paginator}\n />\n <div className='gmw-import-action-panel'>\n <Button onClick={backFn}>Back</Button>\n <Button\n styleType='high-visibility'\n onClick={() => {\n onSelect(selectedMappings);\n }}\n disabled={isLoading || selectedMappings.length === 0}\n >\n Next\n </Button>\n <Button onClick={onCancel}>Cancel</Button>\n </div>\n </div>\n );\n};\n\nexport default SelectMappings;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SvgInfoCircular, SvgStatusError, SvgStatusSuccess, SvgStatusWarning } from "@itwin/itwinui-icons-react";
|
|
3
|
+
import "./StatusIcon.scss";
|
|
4
|
+
declare const StatusIconMap: {
|
|
5
|
+
readonly success: typeof SvgStatusSuccess;
|
|
6
|
+
readonly error: typeof SvgStatusError;
|
|
7
|
+
readonly warning: typeof SvgStatusWarning;
|
|
8
|
+
readonly informational: typeof SvgInfoCircular;
|
|
9
|
+
};
|
|
10
|
+
export declare const StatusIcon: ({ status, className, ...rest }: {
|
|
11
|
+
status: keyof typeof StatusIconMap;
|
|
12
|
+
className?: string | undefined;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=StatusIcon.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StatusIcon = void 0;
|
|
7
|
+
/*---------------------------------------------------------------------------------------------
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
13
|
+
const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
|
|
14
|
+
require("./StatusIcon.scss");
|
|
15
|
+
const StatusIconMap = {
|
|
16
|
+
success: itwinui_icons_react_1.SvgStatusSuccess,
|
|
17
|
+
error: itwinui_icons_react_1.SvgStatusError,
|
|
18
|
+
warning: itwinui_icons_react_1.SvgStatusWarning,
|
|
19
|
+
informational: itwinui_icons_react_1.SvgInfoCircular,
|
|
20
|
+
};
|
|
21
|
+
const StatusIcon = ({ status, className, ...rest }) => {
|
|
22
|
+
const Element = StatusIconMap[status];
|
|
23
|
+
return react_1.default.createElement(Element, { className: classnames_1.default("gmw-status-icon", `gmw-status-icon-${status}`, className), ...rest });
|
|
24
|
+
};
|
|
25
|
+
exports.StatusIcon = StatusIcon;
|
|
26
|
+
//# sourceMappingURL=StatusIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusIcon.js","sourceRoot":"","sources":["../../../../src/widget/components/StatusIcon.tsx"],"names":[],"mappings":";;;;;;AAAA;;;gGAGgG;AAChG,kDAA0B;AAC1B,4DAAoC;AACpC,oEAAiH;AACjH,6BAA2B;AAE3B,MAAM,aAAa,GAAG;IACpB,OAAO,EAAE,sCAAgB;IACzB,KAAK,EAAE,oCAAc;IACrB,OAAO,EAAE,sCAAgB;IACzB,aAAa,EAAE,qCAAe;CACtB,CAAC;AAEJ,MAAM,UAAU,GAAG,CAAC,EACzB,MAAM,EACN,SAAS,EACT,GAAG,IAAI,EAIR,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,8BAAC,OAAO,IAAC,SAAS,EAAE,oBAAU,CAAC,iBAAiB,EAAE,mBAAmB,MAAM,EAAE,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CAAC;AACjH,CAAC,CAAC;AAVW,QAAA,UAAU,cAUrB","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 from \"react\";\nimport classnames from \"classnames\";\nimport { SvgInfoCircular, SvgStatusError, SvgStatusSuccess, SvgStatusWarning } from \"@itwin/itwinui-icons-react\";\nimport \"./StatusIcon.scss\";\n\nconst StatusIconMap = {\n success: SvgStatusSuccess,\n error: SvgStatusError,\n warning: SvgStatusWarning,\n informational: SvgInfoCircular,\n} as const;\n\nexport const StatusIcon = ({\n status,\n className,\n ...rest\n}: {\n status: keyof typeof StatusIconMap;\n className?: string;\n}) => {\n const Element = StatusIconMap[status];\n return <Element className={classnames(\"gmw-status-icon\", `gmw-status-icon-${status}`, className)} {...rest} />;\n};\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
@import "@itwin/itwinui-css/scss/icon/variables";
|
|
6
|
+
|
|
7
|
+
.gmw-status-icon {
|
|
8
|
+
width: $iui-icons-default;
|
|
9
|
+
height: $iui-icons-default;
|
|
10
|
+
|
|
11
|
+
&-success {
|
|
12
|
+
fill: var(--iui-icons-color-positive);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&-error {
|
|
16
|
+
fill: var(--iui-icons-color-negative);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-warning {
|
|
20
|
+
fill: var(--iui-icons-color-warning);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-informational {
|
|
24
|
+
fill: var(--iui-icons-color-primary);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -3,12 +3,10 @@ import type { PropertyRecord } from "@itwin/appui-abstract";
|
|
|
3
3
|
import type { QueryBuilder } from "../QueryBuilder";
|
|
4
4
|
export interface PropertySelection {
|
|
5
5
|
currentPropertyList: PropertyRecord[];
|
|
6
|
-
setCurrentPropertyList: (value: PropertyRecord[]) => void;
|
|
6
|
+
setCurrentPropertyList: (value: PropertyRecord[] | ((value: PropertyRecord[]) => PropertyRecord[])) => void;
|
|
7
7
|
setQuery: (value: string) => void;
|
|
8
8
|
queryBuilder?: QueryBuilder;
|
|
9
|
-
setQueryBuilder: (value: QueryBuilder | undefined) => void;
|
|
10
9
|
isUpdating: boolean;
|
|
11
|
-
resetView: () => Promise<void>;
|
|
12
10
|
}
|
|
13
11
|
export declare const PropertyGridWrapperContext: React.Context<PropertySelection>;
|
|
14
12
|
export declare const usePropertyGridWrapper: () => PropertySelection;
|
|
@@ -29,9 +29,7 @@ exports.PropertyGridWrapperContext = React.createContext({
|
|
|
29
29
|
currentPropertyList: [],
|
|
30
30
|
setCurrentPropertyList: () => [],
|
|
31
31
|
setQuery: () => "",
|
|
32
|
-
setQueryBuilder: () => undefined,
|
|
33
32
|
isUpdating: false,
|
|
34
|
-
resetView: async () => { },
|
|
35
33
|
});
|
|
36
34
|
const usePropertyGridWrapper = () => {
|
|
37
35
|
const context = React.useContext(exports.PropertyGridWrapperContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyGridWrapperContext.js","sourceRoot":"","sources":["../../../../../src/widget/components/context/PropertyGridWrapperContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,6CAA+B;
|
|
1
|
+
{"version":3,"file":"PropertyGridWrapperContext.js","sourceRoot":"","sources":["../../../../../src/widget/components/context/PropertyGridWrapperContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,6CAA+B;AAYlB,QAAA,0BAA0B,GAAG,KAAK,CAAC,aAAa,CAAoB;IAC/E,mBAAmB,EAAE,EAAE;IACvB,sBAAsB,EAAE,GAAG,EAAE,CAAC,EAAE;IAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE;IAClB,UAAU,EAAE,KAAK;CAClB,CAAC,CAAC;AAEI,MAAM,sBAAsB,GAAG,GAAsB,EAAE;IAC5D,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,kCAA0B,CAAC,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,2FAA2F,CAC5F,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AARW,QAAA,sBAAsB,0BAQjC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { QueryBuilder } from \"../QueryBuilder\";\n\nexport interface PropertySelection {\n currentPropertyList: PropertyRecord[];\n setCurrentPropertyList: (value: PropertyRecord[] | ((value: PropertyRecord[]) => PropertyRecord[])) => void;\n setQuery: (value: string) => void;\n queryBuilder?: QueryBuilder;\n isUpdating: boolean;\n}\n\nexport const PropertyGridWrapperContext = React.createContext<PropertySelection>({\n currentPropertyList: [],\n setCurrentPropertyList: () => [],\n setQuery: () => \"\",\n isUpdating: false,\n});\n\nexport const usePropertyGridWrapper = (): PropertySelection => {\n const context = React.useContext(PropertyGridWrapperContext);\n if (!context) {\n throw new Error(\n \"usePropertyGridWrapperContext should be used within a PropertyGridWrapperContext provider\"\n );\n }\n return context;\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./GroupQueryBuilderCustomUI.scss";
|
|
3
3
|
import type { GroupingCustomUIProps } from "./GroupingMappingCustomUI";
|
|
4
|
-
export declare const GroupQueryBuilderCustomUI: ({ isUpdating, resetView,
|
|
4
|
+
export declare const GroupQueryBuilderCustomUI: ({ updateQuery, isUpdating, resetView, }: GroupingCustomUIProps) => JSX.Element;
|
|
5
5
|
//# sourceMappingURL=GroupQueryBuilderCustomUI.d.ts.map
|
|
@@ -28,55 +28,74 @@ const react_1 = __importStar(require("react"));
|
|
|
28
28
|
const appui_react_1 = require("@itwin/appui-react");
|
|
29
29
|
const presentation_frontend_1 = require("@itwin/presentation-frontend");
|
|
30
30
|
const presentation_common_1 = require("@itwin/presentation-common");
|
|
31
|
-
|
|
31
|
+
require("./GroupQueryBuilderCustomUI.scss");
|
|
32
|
+
const QueryBuilder_1 = require("../QueryBuilder");
|
|
33
|
+
const presentation_components_1 = require("@itwin/presentation-components");
|
|
34
|
+
const components_react_1 = require("@itwin/components-react");
|
|
35
|
+
const core_react_1 = require("@itwin/core-react");
|
|
32
36
|
const PropertyGridWrapperContext_1 = require("../context/PropertyGridWrapperContext");
|
|
37
|
+
const PropertyAction_1 = require("../PropertyAction");
|
|
33
38
|
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
34
|
-
|
|
35
|
-
const
|
|
39
|
+
const createPropertyDataProvider = (keys, iModelConnection) => {
|
|
40
|
+
const dataProvider = new presentation_components_1.PresentationPropertyDataProvider({
|
|
41
|
+
imodel: iModelConnection,
|
|
42
|
+
ruleset: presentation_components_1.DEFAULT_PROPERTY_GRID_RULESET,
|
|
43
|
+
});
|
|
44
|
+
dataProvider.keys = keys;
|
|
45
|
+
dataProvider.isNestedPropertyCategoryGroupingEnabled = true;
|
|
46
|
+
return dataProvider;
|
|
47
|
+
};
|
|
48
|
+
const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView, }) => {
|
|
36
49
|
const iModelConnection = appui_react_1.useActiveIModelConnection();
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
if (!iModelConnection) {
|
|
51
|
+
throw new Error("This component requires an active iModelConnection.");
|
|
52
|
+
}
|
|
53
|
+
const [size, setSize] = react_1.useState({ width: 0, height: 0 });
|
|
54
|
+
const [dataProvider, setDataProvider] = react_1.useState(undefined);
|
|
40
55
|
const [currentPropertyList, setCurrentPropertyList] = react_1.useState([]);
|
|
56
|
+
const [selectionKeySet, setSelectionKeyset] = react_1.useState(new presentation_common_1.KeySet());
|
|
57
|
+
const [queryBuilder, setQueryBuilder] = react_1.useState();
|
|
41
58
|
react_1.useEffect(() => {
|
|
42
|
-
|
|
43
|
-
throw new Error("This component requires an active iModelConnection.");
|
|
44
|
-
}
|
|
45
|
-
}, [iModelConnection]);
|
|
46
|
-
react_1.useEffect(() => {
|
|
47
|
-
const _onSelectionChanged = async (evt, selectionProvider) => {
|
|
48
|
-
setSelected(true);
|
|
49
|
-
setCurrentPropertyList([]);
|
|
59
|
+
const onSelectionChanged = async (evt, selectionProvider) => {
|
|
50
60
|
const selection = selectionProvider.getSelection(evt.imodel, evt.level);
|
|
51
61
|
const keys = new presentation_common_1.KeySet(selection);
|
|
52
|
-
|
|
62
|
+
setSelectionKeyset(keys);
|
|
63
|
+
const dataProvider = createPropertyDataProvider(keys, iModelConnection);
|
|
64
|
+
setDataProvider(dataProvider);
|
|
65
|
+
setQueryBuilder(new QueryBuilder_1.QueryBuilder(dataProvider));
|
|
53
66
|
};
|
|
54
67
|
return iModelConnection
|
|
55
|
-
? presentation_frontend_1.Presentation.selection.selectionChange.addListener(
|
|
56
|
-
() => { };
|
|
68
|
+
? presentation_frontend_1.Presentation.selection.selectionChange.addListener(onSelectionChanged)
|
|
69
|
+
: () => { };
|
|
57
70
|
}, [iModelConnection]);
|
|
58
|
-
const
|
|
71
|
+
const onClickResetButton = async () => {
|
|
72
|
+
queryBuilder === null || queryBuilder === void 0 ? void 0 : queryBuilder.resetQueryBuilder();
|
|
59
73
|
updateQuery("");
|
|
60
|
-
queryBuilder === null || queryBuilder === void 0 ? void 0 : queryBuilder.resetQuery();
|
|
61
74
|
setCurrentPropertyList([]);
|
|
62
75
|
if (resetView)
|
|
63
76
|
await resetView().catch((e) =>
|
|
64
77
|
/* eslint-disable no-console */
|
|
65
78
|
console.error(e));
|
|
66
79
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
const resize = react_1.useCallback((width, height) => setSize({ width, height }), []);
|
|
81
|
+
const propertyContextValues = react_1.useMemo(() => ({
|
|
82
|
+
currentPropertyList,
|
|
83
|
+
setCurrentPropertyList,
|
|
84
|
+
queryBuilder,
|
|
85
|
+
setQuery: updateQuery,
|
|
86
|
+
isUpdating: isUpdating !== null && isUpdating !== void 0 ? isUpdating : false,
|
|
87
|
+
}), [currentPropertyList, isUpdating, queryBuilder, updateQuery]);
|
|
88
|
+
const actionButtonRenderers = react_1.useMemo(() => [
|
|
89
|
+
({ property }) => (react_1.default.createElement(PropertyAction_1.PropertyAction, { property: property })),
|
|
90
|
+
], []);
|
|
91
|
+
return (react_1.default.createElement("div", { className: "gmw-select-query-generator-container" }, !dataProvider || selectionKeySet.size === 0 ? (react_1.default.createElement(itwinui_react_1.Alert, { type: 'informational' }, "Please select on an element within the viewer first, then select properties to generate a group query.")) :
|
|
92
|
+
react_1.default.createElement(react_1.default.Fragment, null,
|
|
93
|
+
react_1.default.createElement("div", { className: "gmw-select-property-grid-container" },
|
|
94
|
+
react_1.default.createElement(core_react_1.ResizableContainerObserver, { onResize: resize }),
|
|
95
|
+
react_1.default.createElement(PropertyGridWrapperContext_1.PropertyGridWrapperContext.Provider, { value: propertyContextValues },
|
|
96
|
+
react_1.default.createElement(components_react_1.VirtualizedPropertyGridWithDataProvider, { dataProvider: dataProvider, width: size.width, height: size.height, actionButtonRenderers: actionButtonRenderers }))),
|
|
97
|
+
react_1.default.createElement("div", { className: "gmw-select-reset-button" },
|
|
98
|
+
react_1.default.createElement(itwinui_react_1.Button, { styleType: "default", size: "small", onClick: onClickResetButton }, "Reset")))));
|
|
80
99
|
};
|
|
81
100
|
exports.GroupQueryBuilderCustomUI = GroupQueryBuilderCustomUI;
|
|
82
101
|
//# sourceMappingURL=GroupQueryBuilderCustomUI.js.map
|