@itwin/grouping-mapping-widget 0.22.0 → 0.23.1
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/WidgetShell/GroupingMapping.js +5 -1
- package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -1
- package/lib/cjs/WidgetShell/GroupingMappingContent.js +5 -1
- package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -1
- package/lib/cjs/common/hooks/useIsMounted.d.ts +2 -0
- package/lib/cjs/common/hooks/useIsMounted.js +20 -0
- package/lib/cjs/common/hooks/useIsMounted.js.map +1 -0
- package/lib/cjs/common/utils.d.ts +1 -0
- package/lib/cjs/common/utils.js +13 -1
- package/lib/cjs/common/utils.js.map +1 -1
- package/lib/cjs/components/Constants.d.ts +4 -0
- package/lib/cjs/components/Constants.js +13 -0
- package/lib/cjs/components/Constants.js.map +1 -0
- package/lib/cjs/components/GroupingMappingContext.d.ts +5 -0
- package/lib/cjs/components/GroupingMappingContext.js +31 -19
- package/lib/cjs/components/GroupingMappingContext.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupAction.js +61 -57
- package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
- package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
- package/lib/cjs/components/Groups/GroupItem.js +1 -1
- package/lib/cjs/components/Groups/GroupItem.js.map +1 -1
- package/lib/cjs/components/Groups/GroupMenuActions.js +5 -1
- package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -1
- package/lib/cjs/components/Groups/Groups.d.ts +3 -2
- package/lib/cjs/components/Groups/Groups.js +8 -4
- package/lib/cjs/components/Groups/Groups.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsShowHideButtons.d.ts +2 -2
- package/lib/cjs/components/Groups/GroupsShowHideButtons.js +8 -4
- package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsView.js +1 -1
- package/lib/cjs/components/Groups/GroupsView.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsVisualization.d.ts +1 -1
- package/lib/cjs/components/Groups/GroupsVisualization.js +112 -66
- package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsVisualizationActions.d.ts +6 -4
- package/lib/cjs/components/Groups/GroupsVisualizationActions.js +8 -6
- package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsVisualizationActions.scss +1 -0
- package/lib/cjs/components/Groups/groupsHelpers.d.ts +20 -7
- package/lib/cjs/components/Groups/groupsHelpers.js +15 -71
- package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +1 -5
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js +17 -31
- package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.d.ts +32 -0
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js +31 -0
- package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -0
- package/lib/cjs/components/Groups/hooks/useVisualization.js +4 -4
- package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -1
- package/lib/cjs/components/Mappings/Editing/MappingAction.js +5 -1
- package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +5 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +5 -1
- package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js +5 -1
- package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +5 -1
- package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectIModel.js +6 -3
- package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectITwin.js +5 -1
- package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -1
- package/lib/cjs/components/Mappings/Import/SelectMappings.js +5 -1
- package/lib/cjs/components/Mappings/Import/SelectMappings.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingsView.js +5 -1
- package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +5 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +16 -21
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +5 -1
- package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -1
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +5 -1
- package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +5 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js +5 -1
- package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -1
- package/lib/cjs/components/Properties/GroupColorToggle.js +13 -10
- package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +7 -3
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +5 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +5 -1
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyAction.js +5 -1
- package/lib/cjs/components/Properties/PropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyMenu.js +5 -1
- package/lib/cjs/components/Properties/PropertyMenu.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js +5 -1
- package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
- package/lib/cjs/components/Properties/PropertyTable.js +5 -1
- package/lib/cjs/components/Properties/PropertyTable.js.map +1 -1
- package/lib/cjs/components/SharedComponents/ActionPanel.js +5 -1
- package/lib/cjs/components/SharedComponents/ActionPanel.js.map +1 -1
- package/lib/cjs/components/SharedComponents/DeleteModal.js +5 -1
- package/lib/cjs/components/SharedComponents/DeleteModal.js.map +1 -1
- package/lib/cjs/components/context/GroupHilitedElementsContext.d.ts +9 -16
- package/lib/cjs/components/context/GroupHilitedElementsContext.js +13 -10
- package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -1
- package/lib/cjs/components/context/GroupingApiConfigContext.js +5 -1
- package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -1
- package/lib/cjs/components/context/PropertiesContext.js +5 -1
- package/lib/cjs/components/context/PropertiesContext.js.map +1 -1
- package/lib/cjs/components/context/PropertyGridWrapperContext.js +5 -1
- package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +5 -1
- package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/grouping-mapping-widget.js +5 -1
- package/lib/cjs/grouping-mapping-widget.js.map +1 -1
- package/lib/cjs/test/GroupingMappingCustomUI.test.js +5 -1
- package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/cjs/test/MockFactory.js +5 -1
- package/lib/cjs/test/MockFactory.js.map +1 -1
- package/lib/cjs/test/PropertyFieldsHelpers.d.ts +4 -20
- package/lib/cjs/test/test-utils.js +13 -1
- package/lib/cjs/test/test-utils.js.map +1 -1
- package/lib/esm/common/hooks/useIsMounted.d.ts +2 -0
- package/lib/esm/common/hooks/useIsMounted.js +16 -0
- package/lib/esm/common/hooks/useIsMounted.js.map +1 -0
- package/lib/esm/common/utils.d.ts +1 -0
- package/lib/esm/common/utils.js +11 -0
- package/lib/esm/common/utils.js.map +1 -1
- package/lib/esm/components/Constants.d.ts +4 -0
- package/lib/esm/components/Constants.js +10 -0
- package/lib/esm/components/Constants.js.map +1 -0
- package/lib/esm/components/GroupingMappingContext.d.ts +5 -0
- package/lib/esm/components/GroupingMappingContext.js +27 -19
- package/lib/esm/components/GroupingMappingContext.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupAction.js +57 -57
- package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
- package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
- package/lib/esm/components/Groups/GroupItem.js +1 -1
- package/lib/esm/components/Groups/GroupItem.js.map +1 -1
- package/lib/esm/components/Groups/Groups.d.ts +3 -2
- package/lib/esm/components/Groups/Groups.js +3 -3
- package/lib/esm/components/Groups/Groups.js.map +1 -1
- package/lib/esm/components/Groups/GroupsShowHideButtons.d.ts +2 -2
- package/lib/esm/components/Groups/GroupsShowHideButtons.js +3 -3
- package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -1
- package/lib/esm/components/Groups/GroupsView.js +1 -1
- package/lib/esm/components/Groups/GroupsView.js.map +1 -1
- package/lib/esm/components/Groups/GroupsVisualization.d.ts +1 -1
- package/lib/esm/components/Groups/GroupsVisualization.js +109 -67
- package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/esm/components/Groups/GroupsVisualizationActions.d.ts +6 -4
- package/lib/esm/components/Groups/GroupsVisualizationActions.js +9 -7
- package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -1
- package/lib/esm/components/Groups/GroupsVisualizationActions.scss +1 -0
- package/lib/esm/components/Groups/groupsHelpers.d.ts +20 -7
- package/lib/esm/components/Groups/groupsHelpers.js +13 -68
- package/lib/esm/components/Groups/groupsHelpers.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +1 -5
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js +18 -32
- package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -1
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.d.ts +32 -0
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js +25 -0
- package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -0
- package/lib/esm/components/Groups/hooks/useVisualization.js +4 -4
- package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -1
- package/lib/esm/components/Mappings/Import/SelectIModel.js +1 -2
- package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -1
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +13 -22
- package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/esm/components/Properties/GroupColorToggle.js +9 -10
- package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +3 -3
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/esm/components/context/GroupHilitedElementsContext.d.ts +9 -16
- package/lib/esm/components/context/GroupHilitedElementsContext.js +8 -9
- package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -1
- package/lib/esm/test/PropertyFieldsHelpers.d.ts +4 -20
- package/lib/esm/test/test-utils.js +8 -0
- package/lib/esm/test/test-utils.js.map +1 -1
- package/package.json +27 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortableHorizontalTile.js","sourceRoot":"","sources":["../../../../../src/components/Properties/GroupProperties/SortableHorizontalTile.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SortableHorizontalTile.js","sourceRoot":"","sources":["../../../../../src/components/Properties/GroupProperties/SortableHorizontalTile.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+CAAyC;AACzC,gDAAgD;AAEhD,0EAAuE;AACvE,kDAAyC;AACzC,oEAAmE;AACnE,wDAA4C;AAM5C,MAAM,sBAAsB,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,EAA+B,EAAE,EAAE;IAC/E,MAAM,EACJ,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,GACX,GAAG,IAAA,sBAAW,EAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAExB,MAAM,KAAK,GAAG;QACZ,SAAS,EAAE,eAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC5C,UAAU;KACX,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,UAAU,EAAE;YACf,OAAO;SACR;QACD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC;QACxC,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,uCACE,GAAG,EAAE,UAAU,KACX,UAAU,EACd,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE;QAElE,8BAAC,+BAAc,IACb,UAAU,EACR,8BAAC,oBAAI,IAAC,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,aAAa,KAAK,SAAS;gBACvG,8BAAC,2CAAqB,OAAG,CACpB,KAEL,KAAK,GACT,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,sBAAsB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React, { useEffect } from \"react\";\nimport { useSortable } from \"@dnd-kit/sortable\";\nimport type { HorizontalTileProps } from \"../../SharedComponents/HorizontalTile\";\nimport { HorizontalTile } from \"../../SharedComponents/HorizontalTile\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { SvgDragHandleVertical } from \"@itwin/itwinui-icons-react\";\nimport { Icon } from \"@itwin/itwinui-react\";\n\ninterface SortableHorizontalTileProps extends HorizontalTileProps {\n id: string;\n}\n\nconst SortableHorizontalTile = ({ id, ...props }: SortableHorizontalTileProps) => {\n const {\n attributes,\n listeners,\n isDragging,\n setNodeRef,\n transform,\n transition,\n } = useSortable({ id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n useEffect(() => {\n if (!isDragging) {\n return;\n }\n document.body.style.cursor = \"grabbing\";\n return () => {\n document.body.style.cursor = \"\";\n };\n }, [isDragging]);\n\n return (\n <div\n ref={setNodeRef}\n {...attributes}\n style={{ ...style, visibility: isDragging ? \"hidden\" : \"visible\" }}\n >\n <HorizontalTile\n dragHandle={\n <Icon className=\"gmw-drag-icon\" size=\"large\" style={{ cursor: \"grab\" }} title=\"Drag & Drop\" {...listeners}>\n <SvgDragHandleVertical />\n </Icon>\n }\n {...props}\n />\n </div>\n );\n};\n\nexport default SortableHorizontalTile;\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyAction.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyAction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertyAction.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyAction.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+CAAgE;AAEhE,0DAA4D;AAC5D,sFAA+E;AAC/E,wDAAgD;AAChD,iCAA+B;AAO/B,MAAM,oBAAoB,GAAG,CAC3B,QAAwB,EACxB,mBAAqC,EACrC,YAAsC,EACtC,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAElE,MAAM,yBAAyB,GAAG,IAAA,mBAAW,EAC3C,CAAC,QAAwB,EAAW,EAAE;QACpC,IAAI,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS,EAAE;YAChE,OAAO,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAA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c;QACd,YAAY;QACZ,sBAAsB;QACtB,QAAQ;KACT,CAAC,CAAC;IAEH,OAAO,CACL,uCAAK,SAAS,EAAC,iCAAiC,IAC7C,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS;QAC3D,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,CACtC,8BAAC,wBAAQ,IACP,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,0BAA0B,EACpC,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,iBAAiB,GAC5B,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAzDW,QAAA,cAAc,kBAyDzB","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 = (\n property: PropertyRecord,\n currentPropertyList: PropertyRecord[],\n queryBuilder: QueryBuilder | undefined\n) => {\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 (\n property.value.items.length === 0 &&\n currentPropertyList.includes(property)\n );\n }\n return Object.values(property.value.members).every(\n (subProp: PropertyRecord) => checkIfPropertyIsSelected(subProp)\n );\n },\n [currentPropertyList]\n );\n\n const isPropertySelected = checkIfPropertyIsSelected(property);\n\n const addProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (\n prop.value.valueFormat === PropertyValueFormat.Primitive &&\n !currentPropertyList.includes(prop) &&\n (await queryBuilder?.addProperty(prop))\n ) {\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 {\n currentPropertyList,\n queryBuilder,\n setCurrentPropertyList,\n setQuery,\n isUpdating,\n } = usePropertyGridWrapper();\n\n const {\n isPropertySelected,\n addProperty,\n removeProperty,\n isCheckboxLoading,\n setIsCheckboxLoading,\n } = usePropertySelection(property, currentPropertyList, queryBuilder);\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) =>\n prevList.filter((x) => x !== property)\n );\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n } else {\n if (await addProperty(property)) {\n setCurrentPropertyList((prevList) => prevList.concat(property));\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n }\n }\n }, [\n addProperty,\n isPropertySelected,\n property,\n removeProperty,\n queryBuilder,\n setCurrentPropertyList,\n setQuery,\n ]);\n\n return (\n <div className=\"gmw-property-selection-checkbox\">\n {property.value.valueFormat === PropertyValueFormat.Primitive &&\n property.value.value !== undefined && (\n <Checkbox\n checked={isPropertySelected}\n onChange={onPropertySelectionChanged}\n disabled={isUpdating}\n isLoading={isCheckboxLoading}\n />\n )}\n </div>\n );\n};\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyMenu.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertyMenu.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+CAAuC;AACvC,+BAA6B;AAC7B,6EAA0E;AAC1E,uDAA+D;AAC/D,0EAAmE;AACnE,kFAAkF;AAElF,oEAAoE;AACpE,4FAAyF;AACzF,wFAAqF;AAgB9E,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,mCAAmC,EACnC,8BAA8B,EAC9B,cAAc,GAAG,KAAK,EACtB,mBAAmB,GAAG,KAAK,EAC3B,0BAA0B,GAAG,KAAK,GAChB,EAAE,EAAE;IACtB,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC;IAC7B,MA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AAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/G,CAAC,EACD,CAAC,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAC9D,CAAC;IACF,MAAM,EAAE,SAAS,EAAE,2BAA2B,EAAE,WAAW,EAAE,yBAAyB,EAAE,GACtF,IAAA,sCAAuB,EAAoB,uBAAuB,EAAE,8BAA8B,CAAC,CAAC;IAEtG,OAAO,CACL,uCAAK,SAAS,EAAC,2BAA2B;QACvC,CAAC,cAAc,IAAI,CAClB,8BAAC,uCAAkB,IACjB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,uBAAuB,EACnC,aAAa,EAAE,0BAA0B,EACzC,SAAS,EAAE,wBAAwB,EACnC,eAAe,EAAE,eAAe,IAAI,EAAE,EACtC,OAAO,EAAE,sBAAsB,GAC/B,CACH;QACA,CAAC,mBAAmB,IAAI,CACvB,8BAAC,iDAAuB,IACtB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,4BAA4B,EACxC,aAAa,EAAE,+BAA+B,EAC9C,SAAS,EAAE,6BAA6B,EACxC,oBAAoB,EAAE,oBAAoB,IAAI,EAAE,EAChD,OAAO,EAAE,2BAA2B,GACpC,CACH;QACA,CAAC,0BAA0B,IAAI,CAC9B,8BAAC,+CAAsB,IACrB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,mCAAmC,EAC/C,aAAa,EAAE,8BAA8B,EAC7C,SAAS,EAAE,2BAA2B,EACtC,kBAAkB,EAAE,2BAA2B,IAAI,EAAE,EACrD,OAAO,EAAE,yBAAyB,GAClC,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AA3FW,QAAA,YAAY,gBA2FvB","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, { useMemo } from \"react\";\nimport \"./PropertyMenu.scss\";\nimport { GroupPropertyTable } from \"./GroupProperties/GroupPropertyTable\";\nimport { useCombinedFetchRefresh } from \"./hooks/useFetchData\";\nimport { useMappingClient } from \"../context/MappingClientContext\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport type { CalculatedProperty, CustomCalculation, Group, GroupProperty, Mapping } from \"@itwin/insights-client\";\nimport { usePropertiesContext } from \"../context/PropertiesContext\";\nimport { CalculatedPropertyTable } from \"./CalculatedProperties/CalculatedPropertyTable\";\nimport { CustomCalculationTable } from \"./CustomCalculations/CustomCalculationTable\";\n\nexport interface PropertyMenuProps {\n mapping: Mapping;\n group: Group;\n onClickAddGroupProperty?: () => void;\n onClickModifyGroupProperty?: (groupProperty: GroupProperty) => void;\n onClickAddCalculatedProperty?: () => void;\n onClickModifyCalculatedProperty?: (calculatedProperty: CalculatedProperty) => void;\n onClickAddCustomCalculationProperty?: () => void;\n onClickModifyCustomCalculation?: (customCalculation: CustomCalculation) => void;\n hideGroupProps?: boolean;\n hideCalculatedProps?: boolean;\n hideCustomCalculationProps?: boolean;\n}\n\nexport const PropertyMenu = ({\n mapping,\n group,\n onClickAddGroupProperty,\n onClickModifyGroupProperty,\n onClickAddCalculatedProperty,\n onClickModifyCalculatedProperty,\n onClickAddCustomCalculationProperty,\n onClickModifyCustomCalculation,\n hideGroupProps = false,\n hideCalculatedProps = false,\n hideCustomCalculationProps = false,\n}: PropertyMenuProps) => {\n const groupId = group.id;\n const mappingId = mapping.id;\n const { getAccessToken, iModelId } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n const {\n groupProperties,\n setGroupProperties,\n calculatedProperties,\n setCalculatedProperties,\n customCalculationProperties,\n setCustomCalculationProperties,\n } = usePropertiesContext();\n\n const fetchGroupProperties = useMemo(\n () => {\n return async () => mappingClient.getGroupProperties(await getAccessToken(), iModelId, mappingId, groupId);\n },\n [getAccessToken, mappingClient, iModelId, mappingId, groupId],\n );\n const { isLoading: isLoadingGroupProperties, refreshData: refreshGroupProperties } =\n useCombinedFetchRefresh<GroupProperty>(fetchGroupProperties, setGroupProperties);\n\n const fetchCalculatedProperties = useMemo(\n () => {\n return async () => mappingClient.getCalculatedProperties(await getAccessToken(), iModelId, mappingId, groupId);\n },\n [getAccessToken, mappingClient, iModelId, mappingId, groupId],\n );\n const { isLoading: isLoadingCalculatedProperties, refreshData: refreshCalculatedProperties } =\n useCombinedFetchRefresh<CalculatedProperty>(fetchCalculatedProperties, setCalculatedProperties);\n\n const fetchCustomCalculations = useMemo(\n () => {\n return async () => mappingClient.getCustomCalculations(await getAccessToken(), iModelId, mappingId, groupId);\n },\n [getAccessToken, mappingClient, iModelId, mappingId, groupId],\n );\n const { isLoading: isLoadingCustomCalculations, refreshData: refreshCustomCalculations } =\n useCombinedFetchRefresh<CustomCalculation>(fetchCustomCalculations, setCustomCalculationProperties);\n\n return (\n <div className='gmw-property-menu-wrapper'>\n {!hideGroupProps && (\n <GroupPropertyTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddGroupProperty}\n onClickModify={onClickModifyGroupProperty}\n isLoading={isLoadingGroupProperties}\n groupProperties={groupProperties ?? []}\n refresh={refreshGroupProperties}\n />\n )}\n {!hideCalculatedProps && (\n <CalculatedPropertyTable\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddCalculatedProperty}\n onClickModify={onClickModifyCalculatedProperty}\n isLoading={isLoadingCalculatedProperties}\n calculatedProperties={calculatedProperties ?? []}\n refresh={refreshCalculatedProperties}\n />\n )}\n {!hideCustomCalculationProps && (\n <CustomCalculationTable\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddCustomCalculationProperty}\n onClickModify={onClickModifyCustomCalculation}\n isLoading={isLoadingCustomCalculations}\n customCalculations={customCalculationProperties ?? []}\n refresh={refreshCustomCalculations}\n />\n )}\n </div>\n );\n};\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyMenuWithVisualization.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenuWithVisualization.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertyMenuWithVisualization.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenuWithVisualization.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+CAAwC;AAExC,iDAA8C;AAC9C,yDAAsD;AACtD,wDAA2E;AAC3E,mEAAgE;AAChE,oEAA2D;AAC3D,gDAA8C;AAMvC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,KAAK,EACL,KAAK,EACL,GAAG,IAAI,EAC4B,EAAE,EAAE;IACvC,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAErF,OAAO,CACL,8BAAC,uCAAuB,IAAC,SAAS,EAAC,+BAA+B;QAChE,uCAAK,SAAS,EAAC,+BAA+B;YAC5C,8BAAC,mCAAgB,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAC,MAAM,GAAG;YACrE,8BAAC,0BAAU,IACT,SAAS,EAAC,YAAY,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAC9C,KAAK,EAAC,mBAAmB;gBAEzB,8BAAC,mCAAa,OAAG,CACN,CACT;QACN,8BAAC,2BAAY,IAAC,KAAK,EAAE,KAAK,KAAM,IAAI,GAAI;QACxC,8BAAC,6CAAqB,IACpB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC,EAC/C,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAE,KAAK,CAAC,SAAS,GAC1B,CACsB,CAC3B,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,6BAA6B,iCA4BxC","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, { useState } from \"react\";\nimport type { PropertyMenuProps } from \"./PropertyMenu\";\nimport { PropertyMenu } from \"./PropertyMenu\";\nimport { GroupColorToggle } from \"./GroupColorToggle\";\nimport { IconButton, InformationPanelWrapper } from \"@itwin/itwinui-react\";\nimport { GroupInformationPanel } from \"./GroupInformationPanel\";\nimport { SvgProperties } from \"@itwin/itwinui-icons-react\";\nimport \"./PropertyMenuWithVisualization.scss\";\n\nexport interface PropertyMenuWithVisualizationProps extends PropertyMenuProps {\n color: string;\n}\n\nexport const PropertyMenuWithVisualization = ({\n group,\n color,\n ...rest\n}: PropertyMenuWithVisualizationProps) => {\n const [isInformationPanelOpen, setIsInformationPanelOpen] = useState<boolean>(false);\n\n return (\n <InformationPanelWrapper className='gmw-property-menu-vis-wrapper'>\n <div className=\"gmw-property-menu-vis-toolbar\">\n <GroupColorToggle group={group} color={color} labelPosition=\"left\" />\n <IconButton\n styleType='borderless'\n onClick={() => setIsInformationPanelOpen(true)}\n title='Group Information'\n >\n <SvgProperties />\n </IconButton>\n </div>\n <PropertyMenu group={group} {...rest} />\n <GroupInformationPanel\n isOpen={isInformationPanelOpen}\n onClose={() => setIsInformationPanelOpen(false)}\n query={group.query}\n groupName={group.groupName}\n />\n </InformationPanelWrapper>\n );\n};\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyTable.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertyTable.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,wDAA6C;AAC7C,+CAA8D;AAG9D,kFAA0D;AAC1D,iEAA8D;AAC9D,gCAA8B;AAiBvB,MAAM,aAAa,GAAG,CAA8B,EACzD,YAAY,EACZ,cAAc,EACd,IAAI,EACJ,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,cAAc,GACQ,EAAE,EAAE;IAE1B,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAgB,SAAS,CAAC,CAAC;IAEjF,MAAM,oBAAoB,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE;QAClD,MAAM,cAAc,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;IAE1C,MAAM,qBAAqB,GAAG,IAAA,mBAAW,EAAC,CAAC,QAAW,EAAE,EAAE;QACxD,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAClC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CACnC,cAAc,CAAC,qBAAqB,CAAC,EAAE,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAElF,OAAO,CACL,uCAAK,SAAS,EAAC,8BAA8B;QAC3C,8BAAC,2CAAoB,IACnB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,UAAU,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,GACpB;QACF,8BAAC,qBAAK,IACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAC3B,OAAO,EAAC,iBAAiB,EACzB,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,YAAY,aAAa,EAClD,UAAU,QACV,SAAS,EAAE,SAAS,GACpB;QACD,eAAe;YACd,8BAAC,qBAAW,IACV,UAAU,EAAE,eAAe,CAAC,YAAY,EACxC,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE,iBAAiB,GAC1B,CACA,CACP,CAAC;AACJ,CAAC,CAAC;AApDW,QAAA,aAAa,iBAoDxB","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 { Table } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport type { Column } from \"react-table\";\nimport type { CreateTypeFromInterface } from \"../../common/utils\";\nimport DeleteModal from \"../SharedComponents/DeleteModal\";\nimport { PropertyTableToolbar } from \"./PropertyTableToolbar\";\nimport \"./PropertyTable.scss\";\n\nexport interface PropertyTableItem {\n propertyName: string;\n id: string;\n}\n\nexport interface PropertyTableProps<T extends PropertyTableItem> {\n propertyType: string;\n columnsFactory: (handleShowDeleteModal: (value: T) => void) => Array<Column<T>>;\n data: T[];\n isLoading: boolean;\n onClickAdd?: () => void;\n refreshProperties: () => Promise<void>;\n deleteProperty: (propertyId: string) => Promise<void>;\n}\n\nexport const PropertyTable = <T extends PropertyTableItem>({\n propertyType,\n columnsFactory,\n data,\n isLoading,\n onClickAdd,\n refreshProperties,\n deleteProperty,\n}: PropertyTableProps<T>) => {\n\n const [showDeleteModal, setShowDeleteModal] = useState<T | undefined>(undefined);\n\n const handleDeleteProperty = useCallback(async () => {\n await deleteProperty(showDeleteModal?.id ?? \"\");\n }, [deleteProperty, showDeleteModal?.id]);\n\n const handleShowDeleteModal = useCallback((property: T) => {\n setShowDeleteModal(property);\n }, []);\n\n const handleCloseDeleteModal = () => {\n setShowDeleteModal(undefined);\n };\n\n const memoizedColumns = useMemo(() =>\n columnsFactory(handleShowDeleteModal), [columnsFactory, handleShowDeleteModal]);\n\n return (\n <div className=\"gmw-property-table-container\">\n <PropertyTableToolbar\n propertyType={propertyType}\n onClickAddProperty={onClickAdd}\n refreshProperties={refreshProperties}\n isLoading={isLoading}\n />\n <Table<CreateTypeFromInterface<T>>\n data={isLoading ? [] : data}\n density='extra-condensed'\n columns={memoizedColumns}\n emptyTableContent={`No ${propertyType} Properties`}\n isSortable\n isLoading={isLoading}\n />\n {showDeleteModal &&\n <DeleteModal\n entityName={showDeleteModal.propertyName}\n onClose={handleCloseDeleteModal}\n onDelete={handleDeleteProperty}\n refresh={refreshProperties}\n />}\n </div>\n );\n};\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionPanel.js","sourceRoot":"","sources":["../../../../src/components/SharedComponents/ActionPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActionPanel.js","sourceRoot":"","sources":["../../../../src/components/SharedComponents/ActionPanel.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,wDAA8C;AAC9C,6CAA+B;AAC/B,8BAA4B;AAC5B,qDAAkD;AAUlD,MAAM,WAAW,GAAG,CAAC,EACnB,MAAM,EACN,QAAQ,EACR,gBAAgB,GAAG,KAAK,EACxB,gBAAgB,GAAG,KAAK,EACxB,SAAS,GAAG,KAAK,GACA,EAAe,EAAE;IAClC,OAAO,CACL,6BAAK,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAC,4BAA4B;QACrD,6BAAK,SAAS,EAAC,kBAAkB;YAC9B,SAAS;gBACR,oBAAC,+BAAc,OAAG;YAEpB,oBAAC,sBAAM,IACL,QAAQ,EAAE,gBAAgB,IAAI,SAAS,EACvC,SAAS,EAAC,iBAAiB,EAC3B,EAAE,EAAC,UAAU,EACb,OAAO,EAAE,MAAM,WAGR;YACR,QAAQ,IAAI,oBAAC,sBAAM,IAClB,SAAS,EAAC,SAAS,EACnB,IAAI,EAAC,QAAQ,EACb,EAAE,EAAC,QAAQ,EACX,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,gBAAgB,IAAI,SAAS,aAGhC,CACL,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,WAAW,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 { Button } from \"@itwin/itwinui-react\";\nimport * as React from \"react\";\nimport \"./ActionPanel.scss\";\nimport { LoadingSpinner } from \"./LoadingSpinner\";\n\nexport interface ActionPanelProps {\n onSave: () => void;\n onCancel?: () => void;\n isCancelDisabled?: boolean;\n isSavingDisabled?: boolean;\n isLoading?: boolean;\n}\n\nconst ActionPanel = ({\n onSave,\n onCancel,\n isCancelDisabled = false,\n isSavingDisabled = false,\n isLoading = false,\n}: ActionPanelProps): JSX.Element => {\n return (\n <div id='action' className='gmw-action-panel-container'>\n <div className='gmw-action-panel'>\n {isLoading &&\n <LoadingSpinner />\n }\n <Button\n disabled={isSavingDisabled || isLoading}\n styleType='high-visibility'\n id='save-app'\n onClick={onSave}\n >\n Save\n </Button>\n {onCancel && <Button\n styleType='default'\n type='button'\n id='cancel'\n onClick={onCancel}\n disabled={isCancelDisabled || isLoading}\n >\n Cancel\n </Button>}\n </div>\n </div>\n );\n};\n\nexport default ActionPanel;\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteModal.js","sourceRoot":"","sources":["../../../../src/components/SharedComponents/DeleteModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeleteModal.js","sourceRoot":"","sources":["../../../../src/components/SharedComponents/DeleteModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,wDAM8B;AAC9B,uDAAoD;AACpD,+CAAqD;AACrD,8BAA4B;AAC5B,qDAAkD;AAS3C,MAAM,WAAW,GAAG,CAAC,EAC1B,UAAU,EACV,OAAO,EACP,QAAQ,EACR,OAAO,GACU,EAAE,EAAE;IACrB,MAAM,CAAC,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAC,UAAU,CAAC,CAAC;IAE/C,MAAM,cAAc,GAAG,IAAA,yBAAW,EAAC;QACjC,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,KAAK,IAAI,EAAE;YACpB,OAAO,IAAI,MAAM,OAAO,EAAE,CAAC;YAC3B,OAAO,EAAE,CAAC;QACZ,CAAC;KACF,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACtC,cAAc,CAAC,MAAM,EAAE,CAAC;IAC1B,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;IAErB,OAAO,CACL;QACE,8BAAC,qBAAK,IACJ,KAAK,EAAC,SAAS,EACf,WAAW,EAAC,yBAAyB,EACrC,MAAM,EAAE,CAAC,CAAC,eAAe,EACzB,aAAa,EAAE,CAAC,cAAc,CAAC,SAAS,EACxC,OAAO,EAAE,OAAO;YAEhB,uCAAK,SAAS,EAAC,4BAA4B;gBACzC,8BAAC,oBAAI,IAAC,OAAO,EAAC,SAAS,EAAC,EAAE,EAAC,IAAI,sCAExB;gBACP,8CACG,8BAAC,oCAAoB,IAAC,IAAI,EAAE,GAAG,UAAU,GAAG,GAAI,CAC1C,CACL;YACN,8BAAC,8BAAc;gBACZ,cAAc,CAAC,SAAS;oBACvB,uCAAK,SAAS,EAAC,oBAAoB;wBACjC,8BAAC,+BAAc,OAAG,CACd;gBACR,8BAAC,sBAAM,IAAC,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,SAAS,aAEtF;gBACT,8BAAC,sBAAM,IACL,SAAS,EAAC,SAAS,EACnB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,cAAc,CAAC,SAAS,aAG3B,CACM,CACX,CACP,CACJ,CAAC;AACJ,CAAC,CAAC;AAxDW,QAAA,WAAW,eAwDtB;AAEF,kBAAe,mBAAW,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport {\n Button,\n MiddleTextTruncation,\n Modal,\n ModalButtonBar,\n Text,\n} from \"@itwin/itwinui-react\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport React, { useCallback, useState } from \"react\";\nimport \"./DeleteModal.scss\";\nimport { LoadingSpinner } from \"./LoadingSpinner\";\n\nexport interface DeleteModalProps {\n entityName: string;\n onClose: () => void;\n onDelete: () => Promise<void>;\n refresh?: () => Promise<void>;\n}\n\nexport const DeleteModal = ({\n entityName,\n onClose,\n onDelete,\n refresh,\n}: DeleteModalProps) => {\n const [localEntityName] = useState(entityName);\n\n const deleteMutation = useMutation({\n mutationFn: onDelete,\n onSuccess: async () => {\n refresh && await refresh();\n onClose();\n },\n });\n\n const deleteCallback = useCallback(() => {\n deleteMutation.mutate();\n }, [deleteMutation]);\n\n return (\n <>\n <Modal\n title='Confirm'\n modalRootId='grouping-mapping-widget'\n isOpen={!!localEntityName}\n isDismissible={!deleteMutation.isLoading}\n onClose={onClose}\n >\n <div className=\"gmw-delete-modal-body-text\">\n <Text variant=\"leading\" as=\"h3\">\n Are you sure you want to delete\n </Text>\n <strong>\n {<MiddleTextTruncation text={`${entityName}?`} />}\n </strong>\n </div>\n <ModalButtonBar>\n {deleteMutation.isLoading &&\n <div className=\"gmw-loading-delete\">\n <LoadingSpinner />\n </div>}\n <Button styleType='high-visibility' onClick={deleteCallback} disabled={deleteMutation.isLoading}>\n Delete\n </Button>\n <Button\n styleType='default'\n onClick={onClose}\n disabled={deleteMutation.isLoading}\n >\n Cancel\n </Button>\n </ModalButtonBar>\n </Modal>\n </>\n );\n};\n\nexport default DeleteModal;\n"]}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import type { MutableRefObject } from "react";
|
|
3
|
-
import type { Group } from "@itwin/insights-client";
|
|
4
|
-
import type { KeySet } from "@itwin/presentation-common";
|
|
5
|
-
export interface QueryCacheItem {
|
|
6
|
-
keySet: KeySet;
|
|
7
|
-
ids: string[];
|
|
8
|
-
}
|
|
9
2
|
export interface OverlappedInfo {
|
|
10
3
|
groupIds: string[];
|
|
11
4
|
elements: string[];
|
|
@@ -14,24 +7,24 @@ export interface OverlappedElementGroupPairs {
|
|
|
14
7
|
elementIds: Set<string>;
|
|
15
8
|
groupIds: Set<string>;
|
|
16
9
|
}
|
|
10
|
+
export interface OverlappedElementsMetadata {
|
|
11
|
+
overlappedElementsInfo: Map<string, OverlappedInfo[]>;
|
|
12
|
+
groupElementsInfo: Map<string, number>;
|
|
13
|
+
overlappedElementGroupPairs: OverlappedElementGroupPairs[];
|
|
14
|
+
}
|
|
17
15
|
export interface GroupHilitedElements {
|
|
18
|
-
hilitedElementsQueryCache: MutableRefObject<Map<string, QueryCacheItem>>;
|
|
19
16
|
hiddenGroupsIds: Set<string>;
|
|
20
17
|
showGroupColor: boolean;
|
|
21
|
-
groups: Group[];
|
|
22
18
|
currentHilitedGroups: number;
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
overlappedElementsMetadata: OverlappedElementsMetadata;
|
|
20
|
+
isVisualizationsEnabled: boolean;
|
|
25
21
|
isOverlappedColored: boolean;
|
|
26
|
-
overlappedElementGroupPairs: OverlappedElementGroupPairs[];
|
|
27
|
-
setGroups: (groups: Group[]) => void;
|
|
28
22
|
setHiddenGroupsIds: (hiddenGroupIds: Set<string>) => void;
|
|
29
23
|
setShowGroupColor: (showGroupColor: boolean | ((showGroupColor: boolean) => boolean)) => void;
|
|
30
24
|
setNumberOfVisualizedGroups: (numberOfVisualizedGroups: number | ((numberOfVisualizedGroups: number) => number)) => void;
|
|
31
|
-
|
|
32
|
-
setGroupElementsInfo: (groupElementsInfo: Map<string, number> | ((groupElementsInfo: Map<string, number>) => Map<string, number>)) => void;
|
|
25
|
+
setOverlappedElementsMetadata: (overlappedElementsMetaData: OverlappedElementsMetadata) => void;
|
|
33
26
|
setIsOverlappedColored: (isOverlappedColored: boolean | ((isOverlappedColored: boolean) => boolean)) => void;
|
|
34
|
-
|
|
27
|
+
setIsVisualizationsEnabled: (isVisualizationsEnabled: boolean | ((isVisualizationsEnabled: boolean) => boolean)) => void;
|
|
35
28
|
}
|
|
36
29
|
export declare const GroupHilitedElementsContext: React.Context<GroupHilitedElements>;
|
|
37
30
|
export declare const useGroupHilitedElementsContext: () => GroupHilitedElements;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -26,23 +30,22 @@ exports.useGroupHilitedElementsContext = exports.GroupHilitedElementsContext = v
|
|
|
26
30
|
*--------------------------------------------------------------------------------------------*/
|
|
27
31
|
const React = __importStar(require("react"));
|
|
28
32
|
exports.GroupHilitedElementsContext = React.createContext({
|
|
29
|
-
hilitedElementsQueryCache: { current: new Map() },
|
|
30
33
|
hiddenGroupsIds: new Set(),
|
|
31
34
|
showGroupColor: false,
|
|
32
|
-
groups: [],
|
|
33
35
|
currentHilitedGroups: 0,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
overlappedElementsMetadata: {
|
|
37
|
+
overlappedElementsInfo: new Map(),
|
|
38
|
+
groupElementsInfo: new Map(),
|
|
39
|
+
overlappedElementGroupPairs: [],
|
|
40
|
+
},
|
|
41
|
+
isVisualizationsEnabled: false,
|
|
36
42
|
isOverlappedColored: false,
|
|
37
|
-
overlappedElementGroupPairs: [],
|
|
38
|
-
setGroups: () => { },
|
|
39
43
|
setHiddenGroupsIds: () => { },
|
|
40
44
|
setShowGroupColor: () => { },
|
|
41
45
|
setNumberOfVisualizedGroups: () => { },
|
|
42
|
-
|
|
43
|
-
setGroupElementsInfo: () => { },
|
|
46
|
+
setOverlappedElementsMetadata: () => { },
|
|
44
47
|
setIsOverlappedColored: () => { },
|
|
45
|
-
|
|
48
|
+
setIsVisualizationsEnabled: () => { },
|
|
46
49
|
});
|
|
47
50
|
const useGroupHilitedElementsContext = () => {
|
|
48
51
|
const context = React.useContext(exports.GroupHilitedElementsContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupHilitedElementsContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupHilitedElementsContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GroupHilitedElementsContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupHilitedElementsContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,6CAA+B;AA+BlB,QAAA,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAAuB;IACnF,eAAe,EAAE,IAAI,GAAG,EAAE;IAC1B,cAAc,EAAE,KAAK;IACrB,oBAAoB,EAAE,CAAC;IACvB,0BAA0B,EAAE;QAC1B,sBAAsB,EAAE,IAAI,GAAG,EAAE;QACjC,iBAAiB,EAAE,IAAI,GAAG,EAAE;QAC5B,2BAA2B,EAAE,EAAE;KAChC;IACD,uBAAuB,EAAE,KAAK;IAC9B,mBAAmB,EAAE,KAAK;IAC1B,kBAAkB,EAAE,GAAG,EAAE,GAAG,CAAC;IAC7B,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC;IAC5B,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC;IACtC,6BAA6B,EAAE,GAAG,EAAE,GAAG,CAAC;IACxC,sBAAsB,EAAE,GAAG,EAAE,GAAG,CAAC;IACjC,0BAA0B,EAAE,GAAG,EAAE,GAAG,CAAC;CACtC,CAAC,CAAC;AAEI,MAAM,8BAA8B,GAAG,GAAyB,EAAE;IACvE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,mCAA2B,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,6FAA6F,CAC9F,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AARW,QAAA,8BAA8B,kCAQzC","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\";\nexport interface OverlappedInfo {\n groupIds: string[];\n elements: string[];\n}\n\nexport interface OverlappedElementGroupPairs {\n elementIds: Set<string>;\n groupIds: Set<string>;\n}\n\nexport interface OverlappedElementsMetadata {\n overlappedElementsInfo: Map<string, OverlappedInfo[]>;\n groupElementsInfo: Map<string, number>;\n overlappedElementGroupPairs: OverlappedElementGroupPairs[];\n}\nexport interface GroupHilitedElements {\n hiddenGroupsIds: Set<string>;\n showGroupColor: boolean;\n currentHilitedGroups: number;\n overlappedElementsMetadata: OverlappedElementsMetadata;\n isVisualizationsEnabled: boolean;\n isOverlappedColored: boolean;\n setHiddenGroupsIds: (hiddenGroupIds: Set<string>) => void;\n setShowGroupColor: (showGroupColor: boolean | ((showGroupColor: boolean) => boolean)) => void;\n setNumberOfVisualizedGroups: (numberOfVisualizedGroups: number | ((numberOfVisualizedGroups: number) => number)) => void;\n setOverlappedElementsMetadata: (overlappedElementsMetaData: OverlappedElementsMetadata) => void;\n setIsOverlappedColored: (isOverlappedColored: boolean | ((isOverlappedColored: boolean) => boolean)) => void;\n setIsVisualizationsEnabled: (isVisualizationsEnabled: boolean | ((isVisualizationsEnabled: boolean) => boolean)) => void;\n}\n\nexport const GroupHilitedElementsContext = React.createContext<GroupHilitedElements>({\n hiddenGroupsIds: new Set(),\n showGroupColor: false,\n currentHilitedGroups: 0,\n overlappedElementsMetadata: {\n overlappedElementsInfo: new Map(),\n groupElementsInfo: new Map(),\n overlappedElementGroupPairs: [],\n },\n isVisualizationsEnabled: false,\n isOverlappedColored: false,\n setHiddenGroupsIds: () => { },\n setShowGroupColor: () => { },\n setNumberOfVisualizedGroups: () => { },\n setOverlappedElementsMetadata: () => { },\n setIsOverlappedColored: () => { },\n setIsVisualizationsEnabled: () => { },\n});\n\nexport const useGroupHilitedElementsContext = (): GroupHilitedElements => {\n const context = React.useContext(GroupHilitedElementsContext);\n if (!context) {\n throw new Error(\n \"useGroupHilitedElementsContext should be used within a GroupHilitedElementsContext provider\"\n );\n }\n return context;\n};\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingApiConfigContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupingApiConfigContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GroupingApiConfigContext.js","sourceRoot":"","sources":["../../../../src/components/context/GroupingApiConfigContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,6CAA+B;AAC/B,iCAAsC;AAWzB,QAAA,+BAA+B,GAC1C,IAAA,qBAAa,EAA2B;IACtC,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;IAC9B,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,SAAS;IACjB,gBAAgB,EAAE,SAAS;CAC5B,CAAC,CAAC;AAEE,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,uCAA+B,CAAC,CAAC;IAClE,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,8FAA8F,CAC/F,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AARW,QAAA,2BAA2B,+BAQtC","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 { AccessToken } from \"@itwin/core-bentley\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport * as React from \"react\";\nimport { createContext } from \"react\";\n\nexport type ClientPrefix = \"\" | \"dev\" | \"qa\" | undefined;\nexport type GetAccessTokenFn = () => Promise<AccessToken>;\nexport interface GroupingMappingApiConfig {\n getAccessToken: GetAccessTokenFn;\n iModelId: string;\n iModelConnection?: IModelConnection;\n prefix?: ClientPrefix;\n}\n\nexport const GroupingMappingApiConfigContext =\n createContext<GroupingMappingApiConfig>({\n getAccessToken: async () => \"\",\n iModelId: \"\",\n prefix: undefined,\n iModelConnection: undefined,\n });\n\nexport const useGroupingMappingApiConfig = () => {\n const context = React.useContext(GroupingMappingApiConfigContext);\n if (!context) {\n throw new Error(\n \"useGroupingMappingApiConfig should be used within a GroupingMappingApiConfigContext provider\"\n );\n }\n return context;\n};\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertiesContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertiesContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertiesContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertiesContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,6CAA+B;AAclB,QAAA,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAa;IAC/D,cAAc,EAAE,KAAK;IACrB,kBAAkB,EAAE,GAAG,EAAE,GAAG,CAAC;IAC7B,uBAAuB,EAAE,GAAG,EAAE,GAAG,CAAC;IAClC,8BAA8B,EAAE,GAAG,EAAE,GAAG,CAAC;IACzC,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC;CAC7B,CAAC,CAAC;AAEI,MAAM,oBAAoB,GAAG,GAAe,EAAE;IACnD,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,yBAAiB,CAAC,CAAC;IACpD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,yEAAyE,CAC1E,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AARW,QAAA,oBAAoB,wBAQ/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 * as React from \"react\";\nimport type { CalculatedProperty, CustomCalculation, GroupProperty } from \"@itwin/insights-client\";\n\nexport interface Properties {\n showGroupColor: boolean;\n groupProperties?: GroupProperty[];\n calculatedProperties?: CalculatedProperty[];\n customCalculationProperties?: CustomCalculation[];\n setGroupProperties: (groupProperties: GroupProperty[]) => void;\n setCalculatedProperties: (calculatedProperties: CalculatedProperty[]) => void;\n setCustomCalculationProperties: (customCalculationProperties: CustomCalculation[]) => void;\n setShowGroupColor: (showGroupColor: boolean | ((showGroupColor: boolean) => boolean)) => void;\n}\n\nexport const PropertiesContext = React.createContext<Properties>({\n showGroupColor: false,\n setGroupProperties: () => { },\n setCalculatedProperties: () => { },\n setCustomCalculationProperties: () => { },\n setShowGroupColor: () => { },\n});\n\nexport const usePropertiesContext = (): Properties => {\n const context = React.useContext(PropertiesContext);\n if (!context) {\n throw new Error(\n \"usePropertiesContext should be used within a PropertiesContext provider\"\n );\n }\n return context;\n};\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyGridWrapperContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertyGridWrapperContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertyGridWrapperContext.js","sourceRoot":"","sources":["../../../../src/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 \"../Groups/QueryBuilder/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,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupQueryBuilderCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupQueryBuilderCustomUI.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GroupQueryBuilderCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupQueryBuilderCustomUI.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+CAAyE;AACzE,wEAA4D;AAK5D,oEAAoD;AACpD,4CAA0C;AAC1C,sEAAmE;AAEnE,4EAGwC;AAGxC,8DAAkF;AAClF,kDAA+D;AAE/D,sFAAmF;AACnF,iEAA8D;AAC9D,wDAAqD;AACrD,kFAAkF;AAClF,wDAAiD;AAEjD,MAAM,0BAA0B,GAAG,KAAK,EACtC,IAAY,EACZ,gBAAkC,EACS,EAAE;IAC7C,MAAM,YAAY,GAAG,IAAI,0DAAgC,CAAC;QACxD,MAAM,EAAE,gBAAgB;QACxB,OAAO,EAAE,uDAA6B;KACvC,CAAC,CAAC;IACH,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,uCAAuC,GAAG,IAAI,CAAC;IAC5D,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,CAAC;IAC1C,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,KAAK,yBAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,0CAA0C,CAAC,CAAC,CAAC;IACtK,IAAI,gBAAgB,EAAE;QACpB,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC;KAChC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAOK,MAAM,yBAAyB,GAAG,CAAC,EACxC,WAAW,EACX,UAAU,EACV,SAAS,GACa,EAAE,EAAE;IAC1B,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,sDAA2B,GAAE,CAAC;IAC3D,IAA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8BAAC,uCAA0B,IAAC,QAAQ,EAAE,MAAM,GAAI;gBAChD,8BAAC,uDAA0B,CAAC,QAAQ,IAAC,KAAK,EAAE,qBAAqB;oBAC/D,8BAAC,0DAAuC,IACtC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,qBAAqB,EAAE,qBAAqB,GAC5C,CACkC,CAClC;YACN,uCAAK,SAAS,EAAC,yBAAyB;gBACtC,8BAAC,sBAAM,IACL,SAAS,EAAC,SAAS,EACnB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,kBAAkB,YAGpB,CACL,CACL,CAED,CACP,CAAC;AACJ,CAAC,CAAC;AAnGW,QAAA,yBAAyB,6BAmGpC","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 {\n ISelectionProvider,\n SelectionChangeEventArgs,\n} 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 {\n DEFAULT_PROPERTY_GRID_RULESET,\n PresentationPropertyDataProvider,\n} 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 (\n keys: KeySet,\n iModelConnection: IModelConnection\n): 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((category) => category.label === IModelApp.localization.getLocalizedString(\"Presentation:selectedItems.categoryLabel\"));\n if (selectedCategory) {\n selectedCategory.expand = true;\n }\n return dataProvider;\n};\n\ninterface ContainerDimensions {\n width: number;\n height: number;\n}\n\nexport const GroupQueryBuilderCustomUI = ({\n updateQuery,\n isUpdating,\n resetView,\n}: 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] =\n 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 (\n evt: SelectionChangeEventArgs,\n selectionProvider: ISelectionProvider\n ) => {\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\n ? Presentation.selection.selectionChange.addListener(onSelectionChanged)\n : () => { };\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(\n () => [\n ({ property }: ActionButtonRendererProps) => (\n <PropertyAction property={property} />\n ),\n ],\n []\n );\n\n return (\n <div className=\"gmw-select-query-generator-container\">\n {!dataProvider || selectionKeySet.size === 0 ? (\n <Alert type='informational'>\n Please select on an element within the viewer first, then select properties to generate a group query.\n </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\n styleType=\"default\"\n size=\"small\"\n onClick={onClickResetButton}\n >\n Reset\n </Button>\n </div>\n </>\n }\n </div>\n );\n};\n\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grouping-mapping-widget.js","sourceRoot":"","sources":["../../src/grouping-mapping-widget.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grouping-mapping-widget.js","sourceRoot":"","sources":["../../src/grouping-mapping-widget.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,gDAAgD;AAChD,sEAAoD;AAEpD,0EAA0E;AAC1E,kFAAoJ;AAA3I,kIAAA,0BAA0B,OAAA;AAAE,2HAAA,mBAAmB,OAAA;AAAE,4HAAA,oBAAoB,OAAA;AAAE,wHAAA,gBAAgB,OAAA;AAChG,0FAAuL;AAApH,2IAAA,+BAA+B,OAAA;AAAE,uIAAA,2BAA2B,OAAA;AAC/H,yDAAuC;AAEvC,yCAAyC;AACzC,2DAAyE;AAAhE,oGAAA,QAAQ,OAAA;AACjB,2FAAmH;AAA1G,8HAAA,qBAAqB,OAAA;AAC9B,6EAAgG;AAAvF,8GAAA,aAAa,OAAA;AACtB,mEAAqF;AAA5E,4GAAA,YAAY,OAAA;AACrB,qFAA2G;AAAlG,0HAAA,mBAAmB,OAAA;AAC5B,6DAA6E;AAApE,wGAAA,UAAU,OAAA;AACnB,8EAA0G;AAAjG,gIAAA,sBAAsB,OAAA;AAC/B,qDAAiE;AAAxD,gGAAA,MAAM,OAAA;AACf,+EAAwG;AAA/F,0HAAA,mBAAmB,OAAA;AAC5B,uEAAwF;AAA/E,0GAAA,WAAW,OAAA;AACpB,qEAAuF;AAA9E,4GAAA,YAAY,OAAA;AACrB,uGAA0I;AAAjI,8IAAA,6BAA6B,OAAA;AACtC,mGAA4H;AAAnH,0HAAA,mBAAmB,OAAA;AAC5B,kHAAgJ;AAAvI,oIAAA,wBAAwB,OAAA;AACjC,wIAAiL;AAAxK,0JAAA,mCAAmC,OAAA;AAC5C,8GAA2I;AAAlI,kIAAA,uBAAuB,OAAA;AAChC,uFAAsF;AAA7E,gIAAA,sBAAsB,OAAA;AAC/B,uFAAsF;AAA7E,gIAAA,sBAAsB,OAAA;AAC/B,6FAA4F;AAAnF,sIAAA,yBAAyB,OAAA;AAClC,yFAAqM;AAAnK,sIAAA,2BAA2B,OAAA;AAE7D,gCAAgC;AAChC,6EAA2E;AAAlE,iIAAA,sBAAsB,OAAA","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*--------------------------------------------------------------------------------------------*/\n/** UI Provider for iTwin Viewer Applications */\nexport * from \"./WidgetShell/GroupingMappingWidget\";\n\n/** Interfaces for providing custom MappingClient and API configuration */\nexport { createDefaultMappingClient, createMappingClient, MappingClientContext, useMappingClient } from \"./components/context/MappingClientContext\";\nexport { ClientPrefix, GetAccessTokenFn, GroupingMappingApiConfig, GroupingMappingApiConfigContext, useGroupingMappingApiConfig } from \"./components/context/GroupingApiConfigContext\";\nexport * from \"@itwin/insights-client\";\n\n/** Internal components for custom UIs */\nexport { Mappings, MappingsProps } from \"./components/Mappings/Mappings\";\nexport { useMappingsOperations, MappingsOperationsProps } from \"./components/Mappings/hooks/useMappingsOperations\";\nexport { MappingAction, MappingActionProps } from \"./components/Mappings/Editing/MappingAction\";\nexport { MappingsView, MappingsViewProps } from \"./components/Mappings/MappingsView\";\nexport { useGroupsOperations, GroupsOperationsProps } from \"./components/Groups/hooks/useGroupsOperations\";\nexport { GroupsView, GroupsViewProps } from \"./components/Groups/GroupsView\";\nexport { GroupingMappingContext, GroupingMappingContextProps } from \"./components/GroupingMappingContext\";\nexport { Groups, GroupsProps } from \"./components/Groups/Groups\";\nexport { GroupsVisualization, GroupsVisualizationProps } from \"./components/Groups/GroupsVisualization\";\nexport { GroupAction, GroupActionProps } from \"./components/Groups/Editing/GroupAction\";\nexport { PropertyMenu, PropertyMenuProps } from \"./components/Properties/PropertyMenu\";\nexport { PropertyMenuWithVisualization, PropertyMenuWithVisualizationProps } from \"./components/Properties/PropertyMenuWithVisualization\";\nexport { GroupPropertyAction, GroupPropertyActionProps } from \"./components/Properties/GroupProperties/GroupPropertyAction\";\nexport { CalculatedPropertyAction, CalculatedPropertyActionProps } from \"./components/Properties/CalculatedProperties/CalculatedPropertyAction\";\nexport { CalculatedPropertyActionWithVisuals, CalculatedPropertyActionWithVisualsProps } from \"./components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals\";\nexport { CustomCalculationAction, CustomCalculationActionProps } from \"./components/Properties/CustomCalculations/CustomCalculationAction\";\nexport { SearchGroupingCustomUI } from \"./components/customUI/SearchGroupingCustomUI\";\nexport { ManualGroupingCustomUI } from \"./components/customUI/ManualGroupingCustomUI\";\nexport { GroupQueryBuilderCustomUI } from \"./components/customUI/GroupQueryBuilderCustomUI\";\nexport { GroupingMappingCustomUI, GroupingMappingCustomUIType, ContextCustomUI, GroupingCustomUI, GroupingCustomUIProps, ContextCustomUIProps } from \"./components/customUI/GroupingMappingCustomUI\";\n\n/** Formula DataType resolver */\nexport { resolveFormulaDataType } from \"./formula/FormulaDataTypeResolver\";\nexport { DataType, PropertyMap } from \"./formula/Types\";\nexport { IResult } from \"./formula/IResult\";\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|