@itwin/grouping-mapping-widget 0.16.0 → 0.17.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/decorators/BboxDimensionsDecorator.js +14 -17
- package/lib/cjs/decorators/BboxDimensionsDecorator.js.map +1 -1
- package/lib/cjs/formula/FormulaDataTypeResolver.js +1 -2
- package/lib/cjs/formula/FormulaDataTypeResolver.js.map +1 -1
- package/lib/cjs/formula/FormulaFunctionProvider.js +2 -3
- package/lib/cjs/formula/FormulaFunctionProvider.js.map +1 -1
- package/lib/cjs/test/GroupingMappingCustomUI.test.js +1 -2
- package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/cjs/test/PropertyFieldsHelpers.js +4 -7
- package/lib/cjs/test/PropertyFieldsHelpers.js.map +1 -1
- package/lib/cjs/test/QueryBuilder.test.js +3 -4
- package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
- package/lib/cjs/widget/GroupingMappingWidget.d.ts +2 -2
- package/lib/cjs/widget/GroupingMappingWidget.js +1 -3
- package/lib/cjs/widget/GroupingMappingWidget.js.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.scss +2 -3
- package/lib/cjs/widget/components/BlockingOverlay.scss +4 -5
- package/lib/cjs/widget/components/CalculatedPropertyAction.js +3 -4
- package/lib/cjs/widget/components/CalculatedPropertyAction.js.map +1 -1
- package/lib/cjs/widget/components/CalculatedPropertyAction.scss +1 -2
- package/lib/cjs/widget/components/CalculatedPropertyActionWithVisuals.js +6 -8
- package/lib/cjs/widget/components/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/cjs/widget/components/CalculatedPropertyActionWithVisuals.scss +1 -2
- package/lib/cjs/widget/components/ConfirmMappingsImport.js +4 -5
- package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +1 -1
- package/lib/cjs/widget/components/ConfirmMappingsImport.scss +7 -8
- package/lib/cjs/widget/components/CustomCalculationAction.js +10 -14
- package/lib/cjs/widget/components/CustomCalculationAction.js.map +1 -1
- package/lib/cjs/widget/components/CustomCalculationAction.scss +1 -2
- package/lib/cjs/widget/components/DeleteModal.js +1 -1
- package/lib/cjs/widget/components/DeleteModal.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.scss +1 -2
- package/lib/cjs/widget/components/GroupAction.js +5 -7
- package/lib/cjs/widget/components/GroupAction.js.map +1 -1
- package/lib/cjs/widget/components/GroupAction.scss +0 -1
- package/lib/cjs/widget/components/GroupColorLegend.scss +0 -1
- package/lib/cjs/widget/components/GroupColorToggle.d.ts +2 -2
- package/lib/cjs/widget/components/GroupColorToggle.js.map +1 -1
- package/lib/cjs/widget/components/GroupDetails.js +1 -1
- package/lib/cjs/widget/components/GroupDetails.js.map +1 -1
- package/lib/cjs/widget/components/GroupDetailsStep.scss +1 -2
- package/lib/cjs/widget/components/GroupMenuActions.scss +1 -2
- package/lib/cjs/widget/components/GroupPropertyAction.js +5 -6
- package/lib/cjs/widget/components/GroupPropertyAction.js.map +1 -1
- package/lib/cjs/widget/components/GroupPropertyAction.scss +13 -16
- package/lib/cjs/widget/components/GroupPropertyUtils.js +2 -3
- package/lib/cjs/widget/components/GroupPropertyUtils.js.map +1 -1
- package/lib/cjs/widget/components/Grouping.js +3 -4
- package/lib/cjs/widget/components/Grouping.js.map +1 -1
- package/lib/cjs/widget/components/Grouping.scss +9 -11
- package/lib/cjs/widget/components/GroupingMapping.js +16 -20
- package/lib/cjs/widget/components/GroupingMapping.js.map +1 -1
- package/lib/cjs/widget/components/GroupingMapping.scss +2 -3
- package/lib/cjs/widget/components/GroupingMappingContext.js +9 -13
- package/lib/cjs/widget/components/GroupingMappingContext.js.map +1 -1
- package/lib/cjs/widget/components/GroupingMappingRouter.js +5 -5
- package/lib/cjs/widget/components/GroupingMappingRouter.js.map +1 -1
- package/lib/cjs/widget/components/GroupsAddButton.scss +1 -2
- package/lib/cjs/widget/components/GroupsVisualization.js +1 -1
- package/lib/cjs/widget/components/GroupsVisualization.js.map +1 -1
- package/lib/cjs/widget/components/GroupsVisualization.scss +3 -3
- package/lib/cjs/widget/components/GroupsVisualizationActions.scss +0 -1
- package/lib/cjs/widget/components/HorizontalTile.js +4 -1
- package/lib/cjs/widget/components/HorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.scss +16 -15
- package/lib/cjs/widget/components/Mapping.js +27 -31
- package/lib/cjs/widget/components/Mapping.js.map +1 -1
- package/lib/cjs/widget/components/Mapping.scss +6 -12
- package/lib/cjs/widget/components/MappingAction.js +7 -9
- package/lib/cjs/widget/components/MappingAction.js.map +1 -1
- package/lib/cjs/widget/components/MappingAction.scss +1 -2
- package/lib/cjs/widget/components/MappingImportWizardModal.js +3 -2
- package/lib/cjs/widget/components/MappingImportWizardModal.js.map +1 -1
- package/lib/cjs/widget/components/MappingImportWizardModal.scss +4 -5
- package/lib/cjs/widget/components/PropertyAction.js +4 -5
- package/lib/cjs/widget/components/PropertyAction.js.map +1 -1
- package/lib/cjs/widget/components/PropertyMenu.js +3 -3
- package/lib/cjs/widget/components/PropertyMenu.js.map +1 -1
- package/lib/cjs/widget/components/PropertyMenu.scss +2 -2
- package/lib/cjs/widget/components/PropertyMenuWithVisualization.scss +1 -2
- package/lib/cjs/widget/components/PropertyTable.d.ts +1 -1
- package/lib/cjs/widget/components/PropertyTable.js +3 -4
- package/lib/cjs/widget/components/PropertyTable.js.map +1 -1
- package/lib/cjs/widget/components/PropertyTable.scss +1 -2
- package/lib/cjs/widget/components/QueryBuilder.js +19 -29
- package/lib/cjs/widget/components/QueryBuilder.js.map +1 -1
- package/lib/cjs/widget/components/QueryBuilderCustomUI.js +1 -1
- package/lib/cjs/widget/components/QueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/widget/components/QueryBuilderStep.scss +1 -2
- package/lib/cjs/widget/components/SelectIModel.scss +0 -1
- package/lib/cjs/widget/components/SelectITwin.js +1 -1
- package/lib/cjs/widget/components/SelectITwin.js.map +1 -1
- package/lib/cjs/widget/components/SelectITwin.scss +1 -2
- package/lib/cjs/widget/components/SelectMapping.scss +0 -1
- package/lib/cjs/widget/components/SortableHorizontalTile.js +2 -1
- package/lib/cjs/widget/components/SortableHorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/StatusIcon.d.ts +5 -6
- package/lib/cjs/widget/components/StatusIcon.scss +4 -8
- package/lib/cjs/widget/components/ToggleGroupVisibility.scss +1 -2
- package/lib/cjs/widget/components/WidgetHeader.js +1 -1
- package/lib/cjs/widget/components/WidgetHeader.js.map +1 -1
- package/lib/cjs/widget/components/WidgetHeader.scss +4 -12
- package/lib/cjs/widget/components/context/GroupingMappingCustomUIContext.js +1 -1
- package/lib/cjs/widget/components/context/GroupingMappingCustomUIContext.js.map +1 -1
- package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.js +2 -2
- package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.scss +1 -2
- 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 +2 -3
- package/lib/cjs/widget/components/customUI/SearchGroupingCustomUI.scss +2 -3
- package/lib/cjs/widget/components/groupsHelpers.js +1 -2
- package/lib/cjs/widget/components/groupsHelpers.js.map +1 -1
- package/lib/cjs/widget/components/utils.scss +1 -4
- package/lib/cjs/widget/components/viewerUtils.js +1 -2
- package/lib/cjs/widget/components/viewerUtils.js.map +1 -1
- package/lib/cjs/widget/hooks/useFetchData.js +1 -1
- package/lib/cjs/widget/hooks/useFetchData.js.map +1 -1
- package/lib/cjs/widget/hooks/useFormulaValidation.js +1 -2
- package/lib/cjs/widget/hooks/useFormulaValidation.js.map +1 -1
- package/lib/esm/decorators/BboxDimensionsDecorator.js +14 -17
- package/lib/esm/decorators/BboxDimensionsDecorator.js.map +1 -1
- package/lib/esm/formula/FormulaDataTypeResolver.js +1 -2
- package/lib/esm/formula/FormulaDataTypeResolver.js.map +1 -1
- package/lib/esm/formula/FormulaFunctionProvider.js +2 -3
- package/lib/esm/formula/FormulaFunctionProvider.js.map +1 -1
- package/lib/esm/test/GroupingMappingCustomUI.test.js +1 -2
- package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/esm/test/PropertyFieldsHelpers.js +4 -7
- package/lib/esm/test/PropertyFieldsHelpers.js.map +1 -1
- package/lib/esm/test/QueryBuilder.test.js +3 -4
- package/lib/esm/test/QueryBuilder.test.js.map +1 -1
- package/lib/esm/widget/GroupingMappingWidget.d.ts +2 -2
- package/lib/esm/widget/GroupingMappingWidget.js +1 -3
- package/lib/esm/widget/GroupingMappingWidget.js.map +1 -1
- package/lib/esm/widget/components/ActionPanel.scss +2 -3
- package/lib/esm/widget/components/BlockingOverlay.scss +4 -5
- package/lib/esm/widget/components/CalculatedPropertyAction.js +4 -5
- package/lib/esm/widget/components/CalculatedPropertyAction.js.map +1 -1
- package/lib/esm/widget/components/CalculatedPropertyAction.scss +1 -2
- package/lib/esm/widget/components/CalculatedPropertyActionWithVisuals.js +7 -9
- package/lib/esm/widget/components/CalculatedPropertyActionWithVisuals.js.map +1 -1
- package/lib/esm/widget/components/CalculatedPropertyActionWithVisuals.scss +1 -2
- package/lib/esm/widget/components/ConfirmMappingsImport.js +4 -5
- package/lib/esm/widget/components/ConfirmMappingsImport.js.map +1 -1
- package/lib/esm/widget/components/ConfirmMappingsImport.scss +7 -8
- package/lib/esm/widget/components/CustomCalculationAction.js +11 -15
- package/lib/esm/widget/components/CustomCalculationAction.js.map +1 -1
- package/lib/esm/widget/components/CustomCalculationAction.scss +1 -2
- package/lib/esm/widget/components/DeleteModal.js +2 -2
- package/lib/esm/widget/components/DeleteModal.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.scss +1 -2
- package/lib/esm/widget/components/GroupAction.js +5 -7
- package/lib/esm/widget/components/GroupAction.js.map +1 -1
- package/lib/esm/widget/components/GroupAction.scss +0 -1
- package/lib/esm/widget/components/GroupColorLegend.scss +0 -1
- package/lib/esm/widget/components/GroupColorToggle.d.ts +2 -2
- package/lib/esm/widget/components/GroupColorToggle.js.map +1 -1
- package/lib/esm/widget/components/GroupDetails.js +2 -2
- package/lib/esm/widget/components/GroupDetails.js.map +1 -1
- package/lib/esm/widget/components/GroupDetailsStep.scss +1 -2
- package/lib/esm/widget/components/GroupMenuActions.scss +1 -2
- package/lib/esm/widget/components/GroupPropertyAction.js +6 -7
- package/lib/esm/widget/components/GroupPropertyAction.js.map +1 -1
- package/lib/esm/widget/components/GroupPropertyAction.scss +13 -16
- package/lib/esm/widget/components/GroupPropertyUtils.js +2 -3
- package/lib/esm/widget/components/GroupPropertyUtils.js.map +1 -1
- package/lib/esm/widget/components/Grouping.js +4 -5
- package/lib/esm/widget/components/Grouping.js.map +1 -1
- package/lib/esm/widget/components/Grouping.scss +9 -11
- package/lib/esm/widget/components/GroupingMapping.js +16 -20
- package/lib/esm/widget/components/GroupingMapping.js.map +1 -1
- package/lib/esm/widget/components/GroupingMapping.scss +2 -3
- package/lib/esm/widget/components/GroupingMappingContext.js +9 -13
- package/lib/esm/widget/components/GroupingMappingContext.js.map +1 -1
- package/lib/esm/widget/components/GroupingMappingRouter.js +5 -5
- package/lib/esm/widget/components/GroupingMappingRouter.js.map +1 -1
- package/lib/esm/widget/components/GroupsAddButton.scss +1 -2
- package/lib/esm/widget/components/GroupsVisualization.js +1 -1
- package/lib/esm/widget/components/GroupsVisualization.js.map +1 -1
- package/lib/esm/widget/components/GroupsVisualization.scss +3 -3
- package/lib/esm/widget/components/GroupsVisualizationActions.scss +0 -1
- package/lib/esm/widget/components/HorizontalTile.js +5 -2
- package/lib/esm/widget/components/HorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.scss +16 -15
- package/lib/esm/widget/components/Mapping.js +28 -32
- package/lib/esm/widget/components/Mapping.js.map +1 -1
- package/lib/esm/widget/components/Mapping.scss +6 -12
- package/lib/esm/widget/components/MappingAction.js +8 -10
- package/lib/esm/widget/components/MappingAction.js.map +1 -1
- package/lib/esm/widget/components/MappingAction.scss +1 -2
- package/lib/esm/widget/components/MappingImportWizardModal.js +3 -2
- package/lib/esm/widget/components/MappingImportWizardModal.js.map +1 -1
- package/lib/esm/widget/components/MappingImportWizardModal.scss +4 -5
- package/lib/esm/widget/components/PropertyAction.js +4 -5
- package/lib/esm/widget/components/PropertyAction.js.map +1 -1
- package/lib/esm/widget/components/PropertyMenu.js +3 -3
- package/lib/esm/widget/components/PropertyMenu.js.map +1 -1
- package/lib/esm/widget/components/PropertyMenu.scss +2 -2
- package/lib/esm/widget/components/PropertyMenuWithVisualization.scss +1 -2
- package/lib/esm/widget/components/PropertyTable.d.ts +1 -1
- package/lib/esm/widget/components/PropertyTable.js +3 -4
- package/lib/esm/widget/components/PropertyTable.js.map +1 -1
- package/lib/esm/widget/components/PropertyTable.scss +1 -2
- package/lib/esm/widget/components/QueryBuilder.js +19 -29
- package/lib/esm/widget/components/QueryBuilder.js.map +1 -1
- package/lib/esm/widget/components/QueryBuilderCustomUI.js +1 -1
- package/lib/esm/widget/components/QueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/widget/components/QueryBuilderStep.scss +1 -2
- package/lib/esm/widget/components/SelectIModel.scss +0 -1
- package/lib/esm/widget/components/SelectITwin.js +2 -2
- package/lib/esm/widget/components/SelectITwin.js.map +1 -1
- package/lib/esm/widget/components/SelectITwin.scss +1 -2
- package/lib/esm/widget/components/SelectMapping.scss +0 -1
- package/lib/esm/widget/components/SortableHorizontalTile.js +2 -1
- package/lib/esm/widget/components/SortableHorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/StatusIcon.d.ts +5 -6
- package/lib/esm/widget/components/StatusIcon.scss +4 -8
- package/lib/esm/widget/components/ToggleGroupVisibility.scss +1 -2
- package/lib/esm/widget/components/WidgetHeader.js +2 -2
- package/lib/esm/widget/components/WidgetHeader.js.map +1 -1
- package/lib/esm/widget/components/WidgetHeader.scss +4 -12
- package/lib/esm/widget/components/context/GroupingMappingCustomUIContext.js +1 -1
- package/lib/esm/widget/components/context/GroupingMappingCustomUIContext.js.map +1 -1
- package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.js +2 -2
- package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
- package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.scss +1 -2
- package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.js +1 -1
- package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.js.map +1 -1
- package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.scss +2 -3
- package/lib/esm/widget/components/customUI/SearchGroupingCustomUI.scss +2 -3
- package/lib/esm/widget/components/groupsHelpers.js +1 -2
- package/lib/esm/widget/components/groupsHelpers.js.map +1 -1
- package/lib/esm/widget/components/utils.scss +1 -4
- package/lib/esm/widget/components/viewerUtils.js +1 -2
- package/lib/esm/widget/components/viewerUtils.js.map +1 -1
- package/lib/esm/widget/hooks/useFetchData.js +1 -1
- package/lib/esm/widget/hooks/useFetchData.js.map +1 -1
- package/lib/esm/widget/hooks/useFormulaValidation.js +1 -2
- package/lib/esm/widget/hooks/useFormulaValidation.js.map +1 -1
- package/package.json +32 -30
|
@@ -2,38 +2,32 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
5
|
|
|
7
6
|
.gmw-mappings-container {
|
|
8
7
|
display: flex;
|
|
9
8
|
flex-direction: column;
|
|
10
9
|
flex-grow: 1;
|
|
11
|
-
padding: $iui-baseline $iui-m;
|
|
12
10
|
min-height: 0;
|
|
13
11
|
|
|
14
12
|
.gmw-table-toolbar {
|
|
15
13
|
display: flex;
|
|
16
14
|
justify-content: space-between;
|
|
17
|
-
gap:
|
|
18
|
-
border-bottom: 1px solid var(--iui-color-
|
|
19
|
-
padding-bottom:
|
|
15
|
+
gap: var(--iui-size-xs);
|
|
16
|
+
border-bottom: 1px solid var(--iui-color-border-subtle);
|
|
17
|
+
padding-bottom: var(--iui-size-s);
|
|
20
18
|
flex-wrap: wrap;
|
|
21
19
|
|
|
22
20
|
.gmw-button-spacing {
|
|
23
21
|
display: flex;
|
|
24
|
-
gap:
|
|
22
|
+
gap: var(--iui-size-xs);
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
button {
|
|
29
|
-
align-self: flex-start;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
26
|
.gmw-mappings-list {
|
|
33
27
|
display: flex;
|
|
34
28
|
flex-direction: column;
|
|
35
29
|
overflow-y: overlay;
|
|
36
|
-
gap:
|
|
37
|
-
margin-top:
|
|
30
|
+
gap: var(--iui-size-xs);
|
|
31
|
+
margin-top: var(--iui-size-xs);
|
|
38
32
|
}
|
|
39
33
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Fieldset, LabeledInput,
|
|
5
|
+
import { Fieldset, LabeledInput, Text, ToggleSwitch } from "@itwin/itwinui-react";
|
|
6
6
|
import React, { useState } from "react";
|
|
7
7
|
import ActionPanel from "./ActionPanel";
|
|
8
8
|
import useValidator, { NAME_REQUIREMENTS } from "../hooks/useValidator";
|
|
@@ -14,19 +14,17 @@ const defaultDisplayStrings = {
|
|
|
14
14
|
mappingDetails: "Mapping Details",
|
|
15
15
|
};
|
|
16
16
|
export const MappingAction = ({ mapping, onSaveSuccess, onClickCancel, displayStrings: userDisplayStrings }) => {
|
|
17
|
-
var _a, _b, _c;
|
|
18
17
|
const { getAccessToken, iModelId } = useGroupingMappingApiConfig();
|
|
19
18
|
const mappingClient = useMappingClient();
|
|
20
19
|
const [values, setValues] = useState({
|
|
21
|
-
name:
|
|
22
|
-
description:
|
|
23
|
-
extractionEnabled:
|
|
20
|
+
name: mapping?.mappingName ?? "",
|
|
21
|
+
description: mapping?.description ?? "",
|
|
22
|
+
extractionEnabled: mapping?.extractionEnabled ?? true,
|
|
24
23
|
});
|
|
25
24
|
const [validator, showValidationMessage] = useValidator();
|
|
26
25
|
const [isLoading, setIsLoading] = useState(false);
|
|
27
26
|
const displayStrings = React.useMemo(() => ({ ...defaultDisplayStrings, ...userDisplayStrings }), [userDisplayStrings]);
|
|
28
27
|
const onSave = async () => {
|
|
29
|
-
var _a, _b, _c;
|
|
30
28
|
try {
|
|
31
29
|
if (!validator.allValid()) {
|
|
32
30
|
showValidationMessage(true);
|
|
@@ -46,9 +44,9 @@ export const MappingAction = ({ mapping, onSaveSuccess, onClickCancel, displaySt
|
|
|
46
44
|
extractionEnabled: values.extractionEnabled,
|
|
47
45
|
});
|
|
48
46
|
setValues({
|
|
49
|
-
name:
|
|
50
|
-
description:
|
|
51
|
-
extractionEnabled:
|
|
47
|
+
name: mapping?.mappingName ?? "",
|
|
48
|
+
description: mapping?.description ?? "",
|
|
49
|
+
extractionEnabled: mapping?.extractionEnabled ?? true,
|
|
52
50
|
});
|
|
53
51
|
onSaveSuccess();
|
|
54
52
|
}
|
|
@@ -62,7 +60,7 @@ export const MappingAction = ({ mapping, onSaveSuccess, onClickCancel, displaySt
|
|
|
62
60
|
return (React.createElement(React.Fragment, null,
|
|
63
61
|
React.createElement("div", { className: 'gmw-details-form-container' },
|
|
64
62
|
React.createElement(Fieldset, { legend: displayStrings.mappingDetails, className: 'gmw-details-form' },
|
|
65
|
-
React.createElement(
|
|
63
|
+
React.createElement(Text, { variant: 'small', as: 'small', className: 'gmw-field-legend' }, "Asterisk * indicates mandatory fields."),
|
|
66
64
|
React.createElement(LabeledInput, { id: 'name', name: 'name', label: 'Name', value: values.name, required: true, onChange: (event) => {
|
|
67
65
|
handleInputChange(event, values, setValues);
|
|
68
66
|
validator.showMessageFor("name");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MappingAction.js","sourceRoot":"","sources":["../../../../src/widget/components/MappingAction.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"MappingAction.js","sourceRoot":"","sources":["../../../../src/widget/components/MappingAction.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,EAAE,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAEjF,MAAM,qBAAqB,GAAG;IAC5B,cAAc,EAAE,iBAAiB;CAClC,CAAC;AASF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAsB,EAAE,EAAE;IACjI,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,2BAA2B,EAAE,CAAC;IACnE,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC;QACnC,IAAI,EAAE,OAAO,EAAE,WAAW,IA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CAAC,CAAC;wBAC5C,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBACnC,CAAC,GACD;gBACF,oBAAC,YAAY,IACX,EAAE,EAAC,aAAa,EAChB,IAAI,EAAC,aAAa,EAClB,KAAK,EAAC,aAAa,EACnB,KAAK,EAAE,MAAM,CAAC,WAAW,EACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;wBAClB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;oBAC9C,CAAC,GACD;gBACF,oBAAC,YAAY,IACX,EAAE,EAAC,mBAAmB,EACtB,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAC,0BAA0B,EAChC,aAAa,EAAC,OAAO,EACrB,OAAO,EAAE,MAAM,CAAC,iBAAiB,EACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;wBAClB,SAAS,CAAC,EAAE,GAAG,MAAM,EAAE,iBAAiB,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC;oBAC3E,CAAC,GACD,CACO,CACP;QACN,oBAAC,WAAW,IACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,aAAa,EACvB,gBAAgB,EAAE,CAAC,MAAM,CAAC,IAAI,EAC9B,SAAS,EAAE,SAAS,GACpB,CACD,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { Fieldset, LabeledInput, Text, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport React, { useState } from \"react\";\nimport ActionPanel from \"./ActionPanel\";\nimport useValidator, { NAME_REQUIREMENTS } from \"../hooks/useValidator\";\nimport { handleError, handleInputChange } from \"./utils\";\nimport \"./MappingAction.scss\";\nimport { useMappingClient } from \"./context/MappingClientContext\";\nimport type { Mapping } from \"@itwin/insights-client\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\n\nconst defaultDisplayStrings = {\n mappingDetails: \"Mapping Details\",\n};\n\nexport interface MappingActionProps {\n mapping?: Mapping;\n onSaveSuccess: () => void;\n onClickCancel?: () => void;\n displayStrings?: Partial<typeof defaultDisplayStrings>;\n}\n\nexport const MappingAction = ({ mapping, onSaveSuccess, onClickCancel, displayStrings: userDisplayStrings }: MappingActionProps) => {\n const { getAccessToken, iModelId } = useGroupingMappingApiConfig();\n const mappingClient = useMappingClient();\n const [values, setValues] = useState({\n name: mapping?.mappingName ?? \"\",\n description: mapping?.description ?? \"\",\n extractionEnabled: mapping?.extractionEnabled ?? true,\n });\n const [validator, showValidationMessage] = useValidator();\n const [isLoading, setIsLoading] = useState<boolean>(false);\n\n const displayStrings = React.useMemo(\n () => ({ ...defaultDisplayStrings, ...userDisplayStrings }),\n [userDisplayStrings]\n );\n\n const onSave = async () => {\n try {\n if (!validator.allValid()) {\n showValidationMessage(true);\n return;\n }\n setIsLoading(true);\n const accessToken = await getAccessToken();\n mapping\n ? await mappingClient.updateMapping(accessToken, iModelId, mapping.id, {\n mappingName: values.name,\n description: values.description,\n extractionEnabled: values.extractionEnabled,\n })\n : await mappingClient.createMapping(accessToken, iModelId, {\n mappingName: values.name,\n description: values.description,\n extractionEnabled: values.extractionEnabled,\n });\n setValues({\n name: mapping?.mappingName ?? \"\",\n description: mapping?.description ?? \"\",\n extractionEnabled: mapping?.extractionEnabled ?? true,\n });\n onSaveSuccess();\n } catch (error: any) {\n handleError(error.status);\n } finally {\n setIsLoading(false);\n }\n };\n\n return (\n <>\n <div className='gmw-details-form-container'>\n <Fieldset legend={displayStrings.mappingDetails} className='gmw-details-form'>\n <Text variant='small' as='small' className='gmw-field-legend'>\n Asterisk * indicates mandatory fields.\n </Text>\n <LabeledInput\n id='name'\n name='name'\n label='Name'\n value={values.name}\n required\n onChange={(event) => {\n handleInputChange(event, values, setValues);\n validator.showMessageFor(\"name\");\n }}\n message={validator.message(\"name\", values.name, NAME_REQUIREMENTS)}\n status={\n validator.message(\"name\", values.name, NAME_REQUIREMENTS)\n ? \"negative\"\n : undefined\n }\n onBlur={() => {\n validator.showMessageFor(\"name\");\n }}\n onBlurCapture={(event) => {\n handleInputChange(event, values, setValues);\n validator.showMessageFor(\"name\");\n }}\n />\n <LabeledInput\n id='description'\n name='description'\n label='Description'\n value={values.description}\n onChange={(event) => {\n handleInputChange(event, values, setValues);\n }}\n />\n <ToggleSwitch\n id='extractionEnabled'\n name='extractionEnabled'\n label='Extract data from iModel'\n labelPosition=\"right\"\n checked={values.extractionEnabled}\n onChange={(event) => {\n setValues({ ...values, extractionEnabled: event.currentTarget.checked });\n }}\n />\n </Fieldset>\n </div>\n <ActionPanel\n onSave={onSave}\n onCancel={onClickCancel}\n isSavingDisabled={!values.name}\n isLoading={isLoading}\n />\n </>\n );\n};\n"]}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import '~@itwin/itwinui-css/scss/variables';
|
|
6
5
|
|
|
7
6
|
.gmw-details-form-container {
|
|
8
7
|
overflow-x: auto;
|
|
@@ -11,6 +10,6 @@
|
|
|
11
10
|
.gmw-details-form {
|
|
12
11
|
display: flex;
|
|
13
12
|
flex-direction: column;
|
|
14
|
-
gap:
|
|
13
|
+
gap: var(--iui-size-s);
|
|
15
14
|
}
|
|
16
15
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Stepper } from "@itwin/itwinui-react";
|
|
2
|
+
import { Modal } from "@itwin/itwinui-react";
|
|
2
3
|
import React, { useEffect, useRef, useState } from "react";
|
|
3
4
|
import ConfirmMappingImport from "./ConfirmMappingsImport";
|
|
4
5
|
import "./MappingImportWizardModal.scss";
|
|
@@ -60,7 +61,7 @@ export const MappingImportWizardModal = ({ show, setShow, onFinish, displayStrin
|
|
|
60
61
|
await onClose();
|
|
61
62
|
} },
|
|
62
63
|
React.createElement("div", { className: 'gmw-import-wizard-body-container' },
|
|
63
|
-
React.createElement(
|
|
64
|
+
React.createElement(Stepper, { currentStep: currentStep, steps: steps.current, onStepClick: importing ? undefined : (index) => setCurrentStep(index) }),
|
|
64
65
|
(() => {
|
|
65
66
|
switch (currentStep) {
|
|
66
67
|
case 0:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MappingImportWizardModal.js","sourceRoot":"","sources":["../../../../src/widget/components/MappingImportWizardModal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAE3D,OAAO,iCAAiC,CAAC;AACzC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAExF,MAAM,qBAAqB,GAAG;IAC5B,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,MAAM;IAClB,iBAAiB,EAAE,aAAa;CACjC,CAAC;AAQF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,IAA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GAC9B,CACE;4BACL,WAAW,KAAK,CAAC,IAAI,CACpB,oBAAC,oBAAoB,IACnB,cAAc,EAAE,gBAAgB,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,WAAW,GAAG,CAAC,CAAC,EAC7C,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,KAAK,IAAI,EAAE;oCACnB,MAAM,OAAO,EAAE,CAAC;oCAChB,YAAY,CAAC,KAAK,CAAC,CAAC;gCACtB,CAAC,EACD,cAAc,EAAE,cAAc,GAC9B,CACH,CACA,CACJ,CAAC;oBACJ;wBACE,OAAO,IAAI,CAAC;iBACf;YACH,CAAC,CAAC,EAAE,CACA,CACA,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { IModelsClient } from \"@itwin/imodels-client-management\";\nimport type { ITwinsAccessClient } from \"@itwin/itwins-client\";\nimport type { StepProperties } from \"@itwin/itwinui-react\";\nimport { Modal, Wizard } from \"@itwin/itwinui-react\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport ConfirmMappingImport from \"./ConfirmMappingsImport\";\nimport type { IMappingTyped } from \"./Mapping\";\nimport \"./MappingImportWizardModal.scss\";\nimport SelectIModel from \"./SelectIModel\";\nimport SelectITwin from \"./SelectITwin\";\nimport SelectMappings from \"./SelectMappings\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\nimport { createIModelsClient, IModelsClientContext } from \"./context/IModelsClientContext\";\nimport { createITwinsClient, ITwinsClientContext } from \"./context/ITwinsClientContext\";\n\nconst defaultDisplayStrings = {\n mappings: \"Mappings\",\n iTwins: \"iTwins\",\n iTwinNumber: \"Number\",\n iTwinName: \"Name\",\n iTwinStatus: \"Status\",\n iModels: \"iModels\",\n iModelName: \"Name\",\n iModelDescription: \"Description\",\n};\ninterface MappingImportWizardModalProps {\n show: boolean;\n setShow: React.Dispatch<React.SetStateAction<boolean>>;\n onFinish: () => Promise<void>;\n displayStrings?: Partial<typeof defaultDisplayStrings>;\n}\n\nexport const MappingImportWizardModal = ({\n show,\n setShow,\n onFinish,\n displayStrings: userDisplayStrings,\n}: MappingImportWizardModalProps) => {\n const { prefix } = useGroupingMappingApiConfig();\n const [currentStep, setCurrentStep] = useState<number>(0);\n const [iTwinType, setITwinType] = useState<number>(0);\n const [selectedITwinId, setSelectedITwinId] = useState<string>(\"\");\n const [selectedIModelId, setSelectedIModelId] = useState<string>(\"\");\n const [selectedMappings, setSelectedMappings] = useState<IMappingTyped[]>([]);\n const [importing, setImporting] = useState<boolean>(false);\n const [iTwinsClient, setITwinsClient] = useState<ITwinsAccessClient>(createITwinsClient(prefix));\n const [iModelsClient, setIModelsClient] = useState<IModelsClient>(createIModelsClient(prefix));\n\n useEffect(() => {\n setITwinsClient(createITwinsClient(prefix));\n setIModelsClient(createIModelsClient(prefix));\n }, [prefix]);\n\n const displayStrings = React.useMemo(\n () => ({ ...defaultDisplayStrings, ...userDisplayStrings }),\n [userDisplayStrings]\n );\n\n const steps = useRef<StepProperties[]>([\n {\n name: \"Select iTwin\",\n description: `Select the source iTwin to bring your ${displayStrings.mappings} from.`,\n },\n {\n name: \"Select iModel\",\n description: \"Select an iModel within the iTwin you have selected.\",\n },\n {\n name: `Select ${displayStrings.mappings}`,\n description: `Select one or more ${displayStrings.mappings} to import.`,\n },\n {\n name: \"Rename & Confirm\",\n description:\n \"Rename and confirm your selections. Click import when finished.\",\n },\n ]);\n\n const onClose = async () => {\n setShow(false);\n setCurrentStep(0);\n await onFinish();\n };\n\n return (\n <Modal\n title={`Import ${displayStrings.mappings}`}\n modalRootId='grouping-mapping-widget'\n isOpen={show}\n closeOnEsc={false}\n closeOnExternalClick={false}\n isDismissible={!importing}\n styleType='fullPage'\n onClose={async () => {\n await onClose();\n }}\n >\n <div className='gmw-import-wizard-body-container'>\n <Wizard\n currentStep={currentStep}\n steps={steps.current}\n onStepClick={\n importing ? undefined : (index: number) => setCurrentStep(index)\n }\n />\n\n {(() => {\n switch (currentStep) {\n case 0:\n return (\n <ITwinsClientContext.Provider value={iTwinsClient}>\n <div className=\"gmw-table-container\">\n <SelectITwin\n onSelect={(iTwinId) => {\n setSelectedITwinId(iTwinId);\n setCurrentStep(1);\n }}\n onCancel={onClose}\n onChangeITwinType={setITwinType}\n displayStrings={displayStrings}\n defaultITwinType={iTwinType}\n />\n </div>\n </ITwinsClientContext.Provider>\n );\n case 1:\n return (\n <IModelsClientContext.Provider value={iModelsClient}>\n <div className=\"gmw-table-container\">\n <SelectIModel\n iTwinId={selectedITwinId}\n onSelect={(iModelId) => {\n setSelectedIModelId(iModelId);\n setCurrentStep(2);\n }}\n backFn={() => setCurrentStep(currentStep - 1)}\n onCancel={onClose}\n />\n </div>\n </IModelsClientContext.Provider>\n );\n case 2:\n case 3:\n // Preserve table state within Select Mappings\n return (\n <>\n <div\n style={{ display: currentStep === 2 ? \"flex\" : \"none\" }}\n className=\"gmw-mapping-container\"\n >\n <SelectMappings\n iModelId={selectedIModelId}\n onSelect={(selectedMappings) => {\n setSelectedMappings(selectedMappings);\n setCurrentStep(3);\n }}\n onCancel={onClose}\n backFn={() => setCurrentStep(currentStep - 1)}\n displayStrings={displayStrings}\n />\n </div>\n {currentStep === 3 && (\n <ConfirmMappingImport\n sourceiModelId={selectedIModelId}\n selectedMappings={selectedMappings}\n importing={importing}\n setImporting={setImporting}\n setSelectedMappings={setSelectedMappings}\n backFn={() => setCurrentStep(currentStep - 1)}\n onCancel={onClose}\n onFinish={async () => {\n await onClose();\n setImporting(false);\n }}\n displayStrings={displayStrings}\n />\n )}\n </>\n );\n default:\n return null;\n }\n })()}\n </div>\n </Modal>\n );\n};\n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EAC7C,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,KAAK,IAAI,EAAE;oCACnB,MAAM,OAAO,EAAE,CAAC;oCAChB,YAAY,CAAC,KAAK,CAAC,CAAC;gCACtB,CAAC,EACD,cAAc,EAAE,cAAc,GAC9B,CACH,CACA,CACJ,CAAC;oBACJ;wBACE,OAAO,IAAI,CAAC;iBACf;YACH,CAAC,CAAC,EAAE,CACA,CACA,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { IModelsClient } from \"@itwin/imodels-client-management\";\nimport type { ITwinsAccessClient } from \"@itwin/itwins-client\";\nimport type { StepProperties } from \"@itwin/itwinui-react\";\nimport { Stepper } from \"@itwin/itwinui-react\";\nimport { Modal } from \"@itwin/itwinui-react\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport ConfirmMappingImport from \"./ConfirmMappingsImport\";\nimport type { IMappingTyped } from \"./Mapping\";\nimport \"./MappingImportWizardModal.scss\";\nimport SelectIModel from \"./SelectIModel\";\nimport SelectITwin from \"./SelectITwin\";\nimport SelectMappings from \"./SelectMappings\";\nimport { useGroupingMappingApiConfig } from \"./context/GroupingApiConfigContext\";\nimport { createIModelsClient, IModelsClientContext } from \"./context/IModelsClientContext\";\nimport { createITwinsClient, ITwinsClientContext } from \"./context/ITwinsClientContext\";\n\nconst defaultDisplayStrings = {\n mappings: \"Mappings\",\n iTwins: \"iTwins\",\n iTwinNumber: \"Number\",\n iTwinName: \"Name\",\n iTwinStatus: \"Status\",\n iModels: \"iModels\",\n iModelName: \"Name\",\n iModelDescription: \"Description\",\n};\ninterface MappingImportWizardModalProps {\n show: boolean;\n setShow: React.Dispatch<React.SetStateAction<boolean>>;\n onFinish: () => Promise<void>;\n displayStrings?: Partial<typeof defaultDisplayStrings>;\n}\n\nexport const MappingImportWizardModal = ({\n show,\n setShow,\n onFinish,\n displayStrings: userDisplayStrings,\n}: MappingImportWizardModalProps) => {\n const { prefix } = useGroupingMappingApiConfig();\n const [currentStep, setCurrentStep] = useState<number>(0);\n const [iTwinType, setITwinType] = useState<number>(0);\n const [selectedITwinId, setSelectedITwinId] = useState<string>(\"\");\n const [selectedIModelId, setSelectedIModelId] = useState<string>(\"\");\n const [selectedMappings, setSelectedMappings] = useState<IMappingTyped[]>([]);\n const [importing, setImporting] = useState<boolean>(false);\n const [iTwinsClient, setITwinsClient] = useState<ITwinsAccessClient>(createITwinsClient(prefix));\n const [iModelsClient, setIModelsClient] = useState<IModelsClient>(createIModelsClient(prefix));\n\n useEffect(() => {\n setITwinsClient(createITwinsClient(prefix));\n setIModelsClient(createIModelsClient(prefix));\n }, [prefix]);\n\n const displayStrings = React.useMemo(\n () => ({ ...defaultDisplayStrings, ...userDisplayStrings }),\n [userDisplayStrings]\n );\n\n const steps = useRef<StepProperties[]>([\n {\n name: \"Select iTwin\",\n description: `Select the source iTwin to bring your ${displayStrings.mappings} from.`,\n },\n {\n name: \"Select iModel\",\n description: \"Select an iModel within the iTwin you have selected.\",\n },\n {\n name: `Select ${displayStrings.mappings}`,\n description: `Select one or more ${displayStrings.mappings} to import.`,\n },\n {\n name: \"Rename & Confirm\",\n description:\n \"Rename and confirm your selections. Click import when finished.\",\n },\n ]);\n\n const onClose = async () => {\n setShow(false);\n setCurrentStep(0);\n await onFinish();\n };\n\n return (\n <Modal\n title={`Import ${displayStrings.mappings}`}\n modalRootId='grouping-mapping-widget'\n isOpen={show}\n closeOnEsc={false}\n closeOnExternalClick={false}\n isDismissible={!importing}\n styleType='fullPage'\n onClose={async () => {\n await onClose();\n }}\n >\n <div className='gmw-import-wizard-body-container'>\n <Stepper\n currentStep={currentStep}\n steps={steps.current}\n onStepClick={\n importing ? undefined : (index: number) => setCurrentStep(index)\n }\n />\n\n {(() => {\n switch (currentStep) {\n case 0:\n return (\n <ITwinsClientContext.Provider value={iTwinsClient}>\n <div className=\"gmw-table-container\">\n <SelectITwin\n onSelect={(iTwinId) => {\n setSelectedITwinId(iTwinId);\n setCurrentStep(1);\n }}\n onCancel={onClose}\n onChangeITwinType={setITwinType}\n displayStrings={displayStrings}\n defaultITwinType={iTwinType}\n />\n </div>\n </ITwinsClientContext.Provider>\n );\n case 1:\n return (\n <IModelsClientContext.Provider value={iModelsClient}>\n <div className=\"gmw-table-container\">\n <SelectIModel\n iTwinId={selectedITwinId}\n onSelect={(iModelId) => {\n setSelectedIModelId(iModelId);\n setCurrentStep(2);\n }}\n backFn={() => setCurrentStep(currentStep - 1)}\n onCancel={onClose}\n />\n </div>\n </IModelsClientContext.Provider>\n );\n case 2:\n case 3:\n // Preserve table state within Select Mappings\n return (\n <>\n <div\n style={{ display: currentStep === 2 ? \"flex\" : \"none\" }}\n className=\"gmw-mapping-container\"\n >\n <SelectMappings\n iModelId={selectedIModelId}\n onSelect={(selectedMappings) => {\n setSelectedMappings(selectedMappings);\n setCurrentStep(3);\n }}\n onCancel={onClose}\n backFn={() => setCurrentStep(currentStep - 1)}\n displayStrings={displayStrings}\n />\n </div>\n {currentStep === 3 && (\n <ConfirmMappingImport\n sourceiModelId={selectedIModelId}\n selectedMappings={selectedMappings}\n importing={importing}\n setImporting={setImporting}\n setSelectedMappings={setSelectedMappings}\n backFn={() => setCurrentStep(currentStep - 1)}\n onCancel={onClose}\n onFinish={async () => {\n await onClose();\n setImporting(false);\n }}\n displayStrings={displayStrings}\n />\n )}\n </>\n );\n default:\n return null;\n }\n })()}\n </div>\n </Modal>\n );\n};\n"]}
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import '~@itwin/itwinui-css/scss/variables';
|
|
6
5
|
|
|
7
6
|
.gmw-import-wizard-body-container {
|
|
8
7
|
display: flex;
|
|
9
8
|
flex-direction: column;
|
|
10
|
-
gap:
|
|
11
|
-
margin-top:
|
|
9
|
+
gap: calc(var(--iui-size-s) * 2);
|
|
10
|
+
margin-top: calc(var(--iui-size-s) * 2);
|
|
12
11
|
flex-grow: 1;
|
|
13
12
|
min-height: 0;
|
|
14
13
|
|
|
@@ -27,6 +26,6 @@
|
|
|
27
26
|
.gmw-import-action-panel {
|
|
28
27
|
display: flex;
|
|
29
28
|
justify-content: center;
|
|
30
|
-
padding:
|
|
31
|
-
gap:
|
|
29
|
+
padding: calc(var(--iui-size-s) * 2) var(--iui-size-m) var(--iui-size-s);
|
|
30
|
+
gap: var(--iui-size-xs);
|
|
32
31
|
}
|
|
@@ -23,7 +23,7 @@ const usePropertySelection = (property, currentPropertyList, queryBuilder) => {
|
|
|
23
23
|
const addProperty = useCallback(async (prop) => {
|
|
24
24
|
if (prop.value.valueFormat === PropertyValueFormat.Primitive &&
|
|
25
25
|
!currentPropertyList.includes(prop) &&
|
|
26
|
-
(await
|
|
26
|
+
(await queryBuilder?.addProperty(prop))) {
|
|
27
27
|
setIsCheckboxLoading(false);
|
|
28
28
|
return true;
|
|
29
29
|
}
|
|
@@ -31,7 +31,7 @@ const usePropertySelection = (property, currentPropertyList, queryBuilder) => {
|
|
|
31
31
|
}, [currentPropertyList, queryBuilder]);
|
|
32
32
|
const removeProperty = useCallback(async (prop) => {
|
|
33
33
|
if (currentPropertyList.includes(prop)) {
|
|
34
|
-
await
|
|
34
|
+
await queryBuilder?.removeProperty(prop);
|
|
35
35
|
setIsCheckboxLoading(false);
|
|
36
36
|
}
|
|
37
37
|
}, [currentPropertyList, queryBuilder]);
|
|
@@ -50,16 +50,15 @@ export const PropertyAction = ({ property }) => {
|
|
|
50
50
|
setIsCheckboxLoading(isPropertySelected && isUpdating);
|
|
51
51
|
}, [isPropertySelected, isUpdating, setIsCheckboxLoading]);
|
|
52
52
|
const onPropertySelectionChanged = useCallback(async () => {
|
|
53
|
-
var _a, _b;
|
|
54
53
|
if (isPropertySelected) {
|
|
55
54
|
await removeProperty(property);
|
|
56
55
|
setCurrentPropertyList((prevList) => prevList.filter((x) => x !== property));
|
|
57
|
-
setQuery(
|
|
56
|
+
setQuery(queryBuilder?.buildQueryString() ?? "");
|
|
58
57
|
}
|
|
59
58
|
else {
|
|
60
59
|
if (await addProperty(property)) {
|
|
61
60
|
setCurrentPropertyList((prevList) => prevList.concat(property));
|
|
62
|
-
setQuery(
|
|
61
|
+
setQuery(queryBuilder?.buildQueryString() ?? "");
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyAction.js","sourceRoot":"","sources":["../../../../src/widget/components/PropertyAction.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,uBAAuB,CAAC;AAO/B,MAAM,oBAAoB,GAAG,CAC3B,QAAwB,EACxB,mBAAqC,EACrC,YAAsC,EACtC,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElE,MAAM,yBAAyB,GAAG,WAAW,CAC3C,CAAC,QAAwB,EAAW,EAAE;QACpC,IAAI,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,SAAS,EAAE;YAChE,OAAO,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;SAC/C;QAED,IAAI,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,KAAK,EAAE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AAE,IAAI,EAAE,CAAC,CAAC;aAClD;SACF;IACH,CAAC,EAAE;QACD,WAAW;QACX,kBAAkB;QAClB,QAAQ;QACR,cAAc;QACd,YAAY;QACZ,sBAAsB;QACtB,QAAQ;KACT,CAAC,CAAC;IAEH,OAAO,CACL,6BAAK,SAAS,EAAC,iCAAiC,IAC7C,QAAQ,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,SAAS;QAC3D,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,CACtC,oBAAC,QAAQ,IACP,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,0BAA0B,EACpC,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,iBAAiB,GAC5B,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { usePropertyGridWrapper } from \"./context/PropertyGridWrapperContext\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport \"./PropertyAction.scss\";\nimport type { QueryBuilder } from \"./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"]}
|
|
@@ -30,8 +30,8 @@ export const PropertyMenu = ({ mapping, group, onClickAddGroupProperty, onClickM
|
|
|
30
30
|
}, [getAccessToken, mappingClient, iModelId, mappingId, groupId]);
|
|
31
31
|
const { isLoading: isLoadingCustomCalculations, refreshData: refreshCustomCalculations } = useCombinedFetchRefresh(fetchCustomCalculations, setCustomCalculationProperties);
|
|
32
32
|
return (React.createElement("div", { className: 'gmw-property-menu-wrapper' },
|
|
33
|
-
!hideGroupProps && (React.createElement(GroupPropertyTable, { iModelId: iModelId, mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddGroupProperty, onClickModify: onClickModifyGroupProperty, isLoading: isLoadingGroupProperties, groupProperties: groupProperties
|
|
34
|
-
!hideCalculatedProps && (React.createElement(CalculatedPropertyTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCalculatedProperty, onClickModify: onClickModifyCalculatedProperty, isLoading: isLoadingCalculatedProperties, calculatedProperties: calculatedProperties
|
|
35
|
-
!hideCustomCalculationProps && (React.createElement(CustomCalculationTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCustomCalculationProperty, onClickModify: onClickModifyCustomCalculation, isLoading: isLoadingCustomCalculations, customCalculations: customCalculationProperties
|
|
33
|
+
!hideGroupProps && (React.createElement(GroupPropertyTable, { iModelId: iModelId, mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddGroupProperty, onClickModify: onClickModifyGroupProperty, isLoading: isLoadingGroupProperties, groupProperties: groupProperties ?? [], refresh: refreshGroupProperties })),
|
|
34
|
+
!hideCalculatedProps && (React.createElement(CalculatedPropertyTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCalculatedProperty, onClickModify: onClickModifyCalculatedProperty, isLoading: isLoadingCalculatedProperties, calculatedProperties: calculatedProperties ?? [], refresh: refreshCalculatedProperties })),
|
|
35
|
+
!hideCustomCalculationProps && (React.createElement(CustomCalculationTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCustomCalculationProperty, onClickModify: onClickModifyCustomCalculation, isLoading: isLoadingCustomCalculations, customCalculations: customCalculationProperties ?? [], refresh: refreshCustomCalculations }))));
|
|
36
36
|
};
|
|
37
37
|
//# sourceMappingURL=PropertyMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyMenu.js","sourceRoot":"","sources":["../../../../src/widget/components/PropertyMenu.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAEjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAgBlE,MAAM,CAAC,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,MAAM,EAAE,cAAc,EAAE,QAAQ,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,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React, { useMemo } from \"react\";\nimport \"./PropertyMenu.scss\";\nimport { GroupPropertyTable } from \"./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 \"./CalculatedPropertyTable\";\nimport { CustomCalculationTable } from \"./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"]}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
5
|
|
|
7
6
|
.gmw-property-menu-wrapper {
|
|
8
7
|
display: flex;
|
|
9
8
|
flex-direction: column;
|
|
10
9
|
flex-grow: 1;
|
|
11
|
-
gap:
|
|
10
|
+
gap: calc(var(--iui-size-s) * 2);
|
|
11
|
+
overflow: auto;
|
|
12
12
|
}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
5
|
|
|
7
6
|
.gmw-property-menu-vis-wrapper {
|
|
8
7
|
display: flex;
|
|
9
8
|
flex-direction: column;
|
|
10
|
-
gap:
|
|
9
|
+
gap: var(--iui-size-s);
|
|
11
10
|
flex-grow: 1;
|
|
12
11
|
.gmw-property-menu-vis-toolbar {
|
|
13
12
|
display: flex;
|
|
@@ -7,7 +7,7 @@ export interface PropertyTableItem {
|
|
|
7
7
|
}
|
|
8
8
|
export interface PropertyTableProps<T extends PropertyTableItem> {
|
|
9
9
|
propertyType: string;
|
|
10
|
-
columnsFactory: (handleShowDeleteModal: (value: T) => void) =>
|
|
10
|
+
columnsFactory: (handleShowDeleteModal: (value: T) => void) => Array<Column<T>>;
|
|
11
11
|
data: T[];
|
|
12
12
|
isLoading: boolean;
|
|
13
13
|
onClickAdd?: () => void;
|
|
@@ -10,9 +10,8 @@ import "./PropertyTable.scss";
|
|
|
10
10
|
export const PropertyTable = ({ propertyType, columnsFactory, data, isLoading, onClickAdd, refreshProperties, deleteProperty, }) => {
|
|
11
11
|
const [showDeleteModal, setShowDeleteModal] = useState(undefined);
|
|
12
12
|
const handleDeleteProperty = useCallback(async () => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, [deleteProperty, showDeleteModal === null || showDeleteModal === void 0 ? void 0 : showDeleteModal.id]);
|
|
13
|
+
await deleteProperty(showDeleteModal?.id ?? "");
|
|
14
|
+
}, [deleteProperty, showDeleteModal?.id]);
|
|
16
15
|
const handleShowDeleteModal = useCallback((property) => {
|
|
17
16
|
setShowDeleteModal(property);
|
|
18
17
|
}, []);
|
|
@@ -23,6 +22,6 @@ export const PropertyTable = ({ propertyType, columnsFactory, data, isLoading, o
|
|
|
23
22
|
return (React.createElement("div", { className: "gmw-property-table-container" },
|
|
24
23
|
React.createElement(PropertyTableToolbar, { propertyType: propertyType, onClickAddProperty: onClickAdd, refreshProperties: refreshProperties, isLoading: isLoading }),
|
|
25
24
|
React.createElement(Table, { data: isLoading ? [] : data, density: 'extra-condensed', columns: memoizedColumns, emptyTableContent: `No ${propertyType} Properties`, isSortable: true, isLoading: isLoading }),
|
|
26
|
-
React.createElement(DeleteModal, { entityName: showDeleteModal
|
|
25
|
+
React.createElement(DeleteModal, { entityName: showDeleteModal?.propertyName, onClose: handleCloseDeleteModal, onDelete: handleDeleteProperty, refresh: refreshProperties })));
|
|
27
26
|
};
|
|
28
27
|
//# sourceMappingURL=PropertyTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyTable.js","sourceRoot":"","sources":["../../../../src/widget/components/PropertyTable.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG9D,OAAO,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AAW,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,OAAO,CAAC,GAAG,EAAE,CACnC,cAAc,CAAC,qBAAqB,CAAC,EAAE,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAElF,OAAO,CACL,6BAAK,SAAS,EAAC,8BAA8B;QAC3C,oBAAC,oBAAoB,IACnB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,UAAU,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,GACpB;QACF,oBAAC,KAAK,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;QACF,oBAAC,WAAW,IACV,UAAU,EAAE,eAAe,EAAE,YAAY,EACzC,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE,iBAAiB,GAC1B,CACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { Table } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport type { Column } from \"react-table\";\nimport type { CreateTypeFromInterface } from \"../utils\";\nimport DeleteModal from \"./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 <DeleteModal\n entityName={showDeleteModal?.propertyName}\n onClose={handleCloseDeleteModal}\n onDelete={handleDeleteProperty}\n refresh={refreshProperties}\n />\n </div>\n );\n};\n"]}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
5
|
|
|
7
6
|
.gmw-property-table-container {
|
|
8
7
|
display: flex;
|
|
9
8
|
flex-direction: column;
|
|
10
|
-
gap:
|
|
9
|
+
gap: var(--iui-size-s);
|
|
11
10
|
}
|