@itwin/grouping-mapping-widget 0.24.0 → 0.25.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/common/hooks/useIsMounted.d.ts +2 -1
- package/lib/cjs/common/hooks/useIsMounted.js +3 -3
- package/lib/cjs/common/hooks/useIsMounted.js.map +1 -1
- package/lib/cjs/components/Groups/{GroupItem.d.ts → GroupListItem.d.ts} +4 -3
- package/lib/cjs/components/Groups/GroupListItem.js +49 -0
- package/lib/cjs/components/Groups/GroupListItem.js.map +1 -0
- package/lib/cjs/components/Groups/GroupListItem.scss +13 -0
- package/lib/cjs/components/Groups/GroupsView.js +2 -2
- package/lib/cjs/components/Groups/GroupsView.js.map +1 -1
- package/lib/cjs/components/Groups/GroupsVisualization.js +2 -2
- package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingListItem.d.ts +1 -1
- package/lib/cjs/components/Mappings/MappingListItem.js +7 -7
- package/lib/cjs/components/Mappings/MappingListItem.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingListItem.scss +1 -13
- package/lib/cjs/components/Mappings/MappingViewActionGroup.d.ts +1 -1
- package/lib/cjs/components/Mappings/MappingViewActionGroup.js +3 -3
- package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingsView.js +1 -1
- package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
- package/lib/cjs/components/Mappings/MappingsView.scss +0 -5
- package/lib/cjs/components/Properties/GroupColorToggle.js +1 -1
- package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +2 -2
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +13 -0
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js +21 -0
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -0
- package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.scss +14 -0
- package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +5 -5
- package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +4 -4
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -3
- package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
- package/lib/cjs/test/GroupingMappingCustomUI.test.js +3 -3
- package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/lib/esm/common/hooks/useIsMounted.d.ts +2 -1
- package/lib/esm/common/hooks/useIsMounted.js +4 -4
- package/lib/esm/common/hooks/useIsMounted.js.map +1 -1
- package/lib/esm/components/Groups/{GroupItem.d.ts → GroupListItem.d.ts} +4 -3
- package/lib/esm/components/Groups/GroupListItem.js +22 -0
- package/lib/esm/components/Groups/GroupListItem.js.map +1 -0
- package/lib/esm/components/Groups/GroupListItem.scss +13 -0
- package/lib/esm/components/Groups/GroupsView.js +3 -3
- package/lib/esm/components/Groups/GroupsView.js.map +1 -1
- package/lib/esm/components/Groups/GroupsVisualization.js +2 -2
- package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
- package/lib/esm/components/Mappings/MappingListItem.d.ts +1 -1
- package/lib/esm/components/Mappings/MappingListItem.js +9 -9
- package/lib/esm/components/Mappings/MappingListItem.js.map +1 -1
- package/lib/esm/components/Mappings/MappingListItem.scss +1 -13
- package/lib/esm/components/Mappings/MappingViewActionGroup.d.ts +1 -1
- package/lib/esm/components/Mappings/MappingViewActionGroup.js +1 -1
- package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -1
- package/lib/esm/components/Mappings/MappingsView.js +2 -2
- package/lib/esm/components/Mappings/MappingsView.js.map +1 -1
- package/lib/esm/components/Mappings/MappingsView.scss +0 -5
- package/lib/esm/components/Properties/GroupColorToggle.js +1 -1
- package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +2 -2
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +13 -0
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js +14 -0
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -0
- package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.scss +14 -0
- package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +5 -5
- package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +4 -4
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js +3 -4
- package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
- package/lib/esm/test/GroupingMappingCustomUI.test.js +3 -3
- package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
- package/package.json +1 -1
- package/lib/cjs/components/Groups/GroupItem.js +0 -23
- package/lib/cjs/components/Groups/GroupItem.js.map +0 -1
- package/lib/cjs/components/SharedComponents/HorizontalTile.d.ts +0 -19
- package/lib/cjs/components/SharedComponents/HorizontalTile.js +0 -27
- package/lib/cjs/components/SharedComponents/HorizontalTile.js.map +0 -1
- package/lib/cjs/components/SharedComponents/HorizontalTile.scss +0 -58
- package/lib/esm/components/Groups/GroupItem.js +0 -16
- package/lib/esm/components/Groups/GroupItem.js.map +0 -1
- package/lib/esm/components/SharedComponents/HorizontalTile.d.ts +0 -19
- package/lib/esm/components/SharedComponents/HorizontalTile.js +0 -20
- package/lib/esm/components/SharedComponents/HorizontalTile.js.map +0 -1
- package/lib/esm/components/SharedComponents/HorizontalTile.scss +0 -58
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GroupItem = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const HorizontalTile_1 = require("../SharedComponents/HorizontalTile");
|
|
9
|
-
const GroupMenuActions_1 = require("./GroupMenuActions");
|
|
10
|
-
const GroupHilitedElementsContext_1 = require("../context/GroupHilitedElementsContext");
|
|
11
|
-
const GroupOverlapProgressBar_1 = require("./GroupOverlapProgressBar");
|
|
12
|
-
const GroupItem = ({ onClickGroupTitle, disableActions, group, isVisualizing, ...rest }) => {
|
|
13
|
-
const { overlappedElementsMetadata: { groupElementsInfo, overlappedElementsInfo }, showGroupColor } = (0, GroupHilitedElementsContext_1.useGroupHilitedElementsContext)();
|
|
14
|
-
const onTitleClick = () => {
|
|
15
|
-
if (onClickGroupTitle) {
|
|
16
|
-
onClickGroupTitle(group);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
return (react_1.default.createElement(HorizontalTile_1.HorizontalTile, { title: group.groupName, subText: group.description, actionGroup: react_1.default.createElement(GroupMenuActions_1.GroupMenuActions, { group: group, disableActions: disableActions, ...rest }), elementsInfo: overlappedElementsInfo.size > 0 &&
|
|
20
|
-
react_1.default.createElement(GroupOverlapProgressBar_1.OverlapProgress, { group: group, overlappedElementsInfo: overlappedElementsInfo, groupElementsInfo: groupElementsInfo }), showGroupColor: showGroupColor, isLoading: isVisualizing, onClickTitle: onClickGroupTitle && !disableActions ? onTitleClick : undefined }));
|
|
21
|
-
};
|
|
22
|
-
exports.GroupItem = GroupItem;
|
|
23
|
-
//# sourceMappingURL=GroupItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GroupItem.js","sourceRoot":"","sources":["../../../../src/components/Groups/GroupItem.tsx"],"names":[],"mappings":";;;;;;AAKA,kDAA0B;AAC1B,uEAAoE;AAMpE,yDAAsD;AACtD,wFAAwF;AACxF,uEAA4D;AAYrD,MAAM,SAAS,GAAG,CAAC,EACxB,iBAAiB,EACjB,cAAc,EACd,KAAK,EACL,aAAa,EACb,GAAG,IAAI,EACQ,EAAE,EAAE;IACnB,MAAM,EAAE,0BAA0B,EAAE,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,EAAE,cAAc,EAAE,GAAG,IAAA,4DAA8B,GAAE,CAAC;IAEvI,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,IAAI,iBAAiB,EAAE;YACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,+BAAc,IACb,KAAK,EAAE,KAAK,CAAC,SAAS,EACtB,OAAO,EAAE,KAAK,CAAC,WAAW,EAC1B,WAAW,EACT,8BAAC,mCAAgB,IACf,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,KAC1B,IAAI,GACR,EAEJ,YAAY,EACV,sBAAsB,CAAC,IAAI,GAAG,CAAC;YAC/B,8BAAC,yCAAe,IACd,KAAK,EAAE,KAAK,EACZ,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,GACpC,EAEJ,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,aAAa,EACxB,YAAY,EACV,iBAAiB,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,GAEjE,CACH,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,SAAS,aAyCpB","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 { Group } from \"@itwin/insights-client\";\nimport React from \"react\";\nimport { HorizontalTile } from \"../SharedComponents/HorizontalTile\";\nimport type {\n ContextCustomUI,\n GroupingCustomUI,\n} from \"../customUI/GroupingMappingCustomUI\";\nimport type { GroupsProps } from \"./Groups\";\nimport { GroupMenuActions } from \"./GroupMenuActions\";\nimport { useGroupHilitedElementsContext } from \"../context/GroupHilitedElementsContext\";\nimport { OverlapProgress } from \"./GroupOverlapProgressBar\";\n\nexport interface GroupItemProps extends Omit<GroupsProps, \"onClickAddGroup\"> {\n group: Group;\n groupUIs: GroupingCustomUI[];\n contextUIs: ContextCustomUI[];\n setShowDeleteModal: (showDeleteModal: Group) => void;\n setActiveOverlapInfoPanelGroup?: (\n activeOverlapInfoPanelGroup: Group\n ) => void;\n}\n\nexport const GroupItem = ({\n onClickGroupTitle,\n disableActions,\n group,\n isVisualizing,\n ...rest\n}: GroupItemProps) => {\n const { overlappedElementsMetadata: { groupElementsInfo, overlappedElementsInfo }, showGroupColor } = useGroupHilitedElementsContext();\n\n const onTitleClick = () => {\n if (onClickGroupTitle) {\n onClickGroupTitle(group);\n }\n };\n\n return (\n <HorizontalTile\n title={group.groupName}\n subText={group.description}\n actionGroup={\n <GroupMenuActions\n group={group}\n disableActions={disableActions}\n {...rest}\n />\n }\n elementsInfo={\n overlappedElementsInfo.size > 0 &&\n <OverlapProgress\n group={group}\n overlappedElementsInfo={overlappedElementsInfo}\n groupElementsInfo={groupElementsInfo}\n />\n }\n showGroupColor={showGroupColor}\n isLoading={isVisualizing}\n onClickTitle={\n onClickGroupTitle && !disableActions ? onTitleClick : undefined\n }\n />\n );\n};\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import "./HorizontalTile.scss";
|
|
4
|
-
export interface HorizontalTileProps {
|
|
5
|
-
title: string;
|
|
6
|
-
actionGroup: ReactNode;
|
|
7
|
-
subText?: string;
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
onClickTitle?: () => void;
|
|
10
|
-
titleTooltip?: string;
|
|
11
|
-
subtextToolTip?: string;
|
|
12
|
-
selected?: boolean;
|
|
13
|
-
dragHandle?: ReactNode;
|
|
14
|
-
elementsInfo?: React.ReactNode;
|
|
15
|
-
showGroupColor?: boolean;
|
|
16
|
-
isLoading?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare const HorizontalTile: (props: HorizontalTileProps) => JSX.Element;
|
|
19
|
-
//# sourceMappingURL=HorizontalTile.d.ts.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.HorizontalTile = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
9
|
-
require("./HorizontalTile.scss");
|
|
10
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
11
|
-
const HorizontalTile = (props) => {
|
|
12
|
-
return (react_1.default.createElement("div", { className: (0, classnames_1.default)("gmw-horizontal-tile-container", { "gmw-horizontal-tile-selected": props.selected }), onClick: props.onClick, "data-testid": "gmw-horizontal-tile" },
|
|
13
|
-
react_1.default.createElement("div", { className: "gmw-body-container" },
|
|
14
|
-
props.dragHandle,
|
|
15
|
-
react_1.default.createElement("div", { className: "gmw-body" },
|
|
16
|
-
!!props.onClickTitle &&
|
|
17
|
-
react_1.default.createElement(itwinui_react_1.Anchor, { className: "gmw-body-text", onClick: props.onClickTitle, title: props.titleTooltip }, props.title),
|
|
18
|
-
!props.onClickTitle &&
|
|
19
|
-
react_1.default.createElement(itwinui_react_1.Text, { className: "gmw-body-text", variant: "body", title: props.titleTooltip }, props.title),
|
|
20
|
-
props.subText && react_1.default.createElement(itwinui_react_1.Text, { className: "gmw-body-text", isMuted: true, title: props.subtextToolTip, variant: "small" }, props.subText))),
|
|
21
|
-
react_1.default.createElement("div", { className: "gmw-interactables" },
|
|
22
|
-
props.actionGroup,
|
|
23
|
-
props.showGroupColor && !props.isLoading && props.elementsInfo &&
|
|
24
|
-
props.elementsInfo)));
|
|
25
|
-
};
|
|
26
|
-
exports.HorizontalTile = HorizontalTile;
|
|
27
|
-
//# sourceMappingURL=HorizontalTile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalTile.js","sourceRoot":"","sources":["../../../../src/components/SharedComponents/HorizontalTile.tsx"],"names":[],"mappings":";;;;;;AAKA,kDAA0B;AAC1B,wDAAoD;AACpD,iCAA+B;AAC/B,4DAAoC;AAiB7B,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;IAE3D,OAAO,CACL,uCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,+BAA+B,EAAE,EAAE,8BAA8B,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,iBAAc,qBAAqB;QACxK,uCAAK,SAAS,EAAC,oBAAoB;YAChC,KAAK,CAAC,UAAU;YACjB,uCAAK,SAAS,EAAC,UAAU;gBACtB,CAAC,CAAC,KAAK,CAAC,YAAY;oBACnB,8BAAC,sBAAM,IAAC,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,IAAG,KAAK,CAAC,KAAK,CAAU;gBAEjH,CAAC,KAAK,CAAC,YAAY;oBAClB,8BAAC,oBAAI,IAAC,SAAS,EAAC,eAAe,EAAC,OAAO,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,CAAC,YAAY,IAAG,KAAK,CAAC,KAAK,CAAQ;gBAE/F,KAAK,CAAC,OAAO,IAAI,8BAAC,oBAAI,IAAC,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,cAAc,EAAE,OAAO,EAAC,OAAO,IAAE,KAAK,CAAC,OAAO,CAAQ,CAChI,CACF;QACN,uCAAK,SAAS,EAAC,mBAAmB;YAC/B,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,cAAc,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,YAAY;gBAC3D,KAAK,CAAC,YAAY,CAClB,CACF,CACP,CAAC;AAEJ,CAAC,CAAC;AAxBW,QAAA,cAAc,kBAwBzB","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 { ReactNode } from \"react\";\nimport React from \"react\";\nimport { Anchor, Text } from \"@itwin/itwinui-react\";\nimport \"./HorizontalTile.scss\";\nimport classNames from \"classnames\";\n\nexport interface HorizontalTileProps {\n title: string;\n actionGroup: ReactNode;\n subText?: string;\n onClick?: () => void;\n onClickTitle?: () => void;\n titleTooltip?: string;\n subtextToolTip?: string;\n selected?: boolean;\n dragHandle?: ReactNode;\n elementsInfo?: React.ReactNode;\n showGroupColor?: boolean;\n isLoading?: boolean;\n}\n\nexport const HorizontalTile = (props: HorizontalTileProps) => {\n\n return (\n <div className={classNames(\"gmw-horizontal-tile-container\", { \"gmw-horizontal-tile-selected\": props.selected })} onClick={props.onClick} data-testid=\"gmw-horizontal-tile\">\n <div className=\"gmw-body-container\">\n {props.dragHandle}\n <div className=\"gmw-body\">\n {!!props.onClickTitle &&\n <Anchor className=\"gmw-body-text\" onClick={props.onClickTitle} title={props.titleTooltip}>{props.title}</Anchor>\n }\n {!props.onClickTitle &&\n <Text className=\"gmw-body-text\" variant=\"body\" title={props.titleTooltip}>{props.title}</Text>\n }\n {props.subText && <Text className=\"gmw-body-text\" isMuted={true} title={props.subtextToolTip} variant=\"small\">{props.subText}</Text>}\n </div>\n </div>\n <div className=\"gmw-interactables\">\n {props.actionGroup}\n {props.showGroupColor && !props.isLoading && props.elementsInfo &&\n props.elementsInfo}\n </div>\n </div>\n );\n\n};\n"]}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
.gmw-horizontal-tile {
|
|
7
|
-
&-container {
|
|
8
|
-
display: flex;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
border-radius: 5px;
|
|
11
|
-
background-color: var(--iui-color-background-backdrop);
|
|
12
|
-
min-height: calc(var(--iui-size-s) * 5);
|
|
13
|
-
padding: 5.5px var(--iui-size-xs);
|
|
14
|
-
padding-bottom: 2px var(--iui-size-xs);
|
|
15
|
-
padding-top: 2px var(--iui-size-xs);
|
|
16
|
-
|
|
17
|
-
.gmw-body-container {
|
|
18
|
-
display: flex;
|
|
19
|
-
min-width: 0;
|
|
20
|
-
.gmw-drag-icon {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
height: 100%;
|
|
25
|
-
}
|
|
26
|
-
.gmw-body {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
min-width: 0;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
&-text {
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
white-space: nowrap;
|
|
34
|
-
text-overflow: ellipsis;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.gmw-interactables {
|
|
40
|
-
position: relative;
|
|
41
|
-
margin-left: 0;
|
|
42
|
-
align-items: center;
|
|
43
|
-
align-self: center;
|
|
44
|
-
min-width: 36px;
|
|
45
|
-
margin-right: var(--iui-size-2xs);
|
|
46
|
-
flex-shrink: 0;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&-selected {
|
|
51
|
-
border: 1px solid var(--iui-color-border-accent);
|
|
52
|
-
background: linear-gradient(
|
|
53
|
-
hsl(var(--iui-color-accent-hsl) / var(--iui-opacity-6)),
|
|
54
|
-
hsl(var(--iui-color-accent-hsl) / var(--iui-opacity-6))
|
|
55
|
-
),
|
|
56
|
-
linear-gradient(var(--iui-color-background), var(--iui-color-background));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HorizontalTile } from "../SharedComponents/HorizontalTile";
|
|
3
|
-
import { GroupMenuActions } from "./GroupMenuActions";
|
|
4
|
-
import { useGroupHilitedElementsContext } from "../context/GroupHilitedElementsContext";
|
|
5
|
-
import { OverlapProgress } from "./GroupOverlapProgressBar";
|
|
6
|
-
export const GroupItem = ({ onClickGroupTitle, disableActions, group, isVisualizing, ...rest }) => {
|
|
7
|
-
const { overlappedElementsMetadata: { groupElementsInfo, overlappedElementsInfo }, showGroupColor } = useGroupHilitedElementsContext();
|
|
8
|
-
const onTitleClick = () => {
|
|
9
|
-
if (onClickGroupTitle) {
|
|
10
|
-
onClickGroupTitle(group);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
return (React.createElement(HorizontalTile, { title: group.groupName, subText: group.description, actionGroup: React.createElement(GroupMenuActions, { group: group, disableActions: disableActions, ...rest }), elementsInfo: overlappedElementsInfo.size > 0 &&
|
|
14
|
-
React.createElement(OverlapProgress, { group: group, overlappedElementsInfo: overlappedElementsInfo, groupElementsInfo: groupElementsInfo }), showGroupColor: showGroupColor, isLoading: isVisualizing, onClickTitle: onClickGroupTitle && !disableActions ? onTitleClick : undefined }));
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=GroupItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GroupItem.js","sourceRoot":"","sources":["../../../../src/components/Groups/GroupItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAMpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAY5D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,iBAAiB,EACjB,cAAc,EACd,KAAK,EACL,aAAa,EACb,GAAG,IAAI,EACQ,EAAE,EAAE;IACnB,MAAM,EAAE,0BAA0B,EAAE,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,EAAE,cAAc,EAAE,GAAG,8BAA8B,EAAE,CAAC;IAEvI,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,IAAI,iBAAiB,EAAE;YACrB,iBAAiB,CAAC,KAAK,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,cAAc,IACb,KAAK,EAAE,KAAK,CAAC,SAAS,EACtB,OAAO,EAAE,KAAK,CAAC,WAAW,EAC1B,WAAW,EACT,oBAAC,gBAAgB,IACf,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,KAC1B,IAAI,GACR,EAEJ,YAAY,EACV,sBAAsB,CAAC,IAAI,GAAG,CAAC;YAC/B,oBAAC,eAAe,IACd,KAAK,EAAE,KAAK,EACZ,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,GACpC,EAEJ,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,aAAa,EACxB,YAAY,EACV,iBAAiB,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,GAEjE,CACH,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 { Group } from \"@itwin/insights-client\";\nimport React from \"react\";\nimport { HorizontalTile } from \"../SharedComponents/HorizontalTile\";\nimport type {\n ContextCustomUI,\n GroupingCustomUI,\n} from \"../customUI/GroupingMappingCustomUI\";\nimport type { GroupsProps } from \"./Groups\";\nimport { GroupMenuActions } from \"./GroupMenuActions\";\nimport { useGroupHilitedElementsContext } from \"../context/GroupHilitedElementsContext\";\nimport { OverlapProgress } from \"./GroupOverlapProgressBar\";\n\nexport interface GroupItemProps extends Omit<GroupsProps, \"onClickAddGroup\"> {\n group: Group;\n groupUIs: GroupingCustomUI[];\n contextUIs: ContextCustomUI[];\n setShowDeleteModal: (showDeleteModal: Group) => void;\n setActiveOverlapInfoPanelGroup?: (\n activeOverlapInfoPanelGroup: Group\n ) => void;\n}\n\nexport const GroupItem = ({\n onClickGroupTitle,\n disableActions,\n group,\n isVisualizing,\n ...rest\n}: GroupItemProps) => {\n const { overlappedElementsMetadata: { groupElementsInfo, overlappedElementsInfo }, showGroupColor } = useGroupHilitedElementsContext();\n\n const onTitleClick = () => {\n if (onClickGroupTitle) {\n onClickGroupTitle(group);\n }\n };\n\n return (\n <HorizontalTile\n title={group.groupName}\n subText={group.description}\n actionGroup={\n <GroupMenuActions\n group={group}\n disableActions={disableActions}\n {...rest}\n />\n }\n elementsInfo={\n overlappedElementsInfo.size > 0 &&\n <OverlapProgress\n group={group}\n overlappedElementsInfo={overlappedElementsInfo}\n groupElementsInfo={groupElementsInfo}\n />\n }\n showGroupColor={showGroupColor}\n isLoading={isVisualizing}\n onClickTitle={\n onClickGroupTitle && !disableActions ? onTitleClick : undefined\n }\n />\n );\n};\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import "./HorizontalTile.scss";
|
|
4
|
-
export interface HorizontalTileProps {
|
|
5
|
-
title: string;
|
|
6
|
-
actionGroup: ReactNode;
|
|
7
|
-
subText?: string;
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
onClickTitle?: () => void;
|
|
10
|
-
titleTooltip?: string;
|
|
11
|
-
subtextToolTip?: string;
|
|
12
|
-
selected?: boolean;
|
|
13
|
-
dragHandle?: ReactNode;
|
|
14
|
-
elementsInfo?: React.ReactNode;
|
|
15
|
-
showGroupColor?: boolean;
|
|
16
|
-
isLoading?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare const HorizontalTile: (props: HorizontalTileProps) => JSX.Element;
|
|
19
|
-
//# sourceMappingURL=HorizontalTile.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Anchor, Text } from "@itwin/itwinui-react";
|
|
3
|
-
import "./HorizontalTile.scss";
|
|
4
|
-
import classNames from "classnames";
|
|
5
|
-
export const HorizontalTile = (props) => {
|
|
6
|
-
return (React.createElement("div", { className: classNames("gmw-horizontal-tile-container", { "gmw-horizontal-tile-selected": props.selected }), onClick: props.onClick, "data-testid": "gmw-horizontal-tile" },
|
|
7
|
-
React.createElement("div", { className: "gmw-body-container" },
|
|
8
|
-
props.dragHandle,
|
|
9
|
-
React.createElement("div", { className: "gmw-body" },
|
|
10
|
-
!!props.onClickTitle &&
|
|
11
|
-
React.createElement(Anchor, { className: "gmw-body-text", onClick: props.onClickTitle, title: props.titleTooltip }, props.title),
|
|
12
|
-
!props.onClickTitle &&
|
|
13
|
-
React.createElement(Text, { className: "gmw-body-text", variant: "body", title: props.titleTooltip }, props.title),
|
|
14
|
-
props.subText && React.createElement(Text, { className: "gmw-body-text", isMuted: true, title: props.subtextToolTip, variant: "small" }, props.subText))),
|
|
15
|
-
React.createElement("div", { className: "gmw-interactables" },
|
|
16
|
-
props.actionGroup,
|
|
17
|
-
props.showGroupColor && !props.isLoading && props.elementsInfo &&
|
|
18
|
-
props.elementsInfo)));
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=HorizontalTile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalTile.js","sourceRoot":"","sources":["../../../../src/components/SharedComponents/HorizontalTile.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,uBAAuB,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAiBpC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;IAE3D,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,CAAC,+BAA+B,EAAE,EAAE,8BAA8B,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,iBAAc,qBAAqB;QACxK,6BAAK,SAAS,EAAC,oBAAoB;YAChC,KAAK,CAAC,UAAU;YACjB,6BAAK,SAAS,EAAC,UAAU;gBACtB,CAAC,CAAC,KAAK,CAAC,YAAY;oBACnB,oBAAC,MAAM,IAAC,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,IAAG,KAAK,CAAC,KAAK,CAAU;gBAEjH,CAAC,KAAK,CAAC,YAAY;oBAClB,oBAAC,IAAI,IAAC,SAAS,EAAC,eAAe,EAAC,OAAO,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,CAAC,YAAY,IAAG,KAAK,CAAC,KAAK,CAAQ;gBAE/F,KAAK,CAAC,OAAO,IAAI,oBAAC,IAAI,IAAC,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,cAAc,EAAE,OAAO,EAAC,OAAO,IAAE,KAAK,CAAC,OAAO,CAAQ,CAChI,CACF;QACN,6BAAK,SAAS,EAAC,mBAAmB;YAC/B,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,cAAc,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,YAAY;gBAC3D,KAAK,CAAC,YAAY,CAClB,CACF,CACP,CAAC;AAEJ,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 { ReactNode } from \"react\";\nimport React from \"react\";\nimport { Anchor, Text } from \"@itwin/itwinui-react\";\nimport \"./HorizontalTile.scss\";\nimport classNames from \"classnames\";\n\nexport interface HorizontalTileProps {\n title: string;\n actionGroup: ReactNode;\n subText?: string;\n onClick?: () => void;\n onClickTitle?: () => void;\n titleTooltip?: string;\n subtextToolTip?: string;\n selected?: boolean;\n dragHandle?: ReactNode;\n elementsInfo?: React.ReactNode;\n showGroupColor?: boolean;\n isLoading?: boolean;\n}\n\nexport const HorizontalTile = (props: HorizontalTileProps) => {\n\n return (\n <div className={classNames(\"gmw-horizontal-tile-container\", { \"gmw-horizontal-tile-selected\": props.selected })} onClick={props.onClick} data-testid=\"gmw-horizontal-tile\">\n <div className=\"gmw-body-container\">\n {props.dragHandle}\n <div className=\"gmw-body\">\n {!!props.onClickTitle &&\n <Anchor className=\"gmw-body-text\" onClick={props.onClickTitle} title={props.titleTooltip}>{props.title}</Anchor>\n }\n {!props.onClickTitle &&\n <Text className=\"gmw-body-text\" variant=\"body\" title={props.titleTooltip}>{props.title}</Text>\n }\n {props.subText && <Text className=\"gmw-body-text\" isMuted={true} title={props.subtextToolTip} variant=\"small\">{props.subText}</Text>}\n </div>\n </div>\n <div className=\"gmw-interactables\">\n {props.actionGroup}\n {props.showGroupColor && !props.isLoading && props.elementsInfo &&\n props.elementsInfo}\n </div>\n </div>\n );\n\n};\n"]}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
.gmw-horizontal-tile {
|
|
7
|
-
&-container {
|
|
8
|
-
display: flex;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
border-radius: 5px;
|
|
11
|
-
background-color: var(--iui-color-background-backdrop);
|
|
12
|
-
min-height: calc(var(--iui-size-s) * 5);
|
|
13
|
-
padding: 5.5px var(--iui-size-xs);
|
|
14
|
-
padding-bottom: 2px var(--iui-size-xs);
|
|
15
|
-
padding-top: 2px var(--iui-size-xs);
|
|
16
|
-
|
|
17
|
-
.gmw-body-container {
|
|
18
|
-
display: flex;
|
|
19
|
-
min-width: 0;
|
|
20
|
-
.gmw-drag-icon {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
height: 100%;
|
|
25
|
-
}
|
|
26
|
-
.gmw-body {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
min-width: 0;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
&-text {
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
white-space: nowrap;
|
|
34
|
-
text-overflow: ellipsis;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.gmw-interactables {
|
|
40
|
-
position: relative;
|
|
41
|
-
margin-left: 0;
|
|
42
|
-
align-items: center;
|
|
43
|
-
align-self: center;
|
|
44
|
-
min-width: 36px;
|
|
45
|
-
margin-right: var(--iui-size-2xs);
|
|
46
|
-
flex-shrink: 0;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&-selected {
|
|
51
|
-
border: 1px solid var(--iui-color-border-accent);
|
|
52
|
-
background: linear-gradient(
|
|
53
|
-
hsl(var(--iui-color-accent-hsl) / var(--iui-opacity-6)),
|
|
54
|
-
hsl(var(--iui-color-accent-hsl) / var(--iui-opacity-6))
|
|
55
|
-
),
|
|
56
|
-
linear-gradient(var(--iui-color-background), var(--iui-color-background));
|
|
57
|
-
}
|
|
58
|
-
}
|