@teambit/ui-foundation.ui.side-bar 0.0.721 → 0.0.723
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-view/component-view.tsx +4 -1
- package/dist/component-tree/component-view/component-view.d.ts +4 -0
- package/dist/component-tree/component-view/component-view.js +1 -1
- package/dist/component-tree/component-view/component-view.js.map +1 -1
- package/dist/{preview-1674039846300.js → preview-1674271762484.js} +0 -0
- package/package-tar/teambit-ui-foundation.ui.side-bar-0.0.723.tgz +0 -0
- package/package.json +4 -4
- package/package-tar/teambit-ui-foundation.ui.side-bar-0.0.721.tgz +0 -0
|
@@ -11,12 +11,14 @@ import { TreeContext } from '@teambit/base-ui.graph.tree.tree-context';
|
|
|
11
11
|
import { indentClass } from '@teambit/base-ui.graph.tree.indent';
|
|
12
12
|
import { TreeNodeProps } from '@teambit/base-ui.graph.tree.recursive-tree';
|
|
13
13
|
import { useLanes } from '@teambit/lanes.hooks.use-lanes';
|
|
14
|
+
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
14
15
|
import { PayloadType } from '../payload-type';
|
|
15
16
|
import { getName } from '../utils/get-name';
|
|
16
17
|
import styles from './component-view.module.scss';
|
|
17
18
|
|
|
18
19
|
export type ComponentViewProps<Payload = any> = {
|
|
19
20
|
treeNodeSlot?: ComponentTreeSlot;
|
|
21
|
+
useLanes?: () => { lanesModel?: LanesModel };
|
|
20
22
|
} & TreeNodeProps<Payload>;
|
|
21
23
|
|
|
22
24
|
export function ComponentView(props: ComponentViewProps<PayloadType>) {
|
|
@@ -24,7 +26,8 @@ export function ComponentView(props: ComponentViewProps<PayloadType>) {
|
|
|
24
26
|
const component = node.payload;
|
|
25
27
|
|
|
26
28
|
const { onSelect } = useContext(TreeContext);
|
|
27
|
-
const { lanesModel } = useLanes();
|
|
29
|
+
const { lanesModel } = (props.useLanes || useLanes)();
|
|
30
|
+
|
|
28
31
|
const handleClick = useCallback(
|
|
29
32
|
(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
|
|
30
33
|
onSelect && onSelect(node.id, event);
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentTreeSlot } from '@teambit/component-tree';
|
|
3
3
|
import { TreeNodeProps } from '@teambit/base-ui.graph.tree.recursive-tree';
|
|
4
|
+
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
|
|
4
5
|
import { PayloadType } from '../payload-type';
|
|
5
6
|
export declare type ComponentViewProps<Payload = any> = {
|
|
6
7
|
treeNodeSlot?: ComponentTreeSlot;
|
|
8
|
+
useLanes?: () => {
|
|
9
|
+
lanesModel?: LanesModel;
|
|
10
|
+
};
|
|
7
11
|
} & TreeNodeProps<Payload>;
|
|
8
12
|
export declare function ComponentView(props: ComponentViewProps<PayloadType>): JSX.Element;
|
|
@@ -45,7 +45,7 @@ function ComponentView(props) {
|
|
|
45
45
|
const { node } = props;
|
|
46
46
|
const component = node.payload;
|
|
47
47
|
const { onSelect } = (0, react_1.useContext)(base_ui_graph_tree_tree_context_1.TreeContext);
|
|
48
|
-
const { lanesModel } = (
|
|
48
|
+
const { lanesModel } = (props.useLanes || lanes_hooks_use_lanes_1.useLanes)();
|
|
49
49
|
const handleClick = (0, react_1.useCallback)((event) => {
|
|
50
50
|
onSelect && onSelect(node.id, event);
|
|
51
51
|
}, [onSelect, node.id]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-view.js","sourceRoot":"","sources":["../../../component-tree/component-view/component-view.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oFAA2D;AAC3D,gEAAoD;AACpD,0FAAyE;AACzE,4DAAoC;AACpC,kDAAiE;AACjE,8FAAwE;AACxE,+CAAuD;AACvD,kEAAqD;AACrD,8FAAuE;AACvE,kFAAiE;AAEjE,0EAA0D;
|
|
1
|
+
{"version":3,"file":"component-view.js","sourceRoot":"","sources":["../../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AU;gBACnF,8BAAC,0BAAO,IAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,oCAAM,CAAC,OAAO,GAAI,CACpD;YACT,IAAI,CACD;QAEN,uCAAK,SAAS,EAAE,oCAAM,CAAC,KAAK;YAC1B,8BAAC,+CAAe,IAAC,SAAS,EAAE,SAAS,GAAI;YAExC,KAAK,CAAC,YAAY;gBACjB,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,8BAAC,QAAQ,CAAC,MAAM,IAAC,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC,CACtG,CACD,CACR,CAAC;AACJ,CAAC;AAjED,sCAiEC"}
|
|
File without changes
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/ui-foundation.ui.side-bar",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.723",
|
|
4
4
|
"homepage": "https://bit.dev/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.723"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"classnames": "2.2.6",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@teambit/base-ui.graph.tree.recursive-tree": "1.0.0",
|
|
21
21
|
"@teambit/evangelist.elements.icon": "1.0.2",
|
|
22
22
|
"@teambit/design.ui.tree": "0.0.16",
|
|
23
|
-
"@teambit/lanes.ui.models.lanes-model": "0.0.
|
|
23
|
+
"@teambit/lanes.ui.models.lanes-model": "0.0.73",
|
|
24
24
|
"@teambit/component.modules.component-url": "0.0.148",
|
|
25
25
|
"@teambit/component.ui.deprecation-icon": "0.0.504",
|
|
26
26
|
"@teambit/design.ui.tooltip": "0.0.361",
|
|
27
27
|
"@teambit/envs.ui.env-icon": "0.0.495",
|
|
28
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
|
28
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.111"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/react": "^17.0.8",
|
|
Binary file
|