@teambit/workspace 0.0.687 → 0.0.688
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/dist/workspace.ui.drawer.js +37 -2
- package/dist/workspace.ui.drawer.js.map +1 -1
- package/package-tar/teambit-workspace-0.0.688.tgz +0 -0
- package/package.json +25 -23
- package/{preview-1648130327832.js → preview-1648142274038.js} +2 -2
- package/workspace.ui.drawer.tsx +19 -1
- package/package-tar/teambit-workspace-0.0.687.tgz +0 -0
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.workspaceDrawer = void 0;
|
|
7
9
|
|
|
10
|
+
function _extends2() {
|
|
11
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
|
+
|
|
13
|
+
_extends2 = function () {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
|
|
8
20
|
function _react() {
|
|
9
|
-
const data = require("react");
|
|
21
|
+
const data = _interopRequireWildcard(require("react"));
|
|
10
22
|
|
|
11
23
|
_react = function () {
|
|
12
24
|
return data;
|
|
@@ -25,6 +37,16 @@ function _componentUi() {
|
|
|
25
37
|
return data;
|
|
26
38
|
}
|
|
27
39
|
|
|
40
|
+
function _uiFoundationUi() {
|
|
41
|
+
const data = require("@teambit/ui-foundation.ui.side-bar");
|
|
42
|
+
|
|
43
|
+
_uiFoundationUi = function () {
|
|
44
|
+
return data;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
|
|
28
50
|
function _workspaceContext() {
|
|
29
51
|
const data = require("./ui/workspace/workspace-context");
|
|
30
52
|
|
|
@@ -35,6 +57,10 @@ function _workspaceContext() {
|
|
|
35
57
|
return data;
|
|
36
58
|
}
|
|
37
59
|
|
|
60
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
61
|
+
|
|
62
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
63
|
+
|
|
38
64
|
const workspaceDrawer = ({
|
|
39
65
|
treeWidgets,
|
|
40
66
|
filtersSlot,
|
|
@@ -45,7 +71,16 @@ const workspaceDrawer = ({
|
|
|
45
71
|
name: 'COMPONENTS',
|
|
46
72
|
plugins: {
|
|
47
73
|
tree: {
|
|
48
|
-
widgets: treeWidgets
|
|
74
|
+
widgets: treeWidgets,
|
|
75
|
+
customRenderer: treeNodeSlot => function TreeNode(props) {
|
|
76
|
+
const children = props.node.children;
|
|
77
|
+
if (!children) return /*#__PURE__*/_react().default.createElement(_uiFoundationUi().ComponentView, (0, _extends2().default)({}, props, {
|
|
78
|
+
treeNodeSlot: treeNodeSlot
|
|
79
|
+
})); // non collapse
|
|
80
|
+
|
|
81
|
+
if (props.node.payload instanceof _uiFoundationUi().ScopePayload) return /*#__PURE__*/_react().default.createElement(_uiFoundationUi().ScopeTreeNode, props);
|
|
82
|
+
return /*#__PURE__*/_react().default.createElement(_uiFoundationUi().NamespaceTreeNode, props);
|
|
83
|
+
}
|
|
49
84
|
},
|
|
50
85
|
filters: filtersSlot,
|
|
51
86
|
drawerWidgets: drawerWidgetSlot
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["workspace.ui.drawer.tsx"],"names":["workspaceDrawer","treeWidgets","filtersSlot","drawerWidgetSlot","ComponentsDrawer","order","id","name","plugins","tree","widgets","filters","drawerWidgets","emptyMessage","useComponents","workspace","WorkspaceContext","loading","components"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["workspace.ui.drawer.tsx"],"names":["workspaceDrawer","treeWidgets","filtersSlot","drawerWidgetSlot","ComponentsDrawer","order","id","name","plugins","tree","widgets","customRenderer","treeNodeSlot","TreeNode","props","children","node","payload","ScopePayload","filters","drawerWidgets","emptyMessage","useComponents","workspace","WorkspaceContext","loading","components"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAQA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;;;AASO,MAAMA,eAAe,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,WAAf;AAA4BC,EAAAA;AAA5B,CAAD,KAC7B,KAAIC,+BAAJ,EAAqB;AACnBC,EAAAA,KAAK,EAAE,CADY;AAEnBC,EAAAA,EAAE,EAAE,6BAFe;AAGnBC,EAAAA,IAAI,EAAE,YAHa;AAInBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,IAAI,EAAE;AACJC,MAAAA,OAAO,EAAET,WADL;AAEJU,MAAAA,cAAc,EAAGC,YAAD,IACd,SAASC,QAAT,CAAkBC,KAAlB,EAAqD;AACnD,cAAMC,QAAQ,GAAGD,KAAK,CAACE,IAAN,CAAWD,QAA5B;AAEA,YAAI,CAACA,QAAL,EAAe,oBAAO,+BAAC,+BAAD,+BAAmBD,KAAnB;AAA0B,UAAA,YAAY,EAAEF;AAAxC,WAAP,CAHoC,CAG6B;;AAEhF,YAAIE,KAAK,CAACE,IAAN,CAAWC,OAAX,YAA8BC,8BAAlC,EAAgD,oBAAO,+BAAC,+BAAD,EAAmBJ,KAAnB,CAAP;AAEhD,4BAAO,+BAAC,mCAAD,EAAuBA,KAAvB,CAAP;AACD;AAXC,KADC;AAcPK,IAAAA,OAAO,EAAEjB,WAdF;AAePkB,IAAAA,aAAa,EAAEjB;AAfR,GAJU;AAqBnBkB,EAAAA,YAAY,EAAE,oBArBK;AAsBnBC,EAAAA,aAAa,EAAE,MAAM;AACnB,UAAMC,SAAS,GAAG,yBAAWC,oCAAX,CAAlB;AACA,WAAO;AACLC,MAAAA,OAAO,EAAE,CAACF,SADL;AAELG,MAAAA,UAAU,EAAEH,SAAS,CAACG,UAAV,IAAwB;AAF/B,KAAP;AAID;AA5BkB,CAArB,CADK","sourcesContent":["import React, { useContext } from 'react';\nimport { ComponentsDrawer, ComponentFiltersSlot, DrawerWidgetSlot } from '@teambit/component.ui.component-drawer';\nimport {\n ComponentView,\n NamespaceTreeNode,\n PayloadType,\n ScopePayload,\n ScopeTreeNode,\n} from '@teambit/ui-foundation.ui.side-bar';\nimport { TreeNodeProps } from '@teambit/design.ui.tree';\nimport { WorkspaceContext } from './ui/workspace/workspace-context';\nimport { SidebarWidgetSlot } from './workspace.ui.runtime';\n\nexport type WorkspaceDrawerProps = {\n treeWidgets: SidebarWidgetSlot;\n filtersSlot: ComponentFiltersSlot;\n drawerWidgetSlot: DrawerWidgetSlot;\n};\n\nexport const workspaceDrawer = ({ treeWidgets, filtersSlot, drawerWidgetSlot }: WorkspaceDrawerProps) =>\n new ComponentsDrawer({\n order: 0,\n id: 'workspace-components-drawer',\n name: 'COMPONENTS',\n plugins: {\n tree: {\n widgets: treeWidgets,\n customRenderer: (treeNodeSlot) =>\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 },\n filters: filtersSlot,\n drawerWidgets: drawerWidgetSlot,\n },\n emptyMessage: 'Workspace is empty',\n useComponents: () => {\n const workspace = useContext(WorkspaceContext);\n return {\n loading: !workspace,\n components: workspace.components || [],\n };\n },\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.688",
|
|
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.688"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -40,44 +40,46 @@
|
|
|
40
40
|
"@teambit/bit-error": "0.0.394",
|
|
41
41
|
"@teambit/legacy-bit-id": "0.0.399",
|
|
42
42
|
"@teambit/logger": "0.0.552",
|
|
43
|
-
"@teambit/scope": "0.0.
|
|
43
|
+
"@teambit/scope": "0.0.688",
|
|
44
44
|
"@teambit/cli": "0.0.460",
|
|
45
|
-
"@teambit/isolator": "0.0.
|
|
46
|
-
"@teambit/component-tree": "0.0.
|
|
45
|
+
"@teambit/isolator": "0.0.688",
|
|
46
|
+
"@teambit/component-tree": "0.0.476",
|
|
47
47
|
"@teambit/component.ui.component-status-resolver": "0.0.492",
|
|
48
|
-
"@teambit/lanes.ui.lanes": "0.0.
|
|
48
|
+
"@teambit/lanes.ui.lanes": "0.0.24",
|
|
49
49
|
"@teambit/harmony.modules.resolved-component": "0.0.484",
|
|
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.
|
|
50
|
+
"@teambit/dependency-resolver": "0.0.688",
|
|
51
|
+
"@teambit/compiler": "0.0.688",
|
|
52
|
+
"@teambit/component": "0.0.688",
|
|
53
|
+
"@teambit/graphql": "0.0.688",
|
|
54
|
+
"@teambit/aspect-loader": "0.0.688",
|
|
55
|
+
"@teambit/bundler": "0.0.688",
|
|
56
56
|
"@teambit/community": "0.0.8",
|
|
57
|
-
"@teambit/envs": "0.0.
|
|
58
|
-
"@teambit/pubsub": "0.0.
|
|
59
|
-
"@teambit/ui": "0.0.
|
|
57
|
+
"@teambit/envs": "0.0.688",
|
|
58
|
+
"@teambit/pubsub": "0.0.688",
|
|
59
|
+
"@teambit/ui": "0.0.688",
|
|
60
60
|
"@teambit/variants": "0.0.556",
|
|
61
61
|
"@teambit/component-issues": "0.0.48",
|
|
62
62
|
"@teambit/config": "0.0.473",
|
|
63
63
|
"@teambit/harmony.modules.requireable-component": "0.0.484",
|
|
64
|
-
"@teambit/importer": "0.0.
|
|
64
|
+
"@teambit/importer": "0.0.117",
|
|
65
65
|
"@teambit/workspace.modules.match-pattern": "0.0.489",
|
|
66
|
-
"@teambit/component.ui.component-drawer": "0.0.
|
|
67
|
-
"@teambit/
|
|
66
|
+
"@teambit/component.ui.component-drawer": "0.0.2",
|
|
67
|
+
"@teambit/design.ui.tree": "0.0.5",
|
|
68
|
+
"@teambit/ui-foundation.ui.side-bar": "0.0.521",
|
|
69
|
+
"@teambit/command-bar": "0.0.688",
|
|
68
70
|
"@teambit/component.ui.component-filters": "0.0.1",
|
|
69
71
|
"@teambit/design.ui.surfaces.menu.link-item": "0.0.379",
|
|
70
|
-
"@teambit/graph": "0.0.
|
|
71
|
-
"@teambit/react-router": "0.0.
|
|
72
|
-
"@teambit/sidebar": "0.0.
|
|
72
|
+
"@teambit/graph": "0.0.688",
|
|
73
|
+
"@teambit/react-router": "0.0.688",
|
|
74
|
+
"@teambit/sidebar": "0.0.688",
|
|
73
75
|
"@teambit/ui-foundation.ui.main-dropdown": "0.0.486",
|
|
74
76
|
"@teambit/ui-foundation.ui.menu": "0.0.486",
|
|
75
77
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.488",
|
|
76
|
-
"@teambit/ui-foundation.ui.tree.drawer": "0.0.
|
|
78
|
+
"@teambit/ui-foundation.ui.tree.drawer": "0.0.498",
|
|
77
79
|
"@teambit/toolbox.time.time-format": "0.0.483",
|
|
78
80
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.487",
|
|
79
81
|
"@teambit/component-descriptor": "0.0.25",
|
|
80
|
-
"@teambit/deprecation": "0.0.
|
|
82
|
+
"@teambit/deprecation": "0.0.688",
|
|
81
83
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.487",
|
|
82
84
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.194",
|
|
83
85
|
"@teambit/ui-foundation.ui.corner": "0.0.494",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.
|
|
2
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.
|
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.688/dist/workspace.composition.js')]
|
|
2
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.688/dist/workspace.docs.mdx')]
|
package/workspace.ui.drawer.tsx
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import { useContext } from 'react';
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
2
|
import { ComponentsDrawer, ComponentFiltersSlot, DrawerWidgetSlot } from '@teambit/component.ui.component-drawer';
|
|
3
|
+
import {
|
|
4
|
+
ComponentView,
|
|
5
|
+
NamespaceTreeNode,
|
|
6
|
+
PayloadType,
|
|
7
|
+
ScopePayload,
|
|
8
|
+
ScopeTreeNode,
|
|
9
|
+
} from '@teambit/ui-foundation.ui.side-bar';
|
|
10
|
+
import { TreeNodeProps } from '@teambit/design.ui.tree';
|
|
3
11
|
import { WorkspaceContext } from './ui/workspace/workspace-context';
|
|
4
12
|
import { SidebarWidgetSlot } from './workspace.ui.runtime';
|
|
5
13
|
|
|
@@ -17,6 +25,16 @@ export const workspaceDrawer = ({ treeWidgets, filtersSlot, drawerWidgetSlot }:
|
|
|
17
25
|
plugins: {
|
|
18
26
|
tree: {
|
|
19
27
|
widgets: treeWidgets,
|
|
28
|
+
customRenderer: (treeNodeSlot) =>
|
|
29
|
+
function TreeNode(props: TreeNodeProps<PayloadType>) {
|
|
30
|
+
const children = props.node.children;
|
|
31
|
+
|
|
32
|
+
if (!children) return <ComponentView {...props} treeNodeSlot={treeNodeSlot} />; // non collapse
|
|
33
|
+
|
|
34
|
+
if (props.node.payload instanceof ScopePayload) return <ScopeTreeNode {...props} />;
|
|
35
|
+
|
|
36
|
+
return <NamespaceTreeNode {...props} />;
|
|
37
|
+
},
|
|
20
38
|
},
|
|
21
39
|
filters: filtersSlot,
|
|
22
40
|
drawerWidgets: drawerWidgetSlot,
|
|
Binary file
|