@teambit/component.ui.component-drawer 0.0.132 → 0.0.133

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.
@@ -1,13 +1,12 @@
1
1
  import React, { useCallback, useContext, ReactNode, useMemo } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { ComponentTree, PayloadType } from '@teambit/ui-foundation.ui.side-bar';
4
- import { FullLoader } from '@teambit/ui-foundation.ui.full-loader';
5
4
  import { ComponentTreeSlot } from '@teambit/component-tree';
6
5
  import type { DrawerType } from '@teambit/ui-foundation.ui.tree.drawer';
7
6
  import { mutedItalic } from '@teambit/design.ui.styles.muted-italic';
8
7
  import { ellipsis } from '@teambit/design.ui.styles.ellipsis';
9
8
  import { ComponentModel } from '@teambit/component';
10
- import { TreeNodeRenderer } from '@teambit/design.ui.tree';
9
+ import { TreeNode as TreeNodeType, TreeNodeRenderer } from '@teambit/design.ui.tree';
11
10
  import { Composer, ComponentTuple } from '@teambit/base-ui.utils.composer';
12
11
  import flatten from 'lodash.flatten';
13
12
  import {
@@ -16,7 +15,12 @@ import {
16
15
  runAllFilters,
17
16
  ComponentFilters,
18
17
  } from '@teambit/component.ui.component-filters.component-filter-context';
18
+ import { useLanes } from '@teambit/lanes.hooks.use-lanes';
19
+ import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
19
20
  import { SlotRegistry } from '@teambit/harmony';
21
+ import { ScopeModel } from '@teambit/scope.models.scope-model';
22
+ import { WorkspaceModel } from '@teambit/workspace';
23
+ import { ComponentTreeLoader } from '@teambit/design.ui.skeletons.sidebar-loader';
20
24
  import { ComponentFilterWidgetProvider, ComponentFilterWidgetContext } from './component-drawer-filter-widget.context';
21
25
  import { ComponentTreeContext, ComponentTreeProvider } from './component-drawer-tree-widget.context';
22
26
 
@@ -24,17 +28,23 @@ import styles from './component-drawer.module.scss';
24
28
 
25
29
  export type ComponentFiltersSlot = SlotRegistry<ComponentFilters>;
26
30
  export type DrawerWidgetSlot = SlotRegistry<ReactNode[]>;
31
+ export type TransformTreeFn = (host?: WorkspaceModel | ScopeModel) => (rootNode: TreeNodeType) => TreeNodeType;
27
32
 
28
33
  export type ComponentsDrawerProps = Omit<DrawerType, 'render'> & {
29
34
  useComponents: () => { components: ComponentModel[]; loading?: boolean };
30
35
  emptyMessage?: ReactNode;
31
36
  plugins?: ComponentsDrawerPlugins;
37
+ transformTree?: TransformTreeFn;
32
38
  assumeScopeInUrl?: boolean;
39
+ useHost?: () => ScopeModel | WorkspaceModel;
33
40
  };
34
41
 
35
42
  export type ComponentsDrawerPlugins = {
36
43
  tree?: {
37
- customRenderer?: (treeNodeSlot?: ComponentTreeSlot) => TreeNodeRenderer<PayloadType>;
44
+ customRenderer?: (
45
+ treeNodeSlot?: ComponentTreeSlot,
46
+ host?: ScopeModel | WorkspaceModel
47
+ ) => TreeNodeRenderer<PayloadType>;
38
48
  widgets: ComponentTreeSlot;
39
49
  };
40
50
  filters?: ComponentFiltersSlot;
@@ -52,6 +62,8 @@ export class ComponentsDrawer implements DrawerType {
52
62
  widgets: ReactNode[];
53
63
  plugins: ComponentsDrawerPlugins;
54
64
  assumeScopeInUrl: boolean;
65
+ useHost?: () => ScopeModel | WorkspaceModel;
66
+ transformTree?: TransformTreeFn;
55
67
 
56
68
  constructor(props: ComponentsDrawerProps) {
57
69
  Object.assign(this, props);
@@ -60,6 +72,8 @@ export class ComponentsDrawer implements DrawerType {
60
72
  this.plugins = props.plugins || {};
61
73
  this.setWidgets(props.plugins?.drawerWidgets);
62
74
  this.assumeScopeInUrl = props.assumeScopeInUrl || false;
75
+ this.useHost = props.useHost;
76
+ this.transformTree = props.transformTree;
63
77
  }
64
78
 
65
79
  Context = ({ children }) => {
@@ -72,7 +86,7 @@ export class ComponentsDrawer implements DrawerType {
72
86
  return <Composer components={combinedContexts}>{children}</Composer>;
73
87
  };
74
88
 
75
- renderFilters = ({ components }: { components: ComponentModel[] }) => {
89
+ renderFilters = ({ components, lanes }: { components: ComponentModel[]; lanes?: LanesModel }) => {
76
90
  const { filterWidgetOpen } = useContext(ComponentFilterWidgetContext);
77
91
  const filterPlugins = this.plugins.filters;
78
92
 
@@ -94,6 +108,7 @@ export class ComponentsDrawer implements DrawerType {
94
108
  <filter.render
95
109
  key={filter.key}
96
110
  components={components}
111
+ lanes={lanes}
97
112
  className={classNames(styles.filter, filterWidgetOpen && styles.open)}
98
113
  />
99
114
  ))}
@@ -101,11 +116,11 @@ export class ComponentsDrawer implements DrawerType {
101
116
  );
102
117
  };
103
118
 
104
- renderTree = ({ components }: { components: ComponentModel[] }) => {
119
+ renderTree = ({ components, host }: { components: ComponentModel[]; host?: ScopeModel | WorkspaceModel }) => {
105
120
  const { collapsed } = useContext(ComponentTreeContext);
106
121
  const { tree } = this.plugins;
107
122
 
108
- const TreeNode = tree?.customRenderer && useCallback(tree.customRenderer(tree.widgets), [tree.widgets]);
123
+ const TreeNode = tree?.customRenderer && useCallback(tree.customRenderer(tree.widgets, host), [tree.widgets]);
109
124
  const isVisible = components.length > 0;
110
125
 
111
126
  if (!isVisible) return null;
@@ -113,6 +128,7 @@ export class ComponentsDrawer implements DrawerType {
113
128
  return (
114
129
  <div className={styles.drawerTreeContainer}>
115
130
  <ComponentTree
131
+ transformTree={this.transformTree ? this.transformTree(host) : undefined}
116
132
  components={components}
117
133
  isCollapsed={collapsed}
118
134
  assumeScopeInUrl={this.assumeScopeInUrl}
@@ -128,21 +144,27 @@ export class ComponentsDrawer implements DrawerType {
128
144
 
129
145
  render = () => {
130
146
  const { loading, components } = this.useComponents();
147
+ const { lanesModel: lanes } = useLanes();
131
148
  const componentFiltersContext = useContext(ComponentFilterContext);
132
149
 
133
- if (loading) return <FullLoader />;
134
-
135
150
  const filters = componentFiltersContext?.filters || [];
136
151
 
137
- const filteredComponents = useMemo(() => runAllFilters(filters, components), [filters]);
152
+ const filteredComponents = useMemo(
153
+ () => runAllFilters(filters, { components, lanes }),
154
+ [filters, components, lanes]
155
+ );
156
+
157
+ const Filters = this.renderFilters({ components, lanes });
158
+ const host = this.useHost?.();
138
159
 
139
- const Filters = this.renderFilters({ components });
140
- const Tree = this.renderTree({ components: filteredComponents });
160
+ const Tree = this.renderTree({ components: filteredComponents, host });
141
161
 
142
162
  const emptyDrawer = (
143
163
  <span className={classNames(mutedItalic, ellipsis, styles.emptyDrawer)}>{this.emptyMessage}</span>
144
164
  );
145
165
 
166
+ if (loading) return <ComponentTreeLoader />;
167
+
146
168
  return (
147
169
  <div key={this.id} className={styles.drawerContainer}>
148
170
  {Filters}
@@ -3,11 +3,15 @@ import { PayloadType } from '@teambit/ui-foundation.ui.side-bar';
3
3
  import { ComponentTreeSlot } from '@teambit/component-tree';
4
4
  import type { DrawerType } from '@teambit/ui-foundation.ui.tree.drawer';
5
5
  import { ComponentModel } from '@teambit/component';
6
- import { TreeNodeRenderer } from '@teambit/design.ui.tree';
6
+ import { TreeNode as TreeNodeType, TreeNodeRenderer } from '@teambit/design.ui.tree';
7
7
  import { ComponentFilters } from '@teambit/component.ui.component-filters.component-filter-context';
8
+ import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
8
9
  import { SlotRegistry } from '@teambit/harmony';
10
+ import { ScopeModel } from '@teambit/scope.models.scope-model';
11
+ import { WorkspaceModel } from '@teambit/workspace';
9
12
  export declare type ComponentFiltersSlot = SlotRegistry<ComponentFilters>;
10
13
  export declare type DrawerWidgetSlot = SlotRegistry<ReactNode[]>;
14
+ export declare type TransformTreeFn = (host?: WorkspaceModel | ScopeModel) => (rootNode: TreeNodeType) => TreeNodeType;
11
15
  export declare type ComponentsDrawerProps = Omit<DrawerType, 'render'> & {
12
16
  useComponents: () => {
13
17
  components: ComponentModel[];
@@ -15,11 +19,13 @@ export declare type ComponentsDrawerProps = Omit<DrawerType, 'render'> & {
15
19
  };
16
20
  emptyMessage?: ReactNode;
17
21
  plugins?: ComponentsDrawerPlugins;
22
+ transformTree?: TransformTreeFn;
18
23
  assumeScopeInUrl?: boolean;
24
+ useHost?: () => ScopeModel | WorkspaceModel;
19
25
  };
20
26
  export declare type ComponentsDrawerPlugins = {
21
27
  tree?: {
22
- customRenderer?: (treeNodeSlot?: ComponentTreeSlot) => TreeNodeRenderer<PayloadType>;
28
+ customRenderer?: (treeNodeSlot?: ComponentTreeSlot, host?: ScopeModel | WorkspaceModel) => TreeNodeRenderer<PayloadType>;
23
29
  widgets: ComponentTreeSlot;
24
30
  };
25
31
  filters?: ComponentFiltersSlot;
@@ -39,15 +45,19 @@ export declare class ComponentsDrawer implements DrawerType {
39
45
  widgets: ReactNode[];
40
46
  plugins: ComponentsDrawerPlugins;
41
47
  assumeScopeInUrl: boolean;
48
+ useHost?: () => ScopeModel | WorkspaceModel;
49
+ transformTree?: TransformTreeFn;
42
50
  constructor(props: ComponentsDrawerProps);
43
51
  Context: ({ children }: {
44
52
  children: any;
45
53
  }) => JSX.Element;
46
- renderFilters: ({ components }: {
54
+ renderFilters: ({ components, lanes }: {
47
55
  components: ComponentModel[];
56
+ lanes?: LanesModel;
48
57
  }) => JSX.Element;
49
- renderTree: ({ components }: {
58
+ renderTree: ({ components, host }: {
50
59
  components: ComponentModel[];
60
+ host?: ScopeModel | WorkspaceModel;
51
61
  }) => JSX.Element;
52
62
  setWidgets: (widgets?: DrawerWidgetSlot) => void;
53
63
  render: () => JSX.Element;
@@ -26,12 +26,13 @@ exports.FilterWidget = exports.TreeToggleWidget = exports.ComponentsDrawer = voi
26
26
  const react_1 = __importStar(require("react"));
27
27
  const classnames_1 = __importDefault(require("classnames"));
28
28
  const ui_foundation_ui_side_bar_1 = require("@teambit/ui-foundation.ui.side-bar");
29
- const ui_foundation_ui_full_loader_1 = require("@teambit/ui-foundation.ui.full-loader");
30
29
  const design_ui_styles_muted_italic_1 = require("@teambit/design.ui.styles.muted-italic");
31
30
  const design_ui_styles_ellipsis_1 = require("@teambit/design.ui.styles.ellipsis");
32
31
  const base_ui_utils_composer_1 = require("@teambit/base-ui.utils.composer");
33
32
  const lodash_flatten_1 = __importDefault(require("lodash.flatten"));
34
33
  const component_ui_component_filters_component_filter_context_1 = require("@teambit/component.ui.component-filters.component-filter-context");
34
+ const lanes_hooks_use_lanes_1 = require("@teambit/lanes.hooks.use-lanes");
35
+ const design_ui_skeletons_sidebar_loader_1 = require("@teambit/design.ui.skeletons.sidebar-loader");
35
36
  const component_drawer_filter_widget_context_1 = require("./component-drawer-filter-widget.context");
36
37
  const component_drawer_tree_widget_context_1 = require("./component-drawer-tree-widget.context");
37
38
  const component_drawer_module_scss_1 = __importDefault(require("./component-drawer.module.scss"));
@@ -48,7 +49,7 @@ class ComponentsDrawer {
48
49
  ];
49
50
  return react_1.default.createElement(base_ui_utils_composer_1.Composer, { components: combinedContexts }, children);
50
51
  };
51
- this.renderFilters = ({ components }) => {
52
+ this.renderFilters = ({ components, lanes }) => {
52
53
  const { filterWidgetOpen } = (0, react_1.useContext)(component_drawer_filter_widget_context_1.ComponentFilterWidgetContext);
53
54
  const filterPlugins = this.plugins.filters;
54
55
  const filters = (0, react_1.useMemo)(() => (filterPlugins &&
@@ -56,31 +57,34 @@ class ComponentsDrawer {
56
57
  return filtersByKey.map((filter) => (Object.assign(Object.assign({}, filter), { key: `${key}-${filter.id}` })));
57
58
  })).sort((a, b) => { var _a, _b; return ((_a = a.order) !== null && _a !== void 0 ? _a : 0) - ((_b = b.order) !== null && _b !== void 0 ? _b : 0); })) ||
58
59
  [], [filterPlugins]);
59
- return (react_1.default.createElement("div", { className: (0, classnames_1.default)(component_drawer_module_scss_1.default.filtersContainer, filterWidgetOpen && component_drawer_module_scss_1.default.open) }, filters.map((filter) => (react_1.default.createElement(filter.render, { key: filter.key, components: components, className: (0, classnames_1.default)(component_drawer_module_scss_1.default.filter, filterWidgetOpen && component_drawer_module_scss_1.default.open) })))));
60
+ return (react_1.default.createElement("div", { className: (0, classnames_1.default)(component_drawer_module_scss_1.default.filtersContainer, filterWidgetOpen && component_drawer_module_scss_1.default.open) }, filters.map((filter) => (react_1.default.createElement(filter.render, { key: filter.key, components: components, lanes: lanes, className: (0, classnames_1.default)(component_drawer_module_scss_1.default.filter, filterWidgetOpen && component_drawer_module_scss_1.default.open) })))));
60
61
  };
61
- this.renderTree = ({ components }) => {
62
+ this.renderTree = ({ components, host }) => {
62
63
  const { collapsed } = (0, react_1.useContext)(component_drawer_tree_widget_context_1.ComponentTreeContext);
63
64
  const { tree } = this.plugins;
64
- const TreeNode = (tree === null || tree === void 0 ? void 0 : tree.customRenderer) && (0, react_1.useCallback)(tree.customRenderer(tree.widgets), [tree.widgets]);
65
+ const TreeNode = (tree === null || tree === void 0 ? void 0 : tree.customRenderer) && (0, react_1.useCallback)(tree.customRenderer(tree.widgets, host), [tree.widgets]);
65
66
  const isVisible = components.length > 0;
66
67
  if (!isVisible)
67
68
  return null;
68
69
  return (react_1.default.createElement("div", { className: component_drawer_module_scss_1.default.drawerTreeContainer },
69
- react_1.default.createElement(ui_foundation_ui_side_bar_1.ComponentTree, { components: components, isCollapsed: collapsed, assumeScopeInUrl: this.assumeScopeInUrl, TreeNode: TreeNode })));
70
+ react_1.default.createElement(ui_foundation_ui_side_bar_1.ComponentTree, { transformTree: this.transformTree ? this.transformTree(host) : undefined, components: components, isCollapsed: collapsed, assumeScopeInUrl: this.assumeScopeInUrl, TreeNode: TreeNode })));
70
71
  };
71
72
  this.setWidgets = (widgets) => {
72
73
  this.widgets = (0, lodash_flatten_1.default)(widgets === null || widgets === void 0 ? void 0 : widgets.values());
73
74
  };
74
75
  this.render = () => {
76
+ var _a;
75
77
  const { loading, components } = this.useComponents();
78
+ const { lanesModel: lanes } = (0, lanes_hooks_use_lanes_1.useLanes)();
76
79
  const componentFiltersContext = (0, react_1.useContext)(component_ui_component_filters_component_filter_context_1.ComponentFilterContext);
77
- if (loading)
78
- return react_1.default.createElement(ui_foundation_ui_full_loader_1.FullLoader, null);
79
80
  const filters = (componentFiltersContext === null || componentFiltersContext === void 0 ? void 0 : componentFiltersContext.filters) || [];
80
- const filteredComponents = (0, react_1.useMemo)(() => (0, component_ui_component_filters_component_filter_context_1.runAllFilters)(filters, components), [filters]);
81
- const Filters = this.renderFilters({ components });
82
- const Tree = this.renderTree({ components: filteredComponents });
81
+ const filteredComponents = (0, react_1.useMemo)(() => (0, component_ui_component_filters_component_filter_context_1.runAllFilters)(filters, { components, lanes }), [filters, components, lanes]);
82
+ const Filters = this.renderFilters({ components, lanes });
83
+ const host = (_a = this.useHost) === null || _a === void 0 ? void 0 : _a.call(this);
84
+ const Tree = this.renderTree({ components: filteredComponents, host });
83
85
  const emptyDrawer = (react_1.default.createElement("span", { className: (0, classnames_1.default)(design_ui_styles_muted_italic_1.mutedItalic, design_ui_styles_ellipsis_1.ellipsis, component_drawer_module_scss_1.default.emptyDrawer) }, this.emptyMessage));
86
+ if (loading)
87
+ return react_1.default.createElement(design_ui_skeletons_sidebar_loader_1.ComponentTreeLoader, null);
84
88
  return (react_1.default.createElement("div", { key: this.id, className: component_drawer_module_scss_1.default.drawerContainer },
85
89
  Filters,
86
90
  Tree,
@@ -92,6 +96,8 @@ class ComponentsDrawer {
92
96
  this.plugins = props.plugins || {};
93
97
  this.setWidgets((_a = props.plugins) === null || _a === void 0 ? void 0 : _a.drawerWidgets);
94
98
  this.assumeScopeInUrl = props.assumeScopeInUrl || false;
99
+ this.useHost = props.useHost;
100
+ this.transformTree = props.transformTree;
95
101
  }
96
102
  }
97
103
  exports.ComponentsDrawer = ComponentsDrawer;
@@ -1 +1 @@
1
- {"version":3,"file":"component-drawer.js","sourceRoot":"","sources":["../component-drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2E;AAC3E,4DAAoC;AACpC,kFAAgF;AAChF,wFAAmE;AAGnE,0FAAqE;AACrE,kFAA8D;AAG9D,4EAA2E;AAC3E,oEAAqC;AACrC,8IAK0E;AAE1E,qGAAuH;AACvH,iGAAqG;AAErG,kGAAoD;AAqBpD,MAAa,gBAAgB;IAY3B,YAAY,KAA4B;;QASxC,YAAO,GAAG,CAAC,EAAE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B,CAAC,CAAC,6CAA6C;QAC/C,CAAC,CAAC,+CAA+C,CAAC;IACpD,OAAO,CACL,uCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,sCAAM,CAAC,UAAU,EAAE,CAAC,SAAS,IAAI,sCAAM,CAAC,IAAI,CAAC;QACtE,uCAAK,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,GAAI,CACvD,CACP,CAAC;AACJ,CAAC;AAVD,4CAUC;AAED,SAAgB,YAAY;IAC1B,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAE,GAAG,IAAA,kBAAU,EAAC,qEAA4B,CAAC,CAAC;IACvF,OAAO,CACL,uCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,sCAAM,CAAC,UAAU,EAAE,sCAAM,CAAC,YAAY,EAAE,gBAAgB,IAAI,sCAAM,CAAC,IAAI,CAAC;QACjG,uCAAK,GAAG,EAAC,6CAA6C,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,GAAI,CACxG,CACP,CAAC;AACJ,CAAC;AAPD,oCAOC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component.ui.component-drawer",
3
- "version": "0.0.132",
3
+ "version": "0.0.133",
4
4
  "homepage": "https://bit.dev/teambit/component/ui/component-drawer",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "ui/component-drawer",
9
- "version": "0.0.132"
9
+ "version": "0.0.133"
10
10
  },
11
11
  "dependencies": {
12
12
  "classnames": "2.2.6",
@@ -14,12 +14,15 @@
14
14
  "core-js": "^3.0.0",
15
15
  "@teambit/base-ui.utils.composer": "1.0.0",
16
16
  "@teambit/harmony": "0.3.3",
17
- "@teambit/component.ui.component-filters.component-filter-context": "0.0.7",
17
+ "@teambit/component.ui.component-filters.component-filter-context": "0.0.8",
18
+ "@teambit/design.ui.skeletons.sidebar-loader": "0.0.1",
18
19
  "@teambit/design.ui.styles.ellipsis": "0.0.353",
19
20
  "@teambit/design.ui.styles.muted-italic": "0.0.41",
20
21
  "@teambit/design.ui.tree": "0.0.12",
21
- "@teambit/ui-foundation.ui.full-loader": "0.0.492",
22
- "@teambit/ui-foundation.ui.side-bar": "0.0.649",
22
+ "@teambit/lanes.hooks.use-lanes": "0.0.39",
23
+ "@teambit/lanes.ui.models.lanes-model": "0.0.1",
24
+ "@teambit/scope.models.scope-model": "0.0.236",
25
+ "@teambit/ui-foundation.ui.side-bar": "0.0.650",
23
26
  "@teambit/ui-foundation.ui.tree.drawer": "0.0.505"
24
27
  },
25
28
  "devDependencies": {