@teambit/workspace 0.0.632 → 0.0.633
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-1643167379538.js → __preview-1643219209460.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.633.tgz +0 -0
- package/package.json +21 -21
- package/ui/workspace-components-drawer/workspace-components.drawer.tsx +1 -0
- package/package-tar/teambit-workspace-0.0.632.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.633",
|
|
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.633"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -41,38 +41,38 @@
|
|
|
41
41
|
"@teambit/bit-error": "0.0.394",
|
|
42
42
|
"@teambit/legacy-bit-id": "0.0.397",
|
|
43
43
|
"@teambit/logger": "0.0.524",
|
|
44
|
-
"@teambit/scope": "0.0.
|
|
44
|
+
"@teambit/scope": "0.0.633",
|
|
45
45
|
"@teambit/cli": "0.0.434",
|
|
46
|
-
"@teambit/isolator": "0.0.
|
|
47
|
-
"@teambit/component-tree": "0.0.
|
|
46
|
+
"@teambit/isolator": "0.0.633",
|
|
47
|
+
"@teambit/component-tree": "0.0.421",
|
|
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.
|
|
50
|
+
"@teambit/dependency-resolver": "0.0.633",
|
|
51
|
+
"@teambit/compiler": "0.0.633",
|
|
52
|
+
"@teambit/component": "0.0.633",
|
|
53
|
+
"@teambit/graphql": "0.0.633",
|
|
54
|
+
"@teambit/aspect-loader": "0.0.633",
|
|
55
|
+
"@teambit/bundler": "0.0.633",
|
|
56
|
+
"@teambit/envs": "0.0.633",
|
|
57
|
+
"@teambit/pubsub": "0.0.633",
|
|
58
|
+
"@teambit/ui": "0.0.633",
|
|
59
59
|
"@teambit/variants": "0.0.526",
|
|
60
60
|
"@teambit/component-issues": "0.0.45",
|
|
61
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.62",
|
|
64
64
|
"@teambit/workspace.modules.match-pattern": "0.0.487",
|
|
65
|
-
"@teambit/command-bar": "0.0.
|
|
65
|
+
"@teambit/command-bar": "0.0.633",
|
|
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.633",
|
|
68
|
+
"@teambit/react-router": "0.0.633",
|
|
69
|
+
"@teambit/sidebar": "0.0.633",
|
|
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
74
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.486",
|
|
75
|
-
"@teambit/deprecation": "0.0.
|
|
75
|
+
"@teambit/deprecation": "0.0.633",
|
|
76
76
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.486",
|
|
77
77
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.192",
|
|
78
78
|
"@teambit/ui-foundation.ui.corner": "0.0.493",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@teambit/design.ui.tree": "0.0.2",
|
|
84
84
|
"@teambit/ui-foundation.ui.full-loader": "0.0.485",
|
|
85
85
|
"@teambit/ui-foundation.ui.side-bar": "0.0.494",
|
|
86
|
-
"@teambit/ui-foundation.ui.tree.drawer": "0.0.
|
|
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"
|
|
@@ -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
|