@teambit/component 0.0.671 → 0.0.674
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.docs.mdx
CHANGED
|
@@ -1,55 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Handles component data and versioning
|
|
3
3
|
labels: ['component', 'bit', 'extension', 'aspect']
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import ComponentOverview from '@teambit/component.content.component-overview';
|
|
7
7
|
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
## Expanding this aspect
|
|
11
|
-
|
|
12
|
-
Bit allows you to register to slots and expand the component aspect with new capabilities.
|
|
13
|
-
|
|
14
|
-
### Available slots:
|
|
15
|
-
|
|
16
|
-
This aspect can be expanded via its available slots, to allow new capabilities to the component page ui.
|
|
17
|
-
|
|
18
|
-
#### `registerConsumeMethod`:
|
|
19
|
-
|
|
20
|
-
This method allows you to register new ways to consume a component, and present it in the component page ui. It will add any custom components to the `use-box` in the page's header.
|
|
21
|
-
|
|
22
|
-
First, require the component aspect to your aspect's code, and use `registerConsumeMethod` to add your custom **consume method**.
|
|
23
|
-
|
|
24
|
-
`registerConsumeMethod` expects a callback function that is provided with the `ComponentModel` data in it's `args` and returns an object with `Component` and a `Title` of type `ReactNode` that you would need to supply in order for them to render in the menu.
|
|
25
|
-
|
|
26
|
-
Another optional parameter is the `order`. This will allow you to decide the order of your method in the tabs.
|
|
27
|
-
|
|
28
|
-
:::note
|
|
29
|
-
If `Title` or `Component` are `undefined`, the method will not be presented in the menu.
|
|
30
|
-
:::
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
// in your aspect
|
|
34
|
-
|
|
35
|
-
import { ComponentUI } from '@teambit/component';
|
|
36
|
-
|
|
37
|
-
private pnpmMethod: ConsumePlugin = (componentModel) => {
|
|
38
|
-
const registry = componentModel.packageName.split('/')[0];
|
|
39
|
-
return {
|
|
40
|
-
Title: <img src="https://static.bit.dev/brands/pnpm.svg" />,
|
|
41
|
-
Component: (
|
|
42
|
-
<Install
|
|
43
|
-
config={`npm config set ${registry}:registry' https://node.bit.dev`}
|
|
44
|
-
componentName={componentModel.id.name}
|
|
45
|
-
packageManager="pnpm"
|
|
46
|
-
copyString={`pnpm i ${componentModel.packageName}`}
|
|
47
|
-
registryName={registry}
|
|
48
|
-
/>
|
|
49
|
-
),
|
|
50
|
-
order: 1,
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
ComponentUI.registerConsumeMethod(YourAspect.pnpmMethod)
|
|
55
|
-
```
|
|
8
|
+
<ComponentOverview />
|
package/dist/component.docs.mdx
CHANGED
|
@@ -1,55 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Handles component data and versioning
|
|
3
3
|
labels: ['component', 'bit', 'extension', 'aspect']
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import ComponentOverview from '@teambit/component.content.component-overview';
|
|
7
7
|
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
## Expanding this aspect
|
|
11
|
-
|
|
12
|
-
Bit allows you to register to slots and expand the component aspect with new capabilities.
|
|
13
|
-
|
|
14
|
-
### Available slots:
|
|
15
|
-
|
|
16
|
-
This aspect can be expanded via its available slots, to allow new capabilities to the component page ui.
|
|
17
|
-
|
|
18
|
-
#### `registerConsumeMethod`:
|
|
19
|
-
|
|
20
|
-
This method allows you to register new ways to consume a component, and present it in the component page ui. It will add any custom components to the `use-box` in the page's header.
|
|
21
|
-
|
|
22
|
-
First, require the component aspect to your aspect's code, and use `registerConsumeMethod` to add your custom **consume method**.
|
|
23
|
-
|
|
24
|
-
`registerConsumeMethod` expects a callback function that is provided with the `ComponentModel` data in it's `args` and returns an object with `Component` and a `Title` of type `ReactNode` that you would need to supply in order for them to render in the menu.
|
|
25
|
-
|
|
26
|
-
Another optional parameter is the `order`. This will allow you to decide the order of your method in the tabs.
|
|
27
|
-
|
|
28
|
-
:::note
|
|
29
|
-
If `Title` or `Component` are `undefined`, the method will not be presented in the menu.
|
|
30
|
-
:::
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
// in your aspect
|
|
34
|
-
|
|
35
|
-
import { ComponentUI } from '@teambit/component';
|
|
36
|
-
|
|
37
|
-
private pnpmMethod: ConsumePlugin = (componentModel) => {
|
|
38
|
-
const registry = componentModel.packageName.split('/')[0];
|
|
39
|
-
return {
|
|
40
|
-
Title: <img src="https://static.bit.dev/brands/pnpm.svg" />,
|
|
41
|
-
Component: (
|
|
42
|
-
<Install
|
|
43
|
-
config={`npm config set ${registry}:registry' https://node.bit.dev`}
|
|
44
|
-
componentName={componentModel.id.name}
|
|
45
|
-
packageManager="pnpm"
|
|
46
|
-
copyString={`pnpm i ${componentModel.packageName}`}
|
|
47
|
-
registryName={registry}
|
|
48
|
-
/>
|
|
49
|
-
),
|
|
50
|
-
order: 1,
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
ComponentUI.registerConsumeMethod(YourAspect.pnpmMethod)
|
|
55
|
-
```
|
|
8
|
+
<ComponentOverview />
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.674",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.674"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/any-fs": "0.0.5",
|
|
@@ -29,37 +29,37 @@
|
|
|
29
29
|
"@teambit/base-ui.routing.routing-provider": "1.0.0",
|
|
30
30
|
"@teambit/component-id": "0.0.401",
|
|
31
31
|
"@teambit/ui-foundation.ui.menu-widget-icon": "0.0.488",
|
|
32
|
-
"@teambit/aspect-loader": "0.0.
|
|
32
|
+
"@teambit/aspect-loader": "0.0.674",
|
|
33
33
|
"@teambit/legacy-bit-id": "0.0.398",
|
|
34
34
|
"@teambit/toolbox.string.capitalize": "0.0.483",
|
|
35
35
|
"@teambit/cli": "0.0.452",
|
|
36
36
|
"@teambit/config": "0.0.465",
|
|
37
|
-
"@teambit/express": "0.0.
|
|
38
|
-
"@teambit/graphql": "0.0.
|
|
37
|
+
"@teambit/express": "0.0.548",
|
|
38
|
+
"@teambit/graphql": "0.0.674",
|
|
39
39
|
"@teambit/bit-error": "0.0.394",
|
|
40
|
-
"@teambit/command-bar": "0.0.
|
|
41
|
-
"@teambit/preview": "0.0.
|
|
42
|
-
"@teambit/pubsub": "0.0.
|
|
40
|
+
"@teambit/command-bar": "0.0.674",
|
|
41
|
+
"@teambit/preview": "0.0.674",
|
|
42
|
+
"@teambit/pubsub": "0.0.674",
|
|
43
43
|
"@teambit/ui-foundation.ui.is-browser": "0.0.486",
|
|
44
44
|
"@teambit/ui-foundation.ui.main-dropdown": "0.0.486",
|
|
45
45
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.488",
|
|
46
46
|
"@teambit/ui-foundation.ui.use-box.menu": "0.0.111",
|
|
47
|
-
"@teambit/ui": "0.0.
|
|
47
|
+
"@teambit/ui": "0.0.674",
|
|
48
48
|
"@teambit/component-issues": "0.0.46",
|
|
49
49
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.487",
|
|
50
50
|
"@teambit/cli-table": "0.0.33",
|
|
51
51
|
"@teambit/component-descriptor": "0.0.13",
|
|
52
|
-
"@teambit/lanes.ui.lanes": "0.0.
|
|
52
|
+
"@teambit/lanes.ui.lanes": "0.0.13",
|
|
53
53
|
"@teambit/ui-foundation.ui.react-router.use-query": "0.0.486",
|
|
54
54
|
"@teambit/design.ui.empty-box": "0.0.353",
|
|
55
55
|
"@teambit/harmony.ui.aspect-box": "0.0.486",
|
|
56
|
+
"@teambit/compositions": "0.0.674",
|
|
57
|
+
"@teambit/deprecation": "0.0.674",
|
|
58
|
+
"@teambit/envs": "0.0.674",
|
|
59
|
+
"@teambit/legacy-component-log": "0.0.392",
|
|
56
60
|
"@teambit/design.ui.pages.not-found": "0.0.353",
|
|
57
61
|
"@teambit/design.ui.pages.server-error": "0.0.353",
|
|
58
|
-
"@teambit/
|
|
59
|
-
"@teambit/deprecation": "0.0.671",
|
|
60
|
-
"@teambit/envs": "0.0.671",
|
|
61
|
-
"@teambit/legacy-component-log": "0.0.392",
|
|
62
|
-
"@teambit/component.ui.version-dropdown": "0.0.497",
|
|
62
|
+
"@teambit/component.ui.version-dropdown": "0.0.498",
|
|
63
63
|
"@teambit/ui-foundation.ui.full-loader": "0.0.486",
|
|
64
64
|
"@teambit/ui-foundation.ui.use-box.dropdown": "0.0.111",
|
|
65
65
|
"@teambit/ui-foundation.ui.react-router.extend-path": "0.0.486"
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@types/jest": "^26.0.0",
|
|
78
78
|
"@types/react-dom": "^17.0.5",
|
|
79
79
|
"@types/node": "12.20.4",
|
|
80
|
-
"@teambit/component.
|
|
80
|
+
"@teambit/component.content.component-overview": "1.95.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@apollo/client": "^3.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.
|
|
1
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@0.0.674/dist/component.docs.mdx')]
|
|
Binary file
|