@teambit/changelog 0.0.866 → 0.0.868
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/ui/change-log-page.js +4 -61
- package/dist/ui/change-log-page.js.map +1 -1
- package/package-tar/teambit-changelog-0.0.868.tgz +0 -0
- package/package.json +6 -10
- package/{preview-1664710331381.js → preview-1664735485436.js} +2 -2
- package/ui/change-log-page.tsx +31 -52
- package/package-tar/teambit-changelog-0.0.866.tgz +0 -0
|
@@ -97,46 +97,6 @@ function _react() {
|
|
|
97
97
|
return data;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
function _lanesHooks() {
|
|
101
|
-
const data = require("@teambit/lanes.hooks.use-lanes");
|
|
102
|
-
|
|
103
|
-
_lanesHooks = function () {
|
|
104
|
-
return data;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
return data;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function _evangelistElements() {
|
|
111
|
-
const data = require("@teambit/evangelist.elements.icon");
|
|
112
|
-
|
|
113
|
-
_evangelistElements = function () {
|
|
114
|
-
return data;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
return data;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function _designUiStyles() {
|
|
121
|
-
const data = require("@teambit/design.ui.styles.ellipsis");
|
|
122
|
-
|
|
123
|
-
_designUiStyles = function () {
|
|
124
|
-
return data;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
return data;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function _lanesUi() {
|
|
131
|
-
const data = require("@teambit/lanes.ui.gallery");
|
|
132
|
-
|
|
133
|
-
_lanesUi = function () {
|
|
134
|
-
return data;
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
return data;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
100
|
function _changeLogPageModule() {
|
|
141
101
|
const data = _interopRequireDefault(require("./change-log-page.module.scss"));
|
|
142
102
|
|
|
@@ -155,26 +115,13 @@ function ChangeLogPage({
|
|
|
155
115
|
className
|
|
156
116
|
}) {
|
|
157
117
|
const component = (0, _react().useContext)(_component().ComponentContext);
|
|
158
|
-
const {
|
|
159
|
-
lanesModel
|
|
160
|
-
} = (0, _lanesHooks().useLanes)();
|
|
161
|
-
const currentLane = lanesModel === null || lanesModel === void 0 ? void 0 : lanesModel.viewedLane;
|
|
162
118
|
const {
|
|
163
119
|
logs
|
|
164
120
|
} = component;
|
|
165
121
|
if (!logs) return null;
|
|
166
122
|
|
|
167
123
|
if (logs.length === 0) {
|
|
168
|
-
return /*#__PURE__*/_react().default.createElement(
|
|
169
|
-
className: _changeLogPageModule().default.lane
|
|
170
|
-
}, /*#__PURE__*/_react().default.createElement(_evangelistElements().Icon, {
|
|
171
|
-
of: "lane"
|
|
172
|
-
}), /*#__PURE__*/_react().default.createElement(_designUiStyles().Ellipsis, {
|
|
173
|
-
className: _changeLogPageModule().default.laneName
|
|
174
|
-
}, currentLane.id)), /*#__PURE__*/_react().default.createElement(_designUi().Separator, {
|
|
175
|
-
isPresentational: true,
|
|
176
|
-
className: _changeLogPageModule().default.separator
|
|
177
|
-
})), /*#__PURE__*/_react().default.createElement("div", {
|
|
124
|
+
return /*#__PURE__*/_react().default.createElement("div", {
|
|
178
125
|
className: (0, _classnames().default)(_changeLogPageModule().default.changeLogPage, className)
|
|
179
126
|
}, /*#__PURE__*/_react().default.createElement(_documenterUi().H1, {
|
|
180
127
|
className: _changeLogPageModule().default.title
|
|
@@ -185,14 +132,10 @@ function ChangeLogPage({
|
|
|
185
132
|
level: "info",
|
|
186
133
|
title: "There is no change log as this component has not been exported yet. Learn how to export components:",
|
|
187
134
|
className: _changeLogPageModule().default.changeLogCard
|
|
188
|
-
}, /*#__PURE__*/_react().default.createElement(_mdxUi().MDXLayout, null, /*#__PURE__*/_react().default.createElement(_componentInstructions().ExportingComponents, null))))
|
|
135
|
+
}, /*#__PURE__*/_react().default.createElement(_mdxUi().MDXLayout, null, /*#__PURE__*/_react().default.createElement(_componentInstructions().ExportingComponents, null))));
|
|
189
136
|
}
|
|
190
137
|
|
|
191
|
-
return /*#__PURE__*/_react().default.createElement(
|
|
192
|
-
lane: currentLane
|
|
193
|
-
}), /*#__PURE__*/_react().default.createElement(_designUi().Separator, {
|
|
194
|
-
isPresentational: true
|
|
195
|
-
}), /*#__PURE__*/_react().default.createElement("div", {
|
|
138
|
+
return /*#__PURE__*/_react().default.createElement("div", {
|
|
196
139
|
className: (0, _classnames().default)(_changeLogPageModule().default.changeLogPage, className)
|
|
197
140
|
}, /*#__PURE__*/_react().default.createElement(_documenterUi().H1, {
|
|
198
141
|
className: _changeLogPageModule().default.title
|
|
@@ -211,7 +154,7 @@ function ChangeLogPage({
|
|
|
211
154
|
snap: snap,
|
|
212
155
|
isCurrent: isCurrent
|
|
213
156
|
});
|
|
214
|
-
})))
|
|
157
|
+
})));
|
|
215
158
|
}
|
|
216
159
|
|
|
217
160
|
//# sourceMappingURL=change-log-page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ChangeLogPage","className","component","useContext","ComponentContext","
|
|
1
|
+
{"version":3,"names":["ChangeLogPage","className","component","useContext","ComponentContext","logs","length","classNames","styles","changeLogPage","title","separatorNoChangeLog","changeLogCard","separator","logContainer","map","snap","index","isLatest","latest","tag","hash","isCurrent","version","id","fullName"],"sources":["change-log-page.tsx"],"sourcesContent":["import { ComponentContext } from '@teambit/component';\nimport { H1 } from '@teambit/documenter.ui.heading';\nimport { Separator } from '@teambit/design.ui.separator';\nimport { VersionBlock } from '@teambit/component.ui.version-block';\nimport classNames from 'classnames';\nimport { MDXLayout } from '@teambit/mdx.ui.mdx-layout';\nimport { ExportingComponents } from '@teambit/component.instructions.exporting-components';\nimport { AlertCard } from '@teambit/design.ui.alert-card';\nimport React, { HTMLAttributes, useContext } from 'react';\n\nimport styles from './change-log-page.module.scss';\n\ntype ChangeLogPageProps = {} & HTMLAttributes<HTMLDivElement>;\n\nexport function ChangeLogPage({ className }: ChangeLogPageProps) {\n const component = useContext(ComponentContext);\n const { logs } = component;\n\n if (!logs) return null;\n\n if (logs.length === 0) {\n return (\n <div className={classNames(styles.changeLogPage, className)}>\n <H1 className={styles.title}>History</H1>\n <Separator isPresentational className={styles.separatorNoChangeLog} />\n <AlertCard\n level=\"info\"\n title=\"There is no change log as this component has not been exported yet.\n Learn how to export components:\"\n className={styles.changeLogCard}\n >\n <MDXLayout>\n <ExportingComponents />\n </MDXLayout>\n </AlertCard>\n </div>\n );\n }\n\n return (\n <div className={classNames(styles.changeLogPage, className)}>\n <H1 className={styles.title}>History</H1>\n <Separator isPresentational className={styles.separator} />\n <div className={styles.logContainer}>\n {logs.map((snap, index) => {\n const isLatest = component.latest === snap.tag || component.latest === snap.hash;\n const isCurrent = component.version === snap.tag || component.version === snap.hash;\n return (\n <VersionBlock\n key={index}\n componentId={component.id.fullName}\n isLatest={isLatest}\n snap={snap}\n isCurrent={isCurrent}\n />\n );\n })}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;;;;;AAIO,SAASA,aAAT,CAAuB;EAAEC;AAAF,CAAvB,EAA0D;EAC/D,MAAMC,SAAS,GAAG,IAAAC,mBAAA,EAAWC,6BAAX,CAAl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KADP;MAEE,WAAW,EAAEf,SAAS,CAACsB,EAAV,CAAaC,QAF5B;MAGE,QAAQ,EAAEP,QAHZ;MAIE,IAAI,EAAEF,IAJR;MAKE,SAAS,EAAEM;IALb,EADF;EASD,CAZA,CADH,CAHF,CADF;AAqBD"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/changelog",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.868",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/changelog",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "changelog",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.868"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"classnames": "2.2.6",
|
|
@@ -16,15 +16,11 @@
|
|
|
16
16
|
"@teambit/component.instructions.exporting-components": "0.0.6",
|
|
17
17
|
"@teambit/design.ui.separator": "0.0.354",
|
|
18
18
|
"@teambit/documenter.ui.heading": "4.1.1",
|
|
19
|
-
"@teambit/
|
|
20
|
-
"@teambit/component": "0.0.866",
|
|
19
|
+
"@teambit/component": "0.0.868",
|
|
21
20
|
"@teambit/ui-foundation.ui.menu-widget-icon": "0.0.494",
|
|
22
|
-
"@teambit/ui": "0.0.
|
|
23
|
-
"@teambit/component.ui.version-block": "0.0.
|
|
21
|
+
"@teambit/ui": "0.0.868",
|
|
22
|
+
"@teambit/component.ui.version-block": "0.0.658",
|
|
24
23
|
"@teambit/design.ui.alert-card": "0.0.23",
|
|
25
|
-
"@teambit/design.ui.styles.ellipsis": "0.0.353",
|
|
26
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.37",
|
|
27
|
-
"@teambit/lanes.ui.gallery": "0.0.36",
|
|
28
24
|
"@teambit/mdx.ui.mdx-layout": "0.0.507"
|
|
29
25
|
},
|
|
30
26
|
"devDependencies": {
|
|
@@ -37,7 +33,7 @@
|
|
|
37
33
|
"@types/node": "12.20.4"
|
|
38
34
|
},
|
|
39
35
|
"peerDependencies": {
|
|
40
|
-
"@teambit/legacy": "1.0.
|
|
36
|
+
"@teambit/legacy": "1.0.360",
|
|
41
37
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
42
38
|
"react": "^16.8.0 || ^17.0.0"
|
|
43
39
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_changelog@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_changelog@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_changelog@0.0.868/dist/changelog.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_changelog@0.0.868/dist/changelog.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/ui/change-log-page.tsx
CHANGED
|
@@ -7,10 +7,6 @@ import { MDXLayout } from '@teambit/mdx.ui.mdx-layout';
|
|
|
7
7
|
import { ExportingComponents } from '@teambit/component.instructions.exporting-components';
|
|
8
8
|
import { AlertCard } from '@teambit/design.ui.alert-card';
|
|
9
9
|
import React, { HTMLAttributes, useContext } from 'react';
|
|
10
|
-
import { useLanes } from '@teambit/lanes.hooks.use-lanes';
|
|
11
|
-
import { Icon } from '@teambit/evangelist.elements.icon';
|
|
12
|
-
import { Ellipsis } from '@teambit/design.ui.styles.ellipsis';
|
|
13
|
-
import { LaneBreadcrumb } from '@teambit/lanes.ui.gallery';
|
|
14
10
|
|
|
15
11
|
import styles from './change-log-page.module.scss';
|
|
16
12
|
|
|
@@ -18,65 +14,48 @@ type ChangeLogPageProps = {} & HTMLAttributes<HTMLDivElement>;
|
|
|
18
14
|
|
|
19
15
|
export function ChangeLogPage({ className }: ChangeLogPageProps) {
|
|
20
16
|
const component = useContext(ComponentContext);
|
|
21
|
-
const { lanesModel } = useLanes();
|
|
22
|
-
const currentLane = lanesModel?.viewedLane;
|
|
23
17
|
const { logs } = component;
|
|
24
18
|
|
|
25
19
|
if (!logs) return null;
|
|
26
20
|
|
|
27
21
|
if (logs.length === 0) {
|
|
28
22
|
return (
|
|
29
|
-
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</div>
|
|
36
|
-
<Separator isPresentational className={styles.separator} />
|
|
37
|
-
</>
|
|
38
|
-
)}
|
|
39
|
-
<div className={classNames(styles.changeLogPage, className)}>
|
|
40
|
-
<H1 className={styles.title}>History</H1>
|
|
41
|
-
<Separator isPresentational className={styles.separatorNoChangeLog} />
|
|
42
|
-
<AlertCard
|
|
43
|
-
level="info"
|
|
44
|
-
title="There is no change log as this component has not been exported yet.
|
|
23
|
+
<div className={classNames(styles.changeLogPage, className)}>
|
|
24
|
+
<H1 className={styles.title}>History</H1>
|
|
25
|
+
<Separator isPresentational className={styles.separatorNoChangeLog} />
|
|
26
|
+
<AlertCard
|
|
27
|
+
level="info"
|
|
28
|
+
title="There is no change log as this component has not been exported yet.
|
|
45
29
|
Learn how to export components:"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</>
|
|
30
|
+
className={styles.changeLogCard}
|
|
31
|
+
>
|
|
32
|
+
<MDXLayout>
|
|
33
|
+
<ExportingComponents />
|
|
34
|
+
</MDXLayout>
|
|
35
|
+
</AlertCard>
|
|
36
|
+
</div>
|
|
54
37
|
);
|
|
55
38
|
}
|
|
56
39
|
|
|
57
40
|
return (
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
<Separator isPresentational />
|
|
61
|
-
<div className={
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/>
|
|
76
|
-
);
|
|
77
|
-
})}
|
|
78
|
-
</div>
|
|
41
|
+
<div className={classNames(styles.changeLogPage, className)}>
|
|
42
|
+
<H1 className={styles.title}>History</H1>
|
|
43
|
+
<Separator isPresentational className={styles.separator} />
|
|
44
|
+
<div className={styles.logContainer}>
|
|
45
|
+
{logs.map((snap, index) => {
|
|
46
|
+
const isLatest = component.latest === snap.tag || component.latest === snap.hash;
|
|
47
|
+
const isCurrent = component.version === snap.tag || component.version === snap.hash;
|
|
48
|
+
return (
|
|
49
|
+
<VersionBlock
|
|
50
|
+
key={index}
|
|
51
|
+
componentId={component.id.fullName}
|
|
52
|
+
isLatest={isLatest}
|
|
53
|
+
snap={snap}
|
|
54
|
+
isCurrent={isCurrent}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
})}
|
|
79
58
|
</div>
|
|
80
|
-
|
|
59
|
+
</div>
|
|
81
60
|
);
|
|
82
61
|
}
|
|
Binary file
|