@teambit/workspace 0.0.630 → 0.0.634
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/{__preview-1643028743431.js → __preview-1643301042596.js} +0 -0
- package/dist/ui/workspace-components-drawer/workspace-components.drawer.d.ts +1 -0
- package/dist/ui/workspace-components-drawer/workspace-components.drawer.js +1 -0
- package/dist/ui/workspace-components-drawer/workspace-components.drawer.js.map +1 -1
- package/package-tar/teambit-workspace-0.0.634.tgz +0 -0
- package/package.json +34 -34
- package/ui/workspace-components-drawer/workspace-components.drawer.tsx +1 -0
- package/package-tar/teambit-workspace-0.0.630.tgz +0 -0
|
File without changes
|
|
@@ -4,6 +4,7 @@ import { ComponentTreeSlot } from '@teambit/component-tree';
|
|
|
4
4
|
export declare class WorkspaceComponentsDrawer implements DrawerType {
|
|
5
5
|
private treeNodeSlot;
|
|
6
6
|
constructor(treeNodeSlot: ComponentTreeSlot);
|
|
7
|
+
id: string;
|
|
7
8
|
name: string;
|
|
8
9
|
widget: JSX.Element;
|
|
9
10
|
Context: ({ children }: {
|
|
@@ -121,6 +121,7 @@ const WorkspaceTreeContext = /*#__PURE__*/(0, _react().createContext)({
|
|
|
121
121
|
class WorkspaceComponentsDrawer {
|
|
122
122
|
constructor(treeNodeSlot) {
|
|
123
123
|
this.treeNodeSlot = treeNodeSlot;
|
|
124
|
+
(0, _defineProperty2().default)(this, "id", 'workspace-components');
|
|
124
125
|
(0, _defineProperty2().default)(this, "name", 'COMPONENTS');
|
|
125
126
|
(0, _defineProperty2().default)(this, "widget", /*#__PURE__*/_react().default.createElement(Widget, null));
|
|
126
127
|
(0, _defineProperty2().default)(this, "Context", ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["workspace-components.drawer.tsx"],"names":["WorkspaceTreeContext","collapsed","setCollapsed","WorkspaceComponentsDrawer","constructor","treeNodeSlot","children","workspace","WorkspaceContext","TreeNodeRenderer","TreeNode","props","node","payload","ScopePayload","components","length","mutedItalic","ellipsis","styles","emptyWorkspace","Widget","icon","collapseIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AASA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;AAEA,MAAMA,oBAAoB,gBAAG,4BAA0E;AACrGC,EAAAA,SAAS,EAAE,IAD0F;AAErGC,EAAAA,YAAY,EAAE,MAAM,CAAE;AAF+E,CAA1E,CAA7B;;AAKO,MAAMC,yBAAN,CAAsD;AAC3DC,EAAAA,WAAW,CAASC,YAAT,EAA0C;AAAA,SAAjCA,YAAiC,GAAjCA,YAAiC;AAAA,
|
|
1
|
+
{"version":3,"sources":["workspace-components.drawer.tsx"],"names":["WorkspaceTreeContext","collapsed","setCollapsed","WorkspaceComponentsDrawer","constructor","treeNodeSlot","children","workspace","WorkspaceContext","TreeNodeRenderer","TreeNode","props","node","payload","ScopePayload","components","length","mutedItalic","ellipsis","styles","emptyWorkspace","Widget","icon","collapseIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AASA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AA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hD,4BAAO,+BAAC,oCAAD,EAAuBA,KAAvB,CAAP;AACD,OATsB,EAUvB,CAACN,YAAD,CAVuB,CAAzB;AAaA,UAAI,CAACE,SAAL,EAAgB,oBAAO,+BAAC,4BAAD,OAAP;;AAChB,UAAIA,SAAS,CAACQ,UAAV,CAAqBC,MAArB,KAAgC,CAApC,EAAuC;AACrC,4BAAO;AAAM,UAAA,SAAS,EAAE,2BAAWC,6BAAX,EAAwBC,2BAAxB,EAAkCC,2CAAOC,cAAzC;AAAjB,gCAAP;AACD;;AAED,0BAAO,+BAAC,gCAAD;AAAe,QAAA,UAAU,EAAEb,SAAS,CAACQ,UAArC;AAAiD,QAAA,WAAW,EAAEd,SAA9D;AAAyE,QAAA,QAAQ,EAAEQ;AAAnF,QAAP;AACD,KAtCoD;AAAE;;AADI;;;;AA0C7D,SAASY,MAAT,GAAkB;AAChB,QAAM;AAAEpB,IAAAA,SAAF;AAAaC,IAAAA;AAAb,MAA8B,yBAAWF,oBAAX,CAApC;AACA,QAAMsB,IAAI,GAAGrB,SAAS,GAClB,6CADkB,GAElB,+CAFJ;AAGA,sBAAO;AAAK,IAAA,GAAG,EAAEqB,IAAV;AAAgB,IAAA,SAAS,EAAEH,2CAAOI,YAAlC;AAAgD,IAAA,OAAO,EAAE,MAAMrB,YAAY,CAAC,CAACD,SAAF;AAA3E,IAAP;AACD","sourcesContent":["import type { DrawerType } from '@teambit/ui-foundation.ui.tree.drawer';\nimport { FullLoader } from '@teambit/ui-foundation.ui.full-loader';\nimport {\n ComponentTree,\n PayloadType,\n ComponentView,\n ScopeTreeNode,\n NamespaceTreeNode,\n ScopePayload,\n} from '@teambit/ui-foundation.ui.side-bar';\nimport { TreeNodeProps } from '@teambit/design.ui.tree';\nimport React, { useCallback, useContext, useState, createContext } from 'react';\nimport classNames from 'classnames';\nimport { ComponentTreeSlot } from '@teambit/component-tree';\nimport { mutedItalic } from '@teambit/design.ui.styles.muted-italic';\nimport { ellipsis } from '@teambit/design.ui.styles.ellipsis';\nimport { WorkspaceContext } from '../workspace/workspace-context';\nimport styles from './workspace-components-drawer.module.scss';\n\nconst WorkspaceTreeContext = createContext<{ collapsed: boolean; setCollapsed: (x: boolean) => void }>({\n collapsed: true,\n setCollapsed: () => {},\n});\n\nexport class WorkspaceComponentsDrawer implements DrawerType {\n constructor(private treeNodeSlot: ComponentTreeSlot) {}\n\n id = 'workspace-components';\n name = 'COMPONENTS';\n\n widget = (<Widget />);\n\n Context = ({ children }) => {\n const [collapsed, setCollapsed] = useState(true);\n return (\n <WorkspaceTreeContext.Provider value={{ collapsed, setCollapsed }}>{children}</WorkspaceTreeContext.Provider>\n );\n };\n\n render = () => {\n const workspace = useContext(WorkspaceContext);\n const { collapsed } = useContext(WorkspaceTreeContext);\n const { treeNodeSlot } = this;\n\n const TreeNodeRenderer = useCallback(\n function TreeNode(props: TreeNodeProps<PayloadType>) {\n const children = props.node.children;\n\n if (!children) return <ComponentView {...props} treeNodeSlot={treeNodeSlot} />; // non collapse\n\n if (props.node.payload instanceof ScopePayload) return <ScopeTreeNode {...props} />;\n\n return <NamespaceTreeNode {...props} />;\n },\n [treeNodeSlot]\n );\n\n if (!workspace) return <FullLoader />;\n if (workspace.components.length === 0) {\n return <span className={classNames(mutedItalic, ellipsis, styles.emptyWorkspace)}>Workspace is empty</span>;\n }\n\n return <ComponentTree components={workspace.components} isCollapsed={collapsed} TreeNode={TreeNodeRenderer} />;\n };\n}\n\nfunction Widget() {\n const { collapsed, setCollapsed } = useContext(WorkspaceTreeContext);\n const icon = collapsed\n ? 'https://static.bit.dev/bit-icons/expand.svg'\n : 'https://static.bit.dev/bit-icons/collapse.svg';\n return <img src={icon} className={styles.collapseIcon} onClick={() => setCollapsed(!collapsed)} />;\n}\n"]}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.634",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/workspace/workspace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "workspace",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.634"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"stringify-package": "1.0.1",
|
|
30
30
|
"moment": "2.29.1",
|
|
31
31
|
"chokidar": "3.5.1",
|
|
32
|
-
"classnames": "2.2.6",
|
|
33
32
|
"@react-hook/latest": "1.0.3",
|
|
34
33
|
"pluralize": "8.0.0",
|
|
35
34
|
"reset-css": "5.0.1",
|
|
35
|
+
"classnames": "2.2.6",
|
|
36
36
|
"@babel/runtime": "7.12.18",
|
|
37
37
|
"core-js": "^3.0.0",
|
|
38
38
|
"@teambit/base-ui.surfaces.split-pane.hover-splitter": "1.0.0",
|
|
@@ -40,50 +40,50 @@
|
|
|
40
40
|
"@teambit/component-id": "0.0.400",
|
|
41
41
|
"@teambit/bit-error": "0.0.394",
|
|
42
42
|
"@teambit/legacy-bit-id": "0.0.397",
|
|
43
|
-
"@teambit/logger": "0.0.
|
|
44
|
-
"@teambit/scope": "0.0.
|
|
45
|
-
"@teambit/cli": "0.0.
|
|
46
|
-
"@teambit/isolator": "0.0.
|
|
47
|
-
"@teambit/component-tree": "0.0.
|
|
43
|
+
"@teambit/logger": "0.0.524",
|
|
44
|
+
"@teambit/scope": "0.0.634",
|
|
45
|
+
"@teambit/cli": "0.0.434",
|
|
46
|
+
"@teambit/isolator": "0.0.634",
|
|
47
|
+
"@teambit/component-tree": "0.0.422",
|
|
48
48
|
"@teambit/component.ui.component-status-resolver": "0.0.490",
|
|
49
49
|
"@teambit/harmony.modules.resolved-component": "0.0.483",
|
|
50
|
-
"@teambit/dependency-resolver": "0.0.
|
|
51
|
-
"@teambit/compiler": "0.0.
|
|
52
|
-
"@teambit/component": "0.0.
|
|
53
|
-
"@teambit/graphql": "0.0.
|
|
54
|
-
"@teambit/aspect-loader": "0.0.
|
|
55
|
-
"@teambit/bundler": "0.0.
|
|
56
|
-
"@teambit/envs": "0.0.
|
|
57
|
-
"@teambit/pubsub": "0.0.
|
|
58
|
-
"@teambit/ui": "0.0.
|
|
59
|
-
"@teambit/variants": "0.0.
|
|
50
|
+
"@teambit/dependency-resolver": "0.0.634",
|
|
51
|
+
"@teambit/compiler": "0.0.634",
|
|
52
|
+
"@teambit/component": "0.0.634",
|
|
53
|
+
"@teambit/graphql": "0.0.634",
|
|
54
|
+
"@teambit/aspect-loader": "0.0.634",
|
|
55
|
+
"@teambit/bundler": "0.0.634",
|
|
56
|
+
"@teambit/envs": "0.0.634",
|
|
57
|
+
"@teambit/pubsub": "0.0.634",
|
|
58
|
+
"@teambit/ui": "0.0.634",
|
|
59
|
+
"@teambit/variants": "0.0.526",
|
|
60
60
|
"@teambit/component-issues": "0.0.45",
|
|
61
|
-
"@teambit/config": "0.0.
|
|
61
|
+
"@teambit/config": "0.0.447",
|
|
62
62
|
"@teambit/harmony.modules.requireable-component": "0.0.483",
|
|
63
|
-
"@teambit/importer": "0.0.
|
|
63
|
+
"@teambit/importer": "0.0.63",
|
|
64
64
|
"@teambit/workspace.modules.match-pattern": "0.0.487",
|
|
65
|
-
"@teambit/command-bar": "0.0.
|
|
65
|
+
"@teambit/command-bar": "0.0.634",
|
|
66
66
|
"@teambit/design.ui.surfaces.menu.link-item": "0.0.377",
|
|
67
|
-
"@teambit/graph": "0.0.
|
|
68
|
-
"@teambit/react-router": "0.0.
|
|
69
|
-
"@teambit/sidebar": "0.0.
|
|
67
|
+
"@teambit/graph": "0.0.634",
|
|
68
|
+
"@teambit/react-router": "0.0.634",
|
|
69
|
+
"@teambit/sidebar": "0.0.634",
|
|
70
70
|
"@teambit/ui-foundation.ui.main-dropdown": "0.0.485",
|
|
71
71
|
"@teambit/ui-foundation.ui.menu": "0.0.485",
|
|
72
72
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.487",
|
|
73
73
|
"@teambit/toolbox.time.time-format": "0.0.482",
|
|
74
|
-
"@teambit/design.ui.styles.ellipsis": "0.0.347",
|
|
75
|
-
"@teambit/design.ui.styles.muted-italic": "0.0.35",
|
|
76
|
-
"@teambit/design.ui.tree": "0.0.2",
|
|
77
|
-
"@teambit/ui-foundation.ui.full-loader": "0.0.485",
|
|
78
|
-
"@teambit/ui-foundation.ui.side-bar": "0.0.494",
|
|
79
|
-
"@teambit/ui-foundation.ui.tree.drawer": "0.0.488",
|
|
80
74
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.486",
|
|
81
|
-
"@teambit/deprecation": "0.0.
|
|
75
|
+
"@teambit/deprecation": "0.0.634",
|
|
82
76
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.486",
|
|
83
77
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.192",
|
|
84
78
|
"@teambit/ui-foundation.ui.corner": "0.0.493",
|
|
85
79
|
"@teambit/ui-foundation.ui.notifications.notification-context": "0.0.486",
|
|
86
80
|
"@teambit/ui-foundation.ui.top-bar": "0.0.488",
|
|
81
|
+
"@teambit/design.ui.styles.ellipsis": "0.0.347",
|
|
82
|
+
"@teambit/design.ui.styles.muted-italic": "0.0.35",
|
|
83
|
+
"@teambit/design.ui.tree": "0.0.2",
|
|
84
|
+
"@teambit/ui-foundation.ui.full-loader": "0.0.485",
|
|
85
|
+
"@teambit/ui-foundation.ui.side-bar": "0.0.494",
|
|
86
|
+
"@teambit/ui-foundation.ui.tree.drawer": "0.0.489",
|
|
87
87
|
"@teambit/explorer.ui.gallery.component-grid": "0.0.485",
|
|
88
88
|
"@teambit/workspace.ui.empty-workspace": "0.0.488",
|
|
89
89
|
"@teambit/workspace.ui.workspace-component-card": "0.0.492"
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"@types/fs-extra": "9.0.7",
|
|
97
97
|
"@types/memoizee": "0.4.5",
|
|
98
98
|
"@types/react-router-dom": "5.1.7",
|
|
99
|
-
"@types/classnames": "2.2.11",
|
|
100
99
|
"@types/pluralize": "0.0.29",
|
|
100
|
+
"@types/classnames": "2.2.11",
|
|
101
101
|
"@types/mocha": "5.2.7",
|
|
102
102
|
"@types/testing-library__jest-dom": "5.9.5",
|
|
103
103
|
"@types/jest": "^26.0.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
108
|
"@apollo/client": "^3.0.0",
|
|
109
|
-
"@teambit/legacy": "1.0.
|
|
109
|
+
"@teambit/legacy": "1.0.210",
|
|
110
110
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
111
111
|
"react": "^16.8.0 || ^17.0.0"
|
|
112
112
|
},
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"react": "-"
|
|
135
135
|
},
|
|
136
136
|
"peerDependencies": {
|
|
137
|
-
"@teambit/legacy": "1.0.
|
|
137
|
+
"@teambit/legacy": "1.0.210",
|
|
138
138
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
139
139
|
"react": "^16.8.0 || ^17.0.0"
|
|
140
140
|
}
|
|
@@ -25,6 +25,7 @@ const WorkspaceTreeContext = createContext<{ collapsed: boolean; setCollapsed: (
|
|
|
25
25
|
export class WorkspaceComponentsDrawer implements DrawerType {
|
|
26
26
|
constructor(private treeNodeSlot: ComponentTreeSlot) {}
|
|
27
27
|
|
|
28
|
+
id = 'workspace-components';
|
|
28
29
|
name = 'COMPONENTS';
|
|
29
30
|
|
|
30
31
|
widget = (<Widget />);
|
|
Binary file
|