@teambit/component.ui.component-drawer 0.0.205 → 0.0.206
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-drawer.tsx +4 -1
- package/dist/component-drawer.d.ts +8 -0
- package/dist/component-drawer.js +2 -1
- package/dist/component-drawer.js.map +1 -1
- package/dist/{preview-1674098968766.js → preview-1674271762484.js} +0 -0
- package/package-tar/teambit-component.ui.component-drawer-0.0.206.tgz +0 -0
- package/package.json +7 -7
- package/package-tar/teambit-component.ui.component-drawer-0.0.205.tgz +0 -0
package/component-drawer.tsx
CHANGED
|
@@ -32,6 +32,7 @@ export type TransformTreeFn = (host?: WorkspaceModel | ScopeModel) => (rootNode:
|
|
|
32
32
|
|
|
33
33
|
export type ComponentsDrawerProps = Omit<DrawerType, 'render'> & {
|
|
34
34
|
useComponents: () => { components: ComponentModel[]; loading?: boolean };
|
|
35
|
+
useLanes?: () => { lanesModel?: LanesModel; loading?: boolean };
|
|
35
36
|
emptyMessage?: ReactNode;
|
|
36
37
|
plugins?: ComponentsDrawerPlugins;
|
|
37
38
|
transformTree?: TransformTreeFn;
|
|
@@ -54,6 +55,7 @@ export type ComponentsDrawerPlugins = {
|
|
|
54
55
|
export class ComponentsDrawer implements DrawerType {
|
|
55
56
|
readonly id: string;
|
|
56
57
|
readonly useComponents: () => { components: ComponentModel[]; loading?: boolean };
|
|
58
|
+
readonly useLanes: () => { lanesModel?: LanesModel; loading?: boolean };
|
|
57
59
|
name: ReactNode;
|
|
58
60
|
tooltip?: string;
|
|
59
61
|
order?: number;
|
|
@@ -68,6 +70,7 @@ export class ComponentsDrawer implements DrawerType {
|
|
|
68
70
|
constructor(props: ComponentsDrawerProps) {
|
|
69
71
|
Object.assign(this, props);
|
|
70
72
|
this.useComponents = props.useComponents;
|
|
73
|
+
this.useLanes = props.useLanes || useLanes;
|
|
71
74
|
this.emptyMessage = props.emptyMessage;
|
|
72
75
|
this.plugins = props.plugins || {};
|
|
73
76
|
this.setWidgets(props.plugins?.drawerWidgets);
|
|
@@ -144,7 +147,7 @@ export class ComponentsDrawer implements DrawerType {
|
|
|
144
147
|
|
|
145
148
|
render = () => {
|
|
146
149
|
const { loading, components } = this.useComponents();
|
|
147
|
-
const { lanesModel: lanes } = useLanes();
|
|
150
|
+
const { lanesModel: lanes } = this.useLanes();
|
|
148
151
|
const componentFiltersContext = useContext(ComponentFilterContext);
|
|
149
152
|
|
|
150
153
|
const filters = componentFiltersContext?.filters || [];
|
|
@@ -17,6 +17,10 @@ export declare type ComponentsDrawerProps = Omit<DrawerType, 'render'> & {
|
|
|
17
17
|
components: ComponentModel[];
|
|
18
18
|
loading?: boolean;
|
|
19
19
|
};
|
|
20
|
+
useLanes?: () => {
|
|
21
|
+
lanesModel?: LanesModel;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
};
|
|
20
24
|
emptyMessage?: ReactNode;
|
|
21
25
|
plugins?: ComponentsDrawerPlugins;
|
|
22
26
|
transformTree?: TransformTreeFn;
|
|
@@ -37,6 +41,10 @@ export declare class ComponentsDrawer implements DrawerType {
|
|
|
37
41
|
components: ComponentModel[];
|
|
38
42
|
loading?: boolean;
|
|
39
43
|
};
|
|
44
|
+
readonly useLanes: () => {
|
|
45
|
+
lanesModel?: LanesModel;
|
|
46
|
+
loading?: boolean;
|
|
47
|
+
};
|
|
40
48
|
name: ReactNode;
|
|
41
49
|
tooltip?: string;
|
|
42
50
|
order?: number;
|
package/dist/component-drawer.js
CHANGED
|
@@ -79,7 +79,7 @@ class ComponentsDrawer {
|
|
|
79
79
|
this.render = () => {
|
|
80
80
|
var _a;
|
|
81
81
|
const { loading, components } = this.useComponents();
|
|
82
|
-
const { lanesModel: lanes } =
|
|
82
|
+
const { lanesModel: lanes } = this.useLanes();
|
|
83
83
|
const componentFiltersContext = (0, react_1.useContext)(component_ui_component_filters_component_filter_context_1.ComponentFilterContext);
|
|
84
84
|
const filters = (componentFiltersContext === null || componentFiltersContext === void 0 ? void 0 : componentFiltersContext.filters) || [];
|
|
85
85
|
const filteredComponents = (0, react_1.useMemo)(() => (0, component_ui_component_filters_component_filter_context_1.runAllFilters)(filters, { components, lanes }), [filters, components, lanes]);
|
|
@@ -96,6 +96,7 @@ class ComponentsDrawer {
|
|
|
96
96
|
};
|
|
97
97
|
Object.assign(this, props);
|
|
98
98
|
this.useComponents = props.useComponents;
|
|
99
|
+
this.useLanes = props.useLanes || lanes_hooks_use_lanes_1.useLanes;
|
|
99
100
|
this.emptyMessage = props.emptyMessage;
|
|
100
101
|
this.plugins = props.plugins || {};
|
|
101
102
|
this.setWidgets((_a = props.plugins) === null || _a === void 0 ? void 0 : _a.drawerWidgets);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-drawer.js","sourceRoot":"","sources":["../component-drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2E;AAC3E,4DAAoC;AACpC,kFAAgF;AAGhF,0FAAqE;AACrE,kFAA8D;AAG9D,4EAA2E;AAC3E,oEAAqC;AACrC,8IAK0E;AAC1E,0EAA0D;AAK1D,oGAAkF;AAClF,qGAAuH;AACvH,iGAAqG;AAErG,kGAAoD;
|
|
1
|
+
{"version":3,"file":"component-drawer.js","sourceRoot":"","sources":["../component-drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2E;AAC3E,4DAAoC;AACpC,kFAAgF;AAGhF,0FAAqE;AACrE,kFAA8D;AAG9D,4EAA2E;AAC3E,oEAAqC;AACrC,8IAK0E;AAC1E,0EAA0D;AAK1D,oGAAkF;AAClF,qGAAuH;AACvH,iGAAqG;AAErG,kGAAoD;AA4BpD,MAAa,gBAAgB;IAe3B,YAAY,KAA4B;;QAYxC,YAAO,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;;YACzB,MAAM,OAAO,GAAG,IAAA,wBAAO,EAAC,CAAA,MAAA,MAAA,IAAI,CAAC,O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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"}
|
|
File without changes
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component.ui.component-drawer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.206",
|
|
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.
|
|
9
|
+
"version": "0.0.206"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"classnames": "2.2.6",
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"core-js": "^3.0.0",
|
|
15
15
|
"@teambit/base-ui.utils.composer": "1.0.0",
|
|
16
16
|
"@teambit/harmony": "0.4.6",
|
|
17
|
-
"@teambit/component.ui.component-filters.component-filter-context": "0.0.
|
|
17
|
+
"@teambit/component.ui.component-filters.component-filter-context": "0.0.80",
|
|
18
18
|
"@teambit/design.ui.skeletons.sidebar-loader": "0.0.5",
|
|
19
19
|
"@teambit/design.ui.styles.ellipsis": "0.0.357",
|
|
20
20
|
"@teambit/design.ui.styles.muted-italic": "0.0.44",
|
|
21
21
|
"@teambit/design.ui.tree": "0.0.16",
|
|
22
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
|
23
|
-
"@teambit/lanes.ui.models.lanes-model": "0.0.
|
|
24
|
-
"@teambit/scope.models.scope-model": "0.0.
|
|
25
|
-
"@teambit/ui-foundation.ui.side-bar": "0.0.
|
|
22
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.111",
|
|
23
|
+
"@teambit/lanes.ui.models.lanes-model": "0.0.73",
|
|
24
|
+
"@teambit/scope.models.scope-model": "0.0.306",
|
|
25
|
+
"@teambit/ui-foundation.ui.side-bar": "0.0.723",
|
|
26
26
|
"@teambit/ui-foundation.ui.tree.drawer": "0.0.511"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
Binary file
|