@teambit/ui-foundation.ui.side-bar 0.0.885 → 0.0.886
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/component-tree/component-tree.tsx +10 -7
- package/component-tree/component-view/component-view.tsx +23 -20
- package/component-tree/component-view/index.ts +1 -1
- package/dist/component-tree/component-tree.d.ts +3 -1
- package/dist/component-tree/component-tree.js +3 -2
- package/dist/component-tree/component-tree.js.map +1 -1
- package/dist/component-tree/component-view/component-view.d.ts +0 -4
- package/dist/component-tree/component-view/component-view.js +21 -16
- package/dist/component-tree/component-view/component-view.js.map +1 -1
- package/dist/component-tree/component-view/index.d.ts +1 -1
- package/dist/component-tree/component-view/index.js +1 -1
- package/dist/component-tree/component-view/index.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/preview-1727839291394.js +7 -0
- package/index.ts +3 -8
- package/package.json +11 -11
- package/types/asset.d.ts +41 -0
- package/types/style.d.ts +42 -0
- package/.bit-capsule-ready +0 -0
- package/schema.json +0 -1415
- package/static/css/teambit.ui-foundation/ui/side-bar.6b147150.css +0 -266
- package/teambit_ui_foundation_ui_side_bar-component.js +0 -395
- package/teambit_ui_foundation_ui_side_bar-preview.js +0 -1
|
@@ -6,6 +6,7 @@ import { inflateToTree, attachPayload } from '@teambit/base-ui.graph.tree.inflat
|
|
|
6
6
|
import { Tree, TreeNodeRenderer, TreeNode as TreeNodeType } from '@teambit/design.ui.tree';
|
|
7
7
|
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
8
8
|
import { TreeContextProvider } from '@teambit/base-ui.graph.tree.tree-context';
|
|
9
|
+
import { LanesContext } from '@teambit/lanes.hooks.use-lanes';
|
|
9
10
|
import { PayloadType, ScopePayload } from './payload-type';
|
|
10
11
|
import { DefaultTreeNodeRenderer } from './default-tree-node-renderer';
|
|
11
12
|
|
|
@@ -14,6 +15,7 @@ type ComponentTreeProps = {
|
|
|
14
15
|
transformTree?: (rootNode: TreeNodeType) => TreeNodeType;
|
|
15
16
|
TreeNode?: TreeNodeRenderer<PayloadType>;
|
|
16
17
|
isCollapsed?: boolean;
|
|
18
|
+
lanesModel?: LanesModel;
|
|
17
19
|
// assumeScopeInUrl?: boolean;
|
|
18
20
|
} & React.HTMLAttributes<HTMLDivElement>;
|
|
19
21
|
|
|
@@ -31,6 +33,7 @@ export function ComponentTree({
|
|
|
31
33
|
isCollapsed,
|
|
32
34
|
className,
|
|
33
35
|
transformTree,
|
|
36
|
+
lanesModel,
|
|
34
37
|
// assumeScopeInUrl = false,
|
|
35
38
|
TreeNode = DefaultTreeNodeRenderer,
|
|
36
39
|
}: ComponentTreeProps) {
|
|
@@ -57,12 +60,12 @@ export function ComponentTree({
|
|
|
57
60
|
}, [components.length]);
|
|
58
61
|
|
|
59
62
|
return (
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
<LanesContext.Provider value={{ lanesModel }}>
|
|
64
|
+
<TreeContextProvider>
|
|
65
|
+
<div style={indentStyle(1)} className={className}>
|
|
66
|
+
<Tree TreeNode={TreeNode} activePath={activeComponent} tree={rootNode} isCollapsed={isCollapsed} />
|
|
67
|
+
</div>
|
|
68
|
+
</TreeContextProvider>
|
|
69
|
+
</LanesContext.Provider>
|
|
65
70
|
);
|
|
66
71
|
}
|
|
67
|
-
|
|
68
|
-
|
|
@@ -12,7 +12,7 @@ import { Tooltip } from '@teambit/design.ui.tooltip';
|
|
|
12
12
|
import { TreeContext } from '@teambit/base-ui.graph.tree.tree-context';
|
|
13
13
|
import { indentClass } from '@teambit/base-ui.graph.tree.indent';
|
|
14
14
|
import { TreeNodeProps } from '@teambit/base-ui.graph.tree.recursive-tree';
|
|
15
|
-
import {
|
|
15
|
+
import { LanesContext } from '@teambit/lanes.hooks.use-lanes';
|
|
16
16
|
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
17
17
|
import { getName } from '../utils/get-name';
|
|
18
18
|
|
|
@@ -20,16 +20,17 @@ import styles from './component-view.module.scss';
|
|
|
20
20
|
|
|
21
21
|
export type ComponentViewProps<Payload = any> = {
|
|
22
22
|
treeNodeSlot?: ComponentTreeSlot;
|
|
23
|
-
useLanes?: () => { lanesModel?: LanesModel };
|
|
24
23
|
scopeName?: string;
|
|
25
24
|
} & TreeNodeProps<Payload>;
|
|
26
25
|
|
|
27
26
|
export function ComponentView(props: ComponentViewProps) {
|
|
28
|
-
const { node, scopeName,
|
|
27
|
+
const { node, scopeName, treeNodeSlot } = props;
|
|
28
|
+
|
|
29
29
|
let component = node.payload;
|
|
30
30
|
|
|
31
31
|
const { onSelect } = useContext(TreeContext);
|
|
32
|
-
const
|
|
32
|
+
const lanesContextModel = useContext(LanesContext);
|
|
33
|
+
const lanesModel = lanesContextModel?.lanesModel;
|
|
33
34
|
|
|
34
35
|
const handleClick = useCallback(
|
|
35
36
|
(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
|
|
@@ -41,13 +42,13 @@ export function ComponentView(props: ComponentViewProps) {
|
|
|
41
42
|
const location = useLocation();
|
|
42
43
|
const scope = { name: scopeName };
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
const isMissingCompOrEnvId = !component?.id || !component?.environment?.id;
|
|
45
46
|
|
|
46
47
|
component = component as ComponentModel;
|
|
47
48
|
|
|
48
|
-
const envId = ComponentID.fromString(component.environment?.id as string);
|
|
49
|
+
const envId = !isMissingCompOrEnvId ? ComponentID.fromString(component.environment?.id as string) : undefined;
|
|
49
50
|
|
|
50
|
-
const envTooltip = (
|
|
51
|
+
const envTooltip = envId ? (
|
|
51
52
|
<Link
|
|
52
53
|
external
|
|
53
54
|
className={styles.envLink}
|
|
@@ -63,11 +64,14 @@ export function ComponentView(props: ComponentViewProps) {
|
|
|
63
64
|
<div className={styles.componentEnvTitle}>Environment</div>
|
|
64
65
|
<div>{component.environment?.id}</div>
|
|
65
66
|
</Link>
|
|
66
|
-
);
|
|
67
|
+
) : null;
|
|
67
68
|
|
|
68
|
-
const href =
|
|
69
|
+
const href = !isMissingCompOrEnvId
|
|
70
|
+
? lanesModel?.getLaneComponentUrlByVersion(component.id as any, lanesModel.viewedLane?.id, !scope.name)
|
|
71
|
+
: undefined;
|
|
69
72
|
|
|
70
73
|
const viewingMainCompOnLane = React.useMemo(() => {
|
|
74
|
+
if (isMissingCompOrEnvId) return false;
|
|
71
75
|
return (
|
|
72
76
|
!component.status?.isNew &&
|
|
73
77
|
!lanesModel?.viewedLane?.id.isDefault() &&
|
|
@@ -75,8 +79,6 @@ export function ComponentView(props: ComponentViewProps) {
|
|
|
75
79
|
);
|
|
76
80
|
}, [lanesModel?.viewedLane?.id.toString(), component.id.toString()]);
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
80
82
|
/**
|
|
81
83
|
* this covers the following use cases when matching the active component's href with location
|
|
82
84
|
*
|
|
@@ -119,7 +121,7 @@ export function ComponentView(props: ComponentViewProps) {
|
|
|
119
121
|
* @todo - move this logic to a util function
|
|
120
122
|
*/
|
|
121
123
|
const isActive = React.useMemo(() => {
|
|
122
|
-
if (!href || !location) return false;
|
|
124
|
+
if (!href || !location || !component?.id) return false;
|
|
123
125
|
|
|
124
126
|
const scopeFromQueryParams = location.search.split('scope=')[1];
|
|
125
127
|
|
|
@@ -178,16 +180,18 @@ export function ComponentView(props: ComponentViewProps) {
|
|
|
178
180
|
return !scopeFromQueryParams
|
|
179
181
|
? laneCompIdFromUrl?.toString() === compIdStr || laneCompIdFromUrl.fullName === compIdName
|
|
180
182
|
: laneCompIdFromUrl?.toString() === compIdStr ||
|
|
181
|
-
|
|
182
|
-
}, [href, viewingMainCompOnLane, location?.pathname, component
|
|
183
|
+
(laneCompIdFromUrl.fullName === compIdName && componentScope === scopeFromQueryParams);
|
|
184
|
+
}, [href, viewingMainCompOnLane, location?.pathname, component?.id.toString(), scope.name]);
|
|
185
|
+
|
|
186
|
+
if (isMissingCompOrEnvId) return null;
|
|
183
187
|
|
|
184
|
-
const isCompModified =
|
|
185
|
-
|| component.status?.modifyInfo?.hasModifiedDependencies;
|
|
188
|
+
const isCompModified =
|
|
189
|
+
component.status?.modifyInfo?.hasModifiedFiles || component.status?.modifyInfo?.hasModifiedDependencies;
|
|
186
190
|
|
|
187
191
|
const addOpacity = viewingMainCompOnLane && !isCompModified;
|
|
188
192
|
|
|
189
193
|
const Name = viewingMainCompOnLane ? (
|
|
190
|
-
<Tooltip className={styles.tooltip} placement="top" content=
|
|
194
|
+
<Tooltip className={styles.tooltip} placement="top" content="On Main">
|
|
191
195
|
<span className={classNames(addOpacity && styles.opacity)}>{getName(node.id)}</span>
|
|
192
196
|
</Tooltip>
|
|
193
197
|
) : (
|
|
@@ -213,9 +217,8 @@ export function ComponentView(props: ComponentViewProps) {
|
|
|
213
217
|
<div className={styles.right}>
|
|
214
218
|
<DeprecationIcon component={component} />
|
|
215
219
|
{/* {isInternal && <Icon of="Internal" className={styles.componentIcon} />} */}
|
|
216
|
-
{
|
|
217
|
-
treeNodeSlot
|
|
218
|
-
&& treeNodeSlot.toArray().map(([id, treeNode]) => <treeNode.widget key={id} component={component} />)}
|
|
220
|
+
{treeNodeSlot &&
|
|
221
|
+
treeNodeSlot.toArray().map(([id, treeNode]) => <treeNode.widget key={id} component={component} />)}
|
|
219
222
|
</div>
|
|
220
223
|
</Link>
|
|
221
224
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ComponentView } from './component-view';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ComponentModel } from '@teambit/component';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TreeNodeRenderer, TreeNode as TreeNodeType } from '@teambit/design.ui.tree';
|
|
4
|
+
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
4
5
|
import { PayloadType } from './payload-type';
|
|
5
6
|
type ComponentTreeProps = {
|
|
6
7
|
components: ComponentModel[];
|
|
7
8
|
transformTree?: (rootNode: TreeNodeType) => TreeNodeType;
|
|
8
9
|
TreeNode?: TreeNodeRenderer<PayloadType>;
|
|
9
10
|
isCollapsed?: boolean;
|
|
11
|
+
lanesModel?: LanesModel;
|
|
10
12
|
} & React.HTMLAttributes<HTMLDivElement>;
|
|
11
|
-
export declare function ComponentTree({ components, isCollapsed, className, transformTree, TreeNode, }: ComponentTreeProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function ComponentTree({ components, isCollapsed, className, transformTree, lanesModel, TreeNode, }: ComponentTreeProps): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -7,6 +7,7 @@ import { inflateToTree, attachPayload } from '@teambit/base-ui.graph.tree.inflat
|
|
|
7
7
|
import { Tree } from '@teambit/design.ui.tree';
|
|
8
8
|
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
9
9
|
import { TreeContextProvider } from '@teambit/base-ui.graph.tree.tree-context';
|
|
10
|
+
import { LanesContext } from '@teambit/lanes.hooks.use-lanes';
|
|
10
11
|
import { ScopePayload } from './payload-type';
|
|
11
12
|
import { DefaultTreeNodeRenderer } from './default-tree-node-renderer';
|
|
12
13
|
function calcPayload(components) {
|
|
@@ -15,7 +16,7 @@ function calcPayload(components) {
|
|
|
15
16
|
scopeIds.forEach((x) => x && payloadMap.set(`${x}/`, new ScopePayload()));
|
|
16
17
|
return payloadMap;
|
|
17
18
|
}
|
|
18
|
-
export function ComponentTree({ components, isCollapsed, className, transformTree,
|
|
19
|
+
export function ComponentTree({ components, isCollapsed, className, transformTree, lanesModel,
|
|
19
20
|
// assumeScopeInUrl = false,
|
|
20
21
|
TreeNode = DefaultTreeNodeRenderer, }) {
|
|
21
22
|
const { pathname = '/' } = useLocation() || {};
|
|
@@ -36,6 +37,6 @@ TreeNode = DefaultTreeNodeRenderer, }) {
|
|
|
36
37
|
return transformTree(tree);
|
|
37
38
|
return tree;
|
|
38
39
|
}, [components.length]);
|
|
39
|
-
return (_jsx(TreeContextProvider, { children: _jsx("div", { style: indentStyle(1), className: className, children: _jsx(Tree, { TreeNode: TreeNode, activePath: activeComponent, tree: rootNode, isCollapsed: isCollapsed }) }) }));
|
|
40
|
+
return (_jsx(LanesContext.Provider, { value: { lanesModel }, children: _jsx(TreeContextProvider, { children: _jsx("div", { style: indentStyle(1), className: className, children: _jsx(Tree, { TreeNode: TreeNode, activePath: activeComponent, tree: rootNode, isCollapsed: isCollapsed }) }) }) }));
|
|
40
41
|
}
|
|
41
42
|
//# sourceMappingURL=component-tree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-tree.js","sourceRoot":"","sources":["../../component-tree/component-tree.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,IAAI,EAA8C,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"component-tree.js","sourceRoot":"","sources":["../../component-tree/component-tree.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE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AAK,EAAE,EAAE,UAAU,EAAE,YAC1C,KAAC,mBAAmB,cAClB,cAAK,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,YAC9C,KAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAI,GAC/F,GACc,GACA,CACzB,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { ComponentTreeSlot } from '@teambit/component-tree';
|
|
2
2
|
import { TreeNodeProps } from '@teambit/base-ui.graph.tree.recursive-tree';
|
|
3
|
-
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
4
3
|
export type ComponentViewProps<Payload = any> = {
|
|
5
4
|
treeNodeSlot?: ComponentTreeSlot;
|
|
6
|
-
useLanes?: () => {
|
|
7
|
-
lanesModel?: LanesModel;
|
|
8
|
-
};
|
|
9
5
|
scopeName?: string;
|
|
10
6
|
} & TreeNodeProps<Payload>;
|
|
11
7
|
export declare function ComponentView(props: ComponentViewProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -9,33 +9,37 @@ import React, { useCallback, useContext } from 'react';
|
|
|
9
9
|
import { Tooltip } from '@teambit/design.ui.tooltip';
|
|
10
10
|
import { TreeContext } from '@teambit/base-ui.graph.tree.tree-context';
|
|
11
11
|
import { indentClass } from '@teambit/base-ui.graph.tree.indent';
|
|
12
|
-
import {
|
|
12
|
+
import { LanesContext } from '@teambit/lanes.hooks.use-lanes';
|
|
13
13
|
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
14
14
|
import { getName } from '../utils/get-name';
|
|
15
15
|
import styles from './component-view.module.scss';
|
|
16
16
|
export function ComponentView(props) {
|
|
17
|
-
const { node, scopeName,
|
|
17
|
+
const { node, scopeName, treeNodeSlot } = props;
|
|
18
18
|
let component = node.payload;
|
|
19
19
|
const { onSelect } = useContext(TreeContext);
|
|
20
|
-
const
|
|
20
|
+
const lanesContextModel = useContext(LanesContext);
|
|
21
|
+
const lanesModel = lanesContextModel?.lanesModel;
|
|
21
22
|
const handleClick = useCallback((event) => {
|
|
22
23
|
onSelect?.(node.id, event);
|
|
23
24
|
}, [onSelect, node.id]);
|
|
24
25
|
const location = useLocation();
|
|
25
26
|
const scope = { name: scopeName };
|
|
26
|
-
|
|
27
|
-
return null;
|
|
27
|
+
const isMissingCompOrEnvId = !component?.id || !component?.environment?.id;
|
|
28
28
|
component = component;
|
|
29
|
-
const envId = ComponentID.fromString(component.environment?.id);
|
|
30
|
-
const envTooltip = (_jsxs(Link, { external: true, className: styles.envLink, href: ComponentUrl.toUrl(envId, {
|
|
29
|
+
const envId = !isMissingCompOrEnvId ? ComponentID.fromString(component.environment?.id) : undefined;
|
|
30
|
+
const envTooltip = envId ? (_jsxs(Link, { external: true, className: styles.envLink, href: ComponentUrl.toUrl(envId, {
|
|
31
31
|
includeVersion: true,
|
|
32
32
|
useLocationOrigin: !window.location.host.startsWith('localhost'),
|
|
33
33
|
}), onClick: (event) => {
|
|
34
34
|
// do not trigger component selection
|
|
35
35
|
event.stopPropagation();
|
|
36
|
-
}, children: [_jsx("div", { className: styles.componentEnvTitle, children: "Environment" }), _jsx("div", { children: component.environment?.id })] }));
|
|
37
|
-
const href =
|
|
36
|
+
}, children: [_jsx("div", { className: styles.componentEnvTitle, children: "Environment" }), _jsx("div", { children: component.environment?.id })] })) : null;
|
|
37
|
+
const href = !isMissingCompOrEnvId
|
|
38
|
+
? lanesModel?.getLaneComponentUrlByVersion(component.id, lanesModel.viewedLane?.id, !scope.name)
|
|
39
|
+
: undefined;
|
|
38
40
|
const viewingMainCompOnLane = React.useMemo(() => {
|
|
41
|
+
if (isMissingCompOrEnvId)
|
|
42
|
+
return false;
|
|
39
43
|
return (!component.status?.isNew &&
|
|
40
44
|
!lanesModel?.viewedLane?.id.isDefault() &&
|
|
41
45
|
lanesModel?.isComponentOnMainButNotOnLane(component.id, undefined, lanesModel?.viewedLane?.id));
|
|
@@ -82,7 +86,7 @@ export function ComponentView(props) {
|
|
|
82
86
|
* @todo - move this logic to a util function
|
|
83
87
|
*/
|
|
84
88
|
const isActive = React.useMemo(() => {
|
|
85
|
-
if (!href || !location)
|
|
89
|
+
if (!href || !location || !component?.id)
|
|
86
90
|
return false;
|
|
87
91
|
const scopeFromQueryParams = location.search.split('scope=')[1];
|
|
88
92
|
const pathname = location.pathname.substring(1).split('?')[0];
|
|
@@ -127,14 +131,15 @@ export function ComponentView(props) {
|
|
|
127
131
|
? laneCompIdFromUrl?.toString() === compIdStr || laneCompIdFromUrl.fullName === compIdName
|
|
128
132
|
: laneCompIdFromUrl?.toString() === compIdStr ||
|
|
129
133
|
(laneCompIdFromUrl.fullName === compIdName && componentScope === scopeFromQueryParams);
|
|
130
|
-
}, [href, viewingMainCompOnLane, location?.pathname, component
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
}, [href, viewingMainCompOnLane, location?.pathname, component?.id.toString(), scope.name]);
|
|
135
|
+
if (isMissingCompOrEnvId)
|
|
136
|
+
return null;
|
|
137
|
+
const isCompModified = component.status?.modifyInfo?.hasModifiedFiles || component.status?.modifyInfo?.hasModifiedDependencies;
|
|
133
138
|
const addOpacity = viewingMainCompOnLane && !isCompModified;
|
|
134
|
-
const Name = viewingMainCompOnLane ? (_jsx(Tooltip, { className: styles.tooltip, placement: "top", content:
|
|
139
|
+
const Name = viewingMainCompOnLane ? (_jsx(Tooltip, { className: styles.tooltip, placement: "top", content: "On Main", children: _jsx("span", { className: classNames(addOpacity && styles.opacity), children: getName(node.id) }) })) : (_jsx("span", { children: getName(node.id) }));
|
|
135
140
|
return (_jsxs(Link, { href: href, className: classNames(indentClass, styles.component), activeClassName: styles.active, onClick: handleClick,
|
|
136
141
|
// exact={true}
|
|
137
|
-
active: isActive, children: [_jsxs("div", { className: styles.left, children: [_jsx(Tooltip, { className: styles.componentEnvTooltip, placement: "top", content: envTooltip, children: _jsx(EnvIcon, { component: component, className: styles.envIcon }) }), Name] }), _jsxs("div", { className: styles.right, children: [_jsx(DeprecationIcon, { component: component }), treeNodeSlot
|
|
138
|
-
|
|
142
|
+
active: isActive, children: [_jsxs("div", { className: styles.left, children: [_jsx(Tooltip, { className: styles.componentEnvTooltip, placement: "top", content: envTooltip, children: _jsx(EnvIcon, { component: component, className: styles.envIcon }) }), Name] }), _jsxs("div", { className: styles.right, children: [_jsx(DeprecationIcon, { component: component }), treeNodeSlot &&
|
|
143
|
+
treeNodeSlot.toArray().map(([id, treeNode]) => _jsx(treeNode.widget, { component: component }, id))] })] }));
|
|
139
144
|
}
|
|
140
145
|
//# sourceMappingURL=component-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-view.js","sourceRoot":"","sources":["../../../component-tree/component-view/component-view.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"component-view.js","sourceRoot":"","sources":["../../../component-tree/component-view/component-view.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qCAAqC,CA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IAChG,IACD,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ComponentView } from './component-view';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ComponentView } from './component-view';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../component-tree/component-view/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../component-tree/component-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { ComponentTree, ComponentView, ScopeTreeNode, NamespaceTreeNode,
|
|
1
|
+
export { ComponentTree, ComponentView, ScopeTreeNode, NamespaceTreeNode, ScopePayload } from './component-tree';
|
|
2
|
+
export type { PayloadType } from './component-tree';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ComponentTree, ComponentView, ScopeTreeNode, NamespaceTreeNode, ScopePayload
|
|
1
|
+
export { ComponentTree, ComponentView, ScopeTreeNode, NamespaceTreeNode, ScopePayload } from './component-tree';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC"}
|
package/index.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ScopeTreeNode,
|
|
5
|
-
NamespaceTreeNode,
|
|
6
|
-
PayloadType,
|
|
7
|
-
ScopePayload,
|
|
8
|
-
} from './component-tree';
|
|
1
|
+
export { ComponentTree, ComponentView, ScopeTreeNode, NamespaceTreeNode, ScopePayload } from './component-tree';
|
|
2
|
+
|
|
3
|
+
export type { PayloadType } from './component-tree';
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/ui-foundation.ui.side-bar",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.886",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/ui-foundation/ui/side-bar",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.ui-foundation",
|
|
8
8
|
"name": "ui/side-bar",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.886"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"classnames": "2.2.6",
|
|
13
13
|
"react-animate-height": "2.0.23",
|
|
14
|
-
"@teambit/base-react.navigation.link": "2.0.31",
|
|
15
14
|
"@teambit/base-ui.graph.tree.indent": "1.0.0",
|
|
16
15
|
"@teambit/base-ui.graph.tree.inflate-paths": "1.0.0",
|
|
17
16
|
"@teambit/base-ui.graph.tree.tree-context": "1.0.0",
|
|
@@ -19,24 +18,25 @@
|
|
|
19
18
|
"@teambit/lanes.ui.models.lanes-model": "0.0.221",
|
|
20
19
|
"@teambit/base-ui.theme.colors": "1.0.0",
|
|
21
20
|
"@teambit/base-ui.graph.tree.recursive-tree": "1.0.0",
|
|
22
|
-
"@teambit/component-id": "1.2.
|
|
23
|
-
"@teambit/component.modules.component-url": "0.0.167",
|
|
21
|
+
"@teambit/component-id": "1.2.2",
|
|
24
22
|
"@teambit/component.ui.deprecation-icon": "0.0.509",
|
|
25
|
-
"@teambit/
|
|
26
|
-
"@teambit/
|
|
27
|
-
"@teambit/
|
|
28
|
-
"@teambit/
|
|
23
|
+
"@teambit/evangelist.elements.icon": "1.0.2",
|
|
24
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.274",
|
|
25
|
+
"@teambit/component.modules.component-url": "0.0.169",
|
|
26
|
+
"@teambit/design.ui.tooltip": "0.0.371",
|
|
27
|
+
"@teambit/envs.ui.env-icon": "0.0.505"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@types/classnames": "2.2.11",
|
|
32
31
|
"@types/mocha": "9.1.0",
|
|
33
|
-
"@teambit/react.v17.react-env": "1.1.
|
|
32
|
+
"@teambit/react.v17.react-env": "1.1.71"
|
|
34
33
|
},
|
|
35
34
|
"peerDependencies": {
|
|
36
35
|
"react": "17.0.2",
|
|
37
36
|
"@types/react-dom": "^17.0.0",
|
|
38
37
|
"@types/react": "^17.0.0",
|
|
39
|
-
"react-dom": "17.0.2"
|
|
38
|
+
"react-dom": "17.0.2",
|
|
39
|
+
"@teambit/base-react.navigation.link": "2.0.31"
|
|
40
40
|
},
|
|
41
41
|
"license": "Apache-2.0",
|
|
42
42
|
"optionalDependencies": {},
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare module '*.png' {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<
|
|
9
|
+
SVGProps<SVGSVGElement> & { title?: string }
|
|
10
|
+
>;
|
|
11
|
+
const src: string;
|
|
12
|
+
export default src;
|
|
13
|
+
}
|
|
14
|
+
declare module '*.jpg' {
|
|
15
|
+
const value: any;
|
|
16
|
+
export = value;
|
|
17
|
+
}
|
|
18
|
+
declare module '*.jpeg' {
|
|
19
|
+
const value: any;
|
|
20
|
+
export = value;
|
|
21
|
+
}
|
|
22
|
+
declare module '*.gif' {
|
|
23
|
+
const value: any;
|
|
24
|
+
export = value;
|
|
25
|
+
}
|
|
26
|
+
declare module '*.bmp' {
|
|
27
|
+
const value: any;
|
|
28
|
+
export = value;
|
|
29
|
+
}
|
|
30
|
+
declare module '*.otf' {
|
|
31
|
+
const value: any;
|
|
32
|
+
export = value;
|
|
33
|
+
}
|
|
34
|
+
declare module '*.woff' {
|
|
35
|
+
const value: any;
|
|
36
|
+
export = value;
|
|
37
|
+
}
|
|
38
|
+
declare module '*.woff2' {
|
|
39
|
+
const value: any;
|
|
40
|
+
export = value;
|
|
41
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.module.scss' {
|
|
6
|
+
const classes: { readonly [key: string]: string };
|
|
7
|
+
export default classes;
|
|
8
|
+
}
|
|
9
|
+
declare module '*.module.sass' {
|
|
10
|
+
const classes: { readonly [key: string]: string };
|
|
11
|
+
export default classes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.less' {
|
|
15
|
+
const classes: { readonly [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string };
|
|
21
|
+
export default classes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.css' {
|
|
25
|
+
const classes: { readonly [key: string]: string };
|
|
26
|
+
export default classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module '*.sass' {
|
|
30
|
+
const classes: { readonly [key: string]: string };
|
|
31
|
+
export default classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '*.scss' {
|
|
35
|
+
const classes: { readonly [key: string]: string };
|
|
36
|
+
export default classes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.mdx' {
|
|
40
|
+
const component: any;
|
|
41
|
+
export default component;
|
|
42
|
+
}
|
package/.bit-capsule-ready
DELETED
|
File without changes
|