@teambit/ui-foundation.ui.side-bar 0.0.873 → 0.0.875

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.
@@ -28,7 +28,7 @@ export function ComponentTree({
28
28
  const { pathname = '/' } = useLocation() || {};
29
29
  // override default splat from location when viewing a lane component
30
30
  const laneCompUrl = pathname.split(LanesModel.baseLaneComponentRoute.concat('/'))[1];
31
- const idFromLocation = useIdFromLocation(laneCompUrl);
31
+ const idFromLocation = useIdFromLocation(laneCompUrl, true);
32
32
  const activeComponent = useMemo(() => {
33
33
  const active = components.find((x) => {
34
34
  return idFromLocation && (idFromLocation === x.id.fullName || idFromLocation === x.id.toStringWithoutVersion());
@@ -1,3 +1,4 @@
1
+ /* eslint-disable complexity */
1
2
  import { ComponentTreeSlot } from '@teambit/component-tree';
2
3
  import { Link, useLocation } from '@teambit/base-react.navigation.link';
3
4
  import { EnvIcon } from '@teambit/envs.ui.env-icon';
@@ -13,7 +14,6 @@ import { indentClass } from '@teambit/base-ui.graph.tree.indent';
13
14
  import { TreeNodeProps } from '@teambit/base-ui.graph.tree.recursive-tree';
14
15
  import { useLanes } from '@teambit/lanes.hooks.use-lanes';
15
16
  import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
16
- import { PayloadType } from '../payload-type';
17
17
  import { getName } from '../utils/get-name';
18
18
 
19
19
  import styles from './component-view.module.scss';
@@ -24,9 +24,9 @@ export type ComponentViewProps<Payload = any> = {
24
24
  scopeName?: string;
25
25
  } & TreeNodeProps<Payload>;
26
26
 
27
- export function ComponentView(props: ComponentViewProps<PayloadType>) {
27
+ export function ComponentView(props: ComponentViewProps) {
28
28
  const { node, scopeName } = props;
29
- const component = node.payload;
29
+ let component = node.payload;
30
30
 
31
31
  const { onSelect } = useContext(TreeContext);
32
32
  const { lanesModel } = (props.useLanes || useLanes)();
@@ -41,7 +41,9 @@ export function ComponentView(props: ComponentViewProps<PayloadType>) {
41
41
  const location = useLocation();
42
42
  const scope = { name: scopeName };
43
43
 
44
- if (!(component instanceof ComponentModel)) return null;
44
+ if (!component.id || !component.environment.id) return null;
45
+
46
+ component = component as ComponentModel;
45
47
 
46
48
  const envId = ComponentID.fromString(component.environment?.id as string);
47
49
 
@@ -63,7 +65,7 @@ export function ComponentView(props: ComponentViewProps<PayloadType>) {
63
65
  </Link>
64
66
  );
65
67
 
66
- const href = lanesModel?.getLaneComponentUrlByVersion(component.id as any, lanesModel.viewedLane?.id);
68
+ const href = lanesModel?.getLaneComponentUrlByVersion(component.id as any, lanesModel.viewedLane?.id, !scope.name);
67
69
 
68
70
  const viewingMainCompOnLane = React.useMemo(() => {
69
71
  return (
@@ -90,24 +92,31 @@ export function ComponentView(props: ComponentViewProps<PayloadType>) {
90
92
  * - /<component-id>/~sub-route
91
93
  * - /<component-id>/~sub-route/another-sub-route
92
94
  * - /<component-id>/~sub-route?version=<version>
95
+ * - /<component-id>/~sub-route?scope=<scope>
96
+ * - /<component-id>?scope=<scope>
93
97
  *
94
98
  * 2. viewing a lane component
95
99
  *
96
100
  * - /~lane/<lane-id>/<component-id>/
101
+ * - /~lane/<lane-id>/<component-id>?scope=<scope>
97
102
  * - /~lane/<lane-id>/<component-id>/~sub-route
98
103
  * - /~lane/<lane-id>/<component-id>/~sub-route/another-sub-route
99
104
  * - /~lane/<lane-id>/<component-id>/~sub-route?version=<version>
105
+ * - /~lane/<lane-id>/<component-id>/~sub-route?scope=<scope>
100
106
  *
101
107
  * 3. viewing a main component when on a lane
102
108
  *
103
109
  * - /?lane=<lane-id>/<component-id>/
110
+ * - /?lane=<lane-id>/<component-id>?scope=<scope>
104
111
  * - /?lane=<lane-id>/<component-id>/~sub-route
105
112
  * - /?lane=<lane-id>/<component-id>/~sub-route/another-sub-route
106
113
  * - /?lane=<lane-id>/<component-id>/~sub-route?version=<version>
114
+ * - /?lane=<lane-id>/<component-id>/~sub-route?scope=<scope>
107
115
  *
108
116
  * 4. viewing currently checked out lane component on workspace
109
117
  *
110
118
  * - /<component-id-without-scope>/
119
+ * - /<component-id-without-scope>?scope=<scope>
111
120
  *
112
121
  * 5. viewing lane component from the same scope as the lane on a workspace
113
122
  *
@@ -118,22 +127,33 @@ export function ComponentView(props: ComponentViewProps<PayloadType>) {
118
127
  const isActive = React.useMemo(() => {
119
128
  if (!href || !location) return false;
120
129
 
130
+ const scopeFromQueryParams = location.search.split('scope=')[1];
131
+
121
132
  const pathname = location.pathname.substring(1).split('?')[0];
122
133
  const compIdStr = component.id.toStringWithoutVersion();
123
134
  const compIdName = component.id.fullName;
135
+ const componentScope = component.id.scope;
136
+ const locationIncludesLaneId = location.pathname.includes(LanesModel.lanesPrefix);
124
137
 
125
138
  const sanitizedHref = (href.startsWith('/') ? href.substring(1) : href).split('?')[0];
139
+
126
140
  // if you are in a workspace, the componentId might not have a scopeId, if you are viewing
127
141
  // a component on the checked out lane
128
142
  const viewingCheckedOutLaneComp =
129
143
  lanesModel?.currentLane && lanesModel.currentLane.id.toString() === lanesModel?.viewedLane?.id.toString();
130
144
 
131
- if (lanesModel?.viewedLane?.id.isDefault() || viewingMainCompOnLane || viewingCheckedOutLaneComp) {
145
+ if (
146
+ !locationIncludesLaneId &&
147
+ (lanesModel?.viewedLane?.id.isDefault() || viewingMainCompOnLane || viewingCheckedOutLaneComp)
148
+ ) {
132
149
  // split out any sub routes if exist
133
150
  const compUrl = pathname.split('/~')[0];
134
151
  // may or may not contain scope
135
152
  const scopeUrl = scope.name ? `${scope.name.replace('.', '/')}/` : '';
136
- return sanitizedHref === compUrl.replace(scopeUrl, '');
153
+ const compUrlWithoutScope = compUrl.replace(scopeUrl, '');
154
+ return !scopeFromQueryParams
155
+ ? sanitizedHref === compUrlWithoutScope
156
+ : sanitizedHref === compUrl && componentScope === scopeFromQueryParams;
137
157
  }
138
158
 
139
159
  const laneCompUrlWithSubRoutes = pathname.split(LanesModel.baseLaneComponentRoute)[1] ?? '';
@@ -141,19 +161,30 @@ export function ComponentView(props: ComponentViewProps<PayloadType>) {
141
161
  const _laneCompUrl = laneCompUrlWithSubRoutes.split('/~')[0] ?? '';
142
162
  const laneCompUrl = _laneCompUrl.startsWith('/') ? _laneCompUrl.substring(1) : _laneCompUrl;
143
163
 
144
- const laneCompIdFromUrl = ComponentID.tryFromString(laneCompUrl);
164
+ /**
165
+ * if the laneCompUrl doesn't have the scope as part of it and you are on a bare scope
166
+ * attach the bare scope to the laneCompUrl and parse it as a ComponentID
167
+ */
168
+ const laneCompIdFromUrl =
169
+ ComponentID.tryFromString(laneCompUrl) ??
170
+ (scope.name ? ComponentID.tryFromString(`${scope.name}/${laneCompUrl}`) : undefined);
145
171
 
146
172
  // viewing lane component from the same scope as the lane on a workspace
147
173
  const laneAndCompFromSameScopeOnWs =
148
174
  !scope.name && lanesModel?.viewedLane?.id && component.id.scope === lanesModel?.viewedLane?.id.scope;
149
175
 
150
176
  if (laneAndCompFromSameScopeOnWs) {
151
- return compIdName === laneCompUrl;
177
+ return !scopeFromQueryParams
178
+ ? compIdName === laneCompUrl
179
+ : compIdName === laneCompUrl && componentScope === scopeFromQueryParams;
152
180
  }
153
181
 
154
182
  if (!laneCompIdFromUrl) return false;
155
183
 
156
- return laneCompIdFromUrl?.toString() === compIdStr || laneCompIdFromUrl.fullName === compIdName;
184
+ return !scopeFromQueryParams
185
+ ? laneCompIdFromUrl?.toString() === compIdStr || laneCompIdFromUrl.fullName === compIdName
186
+ : laneCompIdFromUrl?.toString() === compIdStr ||
187
+ (laneCompIdFromUrl.fullName === compIdName && componentScope === scopeFromQueryParams);
157
188
  }, [href, viewingMainCompOnLane, location?.pathname, component.id.toString(), scope]);
158
189
 
159
190
  return (
@@ -40,7 +40,7 @@ TreeNode = default_tree_node_renderer_1.DefaultTreeNodeRenderer, }) {
40
40
  const { pathname = '/' } = (0, base_react_navigation_link_1.useLocation)() || {};
41
41
  // override default splat from location when viewing a lane component
42
42
  const laneCompUrl = pathname.split(lanes_ui_models_lanes_model_1.LanesModel.baseLaneComponentRoute.concat('/'))[1];
43
- const idFromLocation = (0, component_1.useIdFromLocation)(laneCompUrl);
43
+ const idFromLocation = (0, component_1.useIdFromLocation)(laneCompUrl, true);
44
44
  const activeComponent = (0, react_1.useMemo)(() => {
45
45
  const active = components.find((x) => {
46
46
  return idFromLocation && (idFromLocation === x.id.fullName || idFromLocation === x.id.toStringWithoutVersion());
@@ -1 +1 @@
1
- {"version":3,"file":"component-tree.js","sourceRoot":"","sources":["../../component-tree/component-tree.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuE;AACvE,+CAAuC;AACvC,oFAAkE;AAClE,kFAAiE;AACjE,gGAAyF;AACzF,4DAA2F;AAC3F,sFAAkE;AAClE,8FAA+E;AAC/E,iDAA2D;AAC3D,6EAAuE;AAUvE,SAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,WAAW,EACX,SAAS,EACT,aAAa;AACb,4BAA4B;AAC5B,QAAQ,GAAG,oDAAuB,GACf;IACnB,MAAM,EAAE,QAAQ,GAAG,GAAG,EAAE,GAAG,IAAA,wCAAW,GAAE,IAAI,EAAE,CAAC;IAC/C,qEAAqE;IACrE,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,wCAAU,CAAC,sBAAsB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrF,MAAM,cAAc,GAAG,IAAA,6BAAiB,EAAC,WAAW,CAAC,CAAC;IACtD,MAAM,eAAe,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QACnC,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;YACnC,OAAO,cAAc,IAAI,CAAC,cAAc,KAAK,CAAC,CAAC,EAAE,CAAC,QAAQ,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE,CAAC,sBAAsB,EAAE,CAAC,CAAC;QAClH,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE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C,CAAC,CAAC,CAAC,CAAC;IAEpH,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/E,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,2BAAY,EAAE,CAAC,CAAC,CAAC;IAE1E,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -2,7 +2,6 @@ import { ComponentTreeSlot } from '@teambit/component-tree';
2
2
  import React from 'react';
3
3
  import { TreeNodeProps } from '@teambit/base-ui.graph.tree.recursive-tree';
4
4
  import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
5
- import { PayloadType } from '../payload-type';
6
5
  export declare type ComponentViewProps<Payload = any> = {
7
6
  treeNodeSlot?: ComponentTreeSlot;
8
7
  useLanes?: () => {
@@ -10,4 +9,4 @@ export declare type ComponentViewProps<Payload = any> = {
10
9
  };
11
10
  scopeName?: string;
12
11
  } & TreeNodeProps<Payload>;
13
- export declare function ComponentView(props: ComponentViewProps<PayloadType>): React.JSX.Element;
12
+ export declare function ComponentView(props: ComponentViewProps): React.JSX.Element;
@@ -32,7 +32,6 @@ const envs_ui_env_icon_1 = require("@teambit/envs.ui.env-icon");
32
32
  const component_ui_deprecation_icon_1 = require("@teambit/component.ui.deprecation-icon");
33
33
  const classnames_1 = __importDefault(require("classnames"));
34
34
  const component_id_1 = require("@teambit/component-id");
35
- const component_1 = require("@teambit/component");
36
35
  const component_modules_component_url_1 = require("@teambit/component.modules.component-url");
37
36
  const react_1 = __importStar(require("react"));
38
37
  const design_ui_tooltip_1 = require("@teambit/design.ui.tooltip");
@@ -45,7 +44,7 @@ const component_view_module_scss_1 = __importDefault(require("./component-view.m
45
44
  function ComponentView(props) {
46
45
  var _a, _b, _c, _d;
47
46
  const { node, scopeName } = props;
48
- const component = node.payload;
47
+ let component = node.payload;
49
48
  const { onSelect } = (0, react_1.useContext)(base_ui_graph_tree_tree_context_1.TreeContext);
50
49
  const { lanesModel } = (props.useLanes || lanes_hooks_use_lanes_1.useLanes)();
51
50
  const handleClick = (0, react_1.useCallback)((event) => {
@@ -53,8 +52,9 @@ function ComponentView(props) {
53
52
  }, [onSelect, node.id]);
54
53
  const location = (0, base_react_navigation_link_1.useLocation)();
55
54
  const scope = { name: scopeName };
56
- if (!(component instanceof component_1.ComponentModel))
55
+ if (!component.id || !component.environment.id)
57
56
  return null;
57
+ component = component;
58
58
  const envId = component_id_1.ComponentID.fromString((_a = component.environment) === null || _a === void 0 ? void 0 : _a.id);
59
59
  const envTooltip = (react_1.default.createElement(base_react_navigation_link_1.Link, { className: component_view_module_scss_1.default.envLink, href: component_modules_component_url_1.ComponentUrl.toUrl(envId, {
60
60
  includeVersion: true,
@@ -65,7 +65,7 @@ function ComponentView(props) {
65
65
  } },
66
66
  react_1.default.createElement("div", { className: component_view_module_scss_1.default.componentEnvTitle }, "Environment"),
67
67
  react_1.default.createElement("div", null, (_b = component.environment) === null || _b === void 0 ? void 0 : _b.id)));
68
- const href = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.getLaneComponentUrlByVersion(component.id, (_c = lanesModel.viewedLane) === null || _c === void 0 ? void 0 : _c.id);
68
+ const href = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.getLaneComponentUrlByVersion(component.id, (_c = lanesModel.viewedLane) === null || _c === void 0 ? void 0 : _c.id, !scope.name);
69
69
  const viewingMainCompOnLane = react_1.default.useMemo(() => {
70
70
  var _a, _b, _c;
71
71
  return (!((_a = component.status) === null || _a === void 0 ? void 0 : _a.isNew) &&
@@ -83,24 +83,31 @@ function ComponentView(props) {
83
83
  * - /<component-id>/~sub-route
84
84
  * - /<component-id>/~sub-route/another-sub-route
85
85
  * - /<component-id>/~sub-route?version=<version>
86
+ * - /<component-id>/~sub-route?scope=<scope>
87
+ * - /<component-id>?scope=<scope>
86
88
  *
87
89
  * 2. viewing a lane component
88
90
  *
89
91
  * - /~lane/<lane-id>/<component-id>/
92
+ * - /~lane/<lane-id>/<component-id>?scope=<scope>
90
93
  * - /~lane/<lane-id>/<component-id>/~sub-route
91
94
  * - /~lane/<lane-id>/<component-id>/~sub-route/another-sub-route
92
95
  * - /~lane/<lane-id>/<component-id>/~sub-route?version=<version>
96
+ * - /~lane/<lane-id>/<component-id>/~sub-route?scope=<scope>
93
97
  *
94
98
  * 3. viewing a main component when on a lane
95
99
  *
96
100
  * - /?lane=<lane-id>/<component-id>/
101
+ * - /?lane=<lane-id>/<component-id>?scope=<scope>
97
102
  * - /?lane=<lane-id>/<component-id>/~sub-route
98
103
  * - /?lane=<lane-id>/<component-id>/~sub-route/another-sub-route
99
104
  * - /?lane=<lane-id>/<component-id>/~sub-route?version=<version>
105
+ * - /?lane=<lane-id>/<component-id>/~sub-route?scope=<scope>
100
106
  *
101
107
  * 4. viewing currently checked out lane component on workspace
102
108
  *
103
109
  * - /<component-id-without-scope>/
110
+ * - /<component-id-without-scope>?scope=<scope>
104
111
  *
105
112
  * 5. viewing lane component from the same scope as the lane on a workspace
106
113
  *
@@ -109,35 +116,51 @@ function ComponentView(props) {
109
116
  * @todo - move this logic to a util function
110
117
  */
111
118
  const isActive = react_1.default.useMemo(() => {
112
- var _a, _b, _c, _d, _e, _f;
119
+ var _a, _b, _c, _d, _e, _f, _g;
113
120
  if (!href || !location)
114
121
  return false;
122
+ const scopeFromQueryParams = location.search.split('scope=')[1];
115
123
  const pathname = location.pathname.substring(1).split('?')[0];
116
124
  const compIdStr = component.id.toStringWithoutVersion();
117
125
  const compIdName = component.id.fullName;
126
+ const componentScope = component.id.scope;
127
+ const locationIncludesLaneId = location.pathname.includes(lanes_ui_models_lanes_model_1.LanesModel.lanesPrefix);
118
128
  const sanitizedHref = (href.startsWith('/') ? href.substring(1) : href).split('?')[0];
119
129
  // if you are in a workspace, the componentId might not have a scopeId, if you are viewing
120
130
  // a component on the checked out lane
121
131
  const viewingCheckedOutLaneComp = (lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.currentLane) && lanesModel.currentLane.id.toString() === ((_a = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.viewedLane) === null || _a === void 0 ? void 0 : _a.id.toString());
122
- if (((_b = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.viewedLane) === null || _b === void 0 ? void 0 : _b.id.isDefault()) || viewingMainCompOnLane || viewingCheckedOutLaneComp) {
132
+ if (!locationIncludesLaneId &&
133
+ (((_b = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.viewedLane) === null || _b === void 0 ? void 0 : _b.id.isDefault()) || viewingMainCompOnLane || viewingCheckedOutLaneComp)) {
123
134
  // split out any sub routes if exist
124
135
  const compUrl = pathname.split('/~')[0];
125
136
  // may or may not contain scope
126
137
  const scopeUrl = scope.name ? `${scope.name.replace('.', '/')}/` : '';
127
- return sanitizedHref === compUrl.replace(scopeUrl, '');
138
+ const compUrlWithoutScope = compUrl.replace(scopeUrl, '');
139
+ return !scopeFromQueryParams
140
+ ? sanitizedHref === compUrlWithoutScope
141
+ : sanitizedHref === compUrl && componentScope === scopeFromQueryParams;
128
142
  }
129
143
  const laneCompUrlWithSubRoutes = (_c = pathname.split(lanes_ui_models_lanes_model_1.LanesModel.baseLaneComponentRoute)[1]) !== null && _c !== void 0 ? _c : '';
130
144
  const _laneCompUrl = (_d = laneCompUrlWithSubRoutes.split('/~')[0]) !== null && _d !== void 0 ? _d : '';
131
145
  const laneCompUrl = _laneCompUrl.startsWith('/') ? _laneCompUrl.substring(1) : _laneCompUrl;
132
- const laneCompIdFromUrl = component_id_1.ComponentID.tryFromString(laneCompUrl);
146
+ /**
147
+ * if the laneCompUrl doesn't have the scope as part of it and you are on a bare scope
148
+ * attach the bare scope to the laneCompUrl and parse it as a ComponentID
149
+ */
150
+ const laneCompIdFromUrl = (_e = component_id_1.ComponentID.tryFromString(laneCompUrl)) !== null && _e !== void 0 ? _e : (scope.name ? component_id_1.ComponentID.tryFromString(`${scope.name}/${laneCompUrl}`) : undefined);
133
151
  // viewing lane component from the same scope as the lane on a workspace
134
- const laneAndCompFromSameScopeOnWs = !scope.name && ((_e = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.viewedLane) === null || _e === void 0 ? void 0 : _e.id) && component.id.scope === ((_f = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.viewedLane) === null || _f === void 0 ? void 0 : _f.id.scope);
152
+ const laneAndCompFromSameScopeOnWs = !scope.name && ((_f = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.viewedLane) === null || _f === void 0 ? void 0 : _f.id) && component.id.scope === ((_g = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.viewedLane) === null || _g === void 0 ? void 0 : _g.id.scope);
135
153
  if (laneAndCompFromSameScopeOnWs) {
136
- return compIdName === laneCompUrl;
154
+ return !scopeFromQueryParams
155
+ ? compIdName === laneCompUrl
156
+ : compIdName === laneCompUrl && componentScope === scopeFromQueryParams;
137
157
  }
138
158
  if (!laneCompIdFromUrl)
139
159
  return false;
140
- return (laneCompIdFromUrl === null || laneCompIdFromUrl === void 0 ? void 0 : laneCompIdFromUrl.toString()) === compIdStr || laneCompIdFromUrl.fullName === compIdName;
160
+ return !scopeFromQueryParams
161
+ ? (laneCompIdFromUrl === null || laneCompIdFromUrl === void 0 ? void 0 : laneCompIdFromUrl.toString()) === compIdStr || laneCompIdFromUrl.fullName === compIdName
162
+ : (laneCompIdFromUrl === null || laneCompIdFromUrl === void 0 ? void 0 : laneCompIdFromUrl.toString()) === compIdStr ||
163
+ (laneCompIdFromUrl.fullName === compIdName && componentScope === scopeFromQueryParams);
141
164
  }, [href, viewingMainCompOnLane, location === null || location === void 0 ? void 0 : location.pathname, component.id.toString(), scope]);
142
165
  return (react_1.default.createElement(base_react_navigation_link_1.Link, { href: href, className: (0, classnames_1.default)(base_ui_graph_tree_indent_1.indentClass, component_view_module_scss_1.default.component, viewingMainCompOnLane && component_view_module_scss_1.default.mainOnly), activeClassName: component_view_module_scss_1.default.active, onClick: handleClick,
143
166
  // exact={true}
@@ -1 +1 @@
1
- {"version":3,"file":"component-view.js","sourceRoot":"","sources":["../../../component-tree/component-view/component-view.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oFAAwE;AACxE,gEAAoD;AACpD,0FAAyE;AACzE,4DAAoC;AACpC,wDAAoD;AACpD,kDAAoD;AACpD,8FAAwE;AACxE,+CAAuD;AACvD,kEAAqD;AACrD,8FAAuE;AACvE,kFAAiE;AAEjE,0EAA0D;AAC1D,sFAAkE;AAElE,gDAA4C;AAE5C,8FAAkD;AAQlD,SAAgB,aAAa,CAAC,KAAsC;;IAClE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;IAE/B,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,kBAAU,EAAC,6CAAW,CAAC,CAAC;IAC7C,MAAM,EAAE,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,gCAAQ,CAAC,EAAE,CAAC;IAEtD,MAAM,WAAW,GAAG,IAAA,mBAAW,EAC7B,CAAC,KAAsD,EAAE,EAAE;QACzD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC,EACD,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CACpB,CAAC;IAEF,MAAM,QAAQ,GAAG,IAAA,wCAAW,GAAE,CAAC;IAC/B,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAElC,IAAI,CAAC,CAAC,SAAS,YAAY,0BAAc,CAAC;QAA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D,CACR,CAAC;AACJ,CAAC;AA3LD,sCA2LC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/ui-foundation.ui.side-bar",
3
- "version": "0.0.873",
3
+ "version": "0.0.875",
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.873"
9
+ "version": "0.0.875"
10
10
  },
11
11
  "dependencies": {
12
12
  "classnames": "2.2.6",
@@ -18,15 +18,15 @@
18
18
  "@teambit/base-ui.graph.tree.recursive-tree": "1.0.0",
19
19
  "@teambit/base-ui.graph.tree.tree-context": "1.0.0",
20
20
  "@teambit/base-ui.theme.colors": "1.0.0",
21
- "@teambit/component-id": "1.1.1",
22
- "@teambit/component.modules.component-url": "0.0.162",
21
+ "@teambit/component-id": "1.2.0",
22
+ "@teambit/component.modules.component-url": "0.0.167",
23
23
  "@teambit/component.ui.deprecation-icon": "0.0.509",
24
- "@teambit/design.ui.tooltip": "0.0.366",
24
+ "@teambit/design.ui.tooltip": "0.0.361",
25
25
  "@teambit/design.ui.tree": "0.0.15",
26
- "@teambit/envs.ui.env-icon": "0.0.500",
26
+ "@teambit/envs.ui.env-icon": "0.0.505",
27
27
  "@teambit/evangelist.elements.icon": "1.0.2",
28
- "@teambit/lanes.hooks.use-lanes": "0.0.255",
29
- "@teambit/lanes.ui.models.lanes-model": "0.0.211"
28
+ "@teambit/lanes.hooks.use-lanes": "0.0.258",
29
+ "@teambit/lanes.ui.models.lanes-model": "0.0.212"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/runtime": "7.20.0",
package/schema.json CHANGED
@@ -122,7 +122,7 @@
122
122
  "line": 27,
123
123
  "character": 1
124
124
  },
125
- "signature": "function ComponentView(props: ComponentViewProps<PayloadType>): React.JSX.Element",
125
+ "signature": "function ComponentView(props: ComponentViewProps): React.JSX.Element",
126
126
  "name": "ComponentView",
127
127
  "props": {
128
128
  "__schema": "ParameterSchema",
@@ -140,18 +140,7 @@
140
140
  "character": 38
141
141
  },
142
142
  "name": "ComponentViewProps",
143
- "internalFilePath": "component-tree/component-view/component-view.tsx",
144
- "typeArgs": [
145
- {
146
- "__schema": "TypeRefSchema",
147
- "location": {
148
- "filePath": "component-tree/component-view/component-view.tsx",
149
- "line": 27,
150
- "character": 57
151
- },
152
- "name": "PayloadType"
153
- }
154
- ]
143
+ "internalFilePath": "component-tree/component-view/component-view.tsx"
155
144
  },
156
145
  "isOptional": false,
157
146
  "isSpread": false
@@ -356,7 +345,7 @@
356
345
  "componentId": {
357
346
  "scope": "teambit.lanes",
358
347
  "name": "ui/models/lanes-model",
359
- "version": "0.0.211"
348
+ "version": "0.0.212"
360
349
  }
361
350
  },
362
351
  {
@@ -499,7 +488,7 @@
499
488
  "componentId": {
500
489
  "scope": "teambit.lanes",
501
490
  "name": "ui/models/lanes-model",
502
- "version": "0.0.211"
491
+ "version": "0.0.212"
503
492
  }
504
493
  },
505
494
  {
@@ -900,7 +889,7 @@
900
889
  "__schema": "ModuleSchema",
901
890
  "location": {
902
891
  "filePath": "component-tree/component-view/component-view.tsx",
903
- "line": 1,
892
+ "line": 2,
904
893
  "character": 1
905
894
  },
906
895
  "exports": [
@@ -1000,7 +989,7 @@
1000
989
  "componentId": {
1001
990
  "scope": "teambit.lanes",
1002
991
  "name": "ui/models/lanes-model",
1003
- "version": "0.0.211"
992
+ "version": "0.0.212"
1004
993
  }
1005
994
  },
1006
995
  "isOptional": true
@@ -1068,7 +1057,7 @@
1068
1057
  "line": 27,
1069
1058
  "character": 1
1070
1059
  },
1071
- "signature": "function ComponentView(props: ComponentViewProps<PayloadType>): React.JSX.Element",
1060
+ "signature": "function ComponentView(props: ComponentViewProps): React.JSX.Element",
1072
1061
  "name": "ComponentView",
1073
1062
  "props": {
1074
1063
  "__schema": "ParameterSchema",
@@ -1086,18 +1075,7 @@
1086
1075
  "character": 38
1087
1076
  },
1088
1077
  "name": "ComponentViewProps",
1089
- "internalFilePath": "component-tree/component-view/component-view.tsx",
1090
- "typeArgs": [
1091
- {
1092
- "__schema": "TypeRefSchema",
1093
- "location": {
1094
- "filePath": "component-tree/component-view/component-view.tsx",
1095
- "line": 27,
1096
- "character": 57
1097
- },
1098
- "name": "PayloadType"
1099
- }
1100
- ]
1078
+ "internalFilePath": "component-tree/component-view/component-view.tsx"
1101
1079
  },
1102
1080
  "isOptional": false,
1103
1081
  "isSpread": false
@@ -1389,7 +1367,7 @@
1389
1367
  "componentId": {
1390
1368
  "scope": "teambit.ui-foundation",
1391
1369
  "name": "ui/side-bar",
1392
- "version": "6fefda5d2726229c306e1d9a5a99b49d08f7964d"
1370
+ "version": "b1d64f27d0fce600f3c93d5ebb6b6b7b0f499270"
1393
1371
  },
1394
1372
  "taggedModuleExports": []
1395
1373
  }